agent-dealer 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/server/dist/adapters/agent-deck-deliver.test.js +52 -0
- package/bundle/server/dist/adapters/agent-deck.js +140 -0
- package/bundle/server/dist/queue/answers.test.js +117 -0
- package/bundle/server/dist/queue/approve-deliver.js +62 -0
- package/bundle/server/dist/queue/dispatcher.js +176 -2
- package/bundle/server/dist/queue/plan-gate.test.js +55 -0
- package/bundle/server/dist/queue/send-gate.test.js +108 -0
- package/bundle/server/dist/repository/outbound-drafts.js +62 -0
- package/bundle/server/dist/repository/runs.js +17 -1
- package/bundle/server/dist/routes/index.js +41 -17
- package/bundle/server/dist/runners/claude-args.js +24 -0
- package/bundle/server/dist/runners/claude.js +9 -18
- package/bundle/server/dist/runners/claude.test.js +58 -0
- package/bundle/server/dist/runners/persist.js +46 -7
- package/bundle/server/dist/runners/prompts.js +87 -1
- package/bundle/server/dist/runners/prompts.test.js +92 -0
- package/bundle/server/dist/runners/reflect.js +1 -1
- package/bundle/server/dist/runners/stream-json.js +51 -0
- package/bundle/server/dist/runners/stream-json.test.js +95 -0
- package/bundle/server/dist/usage-summary.js +9 -4
- package/bundle/server/package.json +3 -2
- package/bundle/server/static-ui/assets/index-Cc-h06U6.js +78 -0
- package/bundle/server/static-ui/assets/index-DKnME33I.css +1 -0
- package/bundle/server/static-ui/index.html +2 -2
- package/bundle/shared/dist/budget.d.ts +1 -1
- package/bundle/shared/dist/budget.js +3 -3
- package/bundle/shared/dist/index.d.ts +351 -129
- package/bundle/shared/dist/index.js +19 -0
- package/bundle/shared/dist/outbound-draft.d.ts +192 -0
- package/bundle/shared/dist/outbound-draft.js +46 -0
- package/bundle/shared/dist/outbound-draft.test.d.ts +1 -0
- package/bundle/shared/dist/outbound-draft.test.js +34 -0
- package/bundle/shared/dist/plan-triage.d.ts +317 -0
- package/bundle/shared/dist/plan-triage.js +65 -0
- package/bundle/shared/dist/plan-triage.test.d.ts +1 -0
- package/bundle/shared/dist/plan-triage.test.js +66 -0
- package/bundle/shared/package.json +1 -1
- package/package.json +3 -2
- package/bundle/server/static-ui/assets/index-ChdPKYDd.css +0 -1
- package/bundle/server/static-ui/assets/index-hIzZ8TM8.js +0 -77
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const f of o.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function i(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=i(s);fetch(s.href,o)}})();function Ey(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Uc={exports:{}},ur={};/**
|
|
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 lg;function bb(){if(lg)return ur;lg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,s,o){var f=null;if(o!==void 0&&(f=""+o),s.key!==void 0&&(f=""+s.key),"key"in s){o={};for(var h in s)h!=="key"&&(o[h]=s[h])}else o=s;return s=o.ref,{$$typeof:t,type:r,key:f,ref:s!==void 0?s:null,props:o}}return ur.Fragment=l,ur.jsx=i,ur.jsxs=i,ur}var ag;function vb(){return ag||(ag=1,Uc.exports=bb()),Uc.exports}var g=vb(),Hc={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 ig;function kb(){if(ig)return Ae;ig=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),k=Symbol.iterator;function v(A){return A===null||typeof A!="object"?null:(A=k&&A[k]||A["@@iterator"],typeof A=="function"?A:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,H={};function T(A,F,w){this.props=A,this.context=F,this.refs=H,this.updater=w||_}T.prototype.isReactComponent={},T.prototype.setState=function(A,F){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,F,"setState")},T.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Y(){}Y.prototype=T.prototype;function q(A,F,w){this.props=A,this.context=F,this.refs=H,this.updater=w||_}var ae=q.prototype=new Y;ae.constructor=q,M(ae,T.prototype),ae.isPureReactComponent=!0;var W=Array.isArray;function z(){}var P={H:null,A:null,T:null,S:null},se=Object.prototype.hasOwnProperty;function ce(A,F,w){var ee=w.ref;return{$$typeof:t,type:A,key:F,ref:ee!==void 0?ee:null,props:w}}function O(A,F){return ce(A.type,F,A.props)}function I(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function X(A){var F={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(w){return F[w]})}var he=/\/+/g;function re(A,F){return typeof A=="object"&&A!==null&&A.key!=null?X(""+A.key):F.toString(36)}function te(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(z,z):(A.status="pending",A.then(function(F){A.status==="pending"&&(A.status="fulfilled",A.value=F)},function(F){A.status==="pending"&&(A.status="rejected",A.reason=F)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function j(A,F,w,ee,ye){var me=typeof A;(me==="undefined"||me==="boolean")&&(A=null);var je=!1;if(A===null)je=!0;else switch(me){case"bigint":case"string":case"number":je=!0;break;case"object":switch(A.$$typeof){case t:case l:je=!0;break;case b:return je=A._init,j(je(A._payload),F,w,ee,ye)}}if(je)return ye=ye(A),je=ee===""?"."+re(A,0):ee,W(ye)?(w="",je!=null&&(w=je.replace(he,"$&/")+"/"),j(ye,F,w,"",function(zt){return zt})):ye!=null&&(I(ye)&&(ye=O(ye,w+(ye.key==null||A&&A.key===ye.key?"":(""+ye.key).replace(he,"$&/")+"/")+je)),F.push(ye)),1;je=0;var Ve=ee===""?".":ee+":";if(W(A))for(var Qe=0;Qe<A.length;Qe++)ee=A[Qe],me=Ve+re(ee,Qe),je+=j(ee,F,w,me,ye);else if(Qe=v(A),typeof Qe=="function")for(A=Qe.call(A),Qe=0;!(ee=A.next()).done;)ee=ee.value,me=Ve+re(ee,Qe++),je+=j(ee,F,w,me,ye);else if(me==="object"){if(typeof A.then=="function")return j(te(A),F,w,ee,ye);throw F=String(A),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return je}function G(A,F,w){if(A==null)return A;var ee=[],ye=0;return j(A,ee,"","",function(me){return F.call(w,me,ye++)}),ee}function ue(A){if(A._status===-1){var F=A._result;F=F(),F.then(function(w){(A._status===0||A._status===-1)&&(A._status=1,A._result=w)},function(w){(A._status===0||A._status===-1)&&(A._status=2,A._result=w)}),A._status===-1&&(A._status=0,A._result=F)}if(A._status===1)return A._result.default;throw A._result}var ke=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},E={map:G,forEach:function(A,F,w){G(A,function(){F.apply(this,arguments)},w)},count:function(A){var F=0;return G(A,function(){F++}),F},toArray:function(A){return G(A,function(F){return F})||[]},only:function(A){if(!I(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Ae.Activity=y,Ae.Children=E,Ae.Component=T,Ae.Fragment=i,Ae.Profiler=s,Ae.PureComponent=q,Ae.StrictMode=r,Ae.Suspense=p,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(A){return P.H.useMemoCache(A)}},Ae.cache=function(A){return function(){return A.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(A,F,w){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ee=M({},A.props),ye=A.key;if(F!=null)for(me in F.key!==void 0&&(ye=""+F.key),F)!se.call(F,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&F.ref===void 0||(ee[me]=F[me]);var me=arguments.length-2;if(me===1)ee.children=w;else if(1<me){for(var je=Array(me),Ve=0;Ve<me;Ve++)je[Ve]=arguments[Ve+2];ee.children=je}return ce(A.type,ye,ee)},Ae.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:o,_context:A},A},Ae.createElement=function(A,F,w){var ee,ye={},me=null;if(F!=null)for(ee in F.key!==void 0&&(me=""+F.key),F)se.call(F,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ye[ee]=F[ee]);var je=arguments.length-2;if(je===1)ye.children=w;else if(1<je){for(var Ve=Array(je),Qe=0;Qe<je;Qe++)Ve[Qe]=arguments[Qe+2];ye.children=Ve}if(A&&A.defaultProps)for(ee in je=A.defaultProps,je)ye[ee]===void 0&&(ye[ee]=je[ee]);return ce(A,me,ye)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(A){return{$$typeof:h,render:A}},Ae.isValidElement=I,Ae.lazy=function(A){return{$$typeof:b,_payload:{_status:-1,_result:A},_init:ue}},Ae.memo=function(A,F){return{$$typeof:m,type:A,compare:F===void 0?null:F}},Ae.startTransition=function(A){var F=P.T,w={};P.T=w;try{var ee=A(),ye=P.S;ye!==null&&ye(w,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(z,ke)}catch(me){ke(me)}finally{F!==null&&w.types!==null&&(F.types=w.types),P.T=F}},Ae.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Ae.use=function(A){return P.H.use(A)},Ae.useActionState=function(A,F,w){return P.H.useActionState(A,F,w)},Ae.useCallback=function(A,F){return P.H.useCallback(A,F)},Ae.useContext=function(A){return P.H.useContext(A)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(A,F){return P.H.useDeferredValue(A,F)},Ae.useEffect=function(A,F){return P.H.useEffect(A,F)},Ae.useEffectEvent=function(A){return P.H.useEffectEvent(A)},Ae.useId=function(){return P.H.useId()},Ae.useImperativeHandle=function(A,F,w){return P.H.useImperativeHandle(A,F,w)},Ae.useInsertionEffect=function(A,F){return P.H.useInsertionEffect(A,F)},Ae.useLayoutEffect=function(A,F){return P.H.useLayoutEffect(A,F)},Ae.useMemo=function(A,F){return P.H.useMemo(A,F)},Ae.useOptimistic=function(A,F){return P.H.useOptimistic(A,F)},Ae.useReducer=function(A,F,w){return P.H.useReducer(A,F,w)},Ae.useRef=function(A){return P.H.useRef(A)},Ae.useState=function(A){return P.H.useState(A)},Ae.useSyncExternalStore=function(A,F,w){return P.H.useSyncExternalStore(A,F,w)},Ae.useTransition=function(){return P.H.useTransition()},Ae.version="19.2.7",Ae}var rg;function zf(){return rg||(rg=1,Hc.exports=kb()),Hc.exports}var Z=zf(),qc={exports:{}},sr={},Vc={exports:{}},Yc={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var ug;function Sb(){return ug||(ug=1,(function(t){function l(j,G){var ue=j.length;j.push(G);e:for(;0<ue;){var ke=ue-1>>>1,E=j[ke];if(0<s(E,G))j[ke]=G,j[ue]=E,ue=ke;else break e}}function i(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var G=j[0],ue=j.pop();if(ue!==G){j[0]=ue;e:for(var ke=0,E=j.length,A=E>>>1;ke<A;){var F=2*(ke+1)-1,w=j[F],ee=F+1,ye=j[ee];if(0>s(w,ue))ee<E&&0>s(ye,w)?(j[ke]=ye,j[ee]=ue,ke=ee):(j[ke]=w,j[F]=ue,ke=F);else if(ee<E&&0>s(ye,ue))j[ke]=ye,j[ee]=ue,ke=ee;else break e}}return G}function s(j,G){var ue=j.sortIndex-G.sortIndex;return ue!==0?ue:j.id-G.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var p=[],m=[],b=1,y=null,k=3,v=!1,_=!1,M=!1,H=!1,T=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function ae(j){for(var G=i(m);G!==null;){if(G.callback===null)r(m);else if(G.startTime<=j)r(m),G.sortIndex=G.expirationTime,l(p,G);else break;G=i(m)}}function W(j){if(M=!1,ae(j),!_)if(i(p)!==null)_=!0,z||(z=!0,X());else{var G=i(m);G!==null&&te(W,G.startTime-j)}}var z=!1,P=-1,se=5,ce=-1;function O(){return H?!0:!(t.unstable_now()-ce<se)}function I(){if(H=!1,z){var j=t.unstable_now();ce=j;var G=!0;try{e:{_=!1,M&&(M=!1,Y(P),P=-1),v=!0;var ue=k;try{t:{for(ae(j),y=i(p);y!==null&&!(y.expirationTime>j&&O());){var ke=y.callback;if(typeof ke=="function"){y.callback=null,k=y.priorityLevel;var E=ke(y.expirationTime<=j);if(j=t.unstable_now(),typeof E=="function"){y.callback=E,ae(j),G=!0;break t}y===i(p)&&r(p),ae(j)}else r(p);y=i(p)}if(y!==null)G=!0;else{var A=i(m);A!==null&&te(W,A.startTime-j),G=!1}}break e}finally{y=null,k=ue,v=!1}G=void 0}}finally{G?X():z=!1}}}var X;if(typeof q=="function")X=function(){q(I)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,re=he.port2;he.port1.onmessage=I,X=function(){re.postMessage(null)}}else X=function(){T(I,0)};function te(j,G){P=T(function(){j(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_next=function(j){switch(k){case 1:case 2:case 3:var G=3;break;default:G=k}var ue=k;k=G;try{return j()}finally{k=ue}},t.unstable_requestPaint=function(){H=!0},t.unstable_runWithPriority=function(j,G){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var ue=k;k=j;try{return G()}finally{k=ue}},t.unstable_scheduleCallback=function(j,G,ue){var ke=t.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?ke+ue:ke):ue=ke,j){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=ue+E,j={id:b++,callback:G,priorityLevel:j,startTime:ue,expirationTime:E,sortIndex:-1},ue>ke?(j.sortIndex=ue,l(m,j),i(p)===null&&j===i(m)&&(M?(Y(P),P=-1):M=!0,te(W,ue-ke))):(j.sortIndex=E,l(p,j),_||v||(_=!0,z||(z=!0,X()))),j},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(j){var G=k;return function(){var ue=k;k=G;try{return j.apply(this,arguments)}finally{k=ue}}}})(Yc)),Yc}var sg;function wb(){return sg||(sg=1,Vc.exports=Sb()),Vc.exports}var Ic={exports:{}},Mt={};/**
|
|
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 og;function _b(){if(og)return Mt;og=1;var t=zf();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(p,m,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:p,containerInfo:m,implementation:b}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Mt.createPortal=function(p,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return o(p,m,null,b)},Mt.flushSync=function(p){var m=f.T,b=r.p;try{if(f.T=null,r.p=2,p)return p()}finally{f.T=m,r.p=b,r.d.f()}},Mt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Mt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Mt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var b=m.as,y=h(b,m.crossOrigin),k=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:k,fetchPriority:v}):b==="script"&&r.d.X(p,{crossOrigin:y,integrity:k,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Mt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=h(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Mt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,y=h(b,m.crossOrigin);r.d.L(p,b,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Mt.preloadModule=function(p,m){if(typeof p=="string")if(m){var b=h(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Mt.requestFormReset=function(p){r.d.r(p)},Mt.unstable_batchedUpdates=function(p,m){return p(m)},Mt.useFormState=function(p,m,b){return f.H.useFormState(p,m,b)},Mt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Mt.version="19.2.7",Mt}var cg;function Eb(){if(cg)return Ic.exports;cg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),Ic.exports=_b(),Ic.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var fg;function Cb(){if(fg)return sr;fg=1;var t=wb(),l=zf(),i=Eb();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(o(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=o(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,u=n;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(u=c.return,u!==null){a=u;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return p(c),e;if(d===u)return p(c),n;d=d.sibling}throw Error(r(188))}if(a.return!==u.return)a=c,u=d;else{for(var x=!1,S=c.child;S;){if(S===a){x=!0,a=c,u=d;break}if(S===u){x=!0,u=c,a=d;break}S=S.sibling}if(!x){for(S=d.child;S;){if(S===a){x=!0,a=d,u=c;break}if(S===u){x=!0,u=d,a=c;break}S=S.sibling}if(!x)throw Error(r(189))}}if(a.alternate!==u)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function b(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=b(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,k=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),q=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function X(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function re(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case T:return"Profiler";case H:return"StrictMode";case W:return"Suspense";case z:return"SuspenseList";case ce:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case q:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case ae:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return n=e.displayName||null,n!==null?n:re(e.type)||"Memo";case se:n=e._payload,e=e._init;try{return re(e(n))}catch{}}return null}var te=Array.isArray,j=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},ke=[],E=-1;function A(e){return{current:e}}function F(e){0>E||(e.current=ke[E],ke[E]=null,E--)}function w(e,n){E++,ke[E]=e.current,e.current=n}var ee=A(null),ye=A(null),me=A(null),je=A(null);function Ve(e,n){switch(w(me,n),w(ye,e),w(ee,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Cp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Cp(n),e=Ap(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(ee),w(ee,e)}function Qe(){F(ee),F(ye),F(me)}function zt(e){e.memoizedState!==null&&w(je,e);var n=ee.current,a=Ap(n,e.type);n!==a&&(w(ye,e),w(ee,a))}function En(e){ye.current===e&&(F(ee),F(ye)),je.current===e&&(F(je),lr._currentValue=ue)}var Dn,et;function Ot(e){if(Dn===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Dn=n&&n[1]||"",et=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Dn+e+et}var fn=!1;function dn(e,n){if(!e||fn)return"";fn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(V){var U=V}Reflect.construct(e,[],$)}else{try{$.call()}catch(V){U=V}e.call($.prototype)}}else{try{throw Error()}catch(V){U=V}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(V){if(V&&U&&typeof V.stack=="string")return[V.stack,U.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=u.DetermineComponentFrameRoot(),x=d[0],S=d[1];if(x&&S){var C=x.split(`
|
|
44
|
+
`),L=S.split(`
|
|
45
|
+
`);for(c=u=0;u<C.length&&!C[u].includes("DetermineComponentFrameRoot");)u++;for(;c<L.length&&!L[c].includes("DetermineComponentFrameRoot");)c++;if(u===C.length||c===L.length)for(u=C.length-1,c=L.length-1;1<=u&&0<=c&&C[u]!==L[c];)c--;for(;1<=u&&0<=c;u--,c--)if(C[u]!==L[c]){if(u!==1||c!==1)do if(u--,c--,0>c||C[u]!==L[c]){var Q=`
|
|
46
|
+
`+C[u].replace(" at new "," at ");return e.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",e.displayName)),Q}while(1<=u&&0<=c);break}}}finally{fn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ot(a):""}function fl(e,n){switch(e.tag){case 26:case 27:case 5:return Ot(e.type);case 16:return Ot("Lazy");case 13:return e.child!==n&&n!==null?Ot("Suspense Fallback"):Ot("Suspense");case 19:return Ot("SuspenseList");case 0:case 15:return dn(e.type,!1);case 11:return dn(e.type.render,!1);case 1:return dn(e.type,!0);case 31:return Ot("Activity");default:return""}}function ha(e){try{var n="",a=null;do n+=fl(e,a),a=e,e=e.return;while(e);return n}catch(u){return`
|
|
47
|
+
Error generating stack: `+u.message+`
|
|
48
|
+
`+u.stack}}var ma=Object.prototype.hasOwnProperty,pa=t.unstable_scheduleCallback,pi=t.unstable_cancelCallback,Ss=t.unstable_shouldYield,ws=t.unstable_requestPaint,Bt=t.unstable_now,_s=t.unstable_getCurrentPriorityLevel,J=t.unstable_ImmediatePriority,ie=t.unstable_UserBlockingPriority,we=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,en=t.log,Vn=t.unstable_setDisableYieldValue,Ut=null,kt=null;function Zt(e){if(typeof en=="function"&&Vn(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(Ut,e)}catch{}}var tt=Math.clz32?Math.clz32:i0,dl=Math.log,Cn=Math.LN2;function i0(e){return e>>>=0,e===0?32:31-(dl(e)/Cn|0)|0}var Cr=256,Ar=262144,Nr=4194304;function Yl(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function jr(e,n,a){var u=e.pendingLanes;if(u===0)return 0;var c=0,d=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var S=u&134217727;return S!==0?(u=S&~d,u!==0?c=Yl(u):(x&=S,x!==0?c=Yl(x):a||(a=S&~e,a!==0&&(c=Yl(a))))):(S=u&~d,S!==0?c=Yl(S):x!==0?c=Yl(x):a||(a=u&~e,a!==0&&(c=Yl(a)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,a=n&-n,d>=a||d===32&&(a&4194048)!==0)?n:c}function gi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function r0(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 ud(){var e=Nr;return Nr<<=1,(Nr&62914560)===0&&(Nr=4194304),e}function Es(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function yi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function u0(e,n,a,u,c,d){var x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,C=e.expirationTimes,L=e.hiddenUpdates;for(a=x&~a;0<a;){var Q=31-tt(a),$=1<<Q;S[Q]=0,C[Q]=-1;var U=L[Q];if(U!==null)for(L[Q]=null,Q=0;Q<U.length;Q++){var V=U[Q];V!==null&&(V.lane&=-536870913)}a&=~$}u!==0&&sd(e,u,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(x&~n))}function sd(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var u=31-tt(n);e.entangledLanes|=n,e.entanglements[u]=e.entanglements[u]|1073741824|a&261930}function od(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var u=31-tt(a),c=1<<u;c&n|e[u]&n&&(e[u]|=n),a&=~c}}function cd(e,n){var a=n&-n;return a=(a&42)!==0?1:Cs(a),(a&(e.suspendedLanes|n))!==0?0:a}function Cs(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 As(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function fd(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:Kp(e.type))}function dd(e,n){var a=G.p;try{return G.p=e,n()}finally{G.p=a}}var hl=Math.random().toString(36).slice(2),Ct="__reactFiber$"+hl,Ft="__reactProps$"+hl,ga="__reactContainer$"+hl,Ns="__reactEvents$"+hl,s0="__reactListeners$"+hl,o0="__reactHandles$"+hl,hd="__reactResources$"+hl,xi="__reactMarker$"+hl;function js(e){delete e[Ct],delete e[Ft],delete e[Ns],delete e[s0],delete e[o0]}function ya(e){var n=e[Ct];if(n)return n;for(var a=e.parentNode;a;){if(n=a[ga]||a[Ct]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Mp(e);e!==null;){if(a=e[Ct])return a;e=Mp(e)}return n}e=a,a=e.parentNode}return null}function xa(e){if(e=e[Ct]||e[ga]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function bi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function ba(e){var n=e[hd];return n||(n=e[hd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function wt(e){e[xi]=!0}var md=new Set,pd={};function Il(e,n){va(e,n),va(e+"Capture",n)}function va(e,n){for(pd[e]=n,e=0;e<n.length;e++)md.add(n[e])}var c0=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]*$"),gd={},yd={};function f0(e){return ma.call(yd,e)?!0:ma.call(gd,e)?!1:c0.test(e)?yd[e]=!0:(gd[e]=!0,!1)}function Tr(e,n,a){if(f0(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Dr(e,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.setAttribute(n,""+a)}}function Yn(e,n,a,u){if(u===null)e.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+u)}}function hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function d0(e,n,a){var u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var c=u.get,d=u.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(x){a=""+x,d.call(this,x)}}),Object.defineProperty(e,n,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ts(e){if(!e._valueTracker){var n=xd(e)?"checked":"value";e._valueTracker=d0(e,n,""+e[n])}}function bd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),u="";return e&&(u=xd(e)?e.checked?"true":"false":e.value),e=u,e!==a?(n.setValue(e),!0):!1}function zr(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 h0=/[\n"\\]/g;function mn(e){return e.replace(h0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ds(e,n,a,u,c,d,x,S){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),n!=null?x==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+hn(n)):e.value!==""+hn(n)&&(e.value=""+hn(n)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),n!=null?zs(e,x,hn(n)):a!=null?zs(e,x,hn(a)):u!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+hn(S):e.removeAttribute("name")}function vd(e,n,a,u,c,d,x,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){Ts(e);return}a=a!=null?""+hn(a):"",n=n!=null?""+hn(n):a,S||n===e.value||(e.value=n),e.defaultValue=n}u=u??c,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=S?e.checked:!!u,e.defaultChecked=!!u,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Ts(e)}function zs(e,n,a){n==="number"&&zr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ka(e,n,a,u){if(e=e.options,n){n={};for(var c=0;c<a.length;c++)n["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=n.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&u&&(e[a].defaultSelected=!0)}else{for(a=""+hn(a),n=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,u&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function kd(e,n,a){if(n!=null&&(n=""+hn(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+hn(a):""}function Sd(e,n,a,u){if(n==null){if(u!=null){if(a!=null)throw Error(r(92));if(te(u)){if(1<u.length)throw Error(r(93));u=u[0]}a=u}a==null&&(a=""),n=a}a=hn(n),e.defaultValue=a,u=e.textContent,u===a&&u!==""&&u!==null&&(e.value=u),Ts(e)}function Sa(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var m0=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 wd(e,n,a){var u=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?u?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":u?e.setProperty(n,a):typeof a!="number"||a===0||m0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function _d(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var u in a)!a.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var c in n)u=n[c],n.hasOwnProperty(c)&&a[c]!==u&&wd(e,c,u)}else for(var d in n)n.hasOwnProperty(d)&&wd(e,d,n[d])}function Os(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 p0=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"]]),g0=/^[\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 Or(e){return g0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function In(){}var Ms=null;function Rs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wa=null,_a=null;function Ed(e){var n=xa(e);if(n&&(e=n.stateNode)){var a=e[Ft]||null;e:switch(e=n.stateNode,n.type){case"input":if(Ds(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+mn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var u=a[n];if(u!==e&&u.form===e.form){var c=u[Ft]||null;if(!c)throw Error(r(90));Ds(u,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<a.length;n++)u=a[n],u.form===e.form&&bd(u)}break e;case"textarea":kd(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&ka(e,!!a.multiple,n,!1)}}}var Ls=!1;function Cd(e,n,a){if(Ls)return e(n,a);Ls=!0;try{var u=e(n);return u}finally{if(Ls=!1,(wa!==null||_a!==null)&&(vu(),wa&&(n=wa,e=_a,_a=wa=null,Ed(n),e)))for(n=0;n<e.length;n++)Ed(e[n])}}function vi(e,n){var a=e.stateNode;if(a===null)return null;var u=a[Ft]||null;if(u===null)return null;a=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var Zn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bs=!1;if(Zn)try{var ki={};Object.defineProperty(ki,"passive",{get:function(){Bs=!0}}),window.addEventListener("test",ki,ki),window.removeEventListener("test",ki,ki)}catch{Bs=!1}var ml=null,Us=null,Mr=null;function Ad(){if(Mr)return Mr;var e,n=Us,a=n.length,u,c="value"in ml?ml.value:ml.textContent,d=c.length;for(e=0;e<a&&n[e]===c[e];e++);var x=a-e;for(u=1;u<=x&&n[a-u]===c[d-u];u++);return Mr=c.slice(e,1<u?1-u:void 0)}function Rr(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Lr(){return!0}function Nd(){return!1}function Qt(e){function n(a,u,c,d,x){this._reactName=a,this._targetInst=c,this.type=u,this.nativeEvent=d,this.target=x,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Lr:Nd,this.isPropagationStopped=Nd,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Lr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Lr)},persist:function(){},isPersistent:Lr}),n}var Zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Br=Qt(Zl),Si=y({},Zl,{view:0,detail:0}),y0=Qt(Si),Hs,qs,wi,Ur=y({},Si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ys,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!==wi&&(wi&&e.type==="mousemove"?(Hs=e.screenX-wi.screenX,qs=e.screenY-wi.screenY):qs=Hs=0,wi=e),Hs)},movementY:function(e){return"movementY"in e?e.movementY:qs}}),jd=Qt(Ur),x0=y({},Ur,{dataTransfer:0}),b0=Qt(x0),v0=y({},Si,{relatedTarget:0}),Vs=Qt(v0),k0=y({},Zl,{animationName:0,elapsedTime:0,pseudoElement:0}),S0=Qt(k0),w0=y({},Zl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_0=Qt(w0),E0=y({},Zl,{data:0}),Td=Qt(E0),C0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A0={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"},N0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function j0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=N0[e])?!!n[e]:!1}function Ys(){return j0}var T0=y({},Si,{key:function(e){if(e.key){var n=C0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Rr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?A0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ys,charCode:function(e){return e.type==="keypress"?Rr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Rr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),D0=Qt(T0),z0=y({},Ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dd=Qt(z0),O0=y({},Si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ys}),M0=Qt(O0),R0=y({},Zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),L0=Qt(R0),B0=y({},Ur,{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}),U0=Qt(B0),H0=y({},Zl,{newState:0,oldState:0}),q0=Qt(H0),V0=[9,13,27,32],Is=Zn&&"CompositionEvent"in window,_i=null;Zn&&"documentMode"in document&&(_i=document.documentMode);var Y0=Zn&&"TextEvent"in window&&!_i,zd=Zn&&(!Is||_i&&8<_i&&11>=_i),Od=" ",Md=!1;function Rd(e,n){switch(e){case"keyup":return V0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ld(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ea=!1;function I0(e,n){switch(e){case"compositionend":return Ld(n);case"keypress":return n.which!==32?null:(Md=!0,Od);case"textInput":return e=n.data,e===Od&&Md?null:e;default:return null}}function Z0(e,n){if(Ea)return e==="compositionend"||!Is&&Rd(e,n)?(e=Ad(),Mr=Us=ml=null,Ea=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return zd&&n.locale!=="ko"?null:n.data;default:return null}}var F0={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 Bd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!F0[e.type]:n==="textarea"}function Ud(e,n,a,u){wa?_a?_a.push(u):_a=[u]:wa=u,n=Au(n,"onChange"),0<n.length&&(a=new Br("onChange","change",null,a,u),e.push({event:a,listeners:n}))}var Ei=null,Ci=null;function Q0(e){vp(e,0)}function Hr(e){var n=bi(e);if(bd(n))return e}function Hd(e,n){if(e==="change")return n}var qd=!1;if(Zn){var Zs;if(Zn){var Fs="oninput"in document;if(!Fs){var Vd=document.createElement("div");Vd.setAttribute("oninput","return;"),Fs=typeof Vd.oninput=="function"}Zs=Fs}else Zs=!1;qd=Zs&&(!document.documentMode||9<document.documentMode)}function Yd(){Ei&&(Ei.detachEvent("onpropertychange",Id),Ci=Ei=null)}function Id(e){if(e.propertyName==="value"&&Hr(Ci)){var n=[];Ud(n,Ci,e,Rs(e)),Cd(Q0,n)}}function G0(e,n,a){e==="focusin"?(Yd(),Ei=n,Ci=a,Ei.attachEvent("onpropertychange",Id)):e==="focusout"&&Yd()}function X0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hr(Ci)}function J0(e,n){if(e==="click")return Hr(n)}function K0(e,n){if(e==="input"||e==="change")return Hr(n)}function $0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var tn=typeof Object.is=="function"?Object.is:$0;function Ai(e,n){if(tn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),u=Object.keys(n);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var c=a[u];if(!ma.call(n,c)||!tn(e[c],n[c]))return!1}return!0}function Zd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fd(e,n){var a=Zd(e);e=0;for(var u;a;){if(a.nodeType===3){if(u=e+a.textContent.length,e<=n&&u>=n)return{node:a,offset:n-e};e=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zd(a)}}function Qd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Qd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Gd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=zr(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=zr(e.document)}return n}function Qs(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var P0=Zn&&"documentMode"in document&&11>=document.documentMode,Ca=null,Gs=null,Ni=null,Xs=!1;function Xd(e,n,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Xs||Ca==null||Ca!==zr(u)||(u=Ca,"selectionStart"in u&&Qs(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ni&&Ai(Ni,u)||(Ni=u,u=Au(Gs,"onSelect"),0<u.length&&(n=new Br("onSelect","select",null,n,a),e.push({event:n,listeners:u}),n.target=Ca)))}function Fl(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Aa={animationend:Fl("Animation","AnimationEnd"),animationiteration:Fl("Animation","AnimationIteration"),animationstart:Fl("Animation","AnimationStart"),transitionrun:Fl("Transition","TransitionRun"),transitionstart:Fl("Transition","TransitionStart"),transitioncancel:Fl("Transition","TransitionCancel"),transitionend:Fl("Transition","TransitionEnd")},Js={},Jd={};Zn&&(Jd=document.createElement("div").style,"AnimationEvent"in window||(delete Aa.animationend.animation,delete Aa.animationiteration.animation,delete Aa.animationstart.animation),"TransitionEvent"in window||delete Aa.transitionend.transition);function Ql(e){if(Js[e])return Js[e];if(!Aa[e])return e;var n=Aa[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in Jd)return Js[e]=n[a];return e}var Kd=Ql("animationend"),$d=Ql("animationiteration"),Pd=Ql("animationstart"),W0=Ql("transitionrun"),e1=Ql("transitionstart"),t1=Ql("transitioncancel"),Wd=Ql("transitionend"),eh=new Map,Ks="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(" ");Ks.push("scrollEnd");function An(e,n){eh.set(e,n),Il(n,[e])}var qr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=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(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},pn=[],Na=0,$s=0;function Vr(){for(var e=Na,n=$s=Na=0;n<e;){var a=pn[n];pn[n++]=null;var u=pn[n];pn[n++]=null;var c=pn[n];pn[n++]=null;var d=pn[n];if(pn[n++]=null,u!==null&&c!==null){var x=u.pending;x===null?c.next=c:(c.next=x.next,x.next=c),u.pending=c}d!==0&&th(a,c,d)}}function Yr(e,n,a,u){pn[Na++]=e,pn[Na++]=n,pn[Na++]=a,pn[Na++]=u,$s|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function Ps(e,n,a,u){return Yr(e,n,a,u),Ir(e)}function Gl(e,n){return Yr(e,null,null,n),Ir(e)}function th(e,n,a){e.lanes|=a;var u=e.alternate;u!==null&&(u.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,u=d.alternate,u!==null&&(u.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&n!==null&&(c=31-tt(a),e=d.hiddenUpdates,u=e[c],u===null?e[c]=[n]:u.push(n),n.lane=a|536870912),d):null}function Ir(e){if(50<Ki)throw Ki=0,sc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ja={};function n1(e,n,a,u){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,n,a,u){return new n1(e,n,a,u)}function Ws(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fn(e,n){var a=e.alternate;return a===null?(a=nn(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function nh(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Zr(e,n,a,u,c,d){var x=0;if(u=e,typeof e=="function")Ws(e)&&(x=1);else if(typeof e=="string")x=ub(e,a,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ce:return e=nn(31,a,n,c),e.elementType=ce,e.lanes=d,e;case M:return Xl(a.children,c,d,n);case H:x=8,c|=24;break;case T:return e=nn(12,a,n,c|2),e.elementType=T,e.lanes=d,e;case W:return e=nn(13,a,n,c),e.elementType=W,e.lanes=d,e;case z:return e=nn(19,a,n,c),e.elementType=z,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:x=10;break e;case Y:x=9;break e;case ae:x=11;break e;case P:x=14;break e;case se:x=16,u=null;break e}x=29,a=Error(r(130,e===null?"null":typeof e,"")),u=null}return n=nn(x,a,n,c),n.elementType=e,n.type=u,n.lanes=d,n}function Xl(e,n,a,u){return e=nn(7,e,u,n),e.lanes=a,e}function eo(e,n,a){return e=nn(6,e,null,n),e.lanes=a,e}function lh(e){var n=nn(18,null,null,0);return n.stateNode=e,n}function to(e,n,a){return n=nn(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var ah=new WeakMap;function gn(e,n){if(typeof e=="object"&&e!==null){var a=ah.get(e);return a!==void 0?a:(n={value:e,source:n,stack:ha(n)},ah.set(e,n),n)}return{value:e,source:n,stack:ha(n)}}var Ta=[],Da=0,Fr=null,ji=0,yn=[],xn=0,pl=null,zn=1,On="";function Qn(e,n){Ta[Da++]=ji,Ta[Da++]=Fr,Fr=e,ji=n}function ih(e,n,a){yn[xn++]=zn,yn[xn++]=On,yn[xn++]=pl,pl=e;var u=zn;e=On;var c=32-tt(u)-1;u&=~(1<<c),a+=1;var d=32-tt(n)+c;if(30<d){var x=c-c%5;d=(u&(1<<x)-1).toString(32),u>>=x,c-=x,zn=1<<32-tt(n)+c|a<<c|u,On=d+e}else zn=1<<d|a<<c|u,On=e}function no(e){e.return!==null&&(Qn(e,1),ih(e,1,0))}function lo(e){for(;e===Fr;)Fr=Ta[--Da],Ta[Da]=null,ji=Ta[--Da],Ta[Da]=null;for(;e===pl;)pl=yn[--xn],yn[xn]=null,On=yn[--xn],yn[xn]=null,zn=yn[--xn],yn[xn]=null}function rh(e,n){yn[xn++]=zn,yn[xn++]=On,yn[xn++]=pl,zn=n.id,On=n.overflow,pl=e}var At=null,rt=null,Ue=!1,gl=null,bn=!1,ao=Error(r(519));function yl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ti(gn(n,e)),ao}function uh(e){var n=e.stateNode,a=e.type,u=e.memoizedProps;switch(n[Ct]=e,n[Ft]=u,a){case"dialog":Me("cancel",n),Me("close",n);break;case"iframe":case"object":case"embed":Me("load",n);break;case"video":case"audio":for(a=0;a<Pi.length;a++)Me(Pi[a],n);break;case"source":Me("error",n);break;case"img":case"image":case"link":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"input":Me("invalid",n),vd(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Me("invalid",n);break;case"textarea":Me("invalid",n),Sd(n,u.value,u.defaultValue,u.children)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||u.suppressHydrationWarning===!0||_p(n.textContent,a)?(u.popover!=null&&(Me("beforetoggle",n),Me("toggle",n)),u.onScroll!=null&&Me("scroll",n),u.onScrollEnd!=null&&Me("scrollend",n),u.onClick!=null&&(n.onclick=In),n=!0):n=!1,n||yl(e,!0)}function sh(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:bn=!1;return;case 27:case 3:bn=!0;return;default:At=At.return}}function za(e){if(e!==At)return!1;if(!Ue)return sh(e),Ue=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||wc(e.type,e.memoizedProps)),a=!a),a&&rt&&yl(e),sh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));rt=Op(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));rt=Op(e)}else n===27?(n=rt,Dl(e.type)?(e=Nc,Nc=null,rt=e):rt=n):rt=At?kn(e.stateNode.nextSibling):null;return!0}function Jl(){rt=At=null,Ue=!1}function io(){var e=gl;return e!==null&&(Kt===null?Kt=e:Kt.push.apply(Kt,e),gl=null),e}function Ti(e){gl===null?gl=[e]:gl.push(e)}var ro=A(null),Kl=null,Gn=null;function xl(e,n,a){w(ro,n._currentValue),n._currentValue=a}function Xn(e){e._currentValue=ro.current,F(ro)}function uo(e,n,a){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===a)break;e=e.return}}function so(e,n,a,u){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var x=c.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=c;for(var C=0;C<n.length;C++)if(S.context===n[C]){d.lanes|=a,S=d.alternate,S!==null&&(S.lanes|=a),uo(d.return,a,e),u||(x=null);break e}d=S.next}}else if(c.tag===18){if(x=c.return,x===null)throw Error(r(341));x.lanes|=a,d=x.alternate,d!==null&&(d.lanes|=a),uo(x,a,e),x=null}else x=c.child;if(x!==null)x.return=c;else for(x=c;x!==null;){if(x===e){x=null;break}if(c=x.sibling,c!==null){c.return=x.return,x=c;break}x=x.return}c=x}}function Oa(e,n,a,u){e=null;for(var c=n,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var x=c.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var S=c.type;tn(c.pendingProps.value,x.value)||(e!==null?e.push(S):e=[S])}}else if(c===je.current){if(x=c.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(lr):e=[lr])}c=c.return}e!==null&&so(n,e,a,u),n.flags|=262144}function Qr(e){for(e=e.firstContext;e!==null;){if(!tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $l(e){Kl=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Nt(e){return oh(Kl,e)}function Gr(e,n){return Kl===null&&$l(e),oh(e,n)}function oh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Gn===null){if(e===null)throw Error(r(308));Gn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Gn=Gn.next=n;return a}var l1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,u){e.push(u)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},a1=t.unstable_scheduleCallback,i1=t.unstable_NormalPriority,pt={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oo(){return{controller:new l1,data:new Map,refCount:0}}function Di(e){e.refCount--,e.refCount===0&&a1(i1,function(){e.controller.abort()})}var zi=null,co=0,Ma=0,Ra=null;function r1(e,n){if(zi===null){var a=zi=[];co=0,Ma=mc(),Ra={status:"pending",value:void 0,then:function(u){a.push(u)}}}return co++,n.then(ch,ch),n}function ch(){if(--co===0&&zi!==null){Ra!==null&&(Ra.status="fulfilled");var e=zi;zi=null,Ma=0,Ra=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function u1(e,n){var a=[],u={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var c=0;c<a.length;c++)(0,a[c])(n)},function(c){for(u.status="rejected",u.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),u}var fh=j.S;j.S=function(e,n){Xm=Bt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&r1(e,n),fh!==null&&fh(e,n)};var Pl=A(null);function fo(){var e=Pl.current;return e!==null?e:nt.pooledCache}function Xr(e,n){n===null?w(Pl,Pl.current):w(Pl,n.pool)}function dh(){var e=fo();return e===null?null:{parent:pt._currentValue,pool:e}}var La=Error(r(460)),ho=Error(r(474)),Jr=Error(r(542)),Kr={then:function(){}};function hh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function mh(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(In,In),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,gh(e),e;default:if(typeof n.status=="string")n.then(In,In);else{if(e=nt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(u){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=u}},function(u){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,gh(e),e}throw ea=n,La}}function Wl(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ea=a,La):a}}var ea=null;function ph(){if(ea===null)throw Error(r(459));var e=ea;return ea=null,e}function gh(e){if(e===La||e===Jr)throw Error(r(483))}var Ba=null,Oi=0;function $r(e){var n=Oi;return Oi+=1,Ba===null&&(Ba=[]),mh(Ba,e,n)}function Mi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Pr(e,n){throw n.$$typeof===k?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function yh(e){function n(D,N){if(e){var R=D.deletions;R===null?(D.deletions=[N],D.flags|=16):R.push(N)}}function a(D,N){if(!e)return null;for(;N!==null;)n(D,N),N=N.sibling;return null}function u(D){for(var N=new Map;D!==null;)D.key!==null?N.set(D.key,D):N.set(D.index,D),D=D.sibling;return N}function c(D,N){return D=Fn(D,N),D.index=0,D.sibling=null,D}function d(D,N,R){return D.index=R,e?(R=D.alternate,R!==null?(R=R.index,R<N?(D.flags|=67108866,N):R):(D.flags|=67108866,N)):(D.flags|=1048576,N)}function x(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function S(D,N,R,K){return N===null||N.tag!==6?(N=eo(R,D.mode,K),N.return=D,N):(N=c(N,R),N.return=D,N)}function C(D,N,R,K){var be=R.type;return be===M?Q(D,N,R.props.children,K,R.key):N!==null&&(N.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===se&&Wl(be)===N.type)?(N=c(N,R.props),Mi(N,R),N.return=D,N):(N=Zr(R.type,R.key,R.props,null,D.mode,K),Mi(N,R),N.return=D,N)}function L(D,N,R,K){return N===null||N.tag!==4||N.stateNode.containerInfo!==R.containerInfo||N.stateNode.implementation!==R.implementation?(N=to(R,D.mode,K),N.return=D,N):(N=c(N,R.children||[]),N.return=D,N)}function Q(D,N,R,K,be){return N===null||N.tag!==7?(N=Xl(R,D.mode,K,be),N.return=D,N):(N=c(N,R),N.return=D,N)}function $(D,N,R){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=eo(""+N,D.mode,R),N.return=D,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case v:return R=Zr(N.type,N.key,N.props,null,D.mode,R),Mi(R,N),R.return=D,R;case _:return N=to(N,D.mode,R),N.return=D,N;case se:return N=Wl(N),$(D,N,R)}if(te(N)||X(N))return N=Xl(N,D.mode,R,null),N.return=D,N;if(typeof N.then=="function")return $(D,$r(N),R);if(N.$$typeof===q)return $(D,Gr(D,N),R);Pr(D,N)}return null}function U(D,N,R,K){var be=N!==null?N.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return be!==null?null:S(D,N,""+R,K);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case v:return R.key===be?C(D,N,R,K):null;case _:return R.key===be?L(D,N,R,K):null;case se:return R=Wl(R),U(D,N,R,K)}if(te(R)||X(R))return be!==null?null:Q(D,N,R,K,null);if(typeof R.then=="function")return U(D,N,$r(R),K);if(R.$$typeof===q)return U(D,N,Gr(D,R),K);Pr(D,R)}return null}function V(D,N,R,K,be){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return D=D.get(R)||null,S(N,D,""+K,be);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case v:return D=D.get(K.key===null?R:K.key)||null,C(N,D,K,be);case _:return D=D.get(K.key===null?R:K.key)||null,L(N,D,K,be);case se:return K=Wl(K),V(D,N,R,K,be)}if(te(K)||X(K))return D=D.get(R)||null,Q(N,D,K,be,null);if(typeof K.then=="function")return V(D,N,R,$r(K),be);if(K.$$typeof===q)return V(D,N,R,Gr(N,K),be);Pr(N,K)}return null}function fe(D,N,R,K){for(var be=null,Ye=null,pe=N,Te=N=0,Be=null;pe!==null&&Te<R.length;Te++){pe.index>Te?(Be=pe,pe=null):Be=pe.sibling;var Ie=U(D,pe,R[Te],K);if(Ie===null){pe===null&&(pe=Be);break}e&&pe&&Ie.alternate===null&&n(D,pe),N=d(Ie,N,Te),Ye===null?be=Ie:Ye.sibling=Ie,Ye=Ie,pe=Be}if(Te===R.length)return a(D,pe),Ue&&Qn(D,Te),be;if(pe===null){for(;Te<R.length;Te++)pe=$(D,R[Te],K),pe!==null&&(N=d(pe,N,Te),Ye===null?be=pe:Ye.sibling=pe,Ye=pe);return Ue&&Qn(D,Te),be}for(pe=u(pe);Te<R.length;Te++)Be=V(pe,D,Te,R[Te],K),Be!==null&&(e&&Be.alternate!==null&&pe.delete(Be.key===null?Te:Be.key),N=d(Be,N,Te),Ye===null?be=Be:Ye.sibling=Be,Ye=Be);return e&&pe.forEach(function(Ll){return n(D,Ll)}),Ue&&Qn(D,Te),be}function Se(D,N,R,K){if(R==null)throw Error(r(151));for(var be=null,Ye=null,pe=N,Te=N=0,Be=null,Ie=R.next();pe!==null&&!Ie.done;Te++,Ie=R.next()){pe.index>Te?(Be=pe,pe=null):Be=pe.sibling;var Ll=U(D,pe,Ie.value,K);if(Ll===null){pe===null&&(pe=Be);break}e&&pe&&Ll.alternate===null&&n(D,pe),N=d(Ll,N,Te),Ye===null?be=Ll:Ye.sibling=Ll,Ye=Ll,pe=Be}if(Ie.done)return a(D,pe),Ue&&Qn(D,Te),be;if(pe===null){for(;!Ie.done;Te++,Ie=R.next())Ie=$(D,Ie.value,K),Ie!==null&&(N=d(Ie,N,Te),Ye===null?be=Ie:Ye.sibling=Ie,Ye=Ie);return Ue&&Qn(D,Te),be}for(pe=u(pe);!Ie.done;Te++,Ie=R.next())Ie=V(pe,D,Te,Ie.value,K),Ie!==null&&(e&&Ie.alternate!==null&&pe.delete(Ie.key===null?Te:Ie.key),N=d(Ie,N,Te),Ye===null?be=Ie:Ye.sibling=Ie,Ye=Ie);return e&&pe.forEach(function(xb){return n(D,xb)}),Ue&&Qn(D,Te),be}function We(D,N,R,K){if(typeof R=="object"&&R!==null&&R.type===M&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case v:e:{for(var be=R.key;N!==null;){if(N.key===be){if(be=R.type,be===M){if(N.tag===7){a(D,N.sibling),K=c(N,R.props.children),K.return=D,D=K;break e}}else if(N.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===se&&Wl(be)===N.type){a(D,N.sibling),K=c(N,R.props),Mi(K,R),K.return=D,D=K;break e}a(D,N);break}else n(D,N);N=N.sibling}R.type===M?(K=Xl(R.props.children,D.mode,K,R.key),K.return=D,D=K):(K=Zr(R.type,R.key,R.props,null,D.mode,K),Mi(K,R),K.return=D,D=K)}return x(D);case _:e:{for(be=R.key;N!==null;){if(N.key===be)if(N.tag===4&&N.stateNode.containerInfo===R.containerInfo&&N.stateNode.implementation===R.implementation){a(D,N.sibling),K=c(N,R.children||[]),K.return=D,D=K;break e}else{a(D,N);break}else n(D,N);N=N.sibling}K=to(R,D.mode,K),K.return=D,D=K}return x(D);case se:return R=Wl(R),We(D,N,R,K)}if(te(R))return fe(D,N,R,K);if(X(R)){if(be=X(R),typeof be!="function")throw Error(r(150));return R=be.call(R),Se(D,N,R,K)}if(typeof R.then=="function")return We(D,N,$r(R),K);if(R.$$typeof===q)return We(D,N,Gr(D,R),K);Pr(D,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,N!==null&&N.tag===6?(a(D,N.sibling),K=c(N,R),K.return=D,D=K):(a(D,N),K=eo(R,D.mode,K),K.return=D,D=K),x(D)):a(D,N)}return function(D,N,R,K){try{Oi=0;var be=We(D,N,R,K);return Ba=null,be}catch(pe){if(pe===La||pe===Jr)throw pe;var Ye=nn(29,pe,null,D.mode);return Ye.lanes=K,Ye.return=D,Ye}finally{}}}var ta=yh(!0),xh=yh(!1),bl=!1;function mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function po(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kl(e,n,a){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(Fe&2)!==0){var c=u.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),u.pending=n,n=Ir(e),th(e,null,a),n}return Yr(e,u,n,a),Ir(e)}function Ri(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,od(e,a)}}function go(e,n){var a=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=x:d=d.next=x,a=a.next}while(a!==null);d===null?c=d=n:d=d.next=n}else c=d=n;a={baseState:u.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:u.shared,callbacks:u.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var yo=!1;function Li(){if(yo){var e=Ra;if(e!==null)throw e}}function Bi(e,n,a,u){yo=!1;var c=e.updateQueue;bl=!1;var d=c.firstBaseUpdate,x=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var C=S,L=C.next;C.next=null,x===null?d=L:x.next=L,x=C;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,S=Q.lastBaseUpdate,S!==x&&(S===null?Q.firstBaseUpdate=L:S.next=L,Q.lastBaseUpdate=C))}if(d!==null){var $=c.baseState;x=0,Q=L=C=null,S=d;do{var U=S.lane&-536870913,V=U!==S.lane;if(V?(Le&U)===U:(u&U)===U){U!==0&&U===Ma&&(yo=!0),Q!==null&&(Q=Q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var fe=e,Se=S;U=n;var We=a;switch(Se.tag){case 1:if(fe=Se.payload,typeof fe=="function"){$=fe.call(We,$,U);break e}$=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=Se.payload,U=typeof fe=="function"?fe.call(We,$,U):fe,U==null)break e;$=y({},$,U);break e;case 2:bl=!0}}U=S.callback,U!==null&&(e.flags|=64,V&&(e.flags|=8192),V=c.callbacks,V===null?c.callbacks=[U]:V.push(U))}else V={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Q===null?(L=Q=V,C=$):Q=Q.next=V,x|=U;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;V=S,S=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);Q===null&&(C=$),c.baseState=C,c.firstBaseUpdate=L,c.lastBaseUpdate=Q,d===null&&(c.shared.lanes=0),Cl|=x,e.lanes=x,e.memoizedState=$}}function bh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function vh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)bh(a[e],n)}var Ua=A(null),Wr=A(0);function kh(e,n){e=ll,w(Wr,e),w(Ua,n),ll=e|n.baseLanes}function xo(){w(Wr,ll),w(Ua,Ua.current)}function bo(){ll=Wr.current,F(Ua),F(Wr)}var ln=A(null),vn=null;function Sl(e){var n=e.alternate;w(ht,ht.current&1),w(ln,e),vn===null&&(n===null||Ua.current!==null||n.memoizedState!==null)&&(vn=e)}function vo(e){w(ht,ht.current),w(ln,e),vn===null&&(vn=e)}function Sh(e){e.tag===22?(w(ht,ht.current),w(ln,e),vn===null&&(vn=e)):wl()}function wl(){w(ht,ht.current),w(ln,ln.current)}function an(e){F(ln),vn===e&&(vn=null),F(ht)}var ht=A(0);function eu(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Cc(a)||Ac(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Jn=0,Ne=null,$e=null,gt=null,tu=!1,Ha=!1,na=!1,nu=0,Ui=0,qa=null,s1=0;function ft(){throw Error(r(321))}function ko(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!tn(e[a],n[a]))return!1;return!0}function So(e,n,a,u,c,d){return Jn=d,Ne=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,j.H=e===null||e.memoizedState===null?im:Bo,na=!1,d=a(u,c),na=!1,Ha&&(d=_h(n,a,u,c)),wh(e),d}function wh(e){j.H=Vi;var n=$e!==null&&$e.next!==null;if(Jn=0,gt=$e=Ne=null,tu=!1,Ui=0,qa=null,n)throw Error(r(300));e===null||yt||(e=e.dependencies,e!==null&&Qr(e)&&(yt=!0))}function _h(e,n,a,u){Ne=e;var c=0;do{if(Ha&&(qa=null),Ui=0,Ha=!1,25<=c)throw Error(r(301));if(c+=1,gt=$e=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}j.H=rm,d=n(a,u)}while(Ha);return d}function o1(){var e=j.H,n=e.useState()[0];return n=typeof n.then=="function"?Hi(n):n,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(Ne.flags|=1024),n}function wo(){var e=nu!==0;return nu=0,e}function _o(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Eo(e){if(tu){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}tu=!1}Jn=0,gt=$e=Ne=null,Ha=!1,Ui=nu=0,qa=null}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?Ne.memoizedState=gt=e:gt=gt.next=e,gt}function mt(){if($e===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var n=gt===null?Ne.memoizedState:gt.next;if(n!==null)gt=n,$e=e;else{if(e===null)throw Ne.alternate===null?Error(r(467)):Error(r(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},gt===null?Ne.memoizedState=gt=e:gt=gt.next=e}return gt}function lu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hi(e){var n=Ui;return Ui+=1,qa===null&&(qa=[]),e=mh(qa,e,n),n=Ne,(gt===null?n.memoizedState:gt.next)===null&&(n=n.alternate,j.H=n===null||n.memoizedState===null?im:Bo),e}function au(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hi(e);if(e.$$typeof===q)return Nt(e)}throw Error(r(438,String(e)))}function Co(e){var n=null,a=Ne.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var u=Ne.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=lu(),Ne.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),u=0;u<e;u++)a[u]=O;return n.index++,a}function Kn(e,n){return typeof n=="function"?n(e):n}function iu(e){var n=mt();return Ao(n,$e,e)}function Ao(e,n,a){var u=e.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var c=e.baseQueue,d=u.pending;if(d!==null){if(c!==null){var x=c.next;c.next=d.next,d.next=x}n.baseQueue=c=d,u.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{n=c.next;var S=x=null,C=null,L=n,Q=!1;do{var $=L.lane&-536870913;if($!==L.lane?(Le&$)===$:(Jn&$)===$){var U=L.revertLane;if(U===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),$===Ma&&(Q=!0);else if((Jn&U)===U){L=L.next,U===Ma&&(Q=!0);continue}else $={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(S=C=$,x=d):C=C.next=$,Ne.lanes|=U,Cl|=U;$=L.action,na&&a(d,$),d=L.hasEagerState?L.eagerState:a(d,$)}else U={lane:$,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(S=C=U,x=d):C=C.next=U,Ne.lanes|=$,Cl|=$;L=L.next}while(L!==null&&L!==n);if(C===null?x=d:C.next=S,!tn(d,e.memoizedState)&&(yt=!0,Q&&(a=Ra,a!==null)))throw a;e.memoizedState=d,e.baseState=x,e.baseQueue=C,u.lastRenderedState=d}return c===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function No(e){var n=mt(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var u=a.dispatch,c=a.pending,d=n.memoizedState;if(c!==null){a.pending=null;var x=c=c.next;do d=e(d,x.action),x=x.next;while(x!==c);tn(d,n.memoizedState)||(yt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),a.lastRenderedState=d}return[d,u]}function Eh(e,n,a){var u=Ne,c=mt(),d=Ue;if(d){if(a===void 0)throw Error(r(407));a=a()}else a=n();var x=!tn(($e||c).memoizedState,a);if(x&&(c.memoizedState=a,yt=!0),c=c.queue,Do(Nh.bind(null,u,c,e),[e]),c.getSnapshot!==n||x||gt!==null&>.memoizedState.tag&1){if(u.flags|=2048,Va(9,{destroy:void 0},Ah.bind(null,u,c,a,n),null),nt===null)throw Error(r(349));d||(Jn&127)!==0||Ch(u,n,a)}return a}function Ch(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Ne.updateQueue,n===null?(n=lu(),Ne.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Ah(e,n,a,u){n.value=a,n.getSnapshot=u,jh(n)&&Th(e)}function Nh(e,n,a){return a(function(){jh(n)&&Th(e)})}function jh(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!tn(e,a)}catch{return!0}}function Th(e){var n=Gl(e,2);n!==null&&$t(n,e,2)}function jo(e){var n=Ht();if(typeof e=="function"){var a=e;if(e=a(),na){Zt(!0);try{a()}finally{Zt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},n}function Dh(e,n,a,u){return e.baseState=a,Ao(e,$e,typeof u=="function"?u:Kn)}function c1(e,n,a,u,c){if(su(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){d.listeners.push(x)}};j.T!==null?a(!0):d.isTransition=!1,u(d),a=n.pending,a===null?(d.next=n.pending=d,zh(n,d)):(d.next=a.next,n.pending=a.next=d)}}function zh(e,n){var a=n.action,u=n.payload,c=e.state;if(n.isTransition){var d=j.T,x={};j.T=x;try{var S=a(c,u),C=j.S;C!==null&&C(x,S),Oh(e,n,S)}catch(L){To(e,n,L)}finally{d!==null&&x.types!==null&&(d.types=x.types),j.T=d}}else try{d=a(c,u),Oh(e,n,d)}catch(L){To(e,n,L)}}function Oh(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){Mh(e,n,u)},function(u){return To(e,n,u)}):Mh(e,n,a)}function Mh(e,n,a){n.status="fulfilled",n.value=a,Rh(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,zh(e,a)))}function To(e,n,a){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=a,Rh(n),n=n.next;while(n!==u)}e.action=null}function Rh(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Lh(e,n){return n}function Bh(e,n){if(Ue){var a=nt.formState;if(a!==null){e:{var u=Ne;if(Ue){if(rt){t:{for(var c=rt,d=bn;c.nodeType!==8;){if(!d){c=null;break t}if(c=kn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){rt=kn(c.nextSibling),u=c.data==="F!";break e}}yl(u)}u=!1}u&&(n=a[0])}}return a=Ht(),a.memoizedState=a.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lh,lastRenderedState:n},a.queue=u,a=nm.bind(null,Ne,u),u.dispatch=a,u=jo(!1),d=Lo.bind(null,Ne,!1,u.queue),u=Ht(),c={state:n,dispatch:null,action:e,pending:null},u.queue=c,a=c1.bind(null,Ne,c,d,a),c.dispatch=a,u.memoizedState=e,[n,a,!1]}function Uh(e){var n=mt();return Hh(n,$e,e)}function Hh(e,n,a){if(n=Ao(e,n,Lh)[0],e=iu(Kn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Hi(n)}catch(x){throw x===La?Jr:x}else u=n;n=mt();var c=n.queue,d=c.dispatch;return a!==n.memoizedState&&(Ne.flags|=2048,Va(9,{destroy:void 0},f1.bind(null,c,a),null)),[u,d,e]}function f1(e,n){e.action=n}function qh(e){var n=mt(),a=$e;if(a!==null)return Hh(n,a,e);mt(),n=n.memoizedState,a=mt();var u=a.queue.dispatch;return a.memoizedState=e,[n,u,!1]}function Va(e,n,a,u){return e={tag:e,create:a,deps:u,inst:n,next:null},n=Ne.updateQueue,n===null&&(n=lu(),Ne.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(u=a.next,a.next=e,e.next=u,n.lastEffect=e),e}function Vh(){return mt().memoizedState}function ru(e,n,a,u){var c=Ht();Ne.flags|=e,c.memoizedState=Va(1|n,{destroy:void 0},a,u===void 0?null:u)}function uu(e,n,a,u){var c=mt();u=u===void 0?null:u;var d=c.memoizedState.inst;$e!==null&&u!==null&&ko(u,$e.memoizedState.deps)?c.memoizedState=Va(n,d,a,u):(Ne.flags|=e,c.memoizedState=Va(1|n,d,a,u))}function Yh(e,n){ru(8390656,8,e,n)}function Do(e,n){uu(2048,8,e,n)}function d1(e){Ne.flags|=4;var n=Ne.updateQueue;if(n===null)n=lu(),Ne.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function Ih(e){var n=mt().memoizedState;return d1({ref:n,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Zh(e,n){return uu(4,2,e,n)}function Fh(e,n){return uu(4,4,e,n)}function Qh(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Gh(e,n,a){a=a!=null?a.concat([e]):null,uu(4,4,Qh.bind(null,n,e),a)}function zo(){}function Xh(e,n){var a=mt();n=n===void 0?null:n;var u=a.memoizedState;return n!==null&&ko(n,u[1])?u[0]:(a.memoizedState=[e,n],e)}function Jh(e,n){var a=mt();n=n===void 0?null:n;var u=a.memoizedState;if(n!==null&&ko(n,u[1]))return u[0];if(u=e(),na){Zt(!0);try{e()}finally{Zt(!1)}}return a.memoizedState=[u,n],u}function Oo(e,n,a){return a===void 0||(Jn&1073741824)!==0&&(Le&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=Km(),Ne.lanes|=e,Cl|=e,a)}function Kh(e,n,a,u){return tn(a,n)?a:Ua.current!==null?(e=Oo(e,a,u),tn(e,n)||(yt=!0),e):(Jn&42)===0||(Jn&1073741824)!==0&&(Le&261930)===0?(yt=!0,e.memoizedState=a):(e=Km(),Ne.lanes|=e,Cl|=e,n)}function $h(e,n,a,u,c){var d=G.p;G.p=d!==0&&8>d?d:8;var x=j.T,S={};j.T=S,Lo(e,!1,n,a);try{var C=c(),L=j.S;if(L!==null&&L(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var Q=u1(C,u);qi(e,n,Q,sn(e))}else qi(e,n,u,sn(e))}catch($){qi(e,n,{then:function(){},status:"rejected",reason:$},sn())}finally{G.p=d,x!==null&&S.types!==null&&(x.types=S.types),j.T=x}}function h1(){}function Mo(e,n,a,u){if(e.tag!==5)throw Error(r(476));var c=Ph(e).queue;$h(e,c,n,ue,a===null?h1:function(){return Wh(e),a(u)})}function Ph(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:ue},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Wh(e){var n=Ph(e);n.next===null&&(n=e.alternate.memoizedState),qi(e,n.next.queue,{},sn())}function Ro(){return Nt(lr)}function em(){return mt().memoizedState}function tm(){return mt().memoizedState}function m1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=sn();e=vl(a);var u=kl(n,e,a);u!==null&&($t(u,n,a),Ri(u,n,a)),n={cache:oo()},e.payload=n;return}n=n.return}}function p1(e,n,a){var u=sn();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},su(e)?lm(n,a):(a=Ps(e,n,a,u),a!==null&&($t(a,e,u),am(a,n,u)))}function nm(e,n,a){var u=sn();qi(e,n,a,u)}function qi(e,n,a,u){var c={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(su(e))lm(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var x=n.lastRenderedState,S=d(x,a);if(c.hasEagerState=!0,c.eagerState=S,tn(S,x))return Yr(e,n,c,0),nt===null&&Vr(),!1}catch{}finally{}if(a=Ps(e,n,c,u),a!==null)return $t(a,e,u),am(a,n,u),!0}return!1}function Lo(e,n,a,u){if(u={lane:2,revertLane:mc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},su(e)){if(n)throw Error(r(479))}else n=Ps(e,a,u,2),n!==null&&$t(n,e,2)}function su(e){var n=e.alternate;return e===Ne||n!==null&&n===Ne}function lm(e,n){Ha=tu=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function am(e,n,a){if((a&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,od(e,a)}}var Vi={readContext:Nt,use:au,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};Vi.useEffectEvent=ft;var im={readContext:Nt,use:au,useCallback:function(e,n){return Ht().memoizedState=[e,n===void 0?null:n],e},useContext:Nt,useEffect:Yh,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ru(4194308,4,Qh.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ru(4194308,4,e,n)},useInsertionEffect:function(e,n){ru(4,2,e,n)},useMemo:function(e,n){var a=Ht();n=n===void 0?null:n;var u=e();if(na){Zt(!0);try{e()}finally{Zt(!1)}}return a.memoizedState=[u,n],u},useReducer:function(e,n,a){var u=Ht();if(a!==void 0){var c=a(n);if(na){Zt(!0);try{a(n)}finally{Zt(!1)}}}else c=n;return u.memoizedState=u.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},u.queue=e,e=e.dispatch=p1.bind(null,Ne,e),[u.memoizedState,e]},useRef:function(e){var n=Ht();return e={current:e},n.memoizedState=e},useState:function(e){e=jo(e);var n=e.queue,a=nm.bind(null,Ne,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:zo,useDeferredValue:function(e,n){var a=Ht();return Oo(a,e,n)},useTransition:function(){var e=jo(!1);return e=$h.bind(null,Ne,e.queue,!0,!1),Ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var u=Ne,c=Ht();if(Ue){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),nt===null)throw Error(r(349));(Le&127)!==0||Ch(u,n,a)}c.memoizedState=a;var d={value:a,getSnapshot:n};return c.queue=d,Yh(Nh.bind(null,u,d,e),[e]),u.flags|=2048,Va(9,{destroy:void 0},Ah.bind(null,u,d,a,n),null),a},useId:function(){var e=Ht(),n=nt.identifierPrefix;if(Ue){var a=On,u=zn;a=(u&~(1<<32-tt(u)-1)).toString(32)+a,n="_"+n+"R_"+a,a=nu++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=s1++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Ro,useFormState:Bh,useActionState:Bh,useOptimistic:function(e){var n=Ht();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Lo.bind(null,Ne,!0,a),a.dispatch=n,[e,n]},useMemoCache:Co,useCacheRefresh:function(){return Ht().memoizedState=m1.bind(null,Ne)},useEffectEvent:function(e){var n=Ht(),a={impl:e};return n.memoizedState=a,function(){if((Fe&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Bo={readContext:Nt,use:au,useCallback:Xh,useContext:Nt,useEffect:Do,useImperativeHandle:Gh,useInsertionEffect:Zh,useLayoutEffect:Fh,useMemo:Jh,useReducer:iu,useRef:Vh,useState:function(){return iu(Kn)},useDebugValue:zo,useDeferredValue:function(e,n){var a=mt();return Kh(a,$e.memoizedState,e,n)},useTransition:function(){var e=iu(Kn)[0],n=mt().memoizedState;return[typeof e=="boolean"?e:Hi(e),n]},useSyncExternalStore:Eh,useId:em,useHostTransitionStatus:Ro,useFormState:Uh,useActionState:Uh,useOptimistic:function(e,n){var a=mt();return Dh(a,$e,e,n)},useMemoCache:Co,useCacheRefresh:tm};Bo.useEffectEvent=Ih;var rm={readContext:Nt,use:au,useCallback:Xh,useContext:Nt,useEffect:Do,useImperativeHandle:Gh,useInsertionEffect:Zh,useLayoutEffect:Fh,useMemo:Jh,useReducer:No,useRef:Vh,useState:function(){return No(Kn)},useDebugValue:zo,useDeferredValue:function(e,n){var a=mt();return $e===null?Oo(a,e,n):Kh(a,$e.memoizedState,e,n)},useTransition:function(){var e=No(Kn)[0],n=mt().memoizedState;return[typeof e=="boolean"?e:Hi(e),n]},useSyncExternalStore:Eh,useId:em,useHostTransitionStatus:Ro,useFormState:qh,useActionState:qh,useOptimistic:function(e,n){var a=mt();return $e!==null?Dh(a,$e,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Co,useCacheRefresh:tm};rm.useEffectEvent=Ih;function Uo(e,n,a,u){n=e.memoizedState,a=a(u,n),a=a==null?n:y({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ho={enqueueSetState:function(e,n,a){e=e._reactInternals;var u=sn(),c=vl(u);c.payload=n,a!=null&&(c.callback=a),n=kl(e,c,u),n!==null&&($t(n,e,u),Ri(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var u=sn(),c=vl(u);c.tag=1,c.payload=n,a!=null&&(c.callback=a),n=kl(e,c,u),n!==null&&($t(n,e,u),Ri(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=sn(),u=vl(a);u.tag=2,n!=null&&(u.callback=n),n=kl(e,u,a),n!==null&&($t(n,e,a),Ri(n,e,a))}};function um(e,n,a,u,c,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,d,x):n.prototype&&n.prototype.isPureReactComponent?!Ai(a,u)||!Ai(c,d):!0}function sm(e,n,a,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,u),n.state!==e&&Ho.enqueueReplaceState(n,n.state,null)}function la(e,n){var a=n;if("ref"in n){a={};for(var u in n)u!=="ref"&&(a[u]=n[u])}if(e=e.defaultProps){a===n&&(a=y({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function om(e){qr(e)}function cm(e){console.error(e)}function fm(e){qr(e)}function ou(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function dm(e,n,a){try{var u=e.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function qo(e,n,a){return a=vl(a),a.tag=3,a.payload={element:null},a.callback=function(){ou(e,n)},a}function hm(e){return e=vl(e),e.tag=3,e}function mm(e,n,a,u){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=u.value;e.payload=function(){return c(d)},e.callback=function(){dm(n,a,u)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){dm(n,a,u),typeof c!="function"&&(Al===null?Al=new Set([this]):Al.add(this));var S=u.stack;this.componentDidCatch(u.value,{componentStack:S!==null?S:""})})}function g1(e,n,a,u,c){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=a.alternate,n!==null&&Oa(n,a,c,!0),a=ln.current,a!==null){switch(a.tag){case 31:case 13:return vn===null?ku():a.alternate===null&&dt===0&&(dt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,u===Kr?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([u]):n.add(u),fc(e,u,c)),!1;case 22:return a.flags|=65536,u===Kr?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([u]):a.add(u)),fc(e,u,c)),!1}throw Error(r(435,a.tag))}return fc(e,u,c),ku(),!1}if(Ue)return n=ln.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,u!==ao&&(e=Error(r(422),{cause:u}),Ti(gn(e,a)))):(u!==ao&&(n=Error(r(423),{cause:u}),Ti(gn(n,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,u=gn(u,a),c=qo(e.stateNode,u,c),go(e,c),dt!==4&&(dt=2)),!1;var d=Error(r(520),{cause:u});if(d=gn(d,a),Ji===null?Ji=[d]:Ji.push(d),dt!==4&&(dt=2),n===null)return!0;u=gn(u,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=qo(a.stateNode,u,e),go(a,e),!1;case 1:if(n=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Al===null||!Al.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=hm(c),mm(c,e,a,u),go(a,c),!1}a=a.return}while(a!==null);return!1}var Vo=Error(r(461)),yt=!1;function jt(e,n,a,u){n.child=e===null?xh(n,null,a,u):ta(n,e.child,a,u)}function pm(e,n,a,u,c){a=a.render;var d=n.ref;if("ref"in u){var x={};for(var S in u)S!=="ref"&&(x[S]=u[S])}else x=u;return $l(n),u=So(e,n,a,x,d,c),S=wo(),e!==null&&!yt?(_o(e,n,c),$n(e,n,c)):(Ue&&S&&no(n),n.flags|=1,jt(e,n,u,c),n.child)}function gm(e,n,a,u,c){if(e===null){var d=a.type;return typeof d=="function"&&!Ws(d)&&d.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=d,ym(e,n,d,u,c)):(e=Zr(a.type,null,u,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!Jo(e,c)){var x=d.memoizedProps;if(a=a.compare,a=a!==null?a:Ai,a(x,u)&&e.ref===n.ref)return $n(e,n,c)}return n.flags|=1,e=Fn(d,u),e.ref=n.ref,e.return=n,n.child=e}function ym(e,n,a,u,c){if(e!==null){var d=e.memoizedProps;if(Ai(d,u)&&e.ref===n.ref)if(yt=!1,n.pendingProps=u=d,Jo(e,c))(e.flags&131072)!==0&&(yt=!0);else return n.lanes=e.lanes,$n(e,n,c)}return Yo(e,n,a,u,c)}function xm(e,n,a,u){var c=u.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(u=n.child=e.child,c=0;u!==null;)c=c|u.lanes|u.childLanes,u=u.sibling;u=c&~d}else u=0,n.child=null;return bm(e,n,d,a,u)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xr(n,d!==null?d.cachePool:null),d!==null?kh(n,d):xo(),Sh(n);else return u=n.lanes=536870912,bm(e,n,d!==null?d.baseLanes|a:a,a,u)}else d!==null?(Xr(n,d.cachePool),kh(n,d),wl(),n.memoizedState=null):(e!==null&&Xr(n,null),xo(),wl());return jt(e,n,c,a),n.child}function Yi(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function bm(e,n,a,u,c){var d=fo();return d=d===null?null:{parent:pt._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},e!==null&&Xr(n,null),xo(),Sh(n),e!==null&&Oa(e,n,u,!0),n.childLanes=c,null}function cu(e,n){return n=du({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function vm(e,n,a){return ta(n,e.child,null,a),e=cu(n,n.pendingProps),e.flags|=2,an(n),n.memoizedState=null,e}function y1(e,n,a){var u=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ue){if(u.mode==="hidden")return e=cu(n,u),n.lanes=536870912,Yi(null,e);if(vo(n),(e=rt)?(e=zp(e,bn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:pl!==null?{id:zn,overflow:On}:null,retryLane:536870912,hydrationErrors:null},a=lh(e),a.return=n,n.child=a,At=n,rt=null)):e=null,e===null)throw yl(n);return n.lanes=536870912,null}return cu(n,u)}var d=e.memoizedState;if(d!==null){var x=d.dehydrated;if(vo(n),c)if(n.flags&256)n.flags&=-257,n=vm(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(yt||Oa(e,n,a,!1),c=(a&e.childLanes)!==0,yt||c){if(u=nt,u!==null&&(x=cd(u,a),x!==0&&x!==d.retryLane))throw d.retryLane=x,Gl(e,x),$t(u,e,x),Vo;ku(),n=vm(e,n,a)}else e=d.treeContext,rt=kn(x.nextSibling),At=n,Ue=!0,gl=null,bn=!1,e!==null&&rh(n,e),n=cu(n,u),n.flags|=4096;return n}return e=Fn(e.child,{mode:u.mode,children:u.children}),e.ref=n.ref,n.child=e,e.return=n,e}function fu(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function Yo(e,n,a,u,c){return $l(n),a=So(e,n,a,u,void 0,c),u=wo(),e!==null&&!yt?(_o(e,n,c),$n(e,n,c)):(Ue&&u&&no(n),n.flags|=1,jt(e,n,a,c),n.child)}function km(e,n,a,u,c,d){return $l(n),n.updateQueue=null,a=_h(n,u,a,c),wh(e),u=wo(),e!==null&&!yt?(_o(e,n,d),$n(e,n,d)):(Ue&&u&&no(n),n.flags|=1,jt(e,n,a,d),n.child)}function Sm(e,n,a,u,c){if($l(n),n.stateNode===null){var d=ja,x=a.contextType;typeof x=="object"&&x!==null&&(d=Nt(x)),d=new a(u,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Ho,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=u,d.state=n.memoizedState,d.refs={},mo(n),x=a.contextType,d.context=typeof x=="object"&&x!==null?Nt(x):ja,d.state=n.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(Uo(n,a,x,u),d.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(x=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),x!==d.state&&Ho.enqueueReplaceState(d,d.state,null),Bi(n,u,d,c),Li(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){d=n.stateNode;var S=n.memoizedProps,C=la(a,S);d.props=C;var L=d.context,Q=a.contextType;x=ja,typeof Q=="object"&&Q!==null&&(x=Nt(Q));var $=a.getDerivedStateFromProps;Q=typeof $=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=n.pendingProps!==S,Q||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||L!==x)&&sm(n,d,u,x),bl=!1;var U=n.memoizedState;d.state=U,Bi(n,u,d,c),Li(),L=n.memoizedState,S||U!==L||bl?(typeof $=="function"&&(Uo(n,a,$,u),L=n.memoizedState),(C=bl||um(n,a,C,u,U,L,x))?(Q||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=L),d.props=u,d.state=L,d.context=x,u=C):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{d=n.stateNode,po(e,n),x=n.memoizedProps,Q=la(a,x),d.props=Q,$=n.pendingProps,U=d.context,L=a.contextType,C=ja,typeof L=="object"&&L!==null&&(C=Nt(L)),S=a.getDerivedStateFromProps,(L=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x!==$||U!==C)&&sm(n,d,u,C),bl=!1,U=n.memoizedState,d.state=U,Bi(n,u,d,c),Li();var V=n.memoizedState;x!==$||U!==V||bl||e!==null&&e.dependencies!==null&&Qr(e.dependencies)?(typeof S=="function"&&(Uo(n,a,S,u),V=n.memoizedState),(Q=bl||um(n,a,Q,u,U,V,C)||e!==null&&e.dependencies!==null&&Qr(e.dependencies))?(L||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(u,V,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(u,V,C)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=V),d.props=u,d.state=V,d.context=C,u=Q):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(n.flags|=1024),u=!1)}return d=u,fu(e,n),u=(n.flags&128)!==0,d||u?(d=n.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&u?(n.child=ta(n,e.child,null,c),n.child=ta(n,null,a,c)):jt(e,n,a,c),n.memoizedState=d.state,e=n.child):e=$n(e,n,c),e}function wm(e,n,a,u){return Jl(),n.flags|=256,jt(e,n,a,u),n.child}var Io={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Zo(e){return{baseLanes:e,cachePool:dh()}}function Fo(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=un),e}function _m(e,n,a){var u=n.pendingProps,c=!1,d=(n.flags&128)!==0,x;if((x=d)||(x=e!==null&&e.memoizedState===null?!1:(ht.current&2)!==0),x&&(c=!0,n.flags&=-129),x=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ue){if(c?Sl(n):wl(),(e=rt)?(e=zp(e,bn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:pl!==null?{id:zn,overflow:On}:null,retryLane:536870912,hydrationErrors:null},a=lh(e),a.return=n,n.child=a,At=n,rt=null)):e=null,e===null)throw yl(n);return Ac(e)?n.lanes=32:n.lanes=536870912,null}var S=u.children;return u=u.fallback,c?(wl(),c=n.mode,S=du({mode:"hidden",children:S},c),u=Xl(u,c,a,null),S.return=n,u.return=n,S.sibling=u,n.child=S,u=n.child,u.memoizedState=Zo(a),u.childLanes=Fo(e,x,a),n.memoizedState=Io,Yi(null,u)):(Sl(n),Qo(n,S))}var C=e.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(d)n.flags&256?(Sl(n),n.flags&=-257,n=Go(e,n,a)):n.memoizedState!==null?(wl(),n.child=e.child,n.flags|=128,n=null):(wl(),S=u.fallback,c=n.mode,u=du({mode:"visible",children:u.children},c),S=Xl(S,c,a,null),S.flags|=2,u.return=n,S.return=n,u.sibling=S,n.child=u,ta(n,e.child,null,a),u=n.child,u.memoizedState=Zo(a),u.childLanes=Fo(e,x,a),n.memoizedState=Io,n=Yi(null,u));else if(Sl(n),Ac(S)){if(x=S.nextSibling&&S.nextSibling.dataset,x)var L=x.dgst;x=L,u=Error(r(419)),u.stack="",u.digest=x,Ti({value:u,source:null,stack:null}),n=Go(e,n,a)}else if(yt||Oa(e,n,a,!1),x=(a&e.childLanes)!==0,yt||x){if(x=nt,x!==null&&(u=cd(x,a),u!==0&&u!==C.retryLane))throw C.retryLane=u,Gl(e,u),$t(x,e,u),Vo;Cc(S)||ku(),n=Go(e,n,a)}else Cc(S)?(n.flags|=192,n.child=e.child,n=null):(e=C.treeContext,rt=kn(S.nextSibling),At=n,Ue=!0,gl=null,bn=!1,e!==null&&rh(n,e),n=Qo(n,u.children),n.flags|=4096);return n}return c?(wl(),S=u.fallback,c=n.mode,C=e.child,L=C.sibling,u=Fn(C,{mode:"hidden",children:u.children}),u.subtreeFlags=C.subtreeFlags&65011712,L!==null?S=Fn(L,S):(S=Xl(S,c,a,null),S.flags|=2),S.return=n,u.return=n,u.sibling=S,n.child=u,Yi(null,u),u=n.child,S=e.child.memoizedState,S===null?S=Zo(a):(c=S.cachePool,c!==null?(C=pt._currentValue,c=c.parent!==C?{parent:C,pool:C}:c):c=dh(),S={baseLanes:S.baseLanes|a,cachePool:c}),u.memoizedState=S,u.childLanes=Fo(e,x,a),n.memoizedState=Io,Yi(e.child,u)):(Sl(n),a=e.child,e=a.sibling,a=Fn(a,{mode:"visible",children:u.children}),a.return=n,a.sibling=null,e!==null&&(x=n.deletions,x===null?(n.deletions=[e],n.flags|=16):x.push(e)),n.child=a,n.memoizedState=null,a)}function Qo(e,n){return n=du({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function du(e,n){return e=nn(22,e,null,n),e.lanes=0,e}function Go(e,n,a){return ta(n,e.child,null,a),e=Qo(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Em(e,n,a){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),uo(e.return,n,a)}function Xo(e,n,a,u,c,d){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:c,treeForkCount:d}:(x.isBackwards=n,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=a,x.tailMode=c,x.treeForkCount=d)}function Cm(e,n,a){var u=n.pendingProps,c=u.revealOrder,d=u.tail;u=u.children;var x=ht.current,S=(x&2)!==0;if(S?(x=x&1|2,n.flags|=128):x&=1,w(ht,x),jt(e,n,u,a),u=Ue?ji:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Em(e,a,n);else if(e.tag===19)Em(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=n.child,c=null;a!==null;)e=a.alternate,e!==null&&eu(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=n.child,n.child=null):(c=a.sibling,a.sibling=null),Xo(n,!1,c,a,d,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&eu(e)===null){n.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Xo(n,!0,a,null,d,u);break;case"together":Xo(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function $n(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Cl|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Oa(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=Fn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Fn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function Jo(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Qr(e)))}function x1(e,n,a){switch(n.tag){case 3:Ve(n,n.stateNode.containerInfo),xl(n,pt,e.memoizedState.cache),Jl();break;case 27:case 5:zt(n);break;case 4:Ve(n,n.stateNode.containerInfo);break;case 10:xl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,vo(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Sl(n),n.flags|=128,null):(a&n.child.childLanes)!==0?_m(e,n,a):(Sl(n),e=$n(e,n,a),e!==null?e.sibling:null);Sl(n);break;case 19:var c=(e.flags&128)!==0;if(u=(a&n.childLanes)!==0,u||(Oa(e,n,a,!1),u=(a&n.childLanes)!==0),c){if(u)return Cm(e,n,a);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),w(ht,ht.current),u)break;return null;case 22:return n.lanes=0,xm(e,n,a,n.pendingProps);case 24:xl(n,pt,e.memoizedState.cache)}return $n(e,n,a)}function Am(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)yt=!0;else{if(!Jo(e,a)&&(n.flags&128)===0)return yt=!1,x1(e,n,a);yt=(e.flags&131072)!==0}else yt=!1,Ue&&(n.flags&1048576)!==0&&ih(n,ji,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(e=Wl(n.elementType),n.type=e,typeof e=="function")Ws(e)?(u=la(e,u),n.tag=1,n=Sm(null,n,e,u,a)):(n.tag=0,n=Yo(null,n,e,u,a));else{if(e!=null){var c=e.$$typeof;if(c===ae){n.tag=11,n=pm(null,n,e,u,a);break e}else if(c===P){n.tag=14,n=gm(null,n,e,u,a);break e}}throw n=re(e)||e,Error(r(306,n,""))}}return n;case 0:return Yo(e,n,n.type,n.pendingProps,a);case 1:return u=n.type,c=la(u,n.pendingProps),Sm(e,n,u,c,a);case 3:e:{if(Ve(n,n.stateNode.containerInfo),e===null)throw Error(r(387));u=n.pendingProps;var d=n.memoizedState;c=d.element,po(e,n),Bi(n,u,null,a);var x=n.memoizedState;if(u=x.cache,xl(n,pt,u),u!==d.cache&&so(n,[pt],a,!0),Li(),u=x.element,d.isDehydrated)if(d={element:u,isDehydrated:!1,cache:x.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=wm(e,n,u,a);break e}else if(u!==c){c=gn(Error(r(424)),n),Ti(c),n=wm(e,n,u,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(rt=kn(e.firstChild),At=n,Ue=!0,gl=null,bn=!0,a=xh(n,null,u,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Jl(),u===c){n=$n(e,n,a);break e}jt(e,n,u,a)}n=n.child}return n;case 26:return fu(e,n),e===null?(a=Up(n.type,null,n.pendingProps,null))?n.memoizedState=a:Ue||(a=n.type,e=n.pendingProps,u=Nu(me.current).createElement(a),u[Ct]=n,u[Ft]=e,Tt(u,a,e),wt(u),n.stateNode=u):n.memoizedState=Up(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return zt(n),e===null&&Ue&&(u=n.stateNode=Rp(n.type,n.pendingProps,me.current),At=n,bn=!0,c=rt,Dl(n.type)?(Nc=c,rt=kn(u.firstChild)):rt=c),jt(e,n,n.pendingProps.children,a),fu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ue&&((c=u=rt)&&(u=X1(u,n.type,n.pendingProps,bn),u!==null?(n.stateNode=u,At=n,rt=kn(u.firstChild),bn=!1,c=!0):c=!1),c||yl(n)),zt(n),c=n.type,d=n.pendingProps,x=e!==null?e.memoizedProps:null,u=d.children,wc(c,d)?u=null:x!==null&&wc(c,x)&&(n.flags|=32),n.memoizedState!==null&&(c=So(e,n,o1,null,null,a),lr._currentValue=c),fu(e,n),jt(e,n,u,a),n.child;case 6:return e===null&&Ue&&((e=a=rt)&&(a=J1(a,n.pendingProps,bn),a!==null?(n.stateNode=a,At=n,rt=null,e=!0):e=!1),e||yl(n)),null;case 13:return _m(e,n,a);case 4:return Ve(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=ta(n,null,u,a):jt(e,n,u,a),n.child;case 11:return pm(e,n,n.type,n.pendingProps,a);case 7:return jt(e,n,n.pendingProps,a),n.child;case 8:return jt(e,n,n.pendingProps.children,a),n.child;case 12:return jt(e,n,n.pendingProps.children,a),n.child;case 10:return u=n.pendingProps,xl(n,n.type,u.value),jt(e,n,u.children,a),n.child;case 9:return c=n.type._context,u=n.pendingProps.children,$l(n),c=Nt(c),u=u(c),n.flags|=1,jt(e,n,u,a),n.child;case 14:return gm(e,n,n.type,n.pendingProps,a);case 15:return ym(e,n,n.type,n.pendingProps,a);case 19:return Cm(e,n,a);case 31:return y1(e,n,a);case 22:return xm(e,n,a,n.pendingProps);case 24:return $l(n),u=Nt(pt),e===null?(c=fo(),c===null&&(c=nt,d=oo(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),n.memoizedState={parent:u,cache:c},mo(n),xl(n,pt,c)):((e.lanes&a)!==0&&(po(e,n),Bi(n,null,null,a),Li()),c=e.memoizedState,d=n.memoizedState,c.parent!==u?(c={parent:u,cache:u},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),xl(n,pt,u)):(u=d.cache,xl(n,pt,u),u!==c.cache&&so(n,[pt],a,!0))),jt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Pn(e){e.flags|=4}function Ko(e,n,a,u,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(ep())e.flags|=8192;else throw ea=Kr,ho}else e.flags&=-16777217}function Nm(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ip(n))if(ep())e.flags|=8192;else throw ea=Kr,ho}function hu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?ud():536870912,e.lanes|=n,Fa|=n)}function Ii(e,n){if(!Ue)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function ut(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,u=0;if(n)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,u|=c.subtreeFlags&65011712,u|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,u|=c.subtreeFlags,u|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=u,e.childLanes=a,n}function b1(e,n,a){var u=n.pendingProps;switch(lo(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(n),null;case 1:return ut(n),null;case 3:return a=n.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),Xn(pt),Qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(za(n)?Pn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,io())),ut(n),null;case 26:var c=n.type,d=n.memoizedState;return e===null?(Pn(n),d!==null?(ut(n),Nm(n,d)):(ut(n),Ko(n,c,null,u,a))):d?d!==e.memoizedState?(Pn(n),ut(n),Nm(n,d)):(ut(n),n.flags&=-16777217):(e=e.memoizedProps,e!==u&&Pn(n),ut(n),Ko(n,c,e,u,a)),null;case 27:if(En(n),a=me.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&Pn(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return ut(n),null}e=ee.current,za(n)?uh(n):(e=Rp(c,u,a),n.stateNode=e,Pn(n))}return ut(n),null;case 5:if(En(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&Pn(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return ut(n),null}if(d=ee.current,za(n))uh(n);else{var x=Nu(me.current);switch(d){case 1:d=x.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=x.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=x.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=x.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=x.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof u.is=="string"?x.createElement("select",{is:u.is}):x.createElement("select"),u.multiple?d.multiple=!0:u.size&&(d.size=u.size);break;default:d=typeof u.is=="string"?x.createElement(c,{is:u.is}):x.createElement(c)}}d[Ct]=n,d[Ft]=u;e:for(x=n.child;x!==null;){if(x.tag===5||x.tag===6)d.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===n)break e;for(;x.sibling===null;){if(x.return===null||x.return===n)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}n.stateNode=d;e:switch(Tt(d,c,u),c){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Pn(n)}}return ut(n),Ko(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&Pn(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(r(166));if(e=me.current,za(n)){if(e=n.stateNode,a=n.memoizedProps,u=null,c=At,c!==null)switch(c.tag){case 27:case 5:u=c.memoizedProps}e[Ct]=n,e=!!(e.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||_p(e.nodeValue,a)),e||yl(n,!0)}else e=Nu(e).createTextNode(u),e[Ct]=n,n.stateNode=e}return ut(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(u=za(n),a!==null){if(e===null){if(!u)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ct]=n}else Jl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ut(n),e=!1}else a=io(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(an(n),n):(an(n),null);if((n.flags&128)!==0)throw Error(r(558))}return ut(n),null;case 13:if(u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=za(n),u!==null&&u.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[Ct]=n}else Jl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ut(n),c=!1}else c=io(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(an(n),n):(an(n),null)}return an(n),(n.flags&128)!==0?(n.lanes=a,n):(a=u!==null,e=e!==null&&e.memoizedState!==null,a&&(u=n.child,c=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(c=u.alternate.memoizedState.cachePool.pool),d=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(d=u.memoizedState.cachePool.pool),d!==c&&(u.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),hu(n,n.updateQueue),ut(n),null);case 4:return Qe(),e===null&&xc(n.stateNode.containerInfo),ut(n),null;case 10:return Xn(n.type),ut(n),null;case 19:if(F(ht),u=n.memoizedState,u===null)return ut(n),null;if(c=(n.flags&128)!==0,d=u.rendering,d===null)if(c)Ii(u,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=eu(e),d!==null){for(n.flags|=128,Ii(u,!1),e=d.updateQueue,n.updateQueue=e,hu(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)nh(a,e),a=a.sibling;return w(ht,ht.current&1|2),Ue&&Qn(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&Bt()>xu&&(n.flags|=128,c=!0,Ii(u,!1),n.lanes=4194304)}else{if(!c)if(e=eu(d),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,hu(n,e),Ii(u,!0),u.tail===null&&u.tailMode==="hidden"&&!d.alternate&&!Ue)return ut(n),null}else 2*Bt()-u.renderingStartTime>xu&&a!==536870912&&(n.flags|=128,c=!0,Ii(u,!1),n.lanes=4194304);u.isBackwards?(d.sibling=n.child,n.child=d):(e=u.last,e!==null?e.sibling=d:n.child=d,u.last=d)}return u.tail!==null?(e=u.tail,u.rendering=e,u.tail=e.sibling,u.renderingStartTime=Bt(),e.sibling=null,a=ht.current,w(ht,c?a&1|2:a&1),Ue&&Qn(n,u.treeForkCount),e):(ut(n),null);case 22:case 23:return an(n),bo(),u=n.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(a&536870912)!==0&&(n.flags&128)===0&&(ut(n),n.subtreeFlags&6&&(n.flags|=8192)):ut(n),a=n.updateQueue,a!==null&&hu(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048),e!==null&&F(Pl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Xn(pt),ut(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function v1(e,n){switch(lo(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Xn(pt),Qe(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return En(n),null;case 31:if(n.memoizedState!==null){if(an(n),n.alternate===null)throw Error(r(340));Jl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(an(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Jl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return F(ht),null;case 4:return Qe(),null;case 10:return Xn(n.type),null;case 22:case 23:return an(n),bo(),e!==null&&F(Pl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Xn(pt),null;case 25:return null;default:return null}}function jm(e,n){switch(lo(n),n.tag){case 3:Xn(pt),Qe();break;case 26:case 27:case 5:En(n);break;case 4:Qe();break;case 31:n.memoizedState!==null&&an(n);break;case 13:an(n);break;case 19:F(ht);break;case 10:Xn(n.type);break;case 22:case 23:an(n),bo(),e!==null&&F(Pl);break;case 24:Xn(pt)}}function Zi(e,n){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var c=u.next;a=c;do{if((a.tag&e)===e){u=void 0;var d=a.create,x=a.inst;u=d(),x.destroy=u}a=a.next}while(a!==c)}}catch(S){Je(n,n.return,S)}}function _l(e,n,a){try{var u=n.updateQueue,c=u!==null?u.lastEffect:null;if(c!==null){var d=c.next;u=d;do{if((u.tag&e)===e){var x=u.inst,S=x.destroy;if(S!==void 0){x.destroy=void 0,c=n;var C=a,L=S;try{L()}catch(Q){Je(c,C,Q)}}}u=u.next}while(u!==d)}}catch(Q){Je(n,n.return,Q)}}function Tm(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{vh(n,a)}catch(u){Je(e,e.return,u)}}}function Dm(e,n,a){a.props=la(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(u){Je(e,n,u)}}function Fi(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof a=="function"?e.refCleanup=a(u):a.current=u}}catch(c){Je(e,n,c)}}function Mn(e,n){var a=e.ref,u=e.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(c){Je(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Je(e,n,c)}else a.current=null}function zm(e){var n=e.type,a=e.memoizedProps,u=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(c){Je(e,e.return,c)}}function $o(e,n,a){try{var u=e.stateNode;Y1(u,e.type,a,n),u[Ft]=n}catch(c){Je(e,e.return,c)}}function Om(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dl(e.type)||e.tag===4}function Po(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Om(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&&Dl(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 Wo(e,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=In));else if(u!==4&&(u===27&&Dl(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Wo(e,n,a),e=e.sibling;e!==null;)Wo(e,n,a),e=e.sibling}function mu(e,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(u!==4&&(u===27&&Dl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mu(e,n,a),e=e.sibling;e!==null;)mu(e,n,a),e=e.sibling}function Mm(e){var n=e.stateNode,a=e.memoizedProps;try{for(var u=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);Tt(n,u,a),n[Ct]=e,n[Ft]=a}catch(d){Je(e,e.return,d)}}var Wn=!1,xt=!1,ec=!1,Rm=typeof WeakSet=="function"?WeakSet:Set,_t=null;function k1(e,n){if(e=e.containerInfo,kc=Ru,e=Gd(e),Qs(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var c=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var x=0,S=-1,C=-1,L=0,Q=0,$=e,U=null;t:for(;;){for(var V;$!==a||c!==0&&$.nodeType!==3||(S=x+c),$!==d||u!==0&&$.nodeType!==3||(C=x+u),$.nodeType===3&&(x+=$.nodeValue.length),(V=$.firstChild)!==null;)U=$,$=V;for(;;){if($===e)break t;if(U===a&&++L===c&&(S=x),U===d&&++Q===u&&(C=x),(V=$.nextSibling)!==null)break;$=U,U=$.parentNode}$=V}a=S===-1||C===-1?null:{start:S,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(Sc={focusedElem:e,selectionRange:a},Ru=!1,_t=n;_t!==null;)if(n=_t,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,_t=e;else for(;_t!==null;){switch(n=_t,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=n,c=d.memoizedProps,d=d.memoizedState,u=a.stateNode;try{var fe=la(a.type,c);e=u.getSnapshotBeforeUpdate(fe,d),u.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Je(a,a.return,Se)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Ec(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ec(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,_t=e;break}_t=n.return}}function Lm(e,n,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:tl(e,a),u&4&&Zi(5,a);break;case 1:if(tl(e,a),u&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(x){Je(a,a.return,x)}else{var c=la(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Je(a,a.return,x)}}u&64&&Tm(a),u&512&&Fi(a,a.return);break;case 3:if(tl(e,a),u&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{vh(e,n)}catch(x){Je(a,a.return,x)}}break;case 27:n===null&&u&4&&Mm(a);case 26:case 5:tl(e,a),n===null&&u&4&&zm(a),u&512&&Fi(a,a.return);break;case 12:tl(e,a);break;case 31:tl(e,a),u&4&&Hm(e,a);break;case 13:tl(e,a),u&4&&qm(e,a),u&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=T1.bind(null,a),K1(e,a))));break;case 22:if(u=a.memoizedState!==null||Wn,!u){n=n!==null&&n.memoizedState!==null||xt,c=Wn;var d=xt;Wn=u,(xt=n)&&!d?nl(e,a,(a.subtreeFlags&8772)!==0):tl(e,a),Wn=c,xt=d}break;case 30:break;default:tl(e,a)}}function Bm(e){var n=e.alternate;n!==null&&(e.alternate=null,Bm(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&js(n)),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 ct=null,Gt=!1;function el(e,n,a){for(a=a.child;a!==null;)Um(e,n,a),a=a.sibling}function Um(e,n,a){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Ut,a)}catch{}switch(a.tag){case 26:xt||Mn(a,n),el(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:xt||Mn(a,n);var u=ct,c=Gt;Dl(a.type)&&(ct=a.stateNode,Gt=!1),el(e,n,a),er(a.stateNode),ct=u,Gt=c;break;case 5:xt||Mn(a,n);case 6:if(u=ct,c=Gt,ct=null,el(e,n,a),ct=u,Gt=c,ct!==null)if(Gt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(a.stateNode)}catch(d){Je(a,n,d)}else try{ct.removeChild(a.stateNode)}catch(d){Je(a,n,d)}break;case 18:ct!==null&&(Gt?(e=ct,Tp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Wa(e)):Tp(ct,a.stateNode));break;case 4:u=ct,c=Gt,ct=a.stateNode.containerInfo,Gt=!0,el(e,n,a),ct=u,Gt=c;break;case 0:case 11:case 14:case 15:_l(2,a,n),xt||_l(4,a,n),el(e,n,a);break;case 1:xt||(Mn(a,n),u=a.stateNode,typeof u.componentWillUnmount=="function"&&Dm(a,n,u)),el(e,n,a);break;case 21:el(e,n,a);break;case 22:xt=(u=xt)||a.memoizedState!==null,el(e,n,a),xt=u;break;default:el(e,n,a)}}function Hm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wa(e)}catch(a){Je(n,n.return,a)}}}function qm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wa(e)}catch(a){Je(n,n.return,a)}}function S1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Rm),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Rm),n;default:throw Error(r(435,e.tag))}}function pu(e,n){var a=S1(e);n.forEach(function(u){if(!a.has(u)){a.add(u);var c=D1.bind(null,e,u);u.then(c,c)}})}function Xt(e,n){var a=n.deletions;if(a!==null)for(var u=0;u<a.length;u++){var c=a[u],d=e,x=n,S=x;e:for(;S!==null;){switch(S.tag){case 27:if(Dl(S.type)){ct=S.stateNode,Gt=!1;break e}break;case 5:ct=S.stateNode,Gt=!1;break e;case 3:case 4:ct=S.stateNode.containerInfo,Gt=!0;break e}S=S.return}if(ct===null)throw Error(r(160));Um(d,x,c),ct=null,Gt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Vm(n,e),n=n.sibling}var Nn=null;function Vm(e,n){var a=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Xt(n,e),Jt(e),u&4&&(_l(3,e,e.return),Zi(3,e),_l(5,e,e.return));break;case 1:Xt(n,e),Jt(e),u&512&&(xt||a===null||Mn(a,a.return)),u&64&&Wn&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var c=Nn;if(Xt(n,e),Jt(e),u&512&&(xt||a===null||Mn(a,a.return)),u&4){var d=a!==null?a.memoizedState:null;if(u=e.memoizedState,a===null)if(u===null)if(e.stateNode===null){e:{u=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(u){case"title":d=c.getElementsByTagName("title")[0],(!d||d[xi]||d[Ct]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(u),c.head.insertBefore(d,c.querySelector("head > title"))),Tt(d,u,a),d[Ct]=e,wt(d),u=d;break e;case"link":var x=Vp("link","href",c).get(u+(a.href||""));if(x){for(var S=0;S<x.length;S++)if(d=x[S],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(S,1);break t}}d=c.createElement(u),Tt(d,u,a),c.head.appendChild(d);break;case"meta":if(x=Vp("meta","content",c).get(u+(a.content||""))){for(S=0;S<x.length;S++)if(d=x[S],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(S,1);break t}}d=c.createElement(u),Tt(d,u,a),c.head.appendChild(d);break;default:throw Error(r(468,u))}d[Ct]=e,wt(d),u=d}e.stateNode=u}else Yp(c,e.type,e.stateNode);else e.stateNode=qp(c,u,e.memoizedProps);else d!==u?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,u===null?Yp(c,e.type,e.stateNode):qp(c,u,e.memoizedProps)):u===null&&e.stateNode!==null&&$o(e,e.memoizedProps,a.memoizedProps)}break;case 27:Xt(n,e),Jt(e),u&512&&(xt||a===null||Mn(a,a.return)),a!==null&&u&4&&$o(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Xt(n,e),Jt(e),u&512&&(xt||a===null||Mn(a,a.return)),e.flags&32){c=e.stateNode;try{Sa(c,"")}catch(fe){Je(e,e.return,fe)}}u&4&&e.stateNode!=null&&(c=e.memoizedProps,$o(e,c,a!==null?a.memoizedProps:c)),u&1024&&(ec=!0);break;case 6:if(Xt(n,e),Jt(e),u&4){if(e.stateNode===null)throw Error(r(162));u=e.memoizedProps,a=e.stateNode;try{a.nodeValue=u}catch(fe){Je(e,e.return,fe)}}break;case 3:if(Du=null,c=Nn,Nn=ju(n.containerInfo),Xt(n,e),Nn=c,Jt(e),u&4&&a!==null&&a.memoizedState.isDehydrated)try{Wa(n.containerInfo)}catch(fe){Je(e,e.return,fe)}ec&&(ec=!1,Ym(e));break;case 4:u=Nn,Nn=ju(e.stateNode.containerInfo),Xt(n,e),Jt(e),Nn=u;break;case 12:Xt(n,e),Jt(e);break;case 31:Xt(n,e),Jt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,pu(e,u)));break;case 13:Xt(n,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(yu=Bt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,pu(e,u)));break;case 22:c=e.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,L=Wn,Q=xt;if(Wn=L||c,xt=Q||C,Xt(n,e),xt=Q,Wn=L,Jt(e),u&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(a===null||C||Wn||xt||aa(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){C=a=n;try{if(d=C.stateNode,c)x=d.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{S=C.stateNode;var $=C.memoizedProps.style,U=$!=null&&$.hasOwnProperty("display")?$.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(fe){Je(C,C.return,fe)}}}else if(n.tag===6){if(a===null){C=n;try{C.stateNode.nodeValue=c?"":C.memoizedProps}catch(fe){Je(C,C.return,fe)}}}else if(n.tag===18){if(a===null){C=n;try{var V=C.stateNode;c?Dp(V,!0):Dp(C.stateNode,!1)}catch(fe){Je(C,C.return,fe)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=e.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,pu(e,a))));break;case 19:Xt(n,e),Jt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,pu(e,u)));break;case 30:break;case 21:break;default:Xt(n,e),Jt(e)}}function Jt(e){var n=e.flags;if(n&2){try{for(var a,u=e.return;u!==null;){if(Om(u)){a=u;break}u=u.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var c=a.stateNode,d=Po(e);mu(e,d,c);break;case 5:var x=a.stateNode;a.flags&32&&(Sa(x,""),a.flags&=-33);var S=Po(e);mu(e,S,x);break;case 3:case 4:var C=a.stateNode.containerInfo,L=Po(e);Wo(e,L,C);break;default:throw Error(r(161))}}catch(Q){Je(e,e.return,Q)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Ym(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Ym(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function tl(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Lm(e,n.alternate,n),n=n.sibling}function aa(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:_l(4,n,n.return),aa(n);break;case 1:Mn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&Dm(n,n.return,a),aa(n);break;case 27:er(n.stateNode);case 26:case 5:Mn(n,n.return),aa(n);break;case 22:n.memoizedState===null&&aa(n);break;case 30:aa(n);break;default:aa(n)}e=e.sibling}}function nl(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,c=e,d=n,x=d.flags;switch(d.tag){case 0:case 11:case 15:nl(c,d,a),Zi(4,d);break;case 1:if(nl(c,d,a),u=d,c=u.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(L){Je(u,u.return,L)}if(u=d,c=u.updateQueue,c!==null){var S=u.stateNode;try{var C=c.shared.hiddenCallbacks;if(C!==null)for(c.shared.hiddenCallbacks=null,c=0;c<C.length;c++)bh(C[c],S)}catch(L){Je(u,u.return,L)}}a&&x&64&&Tm(d),Fi(d,d.return);break;case 27:Mm(d);case 26:case 5:nl(c,d,a),a&&u===null&&x&4&&zm(d),Fi(d,d.return);break;case 12:nl(c,d,a);break;case 31:nl(c,d,a),a&&x&4&&Hm(c,d);break;case 13:nl(c,d,a),a&&x&4&&qm(c,d);break;case 22:d.memoizedState===null&&nl(c,d,a),Fi(d,d.return);break;case 30:break;default:nl(c,d,a)}n=n.sibling}}function tc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Di(a))}function nc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Di(e))}function jn(e,n,a,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Im(e,n,a,u),n=n.sibling}function Im(e,n,a,u){var c=n.flags;switch(n.tag){case 0:case 11:case 15:jn(e,n,a,u),c&2048&&Zi(9,n);break;case 1:jn(e,n,a,u);break;case 3:jn(e,n,a,u),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Di(e)));break;case 12:if(c&2048){jn(e,n,a,u),e=n.stateNode;try{var d=n.memoizedProps,x=d.id,S=d.onPostCommit;typeof S=="function"&&S(x,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Je(n,n.return,C)}}else jn(e,n,a,u);break;case 31:jn(e,n,a,u);break;case 13:jn(e,n,a,u);break;case 23:break;case 22:d=n.stateNode,x=n.alternate,n.memoizedState!==null?d._visibility&2?jn(e,n,a,u):Qi(e,n):d._visibility&2?jn(e,n,a,u):(d._visibility|=2,Ya(e,n,a,u,(n.subtreeFlags&10256)!==0||!1)),c&2048&&tc(x,n);break;case 24:jn(e,n,a,u),c&2048&&nc(n.alternate,n);break;default:jn(e,n,a,u)}}function Ya(e,n,a,u,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,x=n,S=a,C=u,L=x.flags;switch(x.tag){case 0:case 11:case 15:Ya(d,x,S,C,c),Zi(8,x);break;case 23:break;case 22:var Q=x.stateNode;x.memoizedState!==null?Q._visibility&2?Ya(d,x,S,C,c):Qi(d,x):(Q._visibility|=2,Ya(d,x,S,C,c)),c&&L&2048&&tc(x.alternate,x);break;case 24:Ya(d,x,S,C,c),c&&L&2048&&nc(x.alternate,x);break;default:Ya(d,x,S,C,c)}n=n.sibling}}function Qi(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,u=n,c=u.flags;switch(u.tag){case 22:Qi(a,u),c&2048&&tc(u.alternate,u);break;case 24:Qi(a,u),c&2048&&nc(u.alternate,u);break;default:Qi(a,u)}n=n.sibling}}var Gi=8192;function Ia(e,n,a){if(e.subtreeFlags&Gi)for(e=e.child;e!==null;)Zm(e,n,a),e=e.sibling}function Zm(e,n,a){switch(e.tag){case 26:Ia(e,n,a),e.flags&Gi&&e.memoizedState!==null&&sb(a,Nn,e.memoizedState,e.memoizedProps);break;case 5:Ia(e,n,a);break;case 3:case 4:var u=Nn;Nn=ju(e.stateNode.containerInfo),Ia(e,n,a),Nn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=Gi,Gi=16777216,Ia(e,n,a),Gi=u):Ia(e,n,a));break;default:Ia(e,n,a)}}function Fm(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Xi(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];_t=u,Gm(u,e)}Fm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qm(e),e=e.sibling}function Qm(e){switch(e.tag){case 0:case 11:case 15:Xi(e),e.flags&2048&&_l(9,e,e.return);break;case 3:Xi(e);break;case 12:Xi(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,gu(e)):Xi(e);break;default:Xi(e)}}function gu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];_t=u,Gm(u,e)}Fm(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:_l(8,n,n.return),gu(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,gu(n));break;default:gu(n)}e=e.sibling}}function Gm(e,n){for(;_t!==null;){var a=_t;switch(a.tag){case 0:case 11:case 15:_l(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var u=a.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Di(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,_t=u;else e:for(a=e;_t!==null;){u=_t;var c=u.sibling,d=u.return;if(Bm(u),u===a){_t=null;break e}if(c!==null){c.return=d,_t=c;break e}_t=d}}}var w1={getCacheForType:function(e){var n=Nt(pt),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return Nt(pt).controller.signal}},_1=typeof WeakMap=="function"?WeakMap:Map,Fe=0,nt=null,Oe=null,Le=0,Xe=0,rn=null,El=!1,Za=!1,lc=!1,ll=0,dt=0,Cl=0,ia=0,ac=0,un=0,Fa=0,Ji=null,Kt=null,ic=!1,yu=0,Xm=0,xu=1/0,bu=null,Al=null,St=0,Nl=null,Qa=null,al=0,rc=0,uc=null,Jm=null,Ki=0,sc=null;function sn(){return(Fe&2)!==0&&Le!==0?Le&-Le:j.T!==null?mc():fd()}function Km(){if(un===0)if((Le&536870912)===0||Ue){var e=Ar;Ar<<=1,(Ar&3932160)===0&&(Ar=262144),un=e}else un=536870912;return e=ln.current,e!==null&&(e.flags|=32),un}function $t(e,n,a){(e===nt&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(Ga(e,0),jl(e,Le,un,!1)),yi(e,a),((Fe&2)===0||e!==nt)&&(e===nt&&((Fe&2)===0&&(ia|=a),dt===4&&jl(e,Le,un,!1)),Rn(e))}function $m(e,n,a){if((Fe&6)!==0)throw Error(r(327));var u=!a&&(n&127)===0&&(n&e.expiredLanes)===0||gi(e,n),c=u?A1(e,n):cc(e,n,!0),d=u;do{if(c===0){Za&&!u&&jl(e,n,0,!1);break}else{if(a=e.current.alternate,d&&!E1(a)){c=cc(e,n,!1),d=!1;continue}if(c===2){if(d=n,e.errorRecoveryDisabledLanes&d)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){n=x;e:{var S=e;c=Ji;var C=S.current.memoizedState.isDehydrated;if(C&&(Ga(S,x).flags|=256),x=cc(S,x,!1),x!==2){if(lc&&!C){S.errorRecoveryDisabledLanes|=d,ia|=d,c=4;break e}d=Kt,Kt=c,d!==null&&(Kt===null?Kt=d:Kt.push.apply(Kt,d))}c=x}if(d=!1,c!==2)continue}}if(c===1){Ga(e,0),jl(e,n,0,!0);break}e:{switch(u=e,d=c,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:jl(u,n,un,!El);break e;case 2:Kt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(c=yu+300-Bt(),10<c)){if(jl(u,n,un,!El),jr(u,0,!0)!==0)break e;al=n,u.timeoutHandle=Np(Pm.bind(null,u,a,Kt,bu,ic,n,un,ia,Fa,El,d,"Throttled",-0,0),c);break e}Pm(u,a,Kt,bu,ic,n,un,ia,Fa,El,d,null,-0,0)}}break}while(!0);Rn(e)}function Pm(e,n,a,u,c,d,x,S,C,L,Q,$,U,V){if(e.timeoutHandle=-1,$=n.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},Zm(n,d,$);var fe=(d&62914560)===d?yu-Bt():(d&4194048)===d?Xm-Bt():0;if(fe=ob($,fe),fe!==null){al=d,e.cancelPendingCommit=fe(rp.bind(null,e,n,d,a,u,c,x,S,C,Q,$,null,U,V)),jl(e,d,x,!L);return}}rp(e,n,d,a,u,c,x,S,C)}function E1(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var c=a[u],d=c.getSnapshot;c=c.value;try{if(!tn(d(),c))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function jl(e,n,a,u){n&=~ac,n&=~ia,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var c=n;0<c;){var d=31-tt(c),x=1<<d;u[d]=-1,c&=~x}a!==0&&sd(e,a,n)}function vu(){return(Fe&6)===0?($i(0),!1):!0}function oc(){if(Oe!==null){if(Xe===0)var e=Oe.return;else e=Oe,Gn=Kl=null,Eo(e),Ba=null,Oi=0,e=Oe;for(;e!==null;)jm(e.alternate,e),e=e.return;Oe=null}}function Ga(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,F1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),al=0,oc(),nt=e,Oe=a=Fn(e.current,null),Le=n,Xe=0,rn=null,El=!1,Za=gi(e,n),lc=!1,Fa=un=ac=ia=Cl=dt=0,Kt=Ji=null,ic=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var c=31-tt(u),d=1<<c;n|=e[c],u&=~d}return ll=n,Vr(),a}function Wm(e,n){Ne=null,j.H=Vi,n===La||n===Jr?(n=ph(),Xe=3):n===ho?(n=ph(),Xe=4):Xe=n===Vo?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,rn=n,Oe===null&&(dt=1,ou(e,gn(n,e.current)))}function ep(){var e=ln.current;return e===null?!0:(Le&4194048)===Le?vn===null:(Le&62914560)===Le||(Le&536870912)!==0?e===vn:!1}function tp(){var e=j.H;return j.H=Vi,e===null?Vi:e}function np(){var e=j.A;return j.A=w1,e}function ku(){dt=4,El||(Le&4194048)!==Le&&ln.current!==null||(Za=!0),(Cl&134217727)===0&&(ia&134217727)===0||nt===null||jl(nt,Le,un,!1)}function cc(e,n,a){var u=Fe;Fe|=2;var c=tp(),d=np();(nt!==e||Le!==n)&&(bu=null,Ga(e,n)),n=!1;var x=dt;e:do try{if(Xe!==0&&Oe!==null){var S=Oe,C=rn;switch(Xe){case 8:oc(),x=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(n=!0);var L=Xe;if(Xe=0,rn=null,Xa(e,S,C,L),a&&Za){x=0;break e}break;default:L=Xe,Xe=0,rn=null,Xa(e,S,C,L)}}C1(),x=dt;break}catch(Q){Wm(e,Q)}while(!0);return n&&e.shellSuspendCounter++,Gn=Kl=null,Fe=u,j.H=c,j.A=d,Oe===null&&(nt=null,Le=0,Vr()),x}function C1(){for(;Oe!==null;)lp(Oe)}function A1(e,n){var a=Fe;Fe|=2;var u=tp(),c=np();nt!==e||Le!==n?(bu=null,xu=Bt()+500,Ga(e,n)):Za=gi(e,n);e:do try{if(Xe!==0&&Oe!==null){n=Oe;var d=rn;t:switch(Xe){case 1:Xe=0,rn=null,Xa(e,n,d,1);break;case 2:case 9:if(hh(d)){Xe=0,rn=null,ap(n);break}n=function(){Xe!==2&&Xe!==9||nt!==e||(Xe=7),Rn(e)},d.then(n,n);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:hh(d)?(Xe=0,rn=null,ap(n)):(Xe=0,rn=null,Xa(e,n,d,7));break;case 5:var x=null;switch(Oe.tag){case 26:x=Oe.memoizedState;case 5:case 27:var S=Oe;if(x?Ip(x):S.stateNode.complete){Xe=0,rn=null;var C=S.sibling;if(C!==null)Oe=C;else{var L=S.return;L!==null?(Oe=L,Su(L)):Oe=null}break t}}Xe=0,rn=null,Xa(e,n,d,5);break;case 6:Xe=0,rn=null,Xa(e,n,d,6);break;case 8:oc(),dt=6;break e;default:throw Error(r(462))}}N1();break}catch(Q){Wm(e,Q)}while(!0);return Gn=Kl=null,j.H=u,j.A=c,Fe=a,Oe!==null?0:(nt=null,Le=0,Vr(),dt)}function N1(){for(;Oe!==null&&!Ss();)lp(Oe)}function lp(e){var n=Am(e.alternate,e,ll);e.memoizedProps=e.pendingProps,n===null?Su(e):Oe=n}function ap(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=km(a,n,n.pendingProps,n.type,void 0,Le);break;case 11:n=km(a,n,n.pendingProps,n.type.render,n.ref,Le);break;case 5:Eo(n);default:jm(a,n),n=Oe=nh(n,ll),n=Am(a,n,ll)}e.memoizedProps=e.pendingProps,n===null?Su(e):Oe=n}function Xa(e,n,a,u){Gn=Kl=null,Eo(n),Ba=null,Oi=0;var c=n.return;try{if(g1(e,c,n,a,Le)){dt=1,ou(e,gn(a,e.current)),Oe=null;return}}catch(d){if(c!==null)throw Oe=c,d;dt=1,ou(e,gn(a,e.current)),Oe=null;return}n.flags&32768?(Ue||u===1?e=!0:Za||(Le&536870912)!==0?e=!1:(El=e=!0,(u===2||u===9||u===3||u===6)&&(u=ln.current,u!==null&&u.tag===13&&(u.flags|=16384))),ip(n,e)):Su(n)}function Su(e){var n=e;do{if((n.flags&32768)!==0){ip(n,El);return}e=n.return;var a=b1(n.alternate,n,ll);if(a!==null){Oe=a;return}if(n=n.sibling,n!==null){Oe=n;return}Oe=n=e}while(n!==null);dt===0&&(dt=5)}function ip(e,n){do{var a=v1(e.alternate,e);if(a!==null){a.flags&=32767,Oe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=a}while(e!==null);dt=6,Oe=null}function rp(e,n,a,u,c,d,x,S,C){e.cancelPendingCommit=null;do wu();while(St!==0);if((Fe&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=$s,u0(e,a,d,x,S,C),e===nt&&(Oe=nt=null,Le=0),Qa=n,Nl=e,al=a,rc=d,uc=c,Jm=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,z1(we,function(){return fp(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=j.T,j.T=null,c=G.p,G.p=2,x=Fe,Fe|=4;try{k1(e,n,a)}finally{Fe=x,G.p=c,j.T=u}}St=1,up(),sp(),op()}}function up(){if(St===1){St=0;var e=Nl,n=Qa,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=j.T,j.T=null;var u=G.p;G.p=2;var c=Fe;Fe|=4;try{Vm(n,e);var d=Sc,x=Gd(e.containerInfo),S=d.focusedElem,C=d.selectionRange;if(x!==S&&S&&S.ownerDocument&&Qd(S.ownerDocument.documentElement,S)){if(C!==null&&Qs(S)){var L=C.start,Q=C.end;if(Q===void 0&&(Q=L),"selectionStart"in S)S.selectionStart=L,S.selectionEnd=Math.min(Q,S.value.length);else{var $=S.ownerDocument||document,U=$&&$.defaultView||window;if(U.getSelection){var V=U.getSelection(),fe=S.textContent.length,Se=Math.min(C.start,fe),We=C.end===void 0?Se:Math.min(C.end,fe);!V.extend&&Se>We&&(x=We,We=Se,Se=x);var D=Fd(S,Se),N=Fd(S,We);if(D&&N&&(V.rangeCount!==1||V.anchorNode!==D.node||V.anchorOffset!==D.offset||V.focusNode!==N.node||V.focusOffset!==N.offset)){var R=$.createRange();R.setStart(D.node,D.offset),V.removeAllRanges(),Se>We?(V.addRange(R),V.extend(N.node,N.offset)):(R.setEnd(N.node,N.offset),V.addRange(R))}}}}for($=[],V=S;V=V.parentNode;)V.nodeType===1&&$.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<$.length;S++){var K=$[S];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Ru=!!kc,Sc=kc=null}finally{Fe=c,G.p=u,j.T=a}}e.current=n,St=2}}function sp(){if(St===2){St=0;var e=Nl,n=Qa,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=j.T,j.T=null;var u=G.p;G.p=2;var c=Fe;Fe|=4;try{Lm(e,n.alternate,n)}finally{Fe=c,G.p=u,j.T=a}}St=3}}function op(){if(St===4||St===3){St=0,ws();var e=Nl,n=Qa,a=al,u=Jm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?St=5:(St=0,Qa=Nl=null,cp(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Al=null),As(a),n=n.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(Ut,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=j.T,c=G.p,G.p=2,j.T=null;try{for(var d=e.onRecoverableError,x=0;x<u.length;x++){var S=u[x];d(S.value,{componentStack:S.stack})}}finally{j.T=n,G.p=c}}(al&3)!==0&&wu(),Rn(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===sc?Ki++:(Ki=0,sc=e):Ki=0,$i(0)}}function cp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Di(n)))}function wu(){return up(),sp(),op(),fp()}function fp(){if(St!==5)return!1;var e=Nl,n=rc;rc=0;var a=As(al),u=j.T,c=G.p;try{G.p=32>a?32:a,j.T=null,a=uc,uc=null;var d=Nl,x=al;if(St=0,Qa=Nl=null,al=0,(Fe&6)!==0)throw Error(r(331));var S=Fe;if(Fe|=4,Qm(d.current),Im(d,d.current,x,a),Fe=S,$i(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(Ut,d)}catch{}return!0}finally{G.p=c,j.T=u,cp(e,n)}}function dp(e,n,a){n=gn(a,n),n=qo(e.stateNode,n,2),e=kl(e,n,2),e!==null&&(yi(e,2),Rn(e))}function Je(e,n,a){if(e.tag===3)dp(e,e,a);else for(;n!==null;){if(n.tag===3){dp(n,e,a);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Al===null||!Al.has(u))){e=gn(a,e),a=hm(2),u=kl(n,a,2),u!==null&&(mm(a,u,n,e),yi(u,2),Rn(u));break}}n=n.return}}function fc(e,n,a){var u=e.pingCache;if(u===null){u=e.pingCache=new _1;var c=new Set;u.set(n,c)}else c=u.get(n),c===void 0&&(c=new Set,u.set(n,c));c.has(a)||(lc=!0,c.add(a),e=j1.bind(null,e,n,a),n.then(e,e))}function j1(e,n,a){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,nt===e&&(Le&a)===a&&(dt===4||dt===3&&(Le&62914560)===Le&&300>Bt()-yu?(Fe&2)===0&&Ga(e,0):ac|=a,Fa===Le&&(Fa=0)),Rn(e)}function hp(e,n){n===0&&(n=ud()),e=Gl(e,n),e!==null&&(yi(e,n),Rn(e))}function T1(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),hp(e,a)}function D1(e,n){var a=0;switch(e.tag){case 31:case 13:var u=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(n),hp(e,a)}function z1(e,n){return pa(e,n)}var _u=null,Ja=null,dc=!1,Eu=!1,hc=!1,Tl=0;function Rn(e){e!==Ja&&e.next===null&&(Ja===null?_u=Ja=e:Ja=Ja.next=e),Eu=!0,dc||(dc=!0,M1())}function $i(e,n){if(!hc&&Eu){hc=!0;do for(var a=!1,u=_u;u!==null;){if(e!==0){var c=u.pendingLanes;if(c===0)var d=0;else{var x=u.suspendedLanes,S=u.pingedLanes;d=(1<<31-tt(42|e)+1)-1,d&=c&~(x&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,yp(u,d))}else d=Le,d=jr(u,u===nt?d:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(d&3)===0||gi(u,d)||(a=!0,yp(u,d));u=u.next}while(a);hc=!1}}function O1(){mp()}function mp(){Eu=dc=!1;var e=0;Tl!==0&&Z1()&&(e=Tl);for(var n=Bt(),a=null,u=_u;u!==null;){var c=u.next,d=pp(u,n);d===0?(u.next=null,a===null?_u=c:a.next=c,c===null&&(Ja=a)):(a=u,(e!==0||(d&3)!==0)&&(Eu=!0)),u=c}St!==0&&St!==5||$i(e),Tl!==0&&(Tl=0)}function pp(e,n){for(var a=e.suspendedLanes,u=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var x=31-tt(d),S=1<<x,C=c[x];C===-1?((S&a)===0||(S&u)!==0)&&(c[x]=r0(S,n)):C<=n&&(e.expiredLanes|=S),d&=~S}if(n=nt,a=Le,a=jr(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,a===0||e===n&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&pi(u),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||gi(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(u!==null&&pi(u),As(a)){case 2:case 8:a=ie;break;case 32:a=we;break;case 268435456:a=Ge;break;default:a=we}return u=gp.bind(null,e),a=pa(a,u),e.callbackPriority=n,e.callbackNode=a,n}return u!==null&&u!==null&&pi(u),e.callbackPriority=2,e.callbackNode=null,2}function gp(e,n){if(St!==0&&St!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(wu()&&e.callbackNode!==a)return null;var u=Le;return u=jr(e,e===nt?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:($m(e,u,n),pp(e,Bt()),e.callbackNode!=null&&e.callbackNode===a?gp.bind(null,e):null)}function yp(e,n){if(wu())return null;$m(e,n,!0)}function M1(){Q1(function(){(Fe&6)!==0?pa(J,O1):mp()})}function mc(){if(Tl===0){var e=Ma;e===0&&(e=Cr,Cr<<=1,(Cr&261888)===0&&(Cr=256)),Tl=e}return Tl}function xp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Or(""+e)}function bp(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function R1(e,n,a,u,c){if(n==="submit"&&a&&a.stateNode===c){var d=xp((c[Ft]||null).action),x=u.submitter;x&&(n=(n=x[Ft]||null)?xp(n.formAction):x.getAttribute("formAction"),n!==null&&(d=n,x=null));var S=new Br("action","action",null,u,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Tl!==0){var C=x?bp(c,x):new FormData(c);Mo(a,{pending:!0,data:C,method:c.method,action:d},null,C)}}else typeof d=="function"&&(S.preventDefault(),C=x?bp(c,x):new FormData(c),Mo(a,{pending:!0,data:C,method:c.method,action:d},d,C))},currentTarget:c}]})}}for(var pc=0;pc<Ks.length;pc++){var gc=Ks[pc],L1=gc.toLowerCase(),B1=gc[0].toUpperCase()+gc.slice(1);An(L1,"on"+B1)}An(Kd,"onAnimationEnd"),An($d,"onAnimationIteration"),An(Pd,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An(W0,"onTransitionRun"),An(e1,"onTransitionStart"),An(t1,"onTransitionCancel"),An(Wd,"onTransitionEnd"),va("onMouseEnter",["mouseout","mouseover"]),va("onMouseLeave",["mouseout","mouseover"]),va("onPointerEnter",["pointerout","pointerover"]),va("onPointerLeave",["pointerout","pointerover"]),Il("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Il("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Il("onBeforeInput",["compositionend","keypress","textInput","paste"]),Il("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Il("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Il("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pi="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(" "),U1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pi));function vp(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var u=e[a],c=u.event;u=u.listeners;e:{var d=void 0;if(n)for(var x=u.length-1;0<=x;x--){var S=u[x],C=S.instance,L=S.currentTarget;if(S=S.listener,C!==d&&c.isPropagationStopped())break e;d=S,c.currentTarget=L;try{d(c)}catch(Q){qr(Q)}c.currentTarget=null,d=C}else for(x=0;x<u.length;x++){if(S=u[x],C=S.instance,L=S.currentTarget,S=S.listener,C!==d&&c.isPropagationStopped())break e;d=S,c.currentTarget=L;try{d(c)}catch(Q){qr(Q)}c.currentTarget=null,d=C}}}}function Me(e,n){var a=n[Ns];a===void 0&&(a=n[Ns]=new Set);var u=e+"__bubble";a.has(u)||(kp(n,e,2,!1),a.add(u))}function yc(e,n,a){var u=0;n&&(u|=4),kp(a,e,u,n)}var Cu="_reactListening"+Math.random().toString(36).slice(2);function xc(e){if(!e[Cu]){e[Cu]=!0,md.forEach(function(a){a!=="selectionchange"&&(U1.has(a)||yc(a,!1,e),yc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Cu]||(n[Cu]=!0,yc("selectionchange",!1,n))}}function kp(e,n,a,u){switch(Kp(n)){case 2:var c=db;break;case 8:c=hb;break;default:c=Oc}a=c.bind(null,n,a,e),c=void 0,!Bs||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),u?c!==void 0?e.addEventListener(n,a,{capture:!0,passive:c}):e.addEventListener(n,a,!0):c!==void 0?e.addEventListener(n,a,{passive:c}):e.addEventListener(n,a,!1)}function bc(e,n,a,u,c){var d=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var x=u.tag;if(x===3||x===4){var S=u.stateNode.containerInfo;if(S===c)break;if(x===4)for(x=u.return;x!==null;){var C=x.tag;if((C===3||C===4)&&x.stateNode.containerInfo===c)return;x=x.return}for(;S!==null;){if(x=ya(S),x===null)return;if(C=x.tag,C===5||C===6||C===26||C===27){u=d=x;continue e}S=S.parentNode}}u=u.return}Cd(function(){var L=d,Q=Rs(a),$=[];e:{var U=eh.get(e);if(U!==void 0){var V=Br,fe=e;switch(e){case"keypress":if(Rr(a)===0)break e;case"keydown":case"keyup":V=D0;break;case"focusin":fe="focus",V=Vs;break;case"focusout":fe="blur",V=Vs;break;case"beforeblur":case"afterblur":V=Vs;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=jd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=b0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=M0;break;case Kd:case $d:case Pd:V=S0;break;case Wd:V=L0;break;case"scroll":case"scrollend":V=y0;break;case"wheel":V=U0;break;case"copy":case"cut":case"paste":V=_0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Dd;break;case"toggle":case"beforetoggle":V=q0}var Se=(n&4)!==0,We=!Se&&(e==="scroll"||e==="scrollend"),D=Se?U!==null?U+"Capture":null:U;Se=[];for(var N=L,R;N!==null;){var K=N;if(R=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||R===null||D===null||(K=vi(N,D),K!=null&&Se.push(Wi(N,K,R))),We)break;N=N.return}0<Se.length&&(U=new V(U,fe,null,a,Q),$.push({event:U,listeners:Se}))}}if((n&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",U&&a!==Ms&&(fe=a.relatedTarget||a.fromElement)&&(ya(fe)||fe[ga]))break e;if((V||U)&&(U=Q.window===Q?Q:(U=Q.ownerDocument)?U.defaultView||U.parentWindow:window,V?(fe=a.relatedTarget||a.toElement,V=L,fe=fe?ya(fe):null,fe!==null&&(We=o(fe),Se=fe.tag,fe!==We||Se!==5&&Se!==27&&Se!==6)&&(fe=null)):(V=null,fe=L),V!==fe)){if(Se=jd,K="onMouseLeave",D="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(Se=Dd,K="onPointerLeave",D="onPointerEnter",N="pointer"),We=V==null?U:bi(V),R=fe==null?U:bi(fe),U=new Se(K,N+"leave",V,a,Q),U.target=We,U.relatedTarget=R,K=null,ya(Q)===L&&(Se=new Se(D,N+"enter",fe,a,Q),Se.target=R,Se.relatedTarget=We,K=Se),We=K,V&&fe)t:{for(Se=H1,D=V,N=fe,R=0,K=D;K;K=Se(K))R++;K=0;for(var be=N;be;be=Se(be))K++;for(;0<R-K;)D=Se(D),R--;for(;0<K-R;)N=Se(N),K--;for(;R--;){if(D===N||N!==null&&D===N.alternate){Se=D;break t}D=Se(D),N=Se(N)}Se=null}else Se=null;V!==null&&Sp($,U,V,Se,!1),fe!==null&&We!==null&&Sp($,We,fe,Se,!0)}}e:{if(U=L?bi(L):window,V=U.nodeName&&U.nodeName.toLowerCase(),V==="select"||V==="input"&&U.type==="file")var Ye=Hd;else if(Bd(U))if(qd)Ye=K0;else{Ye=X0;var pe=G0}else V=U.nodeName,!V||V.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?L&&Os(L.elementType)&&(Ye=Hd):Ye=J0;if(Ye&&(Ye=Ye(e,L))){Ud($,Ye,a,Q);break e}pe&&pe(e,U,L),e==="focusout"&&L&&U.type==="number"&&L.memoizedProps.value!=null&&zs(U,"number",U.value)}switch(pe=L?bi(L):window,e){case"focusin":(Bd(pe)||pe.contentEditable==="true")&&(Ca=pe,Gs=L,Ni=null);break;case"focusout":Ni=Gs=Ca=null;break;case"mousedown":Xs=!0;break;case"contextmenu":case"mouseup":case"dragend":Xs=!1,Xd($,a,Q);break;case"selectionchange":if(P0)break;case"keydown":case"keyup":Xd($,a,Q)}var Te;if(Is)e:{switch(e){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Ea?Rd(e,a)&&(Be="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Be="onCompositionStart");Be&&(zd&&a.locale!=="ko"&&(Ea||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Ea&&(Te=Ad()):(ml=Q,Us="value"in ml?ml.value:ml.textContent,Ea=!0)),pe=Au(L,Be),0<pe.length&&(Be=new Td(Be,e,null,a,Q),$.push({event:Be,listeners:pe}),Te?Be.data=Te:(Te=Ld(a),Te!==null&&(Be.data=Te)))),(Te=Y0?I0(e,a):Z0(e,a))&&(Be=Au(L,"onBeforeInput"),0<Be.length&&(pe=new Td("onBeforeInput","beforeinput",null,a,Q),$.push({event:pe,listeners:Be}),pe.data=Te)),R1($,e,L,a,Q)}vp($,n)})}function Wi(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Au(e,n){for(var a=n+"Capture",u=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=vi(e,a),c!=null&&u.unshift(Wi(e,c,d)),c=vi(e,n),c!=null&&u.push(Wi(e,c,d))),e.tag===3)return u;e=e.return}return[]}function H1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Sp(e,n,a,u,c){for(var d=n._reactName,x=[];a!==null&&a!==u;){var S=a,C=S.alternate,L=S.stateNode;if(S=S.tag,C!==null&&C===u)break;S!==5&&S!==26&&S!==27||L===null||(C=L,c?(L=vi(a,d),L!=null&&x.unshift(Wi(a,L,C))):c||(L=vi(a,d),L!=null&&x.push(Wi(a,L,C)))),a=a.return}x.length!==0&&e.push({event:n,listeners:x})}var q1=/\r\n?/g,V1=/\u0000|\uFFFD/g;function wp(e){return(typeof e=="string"?e:""+e).replace(q1,`
|
|
49
|
+
`).replace(V1,"")}function _p(e,n){return n=wp(n),wp(e)===n}function Pe(e,n,a,u,c,d){switch(a){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Sa(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Sa(e,""+u);break;case"className":Dr(e,"class",u);break;case"tabIndex":Dr(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Dr(e,a,u);break;case"style":_d(e,u,d);break;case"data":if(n!=="object"){Dr(e,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=Or(""+u),e.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(n!=="input"&&Pe(e,n,"name",c.name,c,null),Pe(e,n,"formEncType",c.formEncType,c,null),Pe(e,n,"formMethod",c.formMethod,c,null),Pe(e,n,"formTarget",c.formTarget,c,null)):(Pe(e,n,"encType",c.encType,c,null),Pe(e,n,"method",c.method,c,null),Pe(e,n,"target",c.target,c,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=Or(""+u),e.setAttribute(a,u);break;case"onClick":u!=null&&(e.onclick=In);break;case"onScroll":u!=null&&Me("scroll",e);break;case"onScrollEnd":u!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}a=Or(""+u),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""+u):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":u===!0?e.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,u):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(a,u):e.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(a):e.setAttribute(a,u);break;case"popover":Me("beforetoggle",e),Me("toggle",e),Tr(e,"popover",u);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Tr(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=p0.get(a)||a,Tr(e,a,u))}}function vc(e,n,a,u,c,d){switch(a){case"style":_d(e,u,d);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof u=="string"?Sa(e,u):(typeof u=="number"||typeof u=="bigint")&&Sa(e,""+u);break;case"onScroll":u!=null&&Me("scroll",e);break;case"onScrollEnd":u!=null&&Me("scrollend",e);break;case"onClick":u!=null&&(e.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!pd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),n=a.slice(2,c?a.length-7:void 0),d=e[Ft]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(n,d,c),typeof u=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,u,c);break e}a in e?e[a]=u:u===!0?e.setAttribute(a,""):Tr(e,a,u)}}}function Tt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var u=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var x=a[d];if(x!=null)switch(d){case"src":u=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Pe(e,n,d,x,a,null)}}c&&Pe(e,n,"srcSet",a.srcSet,a,null),u&&Pe(e,n,"src",a.src,a,null);return;case"input":Me("invalid",e);var S=d=x=c=null,C=null,L=null;for(u in a)if(a.hasOwnProperty(u)){var Q=a[u];if(Q!=null)switch(u){case"name":c=Q;break;case"type":x=Q;break;case"checked":C=Q;break;case"defaultChecked":L=Q;break;case"value":d=Q;break;case"defaultValue":S=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,n));break;default:Pe(e,n,u,Q,a,null)}}vd(e,d,S,C,L,x,c,!1);return;case"select":Me("invalid",e),u=x=d=null;for(c in a)if(a.hasOwnProperty(c)&&(S=a[c],S!=null))switch(c){case"value":d=S;break;case"defaultValue":x=S;break;case"multiple":u=S;default:Pe(e,n,c,S,a,null)}n=d,a=x,e.multiple=!!u,n!=null?ka(e,!!u,n,!1):a!=null&&ka(e,!!u,a,!0);return;case"textarea":Me("invalid",e),d=c=u=null;for(x in a)if(a.hasOwnProperty(x)&&(S=a[x],S!=null))switch(x){case"value":u=S;break;case"defaultValue":c=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Pe(e,n,x,S,a,null)}Sd(e,u,c,d);return;case"option":for(C in a)if(a.hasOwnProperty(C)&&(u=a[C],u!=null))switch(C){case"selected":e.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Pe(e,n,C,u,a,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(u=0;u<Pi.length;u++)Me(Pi[u],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(L in a)if(a.hasOwnProperty(L)&&(u=a[L],u!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Pe(e,n,L,u,a,null)}return;default:if(Os(n)){for(Q in a)a.hasOwnProperty(Q)&&(u=a[Q],u!==void 0&&vc(e,n,Q,u,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(u=a[S],u!=null&&Pe(e,n,S,u,a,null))}function Y1(e,n,a,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,x=null,S=null,C=null,L=null,Q=null;for(V in a){var $=a[V];if(a.hasOwnProperty(V)&&$!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":C=$;default:u.hasOwnProperty(V)||Pe(e,n,V,null,u,$)}}for(var U in u){var V=u[U];if($=a[U],u.hasOwnProperty(U)&&(V!=null||$!=null))switch(U){case"type":d=V;break;case"name":c=V;break;case"checked":L=V;break;case"defaultChecked":Q=V;break;case"value":x=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,n));break;default:V!==$&&Pe(e,n,U,V,u,$)}}Ds(e,x,S,C,L,Q,d,c);return;case"select":V=x=S=U=null;for(d in a)if(C=a[d],a.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":V=C;default:u.hasOwnProperty(d)||Pe(e,n,d,null,u,C)}for(c in u)if(d=u[c],C=a[c],u.hasOwnProperty(c)&&(d!=null||C!=null))switch(c){case"value":U=d;break;case"defaultValue":S=d;break;case"multiple":x=d;default:d!==C&&Pe(e,n,c,d,u,C)}n=S,a=x,u=V,U!=null?ka(e,!!a,U,!1):!!u!=!!a&&(n!=null?ka(e,!!a,n,!0):ka(e,!!a,a?[]:"",!1));return;case"textarea":V=U=null;for(S in a)if(c=a[S],a.hasOwnProperty(S)&&c!=null&&!u.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Pe(e,n,S,null,u,c)}for(x in u)if(c=u[x],d=a[x],u.hasOwnProperty(x)&&(c!=null||d!=null))switch(x){case"value":U=c;break;case"defaultValue":V=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==d&&Pe(e,n,x,c,u,d)}kd(e,U,V);return;case"option":for(var fe in a)if(U=a[fe],a.hasOwnProperty(fe)&&U!=null&&!u.hasOwnProperty(fe))switch(fe){case"selected":e.selected=!1;break;default:Pe(e,n,fe,null,u,U)}for(C in u)if(U=u[C],V=a[C],u.hasOwnProperty(C)&&U!==V&&(U!=null||V!=null))switch(C){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Pe(e,n,C,U,u,V)}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 Se in a)U=a[Se],a.hasOwnProperty(Se)&&U!=null&&!u.hasOwnProperty(Se)&&Pe(e,n,Se,null,u,U);for(L in u)if(U=u[L],V=a[L],u.hasOwnProperty(L)&&U!==V&&(U!=null||V!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,n));break;default:Pe(e,n,L,U,u,V)}return;default:if(Os(n)){for(var We in a)U=a[We],a.hasOwnProperty(We)&&U!==void 0&&!u.hasOwnProperty(We)&&vc(e,n,We,void 0,u,U);for(Q in u)U=u[Q],V=a[Q],!u.hasOwnProperty(Q)||U===V||U===void 0&&V===void 0||vc(e,n,Q,U,u,V);return}}for(var D in a)U=a[D],a.hasOwnProperty(D)&&U!=null&&!u.hasOwnProperty(D)&&Pe(e,n,D,null,u,U);for($ in u)U=u[$],V=a[$],!u.hasOwnProperty($)||U===V||U==null&&V==null||Pe(e,n,$,U,u,V)}function Ep(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function I1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var c=a[u],d=c.transferSize,x=c.initiatorType,S=c.duration;if(d&&S&&Ep(x)){for(x=0,S=c.responseEnd,u+=1;u<a.length;u++){var C=a[u],L=C.startTime;if(L>S)break;var Q=C.transferSize,$=C.initiatorType;Q&&Ep($)&&(C=C.responseEnd,x+=Q*(C<S?1:(S-L)/(C-L)))}if(--u,n+=8*(d+x)/(c.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var kc=null,Sc=null;function Nu(e){return e.nodeType===9?e:e.ownerDocument}function Cp(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 Ap(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function wc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var _c=null;function Z1(){var e=window.event;return e&&e.type==="popstate"?e===_c?!1:(_c=e,!0):(_c=null,!1)}var Np=typeof setTimeout=="function"?setTimeout:void 0,F1=typeof clearTimeout=="function"?clearTimeout:void 0,jp=typeof Promise=="function"?Promise:void 0,Q1=typeof queueMicrotask=="function"?queueMicrotask:typeof jp<"u"?function(e){return jp.resolve(null).then(e).catch(G1)}:Np;function G1(e){setTimeout(function(){throw e})}function Dl(e){return e==="head"}function Tp(e,n){var a=n,u=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(u===0){e.removeChild(c),Wa(n);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")er(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,er(a);for(var d=a.firstChild;d;){var x=d.nextSibling,S=d.nodeName;d[xi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=x}}else a==="body"&&er(e.ownerDocument.body);a=c}while(a);Wa(n)}function Dp(e,n){var a=e;e=0;do{var u=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=u}while(a)}function Ec(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Ec(a),js(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function X1(e,n,a,u){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[xi])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=kn(e.nextSibling),e===null)break}return null}function J1(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=kn(e.nextSibling),e===null))return null;return e}function zp(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=kn(e.nextSibling),e===null))return null;return e}function Cc(e){return e.data==="$?"||e.data==="$~"}function Ac(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function K1(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var u=function(){n(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function kn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Nc=null;function Op(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return kn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function Mp(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function Rp(e,n,a){switch(n=Nu(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function er(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);js(e)}var Sn=new Map,Lp=new Set;function ju(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var il=G.d;G.d={f:$1,r:P1,D:W1,C:eb,L:tb,m:nb,X:ab,S:lb,M:ib};function $1(){var e=il.f(),n=vu();return e||n}function P1(e){var n=xa(e);n!==null&&n.tag===5&&n.type==="form"?Wh(n):il.r(e)}var Ka=typeof document>"u"?null:document;function Bp(e,n,a){var u=Ka;if(u&&typeof n=="string"&&n){var c=mn(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Lp.has(c)||(Lp.add(c),e={rel:e,crossOrigin:a,href:n},u.querySelector(c)===null&&(n=u.createElement("link"),Tt(n,"link",e),wt(n),u.head.appendChild(n)))}}function W1(e){il.D(e),Bp("dns-prefetch",e,null)}function eb(e,n){il.C(e,n),Bp("preconnect",e,n)}function tb(e,n,a){il.L(e,n,a);var u=Ka;if(u&&e&&n){var c='link[rel="preload"][as="'+mn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+mn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+mn(a.imageSizes)+'"]')):c+='[href="'+mn(e)+'"]';var d=c;switch(n){case"style":d=$a(e);break;case"script":d=Pa(e)}Sn.has(d)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),Sn.set(d,e),u.querySelector(c)!==null||n==="style"&&u.querySelector(tr(d))||n==="script"&&u.querySelector(nr(d))||(n=u.createElement("link"),Tt(n,"link",e),wt(n),u.head.appendChild(n)))}}function nb(e,n){il.m(e,n);var a=Ka;if(a&&e){var u=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+mn(u)+'"][href="'+mn(e)+'"]',d=c;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Pa(e)}if(!Sn.has(d)&&(e=y({rel:"modulepreload",href:e},n),Sn.set(d,e),a.querySelector(c)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(nr(d)))return}u=a.createElement("link"),Tt(u,"link",e),wt(u),a.head.appendChild(u)}}}function lb(e,n,a){il.S(e,n,a);var u=Ka;if(u&&e){var c=ba(u).hoistableStyles,d=$a(e);n=n||"default";var x=c.get(d);if(!x){var S={loading:0,preload:null};if(x=u.querySelector(tr(d)))S.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Sn.get(d))&&jc(e,a);var C=x=u.createElement("link");wt(C),Tt(C,"link",e),C._p=new Promise(function(L,Q){C.onload=L,C.onerror=Q}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Tu(x,n,u)}x={type:"stylesheet",instance:x,count:1,state:S},c.set(d,x)}}}function ab(e,n){il.X(e,n);var a=Ka;if(a&&e){var u=ba(a).hoistableScripts,c=Pa(e),d=u.get(c);d||(d=a.querySelector(nr(c)),d||(e=y({src:e,async:!0},n),(n=Sn.get(c))&&Tc(e,n),d=a.createElement("script"),wt(d),Tt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(c,d))}}function ib(e,n){il.M(e,n);var a=Ka;if(a&&e){var u=ba(a).hoistableScripts,c=Pa(e),d=u.get(c);d||(d=a.querySelector(nr(c)),d||(e=y({src:e,async:!0,type:"module"},n),(n=Sn.get(c))&&Tc(e,n),d=a.createElement("script"),wt(d),Tt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(c,d))}}function Up(e,n,a,u){var c=(c=me.current)?ju(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=$a(a.href),a=ba(c).hoistableStyles,u=a.get(n),u||(u={type:"style",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=$a(a.href);var d=ba(c).hoistableStyles,x=d.get(e);if(x||(c=c.ownerDocument||c,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=c.querySelector(tr(e)))&&!d._p&&(x.instance=d,x.state.loading=5),Sn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Sn.set(e,a),d||rb(c,e,a,x.state))),n&&u===null)throw Error(r(528,""));return x}if(n&&u!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Pa(a),a=ba(c).hoistableScripts,u=a.get(n),u||(u={type:"script",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function $a(e){return'href="'+mn(e)+'"'}function tr(e){return'link[rel="stylesheet"]['+e+"]"}function Hp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function rb(e,n,a,u){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=e.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Tt(n,"link",a),wt(n),e.head.appendChild(n))}function Pa(e){return'[src="'+mn(e)+'"]'}function nr(e){return"script[async]"+e}function qp(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var u=e.querySelector('style[data-href~="'+mn(a.href)+'"]');if(u)return n.instance=u,wt(u),u;var c=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),wt(u),Tt(u,"style",c),Tu(u,a.precedence,e),n.instance=u;case"stylesheet":c=$a(a.href);var d=e.querySelector(tr(c));if(d)return n.state.loading|=4,n.instance=d,wt(d),d;u=Hp(a),(c=Sn.get(c))&&jc(u,c),d=(e.ownerDocument||e).createElement("link"),wt(d);var x=d;return x._p=new Promise(function(S,C){x.onload=S,x.onerror=C}),Tt(d,"link",u),n.state.loading|=4,Tu(d,a.precedence,e),n.instance=d;case"script":return d=Pa(a.src),(c=e.querySelector(nr(d)))?(n.instance=c,wt(c),c):(u=a,(c=Sn.get(d))&&(u=y({},a),Tc(u,c)),e=e.ownerDocument||e,c=e.createElement("script"),wt(c),Tt(c,"link",u),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,Tu(u,a.precedence,e));return n.instance}function Tu(e,n,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=u.length?u[u.length-1]:null,d=c,x=0;x<u.length;x++){var S=u[x];if(S.dataset.precedence===n)d=S;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function jc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Tc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Du=null;function Vp(e,n,a){if(Du===null){var u=new Map,c=Du=new Map;c.set(a,u)}else c=Du,u=c.get(a),u||(u=new Map,c.set(a,u));if(u.has(e))return u;for(u.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[xi]||d[Ct]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(n)||"";x=e+x;var S=u.get(x);S?S.push(d):u.set(x,[d])}}return u}function Yp(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function ub(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Ip(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function sb(e,n,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=$a(u.href),d=n.querySelector(tr(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=zu.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=d,wt(d);return}d=n.ownerDocument||n,u=Hp(u),(c=Sn.get(c))&&jc(u,c),d=d.createElement("link"),wt(d);var x=d;x._p=new Promise(function(S,C){x.onload=S,x.onerror=C}),Tt(d,"link",u),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=zu.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Dc=0;function ob(e,n){return e.stylesheets&&e.count===0&&Mu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var u=setTimeout(function(){if(e.stylesheets&&Mu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Dc===0&&(Dc=62500*I1());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Mu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Dc?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(c)}}:null}function zu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Mu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ou=null;function Mu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ou=new Map,n.forEach(cb,e),Ou=null,zu.call(e))}function cb(e,n){if(!(n.state.loading&4)){var a=Ou.get(e);if(a)var u=a.get(null);else{a=new Map,Ou.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var x=c[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),u=x)}u&&a.set(null,u)}c=n.instance,x=c.getAttribute("data-precedence"),d=a.get(x)||u,d===u&&a.set(null,c),a.set(x,c),this.count++,u=zu.bind(this),c.addEventListener("load",u),c.addEventListener("error",u),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var lr={$$typeof:q,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function fb(e,n,a,u,c,d,x,S,C){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=Es(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Es(0),this.hiddenUpdates=Es(null),this.identifierPrefix=u,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Zp(e,n,a,u,c,d,x,S,C,L,Q,$){return e=new fb(e,n,a,x,C,L,Q,$,S),n=1,d===!0&&(n|=24),d=nn(3,null,null,n),e.current=d,d.stateNode=e,n=oo(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:u,isDehydrated:a,cache:n},mo(d),e}function Fp(e){return e?(e=ja,e):ja}function Qp(e,n,a,u,c,d){c=Fp(c),u.context===null?u.context=c:u.pendingContext=c,u=vl(n),u.payload={element:a},d=d===void 0?null:d,d!==null&&(u.callback=d),a=kl(e,u,n),a!==null&&($t(a,e,n),Ri(a,e,n))}function Gp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function zc(e,n){Gp(e,n),(e=e.alternate)&&Gp(e,n)}function Xp(e){if(e.tag===13||e.tag===31){var n=Gl(e,67108864);n!==null&&$t(n,e,67108864),zc(e,67108864)}}function Jp(e){if(e.tag===13||e.tag===31){var n=sn();n=Cs(n);var a=Gl(e,n);a!==null&&$t(a,e,n),zc(e,n)}}var Ru=!0;function db(e,n,a,u){var c=j.T;j.T=null;var d=G.p;try{G.p=2,Oc(e,n,a,u)}finally{G.p=d,j.T=c}}function hb(e,n,a,u){var c=j.T;j.T=null;var d=G.p;try{G.p=8,Oc(e,n,a,u)}finally{G.p=d,j.T=c}}function Oc(e,n,a,u){if(Ru){var c=Mc(u);if(c===null)bc(e,n,u,Lu,a),$p(e,u);else if(pb(c,e,n,a,u))u.stopPropagation();else if($p(e,u),n&4&&-1<mb.indexOf(e)){for(;c!==null;){var d=xa(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=Yl(d.pendingLanes);if(x!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;x;){var C=1<<31-tt(x);S.entanglements[1]|=C,x&=~C}Rn(d),(Fe&6)===0&&(xu=Bt()+500,$i(0))}}break;case 31:case 13:S=Gl(d,2),S!==null&&$t(S,d,2),vu(),zc(d,2)}if(d=Mc(u),d===null&&bc(e,n,u,Lu,a),d===c)break;c=d}c!==null&&u.stopPropagation()}else bc(e,n,u,null,a)}}function Mc(e){return e=Rs(e),Rc(e)}var Lu=null;function Rc(e){if(Lu=null,e=ya(e),e!==null){var n=o(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=f(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Lu=e,null}function Kp(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(_s()){case J:return 2;case ie:return 8;case we:case ze:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Lc=!1,zl=null,Ol=null,Ml=null,ar=new Map,ir=new Map,Rl=[],mb="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 $p(e,n){switch(e){case"focusin":case"focusout":zl=null;break;case"dragenter":case"dragleave":Ol=null;break;case"mouseover":case"mouseout":Ml=null;break;case"pointerover":case"pointerout":ar.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ir.delete(n.pointerId)}}function rr(e,n,a,u,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:a,eventSystemFlags:u,nativeEvent:d,targetContainers:[c]},n!==null&&(n=xa(n),n!==null&&Xp(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function pb(e,n,a,u,c){switch(n){case"focusin":return zl=rr(zl,e,n,a,u,c),!0;case"dragenter":return Ol=rr(Ol,e,n,a,u,c),!0;case"mouseover":return Ml=rr(Ml,e,n,a,u,c),!0;case"pointerover":var d=c.pointerId;return ar.set(d,rr(ar.get(d)||null,e,n,a,u,c)),!0;case"gotpointercapture":return d=c.pointerId,ir.set(d,rr(ir.get(d)||null,e,n,a,u,c)),!0}return!1}function Pp(e){var n=ya(e.target);if(n!==null){var a=o(n);if(a!==null){if(n=a.tag,n===13){if(n=f(a),n!==null){e.blockedOn=n,dd(e.priority,function(){Jp(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,dd(e.priority,function(){Jp(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Mc(e.nativeEvent);if(a===null){a=e.nativeEvent;var u=new a.constructor(a.type,a);Ms=u,a.target.dispatchEvent(u),Ms=null}else return n=xa(a),n!==null&&Xp(n),e.blockedOn=a,!1;n.shift()}return!0}function Wp(e,n,a){Bu(e)&&a.delete(n)}function gb(){Lc=!1,zl!==null&&Bu(zl)&&(zl=null),Ol!==null&&Bu(Ol)&&(Ol=null),Ml!==null&&Bu(Ml)&&(Ml=null),ar.forEach(Wp),ir.forEach(Wp)}function Uu(e,n){e.blockedOn===n&&(e.blockedOn=null,Lc||(Lc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,gb)))}var Hu=null;function eg(e){Hu!==e&&(Hu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hu===e&&(Hu=null);for(var n=0;n<e.length;n+=3){var a=e[n],u=e[n+1],c=e[n+2];if(typeof u!="function"){if(Rc(u||a)===null)continue;break}var d=xa(a);d!==null&&(e.splice(n,3),n-=3,Mo(d,{pending:!0,data:c,method:a.method,action:u},u,c))}}))}function Wa(e){function n(C){return Uu(C,e)}zl!==null&&Uu(zl,e),Ol!==null&&Uu(Ol,e),Ml!==null&&Uu(Ml,e),ar.forEach(n),ir.forEach(n);for(var a=0;a<Rl.length;a++){var u=Rl[a];u.blockedOn===e&&(u.blockedOn=null)}for(;0<Rl.length&&(a=Rl[0],a.blockedOn===null);)Pp(a),a.blockedOn===null&&Rl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var c=a[u],d=a[u+1],x=c[Ft]||null;if(typeof d=="function")x||eg(a);else if(x){var S=null;if(d&&d.hasAttribute("formAction")){if(c=d,x=d[Ft]||null)S=x.formAction;else if(Rc(c)!==null)continue}else S=x.action;typeof S=="function"?a[u+1]=S:(a.splice(u,3),u-=3),eg(a)}}}function tg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(x){return c=x})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),u||setTimeout(a,20)}function a(){if(!u&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){u=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function Bc(e){this._internalRoot=e}qu.prototype.render=Bc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,u=sn();Qp(a,u,e,n,null,null)},qu.prototype.unmount=Bc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Qp(e.current,2,null,e,null,null),vu(),n[ga]=null}};function qu(e){this._internalRoot=e}qu.prototype.unstable_scheduleHydration=function(e){if(e){var n=fd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<Rl.length&&n!==0&&n<Rl[a].priority;a++);Rl.splice(a,0,e),a===0&&Pp(e)}};var ng=l.version;if(ng!=="19.2.7")throw Error(r(527,ng,"19.2.7"));G.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(n),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var yb={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{Ut=Vu.inject(yb),kt=Vu}catch{}}return sr.createRoot=function(e,n){if(!s(e))throw Error(r(299));var a=!1,u="",c=om,d=cm,x=fm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError)),n=Zp(e,1,!1,null,null,a,u,null,c,d,x,tg),e[ga]=n.current,xc(e),new Bc(n)},sr.hydrateRoot=function(e,n,a){if(!s(e))throw Error(r(299));var u=!1,c="",d=om,x=cm,S=fm,C=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(C=a.formState)),n=Zp(e,1,!0,n,a??null,u,c,C,d,x,S,tg),n.context=Fp(null),a=n.current,u=sn(),u=Cs(u),c=vl(u),c.callback=null,kl(a,c,u),a=u,n.current.lanes=a,yi(n,a),Rn(n),e[ga]=n.current,xc(e),new qu(n)},sr.version="19.2.7",sr}var dg;function Ab(){if(dg)return qc.exports;dg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),qc.exports=Cb(),qc.exports}var Nb=Ab();const Cy=new Map,Zc=new Map;function ff(t){return Cy.get(t)??null}function jb(t,l){l.models.length!==0&&Cy.set(t,l)}function Tb(t,l){const i=ff(t);if(i)return Promise.resolve(i);const r=Zc.get(t);if(r)return r;const s=l().then(o=>(jb(t,o),o)).finally(()=>Zc.delete(t));return Zc.set(t,s),s}const it="";async function Db(t){const l=await t.text();try{const i=JSON.parse(l),r=i.error??i.message;if(typeof r=="string"&&r.trim())return r.replace(/^Error:\s*/i,"")}catch{}return l}async function hg(){const t=await fetch(`${it}/api/snapshot`);if(!t.ok)throw new Error("Failed to fetch snapshot");return t.json()}async function ai(t){const l=await fetch(`${it}/api/runs/${t}`);if(!l.ok)throw new Error("Not found");return l.json()}async function zb(){const t=await fetch(`${it}/api/intake/linear`);if(!t.ok)throw new Error(await t.text());return(await t.json()).candidates??[]}async function Xu(){const t=await fetch(`${it}/api/intake/linear/status`);if(!t.ok)throw new Error(await t.text());return t.json()}async function Of(){const t=await fetch(`${it}/api/intake/linear/config`);if(!t.ok)throw new Error(await t.text());return t.json()}async function Ob(t){const l=await fetch(`${it}/api/intake/linear/config`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function Mb(t,l){const i=await fetch(`${it}/api/intake/linear/${t}/promote`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!i.ok)throw new Error(await i.text());return i.json()}async function Rb(t){const l=await fetch(`${it}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function Lb(t,l){const i=await fetch(`${it}/api/agents/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!i.ok)throw new Error(await i.text());return i.json()}async function Bb(t){const l=await fetch(`${it}/api/agents/${t}`,{method:"DELETE"});if(!l.ok)throw new Error(await l.text())}async function Mf(t){const l=await fetch(`${it}/api/runs/${t}/cancel`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Ub(t){const l=await fetch(`${it}/api/runs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function mg(t,l,i,r){const s=await fetch(`${it}/api/runs/${t}/plan`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({planMarkdown:l,approve:i,...(r==null?void 0:r.planModel)!==void 0?{planModel:r.planModel}:{},...(r==null?void 0:r.executeModel)!==void 0?{executeModel:r.executeModel}:{},...(r==null?void 0:r.planBudget)!==void 0?{planBudget:r.planBudget}:{},...(r==null?void 0:r.executeBudget)!==void 0?{executeBudget:r.executeBudget}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function Hb(t,l,i){const r=await fetch(`${it}/api/runs/${t}/draft-plan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l!==void 0?{planModel:l}:{},...i!==void 0?{planBudget:i}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function qb(t,l,i){const r=await fetch(`${it}/api/runs/${t}/kick`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l!=null&&l.trim()?{executeModel:l.trim()}:{},...i!==void 0?{executeBudget:i}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function Vb(t,l,i){const r=await fetch(`${it}/api/runs/${t}/plan/answers`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answers:l,...(i==null?void 0:i.executeModel)!==void 0?{executeModel:i.executeModel}:{},...(i==null?void 0:i.executeBudget)!==void 0?{executeBudget:i.executeBudget}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function Yb(t){const l=await fetch(`${it}/api/runs/${t}/approve`,{method:"POST"});if(!l.ok)throw new Error(await Db(l));return l.json()}async function Ib(t,l,i,r){const s=await fetch(`${it}/api/runs/${t}/retry`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({feedback:l,...i!==void 0?{executeModel:i}:{},...r!==void 0?{executeBudget:r}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function Zb(t){const l=await fetch(`${it}/api/runs/${t}/playbook-patch/apply`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Fb(t){const l=await fetch(`${it}/api/runs/${t}/playbook-patch/dismiss`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Qb(t,l){return Tb(t,async()=>{const r=await fetch(`${it}/api/runtimes/${t}/models`);if(!r.ok)throw new Error(await r.text());return r.json()})}async function Gb(){const t=await fetch(`${it}/api/agent-deck/status`);if(!t.ok)throw new Error(await t.text());return t.json()}async function Xb(){return(await(await fetch(`${it}/api/agent-deck/decks`)).json()).data??[]}async function Jb(t){return(await(await fetch(`${it}/api/agent-deck/decks/${t}/playbooks`)).json()).data??[]}function Kb(t){const l=new EventSource(`${it}/api/events`);return l.onmessage=i=>{try{t(JSON.parse(i.data))}catch{}},l.onerror=()=>{l.close()},()=>l.close()}async function $b(t,l="transcript"){const i=await fetch(`${it}/api/runs/${t}/log-tail?kind=${l}`);if(!i.ok)throw new Error(await i.text());return(await i.json()).content}function sl(t){if(!t.contentJson)return null;try{return JSON.parse(t.contentJson)}catch{return null}}function Ju(t){if(!t.contentJson)return t.blobPath??"";try{const l=JSON.parse(t.contentJson);return l.markdown??l.resultText??l.excerpt??t.contentJson}catch{return t.contentJson}}function qt(t,l){return[...t].reverse().find(i=>i.kind===l)}function Pb(t){var i;const l=qt(t,"task_snapshot");if(!(l!=null&&l.contentJson))return null;try{const s=(i=JSON.parse(l.contentJson).url)==null?void 0:i.trim();return s!=null&&s.startsWith("http")?s:null}catch{return null}}function Ay(t,l,i){const r=t.filter(o=>o.kind===l);for(let o=r.length-1;o>=0;o--){const f=sl(r[o]);if(f&&f.phase===i)return f}const s=r[r.length-1];return s?sl(s):null}function Ku(t,l=Date.now()){const i=l-new Date(t).getTime();if(i<0)return"just now";const r=Math.floor(i/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const o=Math.floor(s/60);if(o<24)return`${o}h ago`;const f=Math.floor(o/24);return f<7?`${f}d ago`:new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Ny(t){if(t<1e3)return`${Math.round(t)}ms`;const l=Math.round(t/1e3),i=Math.floor(l/60),r=l%60;if(i>=60){const s=Math.floor(i/60),o=i%60;return o>0?`${s}h ${o}m`:`${s}h`}return i>0?r>0?`${i}m ${r}s`:`${i}m`:`${r}s`}function oa(t){return t==="claude_code"?"Claude":t==="cursor_local"?"Cursor":"No agent"}function fs(t){return t==="claude_code"?"bg-[#D4A574]/20 text-[#E8C9A8] border-[#D4A574]/40":t==="cursor_local"?"bg-[#7EB8FF]/15 text-[#A8D4FF] border-[#7EB8FF]/35":"bg-white/5 text-white/50 border-white/15"}function Rf(t){return{code:"Code",communication:"Slack",email:"Email",research:"Research",content:"Content",other:"Other"}[t]??t}function $u(t){return t.source==="linear"&&t.externalLabel?t.externalLabel:t.source==="linear"&&t.externalId?t.externalId:t.source==="linear"?"Linear":"Manual"}function jy(t,l){switch(t){case"plan_pending":return{label:"Planning",hint:"Agent is writing the plan",tone:"bg-cyber-violet/15 text-cyber-violet-light border-cyber-violet/35",accent:"border-l-cyber-violet"};case"plan_approved":return{label:"Queued",hint:"Approved — waiting for slot",tone:"bg-sky-500/15 text-sky-200 border-sky-400/30",accent:"border-l-sky-400"};case"queued":return{label:"Queued",tone:"bg-sky-500/15 text-sky-200 border-sky-400/30",accent:"border-l-sky-400"};case"running":return{label:"Running",hint:"Agent executing",tone:"bg-[#92E4DD]/15 text-[#92E4DD] border-[#92E4DD]/35",accent:"border-l-[#92E4DD]"};case"review":return{label:"Needs Review",hint:"Your sign-off required",tone:"bg-[#C4B643]/20 text-[#E8DC7A] border-[#C4B643]/40",accent:"border-l-[#C4B643]"};case"done":return{label:"Done",tone:"bg-emerald-500/10 text-emerald-300/90 border-emerald-400/25",accent:"border-l-emerald-400/60"};case"failed":return{label:"Failed",hint:"Retry from result review",tone:"bg-red-500/15 text-red-300 border-red-400/30",accent:"border-l-red-400"};case"cancelled":return{label:"Removed",hint:"Dismissed from Operations",tone:"bg-white/5 text-white/40 border-white/10",accent:"border-l-white/20"};default:return{label:t,tone:"bg-white/5 text-white/60 border-white/15",accent:"border-l-white/20"}}}function Lf(t){return t.deckName?t.deckName:t.deckId?`deck ${t.deckId.slice(0,8)}…`:null}function ot({children:t,className:l="",title:i}){return g.jsx("span",{title:i,className:`inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium uppercase tracking-wide border ${l}`,children:t})}function Ty({index:t,total:l,onPrev:i,onNext:r,label:s="In Queue"}){return l<=1?null:g.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45 hidden sm:inline",children:s}),g.jsx("button",{type:"button",onClick:i,disabled:t<=0,className:"btn-ghost px-2.5 py-1.5 disabled:opacity-30",title:"Previous","aria-label":"Previous in queue",children:"←"}),g.jsxs("span",{className:"text-sm tabular-nums text-white/60 min-w-[3.5rem] text-center",children:[t+1," / ",l]}),g.jsx("button",{type:"button",onClick:r,disabled:t>=l-1,className:"btn-ghost px-2.5 py-1.5 disabled:opacity-30",title:"Next","aria-label":"Next in queue",children:"→"})]})}var Ze;(function(t){t.assertEqual=s=>{};function l(s){}t.assertIs=l;function i(s){throw new Error}t.assertNever=i,t.arrayToEnum=s=>{const o={};for(const f of s)o[f]=f;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(h=>typeof s[s[h]]!="number"),f={};for(const h of o)f[h]=s[h];return t.objectValues(f)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const f in s)Object.prototype.hasOwnProperty.call(s,f)&&o.push(f);return o},t.find=(s,o)=>{for(const f of s)if(o(f))return f},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(f=>typeof f=="string"?`'${f}'`:f).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Ze||(Ze={}));var pg;(function(t){t.mergeShapes=(l,i)=>({...l,...i})})(pg||(pg={}));const de=Ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ul=t=>{switch(typeof t){case"undefined":return de.undefined;case"string":return de.string;case"number":return Number.isNaN(t)?de.nan:de.number;case"boolean":return de.boolean;case"function":return de.function;case"bigint":return de.bigint;case"symbol":return de.symbol;case"object":return Array.isArray(t)?de.array:t===null?de.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?de.promise:typeof Map<"u"&&t instanceof Map?de.map:typeof Set<"u"&&t instanceof Set?de.set:typeof Date<"u"&&t instanceof Date?de.date:de.object;default:return de.unknown}},le=Ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ol extends Error{get errors(){return this.issues}constructor(l){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=l}format(l){const i=l||function(o){return o.message},r={_errors:[]},s=o=>{for(const f of o.issues)if(f.code==="invalid_union")f.unionErrors.map(s);else if(f.code==="invalid_return_type")s(f.returnTypeError);else if(f.code==="invalid_arguments")s(f.argumentsError);else if(f.path.length===0)r._errors.push(i(f));else{let h=r,p=0;for(;p<f.path.length;){const m=f.path[p];p===f.path.length-1?(h[m]=h[m]||{_errors:[]},h[m]._errors.push(i(f))):h[m]=h[m]||{_errors:[]},h=h[m],p++}}};return s(this),r}static assert(l){if(!(l instanceof ol))throw new Error(`Not a ZodError: ${l}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(l=i=>i.message){const i={},r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];i[o]=i[o]||[],i[o].push(l(s))}else r.push(l(s));return{formErrors:r,fieldErrors:i}}get formErrors(){return this.flatten()}}ol.create=t=>new ol(t);const df=(t,l)=>{let i;switch(t.code){case le.invalid_type:t.received===de.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case le.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,Ze.jsonStringifyReplacer)}`;break;case le.unrecognized_keys:i=`Unrecognized key(s) in object: ${Ze.joinValues(t.keys,", ")}`;break;case le.invalid_union:i="Invalid input";break;case le.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${Ze.joinValues(t.options)}`;break;case le.invalid_enum_value:i=`Invalid enum value. Expected ${Ze.joinValues(t.options)}, received '${t.received}'`;break;case le.invalid_arguments:i="Invalid function arguments";break;case le.invalid_return_type:i="Invalid function return type";break;case le.invalid_date:i="Invalid date";break;case le.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(i=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?i=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?i=`Invalid input: must end with "${t.validation.endsWith}"`:Ze.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case le.too_small:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:i="Invalid input";break;case le.too_big:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?i=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:i="Invalid input";break;case le.custom:i="Invalid input";break;case le.invalid_intersection_types:i="Intersection results could not be merged";break;case le.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case le.not_finite:i="Number must be finite";break;default:i=l.defaultError,Ze.assertNever(t)}return{message:i}};let Wb=df;function ev(){return Wb}const tv=t=>{const{data:l,path:i,errorMaps:r,issueData:s}=t,o=[...i,...s.path||[]],f={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let h="";const p=r.filter(m=>!!m).slice().reverse();for(const m of p)h=m(f,{data:l,defaultError:h}).message;return{...s,path:o,message:h}};function oe(t,l){const i=ev(),r=tv({issueData:l,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,i,i===df?void 0:df].filter(s=>!!s)});t.common.issues.push(r)}class It{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(l,i){const r=[];for(const s of i){if(s.status==="aborted")return Ce;s.status==="dirty"&&l.dirty(),r.push(s.value)}return{status:l.value,value:r}}static async mergeObjectAsync(l,i){const r=[];for(const s of i){const o=await s.key,f=await s.value;r.push({key:o,value:f})}return It.mergeObjectSync(l,r)}static mergeObjectSync(l,i){const r={};for(const s of i){const{key:o,value:f}=s;if(o.status==="aborted"||f.status==="aborted")return Ce;o.status==="dirty"&&l.dirty(),f.status==="dirty"&&l.dirty(),o.value!=="__proto__"&&(typeof f.value<"u"||s.alwaysSet)&&(r[o.value]=f.value)}return{status:l.value,value:r}}}const Ce=Object.freeze({status:"aborted"}),hr=t=>({status:"dirty",value:t}),_n=t=>({status:"valid",value:t}),gg=t=>t.status==="aborted",yg=t=>t.status==="dirty",ii=t=>t.status==="valid",Pu=t=>typeof Promise<"u"&&t instanceof Promise;var ge;(function(t){t.errToObj=l=>typeof l=="string"?{message:l}:l||{},t.toString=l=>typeof l=="string"?l:l==null?void 0:l.message})(ge||(ge={}));class Un{constructor(l,i,r,s){this._cachedPath=[],this.parent=l,this.data=i,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const xg=(t,l)=>{if(ii(l))return{success:!0,data:l.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new ol(t.common.issues);return this._error=i,this._error}}};function De(t){if(!t)return{};const{errorMap:l,invalid_type_error:i,required_error:r,description:s}=t;if(l&&(i||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return l?{errorMap:l,description:s}:{errorMap:(f,h)=>{const{message:p}=t;return f.code==="invalid_enum_value"?{message:p??h.defaultError}:typeof h.data>"u"?{message:p??r??h.defaultError}:f.code!=="invalid_type"?{message:h.defaultError}:{message:p??i??h.defaultError}},description:s}}class He{get description(){return this._def.description}_getType(l){return Ul(l.data)}_getOrReturnCtx(l,i){return i||{common:l.parent.common,data:l.data,parsedType:Ul(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}_processInputParams(l){return{status:new It,ctx:{common:l.parent.common,data:l.data,parsedType:Ul(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}}_parseSync(l){const i=this._parse(l);if(Pu(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(l){const i=this._parse(l);return Promise.resolve(i)}parse(l,i){const r=this.safeParse(l,i);if(r.success)return r.data;throw r.error}safeParse(l,i){const r={common:{issues:[],async:(i==null?void 0:i.async)??!1,contextualErrorMap:i==null?void 0:i.errorMap},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Ul(l)},s=this._parseSync({data:l,path:r.path,parent:r});return xg(r,s)}"~validate"(l){var r,s;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Ul(l)};if(!this["~standard"].async)try{const o=this._parseSync({data:l,path:[],parent:i});return ii(o)?{value:o.value}:{issues:i.common.issues}}catch(o){(s=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:l,path:[],parent:i}).then(o=>ii(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(l,i){const r=await this.safeParseAsync(l,i);if(r.success)return r.data;throw r.error}async safeParseAsync(l,i){const r={common:{issues:[],contextualErrorMap:i==null?void 0:i.errorMap,async:!0},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Ul(l)},s=this._parse({data:l,path:r.path,parent:r}),o=await(Pu(s)?s:Promise.resolve(s));return xg(r,o)}refine(l,i){const r=s=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(s):i;return this._refinement((s,o)=>{const f=l(s),h=()=>o.addIssue({code:le.custom,...r(s)});return typeof Promise<"u"&&f instanceof Promise?f.then(p=>p?!0:(h(),!1)):f?!0:(h(),!1)})}refinement(l,i){return this._refinement((r,s)=>l(r)?!0:(s.addIssue(typeof i=="function"?i(r,s):i),!1))}_refinement(l){return new si({schema:this,typeName:_e.ZodEffects,effect:{type:"refinement",refinement:l}})}superRefine(l){return this._refinement(l)}constructor(l){this.spa=this.safeParseAsync,this._def=l,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:i=>this["~validate"](i)}}optional(){return Hl.create(this,this._def)}nullable(){return oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Bn.create(this)}promise(){return ls.create(this,this._def)}or(l){return es.create([this,l],this._def)}and(l){return ts.create(this,l,this._def)}transform(l){return new si({...De(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:l}})}default(l){const i=typeof l=="function"?l:()=>l;return new gf({...De(this._def),innerType:this,defaultValue:i,typeName:_e.ZodDefault})}brand(){return new _v({typeName:_e.ZodBranded,type:this,...De(this._def)})}catch(l){const i=typeof l=="function"?l:()=>l;return new yf({...De(this._def),innerType:this,catchValue:i,typeName:_e.ZodCatch})}describe(l){const i=this.constructor;return new i({...this._def,description:l})}pipe(l){return Bf.create(this,l)}readonly(){return xf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const nv=/^c[^\s-]{8,}$/i,lv=/^[0-9a-z]+$/,av=/^[0-9A-HJKMNP-TV-Z]{26}$/i,iv=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,rv=/^[a-z0-9_-]{21}$/i,uv=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,sv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ov=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Fc;const fv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,dv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,hv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,mv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,pv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,gv=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Dy="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",yv=new RegExp(`^${Dy}$`);function zy(t){let l="[0-5]\\d";t.precision?l=`${l}\\.\\d{${t.precision}}`:t.precision==null&&(l=`${l}(\\.\\d+)?`);const i=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${l})${i}`}function xv(t){return new RegExp(`^${zy(t)}$`)}function bv(t){let l=`${Dy}T${zy(t)}`;const i=[];return i.push(t.local?"Z?":"Z"),t.offset&&i.push("([+-]\\d{2}:?\\d{2})"),l=`${l}(${i.join("|")})`,new RegExp(`^${l}$`)}function vv(t,l){return!!((l==="v4"||!l)&&fv.test(t)||(l==="v6"||!l)&&hv.test(t))}function kv(t,l){if(!uv.test(t))return!1;try{const[i]=t.split(".");if(!i)return!1;const r=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(i.length+(4-i.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||l&&s.alg!==l)}catch{return!1}}function Sv(t,l){return!!((l==="v4"||!l)&&dv.test(t)||(l==="v6"||!l)&&mv.test(t))}class ul extends He{_parse(l){if(this._def.coerce&&(l.data=String(l.data)),this._getType(l)!==de.string){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_type,expected:de.string,received:o.parsedType}),Ce}const r=new It;let s;for(const o of this._def.checks)if(o.kind==="min")l.data.length<o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")l.data.length>o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const f=l.data.length>o.value,h=l.data.length<o.value;(f||h)&&(s=this._getOrReturnCtx(l,s),f?oe(s,{code:le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):h&&oe(s,{code:le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")ov.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"email",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Fc||(Fc=new RegExp(cv,"u")),Fc.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"emoji",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")iv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"uuid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")rv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"nanoid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")nv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"cuid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")lv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"cuid2",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")av.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"ulid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(l.data)}catch{s=this._getOrReturnCtx(l,s),oe(s,{validation:"url",code:le.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"regex",code:le.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?l.data=l.data.trim():o.kind==="includes"?l.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?l.data=l.data.toLowerCase():o.kind==="toUpperCase"?l.data=l.data.toUpperCase():o.kind==="startsWith"?l.data.startsWith(o.value)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?l.data.endsWith(o.value)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?bv(o).test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?yv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?xv(o).test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?sv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"duration",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?vv(l.data,o.version)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"ip",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?kv(l.data,o.alg)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"jwt",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Sv(l.data,o.version)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"cidr",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?pv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"base64",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?gv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"base64url",code:le.invalid_string,message:o.message}),r.dirty()):Ze.assertNever(o);return{status:r.value,value:l.data}}_regex(l,i,r){return this.refinement(s=>l.test(s),{validation:i,code:le.invalid_string,...ge.errToObj(r)})}_addCheck(l){return new ul({...this._def,checks:[...this._def.checks,l]})}email(l){return this._addCheck({kind:"email",...ge.errToObj(l)})}url(l){return this._addCheck({kind:"url",...ge.errToObj(l)})}emoji(l){return this._addCheck({kind:"emoji",...ge.errToObj(l)})}uuid(l){return this._addCheck({kind:"uuid",...ge.errToObj(l)})}nanoid(l){return this._addCheck({kind:"nanoid",...ge.errToObj(l)})}cuid(l){return this._addCheck({kind:"cuid",...ge.errToObj(l)})}cuid2(l){return this._addCheck({kind:"cuid2",...ge.errToObj(l)})}ulid(l){return this._addCheck({kind:"ulid",...ge.errToObj(l)})}base64(l){return this._addCheck({kind:"base64",...ge.errToObj(l)})}base64url(l){return this._addCheck({kind:"base64url",...ge.errToObj(l)})}jwt(l){return this._addCheck({kind:"jwt",...ge.errToObj(l)})}ip(l){return this._addCheck({kind:"ip",...ge.errToObj(l)})}cidr(l){return this._addCheck({kind:"cidr",...ge.errToObj(l)})}datetime(l){return typeof l=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:l}):this._addCheck({kind:"datetime",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,offset:(l==null?void 0:l.offset)??!1,local:(l==null?void 0:l.local)??!1,...ge.errToObj(l==null?void 0:l.message)})}date(l){return this._addCheck({kind:"date",message:l})}time(l){return typeof l=="string"?this._addCheck({kind:"time",precision:null,message:l}):this._addCheck({kind:"time",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,...ge.errToObj(l==null?void 0:l.message)})}duration(l){return this._addCheck({kind:"duration",...ge.errToObj(l)})}regex(l,i){return this._addCheck({kind:"regex",regex:l,...ge.errToObj(i)})}includes(l,i){return this._addCheck({kind:"includes",value:l,position:i==null?void 0:i.position,...ge.errToObj(i==null?void 0:i.message)})}startsWith(l,i){return this._addCheck({kind:"startsWith",value:l,...ge.errToObj(i)})}endsWith(l,i){return this._addCheck({kind:"endsWith",value:l,...ge.errToObj(i)})}min(l,i){return this._addCheck({kind:"min",value:l,...ge.errToObj(i)})}max(l,i){return this._addCheck({kind:"max",value:l,...ge.errToObj(i)})}length(l,i){return this._addCheck({kind:"length",value:l,...ge.errToObj(i)})}nonempty(l){return this.min(1,ge.errToObj(l))}trim(){return new ul({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ul({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ul({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(l=>l.kind==="datetime")}get isDate(){return!!this._def.checks.find(l=>l.kind==="date")}get isTime(){return!!this._def.checks.find(l=>l.kind==="time")}get isDuration(){return!!this._def.checks.find(l=>l.kind==="duration")}get isEmail(){return!!this._def.checks.find(l=>l.kind==="email")}get isURL(){return!!this._def.checks.find(l=>l.kind==="url")}get isEmoji(){return!!this._def.checks.find(l=>l.kind==="emoji")}get isUUID(){return!!this._def.checks.find(l=>l.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(l=>l.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(l=>l.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(l=>l.kind==="cuid2")}get isULID(){return!!this._def.checks.find(l=>l.kind==="ulid")}get isIP(){return!!this._def.checks.find(l=>l.kind==="ip")}get isCIDR(){return!!this._def.checks.find(l=>l.kind==="cidr")}get isBase64(){return!!this._def.checks.find(l=>l.kind==="base64")}get isBase64url(){return!!this._def.checks.find(l=>l.kind==="base64url")}get minLength(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxLength(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}}ul.create=t=>new ul({checks:[],typeName:_e.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...De(t)});function wv(t,l){const i=(t.toString().split(".")[1]||"").length,r=(l.toString().split(".")[1]||"").length,s=i>r?i:r,o=Number.parseInt(t.toFixed(s).replace(".","")),f=Number.parseInt(l.toFixed(s).replace(".",""));return o%f/10**s}class ri extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(l){if(this._def.coerce&&(l.data=Number(l.data)),this._getType(l)!==de.number){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_type,expected:de.number,received:o.parsedType}),Ce}let r;const s=new It;for(const o of this._def.checks)o.kind==="int"?Ze.isInteger(l.data)||(r=this._getOrReturnCtx(l,r),oe(r,{code:le.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?l.data<o.value:l.data<=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?l.data>o.value:l.data>=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?wv(l.data,o.value)!==0&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(l.data)||(r=this._getOrReturnCtx(l,r),oe(r,{code:le.not_finite,message:o.message}),s.dirty()):Ze.assertNever(o);return{status:s.value,value:l.data}}gte(l,i){return this.setLimit("min",l,!0,ge.toString(i))}gt(l,i){return this.setLimit("min",l,!1,ge.toString(i))}lte(l,i){return this.setLimit("max",l,!0,ge.toString(i))}lt(l,i){return this.setLimit("max",l,!1,ge.toString(i))}setLimit(l,i,r,s){return new ri({...this._def,checks:[...this._def.checks,{kind:l,value:i,inclusive:r,message:ge.toString(s)}]})}_addCheck(l){return new ri({...this._def,checks:[...this._def.checks,l]})}int(l){return this._addCheck({kind:"int",message:ge.toString(l)})}positive(l){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ge.toString(l)})}negative(l){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ge.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ge.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ge.toString(l)})}multipleOf(l,i){return this._addCheck({kind:"multipleOf",value:l,message:ge.toString(i)})}finite(l){return this._addCheck({kind:"finite",message:ge.toString(l)})}safe(l){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ge.toString(l)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ge.toString(l)})}get minValue(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxValue(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}get isInt(){return!!this._def.checks.find(l=>l.kind==="int"||l.kind==="multipleOf"&&Ze.isInteger(l.value))}get isFinite(){let l=null,i=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(i===null||r.value>i)&&(i=r.value):r.kind==="max"&&(l===null||r.value<l)&&(l=r.value)}return Number.isFinite(i)&&Number.isFinite(l)}}ri.create=t=>new ri({checks:[],typeName:_e.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...De(t)});class xr extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(l){if(this._def.coerce)try{l.data=BigInt(l.data)}catch{return this._getInvalidInput(l)}if(this._getType(l)!==de.bigint)return this._getInvalidInput(l);let r;const s=new It;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?l.data<o.value:l.data<=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?l.data>o.value:l.data>=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?l.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Ze.assertNever(o);return{status:s.value,value:l.data}}_getInvalidInput(l){const i=this._getOrReturnCtx(l);return oe(i,{code:le.invalid_type,expected:de.bigint,received:i.parsedType}),Ce}gte(l,i){return this.setLimit("min",l,!0,ge.toString(i))}gt(l,i){return this.setLimit("min",l,!1,ge.toString(i))}lte(l,i){return this.setLimit("max",l,!0,ge.toString(i))}lt(l,i){return this.setLimit("max",l,!1,ge.toString(i))}setLimit(l,i,r,s){return new xr({...this._def,checks:[...this._def.checks,{kind:l,value:i,inclusive:r,message:ge.toString(s)}]})}_addCheck(l){return new xr({...this._def,checks:[...this._def.checks,l]})}positive(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ge.toString(l)})}negative(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ge.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ge.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ge.toString(l)})}multipleOf(l,i){return this._addCheck({kind:"multipleOf",value:l,message:ge.toString(i)})}get minValue(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxValue(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}}xr.create=t=>new xr({checks:[],typeName:_e.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...De(t)});class hf extends He{_parse(l){if(this._def.coerce&&(l.data=!!l.data),this._getType(l)!==de.boolean){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:de.boolean,received:r.parsedType}),Ce}return _n(l.data)}}hf.create=t=>new hf({typeName:_e.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...De(t)});class Wu extends He{_parse(l){if(this._def.coerce&&(l.data=new Date(l.data)),this._getType(l)!==de.date){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_type,expected:de.date,received:o.parsedType}),Ce}if(Number.isNaN(l.data.getTime())){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_date}),Ce}const r=new It;let s;for(const o of this._def.checks)o.kind==="min"?l.data.getTime()<o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?l.data.getTime()>o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ze.assertNever(o);return{status:r.value,value:new Date(l.data.getTime())}}_addCheck(l){return new Wu({...this._def,checks:[...this._def.checks,l]})}min(l,i){return this._addCheck({kind:"min",value:l.getTime(),message:ge.toString(i)})}max(l,i){return this._addCheck({kind:"max",value:l.getTime(),message:ge.toString(i)})}get minDate(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l!=null?new Date(l):null}get maxDate(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l!=null?new Date(l):null}}Wu.create=t=>new Wu({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:_e.ZodDate,...De(t)});class bg extends He{_parse(l){if(this._getType(l)!==de.symbol){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:de.symbol,received:r.parsedType}),Ce}return _n(l.data)}}bg.create=t=>new bg({typeName:_e.ZodSymbol,...De(t)});class vg extends He{_parse(l){if(this._getType(l)!==de.undefined){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:de.undefined,received:r.parsedType}),Ce}return _n(l.data)}}vg.create=t=>new vg({typeName:_e.ZodUndefined,...De(t)});class kg extends He{_parse(l){if(this._getType(l)!==de.null){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:de.null,received:r.parsedType}),Ce}return _n(l.data)}}kg.create=t=>new kg({typeName:_e.ZodNull,...De(t)});class Sg extends He{constructor(){super(...arguments),this._any=!0}_parse(l){return _n(l.data)}}Sg.create=t=>new Sg({typeName:_e.ZodAny,...De(t)});class mf extends He{constructor(){super(...arguments),this._unknown=!0}_parse(l){return _n(l.data)}}mf.create=t=>new mf({typeName:_e.ZodUnknown,...De(t)});class ql extends He{_parse(l){const i=this._getOrReturnCtx(l);return oe(i,{code:le.invalid_type,expected:de.never,received:i.parsedType}),Ce}}ql.create=t=>new ql({typeName:_e.ZodNever,...De(t)});class wg extends He{_parse(l){if(this._getType(l)!==de.undefined){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:de.void,received:r.parsedType}),Ce}return _n(l.data)}}wg.create=t=>new wg({typeName:_e.ZodVoid,...De(t)});class Bn extends He{_parse(l){const{ctx:i,status:r}=this._processInputParams(l),s=this._def;if(i.parsedType!==de.array)return oe(i,{code:le.invalid_type,expected:de.array,received:i.parsedType}),Ce;if(s.exactLength!==null){const f=i.data.length>s.exactLength.value,h=i.data.length<s.exactLength.value;(f||h)&&(oe(i,{code:f?le.too_big:le.too_small,minimum:h?s.exactLength.value:void 0,maximum:f?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&i.data.length<s.minLength.value&&(oe(i,{code:le.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&i.data.length>s.maxLength.value&&(oe(i,{code:le.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),i.common.async)return Promise.all([...i.data].map((f,h)=>s.type._parseAsync(new Un(i,f,i.path,h)))).then(f=>It.mergeArray(r,f));const o=[...i.data].map((f,h)=>s.type._parseSync(new Un(i,f,i.path,h)));return It.mergeArray(r,o)}get element(){return this._def.type}min(l,i){return new Bn({...this._def,minLength:{value:l,message:ge.toString(i)}})}max(l,i){return new Bn({...this._def,maxLength:{value:l,message:ge.toString(i)}})}length(l,i){return new Bn({...this._def,exactLength:{value:l,message:ge.toString(i)}})}nonempty(l){return this.min(1,l)}}Bn.create=(t,l)=>new Bn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...De(l)});function ti(t){if(t instanceof vt){const l={};for(const i in t.shape){const r=t.shape[i];l[i]=Hl.create(ti(r))}return new vt({...t._def,shape:()=>l})}else return t instanceof Bn?new Bn({...t._def,type:ti(t.element)}):t instanceof Hl?Hl.create(ti(t.unwrap())):t instanceof oi?oi.create(ti(t.unwrap())):t instanceof ca?ca.create(t.items.map(l=>ti(l))):t}class vt extends He{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const l=this._def.shape(),i=Ze.objectKeys(l);return this._cached={shape:l,keys:i},this._cached}_parse(l){if(this._getType(l)!==de.object){const m=this._getOrReturnCtx(l);return oe(m,{code:le.invalid_type,expected:de.object,received:m.parsedType}),Ce}const{status:r,ctx:s}=this._processInputParams(l),{shape:o,keys:f}=this._getCached(),h=[];if(!(this._def.catchall instanceof ql&&this._def.unknownKeys==="strip"))for(const m in s.data)f.includes(m)||h.push(m);const p=[];for(const m of f){const b=o[m],y=s.data[m];p.push({key:{status:"valid",value:m},value:b._parse(new Un(s,y,s.path,m)),alwaysSet:m in s.data})}if(this._def.catchall instanceof ql){const m=this._def.unknownKeys;if(m==="passthrough")for(const b of h)p.push({key:{status:"valid",value:b},value:{status:"valid",value:s.data[b]}});else if(m==="strict")h.length>0&&(oe(s,{code:le.unrecognized_keys,keys:h}),r.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const b of h){const y=s.data[b];p.push({key:{status:"valid",value:b},value:m._parse(new Un(s,y,s.path,b)),alwaysSet:b in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const m=[];for(const b of p){const y=await b.key,k=await b.value;m.push({key:y,value:k,alwaysSet:b.alwaysSet})}return m}).then(m=>It.mergeObjectSync(r,m)):It.mergeObjectSync(r,p)}get shape(){return this._def.shape()}strict(l){return ge.errToObj,new vt({...this._def,unknownKeys:"strict",...l!==void 0?{errorMap:(i,r)=>{var o,f;const s=((f=(o=this._def).errorMap)==null?void 0:f.call(o,i,r).message)??r.defaultError;return i.code==="unrecognized_keys"?{message:ge.errToObj(l).message??s}:{message:s}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(l){return new vt({...this._def,shape:()=>({...this._def.shape(),...l})})}merge(l){return new vt({unknownKeys:l._def.unknownKeys,catchall:l._def.catchall,shape:()=>({...this._def.shape(),...l._def.shape()}),typeName:_e.ZodObject})}setKey(l,i){return this.augment({[l]:i})}catchall(l){return new vt({...this._def,catchall:l})}pick(l){const i={};for(const r of Ze.objectKeys(l))l[r]&&this.shape[r]&&(i[r]=this.shape[r]);return new vt({...this._def,shape:()=>i})}omit(l){const i={};for(const r of Ze.objectKeys(this.shape))l[r]||(i[r]=this.shape[r]);return new vt({...this._def,shape:()=>i})}deepPartial(){return ti(this)}partial(l){const i={};for(const r of Ze.objectKeys(this.shape)){const s=this.shape[r];l&&!l[r]?i[r]=s:i[r]=s.optional()}return new vt({...this._def,shape:()=>i})}required(l){const i={};for(const r of Ze.objectKeys(this.shape))if(l&&!l[r])i[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Hl;)o=o._def.innerType;i[r]=o}return new vt({...this._def,shape:()=>i})}keyof(){return Oy(Ze.objectKeys(this.shape))}}vt.create=(t,l)=>new vt({shape:()=>t,unknownKeys:"strip",catchall:ql.create(),typeName:_e.ZodObject,...De(l)});vt.strictCreate=(t,l)=>new vt({shape:()=>t,unknownKeys:"strict",catchall:ql.create(),typeName:_e.ZodObject,...De(l)});vt.lazycreate=(t,l)=>new vt({shape:t,unknownKeys:"strip",catchall:ql.create(),typeName:_e.ZodObject,...De(l)});class es extends He{_parse(l){const{ctx:i}=this._processInputParams(l),r=this._def.options;function s(o){for(const h of o)if(h.result.status==="valid")return h.result;for(const h of o)if(h.result.status==="dirty")return i.common.issues.push(...h.ctx.common.issues),h.result;const f=o.map(h=>new ol(h.ctx.common.issues));return oe(i,{code:le.invalid_union,unionErrors:f}),Ce}if(i.common.async)return Promise.all(r.map(async o=>{const f={...i,common:{...i.common,issues:[]},parent:null};return{result:await o._parseAsync({data:i.data,path:i.path,parent:f}),ctx:f}})).then(s);{let o;const f=[];for(const p of r){const m={...i,common:{...i.common,issues:[]},parent:null},b=p._parseSync({data:i.data,path:i.path,parent:m});if(b.status==="valid")return b;b.status==="dirty"&&!o&&(o={result:b,ctx:m}),m.common.issues.length&&f.push(m.common.issues)}if(o)return i.common.issues.push(...o.ctx.common.issues),o.result;const h=f.map(p=>new ol(p));return oe(i,{code:le.invalid_union,unionErrors:h}),Ce}}get options(){return this._def.options}}es.create=(t,l)=>new es({options:t,typeName:_e.ZodUnion,...De(l)});function pf(t,l){const i=Ul(t),r=Ul(l);if(t===l)return{valid:!0,data:t};if(i===de.object&&r===de.object){const s=Ze.objectKeys(l),o=Ze.objectKeys(t).filter(h=>s.indexOf(h)!==-1),f={...t,...l};for(const h of o){const p=pf(t[h],l[h]);if(!p.valid)return{valid:!1};f[h]=p.data}return{valid:!0,data:f}}else if(i===de.array&&r===de.array){if(t.length!==l.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const f=t[o],h=l[o],p=pf(f,h);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return i===de.date&&r===de.date&&+t==+l?{valid:!0,data:t}:{valid:!1}}class ts extends He{_parse(l){const{status:i,ctx:r}=this._processInputParams(l),s=(o,f)=>{if(gg(o)||gg(f))return Ce;const h=pf(o.value,f.value);return h.valid?((yg(o)||yg(f))&&i.dirty(),{status:i.value,value:h.data}):(oe(r,{code:le.invalid_intersection_types}),Ce)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,f])=>s(o,f)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ts.create=(t,l,i)=>new ts({left:t,right:l,typeName:_e.ZodIntersection,...De(i)});class ca extends He{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==de.array)return oe(r,{code:le.invalid_type,expected:de.array,received:r.parsedType}),Ce;if(r.data.length<this._def.items.length)return oe(r,{code:le.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:le.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const o=[...r.data].map((f,h)=>{const p=this._def.items[h]||this._def.rest;return p?p._parse(new Un(r,f,r.path,h)):null}).filter(f=>!!f);return r.common.async?Promise.all(o).then(f=>It.mergeArray(i,f)):It.mergeArray(i,o)}get items(){return this._def.items}rest(l){return new ca({...this._def,rest:l})}}ca.create=(t,l)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ca({items:t,typeName:_e.ZodTuple,rest:null,...De(l)})};class ns extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==de.object)return oe(r,{code:le.invalid_type,expected:de.object,received:r.parsedType}),Ce;const s=[],o=this._def.keyType,f=this._def.valueType;for(const h in r.data)s.push({key:o._parse(new Un(r,h,r.path,h)),value:f._parse(new Un(r,r.data[h],r.path,h)),alwaysSet:h in r.data});return r.common.async?It.mergeObjectAsync(i,s):It.mergeObjectSync(i,s)}get element(){return this._def.valueType}static create(l,i,r){return i instanceof He?new ns({keyType:l,valueType:i,typeName:_e.ZodRecord,...De(r)}):new ns({keyType:ul.create(),valueType:l,typeName:_e.ZodRecord,...De(i)})}}class _g extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==de.map)return oe(r,{code:le.invalid_type,expected:de.map,received:r.parsedType}),Ce;const s=this._def.keyType,o=this._def.valueType,f=[...r.data.entries()].map(([h,p],m)=>({key:s._parse(new Un(r,h,r.path,[m,"key"])),value:o._parse(new Un(r,p,r.path,[m,"value"]))}));if(r.common.async){const h=new Map;return Promise.resolve().then(async()=>{for(const p of f){const m=await p.key,b=await p.value;if(m.status==="aborted"||b.status==="aborted")return Ce;(m.status==="dirty"||b.status==="dirty")&&i.dirty(),h.set(m.value,b.value)}return{status:i.value,value:h}})}else{const h=new Map;for(const p of f){const m=p.key,b=p.value;if(m.status==="aborted"||b.status==="aborted")return Ce;(m.status==="dirty"||b.status==="dirty")&&i.dirty(),h.set(m.value,b.value)}return{status:i.value,value:h}}}}_g.create=(t,l,i)=>new _g({valueType:l,keyType:t,typeName:_e.ZodMap,...De(i)});class br extends He{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==de.set)return oe(r,{code:le.invalid_type,expected:de.set,received:r.parsedType}),Ce;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(oe(r,{code:le.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),i.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(oe(r,{code:le.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),i.dirty());const o=this._def.valueType;function f(p){const m=new Set;for(const b of p){if(b.status==="aborted")return Ce;b.status==="dirty"&&i.dirty(),m.add(b.value)}return{status:i.value,value:m}}const h=[...r.data.values()].map((p,m)=>o._parse(new Un(r,p,r.path,m)));return r.common.async?Promise.all(h).then(p=>f(p)):f(h)}min(l,i){return new br({...this._def,minSize:{value:l,message:ge.toString(i)}})}max(l,i){return new br({...this._def,maxSize:{value:l,message:ge.toString(i)}})}size(l,i){return this.min(l,i).max(l,i)}nonempty(l){return this.min(1,l)}}br.create=(t,l)=>new br({valueType:t,minSize:null,maxSize:null,typeName:_e.ZodSet,...De(l)});class Eg extends He{get schema(){return this._def.getter()}_parse(l){const{ctx:i}=this._processInputParams(l);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}Eg.create=(t,l)=>new Eg({getter:t,typeName:_e.ZodLazy,...De(l)});class Cg extends He{_parse(l){if(l.data!==this._def.value){const i=this._getOrReturnCtx(l);return oe(i,{received:i.data,code:le.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:l.data}}get value(){return this._def.value}}Cg.create=(t,l)=>new Cg({value:t,typeName:_e.ZodLiteral,...De(l)});function Oy(t,l){return new ui({values:t,typeName:_e.ZodEnum,...De(l)})}class ui extends He{_parse(l){if(typeof l.data!="string"){const i=this._getOrReturnCtx(l),r=this._def.values;return oe(i,{expected:Ze.joinValues(r),received:i.parsedType,code:le.invalid_type}),Ce}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(l.data)){const i=this._getOrReturnCtx(l),r=this._def.values;return oe(i,{received:i.data,code:le.invalid_enum_value,options:r}),Ce}return _n(l.data)}get options(){return this._def.values}get enum(){const l={};for(const i of this._def.values)l[i]=i;return l}get Values(){const l={};for(const i of this._def.values)l[i]=i;return l}get Enum(){const l={};for(const i of this._def.values)l[i]=i;return l}extract(l,i=this._def){return ui.create(l,{...this._def,...i})}exclude(l,i=this._def){return ui.create(this.options.filter(r=>!l.includes(r)),{...this._def,...i})}}ui.create=Oy;class Ag extends He{_parse(l){const i=Ze.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(l);if(r.parsedType!==de.string&&r.parsedType!==de.number){const s=Ze.objectValues(i);return oe(r,{expected:Ze.joinValues(s),received:r.parsedType,code:le.invalid_type}),Ce}if(this._cache||(this._cache=new Set(Ze.getValidEnumValues(this._def.values))),!this._cache.has(l.data)){const s=Ze.objectValues(i);return oe(r,{received:r.data,code:le.invalid_enum_value,options:s}),Ce}return _n(l.data)}get enum(){return this._def.values}}Ag.create=(t,l)=>new Ag({values:t,typeName:_e.ZodNativeEnum,...De(l)});class ls extends He{unwrap(){return this._def.type}_parse(l){const{ctx:i}=this._processInputParams(l);if(i.parsedType!==de.promise&&i.common.async===!1)return oe(i,{code:le.invalid_type,expected:de.promise,received:i.parsedType}),Ce;const r=i.parsedType===de.promise?i.data:Promise.resolve(i.data);return _n(r.then(s=>this._def.type.parseAsync(s,{path:i.path,errorMap:i.common.contextualErrorMap})))}}ls.create=(t,l)=>new ls({type:t,typeName:_e.ZodPromise,...De(l)});class si extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(l){const{status:i,ctx:r}=this._processInputParams(l),s=this._def.effect||null,o={addIssue:f=>{oe(r,f),f.fatal?i.abort():i.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const f=s.transform(r.data,o);if(r.common.async)return Promise.resolve(f).then(async h=>{if(i.value==="aborted")return Ce;const p=await this._def.schema._parseAsync({data:h,path:r.path,parent:r});return p.status==="aborted"?Ce:p.status==="dirty"||i.value==="dirty"?hr(p.value):p});{if(i.value==="aborted")return Ce;const h=this._def.schema._parseSync({data:f,path:r.path,parent:r});return h.status==="aborted"?Ce:h.status==="dirty"||i.value==="dirty"?hr(h.value):h}}if(s.type==="refinement"){const f=h=>{const p=s.refinement(h,o);if(r.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(r.common.async===!1){const h=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return h.status==="aborted"?Ce:(h.status==="dirty"&&i.dirty(),f(h.value),{status:i.value,value:h.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(h=>h.status==="aborted"?Ce:(h.status==="dirty"&&i.dirty(),f(h.value).then(()=>({status:i.value,value:h.value}))))}if(s.type==="transform")if(r.common.async===!1){const f=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ii(f))return Ce;const h=s.transform(f.value,o);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:h}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(f=>ii(f)?Promise.resolve(s.transform(f.value,o)).then(h=>({status:i.value,value:h})):Ce);Ze.assertNever(s)}}si.create=(t,l,i)=>new si({schema:t,typeName:_e.ZodEffects,effect:l,...De(i)});si.createWithPreprocess=(t,l,i)=>new si({schema:l,effect:{type:"preprocess",transform:t},typeName:_e.ZodEffects,...De(i)});class Hl extends He{_parse(l){return this._getType(l)===de.undefined?_n(void 0):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}Hl.create=(t,l)=>new Hl({innerType:t,typeName:_e.ZodOptional,...De(l)});class oi extends He{_parse(l){return this._getType(l)===de.null?_n(null):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}oi.create=(t,l)=>new oi({innerType:t,typeName:_e.ZodNullable,...De(l)});class gf extends He{_parse(l){const{ctx:i}=this._processInputParams(l);let r=i.data;return i.parsedType===de.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}gf.create=(t,l)=>new gf({innerType:t,typeName:_e.ZodDefault,defaultValue:typeof l.default=="function"?l.default:()=>l.default,...De(l)});class yf extends He{_parse(l){const{ctx:i}=this._processInputParams(l),r={...i,common:{...i.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Pu(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ol(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new ol(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}yf.create=(t,l)=>new yf({innerType:t,typeName:_e.ZodCatch,catchValue:typeof l.catch=="function"?l.catch:()=>l.catch,...De(l)});class Ng extends He{_parse(l){if(this._getType(l)!==de.nan){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:de.nan,received:r.parsedType}),Ce}return{status:"valid",value:l.data}}}Ng.create=t=>new Ng({typeName:_e.ZodNaN,...De(t)});class _v extends He{_parse(l){const{ctx:i}=this._processInputParams(l),r=i.data;return this._def.type._parse({data:r,path:i.path,parent:i})}unwrap(){return this._def.type}}class Bf extends He{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ce:o.status==="dirty"?(i.dirty(),hr(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ce:s.status==="dirty"?(i.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(l,i){return new Bf({in:l,out:i,typeName:_e.ZodPipeline})}}class xf extends He{_parse(l){const i=this._def.innerType._parse(l),r=s=>(ii(s)&&(s.value=Object.freeze(s.value)),s);return Pu(i)?i.then(s=>r(s)):r(i)}unwrap(){return this._def.innerType}}xf.create=(t,l)=>new xf({innerType:t,typeName:_e.ZodReadonly,...De(l)});var _e;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(_e||(_e={}));const B=ul.create,Ke=ri.create,Dt=hf.create,My=mf.create;ql.create;const st=Bn.create,xe=vt.create;es.create;ts.create;ca.create;const as=ns.create,Et=ui.create;ls.create;Hl.create;oi.create;const Hn=Et(["claude_code","cursor_local"]),Yt=xe({maxTurns:Ke().positive().nullable().optional(),maxBudgetUsd:Ke().positive().nullable().optional()}),Uf=xe({plan:Yt.optional(),execute:Yt.optional(),reflect:Yt.optional()});function Ev(t){if(!(t!=null&&t.trim()))return null;try{const l=Yt.parse(JSON.parse(t));return l.maxTurns==null&&l.maxBudgetUsd==null?null:l}catch{return null}}function Cv(t){if(!(t!=null&&t.trim()))return{};try{const l=JSON.parse(t);return l&&typeof l=="object"&&!("plan"in l)&&!("execute"in l)&&!("reflect"in l)&&("maxTurns"in l||"maxBudgetUsd"in l)?{execute:Yt.parse({maxTurns:l.maxTurns??null,maxBudgetUsd:l.maxBudgetUsd??null})}:Uf.parse(l)}catch{return{}}}const Av="00000000-0000-4000-a000-000000000001",is="auto",Nv=xe({code:Et(["cli_missing","runtime_auth","deck_offline","workspace_missing","mcp_not_registered"]),message:B()}),jv=xe({id:B().uuid(),name:B(),runtime:Hn,workspaceRoot:B().nullable(),deckId:B().uuid().nullable(),deckName:B().nullable(),playbookId:B().nullable(),defaultPlanModel:B().nullable(),defaultExecuteModel:B().nullable(),defaultPlanBudgetJson:B().nullable(),defaultExecuteBudgetJson:B().nullable(),isBuiltin:Dt(),createdAt:B(),updatedAt:B()}),Ry=jv.extend({healthy:Dt(),issues:st(Nv)});xe({name:B().min(1),runtime:Hn,workspaceRoot:B().min(1),deckId:B().uuid().optional(),playbookId:B().optional(),defaultPlanModel:B().nullable().optional(),defaultExecuteModel:B().nullable().optional(),defaultPlanBudget:Yt.nullable().optional(),defaultExecuteBudget:Yt.nullable().optional()});xe({name:B().min(1).optional(),runtime:Hn.optional(),workspaceRoot:B().nullable().optional(),deckId:B().uuid().nullable().optional(),playbookId:B().nullable().optional(),defaultPlanModel:B().nullable().optional(),defaultExecuteModel:B().nullable().optional(),defaultPlanBudget:Yt.nullable().optional(),defaultExecuteBudget:Yt.nullable().optional()});xe({agents:st(Ry),issueCount:Ke()});function Tv(t){if(!(t!=null&&t.trim()))return{detected:!1};const l=t.match(/\*\*Blocker:\*\*\s*([^\n]+)/i);if(l)return{detected:!0,summary:l[1].trim()};const i=t.match(/^Blocker:\s*([^\n]+)/im);return i?{detected:!0,summary:i[1].trim()}:[/can't complete the deliverable/i,/cannot complete the deliverable/i,/needs explicit approval/i,/permission grant i can't obtain/i,/no prompt available in this session/i,/were both blocked/i,/without that permission being pre-approved/i,/can't obtain \(no prompt available/i].some(s=>s.test(t))?{detected:!0,summary:(t.trim().split(/\n/)[0]??"Execution blocked").slice(0,220)}:{detected:!1}}function Ly(t){var i,r,s;if((i=t.blocker)!=null&&i.summary)return{detected:!0,summary:t.blocker.summary};const l=Tv(t.resultText);return l.detected?l:t.isError||t.exitCode!==0?{detected:!0,summary:((s=(r=t.resultText)==null?void 0:r.trim().split(/\n/)[0])==null?void 0:s.slice(0,220))||(t.exitCode!==0?`Process exited with code ${t.exitCode}`:"Agent reported an error")}:{detected:!1}}const Dv=xe({label:B().min(1).max(60),description:B().max(200).optional()}),By=xe({id:B().regex(/^q\d+$/),question:B().min(1).max(300),options:st(Dv).min(2).max(4)}),Uy=Et(["trivial","needs_review"]);xe({verdict:Uy,rationale:B().min(1).max(300),questions:st(By).max(3).default([])}).refine(t=>t.verdict!=="trivial"||t.questions.length===0,{message:"trivial verdict cannot carry questions"});xe({verdict:Uy,rationale:B(),questions:st(By),sessionId:B().optional(),parseFallback:Dt(),consumed:Dt().default(!1)});const Hy=xe({questionId:B(),selectedLabel:B().max(60).optional(),freeText:B().min(1).max(2e3).optional()}).refine(t=>t.selectedLabel?!t.freeText:!!t.freeText,{message:"Provide exactly one of selectedLabel or freeText"});xe({answers:st(Hy).min(1),executeModel:B().nullable().optional(),executeBudget:Yt.nullable().optional()});xe({answers:st(Hy),outcome:Et(["approved","redraft"]),answeredAt:B()});const zv=Et(["slack_message","email"]),Ov=xe({target:B().min(1).max(120),body:B().min(1).max(4e3)}),Mv=xe({serviceName:B().min(1).max(120),toolName:B().min(1).max(120),arguments:as(My())}),Rv=xe({actionType:zv,summary:Ov,toolCall:Mv}),Lv=Et(["pending","sent","rejected"]);xe({draft:Rv,status:Lv,sentAt:B().optional(),rejectedAt:B().optional(),bodyMismatch:Dt().optional()});xe({draftArtifactId:B().uuid(),sentAt:B(),toolResult:as(My()),permalink:B().url().optional()});const Bv=Et(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),qy=Et(["code","communication","email","research","content","other"]),Uv=Et(["task_snapshot","draft_plan","approved_plan","plan_triage","plan_answers","acceptance_criteria","transcript","stream_trace","usage","agent_session","execution_result","diff","pr","email_draft","slack_draft","document","research_brief","deliverable","feedback","playbook_patch","reflect_status","linear_sync","send_receipt"]),ds=Et(["plan","execute","reflect"]),Hv=Et(["proposed","applied","dismissed"]),Vy=Et(["retry","approve"]);xe({playbookId:B(),playbookTitle:B().optional(),previousBody:B(),proposedBody:B(),rationale:B(),status:Hv,trigger:Vy,appliedAt:B().optional()});xe({status:Et(["pending","completed","failed","skipped"]),trigger:Vy,error:B().optional()});const qv=xe({type:Et(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:B(),toolName:B().optional()});xe({phase:ds,runtime:Hn,entries:st(qv)});const Vv=xe({phase:ds,runtime:Hn,totalCostUsd:Ke().optional(),inputTokens:Ke().optional(),outputTokens:Ke().optional(),cacheReadTokens:Ke().optional(),cacheWriteTokens:Ke().optional(),durationMs:Ke().optional(),model:B().optional(),numTurns:Ke().optional(),maxTurns:Ke().optional(),maxBudgetUsd:Ke().optional()}),Yv=xe({label:B(),usage:Vv,maxTurns:Ke().optional(),maxBudgetUsd:Ke().optional()});xe({lines:st(Yv),total:xe({totalCostUsd:Ke(),inputTokens:Ke(),outputTokens:Ke(),durationMs:Ke(),numTurns:Ke()})});xe({phase:ds,runtime:Hn,sessionId:B()});xe({phase:ds,exitCode:Ke(),resultText:B().optional(),isError:Dt().optional(),blocker:xe({summary:B().optional()}).optional()});xe({path:B(),title:B(),markdown:B()});xe({markdown:B(),sessionId:B().optional()});const Iv=Et(["manual","linear"]);xe({id:B(),title:B(),description:B().optional(),url:B().optional()});const rl=xe({id:B().uuid(),source:Iv,externalId:B().nullable(),externalLabel:B().nullable(),taskCategory:qy,title:B(),description:B().nullable(),repo:B().nullable(),artifactWorkspace:B().nullable(),agentId:B().uuid().nullable(),agentName:B().nullable(),deckId:B().nullable(),deckName:B().nullable(),playbookId:B().nullable(),runtime:Hn.nullable(),planModel:B().nullable(),executeModel:B().nullable(),status:Bv,lineageId:B().uuid().nullable(),acceptanceCriteria:B().nullable(),approvalGatesJson:B().nullable(),budgetJson:B().nullable(),createdAt:B(),updatedAt:B()});xe({id:B().uuid(),runId:B().uuid(),kind:Uv,contentJson:B().nullable(),blobPath:B().nullable(),author:Et(["human","agent","system"]),createdAt:B()});xe({id:B().uuid(),runId:B().uuid(),type:B(),payloadJson:B().nullable(),ts:B()});xe({title:B().min(1),description:B().optional(),taskCategory:qy.default("other"),repo:B().optional(),artifactWorkspace:B().optional(),acceptanceCriteria:B().optional(),status:Et(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:B().uuid(),planModel:B().nullable().optional(),executeModel:B().nullable().optional(),budget:Uf.optional()});xe({runtime:Hn,deckId:B().uuid().optional(),playbookId:B().optional(),planModel:B().nullable().optional(),executeModel:B().nullable().optional(),budget:Uf.optional()});xe({planMarkdown:B(),approve:Dt().default(!1),planModel:B().nullable().optional(),executeModel:B().nullable().optional(),planBudget:Yt.nullable().optional(),executeBudget:Yt.nullable().optional()});xe({runtime:Hn.optional(),deckId:B().uuid().optional(),playbookId:B().optional(),executeModel:B().nullable().optional(),executeBudget:Yt.nullable().optional()});xe({feedback:B().min(1),planModel:B().nullable().optional(),executeModel:B().nullable().optional(),executeBudget:Yt.nullable().optional()});xe({id:B(),identifier:B(),title:B(),description:B().optional(),url:B(),state:B().optional(),labels:st(B()).optional(),teamId:B().optional()});const Zv=xe({label:B().min(1),agentId:B().uuid()}),bf=xe({stateFilter:st(B()),teamId:B().nullable(),assigneeMe:Dt(),defaultAgentId:B().uuid().nullable(),syncEnabled:Dt(),routingRules:st(Zv)});bf.extend({persisted:bf,envOverrides:xe({stateFilter:Dt(),teamId:Dt()})});bf.partial();xe({connected:Dt(),viewer:xe({id:B(),name:B(),email:B().optional()}).optional(),error:B().optional()});xe({agentId:B().uuid(),reason:B()});xe({host:B(),port:Ke().int().min(1).max(65535),envOverride:Dt()});xe({host:B().min(1).optional(),port:Ke().int().min(1).max(65535).optional()});xe({connected:Dt(),apiUrl:B(),mcpUrl:B(),deckCount:Ke().optional(),envOverride:Dt(),error:B().optional()});xe({agentId:B().uuid().optional(),autoAgent:Dt().optional(),planModel:B().nullable().optional()}).refine(t=>t.agentId!==void 0||t.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});xe({planModel:B().nullable().optional(),planBudget:Yt.nullable().optional()});const Fv=xe({id:B(),label:B()});xe({runtime:Hn,models:st(Fv),source:Et(["live","fallback"])});xe({planReviewCount:Ke(),resultReviewCount:Ke(),maxConcurrent:Ke(),planningActiveRuns:st(rl),planningQueuedRuns:st(rl),runningRuns:st(rl),waitingExecution:st(rl),resultReviewRuns:st(rl),recentDone:st(rl),awaitingPlanReview:st(rl),awaitingAnswerRuns:st(rl),openQuestionCounts:as(B(),Ke()),pendingSendCounts:as(B(),Ke()),sentRunIds:st(B()).optional(),autoApprovedRunIds:st(B()),runs:st(rl),agentDeckOnline:Dt(),agents:st(Ry),agentIssueCount:Ke()});function Qv(t){return t||is}function Hf({runtime:t,label:l,value:i,onChange:r,defaultModelId:s,disabled:o,compact:f}){const h=ff(t),[p,m]=Z.useState((h==null?void 0:h.models)??[]),[b,y]=Z.useState((h==null?void 0:h.source)??"fallback"),[k,v]=Z.useState(!h);Z.useEffect(()=>{const H=ff(t);if(H){m(H.models),y(H.source),v(!1);return}v(!0),Qb(t).then(T=>{m(T.models),y(T.source)}).catch(()=>m([])).finally(()=>v(!1))},[t]);const _=Z.useMemo(()=>{var H,T;if(t==="cursor_local"){const Y=Qv(s);return((H=p.find(q=>q.id===Y))==null?void 0:H.label)??"Auto (subscription pool)"}return s?((T=p.find(Y=>Y.id===s))==null?void 0:T.label)??s:"runtime default"},[t,s,p]),M=t==="cursor_local"?k?"Loading models…":`Agent default (${_})`:k?"Loading models…":`Default (${_})`;return g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:l}),g.jsxs("select",{className:"field text-sm",disabled:o||k,value:i,onChange:H=>r(H.target.value),children:[g.jsx("option",{value:"",children:M}),p.map(H=>g.jsx("option",{value:H.id,children:H.label},H.id))]}),t==="cursor_local"&&!k&&!f&&g.jsx("p",{className:"text-xs text-white/40",children:"Auto and Composer use your Cursor subscription pool. Other models draw API credits."}),b==="fallback"&&p.length>0&&!k&&t==="cursor_local"&&!f&&g.jsx("p",{className:"text-xs text-white/40",children:"Run cursor agent login to load the full model list."})]})}function ci({phase:t,runtime:l,model:i,onModelChange:r,budget:s,onBudgetChange:o,defaultModelId:f,disabled:h,showHint:p=!0}){const m=b=>o({...s,...b});return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"text-xs uppercase tracking-wide text-[#92E4DD]",children:t}),g.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[g.jsx(Hf,{runtime:l,label:"Model",value:i,onChange:r,defaultModelId:f,disabled:h,compact:!0}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Turns"}),g.jsx("input",{className:"field text-sm w-full",type:"number",min:1,step:1,placeholder:"Default",disabled:h,value:s.maxTurns,onChange:b=>m({maxTurns:b.target.value})})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max USD"}),g.jsx("input",{className:"field text-sm w-full",type:"number",min:.01,step:.01,placeholder:"Default",disabled:h,value:s.maxBudgetUsd,onChange:b=>m({maxBudgetUsd:b.target.value})})]})]}),p&&g.jsx("p",{className:"text-xs text-white/40",children:"Blank turns or USD = runtime default (no cap)."})]})}function jg({value:t,onChange:l,agentDeckOnline:i,disabled:r}){const[s,o]=Z.useState([]),[f,h]=Z.useState([]);Z.useEffect(()=>{Xb().then(o).catch(()=>o([]))},[]),Z.useEffect(()=>{if(!t.deckId){h([]);return}Jb(t.deckId).then(h).catch(()=>h([]))},[t.deckId]);const p=m=>l({...t,...m});return g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"text-base uppercase tracking-wide text-[#92E4DD]",children:"Agent"}),g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Runtime (required)"}),g.jsxs("select",{className:"field",disabled:r,value:t.runtime,onChange:m=>{const b=m.target.value;p({runtime:b,...b==="cursor_local"?{defaultPlanModel:is,defaultExecuteModel:is}:{defaultPlanModel:"",defaultExecuteModel:""}})},children:[g.jsx("option",{value:"claude_code",children:"Claude Code (claude -p)"}),g.jsx("option",{value:"cursor_local",children:"Cursor local (cursor agent -p)"})]}),g.jsx(ci,{phase:"Plan",runtime:t.runtime,model:t.defaultPlanModel,onModelChange:m=>p({defaultPlanModel:m}),budget:t.defaultPlanBudget,onBudgetChange:m=>p({defaultPlanBudget:m}),disabled:r,showHint:!1}),g.jsx(ci,{phase:"Execution",runtime:t.runtime,model:t.defaultExecuteModel,onModelChange:m=>p({defaultExecuteModel:m}),budget:t.defaultExecuteBudget,onBudgetChange:m=>p({defaultExecuteBudget:m}),disabled:r}),g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Agent Deck (optional)"}),g.jsxs("select",{className:"field",disabled:r||!i,value:t.deckId,onChange:m=>p({deckId:m.target.value,playbookId:""}),children:[g.jsx("option",{value:"",children:i?"No deck — degraded mode":"Agent Deck offline"}),s.map(m=>g.jsxs("option",{value:m.id,children:["◆ ",m.name]},m.id))]}),t.deckId&&f.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Playbook (optional)"}),g.jsxs("select",{className:"field",disabled:r,value:t.playbookId,onChange:m=>p({playbookId:m.target.value}),children:[g.jsx("option",{value:"",children:"No playbook — agent uses task + plan only"}),f.map(m=>g.jsx("option",{value:m.id,children:m.title},m.id))]})]}),!t.deckId&&t.runtime&&g.jsx("p",{className:"text-xs text-white/45",children:"Degraded mode: no deck MCP. Audit trail still captured."})]})}function hs(t){if(t.agentName){const i=[t.agentName];return(t.deckName||t.deckId)&&i.push(`◆ ${t.deckName??t.deckId}`),t.planModel&&i.push(`plan:${t.planModel}`),t.executeModel&&i.push(`exec:${t.executeModel}`),i.join(" · ")}const l=[t.runtime??"no runtime"];return(t.deckName||t.deckId)&&l.push(`◆ ${t.deckName??t.deckId}`),t.playbookId&&l.push(`pb:${t.playbookId.slice(0,8)}…`),t.planModel&&l.push(`plan:${t.planModel}`),t.executeModel&&l.push(`exec:${t.executeModel}`),l.join(" · ")}function ms({trace:t,label:l,showHeading:i=!0}){var r;return(r=t==null?void 0:t.entries)!=null&&r.length?g.jsxs("section",{className:"space-y-2",children:[i&&g.jsx("div",{className:"heading-section",children:l??"Reasoning trace"}),g.jsx("div",{className:"space-y-1 max-h-72 overflow-y-auto border border-white/10 rounded p-2 bg-black/20",children:t.entries.map((s,o)=>g.jsxs("div",{className:"text-sm font-mono",children:[g.jsx("span",{className:s.type==="human"?"text-[#C4B643]":s.type==="context"?"text-white/50":"text-[#92E4DD]",children:s.type}),s.toolName&&g.jsxs("span",{className:"text-white/40",children:[" · ",s.toolName]}),g.jsx("div",{className:"text-white/70 whitespace-pre-wrap mt-0.5",children:s.text})]},o))})]}):null}function Yy(t,l){return l!=null&&t>=l}function Gv({used:t,max:l}){const i=Yy(t,l),r=l!=null?`${t} / ${l} turn${l===1?"":"s"}`:`${t} turn${t===1?"":"s"}`;return g.jsx("span",{className:i?"text-red-400 font-bold":void 0,children:r})}function Xv({used:t,max:l}){const i=Yy(t,l),r=l!=null?`$${t.toFixed(4)} / $${l.toFixed(2)}`:`$${t.toFixed(4)}`;return g.jsx("span",{className:i?"text-red-400 font-bold":void 0,children:r})}function Jv({line:t}){const{usage:l,maxTurns:i,maxBudgetUsd:r}=t,s=[];return l.model&&s.push(`model ${l.model}`),l.numTurns!=null&&s.push(g.jsx(Gv,{used:l.numTurns,max:i},"turns")),l.totalCostUsd!=null&&s.push(g.jsx(Xv,{used:l.totalCostUsd,max:r},"usd")),l.inputTokens!=null&&s.push(`${l.inputTokens} in`),l.outputTokens!=null&&s.push(`${l.outputTokens} out`),l.durationMs!=null&&s.push(Ny(l.durationMs)),g.jsx(g.Fragment,{children:s.map((o,f)=>g.jsxs("span",{children:[f>0&&" · ",o]},f))})}function ps({summary:t}){if(!(t!=null&&t.lines.length))return null;const l=t.lines.length>1;return g.jsxs("section",{className:"space-y-1.5",children:[g.jsx("div",{className:"heading-section",children:"Usage"}),t.lines.map((i,r)=>g.jsxs("p",{className:"text-sm text-white/50 font-mono",children:[g.jsxs("span",{className:"text-white/65",children:[i.label,":"]})," ",g.jsx(Jv,{line:i})]},r)),l&&g.jsxs("p",{className:"text-sm text-[#92E4DD]/85 font-mono pt-1 border-t border-white/10",children:[g.jsx("span",{className:"text-white/65",children:"total:"})," ",[t.total.numTurns>0&&`${t.total.numTurns} turn${t.total.numTurns===1?"":"s"}`,t.total.totalCostUsd>0&&`$${t.total.totalCostUsd.toFixed(4)}`,t.total.inputTokens>0&&`${t.total.inputTokens} in`,t.total.outputTokens>0&&`${t.total.outputTokens} out`,t.total.durationMs>0&&Ny(t.total.durationMs)].filter(Boolean).join(" · ")]})]})}function Kv(t,l){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const $v=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wv={};function Tg(t,l){return(Wv.jsx?Pv:$v).test(t)}const e2=/[ \t\n\f\r]/g;function t2(t){return typeof t=="object"?t.type==="text"?Dg(t.value):!1:Dg(t)}function Dg(t){return t.replace(e2,"")===""}class wr{constructor(l,i,r){this.normal=i,this.property=l,r&&(this.space=r)}}wr.prototype.normal={};wr.prototype.property={};wr.prototype.space=void 0;function Iy(t,l){const i={},r={};for(const s of t)Object.assign(i,s.property),Object.assign(r,s.normal);return new wr(i,r,l)}function vf(t){return t.toLowerCase()}class Wt{constructor(l,i){this.attribute=i,this.property=l}}Wt.prototype.attribute="";Wt.prototype.booleanish=!1;Wt.prototype.boolean=!1;Wt.prototype.commaOrSpaceSeparated=!1;Wt.prototype.commaSeparated=!1;Wt.prototype.defined=!1;Wt.prototype.mustUseProperty=!1;Wt.prototype.number=!1;Wt.prototype.overloadedBoolean=!1;Wt.prototype.property="";Wt.prototype.spaceSeparated=!1;Wt.prototype.space=void 0;let n2=0;const Ee=da(),bt=da(),kf=da(),ne=da(),lt=da(),sa=da(),on=da();function da(){return 2**++n2}const Sf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:bt,commaOrSpaceSeparated:on,commaSeparated:sa,number:ne,overloadedBoolean:kf,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Qc=Object.keys(Sf);class qf extends Wt{constructor(l,i,r,s){let o=-1;if(super(l,i),zg(this,"space",s),typeof r=="number")for(;++o<Qc.length;){const f=Qc[o];zg(this,Qc[o],(r&Sf[f])===Sf[f])}}}qf.prototype.defined=!0;function zg(t,l,i){i&&(t[l]=i)}function hi(t){const l={},i={};for(const[r,s]of Object.entries(t.properties)){const o=new qf(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),l[r]=o,i[vf(r)]=r,i[vf(o.attribute)]=r}return new wr(l,i,t.space)}const Zy=hi({properties:{ariaActiveDescendant:null,ariaAtomic:bt,ariaAutoComplete:null,ariaBusy:bt,ariaChecked:bt,ariaColCount:ne,ariaColIndex:ne,ariaColSpan:ne,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:bt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:bt,ariaFlowTo:lt,ariaGrabbed:bt,ariaHasPopup:null,ariaHidden:bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:ne,ariaLive:null,ariaModal:bt,ariaMultiLine:bt,ariaMultiSelectable:bt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:ne,ariaPressed:bt,ariaReadOnly:bt,ariaRelevant:null,ariaRequired:bt,ariaRoleDescription:lt,ariaRowCount:ne,ariaRowIndex:ne,ariaRowSpan:ne,ariaSelected:bt,ariaSetSize:ne,ariaSort:null,ariaValueMax:ne,ariaValueMin:ne,ariaValueNow:ne,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function Fy(t,l){return l in t?t[l]:l}function Qy(t,l){return Fy(t,l.toLowerCase())}const l2=hi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:sa,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alpha:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:lt,autoFocus:Ee,autoPlay:Ee,blocking:lt,capture:null,charSet:null,checked:Ee,cite:null,className:lt,closedBy:null,colorSpace:null,cols:ne,colSpan:ne,command:null,commandFor:null,content:null,contentEditable:bt,controls:Ee,controlsList:lt,coords:ne|sa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:kf,draggable:bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:lt,height:ne,hidden:kf,high:ne,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:lt,itemRef:lt,itemScope:Ee,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:ne,manifest:null,max:null,maxLength:ne,media:null,method:null,min:null,minLength:ne,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:ne,pattern:null,ping:lt,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:lt,required:Ee,reversed:Ee,rows:ne,rowSpan:ne,sandbox:lt,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootCustomElementRegistry:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shadowRootSerializable:Ee,shape:null,size:ne,sizes:null,slot:null,span:ne,spellCheck:bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ne,step:null,style:null,tabIndex:ne,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:bt,width:ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:ne,borderColor:null,bottomMargin:ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:ne,leftMargin:ne,link:null,longDesc:null,lowSrc:null,marginHeight:ne,marginWidth:ne,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:ne,rules:null,scheme:null,scrolling:bt,standby:null,summary:null,text:null,topMargin:ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ne,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ee,disablePictureInPicture:Ee,disableRemotePlayback:Ee,exportParts:sa,part:lt,prefix:null,property:null,results:ne,security:null,unselectable:null},space:"html",transform:Qy}),a2=hi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:on,accentHeight:ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ne,amplitude:ne,arabicForm:null,ascent:ne,attributeName:null,attributeType:null,azimuth:ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ne,by:null,calcMode:null,capHeight:ne,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ne,diffuseConstant:ne,direction:null,display:null,dur:null,divisor:ne,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:ne,enableBackground:null,end:null,event:null,exponent:ne,externalResourcesRequired:null,fill:null,fillOpacity:ne,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:sa,g2:sa,glyphName:sa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ne,horizOriginX:ne,horizOriginY:ne,id:null,ideographic:ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ne,k:ne,k1:ne,k2:ne,k3:ne,k4:ne,kernelMatrix:on,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ne,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ne,overlineThickness:ne,paintOrder:null,panose1:null,path:null,pathLength:ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ne,pointsAtY:ne,pointsAtZ:ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:on,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:on,rev:on,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:on,requiredFeatures:on,requiredFonts:on,requiredFormats:on,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ne,specularExponent:ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ne,strikethroughThickness:ne,string:null,stroke:null,strokeDashArray:on,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ne,strokeOpacity:ne,strokeWidth:null,style:null,surfaceScale:ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:on,tabIndex:ne,tableValues:null,target:null,targetX:ne,targetY:ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:on,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ne,underlineThickness:ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ne,values:null,vAlphabetic:ne,vMathematical:ne,vectorEffect:null,vHanging:ne,vIdeographic:ne,version:null,vertAdvY:ne,vertOriginX:ne,vertOriginY:ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Fy}),Gy=hi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),Xy=hi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Qy}),Jy=hi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),i2={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},r2=/[A-Z]/g,Og=/-[a-z]/g,u2=/^data[-\w.:]+$/i;function s2(t,l){const i=vf(l);let r=l,s=Wt;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&u2.test(l)){if(l.charAt(4)==="-"){const o=l.slice(5).replace(Og,c2);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=l.slice(4);if(!Og.test(o)){let f=o.replace(r2,o2);f.charAt(0)!=="-"&&(f="-"+f),l="data"+f}}s=qf}return new s(r,l)}function o2(t){return"-"+t.toLowerCase()}function c2(t){return t.charAt(1).toUpperCase()}const f2=Iy([Zy,l2,Gy,Xy,Jy],"html"),Vf=Iy([Zy,a2,Gy,Xy,Jy],"svg");function d2(t){return t.join(" ").trim()}var ei={},Gc,Mg;function h2(){if(Mg)return Gc;Mg=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
|
|
50
|
+
`,m="/",b="*",y="",k="comment",v="declaration";function _(H,T){if(typeof H!="string")throw new TypeError("First argument must be a string");if(!H)return[];T=T||{};var Y=1,q=1;function ae(re){var te=re.match(l);te&&(Y+=te.length);var j=re.lastIndexOf(p);q=~j?re.length-j:q+re.length}function W(){var re={line:Y,column:q};return function(te){return te.position=new z(re),ce(),te}}function z(re){this.start=re,this.end={line:Y,column:q},this.source=T.source}z.prototype.content=H;function P(re){var te=new Error(T.source+":"+Y+":"+q+": "+re);if(te.reason=re,te.filename=T.source,te.line=Y,te.column=q,te.source=H,!T.silent)throw te}function se(re){var te=re.exec(H);if(te){var j=te[0];return ae(j),H=H.slice(j.length),te}}function ce(){se(i)}function O(re){var te;for(re=re||[];te=I();)te!==!1&&re.push(te);return re}function I(){var re=W();if(!(m!=H.charAt(0)||b!=H.charAt(1))){for(var te=2;y!=H.charAt(te)&&(b!=H.charAt(te)||m!=H.charAt(te+1));)++te;if(te+=2,y===H.charAt(te-1))return P("End of comment missing");var j=H.slice(2,te-2);return q+=2,ae(j),H=H.slice(te),q+=2,re({type:k,comment:j})}}function X(){var re=W(),te=se(r);if(te){if(I(),!se(s))return P("property missing ':'");var j=se(o),G=re({type:v,property:M(te[0].replace(t,y)),value:j?M(j[0].replace(t,y)):y});return se(f),G}}function he(){var re=[];O(re);for(var te;te=X();)te!==!1&&(re.push(te),O(re));return re}return ce(),he()}function M(H){return H?H.replace(h,y):y}return Gc=_,Gc}var Rg;function m2(){if(Rg)return ei;Rg=1;var t=ei&&ei.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ei,"__esModule",{value:!0}),ei.default=i;const l=t(h2());function i(r,s){let o=null;if(!r||typeof r!="string")return o;const f=(0,l.default)(r),h=typeof s=="function";return f.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:b}=p;h?s(m,b,p):b&&(o=o||{},o[m]=b)}),o}return ei}var or={},Lg;function p2(){if(Lg)return or;Lg=1,Object.defineProperty(or,"__esModule",{value:!0}),or.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(m){return!m||i.test(m)||t.test(m)},f=function(m,b){return b.toUpperCase()},h=function(m,b){return"".concat(b,"-")},p=function(m,b){return b===void 0&&(b={}),o(m)?m:(m=m.toLowerCase(),b.reactCompat?m=m.replace(s,h):m=m.replace(r,h),m.replace(l,f))};return or.camelCase=p,or}var cr,Bg;function g2(){if(Bg)return cr;Bg=1;var t=cr&&cr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},l=t(m2()),i=p2();function r(s,o){var f={};return!s||typeof s!="string"||(0,l.default)(s,function(h,p){h&&p&&(f[(0,i.camelCase)(h,o)]=p)}),f}return r.default=r,cr=r,cr}var y2=g2();const x2=Ey(y2),Ky=$y("end"),Yf=$y("start");function $y(t){return l;function l(i){const r=i&&i.position&&i.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function b2(t){const l=Yf(t),i=Ky(t);if(l&&i)return{start:l,end:i}}function pr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Ug(t.position):"start"in t||"end"in t?Ug(t):"line"in t||"column"in t?wf(t):""}function wf(t){return Hg(t&&t.line)+":"+Hg(t&&t.column)}function Ug(t){return wf(t&&t.start)+"-"+wf(t&&t.end)}function Hg(t){return t&&typeof t=="number"?t:1}class Lt extends Error{constructor(l,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let s="",o={},f=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o={...i}),typeof l=="string"?s=l:!o.cause&&l&&(f=!0,s=l.message,o.cause=l),!o.ruleId&&!o.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?o.ruleId=r:(o.source=r.slice(0,p),o.ruleId=r.slice(p+1))}if(!o.place&&o.ancestors&&o.ancestors){const p=o.ancestors[o.ancestors.length-1];p&&(o.place=p.position)}const h=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=h?h.line:void 0,this.name=pr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=f&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Lt.prototype.file="";Lt.prototype.name="";Lt.prototype.reason="";Lt.prototype.message="";Lt.prototype.stack="";Lt.prototype.column=void 0;Lt.prototype.line=void 0;Lt.prototype.ancestors=void 0;Lt.prototype.cause=void 0;Lt.prototype.fatal=void 0;Lt.prototype.place=void 0;Lt.prototype.ruleId=void 0;Lt.prototype.source=void 0;const If={}.hasOwnProperty,v2=new Map,k2=/[A-Z]/g,S2=new Set(["table","tbody","thead","tfoot","tr"]),w2=new Set(["td","th"]),Py="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _2(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let r;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=z2(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=D2(i,l.jsx,l.jsxs)}const s={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:r,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Vf:f2,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},o=Wy(s,t,void 0);return o&&typeof o!="string"?o:s.create(t,s.Fragment,{children:o||void 0},void 0)}function Wy(t,l,i){if(l.type==="element")return E2(t,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return C2(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return N2(t,l,i);if(l.type==="mdxjsEsm")return A2(t,l);if(l.type==="root")return j2(t,l,i);if(l.type==="text")return T2(t,l)}function E2(t,l,i){const r=t.schema;let s=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Vf,t.schema=s),t.ancestors.push(l);const o=tx(t,l.tagName,!1),f=O2(t,l);let h=Ff(t,l);return S2.has(l.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!t2(p):!0})),ex(t,f,o,l),Zf(f,h),t.ancestors.pop(),t.schema=r,t.create(l,o,f,i)}function C2(t,l){if(l.data&&l.data.estree&&t.evaluater){const r=l.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}vr(t,l.position)}function A2(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);vr(t,l.position)}function N2(t,l,i){const r=t.schema;let s=r;l.name==="svg"&&r.space==="html"&&(s=Vf,t.schema=s),t.ancestors.push(l);const o=l.name===null?t.Fragment:tx(t,l.name,!0),f=M2(t,l),h=Ff(t,l);return ex(t,f,o,l),Zf(f,h),t.ancestors.pop(),t.schema=r,t.create(l,o,f,i)}function j2(t,l,i){const r={};return Zf(r,Ff(t,l)),t.create(l,t.Fragment,r,i)}function T2(t,l){return l.value}function ex(t,l,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(l.node=r)}function Zf(t,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(t.children=i)}}function D2(t,l,i){return r;function r(s,o,f,h){const m=Array.isArray(f.children)?i:l;return h?m(o,f,h):m(o,f)}}function z2(t,l){return i;function i(r,s,o,f){const h=Array.isArray(o.children),p=Yf(r);return l(s,o,f,h,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function O2(t,l){const i={};let r,s;for(s in l.properties)if(s!=="children"&&If.call(l.properties,s)){const o=R2(t,s,l.properties[s]);if(o){const[f,h]=o;t.tableCellAlignToStyle&&f==="align"&&typeof h=="string"&&w2.has(l.tagName)?r=h:i[f]=h}}if(r){const o=i.style||(i.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function M2(t,l){const i={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const o=r.data.estree.body[0];o.type;const f=o.expression;f.type;const h=f.properties[0];h.type,Object.assign(i,t.evaluater.evaluateExpression(h.argument))}else vr(t,l.position);else{const s=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const h=r.value.data.estree.body[0];h.type,o=t.evaluater.evaluateExpression(h.expression)}else vr(t,l.position);else o=r.value===null?!0:r.value;i[s]=o}return i}function Ff(t,l){const i=[];let r=-1;const s=t.passKeys?new Map:v2;for(;++r<l.children.length;){const o=l.children[r];let f;if(t.passKeys){const p=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(p){const m=s.get(p)||0;f=p+"-"+m,s.set(p,m+1)}}const h=Wy(t,o,f);h!==void 0&&i.push(h)}return i}function R2(t,l,i){const r=s2(t.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?Kv(i):d2(i)),r.property==="style"){let s=typeof i=="object"?i:L2(t,String(i));return t.stylePropertyNameCase==="css"&&(s=B2(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&r.space?i2[r.property]||r.property:r.attribute,i]}}function L2(t,l){try{return x2(l,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const r=i,s=new Lt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=Py+"#cannot-parse-style-attribute",s}}function tx(t,l,i){let r;if(!i)r={type:"Literal",value:l};else if(l.includes(".")){const s=l.split(".");let o=-1,f;for(;++o<s.length;){const h=Tg(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};f=f?{type:"MemberExpression",object:f,property:h,computed:!!(o&&h.type==="Literal"),optional:!1}:h}r=f}else r=Tg(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const s=r.value;return If.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(r);vr(t)}function vr(t,l){const i=new Lt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=Py+"#cannot-handle-mdx-estrees-without-createevaluater",i}function B2(t){const l={};let i;for(i in t)If.call(t,i)&&(l[U2(i)]=t[i]);return l}function U2(t){let l=t.replace(k2,H2);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function H2(t){return"-"+t.toLowerCase()}const Xc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},q2={};function Qf(t,l){const i=q2,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return nx(t,r,s)}function nx(t,l,i){if(V2(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return qg(t.children,l,i)}return Array.isArray(t)?qg(t,l,i):""}function qg(t,l,i){const r=[];let s=-1;for(;++s<t.length;)r[s]=nx(t[s],l,i);return r.join("")}function V2(t){return!!(t&&typeof t=="object")}const Vg=document.createElement("i");function Gf(t){const l="&"+t+";";Vg.innerHTML=l;const i=Vg.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===l?!1:i}function cn(t,l,i,r){const s=t.length;let o=0,f;if(l<0?l=-l>s?0:s+l:l=l>s?s:l,i=i>0?i:0,r.length<1e4)f=Array.from(r),f.unshift(l,i),t.splice(...f);else for(i&&t.splice(l,i);o<r.length;)f=r.slice(o,o+1e4),f.unshift(l,0),t.splice(...f),o+=1e4,l+=1e4}function wn(t,l){return t.length>0?(cn(t,t.length,0,l),t):l}const Yg={}.hasOwnProperty;function lx(t){const l={};let i=-1;for(;++i<t.length;)Y2(l,t[i]);return l}function Y2(t,l){let i;for(i in l){const s=(Yg.call(t,i)?t[i]:void 0)||(t[i]={}),o=l[i];let f;if(o)for(f in o){Yg.call(s,f)||(s[f]=[]);const h=o[f];I2(s[f],Array.isArray(h)?h:h?[h]:[])}}}function I2(t,l){let i=-1;const r=[];for(;++i<l.length;)(l[i].add==="after"?t:r).push(l[i]);cn(t,0,0,r)}function ax(t,l){const i=Number.parseInt(t,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Tn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Vt=Vl(/[A-Za-z]/),Rt=Vl(/[\dA-Za-z]/),Z2=Vl(/[#-'*+\--9=?A-Z^-~]/);function rs(t){return t!==null&&(t<32||t===127)}const _f=Vl(/\d/),F2=Vl(/[\dA-Fa-f]/),Q2=Vl(/[!-/:-@[-`{-~]/);function ve(t){return t!==null&&t<-2}function at(t){return t!==null&&(t<0||t===32)}function Re(t){return t===-2||t===-1||t===32}const gs=Vl(new RegExp("\\p{P}|\\p{S}","u")),fa=Vl(/\s/);function Vl(t){return l;function l(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function mi(t){const l=[];let i=-1,r=0,s=0;for(;++i<t.length;){const o=t.charCodeAt(i);let f="";if(o===37&&Rt(t.charCodeAt(i+1))&&Rt(t.charCodeAt(i+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(f=String.fromCharCode(o));else if(o>55295&&o<57344){const h=t.charCodeAt(i+1);o<56320&&h>56319&&h<57344?(f=String.fromCharCode(o,h),s=1):f="�"}else f=String.fromCharCode(o);f&&(l.push(t.slice(r,i),encodeURIComponent(f)),r=i+s+1,f=""),s&&(i+=s,s=0)}return l.join("")+t.slice(r)}function qe(t,l,i,r){const s=r?r-1:Number.POSITIVE_INFINITY;let o=0;return f;function f(p){return Re(p)?(t.enter(i),h(p)):l(p)}function h(p){return Re(p)&&o++<s?(t.consume(p),h):(t.exit(i),l(p))}}const G2={tokenize:X2};function X2(t){const l=t.attempt(this.parser.constructs.contentInitial,r,s);let i;return l;function r(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),qe(t,l,"linePrefix")}function s(h){return t.enter("paragraph"),o(h)}function o(h){const p=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,f(h)}function f(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return ve(h)?(t.consume(h),t.exit("chunkText"),o):(t.consume(h),f)}}const J2={tokenize:K2},Ig={tokenize:$2};function K2(t){const l=this,i=[];let r=0,s,o,f;return h;function h(q){if(r<i.length){const ae=i[r];return l.containerState=ae[1],t.attempt(ae[0].continuation,p,m)(q)}return m(q)}function p(q){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,s&&Y();const ae=l.events.length;let W=ae,z;for(;W--;)if(l.events[W][0]==="exit"&&l.events[W][1].type==="chunkFlow"){z=l.events[W][1].end;break}T(r);let P=ae;for(;P<l.events.length;)l.events[P][1].end={...z},P++;return cn(l.events,W+1,0,l.events.slice(ae)),l.events.length=P,m(q)}return h(q)}function m(q){if(r===i.length){if(!s)return k(q);if(s.currentConstruct&&s.currentConstruct.concrete)return _(q);l.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Ig,b,y)(q)}function b(q){return s&&Y(),T(r),k(q)}function y(q){return l.parser.lazy[l.now().line]=r!==i.length,f=l.now().offset,_(q)}function k(q){return l.containerState={},t.attempt(Ig,v,_)(q)}function v(q){return r++,i.push([l.currentConstruct,l.containerState]),k(q)}function _(q){if(q===null){s&&Y(),T(0),t.consume(q);return}return s=s||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),M(q)}function M(q){if(q===null){H(t.exit("chunkFlow"),!0),T(0),t.consume(q);return}return ve(q)?(t.consume(q),H(t.exit("chunkFlow")),r=0,l.interrupt=void 0,h):(t.consume(q),M)}function H(q,ae){const W=l.sliceStream(q);if(ae&&W.push(null),q.previous=o,o&&(o.next=q),o=q,s.defineSkip(q.start),s.write(W),l.parser.lazy[q.start.line]){let z=s.events.length;for(;z--;)if(s.events[z][1].start.offset<f&&(!s.events[z][1].end||s.events[z][1].end.offset>f))return;const P=l.events.length;let se=P,ce,O;for(;se--;)if(l.events[se][0]==="exit"&&l.events[se][1].type==="chunkFlow"){if(ce){O=l.events[se][1].end;break}ce=!0}for(T(r),z=P;z<l.events.length;)l.events[z][1].end={...O},z++;cn(l.events,se+1,0,l.events.slice(P)),l.events.length=z}}function T(q){let ae=i.length;for(;ae-- >q;){const W=i[ae];l.containerState=W[1],W[0].exit.call(l,t)}i.length=q}function Y(){s.write([null]),o=void 0,s=void 0,l.containerState._closeFlow=void 0}}function $2(t,l,i){return qe(t,t.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fi(t){if(t===null||at(t)||fa(t))return 1;if(gs(t))return 2}function ys(t,l,i){const r=[];let s=-1;for(;++s<t.length;){const o=t[s].resolveAll;o&&!r.includes(o)&&(l=o(l,i),r.push(o))}return l}const Ef={name:"attention",resolveAll:P2,tokenize:W2};function P2(t,l){let i=-1,r,s,o,f,h,p,m,b;for(;++i<t.length;)if(t[i][0]==="enter"&&t[i][1].type==="attentionSequence"&&t[i][1]._close){for(r=i;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&l.sliceSerialize(t[r][1]).charCodeAt(0)===l.sliceSerialize(t[i][1]).charCodeAt(0)){if((t[r][1]._close||t[i][1]._open)&&(t[i][1].end.offset-t[i][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[i][1].end.offset-t[i][1].start.offset)%3))continue;p=t[r][1].end.offset-t[r][1].start.offset>1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;const y={...t[r][1].end},k={...t[i][1].start};Zg(y,-p),Zg(k,p),f={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...t[r][1].end}},h={type:p>1?"strongSequence":"emphasisSequence",start:{...t[i][1].start},end:k},o={type:p>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[i][1].start}},s={type:p>1?"strong":"emphasis",start:{...f.start},end:{...h.end}},t[r][1].end={...f.start},t[i][1].start={...h.end},m=[],t[r][1].end.offset-t[r][1].start.offset&&(m=wn(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=wn(m,[["enter",s,l],["enter",f,l],["exit",f,l],["enter",o,l]]),m=wn(m,ys(l.parser.constructs.insideSpan.null,t.slice(r+1,i),l)),m=wn(m,[["exit",o,l],["enter",h,l],["exit",h,l],["exit",s,l]]),t[i][1].end.offset-t[i][1].start.offset?(b=2,m=wn(m,[["enter",t[i][1],l],["exit",t[i][1],l]])):b=0,cn(t,r-1,i-r+3,m),i=r+m.length-b-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function W2(t,l){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,s=fi(r);let o;return f;function f(p){return o=p,t.enter("attentionSequence"),h(p)}function h(p){if(p===o)return t.consume(p),h;const m=t.exit("attentionSequence"),b=fi(p),y=!b||b===2&&s||i.includes(p),k=!s||s===2&&b||i.includes(r);return m._open=!!(o===42?y:y&&(s||!k)),m._close=!!(o===42?k:k&&(b||!y)),l(p)}}function Zg(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const ek={name:"autolink",tokenize:tk};function tk(t,l,i){let r=0;return s;function s(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(v){return Vt(v)?(t.consume(v),f):v===64?i(v):m(v)}function f(v){return v===43||v===45||v===46||Rt(v)?(r=1,h(v)):m(v)}function h(v){return v===58?(t.consume(v),r=0,p):(v===43||v===45||v===46||Rt(v))&&r++<32?(t.consume(v),h):(r=0,m(v))}function p(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),l):v===null||v===32||v===60||rs(v)?i(v):(t.consume(v),p)}function m(v){return v===64?(t.consume(v),b):Z2(v)?(t.consume(v),m):i(v)}function b(v){return Rt(v)?y(v):i(v)}function y(v){return v===46?(t.consume(v),r=0,b):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),l):k(v)}function k(v){if((v===45||Rt(v))&&r++<63){const _=v===45?k:y;return t.consume(v),_}return i(v)}}const _r={partial:!0,tokenize:nk};function nk(t,l,i){return r;function r(o){return Re(o)?qe(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||ve(o)?l(o):i(o)}}const ix={continuation:{tokenize:ak},exit:ik,name:"blockQuote",tokenize:lk};function lk(t,l,i){const r=this;return s;function s(f){if(f===62){const h=r.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(f),t.exit("blockQuoteMarker"),o}return i(f)}function o(f){return Re(f)?(t.enter("blockQuotePrefixWhitespace"),t.consume(f),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(f))}}function ak(t,l,i){const r=this;return s;function s(f){return Re(f)?qe(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):o(f)}function o(f){return t.attempt(ix,l,i)(f)}}function ik(t){t.exit("blockQuote")}const rx={name:"characterEscape",tokenize:rk};function rk(t,l,i){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return Q2(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):i(o)}}const ux={name:"characterReference",tokenize:uk};function uk(t,l,i){const r=this;let s=0,o,f;return h;function h(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),p}function p(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),o=31,f=Rt,b(y))}function m(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,f=F2,b):(t.enter("characterReferenceValue"),o=7,f=_f,b(y))}function b(y){if(y===59&&s){const k=t.exit("characterReferenceValue");return f===Rt&&!Gf(r.sliceSerialize(k))?i(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return f(y)&&s++<o?(t.consume(y),b):i(y)}}const Fg={partial:!0,tokenize:ok},Qg={concrete:!0,name:"codeFenced",tokenize:sk};function sk(t,l,i){const r=this,s={partial:!0,tokenize:W};let o=0,f=0,h;return p;function p(z){return m(z)}function m(z){const P=r.events[r.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,h=z,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),b(z)}function b(z){return z===h?(f++,t.consume(z),b):f<3?i(z):(t.exit("codeFencedFenceSequence"),Re(z)?qe(t,y,"whitespace")(z):y(z))}function y(z){return z===null||ve(z)?(t.exit("codeFencedFence"),r.interrupt?l(z):t.check(Fg,M,ae)(z)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),k(z))}function k(z){return z===null||ve(z)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(z)):Re(z)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),qe(t,v,"whitespace")(z)):z===96&&z===h?i(z):(t.consume(z),k)}function v(z){return z===null||ve(z)?y(z):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),_(z))}function _(z){return z===null||ve(z)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(z)):z===96&&z===h?i(z):(t.consume(z),_)}function M(z){return t.attempt(s,ae,H)(z)}function H(z){return t.enter("lineEnding"),t.consume(z),t.exit("lineEnding"),T}function T(z){return o>0&&Re(z)?qe(t,Y,"linePrefix",o+1)(z):Y(z)}function Y(z){return z===null||ve(z)?t.check(Fg,M,ae)(z):(t.enter("codeFlowValue"),q(z))}function q(z){return z===null||ve(z)?(t.exit("codeFlowValue"),Y(z)):(t.consume(z),q)}function ae(z){return t.exit("codeFenced"),l(z)}function W(z,P,se){let ce=0;return O;function O(te){return z.enter("lineEnding"),z.consume(te),z.exit("lineEnding"),I}function I(te){return z.enter("codeFencedFence"),Re(te)?qe(z,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):X(te)}function X(te){return te===h?(z.enter("codeFencedFenceSequence"),he(te)):se(te)}function he(te){return te===h?(ce++,z.consume(te),he):ce>=f?(z.exit("codeFencedFenceSequence"),Re(te)?qe(z,re,"whitespace")(te):re(te)):se(te)}function re(te){return te===null||ve(te)?(z.exit("codeFencedFence"),P(te)):se(te)}}}function ok(t,l,i){const r=this;return s;function s(f){return f===null?i(f):(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o)}function o(f){return r.parser.lazy[r.now().line]?i(f):l(f)}}const Jc={name:"codeIndented",tokenize:fk},ck={partial:!0,tokenize:dk};function fk(t,l,i){const r=this;return s;function s(m){return t.enter("codeIndented"),qe(t,o,"linePrefix",5)(m)}function o(m){const b=r.events[r.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?f(m):i(m)}function f(m){return m===null?p(m):ve(m)?t.attempt(ck,f,p)(m):(t.enter("codeFlowValue"),h(m))}function h(m){return m===null||ve(m)?(t.exit("codeFlowValue"),f(m)):(t.consume(m),h)}function p(m){return t.exit("codeIndented"),l(m)}}function dk(t,l,i){const r=this;return s;function s(f){return r.parser.lazy[r.now().line]?i(f):ve(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),s):qe(t,o,"linePrefix",5)(f)}function o(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):ve(f)?s(f):i(f)}}const hk={name:"codeText",previous:pk,resolve:mk,tokenize:gk};function mk(t){let l=t.length-4,i=3,r,s;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(r=i;++r<l;)if(t[r][1].type==="codeTextData"){t[i][1].type="codeTextPadding",t[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(r=i-1,l++;++r<=l;)s===void 0?r!==l&&t[r][1].type!=="lineEnding"&&(s=r):(r===l||t[r][1].type==="lineEnding")&&(t[s][1].type="codeTextData",r!==s+2&&(t[s][1].end=t[r-1][1].end,t.splice(s+2,r-s-2),l-=r-s-2,r=s+2),s=void 0);return t}function pk(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function gk(t,l,i){let r=0,s,o;return f;function f(y){return t.enter("codeText"),t.enter("codeTextSequence"),h(y)}function h(y){return y===96?(t.consume(y),r++,h):(t.exit("codeTextSequence"),p(y))}function p(y){return y===null?i(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),p):y===96?(o=t.enter("codeTextSequence"),s=0,b(y)):ve(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||ve(y)?(t.exit("codeTextData"),p(y)):(t.consume(y),m)}function b(y){return y===96?(t.consume(y),s++,b):s===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(y)):(o.type="codeTextData",m(y))}}class yk{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(l,r):l>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(l,i,r){const s=i||0;this.setCursor(Math.trunc(l));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&fr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),fr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),fr(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);fr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);fr(this.left,i.reverse())}}}function fr(t,l){let i=0;if(l.length<1e4)t.push(...l);else for(;i<l.length;)t.push(...l.slice(i,i+1e4)),i+=1e4}function sx(t){const l={};let i=-1,r,s,o,f,h,p,m;const b=new yk(t);for(;++i<b.length;){for(;i in l;)i=l[i];if(r=b.get(i),i&&r[1].type==="chunkFlow"&&b.get(i-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,o=0,o<p.length&&p[o][1].type==="lineEndingBlank"&&(o+=2),o<p.length&&p[o][1].type==="content"))for(;++o<p.length&&p[o][1].type!=="content";)p[o][1].type==="chunkText"&&(p[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,xk(b,i)),i=l[i],m=!0);else if(r[1]._container){for(o=i,s=void 0;o--;)if(f=b.get(o),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(s&&(b.get(s)[1].type="lineEndingBlank"),f[1].type="lineEnding",s=o);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;s&&(r[1].end={...b.get(s)[1].start},h=b.slice(s,i),h.unshift(r),b.splice(s,i-s+1,h))}}return cn(t,0,Number.POSITIVE_INFINITY,b.slice(0)),!m}function xk(t,l){const i=t.get(l)[1],r=t.get(l)[2];let s=l-1;const o=[];let f=i._tokenizer;f||(f=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,p=[],m={};let b,y,k=-1,v=i,_=0,M=0;const H=[M];for(;v;){for(;t.get(++s)[1]!==v;);o.push(s),v._tokenizer||(b=r.sliceStream(v),v.next||b.push(null),y&&f.defineSkip(v.start),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(b),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=i;++k<h.length;)h[k][0]==="exit"&&h[k-1][0]==="enter"&&h[k][1].type===h[k-1][1].type&&h[k][1].start.line!==h[k][1].end.line&&(M=k+1,H.push(M),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(f.events=[],v?(v._tokenizer=void 0,v.previous=void 0):H.pop(),k=H.length;k--;){const T=h.slice(H[k],H[k+1]),Y=o.pop();p.push([Y,Y+T.length-1]),t.splice(Y,2,T)}for(p.reverse(),k=-1;++k<p.length;)m[_+p[k][0]]=_+p[k][1],_+=p[k][1]-p[k][0]-1;return m}const bk={resolve:kk,tokenize:Sk},vk={partial:!0,tokenize:wk};function kk(t){return sx(t),t}function Sk(t,l){let i;return r;function r(h){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),s(h)}function s(h){return h===null?o(h):ve(h)?t.check(vk,f,o)(h):(t.consume(h),s)}function o(h){return t.exit("chunkContent"),t.exit("content"),l(h)}function f(h){return t.consume(h),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,s}}function wk(t,l,i){const r=this;return s;function s(f){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),qe(t,o,"linePrefix")}function o(f){if(f===null||ve(f))return i(f);const h=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):t.interrupt(r.parser.constructs.flow,i,l)(f)}}function ox(t,l,i,r,s,o,f,h,p){const m=p||Number.POSITIVE_INFINITY;let b=0;return y;function y(T){return T===60?(t.enter(r),t.enter(s),t.enter(o),t.consume(T),t.exit(o),k):T===null||T===32||T===41||rs(T)?i(T):(t.enter(r),t.enter(f),t.enter(h),t.enter("chunkString",{contentType:"string"}),M(T))}function k(T){return T===62?(t.enter(o),t.consume(T),t.exit(o),t.exit(s),t.exit(r),l):(t.enter(h),t.enter("chunkString",{contentType:"string"}),v(T))}function v(T){return T===62?(t.exit("chunkString"),t.exit(h),k(T)):T===null||T===60||ve(T)?i(T):(t.consume(T),T===92?_:v)}function _(T){return T===60||T===62||T===92?(t.consume(T),v):v(T)}function M(T){return!b&&(T===null||T===41||at(T))?(t.exit("chunkString"),t.exit(h),t.exit(f),t.exit(r),l(T)):b<m&&T===40?(t.consume(T),b++,M):T===41?(t.consume(T),b--,M):T===null||T===32||T===40||rs(T)?i(T):(t.consume(T),T===92?H:M)}function H(T){return T===40||T===41||T===92?(t.consume(T),M):M(T)}}function cx(t,l,i,r,s,o){const f=this;let h=0,p;return m;function m(v){return t.enter(r),t.enter(s),t.consume(v),t.exit(s),t.enter(o),b}function b(v){return h>999||v===null||v===91||v===93&&!p||v===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?i(v):v===93?(t.exit(o),t.enter(s),t.consume(v),t.exit(s),t.exit(r),l):ve(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),b):(t.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||ve(v)||h++>999?(t.exit("chunkString"),b(v)):(t.consume(v),p||(p=!Re(v)),v===92?k:y)}function k(v){return v===91||v===92||v===93?(t.consume(v),h++,y):y(v)}}function fx(t,l,i,r,s,o){let f;return h;function h(k){return k===34||k===39||k===40?(t.enter(r),t.enter(s),t.consume(k),t.exit(s),f=k===40?41:k,p):i(k)}function p(k){return k===f?(t.enter(s),t.consume(k),t.exit(s),t.exit(r),l):(t.enter(o),m(k))}function m(k){return k===f?(t.exit(o),p(f)):k===null?i(k):ve(k)?(t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),qe(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===f||k===null||ve(k)?(t.exit("chunkString"),m(k)):(t.consume(k),k===92?y:b)}function y(k){return k===f||k===92?(t.consume(k),b):b(k)}}function gr(t,l){let i;return r;function r(s){return ve(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i=!0,r):Re(s)?qe(t,r,i?"linePrefix":"lineSuffix")(s):l(s)}}const _k={name:"definition",tokenize:Ck},Ek={partial:!0,tokenize:Ak};function Ck(t,l,i){const r=this;let s;return o;function o(v){return t.enter("definition"),f(v)}function f(v){return cx.call(r,t,h,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function h(v){return s=Tn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),p):i(v)}function p(v){return at(v)?gr(t,m)(v):m(v)}function m(v){return ox(t,b,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function b(v){return t.attempt(Ek,y,y)(v)}function y(v){return Re(v)?qe(t,k,"whitespace")(v):k(v)}function k(v){return v===null||ve(v)?(t.exit("definition"),r.parser.defined.push(s),l(v)):i(v)}}function Ak(t,l,i){return r;function r(h){return at(h)?gr(t,s)(h):i(h)}function s(h){return fx(t,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function o(h){return Re(h)?qe(t,f,"whitespace")(h):f(h)}function f(h){return h===null||ve(h)?l(h):i(h)}}const Nk={name:"hardBreakEscape",tokenize:jk};function jk(t,l,i){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return ve(o)?(t.exit("hardBreakEscape"),l(o)):i(o)}}const Tk={name:"headingAtx",resolve:Dk,tokenize:zk};function Dk(t,l){let i=t.length-2,r=3,s,o;return t[r][1].type==="whitespace"&&(r+=2),i-2>r&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&t[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(s={type:"atxHeadingText",start:t[r][1].start,end:t[i][1].end},o={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},cn(t,r,i-r+1,[["enter",s,l],["enter",o,l],["exit",o,l],["exit",s,l]])),t}function zk(t,l,i){let r=0;return s;function s(b){return t.enter("atxHeading"),o(b)}function o(b){return t.enter("atxHeadingSequence"),f(b)}function f(b){return b===35&&r++<6?(t.consume(b),f):b===null||at(b)?(t.exit("atxHeadingSequence"),h(b)):i(b)}function h(b){return b===35?(t.enter("atxHeadingSequence"),p(b)):b===null||ve(b)?(t.exit("atxHeading"),l(b)):Re(b)?qe(t,h,"whitespace")(b):(t.enter("atxHeadingText"),m(b))}function p(b){return b===35?(t.consume(b),p):(t.exit("atxHeadingSequence"),h(b))}function m(b){return b===null||b===35||at(b)?(t.exit("atxHeadingText"),h(b)):(t.consume(b),m)}}const Ok=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gg=["pre","script","style","textarea"],Mk={concrete:!0,name:"htmlFlow",resolveTo:Bk,tokenize:Uk},Rk={partial:!0,tokenize:qk},Lk={partial:!0,tokenize:Hk};function Bk(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function Uk(t,l,i){const r=this;let s,o,f,h,p;return m;function m(w){return b(w)}function b(w){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(w),y}function y(w){return w===33?(t.consume(w),k):w===47?(t.consume(w),o=!0,M):w===63?(t.consume(w),s=3,r.interrupt?l:E):Vt(w)?(t.consume(w),f=String.fromCharCode(w),H):i(w)}function k(w){return w===45?(t.consume(w),s=2,v):w===91?(t.consume(w),s=5,h=0,_):Vt(w)?(t.consume(w),s=4,r.interrupt?l:E):i(w)}function v(w){return w===45?(t.consume(w),r.interrupt?l:E):i(w)}function _(w){const ee="CDATA[";return w===ee.charCodeAt(h++)?(t.consume(w),h===ee.length?r.interrupt?l:X:_):i(w)}function M(w){return Vt(w)?(t.consume(w),f=String.fromCharCode(w),H):i(w)}function H(w){if(w===null||w===47||w===62||at(w)){const ee=w===47,ye=f.toLowerCase();return!ee&&!o&&Gg.includes(ye)?(s=1,r.interrupt?l(w):X(w)):Ok.includes(f.toLowerCase())?(s=6,ee?(t.consume(w),T):r.interrupt?l(w):X(w)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(w):o?Y(w):q(w))}return w===45||Rt(w)?(t.consume(w),f+=String.fromCharCode(w),H):i(w)}function T(w){return w===62?(t.consume(w),r.interrupt?l:X):i(w)}function Y(w){return Re(w)?(t.consume(w),Y):O(w)}function q(w){return w===47?(t.consume(w),O):w===58||w===95||Vt(w)?(t.consume(w),ae):Re(w)?(t.consume(w),q):O(w)}function ae(w){return w===45||w===46||w===58||w===95||Rt(w)?(t.consume(w),ae):W(w)}function W(w){return w===61?(t.consume(w),z):Re(w)?(t.consume(w),W):q(w)}function z(w){return w===null||w===60||w===61||w===62||w===96?i(w):w===34||w===39?(t.consume(w),p=w,P):Re(w)?(t.consume(w),z):se(w)}function P(w){return w===p?(t.consume(w),p=null,ce):w===null||ve(w)?i(w):(t.consume(w),P)}function se(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||at(w)?W(w):(t.consume(w),se)}function ce(w){return w===47||w===62||Re(w)?q(w):i(w)}function O(w){return w===62?(t.consume(w),I):i(w)}function I(w){return w===null||ve(w)?X(w):Re(w)?(t.consume(w),I):i(w)}function X(w){return w===45&&s===2?(t.consume(w),j):w===60&&s===1?(t.consume(w),G):w===62&&s===4?(t.consume(w),A):w===63&&s===3?(t.consume(w),E):w===93&&s===5?(t.consume(w),ke):ve(w)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Rk,F,he)(w)):w===null||ve(w)?(t.exit("htmlFlowData"),he(w)):(t.consume(w),X)}function he(w){return t.check(Lk,re,F)(w)}function re(w){return t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),te}function te(w){return w===null||ve(w)?he(w):(t.enter("htmlFlowData"),X(w))}function j(w){return w===45?(t.consume(w),E):X(w)}function G(w){return w===47?(t.consume(w),f="",ue):X(w)}function ue(w){if(w===62){const ee=f.toLowerCase();return Gg.includes(ee)?(t.consume(w),A):X(w)}return Vt(w)&&f.length<8?(t.consume(w),f+=String.fromCharCode(w),ue):X(w)}function ke(w){return w===93?(t.consume(w),E):X(w)}function E(w){return w===62?(t.consume(w),A):w===45&&s===2?(t.consume(w),E):X(w)}function A(w){return w===null||ve(w)?(t.exit("htmlFlowData"),F(w)):(t.consume(w),A)}function F(w){return t.exit("htmlFlow"),l(w)}}function Hk(t,l,i){const r=this;return s;function s(f){return ve(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o):i(f)}function o(f){return r.parser.lazy[r.now().line]?i(f):l(f)}}function qk(t,l,i){return r;function r(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(_r,l,i)}}const Vk={name:"htmlText",tokenize:Yk};function Yk(t,l,i){const r=this;let s,o,f;return h;function h(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),p}function p(E){return E===33?(t.consume(E),m):E===47?(t.consume(E),W):E===63?(t.consume(E),q):Vt(E)?(t.consume(E),se):i(E)}function m(E){return E===45?(t.consume(E),b):E===91?(t.consume(E),o=0,_):Vt(E)?(t.consume(E),Y):i(E)}function b(E){return E===45?(t.consume(E),v):i(E)}function y(E){return E===null?i(E):E===45?(t.consume(E),k):ve(E)?(f=y,G(E)):(t.consume(E),y)}function k(E){return E===45?(t.consume(E),v):y(E)}function v(E){return E===62?j(E):E===45?k(E):y(E)}function _(E){const A="CDATA[";return E===A.charCodeAt(o++)?(t.consume(E),o===A.length?M:_):i(E)}function M(E){return E===null?i(E):E===93?(t.consume(E),H):ve(E)?(f=M,G(E)):(t.consume(E),M)}function H(E){return E===93?(t.consume(E),T):M(E)}function T(E){return E===62?j(E):E===93?(t.consume(E),T):M(E)}function Y(E){return E===null||E===62?j(E):ve(E)?(f=Y,G(E)):(t.consume(E),Y)}function q(E){return E===null?i(E):E===63?(t.consume(E),ae):ve(E)?(f=q,G(E)):(t.consume(E),q)}function ae(E){return E===62?j(E):q(E)}function W(E){return Vt(E)?(t.consume(E),z):i(E)}function z(E){return E===45||Rt(E)?(t.consume(E),z):P(E)}function P(E){return ve(E)?(f=P,G(E)):Re(E)?(t.consume(E),P):j(E)}function se(E){return E===45||Rt(E)?(t.consume(E),se):E===47||E===62||at(E)?ce(E):i(E)}function ce(E){return E===47?(t.consume(E),j):E===58||E===95||Vt(E)?(t.consume(E),O):ve(E)?(f=ce,G(E)):Re(E)?(t.consume(E),ce):j(E)}function O(E){return E===45||E===46||E===58||E===95||Rt(E)?(t.consume(E),O):I(E)}function I(E){return E===61?(t.consume(E),X):ve(E)?(f=I,G(E)):Re(E)?(t.consume(E),I):ce(E)}function X(E){return E===null||E===60||E===61||E===62||E===96?i(E):E===34||E===39?(t.consume(E),s=E,he):ve(E)?(f=X,G(E)):Re(E)?(t.consume(E),X):(t.consume(E),re)}function he(E){return E===s?(t.consume(E),s=void 0,te):E===null?i(E):ve(E)?(f=he,G(E)):(t.consume(E),he)}function re(E){return E===null||E===34||E===39||E===60||E===61||E===96?i(E):E===47||E===62||at(E)?ce(E):(t.consume(E),re)}function te(E){return E===47||E===62||at(E)?ce(E):i(E)}function j(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),l):i(E)}function G(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),ue}function ue(E){return Re(E)?qe(t,ke,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):ke(E)}function ke(E){return t.enter("htmlTextData"),f(E)}}const Xf={name:"labelEnd",resolveAll:Qk,resolveTo:Gk,tokenize:Xk},Ik={tokenize:Jk},Zk={tokenize:Kk},Fk={tokenize:$k};function Qk(t){let l=-1;const i=[];for(;++l<t.length;){const r=t[l][1];if(i.push(t[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",l+=s}}return t.length!==i.length&&cn(t,0,t.length,i),t}function Gk(t,l){let i=t.length,r=0,s,o,f,h;for(;i--;)if(s=t[i][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[i][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(f){if(t[i][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=i,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(f=i);const p={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[o][1].start},end:{...t[f][1].end}},b={type:"labelText",start:{...t[o+r+2][1].end},end:{...t[f-2][1].start}};return h=[["enter",p,l],["enter",m,l]],h=wn(h,t.slice(o+1,o+r+3)),h=wn(h,[["enter",b,l]]),h=wn(h,ys(l.parser.constructs.insideSpan.null,t.slice(o+r+4,f-3),l)),h=wn(h,[["exit",b,l],t[f-2],t[f-1],["exit",m,l]]),h=wn(h,t.slice(f+1)),h=wn(h,[["exit",p,l]]),cn(t,o,t.length,h),t}function Xk(t,l,i){const r=this;let s=r.events.length,o,f;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return h;function h(k){return o?o._inactive?y(k):(f=r.parser.defined.includes(Tn(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(k),t.exit("labelMarker"),t.exit("labelEnd"),p):i(k)}function p(k){return k===40?t.attempt(Ik,b,f?b:y)(k):k===91?t.attempt(Zk,b,f?m:y)(k):f?b(k):y(k)}function m(k){return t.attempt(Fk,b,y)(k)}function b(k){return l(k)}function y(k){return o._balanced=!0,i(k)}}function Jk(t,l,i){return r;function r(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return at(y)?gr(t,o)(y):o(y)}function o(y){return y===41?b(y):ox(t,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function f(y){return at(y)?gr(t,p)(y):b(y)}function h(y){return i(y)}function p(y){return y===34||y===39||y===40?fx(t,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):b(y)}function m(y){return at(y)?gr(t,b)(y):b(y)}function b(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),l):i(y)}}function Kk(t,l,i){const r=this;return s;function s(h){return cx.call(r,t,o,f,"reference","referenceMarker","referenceString")(h)}function o(h){return r.parser.defined.includes(Tn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(h):i(h)}function f(h){return i(h)}}function $k(t,l,i){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),l):i(o)}}const Pk={name:"labelStartImage",resolveAll:Xf.resolveAll,tokenize:Wk};function Wk(t,l,i){const r=this;return s;function s(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),o}function o(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),f):i(h)}function f(h){return h===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(h):l(h)}}const eS={name:"labelStartLink",resolveAll:Xf.resolveAll,tokenize:tS};function tS(t,l,i){const r=this;return s;function s(f){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelLink"),o}function o(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(f):l(f)}}const Kc={name:"lineEnding",tokenize:nS};function nS(t,l){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),qe(t,l,"linePrefix")}}const Gu={name:"thematicBreak",tokenize:lS};function lS(t,l,i){let r=0,s;return o;function o(m){return t.enter("thematicBreak"),f(m)}function f(m){return s=m,h(m)}function h(m){return m===s?(t.enter("thematicBreakSequence"),p(m)):r>=3&&(m===null||ve(m))?(t.exit("thematicBreak"),l(m)):i(m)}function p(m){return m===s?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Re(m)?qe(t,h,"whitespace")(m):h(m))}}const Pt={continuation:{tokenize:uS},exit:oS,name:"list",tokenize:rS},aS={partial:!0,tokenize:cS},iS={partial:!0,tokenize:sS};function rS(t,l,i){const r=this,s=r.events[r.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return h;function h(v){const _=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:_f(v)){if(r.containerState.type||(r.containerState.type=_,t.enter(_,{_container:!0})),_==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(Gu,i,m)(v):m(v);if(!r.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(v)}return i(v)}function p(v){return _f(v)&&++f<10?(t.consume(v),p):(!r.interrupt||f<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):i(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,t.check(_r,r.interrupt?i:b,t.attempt(aS,k,y))}function b(v){return r.containerState.initialBlankLine=!0,o++,k(v)}function y(v){return Re(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),k):i(v)}function k(v){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(v)}}function uS(t,l,i){const r=this;return r.containerState._closeFlow=void 0,t.check(_r,s,o);function s(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,qe(t,l,"listItemIndent",r.containerState.size+1)(h)}function o(h){return r.containerState.furtherBlankLines||!Re(h)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,f(h)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(iS,l,f)(h))}function f(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,qe(t,t.attempt(Pt,l,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function sS(t,l,i){const r=this;return qe(t,s,"listItemIndent",r.containerState.size+1);function s(o){const f=r.events[r.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===r.containerState.size?l(o):i(o)}}function oS(t){t.exit(this.containerState.type)}function cS(t,l,i){const r=this;return qe(t,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const f=r.events[r.events.length-1];return!Re(o)&&f&&f[1].type==="listItemPrefixWhitespace"?l(o):i(o)}}const Xg={name:"setextUnderline",resolveTo:fS,tokenize:dS};function fS(t,l){let i=t.length,r,s,o;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){r=i;break}t[i][1].type==="paragraph"&&(s=i)}else t[i][1].type==="content"&&t.splice(i,1),!o&&t[i][1].type==="definition"&&(o=i);const f={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",f,l]),t.splice(o+1,0,["exit",t[r][1],l]),t[r][1].end={...t[o][1].end}):t[r][1]=f,t.push(["exit",f,l]),t}function dS(t,l,i){const r=this;let s;return o;function o(m){let b=r.events.length,y;for(;b--;)if(r.events[b][1].type!=="lineEnding"&&r.events[b][1].type!=="linePrefix"&&r.events[b][1].type!=="content"){y=r.events[b][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||y)?(t.enter("setextHeadingLine"),s=m,f(m)):i(m)}function f(m){return t.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===s?(t.consume(m),h):(t.exit("setextHeadingLineSequence"),Re(m)?qe(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||ve(m)?(t.exit("setextHeadingLine"),l(m)):i(m)}}const hS={tokenize:mS};function mS(t){const l=this,i=t.attempt(_r,r,t.attempt(this.parser.constructs.flowInitial,s,qe(t,t.attempt(this.parser.constructs.flow,s,t.attempt(bk,s)),"linePrefix")));return i;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),l.currentConstruct=void 0,i}}const pS={resolveAll:hx()},gS=dx("string"),yS=dx("text");function dx(t){return{resolveAll:hx(t==="text"?xS:void 0),tokenize:l};function l(i){const r=this,s=this.parser.constructs[t],o=i.attempt(s,f,h);return f;function f(b){return m(b)?o(b):h(b)}function h(b){if(b===null){i.consume(b);return}return i.enter("data"),i.consume(b),p}function p(b){return m(b)?(i.exit("data"),o(b)):(i.consume(b),p)}function m(b){if(b===null)return!0;const y=s[b];let k=-1;if(y)for(;++k<y.length;){const v=y[k];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function hx(t){return l;function l(i,r){let s=-1,o;for(;++s<=i.length;)o===void 0?i[s]&&i[s][1].type==="data"&&(o=s,s++):(!i[s]||i[s][1].type!=="data")&&(s!==o+2&&(i[o][1].end=i[s-1][1].end,i.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(i,r):i}}function xS(t,l){let i=0;for(;++i<=t.length;)if((i===t.length||t[i][1].type==="lineEnding")&&t[i-1][1].type==="data"){const r=t[i-1][1],s=l.sliceStream(r);let o=s.length,f=-1,h=0,p;for(;o--;){const m=s[o];if(typeof m=="string"){for(f=m.length;m.charCodeAt(f-1)===32;)h++,f--;if(f)break;f=-1}else if(m===-2)p=!0,h++;else if(m!==-1){o++;break}}if(l._contentTypeTextTrailing&&i===t.length&&(h=0),h){const m={type:i===t.length||p||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?f:r.start._bufferIndex+f,_index:r.start._index+o,line:r.end.line,column:r.end.column-h,offset:r.end.offset-h},end:{...r.end}};r.end={...m.start},r.start.offset===r.end.offset?Object.assign(r,m):(t.splice(i,0,["enter",m,l],["exit",m,l]),i+=2)}i++}return t}const bS={42:Pt,43:Pt,45:Pt,48:Pt,49:Pt,50:Pt,51:Pt,52:Pt,53:Pt,54:Pt,55:Pt,56:Pt,57:Pt,62:ix},vS={91:_k},kS={[-2]:Jc,[-1]:Jc,32:Jc},SS={35:Tk,42:Gu,45:[Xg,Gu],60:Mk,61:Xg,95:Gu,96:Qg,126:Qg},wS={38:ux,92:rx},_S={[-5]:Kc,[-4]:Kc,[-3]:Kc,33:Pk,38:ux,42:Ef,60:[ek,Vk],91:eS,92:[Nk,rx],93:Xf,95:Ef,96:hk},ES={null:[Ef,pS]},CS={null:[42,95]},AS={null:[]},NS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:CS,contentInitial:vS,disable:AS,document:bS,flow:SS,flowInitial:kS,insideSpan:ES,string:wS,text:_S},Symbol.toStringTag,{value:"Module"}));function jS(t,l,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const s={},o=[];let f=[],h=[];const p={attempt:P(W),check:P(z),consume:Y,enter:q,exit:ae,interrupt:P(z,{interrupt:!0})},m={code:null,containerState:{},defineSkip:M,events:[],now:_,parser:t,previous:null,sliceSerialize:k,sliceStream:v,write:y};let b=l.tokenize.call(m,p);return l.resolveAll&&o.push(l),m;function y(I){return f=wn(f,I),H(),f[f.length-1]!==null?[]:(se(l,0),m.events=ys(o,m.events,m),m.events)}function k(I,X){return DS(v(I),X)}function v(I){return TS(f,I)}function _(){const{_bufferIndex:I,_index:X,line:he,column:re,offset:te}=r;return{_bufferIndex:I,_index:X,line:he,column:re,offset:te}}function M(I){s[I.line]=I.column,O()}function H(){let I;for(;r._index<f.length;){const X=f[r._index];if(typeof X=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<X.length;)T(X.charCodeAt(r._bufferIndex));else T(X)}}function T(I){b=b(I)}function Y(I){ve(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,O()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===f[r._index].length&&(r._bufferIndex=-1,r._index++)),m.previous=I}function q(I,X){const he=X||{};return he.type=I,he.start=_(),m.events.push(["enter",he,m]),h.push(he),he}function ae(I){const X=h.pop();return X.end=_(),m.events.push(["exit",X,m]),X}function W(I,X){se(I,X.from)}function z(I,X){X.restore()}function P(I,X){return he;function he(re,te,j){let G,ue,ke,E;return Array.isArray(re)?F(re):"tokenize"in re?F([re]):A(re);function A(me){return je;function je(Ve){const Qe=Ve!==null&&me[Ve],zt=Ve!==null&&me.null,En=[...Array.isArray(Qe)?Qe:Qe?[Qe]:[],...Array.isArray(zt)?zt:zt?[zt]:[]];return F(En)(Ve)}}function F(me){return G=me,ue=0,me.length===0?j:w(me[ue])}function w(me){return je;function je(Ve){return E=ce(),ke=me,me.partial||(m.currentConstruct=me),me.name&&m.parser.constructs.disable.null.includes(me.name)?ye():me.tokenize.call(X?Object.assign(Object.create(m),X):m,p,ee,ye)(Ve)}}function ee(me){return I(ke,E),te}function ye(me){return E.restore(),++ue<G.length?w(G[ue]):j}}}function se(I,X){I.resolveAll&&!o.includes(I)&&o.push(I),I.resolve&&cn(m.events,X,m.events.length-X,I.resolve(m.events.slice(X),m)),I.resolveTo&&(m.events=I.resolveTo(m.events,m))}function ce(){const I=_(),X=m.previous,he=m.currentConstruct,re=m.events.length,te=Array.from(h);return{from:re,restore:j};function j(){r=I,m.previous=X,m.currentConstruct=he,m.events.length=re,h=te,O()}}function O(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function TS(t,l){const i=l.start._index,r=l.start._bufferIndex,s=l.end._index,o=l.end._bufferIndex;let f;if(i===s)f=[t[i].slice(r,o)];else{if(f=t.slice(i,s),r>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(r):f.shift()}o>0&&f.push(t[s].slice(0,o))}return f}function DS(t,l){let i=-1;const r=[];let s;for(;++i<t.length;){const o=t[i];let f;if(typeof o=="string")f=o;else switch(o){case-5:{f="\r";break}case-4:{f=`
|
|
51
|
+
`;break}case-3:{f=`\r
|
|
52
|
+
`;break}case-2:{f=l?" ":" ";break}case-1:{if(!l&&s)continue;f=" ";break}default:f=String.fromCharCode(o)}s=o===-2,r.push(f)}return r.join("")}function zS(t){const r={constructs:lx([NS,...(t||{}).extensions||[]]),content:s(G2),defined:[],document:s(J2),flow:s(hS),lazy:{},string:s(gS),text:s(yS)};return r;function s(o){return f;function f(h){return jS(r,o,h)}}}function OS(t){for(;!sx(t););return t}const Jg=/[\0\t\n\r]/g;function MS(){let t=1,l="",i=!0,r;return s;function s(o,f,h){const p=[];let m,b,y,k,v;for(o=l+(typeof o=="string"?o.toString():new TextDecoder(f||void 0).decode(o)),y=0,l="",i&&(o.charCodeAt(0)===65279&&y++,i=void 0);y<o.length;){if(Jg.lastIndex=y,m=Jg.exec(o),k=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(k),!m){l=o.slice(y);break}if(v===10&&y===k&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),y<k&&(p.push(o.slice(y,k)),t+=k-y),v){case 0:{p.push(65533),t++;break}case 9:{for(b=Math.ceil(t/4)*4,p.push(-2);t++<b;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:r=!0,t=1}y=k+1}return h&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const RS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function LS(t){return t.replace(RS,BS)}function BS(t,l,i){if(l)return l;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),o=s===120||s===88;return ax(i.slice(o?2:1),o?16:10)}return Gf(i)||t}const mx={}.hasOwnProperty;function US(t,l,i){return l&&typeof l=="object"&&(i=l,l=void 0),HS(i)(OS(zS(i).document().write(MS()(t,l,!0))))}function HS(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ma),autolinkProtocol:ce,autolinkEmail:ce,atxHeading:o(fn),blockQuote:o(zt),characterEscape:ce,characterReference:ce,codeFenced:o(En),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:o(En,f),codeText:o(Dn,f),codeTextData:ce,data:ce,codeFlowValue:ce,definition:o(et),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:o(Ot),hardBreakEscape:o(dn),hardBreakTrailing:o(dn),htmlFlow:o(fl,f),htmlFlowData:ce,htmlText:o(fl,f),htmlTextData:ce,image:o(ha),label:f,link:o(ma),listItem:o(pi),listItemValue:k,listOrdered:o(pa,y),listUnordered:o(pa),paragraph:o(Ss),reference:w,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:o(fn),strong:o(ws),thematicBreak:o(_s)},exit:{atxHeading:p(),atxHeadingSequence:W,autolink:p(),autolinkEmail:Qe,autolinkProtocol:Ve,blockQuote:p(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:me,characterReference:je,codeFenced:p(H),codeFencedFence:M,codeFencedFenceInfo:v,codeFencedFenceMeta:_,codeFlowValue:O,codeIndented:p(T),codeText:p(te),codeTextData:O,data:O,definition:p(),definitionDestinationString:ae,definitionLabelString:Y,definitionTitleString:q,emphasis:p(),hardBreakEscape:p(X),hardBreakTrailing:p(X),htmlFlow:p(he),htmlFlowData:O,htmlText:p(re),htmlTextData:O,image:p(G),label:ke,labelText:ue,lineEnding:I,link:p(j),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ee,resourceDestinationString:E,resourceTitleString:A,resource:F,setextHeading:p(se),setextHeadingLineSequence:P,setextHeadingText:z,strong:p(),thematicBreak:p()}};px(l,(t||{}).mdastExtensions||[]);const i={};return r;function r(J){let ie={type:"root",children:[]};const we={stack:[ie],tokenStack:[],config:l,enter:h,exit:m,buffer:f,resume:b,data:i},ze=[];let Ge=-1;for(;++Ge<J.length;)if(J[Ge][1].type==="listOrdered"||J[Ge][1].type==="listUnordered")if(J[Ge][0]==="enter")ze.push(Ge);else{const en=ze.pop();Ge=s(J,en,Ge)}for(Ge=-1;++Ge<J.length;){const en=l[J[Ge][0]];mx.call(en,J[Ge][1].type)&&en[J[Ge][1].type].call(Object.assign({sliceSerialize:J[Ge][2].sliceSerialize},we),J[Ge][1])}if(we.tokenStack.length>0){const en=we.tokenStack[we.tokenStack.length-1];(en[1]||Kg).call(we,void 0,en[0])}for(ie.position={start:Bl(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Bl(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<l.transforms.length;)ie=l.transforms[Ge](ie)||ie;return ie}function s(J,ie,we){let ze=ie-1,Ge=-1,en=!1,Vn,Ut,kt,Zt;for(;++ze<=we;){const tt=J[ze];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Ge++:Ge--,Zt=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(Vn&&!Zt&&!Ge&&!kt&&(kt=ze),Zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Zt=void 0}if(!Ge&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Ge===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(Vn){let dl=ze;for(Ut=void 0;dl--;){const Cn=J[dl];if(Cn[1].type==="lineEnding"||Cn[1].type==="lineEndingBlank"){if(Cn[0]==="exit")continue;Ut&&(J[Ut][1].type="lineEndingBlank",en=!0),Cn[1].type="lineEnding",Ut=dl}else if(!(Cn[1].type==="linePrefix"||Cn[1].type==="blockQuotePrefix"||Cn[1].type==="blockQuotePrefixWhitespace"||Cn[1].type==="blockQuoteMarker"||Cn[1].type==="listItemIndent"))break}kt&&(!Ut||kt<Ut)&&(Vn._spread=!0),Vn.end=Object.assign({},Ut?J[Ut][1].start:tt[1].end),J.splice(Ut||ze,0,["exit",Vn,tt[2]]),ze++,we++}if(tt[1].type==="listItemPrefix"){const dl={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};Vn=dl,J.splice(ze,0,["enter",dl,tt[2]]),ze++,we++,kt=void 0,Zt=!0}}}return J[ie][1]._spread=en,we}function o(J,ie){return we;function we(ze){h.call(this,J(ze),ze),ie&&ie.call(this,ze)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(J,ie,we){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ie,we||void 0]),J.position={start:Bl(ie.start),end:void 0}}function p(J){return ie;function ie(we){J&&J.call(this,we),m.call(this,we)}}function m(J,ie){const we=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==J.type&&(ie?ie.call(this,J,ze[0]):(ze[1]||Kg).call(this,J,ze[0]));else throw new Error("Cannot close `"+J.type+"` ("+pr({start:J.start,end:J.end})+"): it’s not open");we.position.end=Bl(J.end)}function b(){return Qf(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function k(J){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function v(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=J}function _(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=J}function M(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function H(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J.replace(/(\r?\n|\r)$/g,"")}function Y(J){const ie=this.resume(),we=this.stack[this.stack.length-1];we.label=ie,we.identifier=Tn(this.sliceSerialize(J)).toLowerCase()}function q(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.title=J}function ae(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.url=J}function W(J){const ie=this.stack[this.stack.length-1];if(!ie.depth){const we=this.sliceSerialize(J).length;ie.depth=we}}function z(){this.data.setextHeadingSlurpLineEnding=!0}function P(J){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function ce(J){const we=this.stack[this.stack.length-1].children;let ze=we[we.length-1];(!ze||ze.type!=="text")&&(ze=Bt(),ze.position={start:Bl(J.start),end:void 0},we.push(ze)),this.stack.push(ze)}function O(J){const ie=this.stack.pop();ie.value+=this.sliceSerialize(J),ie.position.end=Bl(J.end)}function I(J){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=ie.children[ie.children.length-1];we.position.end=Bl(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ie.type)&&(ce.call(this,J),O.call(this,J))}function X(){this.data.atHardBreak=!0}function he(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J}function re(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J}function te(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J}function j(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ie,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function G(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ie,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ue(J){const ie=this.sliceSerialize(J),we=this.stack[this.stack.length-2];we.label=LS(ie),we.identifier=Tn(ie).toLowerCase()}function ke(){const J=this.stack[this.stack.length-1],ie=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const ze=J.children;we.children=ze}else we.alt=ie}function E(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.url=J}function A(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.title=J}function F(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function ee(J){const ie=this.resume(),we=this.stack[this.stack.length-1];we.label=ie,we.identifier=Tn(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function ye(J){this.data.characterReferenceType=J.type}function me(J){const ie=this.sliceSerialize(J),we=this.data.characterReferenceType;let ze;we?(ze=ax(ie,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=Gf(ie);const Ge=this.stack[this.stack.length-1];Ge.value+=ze}function je(J){const ie=this.stack.pop();ie.position.end=Bl(J.end)}function Ve(J){O.call(this,J);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(J)}function Qe(J){O.call(this,J);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(J)}function zt(){return{type:"blockquote",children:[]}}function En(){return{type:"code",lang:null,meta:null,value:""}}function Dn(){return{type:"inlineCode",value:""}}function et(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ot(){return{type:"emphasis",children:[]}}function fn(){return{type:"heading",depth:0,children:[]}}function dn(){return{type:"break"}}function fl(){return{type:"html",value:""}}function ha(){return{type:"image",title:null,url:"",alt:null}}function ma(){return{type:"link",title:null,url:"",children:[]}}function pa(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function pi(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Ss(){return{type:"paragraph",children:[]}}function ws(){return{type:"strong",children:[]}}function Bt(){return{type:"text",value:""}}function _s(){return{type:"thematicBreak"}}}function Bl(t){return{line:t.line,column:t.column,offset:t.offset}}function px(t,l){let i=-1;for(;++i<l.length;){const r=l[i];Array.isArray(r)?px(t,r):qS(t,r)}}function qS(t,l){let i;for(i in l)if(mx.call(l,i))switch(i){case"canContainEols":{const r=l[i];r&&t[i].push(...r);break}case"transforms":{const r=l[i];r&&t[i].push(...r);break}case"enter":case"exit":{const r=l[i];r&&Object.assign(t[i],r);break}}}function Kg(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+pr({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+pr({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+pr({start:l.start,end:l.end})+") is still open")}function VS(t){const l=this;l.parser=i;function i(r){return US(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function YS(t,l){const i={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,i),t.applyData(l,i)}function IS(t,l){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,i),[t.applyData(l,i),{type:"text",value:`
|
|
53
|
+
`}]}function ZS(t,l){const i=l.value?l.value+`
|
|
54
|
+
`:"",r={},s=l.lang?l.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return l.meta&&(o.data={meta:l.meta}),t.patch(l,o),o=t.applyData(l,o),o={type:"element",tagName:"pre",properties:{},children:[o]},t.patch(l,o),o}function FS(t,l){const i={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function QS(t,l){const i={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function GS(t,l){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),s=mi(r.toLowerCase()),o=t.footnoteOrder.indexOf(r);let f,h=t.footnoteCounts.get(r);h===void 0?(h=0,t.footnoteOrder.push(r),f=t.footnoteOrder.length):f=o+1,h+=1,t.footnoteCounts.set(r,h);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+s,id:i+"fnref-"+s+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};t.patch(l,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(l,m),t.applyData(l,m)}function XS(t,l){const i={type:"element",tagName:"h"+l.depth,properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function JS(t,l){if(t.options.allowDangerousHtml){const i={type:"raw",value:l.value};return t.patch(l,i),t.applyData(l,i)}}function gx(t,l){const i=l.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+r}];const s=t.all(l),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const f=s[s.length-1];return f&&f.type==="text"?f.value+=r:s.push({type:"text",value:r}),s}function KS(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return gx(t,l);const s={src:mi(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return t.patch(l,o),t.applyData(l,o)}function $S(t,l){const i={src:mi(l.url)};l.alt!==null&&l.alt!==void 0&&(i.alt=l.alt),l.title!==null&&l.title!==void 0&&(i.title=l.title);const r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(l,r),t.applyData(l,r)}function PS(t,l){const i={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};t.patch(l,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(l,r),t.applyData(l,r)}function WS(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return gx(t,l);const s={href:mi(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:t.all(l)};return t.patch(l,o),t.applyData(l,o)}function ew(t,l){const i={href:mi(l.url)};l.title!==null&&l.title!==void 0&&(i.title=l.title);const r={type:"element",tagName:"a",properties:i,children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function tw(t,l,i){const r=t.all(l),s=i?nw(i):yx(l),o={},f=[];if(typeof l.checked=="boolean"){const b=r[0];let y;b&&b.type==="element"&&b.tagName==="p"?y=b:(y={type:"element",tagName:"p",properties:{},children:[]},r.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let h=-1;for(;++h<r.length;){const b=r[h];(s||h!==0||b.type!=="element"||b.tagName!=="p")&&f.push({type:"text",value:`
|
|
55
|
+
`}),b.type==="element"&&b.tagName==="p"&&!s?f.push(...b.children):f.push(b)}const p=r[r.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&f.push({type:"text",value:`
|
|
56
|
+
`});const m={type:"element",tagName:"li",properties:o,children:f};return t.patch(l,m),t.applyData(l,m)}function nw(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const i=t.children;let r=-1;for(;!l&&++r<i.length;)l=yx(i[r])}return l}function yx(t){const l=t.spread;return l??t.children.length>1}function lw(t,l){const i={},r=t.all(l);let s=-1;for(typeof l.start=="number"&&l.start!==1&&(i.start=l.start);++s<r.length;){const f=r[s];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const o={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:t.wrap(r,!0)};return t.patch(l,o),t.applyData(l,o)}function aw(t,l){const i={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function iw(t,l){const i={type:"root",children:t.wrap(t.all(l))};return t.patch(l,i),t.applyData(l,i)}function rw(t,l){const i={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function uw(t,l){const i=t.all(l),r=i.shift(),s=[];if(r){const f={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(l.children[0],f),s.push(f)}if(i.length>0){const f={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},h=Yf(l.children[1]),p=Ky(l.children[l.children.length-1]);h&&p&&(f.position={start:h,end:p}),s.push(f)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(l,o),t.applyData(l,o)}function sw(t,l,i){const r=i?i.children:void 0,o=(r?r.indexOf(l):1)===0?"th":"td",f=i&&i.type==="table"?i.align:void 0,h=f?f.length:l.children.length;let p=-1;const m=[];for(;++p<h;){const y=l.children[p],k={},v=f?f[p]:void 0;v&&(k.align=v);let _={type:"element",tagName:o,properties:k,children:[]};y&&(_.children=t.all(y),t.patch(y,_),_=t.applyData(y,_)),m.push(_)}const b={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(l,b),t.applyData(l,b)}function ow(t,l){const i={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}const $g=9,Pg=32;function cw(t){const l=String(t),i=/\r?\n|\r/g;let r=i.exec(l),s=0;const o=[];for(;r;)o.push(Wg(l.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=i.exec(l);return o.push(Wg(l.slice(s),s>0,!1)),o.join("")}function Wg(t,l,i){let r=0,s=t.length;if(l){let o=t.codePointAt(r);for(;o===$g||o===Pg;)r++,o=t.codePointAt(r)}if(i){let o=t.codePointAt(s-1);for(;o===$g||o===Pg;)s--,o=t.codePointAt(s-1)}return s>r?t.slice(r,s):""}function fw(t,l){const i={type:"text",value:cw(String(l.value))};return t.patch(l,i),t.applyData(l,i)}function dw(t,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,i),t.applyData(l,i)}const hw={blockquote:YS,break:IS,code:ZS,delete:FS,emphasis:QS,footnoteReference:GS,heading:XS,html:JS,imageReference:KS,image:$S,inlineCode:PS,linkReference:WS,link:ew,listItem:tw,list:lw,paragraph:aw,root:iw,strong:rw,table:uw,tableCell:ow,tableRow:sw,text:fw,thematicBreak:dw,toml:Yu,yaml:Yu,definition:Yu,footnoteDefinition:Yu};function Yu(){}const xx=-1,xs=0,yr=1,us=2,Jf=3,Kf=4,$f=5,Pf=6,bx=7,vx=8,mw=typeof self=="object"?self:globalThis,ey=(t,l)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new mw[t](l)},pw=(t,l)=>{const i=(s,o)=>(t.set(o,s),s),r=s=>{if(t.has(s))return t.get(s);const[o,f]=l[s];switch(o){case xs:case xx:return i(f,s);case yr:{const h=i([],s);for(const p of f)h.push(r(p));return h}case us:{const h=i({},s);for(const[p,m]of f)h[r(p)]=r(m);return h}case Jf:return i(new Date(f),s);case Kf:{const{source:h,flags:p}=f;return i(new RegExp(h,p),s)}case $f:{const h=i(new Map,s);for(const[p,m]of f)h.set(r(p),r(m));return h}case Pf:{const h=i(new Set,s);for(const p of f)h.add(r(p));return h}case bx:{const{name:h,message:p}=f;return i(ey(h,p),s)}case vx:return i(BigInt(f),s);case"BigInt":return i(Object(BigInt(f)),s);case"ArrayBuffer":return i(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:h}=new Uint8Array(f);return i(new DataView(h),f)}}return i(ey(o,f),s)};return r},ty=t=>pw(new Map,t)(0),ua="",{toString:gw}={},{keys:yw}=Object,dr=t=>{const l=typeof t;if(l!=="object"||!t)return[xs,l];const i=gw.call(t).slice(8,-1);switch(i){case"Array":return[yr,ua];case"Object":return[us,ua];case"Date":return[Jf,ua];case"RegExp":return[Kf,ua];case"Map":return[$f,ua];case"Set":return[Pf,ua];case"DataView":return[yr,i]}return i.includes("Array")?[yr,i]:i.includes("Error")?[bx,i]:[us,i]},Iu=([t,l])=>t===xs&&(l==="function"||l==="symbol"),xw=(t,l,i,r)=>{const s=(f,h)=>{const p=r.push(f)-1;return i.set(h,p),p},o=f=>{if(i.has(f))return i.get(f);let[h,p]=dr(f);switch(h){case xs:{let b=f;switch(p){case"bigint":h=vx,b=f.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);b=null;break;case"undefined":return s([xx],f)}return s([h,b],f)}case yr:{if(p){let k=f;return p==="DataView"?k=new Uint8Array(f.buffer):p==="ArrayBuffer"&&(k=new Uint8Array(f)),s([p,[...k]],f)}const b=[],y=s([h,b],f);for(const k of f)b.push(o(k));return y}case us:{if(p)switch(p){case"BigInt":return s([p,f.toString()],f);case"Boolean":case"Number":case"String":return s([p,f.valueOf()],f)}if(l&&"toJSON"in f)return o(f.toJSON());const b=[],y=s([h,b],f);for(const k of yw(f))(t||!Iu(dr(f[k])))&&b.push([o(k),o(f[k])]);return y}case Jf:return s([h,isNaN(f.getTime())?ua:f.toISOString()],f);case Kf:{const{source:b,flags:y}=f;return s([h,{source:b,flags:y}],f)}case $f:{const b=[],y=s([h,b],f);for(const[k,v]of f)(t||!(Iu(dr(k))||Iu(dr(v))))&&b.push([o(k),o(v)]);return y}case Pf:{const b=[],y=s([h,b],f);for(const k of f)(t||!Iu(dr(k)))&&b.push(o(k));return y}}const{message:m}=f;return s([h,{name:p,message:m}],f)};return o},ny=(t,{json:l,lossy:i}={})=>{const r=[];return xw(!(l||i),!!l,new Map,r)(t),r},ss=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?ty(ny(t,l)):structuredClone(t):(t,l)=>ty(ny(t,l));function bw(t,l){const i=[{type:"text",value:"↩"}];return l>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),i}function vw(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function kw(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||bw,r=t.options.footnoteBackLabel||vw,s=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",f=t.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const b=t.all(m),y=String(m.identifier).toUpperCase(),k=mi(y.toLowerCase());let v=0;const _=[],M=t.footnoteCounts.get(y);for(;M!==void 0&&++v<=M;){_.length>0&&_.push({type:"text",value:" "});let Y=typeof i=="string"?i:i(p,v);typeof Y=="string"&&(Y={type:"text",value:Y}),_.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+k+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,v),className:["data-footnote-backref"]},children:Array.isArray(Y)?Y:[Y]})}const H=b[b.length-1];if(H&&H.type==="element"&&H.tagName==="p"){const Y=H.children[H.children.length-1];Y&&Y.type==="text"?Y.value+=" ":H.children.push({type:"text",value:" "}),H.children.push(..._)}else b.push(..._);const T={type:"element",tagName:"li",properties:{id:l+"fn-"+k},children:t.wrap(b,!0)};t.patch(m,T),h.push(T)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ss(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
57
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(h,!0)},{type:"text",value:`
|
|
58
|
+
`}]}}const bs=(function(t){if(t==null)return Ew;if(typeof t=="function")return vs(t);if(typeof t=="object")return Array.isArray(t)?Sw(t):ww(t);if(typeof t=="string")return _w(t);throw new Error("Expected function, string, or object as test")});function Sw(t){const l=[];let i=-1;for(;++i<t.length;)l[i]=bs(t[i]);return vs(r);function r(...s){let o=-1;for(;++o<l.length;)if(l[o].apply(this,s))return!0;return!1}}function ww(t){const l=t;return vs(i);function i(r){const s=r;let o;for(o in t)if(s[o]!==l[o])return!1;return!0}}function _w(t){return vs(l);function l(i){return i&&i.type===t}}function vs(t){return l;function l(i,r,s){return!!(Cw(i)&&t.call(this,i,typeof r=="number"?r:void 0,s||void 0))}}function Ew(){return!0}function Cw(t){return t!==null&&typeof t=="object"&&"type"in t}const kx=[],Aw=!0,Cf=!1,Nw="skip";function Sx(t,l,i,r){let s;typeof l=="function"&&typeof i!="function"?(r=i,i=l):s=l;const o=bs(s),f=r?-1:1;h(t,void 0,[])();function h(p,m,b){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(k,"name",{value:"node ("+(p.type+(v?"<"+v+">":""))+")"})}return k;function k(){let v=kx,_,M,H;if((!l||o(p,m,b[b.length-1]||void 0))&&(v=jw(i(p,b)),v[0]===Cf))return v;if("children"in p&&p.children){const T=p;if(T.children&&v[0]!==Nw)for(M=(r?T.children.length:-1)+f,H=b.concat(T);M>-1&&M<T.children.length;){const Y=T.children[M];if(_=h(Y,M,H)(),_[0]===Cf)return _;M=typeof _[1]=="number"?_[1]:M+f}}return v}}}function jw(t){return Array.isArray(t)?t:typeof t=="number"?[Aw,t]:t==null?kx:[t]}function Wf(t,l,i,r){let s,o,f;typeof l=="function"&&typeof i!="function"?(o=void 0,f=l,s=i):(o=l,f=i,s=r),Sx(t,o,h,s);function h(p,m){const b=m[m.length-1],y=b?b.children.indexOf(p):void 0;return f(p,y,b)}}const Af={}.hasOwnProperty,Tw={};function Dw(t,l){const i=l||Tw,r=new Map,s=new Map,o=new Map,f={...hw,...i.handlers},h={all:m,applyData:Ow,definitionById:r,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:f,one:p,options:i,patch:zw,wrap:Rw};return Wf(t,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const y=b.type==="definition"?r:s,k=String(b.identifier).toUpperCase();y.has(k)||y.set(k,b)}}),h;function p(b,y){const k=b.type,v=h.handlers[k];if(Af.call(h.handlers,k)&&v)return v(h,b,y);if(h.options.passThrough&&h.options.passThrough.includes(k)){if("children"in b){const{children:M,...H}=b,T=ss(H);return T.children=h.all(b),T}return ss(b)}return(h.options.unknownHandler||Mw)(h,b,y)}function m(b){const y=[];if("children"in b){const k=b.children;let v=-1;for(;++v<k.length;){const _=h.one(k[v],b);if(_){if(v&&k[v-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=ly(_.value)),!Array.isArray(_)&&_.type==="element")){const M=_.children[0];M&&M.type==="text"&&(M.value=ly(M.value))}Array.isArray(_)?y.push(..._):y.push(_)}}}return y}}function zw(t,l){t.position&&(l.position=b2(t))}function Ow(t,l){let i=l;if(t&&t.data){const r=t.data.hName,s=t.data.hChildren,o=t.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const f="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:f}}i.type==="element"&&o&&Object.assign(i.properties,ss(o)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function Mw(t,l){const i=l.data||{},r="value"in l&&!(Af.call(i,"hProperties")||Af.call(i,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function Rw(t,l){const i=[];let r=-1;for(l&&i.push({type:"text",value:`
|
|
59
|
+
`});++r<t.length;)r&&i.push({type:"text",value:`
|
|
60
|
+
`}),i.push(t[r]);return l&&t.length>0&&i.push({type:"text",value:`
|
|
61
|
+
`}),i}function ly(t){let l=0,i=t.charCodeAt(l);for(;i===9||i===32;)l++,i=t.charCodeAt(l);return t.slice(l)}function ay(t,l){const i=Dw(t,l),r=i.one(t,void 0),s=kw(i),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
|
|
62
|
+
`},s),o}function Lw(t,l){return t&&"run"in t?async function(i,r){const s=ay(i,{file:r,...l});await t.run(s,r)}:function(i,r){return ay(i,{file:r,...t||l})}}function iy(t){if(t)throw t}var $c,ry;function Bw(){if(ry)return $c;ry=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},o=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var b=t.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!y)return!1;var k;for(k in m);return typeof k>"u"||t.call(m,k)},f=function(m,b){i&&b.name==="__proto__"?i(m,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):m[b.name]=b.newValue},h=function(m,b){if(b==="__proto__")if(t.call(m,b)){if(r)return r(m,b).value}else return;return m[b]};return $c=function p(){var m,b,y,k,v,_,M=arguments[0],H=1,T=arguments.length,Y=!1;for(typeof M=="boolean"&&(Y=M,M=arguments[1]||{},H=2),(M==null||typeof M!="object"&&typeof M!="function")&&(M={});H<T;++H)if(m=arguments[H],m!=null)for(b in m)y=h(M,b),k=h(m,b),M!==k&&(Y&&k&&(o(k)||(v=s(k)))?(v?(v=!1,_=y&&s(y)?y:[]):_=y&&o(y)?y:{},f(M,{name:b,newValue:p(Y,_,k)})):typeof k<"u"&&f(M,{name:b,newValue:k}));return M},$c}var Uw=Bw();const Pc=Ey(Uw);function Nf(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Hw(){const t=[],l={run:i,use:r};return l;function i(...s){let o=-1;const f=s.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);h(null,...s);function h(p,...m){const b=t[++o];let y=-1;if(p){f(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,b?qw(b,h)(...m):f(null,...m)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),l}}function qw(t,l){let i;return r;function r(...f){const h=t.length>f.length;let p;h&&f.push(s);try{p=t.apply(this,f)}catch(m){const b=m;if(h&&i)throw b;return s(b)}h||(p&&p.then&&typeof p.then=="function"?p.then(o,s):p instanceof Error?s(p):o(p))}function s(f,...h){i||(i=!0,l(f,...h))}function o(f){s(null,f)}}const Ln={basename:Vw,dirname:Yw,extname:Iw,join:Zw,sep:"/"};function Vw(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');Er(t);let i=0,r=-1,s=t.length,o;if(l===void 0||l.length===0||l.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(o){i=s+1;break}}else r<0&&(o=!0,r=s+1);return r<0?"":t.slice(i,r)}if(l===t)return"";let f=-1,h=l.length-1;for(;s--;)if(t.codePointAt(s)===47){if(o){i=s+1;break}}else f<0&&(o=!0,f=s+1),h>-1&&(t.codePointAt(s)===l.codePointAt(h--)?h<0&&(r=s):(h=-1,r=f));return i===r?r=f:r<0&&(r=t.length),t.slice(i,r)}function Yw(t){if(Er(t),t.length===0)return".";let l=-1,i=t.length,r;for(;--i;)if(t.codePointAt(i)===47){if(r){l=i;break}}else r||(r=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function Iw(t){Er(t);let l=t.length,i=-1,r=0,s=-1,o=0,f;for(;l--;){const h=t.codePointAt(l);if(h===47){if(f){r=l+1;break}continue}i<0&&(f=!0,i=l+1),h===46?s<0?s=l:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||i<0||o===0||o===1&&s===i-1&&s===r+1?"":t.slice(s,i)}function Zw(...t){let l=-1,i;for(;++l<t.length;)Er(t[l]),t[l]&&(i=i===void 0?t[l]:i+"/"+t[l]);return i===void 0?".":Fw(i)}function Fw(t){Er(t);const l=t.codePointAt(0)===47;let i=Qw(t,!l);return i.length===0&&!l&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),l?"/"+i:i}function Qw(t,l){let i="",r=0,s=-1,o=0,f=-1,h,p;for(;++f<=t.length;){if(f<t.length)h=t.codePointAt(f);else{if(h===47)break;h=47}if(h===47){if(!(s===f-1||o===1))if(s!==f-1&&o===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",r=0):(i=i.slice(0,p),r=i.length-1-i.lastIndexOf("/")),s=f,o=0;continue}}else if(i.length>0){i="",r=0,s=f,o=0;continue}}l&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+t.slice(s+1,f):i=t.slice(s+1,f),r=f-s-1;s=f,o=0}else h===46&&o>-1?o++:o=-1}return i}function Er(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Gw={cwd:Xw};function Xw(){return"/"}function jf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Jw(t){if(typeof t=="string")t=new URL(t);else if(!jf(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return Kw(t)}function Kw(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const l=t.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const r=l.codePointAt(i+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(l)}const Wc=["history","path","basename","stem","extname","dirname"];class wx{constructor(l){let i;l?jf(l)?i={path:l}:typeof l=="string"||$w(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":Gw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Wc.length;){const o=Wc[r];o in i&&i[o]!==void 0&&i[o]!==null&&(this[o]=o==="history"?[...i[o]]:i[o])}let s;for(s in i)Wc.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?Ln.basename(this.path):void 0}set basename(l){tf(l,"basename"),ef(l,"basename"),this.path=Ln.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Ln.dirname(this.path):void 0}set dirname(l){uy(this.basename,"dirname"),this.path=Ln.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Ln.extname(this.path):void 0}set extname(l){if(ef(l,"extname"),uy(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ln.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){jf(l)&&(l=Jw(l)),tf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Ln.basename(this.path,this.extname):void 0}set stem(l){tf(l,"stem"),ef(l,"stem"),this.path=Ln.join(this.dirname||"",l+(this.extname||""))}fail(l,i,r){const s=this.message(l,i,r);throw s.fatal=!0,s}info(l,i,r){const s=this.message(l,i,r);return s.fatal=void 0,s}message(l,i,r){const s=new Lt(l,i,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function ef(t,l){if(t&&t.includes(Ln.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Ln.sep+"`")}function tf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function uy(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function $w(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Pw=(function(t){const r=this.constructor.prototype,s=r[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Ww={}.hasOwnProperty;class ed extends Pw{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Hw()}copy(){const l=new ed;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];l.use(...r)}return l.data(Pc(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(af("data",this.frozen),this.namespace[l]=i,this):Ww.call(this.namespace,l)&&this.namespace[l]||void 0:l?(af("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=i.call(l,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=Zu(l),r=this.parser||this.Parser;return nf("parse",r),r(String(i),i)}process(l,i){const r=this;return this.freeze(),nf("process",this.parser||this.Parser),lf("process",this.compiler||this.Compiler),i?s(void 0,i):new Promise(s);function s(o,f){const h=Zu(l),p=r.parse(h);r.run(p,h,function(b,y,k){if(b||!y||!k)return m(b);const v=y,_=r.stringify(v,k);n4(_)?k.value=_:k.result=_,m(b,k)});function m(b,y){b||!y?f(b):o?o(y):i(void 0,y)}}}processSync(l){let i=!1,r;return this.freeze(),nf("processSync",this.parser||this.Parser),lf("processSync",this.compiler||this.Compiler),this.process(l,s),oy("processSync","process",i),r;function s(o,f){i=!0,iy(o),r=f}}run(l,i,r){sy(l),this.freeze();const s=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?o(void 0,r):new Promise(o);function o(f,h){const p=Zu(i);s.run(l,p,m);function m(b,y,k){const v=y||l;b?h(b):f?f(v):r(void 0,v,k)}}}runSync(l,i){let r=!1,s;return this.run(l,i,o),oy("runSync","run",r),s;function o(f,h){iy(f),s=h,r=!0}}stringify(l,i){this.freeze();const r=Zu(i),s=this.compiler||this.Compiler;return lf("stringify",s),sy(l),s(l,r)}use(l,...i){const r=this.attachers,s=this.namespace;if(af("use",this.frozen),l!=null)if(typeof l=="function")p(l,i);else if(typeof l=="object")Array.isArray(l)?h(l):f(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function o(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[b,...y]=m;p(b,y)}else f(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function f(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");h(m.plugins),m.settings&&(s.settings=Pc(!0,s.settings,m.settings))}function h(m){let b=-1;if(m!=null)if(Array.isArray(m))for(;++b<m.length;){const y=m[b];o(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,b){let y=-1,k=-1;for(;++y<r.length;)if(r[y][0]===m){k=y;break}if(k===-1)r.push([m,...b]);else if(b.length>0){let[v,..._]=b;const M=r[k][1];Nf(M)&&Nf(v)&&(v=Pc(!0,M,v)),r[k]=[m,v,..._]}}}}const e4=new ed().freeze();function nf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function lf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function af(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function sy(t){if(!Nf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function oy(t,l,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function Zu(t){return t4(t)?t:new wx(t)}function t4(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function n4(t){return typeof t=="string"||l4(t)}function l4(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const a4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",cy=[],fy={allowDangerousHtml:!0},i4=/^(https?|ircs?|mailto|xmpp)$/i,r4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function u4(t){const l=s4(t),i=o4(t);return c4(l.runSync(l.parse(i),i),t)}function s4(t){const l=t.rehypePlugins||cy,i=t.remarkPlugins||cy,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...fy}:fy;return e4().use(VS).use(i).use(Lw,r).use(l)}function o4(t){const l=t.children||"",i=new wx;return typeof l=="string"&&(i.value=l),i}function c4(t,l){const i=l.allowedElements,r=l.allowElement,s=l.components,o=l.disallowedElements,f=l.skipHtml,h=l.unwrapDisallowed,p=l.urlTransform||f4;for(const b of r4)Object.hasOwn(l,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+a4+b.id,void 0);return Wf(t,m),_2(t,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function m(b,y,k){if(b.type==="raw"&&k&&typeof y=="number")return f?k.children.splice(y,1):k.children[y]={type:"text",value:b.value},y;if(b.type==="element"){let v;for(v in Xc)if(Object.hasOwn(Xc,v)&&Object.hasOwn(b.properties,v)){const _=b.properties[v],M=Xc[v];(M===null||M.includes(b.tagName))&&(b.properties[v]=p(String(_||""),v,b))}}if(b.type==="element"){let v=i?!i.includes(b.tagName):o?o.includes(b.tagName):!1;if(!v&&r&&typeof y=="number"&&(v=!r(b,y,k)),v&&k&&typeof y=="number")return h&&b.children?k.children.splice(y,1,...b.children):k.children.splice(y,1),y}}}function f4(t){const l=t.indexOf(":"),i=t.indexOf("?"),r=t.indexOf("#"),s=t.indexOf("/");return l===-1||s!==-1&&l>s||i!==-1&&l>i||r!==-1&&l>r||i4.test(t.slice(0,l))?t:""}function dy(t,l){const i=String(t);if(typeof l!="string")throw new TypeError("Expected character");let r=0,s=i.indexOf(l);for(;s!==-1;)r++,s=i.indexOf(l,s+l.length);return r}function d4(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function h4(t,l,i){const s=bs((i||{}).ignore||[]),o=m4(l);let f=-1;for(;++f<o.length;)Sx(t,"text",h);function h(m,b){let y=-1,k;for(;++y<b.length;){const v=b[y],_=k?k.children:void 0;if(s(v,_?_.indexOf(v):void 0,k))return;k=v}if(k)return p(m,b)}function p(m,b){const y=b[b.length-1],k=o[f][0],v=o[f][1];let _=0;const H=y.children.indexOf(m);let T=!1,Y=[];k.lastIndex=0;let q=k.exec(m.value);for(;q;){const ae=q.index,W={index:q.index,input:q.input,stack:[...b,m]};let z=v(...q,W);if(typeof z=="string"&&(z=z.length>0?{type:"text",value:z}:void 0),z===!1?k.lastIndex=ae+1:(_!==ae&&Y.push({type:"text",value:m.value.slice(_,ae)}),Array.isArray(z)?Y.push(...z):z&&Y.push(z),_=ae+q[0].length,T=!0),!k.global)break;q=k.exec(m.value)}return T?(_<m.value.length&&Y.push({type:"text",value:m.value.slice(_)}),y.children.splice(H,1,...Y)):Y=[m],H+Y.length}}function m4(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<i.length;){const s=i[r];l.push([p4(s[0]),g4(s[1])])}return l}function p4(t){return typeof t=="string"?new RegExp(d4(t),"g"):t}function g4(t){return typeof t=="function"?t:function(){return t}}const rf="phrasing",uf=["autolink","link","image","label"];function y4(){return{transforms:[_4],enter:{literalAutolink:b4,literalAutolinkEmail:sf,literalAutolinkHttp:sf,literalAutolinkWww:sf},exit:{literalAutolink:w4,literalAutolinkEmail:S4,literalAutolinkHttp:v4,literalAutolinkWww:k4}}}function x4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rf,notInConstruct:uf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rf,notInConstruct:uf},{character:":",before:"[ps]",after:"\\/",inConstruct:rf,notInConstruct:uf}]}}function b4(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function sf(t){this.config.enter.autolinkProtocol.call(this,t)}function v4(t){this.config.exit.autolinkProtocol.call(this,t)}function k4(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function S4(t){this.config.exit.autolinkEmail.call(this,t)}function w4(t){this.exit(t)}function _4(t){h4(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,E4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),C4]],{ignore:["link","linkReference"]})}function E4(t,l,i,r,s){let o="";if(!_x(s)||(/^w/i.test(l)&&(i=l+i,l="",o="http://"),!A4(i)))return!1;const f=N4(i+r);if(!f[0])return!1;const h={type:"link",title:null,url:o+l+f[0],children:[{type:"text",value:l+f[0]}]};return f[1]?[h,{type:"text",value:f[1]}]:h}function C4(t,l,i,r){return!_x(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+i,children:[{type:"text",value:l+"@"+i}]}}function A4(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function N4(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let i=l[0],r=i.indexOf(")");const s=dy(t,"(");let o=dy(t,")");for(;r!==-1&&s>o;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),o++;return[t,i]}function _x(t,l){const i=t.input.charCodeAt(t.index-1);return(t.index===0||fa(i)||gs(i))&&(!l||i!==47)}Ex.peek=B4;function j4(){this.buffer()}function T4(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function D4(){this.buffer()}function z4(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function O4(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Tn(this.sliceSerialize(t)).toLowerCase(),i.label=l}function M4(t){this.exit(t)}function R4(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Tn(this.sliceSerialize(t)).toLowerCase(),i.label=l}function L4(t){this.exit(t)}function B4(){return"["}function Ex(t,l,i,r){const s=i.createTracker(r);let o=s.move("[^");const f=i.enter("footnoteReference"),h=i.enter("reference");return o+=s.move(i.safe(i.associationId(t),{after:"]",before:o})),h(),f(),o+=s.move("]"),o}function U4(){return{enter:{gfmFootnoteCallString:j4,gfmFootnoteCall:T4,gfmFootnoteDefinitionLabelString:D4,gfmFootnoteDefinition:z4},exit:{gfmFootnoteCallString:O4,gfmFootnoteCall:M4,gfmFootnoteDefinitionLabelString:R4,gfmFootnoteDefinition:L4}}}function H4(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:i,footnoteReference:Ex},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,s,o,f){const h=o.createTracker(f);let p=h.move("[^");const m=o.enter("footnoteDefinition"),b=o.enter("label");return p+=h.move(o.safe(o.associationId(r),{before:p,after:"]"})),b(),p+=h.move("]:"),r.children&&r.children.length>0&&(h.shift(4),p+=h.move((l?`
|
|
63
|
+
`:" ")+o.indentLines(o.containerFlow(r,h.current()),l?Cx:q4))),m(),p}}function q4(t,l,i){return l===0?t:Cx(t,l,i)}function Cx(t,l,i){return(i?"":" ")+t}const V4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ax.peek=Q4;function Y4(){return{canContainEols:["delete"],enter:{strikethrough:Z4},exit:{strikethrough:F4}}}function I4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:V4}],handlers:{delete:Ax}}}function Z4(t){this.enter({type:"delete",children:[]},t)}function F4(t){this.exit(t)}function Ax(t,l,i,r){const s=i.createTracker(r),o=i.enter("strikethrough");let f=s.move("~~");return f+=i.containerPhrasing(t,{...s.current(),before:f,after:"~"}),f+=s.move("~~"),o(),f}function Q4(){return"~"}function G4(t){return t.length}function X4(t,l){const i=l||{},r=(i.align||[]).concat(),s=i.stringLength||G4,o=[],f=[],h=[],p=[];let m=0,b=-1;for(;++b<t.length;){const M=[],H=[];let T=-1;for(t[b].length>m&&(m=t[b].length);++T<t[b].length;){const Y=J4(t[b][T]);if(i.alignDelimiters!==!1){const q=s(Y);H[T]=q,(p[T]===void 0||q>p[T])&&(p[T]=q)}M.push(Y)}f[b]=M,h[b]=H}let y=-1;if(typeof r=="object"&&"length"in r)for(;++y<m;)o[y]=hy(r[y]);else{const M=hy(r);for(;++y<m;)o[y]=M}y=-1;const k=[],v=[];for(;++y<m;){const M=o[y];let H="",T="";M===99?(H=":",T=":"):M===108?H=":":M===114&&(T=":");let Y=i.alignDelimiters===!1?1:Math.max(1,p[y]-H.length-T.length);const q=H+"-".repeat(Y)+T;i.alignDelimiters!==!1&&(Y=H.length+Y+T.length,Y>p[y]&&(p[y]=Y),v[y]=Y),k[y]=q}f.splice(1,0,k),h.splice(1,0,v),b=-1;const _=[];for(;++b<f.length;){const M=f[b],H=h[b];y=-1;const T=[];for(;++y<m;){const Y=M[y]||"";let q="",ae="";if(i.alignDelimiters!==!1){const W=p[y]-(H[y]||0),z=o[y];z===114?q=" ".repeat(W):z===99?W%2?(q=" ".repeat(W/2+.5),ae=" ".repeat(W/2-.5)):(q=" ".repeat(W/2),ae=q):ae=" ".repeat(W)}i.delimiterStart!==!1&&!y&&T.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&Y==="")&&(i.delimiterStart!==!1||y)&&T.push(" "),i.alignDelimiters!==!1&&T.push(q),T.push(Y),i.alignDelimiters!==!1&&T.push(ae),i.padding!==!1&&T.push(" "),(i.delimiterEnd!==!1||y!==m-1)&&T.push("|")}_.push(i.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return _.join(`
|
|
64
|
+
`)}function J4(t){return t==null?"":String(t)}function hy(t){const l=typeof t=="string"?t.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function K4(t,l,i,r){const s=i.enter("blockquote"),o=i.createTracker(r);o.move("> "),o.shift(2);const f=i.indentLines(i.containerFlow(t,o.current()),$4);return s(),f}function $4(t,l,i){return">"+(i?"":" ")+t}function P4(t,l){return my(t,l.inConstruct,!0)&&!my(t,l.notInConstruct,!1)}function my(t,l,i){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return i;let r=-1;for(;++r<l.length;)if(t.includes(l[r]))return!0;return!1}function py(t,l,i,r){let s=-1;for(;++s<i.unsafe.length;)if(i.unsafe[s].character===`
|
|
65
|
+
`&&P4(i.stack,i.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
66
|
+
`}function W4(t,l){const i=String(t);let r=i.indexOf(l),s=r,o=0,f=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++o>f&&(f=o):o=1,s=r+l.length,r=i.indexOf(l,s);return f}function e_(t,l){return!!(l.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function t_(t){const l=t.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function n_(t,l,i,r){const s=t_(i),o=t.value||"",f=s==="`"?"GraveAccent":"Tilde";if(e_(t,i)){const y=i.enter("codeIndented"),k=i.indentLines(o,l_);return y(),k}const h=i.createTracker(r),p=s.repeat(Math.max(W4(o,s)+1,3)),m=i.enter("codeFenced");let b=h.move(p);if(t.lang){const y=i.enter(`codeFencedLang${f}`);b+=h.move(i.safe(t.lang,{before:b,after:" ",encode:["`"],...h.current()})),y()}if(t.lang&&t.meta){const y=i.enter(`codeFencedMeta${f}`);b+=h.move(" "),b+=h.move(i.safe(t.meta,{before:b,after:`
|
|
67
|
+
`,encode:["`"],...h.current()})),y()}return b+=h.move(`
|
|
68
|
+
`),o&&(b+=h.move(o+`
|
|
69
|
+
`)),b+=h.move(p),m(),b}function l_(t,l,i){return(i?"":" ")+t}function td(t){const l=t.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function a_(t,l,i,r){const s=td(i),o=s==='"'?"Quote":"Apostrophe",f=i.enter("definition");let h=i.enter("label");const p=i.createTracker(r);let m=p.move("[");return m+=p.move(i.safe(i.associationId(t),{before:m,after:"]",...p.current()})),m+=p.move("]: "),h(),!t.url||/[\0- \u007F]/.test(t.url)?(h=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":`
|
|
70
|
+
`,...p.current()}))),h(),t.title&&(h=i.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(i.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),f(),m}function i_(t){const l=t.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function kr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function os(t,l,i){const r=fi(t),s=fi(l);return r===void 0?s===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Nx.peek=r_;function Nx(t,l,i,r){const s=i_(i),o=i.enter("emphasis"),f=i.createTracker(r),h=f.move(s);let p=f.move(i.containerPhrasing(t,{after:s,before:h,...f.current()}));const m=p.charCodeAt(0),b=os(r.before.charCodeAt(r.before.length-1),m,s);b.inside&&(p=kr(m)+p.slice(1));const y=p.charCodeAt(p.length-1),k=os(r.after.charCodeAt(0),y,s);k.inside&&(p=p.slice(0,-1)+kr(y));const v=f.move(s);return o(),i.attentionEncodeSurroundingInfo={after:k.outside,before:b.outside},h+p+v}function r_(t,l,i){return i.options.emphasis||"*"}function u_(t,l){let i=!1;return Wf(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,Cf}),!!((!t.depth||t.depth<3)&&Qf(t)&&(l.options.setext||i))}function s_(t,l,i,r){const s=Math.max(Math.min(6,t.depth||1),1),o=i.createTracker(r);if(u_(t,i)){const b=i.enter("headingSetext"),y=i.enter("phrasing"),k=i.containerPhrasing(t,{...o.current(),before:`
|
|
71
|
+
`,after:`
|
|
72
|
+
`});return y(),b(),k+`
|
|
73
|
+
`+(s===1?"=":"-").repeat(k.length-(Math.max(k.lastIndexOf("\r"),k.lastIndexOf(`
|
|
74
|
+
`))+1))}const f="#".repeat(s),h=i.enter("headingAtx"),p=i.enter("phrasing");o.move(f+" ");let m=i.containerPhrasing(t,{before:"# ",after:`
|
|
75
|
+
`,...o.current()});return/^[\t ]/.test(m)&&(m=kr(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,i.options.closeAtx&&(m+=" "+f),p(),h(),m}jx.peek=o_;function jx(t){return t.value||""}function o_(){return"<"}Tx.peek=c_;function Tx(t,l,i,r){const s=td(i),o=s==='"'?"Quote":"Apostrophe",f=i.enter("image");let h=i.enter("label");const p=i.createTracker(r);let m=p.move("![");return m+=p.move(i.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),h(),t.title&&(h=i.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(i.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),m+=p.move(")"),f(),m}function c_(){return"!"}Dx.peek=f_;function Dx(t,l,i,r){const s=t.referenceType,o=i.enter("imageReference");let f=i.enter("label");const h=i.createTracker(r);let p=h.move("![");const m=i.safe(t.alt,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),f();const b=i.stack;i.stack=[],f=i.enter("reference");const y=i.safe(i.associationId(t),{before:p,after:"]",...h.current()});return f(),i.stack=b,o(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function f_(){return"!"}zx.peek=d_;function zx(t,l,i){let r=t.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<i.unsafe.length;){const f=i.unsafe[o],h=i.compilePattern(f);let p;if(f.atBreak)for(;p=h.exec(r);){let m=p.index;r.charCodeAt(m)===10&&r.charCodeAt(m-1)===13&&m--,r=r.slice(0,m)+" "+r.slice(p.index+1)}}return s+r+s}function d_(){return"`"}function Ox(t,l){const i=Qf(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(i===t.url||"mailto:"+i===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Mx.peek=h_;function Mx(t,l,i,r){const s=td(i),o=s==='"'?"Quote":"Apostrophe",f=i.createTracker(r);let h,p;if(Ox(t,i)){const b=i.stack;i.stack=[],h=i.enter("autolink");let y=f.move("<");return y+=f.move(i.containerPhrasing(t,{before:y,after:">",...f.current()})),y+=f.move(">"),h(),i.stack=b,y}h=i.enter("link"),p=i.enter("label");let m=f.move("[");return m+=f.move(i.containerPhrasing(t,{before:m,after:"](",...f.current()})),m+=f.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=i.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(i.safe(t.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(p=i.enter("destinationRaw"),m+=f.move(i.safe(t.url,{before:m,after:t.title?" ":")",...f.current()}))),p(),t.title&&(p=i.enter(`title${o}`),m+=f.move(" "+s),m+=f.move(i.safe(t.title,{before:m,after:s,...f.current()})),m+=f.move(s),p()),m+=f.move(")"),h(),m}function h_(t,l,i){return Ox(t,i)?"<":"["}Rx.peek=m_;function Rx(t,l,i,r){const s=t.referenceType,o=i.enter("linkReference");let f=i.enter("label");const h=i.createTracker(r);let p=h.move("[");const m=i.containerPhrasing(t,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),f();const b=i.stack;i.stack=[],f=i.enter("reference");const y=i.safe(i.associationId(t),{before:p,after:"]",...h.current()});return f(),i.stack=b,o(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function m_(){return"["}function nd(t){const l=t.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function p_(t){const l=nd(t),i=t.options.bulletOther;if(!i)return l==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+i+"`) to be different");return i}function g_(t){const l=t.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function Lx(t){const l=t.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function y_(t,l,i,r){const s=i.enter("list"),o=i.bulletCurrent;let f=t.ordered?g_(i):nd(i);const h=t.ordered?f==="."?")":".":p_(i);let p=l&&i.bulletLastUsed?f===i.bulletLastUsed:!1;if(!t.ordered){const b=t.children?t.children[0]:void 0;if((f==="*"||f==="-")&&b&&(!b.children||!b.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(p=!0),Lx(i)===f&&b){let y=-1;for(;++y<t.children.length;){const k=t.children[y];if(k&&k.type==="listItem"&&k.children&&k.children[0]&&k.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(f=h),i.bulletCurrent=f;const m=i.containerFlow(t,r);return i.bulletLastUsed=f,i.bulletCurrent=o,s(),m}function x_(t){const l=t.options.listItemIndent||"one";if(l!=="tab"&&l!=="one"&&l!=="mixed")throw new Error("Cannot serialize items with `"+l+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return l}function b_(t,l,i,r){const s=x_(i);let o=i.bulletCurrent||nd(i);l&&l.type==="list"&&l.ordered&&(o=(typeof l.start=="number"&&l.start>-1?l.start:1)+(i.options.incrementListMarker===!1?0:l.children.indexOf(t))+o);let f=o.length+1;(s==="tab"||s==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(f=Math.ceil(f/4)*4);const h=i.createTracker(r);h.move(o+" ".repeat(f-o.length)),h.shift(f);const p=i.enter("listItem"),m=i.indentLines(i.containerFlow(t,h.current()),b);return p(),m;function b(y,k,v){return k?(v?"":" ".repeat(f))+y:(v?o:o+" ".repeat(f-o.length))+y}}function v_(t,l,i,r){const s=i.enter("paragraph"),o=i.enter("phrasing"),f=i.containerPhrasing(t,r);return o(),s(),f}const k_=bs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function S_(t,l,i,r){return(t.children.some(function(f){return k_(f)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function w_(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}Bx.peek=__;function Bx(t,l,i,r){const s=w_(i),o=i.enter("strong"),f=i.createTracker(r),h=f.move(s+s);let p=f.move(i.containerPhrasing(t,{after:s,before:h,...f.current()}));const m=p.charCodeAt(0),b=os(r.before.charCodeAt(r.before.length-1),m,s);b.inside&&(p=kr(m)+p.slice(1));const y=p.charCodeAt(p.length-1),k=os(r.after.charCodeAt(0),y,s);k.inside&&(p=p.slice(0,-1)+kr(y));const v=f.move(s+s);return o(),i.attentionEncodeSurroundingInfo={after:k.outside,before:b.outside},h+p+v}function __(t,l,i){return i.options.strong||"*"}function E_(t,l,i,r){return i.safe(t.value,r)}function C_(t){const l=t.options.ruleRepetition||3;if(l<3)throw new Error("Cannot serialize rules with repetition `"+l+"` for `options.ruleRepetition`, expected `3` or more");return l}function A_(t,l,i){const r=(Lx(i)+(i.options.ruleSpaces?" ":"")).repeat(C_(i));return i.options.ruleSpaces?r.slice(0,-1):r}const Ux={blockquote:K4,break:py,code:n_,definition:a_,emphasis:Nx,hardBreak:py,heading:s_,html:jx,image:Tx,imageReference:Dx,inlineCode:zx,link:Mx,linkReference:Rx,list:y_,listItem:b_,paragraph:v_,root:S_,strong:Bx,text:E_,thematicBreak:A_};function N_(){return{enter:{table:j_,tableData:gy,tableHeader:gy,tableRow:D_},exit:{codeText:z_,table:T_,tableData:of,tableHeader:of,tableRow:of}}}function j_(t){const l=t._align;this.enter({type:"table",align:l.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function T_(t){this.exit(t),this.data.inTable=void 0}function D_(t){this.enter({type:"tableRow",children:[]},t)}function of(t){this.exit(t)}function gy(t){this.enter({type:"tableCell",children:[]},t)}function z_(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,O_));const i=this.stack[this.stack.length-1];i.type,i.value=l,this.exit(t)}function O_(t,l){return l==="|"?l:t}function M_(t){const l=t||{},i=l.tableCellPadding,r=l.tablePipeAlign,s=l.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
76
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:k,table:f,tableCell:p,tableRow:h}};function f(v,_,M,H){return m(b(v,M,H),v.align)}function h(v,_,M,H){const T=y(v,M,H),Y=m([T]);return Y.slice(0,Y.indexOf(`
|
|
77
|
+
`))}function p(v,_,M,H){const T=M.enter("tableCell"),Y=M.enter("phrasing"),q=M.containerPhrasing(v,{...H,before:o,after:o});return Y(),T(),q}function m(v,_){return X4(v,{align:_,alignDelimiters:r,padding:i,stringLength:s})}function b(v,_,M){const H=v.children;let T=-1;const Y=[],q=_.enter("table");for(;++T<H.length;)Y[T]=y(H[T],_,M);return q(),Y}function y(v,_,M){const H=v.children;let T=-1;const Y=[],q=_.enter("tableRow");for(;++T<H.length;)Y[T]=p(H[T],v,_,M);return q(),Y}function k(v,_,M){let H=Ux.inlineCode(v,_,M);return M.stack.includes("tableCell")&&(H=H.replace(/\|/g,"\\$&")),H}}function R_(){return{exit:{taskListCheckValueChecked:yy,taskListCheckValueUnchecked:yy,paragraph:B_}}}function L_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:U_}}}function yy(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function B_(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const s=l.children;let o=-1,f;for(;++o<s.length;){const h=s[o];if(h.type==="paragraph"){f=h;break}}f===i&&(r.value=r.value.slice(1),r.value.length===0?i.children.shift():i.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,i.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function U_(t,l,i,r){const s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",f="["+(t.checked?"x":" ")+"] ",h=i.createTracker(r);o&&h.move(f);let p=Ux.listItem(t,l,i,{...r,...h.current()});return o&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(b){return b+f}}function H_(){return[y4(),U4(),Y4(),N_(),R_()]}function q_(t){return{extensions:[x4(),H4(t),I4(),M_(t),L_()]}}const V_={tokenize:G_,partial:!0},Hx={tokenize:X_,partial:!0},qx={tokenize:J_,partial:!0},Vx={tokenize:K_,partial:!0},Y_={tokenize:$_,partial:!0},Yx={name:"wwwAutolink",tokenize:F_,previous:Zx},Ix={name:"protocolAutolink",tokenize:Q_,previous:Fx},cl={name:"emailAutolink",tokenize:Z_,previous:Qx},qn={};function I_(){return{text:qn}}let ra=48;for(;ra<123;)qn[ra]=cl,ra++,ra===58?ra=65:ra===91&&(ra=97);qn[43]=cl;qn[45]=cl;qn[46]=cl;qn[95]=cl;qn[72]=[cl,Ix];qn[104]=[cl,Ix];qn[87]=[cl,Yx];qn[119]=[cl,Yx];function Z_(t,l,i){const r=this;let s,o;return f;function f(y){return!Tf(y)||!Qx.call(r,r.previous)||ld(r.events)?i(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(y))}function h(y){return Tf(y)?(t.consume(y),h):y===64?(t.consume(y),p):i(y)}function p(y){return y===46?t.check(Y_,b,m)(y):y===45||y===95||Rt(y)?(o=!0,t.consume(y),p):b(y)}function m(y){return t.consume(y),s=!0,p}function b(y){return o&&s&&Vt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(y)):i(y)}}function F_(t,l,i){const r=this;return s;function s(f){return f!==87&&f!==119||!Zx.call(r,r.previous)||ld(r.events)?i(f):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(V_,t.attempt(Hx,t.attempt(qx,o),i),i)(f))}function o(f){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(f)}}function Q_(t,l,i){const r=this;let s="",o=!1;return f;function f(y){return(y===72||y===104)&&Fx.call(r,r.previous)&&!ld(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),h):i(y)}function h(y){if(Vt(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),h;if(y===58){const k=s.toLowerCase();if(k==="http"||k==="https")return t.consume(y),p}return i(y)}function p(y){return y===47?(t.consume(y),o?m:(o=!0,p)):i(y)}function m(y){return y===null||rs(y)||at(y)||fa(y)||gs(y)?i(y):t.attempt(Hx,t.attempt(qx,b),i)(y)}function b(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(y)}}function G_(t,l,i){let r=0;return s;function s(f){return(f===87||f===119)&&r<3?(r++,t.consume(f),s):f===46&&r===3?(t.consume(f),o):i(f)}function o(f){return f===null?i(f):l(f)}}function X_(t,l,i){let r,s,o;return f;function f(m){return m===46||m===95?t.check(Vx,p,h)(m):m===null||at(m)||fa(m)||m!==45&&gs(m)?p(m):(o=!0,t.consume(m),f)}function h(m){return m===95?r=!0:(s=r,r=void 0),t.consume(m),f}function p(m){return s||r||!o?i(m):l(m)}}function J_(t,l){let i=0,r=0;return s;function s(f){return f===40?(i++,t.consume(f),s):f===41&&r<i?o(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?t.check(Vx,l,o)(f):f===null||at(f)||fa(f)?l(f):(t.consume(f),s)}function o(f){return f===41&&r++,t.consume(f),s}}function K_(t,l,i){return r;function r(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(t.consume(h),r):h===38?(t.consume(h),o):h===93?(t.consume(h),s):h===60||h===null||at(h)||fa(h)?l(h):i(h)}function s(h){return h===null||h===40||h===91||at(h)||fa(h)?l(h):r(h)}function o(h){return Vt(h)?f(h):i(h)}function f(h){return h===59?(t.consume(h),r):Vt(h)?(t.consume(h),f):i(h)}}function $_(t,l,i){return r;function r(o){return t.consume(o),s}function s(o){return Rt(o)?i(o):l(o)}}function Zx(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||at(t)}function Fx(t){return!Vt(t)}function Qx(t){return!(t===47||Tf(t))}function Tf(t){return t===43||t===45||t===46||t===95||Rt(t)}function ld(t){let l=t.length,i=!1;for(;l--;){const r=t[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){i=!0;break}if(r._gfmAutolinkLiteralWalkedInto){i=!1;break}}return t.length>0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const P_={tokenize:rE,partial:!0};function W_(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:lE,continuation:{tokenize:aE},exit:iE}},text:{91:{name:"gfmFootnoteCall",tokenize:nE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:eE,resolveTo:tE}}}}function eE(t,l,i){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let f;for(;s--;){const p=r.events[s][1];if(p.type==="labelImage"){f=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return h;function h(p){if(!f||!f._balanced)return i(p);const m=Tn(r.sliceSerialize({start:f.end,end:r.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?i(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function tE(t,l){let i=t.length;for(;i--;)if(t[i][1].type==="labelImage"&&t[i][0]==="enter"){t[i][1];break}t[i+1][1].type="data",t[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[i+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[i+3][1].end),end:Object.assign({},t[i+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},h=[t[i+1],t[i+2],["enter",r,l],t[i+3],t[i+4],["enter",s,l],["exit",s,l],["enter",o,l],["enter",f,l],["exit",f,l],["exit",o,l],t[t.length-2],t[t.length-1],["exit",r,l]];return t.splice(i,t.length-i+1,...h),t}function nE(t,l,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,f;return h;function h(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?i(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(y){if(o>999||y===93&&!f||y===null||y===91||at(y))return i(y);if(y===93){t.exit("chunkString");const k=t.exit("gfmFootnoteCallString");return s.includes(Tn(r.sliceSerialize(k)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):i(y)}return at(y)||(f=!0),o++,t.consume(y),y===92?b:m}function b(y){return y===91||y===92||y===93?(t.consume(y),o++,m):m(y)}}function lE(t,l,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,f=0,h;return p;function p(_){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(_){return _===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",b):i(_)}function b(_){if(f>999||_===93&&!h||_===null||_===91||at(_))return i(_);if(_===93){t.exit("chunkString");const M=t.exit("gfmFootnoteDefinitionLabelString");return o=Tn(r.sliceSerialize(M)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),k}return at(_)||(h=!0),f++,t.consume(_),_===92?y:b}function y(_){return _===91||_===92||_===93?(t.consume(_),f++,b):b(_)}function k(_){return _===58?(t.enter("definitionMarker"),t.consume(_),t.exit("definitionMarker"),s.includes(o)||s.push(o),qe(t,v,"gfmFootnoteDefinitionWhitespace")):i(_)}function v(_){return l(_)}}function aE(t,l,i){return t.check(_r,l,t.attempt(P_,l,i))}function iE(t){t.exit("gfmFootnoteDefinition")}function rE(t,l,i){const r=this;return qe(t,s,"gfmFootnoteDefinitionIndent",5);function s(o){const f=r.events[r.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?l(o):i(o)}}function uE(t){let i=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:s};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(f,h){let p=-1;for(;++p<f.length;)if(f[p][0]==="enter"&&f[p][1].type==="strikethroughSequenceTemporary"&&f[p][1]._close){let m=p;for(;m--;)if(f[m][0]==="exit"&&f[m][1].type==="strikethroughSequenceTemporary"&&f[m][1]._open&&f[p][1].end.offset-f[p][1].start.offset===f[m][1].end.offset-f[m][1].start.offset){f[p][1].type="strikethroughSequence",f[m][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},f[m][1].start),end:Object.assign({},f[p][1].end)},y={type:"strikethroughText",start:Object.assign({},f[m][1].end),end:Object.assign({},f[p][1].start)},k=[["enter",b,h],["enter",f[m][1],h],["exit",f[m][1],h],["enter",y,h]],v=h.parser.constructs.insideSpan.null;v&&cn(k,k.length,0,ys(v,f.slice(m+1,p),h)),cn(k,k.length,0,[["exit",y,h],["enter",f[p][1],h],["exit",f[p][1],h],["exit",b,h]]),cn(f,m-1,p-m+3,k),p=m+k.length-2;break}}for(p=-1;++p<f.length;)f[p][1].type==="strikethroughSequenceTemporary"&&(f[p][1].type="data");return f}function o(f,h,p){const m=this.previous,b=this.events;let y=0;return k;function k(_){return m===126&&b[b.length-1][1].type!=="characterEscape"?p(_):(f.enter("strikethroughSequenceTemporary"),v(_))}function v(_){const M=fi(m);if(_===126)return y>1?p(_):(f.consume(_),y++,v);if(y<2&&!i)return p(_);const H=f.exit("strikethroughSequenceTemporary"),T=fi(_);return H._open=!T||T===2&&!!M,H._close=!M||M===2&&!!T,h(_)}}}class sE{constructor(){this.map=[]}add(l,i,r){oE(this,l,i,r)}consume(l){if(this.map.sort(function(o,f){return o[0]-f[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(l.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),l.length=this.map[i][0];r.push(l.slice()),l.length=0;let s=r.pop();for(;s;){for(const o of s)l.push(o);s=r.pop()}this.map.length=0}}function oE(t,l,i,r){let s=0;if(!(i===0&&r.length===0)){for(;s<t.map.length;){if(t.map[s][0]===l){t.map[s][1]+=i,t.map[s][2].push(...r);return}s+=1}t.map.push([l,i,r])}}function cE(t,l){let i=!1;const r=[];for(;l<t.length;){const s=t[l];if(i){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(i=!0);l+=1}return r}function fE(){return{flow:{null:{name:"table",tokenize:dE,resolveAll:hE}}}}function dE(t,l,i){const r=this;let s=0,o=0,f;return h;function h(O){let I=r.events.length-1;for(;I>-1;){const re=r.events[I][1].type;if(re==="lineEnding"||re==="linePrefix")I--;else break}const X=I>-1?r.events[I][1].type:null,he=X==="tableHead"||X==="tableRow"?z:p;return he===z&&r.parser.lazy[r.now().line]?i(O):he(O)}function p(O){return t.enter("tableHead"),t.enter("tableRow"),m(O)}function m(O){return O===124||(f=!0,o+=1),b(O)}function b(O){return O===null?i(O):ve(O)?o>1?(o=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),v):i(O):Re(O)?qe(t,b,"whitespace")(O):(o+=1,f&&(f=!1,s+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),f=!0,b):(t.enter("data"),y(O)))}function y(O){return O===null||O===124||at(O)?(t.exit("data"),b(O)):(t.consume(O),O===92?k:y)}function k(O){return O===92||O===124?(t.consume(O),y):y(O)}function v(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(O):(t.enter("tableDelimiterRow"),f=!1,Re(O)?qe(t,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):_(O))}function _(O){return O===45||O===58?H(O):O===124?(f=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),M):W(O)}function M(O){return Re(O)?qe(t,H,"whitespace")(O):H(O)}function H(O){return O===58?(o+=1,f=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),T):O===45?(o+=1,T(O)):O===null||ve(O)?ae(O):W(O)}function T(O){return O===45?(t.enter("tableDelimiterFiller"),Y(O)):W(O)}function Y(O){return O===45?(t.consume(O),Y):O===58?(f=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),q):(t.exit("tableDelimiterFiller"),q(O))}function q(O){return Re(O)?qe(t,ae,"whitespace")(O):ae(O)}function ae(O){return O===124?_(O):O===null||ve(O)?!f||s!==o?W(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(O)):W(O)}function W(O){return i(O)}function z(O){return t.enter("tableRow"),P(O)}function P(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),P):O===null||ve(O)?(t.exit("tableRow"),l(O)):Re(O)?qe(t,P,"whitespace")(O):(t.enter("data"),se(O))}function se(O){return O===null||O===124||at(O)?(t.exit("data"),P(O)):(t.consume(O),O===92?ce:se)}function ce(O){return O===92||O===124?(t.consume(O),se):se(O)}}function hE(t,l){let i=-1,r=!0,s=0,o=[0,0,0,0],f=[0,0,0,0],h=!1,p=0,m,b,y;const k=new sE;for(;++i<t.length;){const v=t[i],_=v[1];v[0]==="enter"?_.type==="tableHead"?(h=!1,p!==0&&(xy(k,l,p,m,b),b=void 0,p=0),m={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},k.add(i,0,[["enter",m,l]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,y=void 0,o=[0,0,0,0],f=[0,i+1,0,0],h&&(h=!1,b={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},k.add(i,0,[["enter",b,l]])),s=_.type==="tableDelimiterRow"?2:b?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,f[2]===0&&(o[1]!==0&&(f[0]=f[1],y=Fu(k,l,o,s,void 0,y),o=[0,0,0,0]),f[2]=i)):_.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(f[0]=f[1],y=Fu(k,l,o,s,void 0,y)),o=f,f=[o[1],i,0,0])):_.type==="tableHead"?(h=!0,p=i):_.type==="tableRow"||_.type==="tableDelimiterRow"?(p=i,o[1]!==0?(f[0]=f[1],y=Fu(k,l,o,s,i,y)):f[1]!==0&&(y=Fu(k,l,f,s,i,y)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(f[3]=i)}for(p!==0&&xy(k,l,p,m,b),k.consume(l.events),i=-1;++i<l.events.length;){const v=l.events[i];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=cE(l.events,i))}return t}function Fu(t,l,i,r,s,o){const f=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",h="tableContent";i[0]!==0&&(o.end=Object.assign({},ni(l.events,i[0])),t.add(i[0],0,[["exit",o,l]]));const p=ni(l.events,i[1]);if(o={type:f,start:Object.assign({},p),end:Object.assign({},p)},t.add(i[1],0,[["enter",o,l]]),i[2]!==0){const m=ni(l.events,i[2]),b=ni(l.events,i[3]),y={type:h,start:Object.assign({},m),end:Object.assign({},b)};if(t.add(i[2],0,[["enter",y,l]]),r!==2){const k=l.events[i[2]],v=l.events[i[3]];if(k[1].end=Object.assign({},v[1].end),k[1].type="chunkText",k[1].contentType="text",i[3]>i[2]+1){const _=i[2]+1,M=i[3]-i[2]-1;t.add(_,M,[])}}t.add(i[3]+1,0,[["exit",y,l]])}return s!==void 0&&(o.end=Object.assign({},ni(l.events,s)),t.add(s,0,[["exit",o,l]]),o=void 0),o}function xy(t,l,i,r,s){const o=[],f=ni(l.events,i);s&&(s.end=Object.assign({},f),o.push(["exit",s,l])),r.end=Object.assign({},f),o.push(["exit",r,l]),t.add(i+1,0,o)}function ni(t,l){const i=t[l],r=i[0]==="enter"?"start":"end";return i[1][r]}const mE={name:"tasklistCheck",tokenize:gE};function pE(){return{text:{91:mE}}}function gE(t,l,i){const r=this;return s;function s(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),o)}function o(p){return at(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),f):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),f):i(p)}function f(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):i(p)}function h(p){return ve(p)?l(p):Re(p)?t.check({tokenize:yE},l,i)(p):i(p)}}function yE(t,l,i){return qe(t,r,"whitespace");function r(s){return s===null?i(s):l(s)}}function xE(t){return lx([I_(),W_(),uE(t),fE(),pE()])}const bE={};function vE(t){const l=this,i=t||bE,r=l.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),f=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(xE(i)),o.push(H_()),f.push(q_(i))}function ks({source:t,className:l=""}){return t.trim()?g.jsx("div",{className:`markdown-body ${l}`.trim(),children:g.jsx(u4,{remarkPlugins:[vE],children:t})}):g.jsx("p",{className:"text-sm text-white/40 italic",children:"Empty"})}function Gx({execResult:t}){if(!t.resultText)return null;const l=Ly(t),i=l.detected;return g.jsxs("section",{className:"space-y-2",children:[i&&g.jsxs("div",{className:"rounded-lg border border-red-400/35 bg-red-500/10 px-3 py-2.5",children:[g.jsx("p",{className:"text-sm font-semibold text-red-300",children:"Blocker — agent could not finish"}),l.summary&&g.jsx("p",{className:"text-sm text-red-200/85 mt-1 leading-snug",children:l.summary}),g.jsx("p",{className:"text-xs text-red-200/60 mt-2",children:"Grant the missing permission or adjust settings, then retry with instructions below."})]}),g.jsx("div",{className:`heading-section ${i?"text-red-300":""}`,children:i?"Blocker details":"Result"}),g.jsx("div",{className:`markdown-body-panel markdown-body-panel--compact ${i?"border-red-400/30 bg-red-950/20":""}`,children:g.jsx(ks,{source:t.resultText})})]})}function kE(t){return t?Ly(t).detected:!1}function SE(t){const l=qt(t,"playbook_patch");if(!l)return null;try{return sl(l)}catch{return null}}function wE(t){const l=qt(t,"reflect_status");if(!l)return null;try{return sl(l)}catch{return null}}function Xx({run:t,artifacts:l,busy:i,act:r}){if(!t.playbookId)return null;const s=SE(l),o=wE(l);if((t.runtime??"claude_code")==="cursor_local")return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:"Playbook learning requires Claude Code runtime (Cursor has no Agent Deck MCP)."})]});if((o==null?void 0:o.status)==="pending"&&!s)return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:"Analyzing for playbook improvements…"})]});if(!s)return(o==null?void 0:o.status)==="failed"?g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:o.error??"Reflect step failed"})]}):(o==null?void 0:o.status)==="completed"&&o.error?g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:o.error})]}):null;const h=s.status==="proposed",p=s.status==="applied",m=s.status==="dismissed";return g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),s.playbookTitle&&g.jsxs("p",{className:"text-sm text-white/45",children:[s.playbookTitle," ",g.jsxs("span",{className:"text-white/30",children:["(",s.playbookId,")"]})]}),g.jsx("p",{className:"text-sm text-white/55",children:s.rationale}),g.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-xs text-white/40 uppercase tracking-wide",children:"Current"}),g.jsx("textarea",{className:"field-mono min-h-[120px] resize-y text-sm",value:s.previousBody,readOnly:!0})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-xs text-white/40 uppercase tracking-wide",children:"Proposed"}),g.jsx("textarea",{className:"field-mono min-h-[120px] resize-y text-sm",value:s.proposedBody,readOnly:!0})]})]}),h&&g.jsxs("div",{className:"flex gap-2 flex-wrap",children:[g.jsx("button",{type:"button",disabled:i,onClick:()=>r(()=>Zb(t.id)),className:"btn-gold px-4 py-2 disabled:opacity-40",children:"Apply to playbook"}),g.jsx("button",{type:"button",disabled:i,onClick:()=>r(()=>Fb(t.id)),className:"btn-ghost px-4 py-2 disabled:opacity-40",children:"Dismiss"})]}),p&&g.jsxs("p",{className:"text-sm text-[#92E4DD]/80",children:["Applied to playbook",s.appliedAt?` · ${new Date(s.appliedAt).toLocaleString()}`:""]}),m&&g.jsx("p",{className:"text-sm text-white/40",children:"Dismissed — playbook unchanged"})]})}function _E({run:t}){const[l,i]=Z.useState([]),[r,s]=Z.useState(null),[o,f]=Z.useState(null),[h,p]=Z.useState(!1),m=Z.useCallback(async()=>{const Y=await ai(t.id);i(Y.artifacts),s(Y.usageSummary??null),f(Y.traceSummary??null)},[t.id]),b=async Y=>{p(!0);try{await Y(),await m()}catch(q){alert(String(q))}finally{p(!1)}},y=Ay(l,"execution_result","execute"),k=qt(l,"document"),v=k?sl(k):null,_=l.find(Y=>Y.kind==="approved_plan"),M=EE(l),H=qt(l,"send_receipt"),T=H?sl(H):null;return Z.useEffect(()=>{m().catch(console.error)},[m]),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Completed Run (Read-Only)"}),g.jsx("p",{className:"text-body",children:hs(t)})]}),_&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Approved Plan"}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--short",children:g.jsx(ks,{source:Ju(_)})})]}),v&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Document"}),g.jsx("textarea",{className:"field-mono min-h-[160px] resize-y",value:v.markdown,readOnly:!0})]}),y&&g.jsx(Gx,{execResult:y}),M&&g.jsxs("section",{className:"space-y-2",children:[g.jsxs("div",{className:"heading-section",children:["Outbound draft (",M.status,")"]}),g.jsxs("p",{className:"text-sm text-white/45",children:["To: ",M.draft.summary.target]}),g.jsx("textarea",{className:"field-mono min-h-[80px] resize-y",value:M.draft.summary.body,readOnly:!0})]}),T&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Send receipt"}),g.jsxs("p",{className:"text-sm text-white/45",children:["Sent ",new Date(T.sentAt).toLocaleString(),T.permalink&&g.jsxs(g.Fragment,{children:[" · ",g.jsx("a",{href:T.permalink,className:"text-[#92E4DD] hover:underline",target:"_blank",rel:"noreferrer",children:"Open message"})]})]})]}),g.jsx(Xx,{run:t,artifacts:l,busy:h,act:b}),r&&g.jsx(ps,{summary:r}),o&&g.jsx(ms,{trace:o})]})}function EE(t){for(const l of["slack_draft","email_draft"]){const i=qt(t,l);if(i!=null&&i.contentJson)try{return JSON.parse(i.contentJson)}catch{}}return null}function di(){return{maxTurns:"",maxBudgetUsd:""}}function Jx(t){return{maxTurns:(t==null?void 0:t.maxTurns)!=null?String(t.maxTurns):"",maxBudgetUsd:(t==null?void 0:t.maxBudgetUsd)!=null?String(t.maxBudgetUsd):""}}function mr(t){const l=t.maxTurns.trim()?Number(t.maxTurns):null,i=t.maxBudgetUsd.trim()?Number(t.maxBudgetUsd):null;return l==null&&i==null||l!=null&&(!Number.isFinite(l)||l<=0)||i!=null&&(!Number.isFinite(i)||i<=0)?null:{maxTurns:l,maxBudgetUsd:i}}function CE(t,l){const i=Sr(t,l);return!!(i.maxTurns||i.maxBudgetUsd)}function li(t,l,i){if(!(!t.maxTurns.trim()&&!t.maxBudgetUsd.trim()&&!CE(l,i)))return mr(t)}function Sr(t,l){const i=Cv(t);return Jx(i[l])}function by(t){return Jx(Ev(t))}function AE({run:t,agents:l,onRefresh:i}){const[r,s]=Z.useState([]),[o,f]=Z.useState(null),[h,p]=Z.useState(null),[m,b]=Z.useState(""),[y,k]=Z.useState(""),[v,_]=Z.useState(di()),[M,H]=Z.useState(!1),T=l.find(P=>P.id===t.agentId),Y=t.runtime??(T==null?void 0:T.runtime)??"claude_code",q=Z.useCallback(async()=>{const P=await ai(t.id);s(P.artifacts),f(P.usageSummary??null),p(P.traceSummary??null)},[t.id]),ae=t.status==="running",W=t.status==="plan_approved";Z.useEffect(()=>{q().catch(console.error)},[q]),Z.useEffect(()=>{k(t.executeModel??""),_(Sr(t.budgetJson,"execute"))},[t.id,t.executeModel,t.budgetJson]),Z.useEffect(()=>{if(!ae&&!W)return;const P=setInterval(()=>q().catch(console.error),3e3);return()=>clearInterval(P)},[ae,W,q]),Z.useEffect(()=>{ae&&$b(t.id,"stream_trace").then(b).catch(()=>b(""))},[ae,t.id,r.length]);const z=async P=>{H(!0);try{await P(),await q(),i()}catch(se){alert(String(se))}finally{H(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Agent"}),g.jsx("p",{className:"text-body",children:hs(t)}),W&&g.jsx("p",{className:"text-sm text-[#92E4DD]",children:"Approved — waiting for execution slot…"}),ae&&g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:"Executing…"})]}),(()=>{const P=qt(r,"approved_plan"),se=(P==null?void 0:P.author)==="system"?sl(P):null;return se?g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section text-emerald-200",children:"Auto-approved"}),g.jsx("p",{className:"text-sm text-white/60",children:se.rationale??"Self-triage marked this plan trivial."})]}):null})(),W&&g.jsxs(g.Fragment,{children:[g.jsx(ci,{phase:"Execution",runtime:Y,model:y,onModelChange:k,budget:v,onBudgetChange:_,defaultModelId:T==null?void 0:T.defaultExecuteModel,disabled:M}),g.jsx("button",{type:"button",disabled:M,onClick:()=>z(()=>qb(t.id,y||null,li(v,t.budgetJson,"execute"))),className:"btn-ghost px-3 py-2 w-full",children:"Run now (skip queue wait)"})]}),h&&g.jsx(ms,{trace:h}),o&&g.jsx(ps,{summary:o}),m&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Log Tail"}),g.jsx("textarea",{className:"field-mono min-h-[140px] resize-y text-sm",value:m,readOnly:!0})]}),(ae||W)&&g.jsx("button",{type:"button",disabled:M,onClick:()=>z(()=>Mf(t.id)),className:"btn-ghost-danger w-full py-2",children:"Cancel run"})]})}function NE({questions:t,drafts:l,onDraftsChange:i,busy:r}){const s=(o,f)=>{i({...l,[o]:f})};return g.jsxs("div",{className:"space-y-3 rounded-xl border border-amber-400/40 bg-amber-400/5 p-3",children:[g.jsx("div",{className:"heading-section text-amber-200",children:"Agent needs your answer"}),t.map(o=>{const f=l[o.id]??{};return g.jsxs("div",{className:"space-y-1.5",children:[g.jsx("p",{className:"text-sm text-white/85",children:o.question}),g.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.options.map(h=>g.jsx("button",{type:"button",disabled:r,title:h.description,onClick:()=>s(o.id,{selectedLabel:h.label}),className:`btn-ghost text-xs px-2 py-1 ${f.selectedLabel===h.label?"ring-1 ring-amber-300 text-amber-200":""}`,children:h.label},h.label))}),g.jsx("input",{className:"field-mono w-full text-xs",placeholder:"Other… (free-form answer triggers a replan)",value:f.freeText??"",disabled:r,onChange:h=>s(o.id,h.target.value?{freeText:h.target.value}:{})})]},o.id)})]})}function jE(t,l){return t.map(i=>({questionId:i.id,...l[i.id]}))}function TE(t,l){return t.every(i=>{var s;const r=l[i.id];return!!(r!=null&&r.selectedLabel||(s=r==null?void 0:r.freeText)!=null&&s.trim())})}function DE(t,l){return t.some(i=>{var r,s;return(s=(r=l[i.id])==null?void 0:r.freeText)==null?void 0:s.trim()})}function cs({title:t,open:l,onToggle:i,children:r,bordered:s=!0}){return g.jsxs("section",{className:`space-y-2 ${s?"border-t border-white/10 pt-3":""}`,children:[g.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between gap-2 text-left",children:[g.jsx("span",{className:"heading-section",children:t}),g.jsx("span",{className:"text-xs text-white/40",children:l?"Hide":"Show"})]}),l&&r]})}function Kx({busy:t,onRemoved:l}){const i=()=>{confirm("Remove this task from Operations? It won't be marked done and can't be brought back here.")&&l()};return g.jsxs("div",{className:"pt-2 border-t border-white/10",children:[g.jsx("button",{type:"button",disabled:t,onClick:i,className:"btn-ghost-danger w-full py-2 disabled:cursor-not-allowed disabled:opacity-60",children:"Remove from Operations"}),g.jsx("p",{className:"text-xs text-white/35 text-center mt-1.5",children:"Dismisses the task — not archived to Done."})]})}function zE(t){const l=t.split(`
|
|
78
|
+
`).map(i=>i.trim()).find(i=>i.length>0&&!i.startsWith("#")&&!i.startsWith("```"));return(l==null?void 0:l.replace(/^[-*]\s+/,"").slice(0,160))??"Plan draft ready"}function OE({run:t,agents:l,onRefresh:i,onApproved:r,onApprovedAndNext:s}){const[o,f]=Z.useState([]),[h,p]=Z.useState(null),[m,b]=Z.useState(null),[y,k]=Z.useState(""),[v,_]=Z.useState(""),[M,H]=Z.useState(""),[T,Y]=Z.useState(di()),[q,ae]=Z.useState(di()),[W,z]=Z.useState({}),[P,se]=Z.useState(!1),[ce,O]=Z.useState(!1),[I,X]=Z.useState(!1),[he,re]=Z.useState(!1),[te,j]=Z.useState(!1),[G,ue]=Z.useState(!1),ke=l.find(et=>et.id===t.agentId),E=t.runtime??(ke==null?void 0:ke.runtime)??"claude_code",A=Z.useCallback(async()=>{const et=await ai(t.id);f(et.artifacts),p(et.usageSummary??null),b(et.traceSummary??null);const Ot=qt(et.artifacts,"approved_plan"),fn=qt(et.artifacts,"draft_plan"),dn=Ot??fn;dn&&k(Ju(dn))},[t.id]),F=o.some(et=>et.kind==="draft_plan"),ee=t.status==="plan_pending"&&!F||te,ye=qt(o,"plan_triage"),me=qt(o,"plan_answers"),je=ye?sl(ye):null,Ve=t.status==="plan_pending"&&je&&!je.consumed&&je.questions.length>0&&(!me||me.createdAt<=ye.createdAt)?je.questions:[],Qe=TE(Ve,W),zt=DE(Ve,W);Z.useEffect(()=>{A().catch(console.error)},[A]),Z.useEffect(()=>{_(t.planModel??""),H(t.executeModel??""),Y(Sr(t.budgetJson,"plan")),ae(Sr(t.budgetJson,"execute")),z({}),se(!1),O(!1),X(!1),j(!1),ue(!1)},[t.id,t.planModel,t.executeModel,t.budgetJson]),Z.useEffect(()=>{if(!ee)return;const et=setInterval(()=>{A().catch(console.error),i()},3e3);return()=>clearInterval(et)},[ee,A,i]);const En=async()=>{var Ot;const et=(Ot=qt(o,"draft_plan"))==null?void 0:Ot.createdAt;j(!0),re(!0);try{await Hb(t.id,v||null,li(T,t.budgetJson,"plan"));const fn=Date.now()+12e4;for(;Date.now()<fn;){const dn=await ai(t.id);f(dn.artifacts);const fl=qt(dn.artifacts,"draft_plan");if(fl&&fl.createdAt!==et){k(Ju(fl)),se(!0);break}await new Promise(ha=>setTimeout(ha,2e3))}i()}catch(fn){alert(String(fn))}finally{j(!1),re(!1)}},Dn=async et=>{re(!0);try{await et(),await A(),i()}catch(Ot){alert(String(Ot))}finally{re(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Plan"}),g.jsx("p",{className:"text-sm text-white/45",children:hs(t)}),ee?g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:te?"Agent is replanning…":"Agent is writing the plan…"}),g.jsx("div",{className:"field-mono min-h-[min(200px,30vh)] flex items-center justify-center text-sm text-white/40 rounded border border-white/10",children:"Plan will appear here when the agent finishes…"})]}):y.trim()?g.jsxs(g.Fragment,{children:[!P&&g.jsxs("button",{type:"button",onClick:()=>se(!0),className:"w-full text-left rounded-xl border border-white/10 bg-white/[0.03] px-4 py-3 hover:border-white/20 transition-colors",children:[g.jsx("p",{className:"text-sm text-white/75 line-clamp-2",children:zE(y)}),g.jsx("p",{className:"text-xs text-[#92E4DD] mt-2",children:"Show full plan →"})]}),P&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"markdown-body-panel markdown-body-panel--short",children:g.jsx(ks,{source:y})}),g.jsx("button",{type:"button",onClick:()=>se(!1),className:"btn-ghost text-xs px-2 py-1",children:"Show summary"})]})]}):g.jsx("p",{className:"text-sm text-white/40",children:"No plan yet."})]}),Ve.length>0&&!ee&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section text-amber-200",children:"Resolve blocker"}),g.jsx("p",{className:"text-sm text-white/45",children:"Answer before execution can start."}),g.jsx(NE,{questions:Ve,drafts:W,onDraftsChange:z,busy:he})]}),F&&!ee&&g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),!zt&&g.jsx(ci,{phase:"Execution",runtime:E,model:M,onModelChange:H,budget:q,onBudgetChange:ae,defaultModelId:ke==null?void 0:ke.defaultExecuteModel,disabled:he}),Ve.length>0&&g.jsx("button",{type:"button",disabled:he||!Qe,className:"btn-gold px-5 py-2 disabled:opacity-40 w-full sm:w-auto",onClick:()=>Dn(async()=>{(await Vb(t.id,jE(Ve,W),zt?void 0:{executeModel:M||null,executeBudget:li(q,t.budgetJson,"execute")})).outcome==="approved"?(r==null||r(),s==null||s()):j(!0)}),children:zt?"Submit & replan":"Submit & start execution"}),Ve.length>0&&g.jsxs("div",{className:"flex items-center gap-3 text-xs text-white/30 uppercase tracking-wide",children:[g.jsx("span",{className:"h-px flex-1 bg-white/10"}),"or approve as-is",g.jsx("span",{className:"h-px flex-1 bg-white/10"})]}),g.jsx("button",{type:"button",disabled:he||!y.trim(),onClick:()=>Dn(async()=>{await mg(t.id,y,!0,{planModel:v||null,executeModel:M||null,planBudget:li(T,t.budgetJson,"plan"),executeBudget:li(q,t.budgetJson,"execute")}),r==null||r(),s==null||s()}),className:"btn-gold px-5 py-2 disabled:opacity-40 w-full sm:w-auto",children:"Approve & next →"})]}),F&&!ee&&g.jsx(cs,{title:"Replan",open:ce,onToggle:()=>O(et=>!et),children:g.jsxs("div",{className:"space-y-3 pl-0.5",children:[g.jsx("p",{className:"text-sm text-white/45",children:"Change plan model/budget or ask the agent to rewrite the plan."}),g.jsx(ci,{phase:"Plan",runtime:E,model:v,onModelChange:_,budget:T,onBudgetChange:Y,defaultModelId:ke==null?void 0:ke.defaultPlanModel,disabled:he}),G?g.jsxs(g.Fragment,{children:[g.jsx("textarea",{className:"field-mono min-h-[min(280px,35vh)] resize-y leading-relaxed w-full",value:y,onChange:et=>k(et.target.value),placeholder:"Edit plan markdown"}),g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:he||!y.trim(),onClick:()=>Dn(()=>mg(t.id,y,!1)),className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:"Save edits"}),g.jsx("button",{type:"button",disabled:he,onClick:()=>ue(!1),className:"btn-ghost text-xs px-2 py-1",children:"Cancel edit"})]})]}):g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:he,onClick:()=>ue(!0),className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:"Edit markdown"}),g.jsx("button",{type:"button",disabled:he,onClick:()=>En(),className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:"Ask agent to replan"})]})]})}),h&&g.jsx("section",{className:"border-t border-white/10 pt-3",children:g.jsx(ps,{summary:h})}),m&&g.jsx(cs,{title:"Trace",open:I,onToggle:()=>X(et=>!et),children:g.jsx(ms,{trace:m,showHeading:!1})}),g.jsx(Kx,{busy:he,onRemoved:()=>Dn(async()=>{await Mf(t.id),s==null||s()})})]})}function ME({content:t,deliverError:l,onRetrySend:i,retrySendBusy:r}){const{draft:s,bodyMismatch:o}=t,f=JSON.stringify(s.toolCall,null,2),[h,p]=Z.useState(!!o);return g.jsxs("section",{className:"space-y-3 rounded-lg border border-[#C4B643]/30 bg-[#C4B643]/5 p-3",children:[g.jsx("div",{className:"heading-section text-[#E8DC7A]",children:"Outbound message (will send on approve)"}),o&&g.jsx("p",{className:"text-sm text-amber-300/90",children:"Summary body does not match toolCall arguments — review the exact payload below."}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-xs text-white/40 uppercase tracking-wide",children:"To"}),g.jsx("p",{className:"text-base text-[#E8F6F4] font-medium",children:s.summary.target})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-xs text-white/40 uppercase tracking-wide",children:"Message"}),g.jsx("textarea",{className:"field-mono min-h-[100px] resize-y w-full",value:s.summary.body,readOnly:!0})]}),g.jsx(cs,{title:"Exact tool call (server sends verbatim)",open:h,onToggle:()=>p(m=>!m),bordered:!1,children:g.jsx("pre",{className:"field-mono text-xs overflow-x-auto whitespace-pre-wrap p-2",children:f})}),l&&g.jsxs("div",{className:"space-y-2 rounded border border-red-500/30 bg-red-500/5 p-2",children:[g.jsxs("p",{className:"text-sm text-red-400/90",children:["Send failed: ",l]}),g.jsx("p",{className:"text-xs text-white/45",children:"Use Retry send after fixing the issue (e.g. deck down, wrong Slack user). To change the message or recipient, use Retry with new instructions below."}),i&&g.jsx("button",{type:"button",disabled:r,onClick:i,className:"btn-gold w-full py-2 disabled:opacity-40",children:"Retry send →"})]})]})}function RE({run:t,agents:l,onRefresh:i,onRetry:r,onDoneAndNext:s}){var F;const[o,f]=Z.useState([]),[h,p]=Z.useState(null),[m,b]=Z.useState(null),[y,k]=Z.useState(""),[v,_]=Z.useState(""),[M,H]=Z.useState(di()),[T,Y]=Z.useState(!1),[q,ae]=Z.useState(!1),[W,z]=Z.useState(!1),[P,se]=Z.useState(null),ce=l.find(w=>w.id===t.agentId),O=t.runtime??(ce==null?void 0:ce.runtime)??"claude_code",I=Z.useCallback(async()=>{var ye;const w=await ai(t.id);f(w.artifacts),p(w.usageSummary??null),b(w.traceSummary??null);const ee=(ye=w.events)==null?void 0:ye.filter(me=>me.type==="deliver_failed").at(-1);if(ee!=null&&ee.payloadJson)try{const me=JSON.parse(ee.payloadJson);se(me.error??null)}catch{se(null)}},[t.id]),X=Ay(o,"execution_result","execute"),he=qt(o,"document"),re=he?sl(he):null,te=o.find(w=>w.kind==="approved_plan"),j=LE(o),G=kE(X),ue=!!y.trim();Z.useEffect(()=>{I().catch(console.error)},[I]);const ke=o.some(w=>{if(w.kind!=="reflect_status"||!w.contentJson)return!1;try{return JSON.parse(w.contentJson).status==="pending"}catch{return!1}});Z.useEffect(()=>{if(!ke)return;const w=setInterval(()=>{I().catch(console.error)},3e3);return()=>clearInterval(w)},[ke,I]),Z.useEffect(()=>{ae(!1),k(""),z(!1),se(null),_(t.executeModel??""),H(Sr(t.budgetJson,"execute"))},[t.id,t.executeModel,t.budgetJson]),Z.useEffect(()=>{var ee;if(q||!G)return;const w=(ee=X==null?void 0:X.blocker)==null?void 0:ee.summary;w&&(k(`Please resolve: ${w}`),ae(!0))},[q,G,(F=X==null?void 0:X.blocker)==null?void 0:F.summary]);const E=async w=>{Y(!0);try{await w(),await I(),i()}catch(ee){alert(String(ee))}finally{Y(!1)}},A=async()=>{Y(!0),se(null);try{await Yb(t.id),await I(),i(),s==null||s()}catch(w){const ee=w instanceof Error?w.message:String(w);j?se(ee):alert(ee)}finally{Y(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Agent"}),g.jsx("p",{className:"text-body",children:hs(t)}),G&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Blocked — resolve the issue below, then retry"}),t.status==="failed"&&!G&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Execution failed — retry with new instructions"})]}),re&&!G&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Deliverable"}),g.jsx("p",{className:"text-sm text-white/45",children:re.path}),g.jsx("textarea",{className:"field-mono min-h-[160px] resize-y",value:re.markdown,readOnly:!0})]}),X&&g.jsx(Gx,{execResult:X}),g.jsxs("section",{className:"space-y-4 border-t border-white/10 pt-3",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),j&&t.status==="review"&&!G&&g.jsx(ME,{content:j,deliverError:P,onRetrySend:A,retrySendBusy:T}),t.status==="review"&&!G&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("p",{className:"text-sm text-white/45",children:j?P?"Fix the send issue above, or redraft below if the message needs to change.":"Review the message above, then approve to send.":"Looks good? Accept and move on."}),g.jsx("button",{type:"button",disabled:T||!j&&!!y.trim(),title:!j&&y.trim()?"Clear retry instructions below to mark done":void 0,onClick:()=>void A(),className:"btn-gold w-full py-2 disabled:opacity-40",children:j?"Approve & send →":"Mark done & next →"}),!j&&y.trim()&&g.jsx("p",{className:"text-xs text-white/40",children:"Clear the retry field below to accept this result."})]}),t.status==="review"&&!G&&g.jsxs("div",{className:"flex items-center gap-3 text-xs text-white/30 uppercase tracking-wide",children:[g.jsx("span",{className:"h-px flex-1 bg-white/10"}),"or send back",g.jsx("span",{className:"h-px flex-1 bg-white/10"})]}),g.jsxs("div",{className:"space-y-2",children:[(G||t.status==="failed")&&g.jsx("p",{className:"text-sm text-white/45",children:"Add instructions and retry — re-runs execution with the same approved plan."}),g.jsx("label",{htmlFor:`retry-${t.id}`,className:"text-xs text-white/40 uppercase tracking-wide",children:"Retry instructions"}),g.jsx("textarea",{id:`retry-${t.id}`,className:"field-mono min-h-[min(140px,22vh)] resize-y leading-relaxed",placeholder:G?"What to change after fixing the blocker":j?"What should change in the draft? (e.g. correct Slack user ID)":"What should the agent do differently?",value:y,onChange:w=>k(w.target.value)}),g.jsx(ci,{phase:"Execution",runtime:O,model:v,onModelChange:_,budget:M,onBudgetChange:H,defaultModelId:ce==null?void 0:ce.defaultExecuteModel,disabled:T}),g.jsx("button",{type:"button",disabled:T||!ue,onClick:()=>E(async()=>{const w=li(M,t.budgetJson,"execute"),ee=await Ib(t.id,y,v||null,w);k(""),se(null),r==null||r(ee)}),className:`w-full py-2 ${ue?"btn-retry-ready":"btn-retry"}`,children:"Retry with new instructions"})]})]}),te&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Approved Plan"}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--short",children:g.jsx(ks,{source:Ju(te)})})]}),g.jsx(Xx,{run:t,artifacts:o,busy:T,act:E}),h&&g.jsx("section",{className:"border-t border-white/10 pt-3",children:g.jsx(ps,{summary:h})}),m&&g.jsx(cs,{title:"Trace",open:W,onToggle:()=>z(w=>!w),children:g.jsx(ms,{trace:m,showHeading:!1})}),g.jsx(Kx,{busy:T,onRemoved:()=>E(async()=>{await Mf(t.id),s==null||s()})})]})}function LE(t){for(const l of["slack_draft","email_draft"]){const i=qt(t,l);if(i!=null&&i.contentJson)try{const r=JSON.parse(i.contentJson);if(r.status==="pending")return r}catch{}}return null}function ad({onClose:t,header:l,children:i,onKeyDown:r}){return Z.useEffect(()=>{const s=o=>{if(o.key==="Escape"){o.preventDefault(),t();return}r==null||r(o)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[t,r]),g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6",children:[g.jsx("button",{type:"button",className:"absolute inset-0 bg-black/65 backdrop-blur-[2px]",onClick:t,"aria-label":"Close"}),g.jsxs("div",{role:"dialog","aria-modal":"true",className:"relative w-[min(1200px,96vw)] h-[min(92vh,960px)] panel-surface flex flex-col text-[#E8F6F4] rounded-2xl overflow-hidden",children:[g.jsx("div",{className:"p-4 border-b border-white/10 space-y-3 shrink-0",children:l}),g.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:i})]})]})}function BE({run:t,agents:l,onClose:i,onRefresh:r,onApproved:s,onApprovedAndNext:o,onDoneAndNext:f,onRetry:h,queueNav:p}){const[m,b]=Z.useState(null),y=jy(t.status),k=Lf(t);Z.useEffect(()=>{if(t.source!=="linear"){b(null);return}ai(t.id).then(_=>b(Pb(_.artifacts))).catch(()=>b(null))},[t.id,t.source]);const v=Z.useCallback(_=>{p&&(_.key==="ArrowLeft"&&p.index>0&&(_.preventDefault(),p.onPrev()),_.key==="ArrowRight"&&p.index<p.runs.length-1&&(_.preventDefault(),p.onNext()))},[p]);return g.jsxs(ad,{onClose:i,onKeyDown:v,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.source==="linear"&&m?g.jsx("a",{href:m,target:"_blank",rel:"noreferrer",className:"inline-flex",title:"Open in Linear",children:g.jsxs(ot,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 hover:bg-[#5E6AD2]/25 transition-colors",children:[$u(t)," ↗"]})}):g.jsx(ot,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:$u(t)}),g.jsx(ot,{className:"bg-white/5 text-white/45 border-white/10 normal-case",children:Rf(t.taskCategory)}),g.jsx(ot,{className:fs(t.runtime),children:oa(t.runtime)}),k&&g.jsxs(ot,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case truncate max-w-[160px]",title:k,children:["◆ ",k]})]}),g.jsx("h2",{className:"font-semibold text-2xl leading-snug pr-2",children:t.title}),g.jsxs("p",{className:"text-sm text-white/45 flex flex-wrap gap-x-2 gap-y-0.5 items-center",children:[g.jsx(ot,{className:y.tone,children:y.label}),g.jsxs("span",{title:new Date(t.updatedAt).toLocaleString(),children:["Updated ",Ku(t.updatedAt)]})]})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[p&&g.jsx(Ty,{index:p.index,total:p.runs.length,onPrev:p.onPrev,onNext:p.onNext}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1","aria-label":"Close",children:"✕"})]})]}),children:[(t.status==="plan_pending"||t.status==="queued")&&g.jsx(OE,{run:t,agents:l,onRefresh:r,onApproved:s,onApprovedAndNext:o}),(t.status==="plan_approved"||t.status==="running")&&g.jsx(AE,{run:t,agents:l,onRefresh:r}),(t.status==="review"||t.status==="failed")&&g.jsx(RE,{run:t,agents:l,onRefresh:r,onRetry:h,onDoneAndNext:f}),t.status==="done"&&g.jsx(_E,{run:t}),t.status==="cancelled"&&g.jsx("p",{className:"text-sm text-white/50",children:"This task was removed from Operations."})]})}function vy(t,l){const i=t.find(s=>s.runtime===l);if(!i)return{ok:!1,detail:"no agent"};const r=i.issues.find(s=>s.code==="cli_missing"||s.code==="runtime_auth");return r?{ok:!1,detail:r.message}:{ok:!0,detail:"CLI ready"}}function cf({ok:t}){return g.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${t?"bg-emerald-400":"bg-amber-400"}`,"aria-hidden":!0})}function UE({agents:t,agentDeckOnline:l}){const[i,r]=Z.useState(null);Z.useEffect(()=>{Gb().then(h=>r(h.mcpUrl)).catch(()=>r(null))},[l]);const s=vy(t,"claude_code"),o=vy(t,"cursor_local"),f=t.flatMap(h=>h.issues).find(h=>h.code==="mcp_not_registered");return g.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1.5 text-xs text-white/45",children:[g.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Connections"}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:s.detail,children:[g.jsx(cf,{ok:s.ok}),g.jsx("span",{className:s.ok?"text-white/55":"text-amber-200/90",children:"Claude"})]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:o.detail,children:[g.jsx(cf,{ok:o.ok}),g.jsx("span",{className:o.ok?"text-white/55":"text-amber-200/90",children:"Cursor"})]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:(f==null?void 0:f.message)??(i?`MCP ${i}`:"Agent Deck optional"),children:[g.jsx(cf,{ok:l&&!f}),g.jsxs("span",{className:l&&!f?"text-[#92E4DD]/80":f?"text-amber-200/90":"text-white/35",children:["Agent Deck MCP",l?f?" (setup needed)":"":" (optional)"]})]})]})}const $x="data:image/svg+xml,%3csvg%20viewBox='0%200%20248%20248'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20d='M52.4285%20162.873L98.7844%20136.879L99.5485%20134.602L98.7844%20133.334H96.4921L88.7237%20132.862L62.2346%20132.153L39.3113%20131.207L17.0249%20130.026L11.4214%20128.844L6.2%20121.873L6.7094%20118.447L11.4214%20115.257L18.171%20115.847L33.0711%20116.911L55.485%20118.447L71.6586%20119.392L95.728%20121.873H99.5485L100.058%20120.337L98.7844%20119.392L97.7656%20118.447L74.5877%20102.732L49.4995%2086.1905L36.3823%2076.62L29.3779%2071.7757L25.8121%2067.2858L24.2839%2057.3608L30.6515%2050.2716L39.3113%2050.8623L41.4763%2051.4531L50.2636%2058.1879L68.9842%2072.7209L93.4357%2090.6804L97.0015%2093.6343L98.4374%2092.6652L98.6571%2091.9801L97.0015%2089.2625L83.757%2065.2772L69.621%2040.8192L63.2534%2030.6579L61.5978%2024.632C60.9565%2022.1032%2060.579%2020.0111%2060.579%2017.4246L67.8381%207.49965L71.9133%206.19995L81.7193%207.49965L85.7946%2011.0443L91.9074%2024.9865L101.714%2046.8451L116.996%2076.62L121.453%2085.4816L123.873%2093.6343L124.764%2096.1155H126.292V94.6976L127.566%2077.9197L129.858%2057.3608L132.15%2030.8942L132.915%2023.4505L136.608%2014.4708L143.994%209.62643L149.725%2012.344L154.437%2019.0788L153.8%2023.4505L150.998%2041.6463L145.522%2070.1215L141.957%2089.2625H143.994L146.414%2086.7813L156.093%2074.0206L172.266%2053.698L179.398%2045.6635L187.803%2036.802L193.152%2032.5484H203.34L210.726%2043.6549L207.415%2055.1159L196.972%2068.3492L188.312%2079.5739L175.896%2096.2095L168.191%20109.585L168.882%20110.689L170.738%20110.53L198.755%20104.504L213.91%20101.787L231.994%2098.7149L240.144%20102.496L241.036%20106.395L237.852%20114.311L218.495%20119.037L195.826%20123.645L162.07%20131.592L161.696%20131.893L162.137%20132.547L177.36%20133.925L183.855%20134.279H199.774L229.447%20136.524L237.215%20141.605L241.8%20147.867L241.036%20152.711L229.065%20158.737L213.019%20154.956L175.45%20145.977L162.587%20142.787H160.805V143.85L171.502%20154.366L191.242%20172.089L215.82%20195.011L217.094%20200.682L213.91%20205.172L210.599%20204.699L188.949%20188.394L180.544%20181.069L161.696%20165.118H160.422V166.772L164.752%20173.152L187.803%20207.771L188.949%20218.405L187.294%20221.832L181.308%20223.959L174.813%20222.777L161.187%20203.754L147.305%20182.486L136.098%20163.345L134.745%20164.2L128.075%20235.42L125.019%20239.082L117.887%20241.8L111.902%20237.31L108.718%20229.984L111.902%20215.452L115.722%20196.547L118.779%20181.541L121.58%20162.873L123.291%20156.636L123.14%20156.219L121.773%20156.449L107.699%20175.752L86.304%20204.699L69.3663%20222.777L65.291%20224.431L58.2867%20220.768L58.9235%20214.27L62.8713%20208.48L86.304%20178.705L100.44%20160.155L109.551%20149.507L109.462%20147.967L108.959%20147.924L46.6977%20188.512L35.6182%20189.93L30.7788%20185.44L31.4156%20178.115L33.7079%20175.752L52.4285%20162.873Z'%20fill='%23D97757'/%3e%3c/svg%3e",Px="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20fill='%23EDEDED'%20d='M11.503.131%201.891%205.678a.84.84%200%200%200-.42.726v11.188c0%20.3.162.575.42.724l9.609%205.55a1%201%200%200%200%20.998%200l9.61-5.55a.84.84%200%200%200%20.42-.724V6.404a.84.84%200%200%200-.42-.726L12.497.131a1.01%201.01%200%200%200-.996%200M2.657%206.338h18.55c.263%200%20.43.287.297.515L12.23%2022.918c-.062.107-.229.064-.229-.06V12.335a.59.59%200%200%200-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23'/%3e%3c/svg%3e";function Wx({src:t,className:l}){return g.jsx("span",{className:`inline-flex items-center justify-center rounded-lg bg-white/[0.04] ${l??"h-8 w-8"}`,children:g.jsx("img",{src:t,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function HE({className:t="h-8 w-8"}){return g.jsx(Wx,{src:$x,className:t})}function qE({className:t="h-8 w-8"}){return g.jsx(Wx,{src:Px,className:t})}function VE({className:t="h-8 w-8"}){return g.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":!0,children:[g.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),g.jsx("circle",{cx:"16",cy:"13",r:"4.5",stroke:"#92E4DD",strokeWidth:"1.75"}),g.jsx("path",{d:"M8.5 24.5c1.2-3.5 3.8-5.5 7.5-5.5s6.3 2 7.5 5.5",stroke:"#92E4DD",strokeWidth:"1.75",strokeLinecap:"round"})]})}function e0({runtime:t,className:l="h-3.5 w-3.5 shrink-0"}){return t==="claude_code"?g.jsx("img",{src:$x,alt:"",className:`object-contain ${l}`,draggable:!1}):t==="cursor_local"?g.jsx("img",{src:Px,alt:"",className:`object-contain ${l}`,draggable:!1}):null}function t0({runtime:t,className:l="h-8 w-8 shrink-0"}){return t==="claude_code"?g.jsx(HE,{className:l}):t==="cursor_local"?g.jsx(qE,{className:l}):g.jsx(VE,{className:l})}const Qu=()=>({runtime:"claude_code",deckId:"",playbookId:"",defaultPlanModel:"",defaultExecuteModel:"",defaultPlanBudget:di(),defaultExecuteBudget:di()});function YE({agents:t,agentDeckOnline:l,onRefresh:i}){const[r,s]=Z.useState(!1),[o,f]=Z.useState(""),[h,p]=Z.useState(""),[m,b]=Z.useState(Qu()),[y,k]=Z.useState(!1),[v,_]=Z.useState(null),[M,H]=Z.useState(""),[T,Y]=Z.useState(""),[q,ae]=Z.useState(Qu()),W=async I=>{if(I.preventDefault(),!(!o.trim()||!h.trim())){k(!0);try{const X={name:o.trim(),runtime:m.runtime,workspaceRoot:h.trim(),deckId:m.deckId||void 0,playbookId:m.playbookId||void 0,defaultPlanModel:m.defaultPlanModel||null,defaultExecuteModel:m.defaultExecuteModel||null,defaultPlanBudget:mr(m.defaultPlanBudget),defaultExecuteBudget:mr(m.defaultExecuteBudget)};await Rb(X),f(""),p(""),b(Qu()),s(!1),i()}catch(X){alert(String(X))}finally{k(!1)}}},z=I=>{_(I.id),H(I.name),Y(I.workspaceRoot??""),ae({runtime:I.runtime,deckId:I.deckId??"",playbookId:I.playbookId??"",defaultPlanModel:I.defaultPlanModel??"",defaultExecuteModel:I.defaultExecuteModel??"",defaultPlanBudget:by(I.defaultPlanBudgetJson),defaultExecuteBudget:by(I.defaultExecuteBudgetJson)})},P=()=>{_(null),ae(Qu())},se=async I=>{k(!0);try{const X={name:M.trim(),workspaceRoot:T.trim()||null,runtime:q.runtime,deckId:q.deckId||null,playbookId:q.playbookId||null,defaultPlanModel:q.defaultPlanModel||null,defaultExecuteModel:q.defaultExecuteModel||null,defaultPlanBudget:mr(q.defaultPlanBudget),defaultExecuteBudget:mr(q.defaultExecuteBudget)};await Lb(I.id,X),P(),i()}catch(X){alert(String(X))}finally{k(!1)}},ce=async I=>{if(confirm(`Delete agent "${I.name}"?`)){k(!0);try{await Bb(I.id),i()}catch(X){alert(String(X))}finally{k(!1)}}},O=t.filter(I=>!I.healthy).length;return g.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 max-w-6xl mx-auto w-full",children:[g.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("h1",{className:"heading-page",children:"Agents"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Saved execution profiles — pick one at Inbox instead of configuring each task"}),g.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[t.length," agent",t.length===1?"":"s",O>0&&g.jsxs("span",{className:"text-red-400 ml-2",children:["· ",O," need",O===1?"s":""," attention"]})]})]}),g.jsx(UE,{agents:t,agentDeckOnline:l})]}),g.jsx("div",{className:"space-y-3 mb-6",children:t.map(I=>g.jsxs("div",{className:"panel flex flex-col sm:flex-row sm:items-start gap-3 justify-between",children:[g.jsxs("div",{className:"flex gap-3 min-w-0 flex-1",children:[g.jsx(t0,{runtime:I.runtime}),g.jsxs("div",{className:"space-y-2 min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:"text-lg font-semibold text-[#E8F6F4]",children:I.name}),!I.healthy&&g.jsx(ot,{className:"bg-red-500/15 text-red-300 border-red-400/30 normal-case",children:"Needs fix"})]}),g.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[g.jsx(ot,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:oa(I.runtime)}),I.deckName?g.jsxs(ot,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",I.deckName]}):g.jsx(ot,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),I.defaultPlanModel&&g.jsxs(ot,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:I.defaultPlanModel,children:["plan: ",I.defaultPlanModel]}),I.defaultExecuteModel&&g.jsxs(ot,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:I.defaultExecuteModel,children:["exec: ",I.defaultExecuteModel]})]}),v===I.id?g.jsxs("div",{className:"space-y-3 pt-2 border-t border-white/10",children:[g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),g.jsx("input",{className:"field text-sm",value:M,onChange:X=>H(X.target.value)})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Workspace"}),g.jsx("input",{className:"field text-sm font-mono",placeholder:"/Users/me/projects/my-app",value:T,onChange:X=>Y(X.target.value)})]}),g.jsx(jg,{value:q,onChange:ae,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",disabled:y||!M.trim()||!T.trim(),onClick:()=>se(I),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),g.jsx("button",{type:"button",onClick:P,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}):g.jsx("p",{className:"text-sm text-white/50 font-mono truncate",title:I.workspaceRoot??void 0,children:I.workspaceRoot?I.workspaceRoot:"No workspace configured"}),I.issues.length>0&&g.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:I.issues.map((X,he)=>g.jsxs("li",{children:["· ",X.message]},he))})]})]}),g.jsxs("div",{className:"flex gap-2 shrink-0",children:[v!==I.id&&g.jsx("button",{type:"button",disabled:y,onClick:()=>z(I),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),g.jsx("button",{type:"button",disabled:y,onClick:()=>ce(I),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},I.id))}),r?g.jsxs("form",{onSubmit:W,className:"panel space-y-3",children:[g.jsx("h2",{className:"heading-panel",children:"New Agent"}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),g.jsx("input",{className:"field",placeholder:"e.g. Claude · Work",value:o,onChange:I=>f(I.target.value)})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Workspace"}),g.jsx("input",{className:"field font-mono text-sm",placeholder:"/Users/me/projects/my-app",value:h,onChange:I=>p(I.target.value)})]}),g.jsx(jg,{value:m,onChange:b,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{type:"submit",disabled:y||!o.trim()||!h.trim(),className:"btn-gold px-4 py-2",children:y?"Saving…":"Create agent"}),g.jsx("button",{type:"button",onClick:()=>s(!1),className:"btn-ghost px-4 py-2",children:"Cancel"})]})]}):g.jsx("button",{type:"button",onClick:()=>s(!0),className:"btn-gold px-4 py-2",children:"Add agent"})]})}function IE({run:t,selected:l,onSelect:i,sent:r}){const s=Lf(t),o=t.updatedAt;return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border-l-[3px] border-l-emerald-400/60 transition-colors ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[7rem_minmax(0,1fr)_8rem_6rem_7rem_5rem] gap-x-4 gap-y-1.5 items-center px-4 py-3",children:[g.jsxs("div",{className:"flex items-center gap-1.5 md:contents",children:[g.jsx(ot,{className:t.source==="linear"?"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 shrink-0 w-fit":"bg-white/5 text-white/55 border-white/15 shrink-0 w-fit",children:$u(t)}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums md:hidden ml-auto shrink-0",title:new Date(o).toLocaleString(),children:Ku(o)})]}),g.jsxs("div",{className:"min-w-0 md:col-start-2",children:[g.jsxs("p",{className:"font-semibold text-[#E8F6F4] leading-snug truncate flex items-center gap-2",title:t.title,children:[g.jsx("span",{className:"truncate",children:t.title}),r&&g.jsx(ot,{className:"bg-[#C4B643]/15 text-[#E8DC7A] border-[#C4B643]/35 shrink-0 normal-case text-[10px]",children:"sent"})]}),t.description&&g.jsx("p",{className:"text-xs text-white/40 truncate mt-0.5",title:t.description,children:t.description})]}),g.jsx("div",{className:"hidden md:flex items-center min-w-0",children:g.jsxs(ot,{className:`${fs(t.runtime)} normal-case truncate max-w-full`,title:t.agentName??oa(t.runtime),children:[t.runtime&&g.jsx(e0,{runtime:t.runtime,className:"h-3 w-3"}),g.jsx("span",{className:"truncate",children:t.agentName??oa(t.runtime)})]})}),g.jsx("span",{className:"hidden md:block text-xs text-white/45 uppercase tracking-wide",children:Rf(t.taskCategory)}),g.jsx("span",{className:"hidden md:block text-xs text-[#92E4DD]/80 truncate",title:s??void 0,children:s?`◆ ${s}`:"—"}),g.jsx("time",{className:"hidden md:block text-xs text-white/40 tabular-nums text-right",title:new Date(o).toLocaleString(),children:Ku(o)})]})})}function ZE({runs:t,selectedRunId:l,onSelectRun:i,sentRunIds:r=[]}){const[s,o]=Z.useState(""),f=Z.useMemo(()=>t.filter(p=>p.status==="done").sort((p,m)=>m.updatedAt.localeCompare(p.updatedAt)),[t]),h=Z.useMemo(()=>{const p=s.trim().toLowerCase();return p?f.filter(m=>{var b,y,k,v;return m.title.toLowerCase().includes(p)||((b=m.externalLabel)==null?void 0:b.toLowerCase().includes(p))||((y=m.externalId)==null?void 0:y.toLowerCase().includes(p))||m.source.toLowerCase().includes(p)||m.taskCategory.toLowerCase().includes(p)||((k=m.deckName)==null?void 0:k.toLowerCase().includes(p))||((v=m.agentName)==null?void 0:v.toLowerCase().includes(p))}):f},[f,s]);return g.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[g.jsx("div",{className:"px-6 pt-4 pb-3 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"max-w-6xl mx-auto w-full",children:[g.jsx("h1",{className:"heading-page",children:"Done"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Completed runs — read-only audit trail"}),g.jsx("input",{className:"field mt-3 max-w-xl",placeholder:"Search title, issue id, category, deck…",value:s,onChange:p=>o(p.target.value)}),g.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[h.length," of ",f.length," completed"]})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4 min-h-0",children:g.jsxs("div",{className:"max-w-6xl mx-auto w-full space-y-1.5",children:[h.length>0&&g.jsxs("div",{className:"hidden md:grid grid-cols-[7rem_minmax(0,1fr)_8rem_6rem_7rem_5rem] gap-x-4 px-4 pb-1 text-[10px] uppercase tracking-wider text-white/30","aria-hidden":!0,children:[g.jsx("span",{children:"Source"}),g.jsx("span",{children:"Title"}),g.jsx("span",{children:"Agent"}),g.jsx("span",{children:"Type"}),g.jsx("span",{children:"Deck"}),g.jsx("span",{className:"text-right",children:"Done"})]}),h.length===0?g.jsx("p",{className:"text-sm text-white/45 py-8 text-center",children:f.length===0?"No completed runs yet":"No matches for your search"}):h.map(p=>g.jsx(IE,{run:p,selected:l===p.id,onSelect:()=>i(p),sent:r.includes(p.id)},p.id))]})})]})}function FE({candidate:t,selected:l,onSelect:i}){return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border transition-colors ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"p-3 space-y-1.5",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx(ot,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:t.identifier}),t.state&&g.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:t.state})]}),g.jsx("h3",{className:"text-lg font-semibold text-[#E8F6F4] leading-snug line-clamp-2",children:t.title}),t.description&&g.jsx("p",{className:"text-sm text-white/45 line-clamp-2 leading-relaxed",children:t.description})]})})}function ky({title:t,subtitle:l,onClose:i,children:r}){return g.jsx(ad,{onClose:i,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[g.jsx("h2",{className:"font-semibold text-2xl leading-snug",children:t}),l&&g.jsx("p",{className:"text-sm text-white/55 leading-snug",children:l})]}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1 shrink-0","aria-label":"Close",children:"✕"})]}),children:g.jsx("div",{className:"space-y-4",children:r})})}function n0({className:t="w-3.5 h-3.5"}){return g.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:t,"aria-hidden":!0,children:g.jsx("path",{fillRule:"evenodd",d:"M8.982 1.566a1.13 1.13 0 0 0-1.964 0L.165 13.233c-.457.778.091 1.767.982 1.767h13.706c.891 0 1.439-.99.982-1.767L8.982 1.566zM8 5.697a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 5.697zm0 7.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}function l0({agents:t,selectedId:l,onSelect:i,onManage:r,requireHealthy:s}){return t.length===0?g.jsx("p",{className:"text-sm text-white/45",children:"No agents configured."}):g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("div",{className:"heading-section normal-case",children:"Agent"}),r&&g.jsx("button",{type:"button",onClick:r,className:"text-sm text-[#92E4DD] hover:underline",children:"Manage"})]}),g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:t.map(o=>{var p;const f=o.id===l,h=s&&!o.healthy;return g.jsx("button",{type:"button",disabled:h,onClick:()=>i(o.id),className:`text-left rounded-xl border p-3 transition-colors glass-plate glass-plate-hover ${h?"opacity-50 cursor-not-allowed":f?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"flex items-start gap-2.5",children:[g.jsx(t0,{runtime:o.runtime,className:"h-7 w-7 shrink-0 mt-0.5"}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsx("span",{className:"font-semibold text-[#E8F6F4]",children:o.name}),!o.healthy&&g.jsx("span",{title:o.issues.map(m=>m.message).join("; "),children:g.jsx(n0,{className:"w-3.5 h-3.5 text-red-400 shrink-0"})})]}),g.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-2",children:[g.jsx(ot,{className:fs(o.runtime),children:oa(o.runtime)}),o.deckName&&g.jsxs(ot,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",o.deckName]})]}),!o.healthy&&g.jsx("p",{className:"text-xs text-red-300/90 mt-2 leading-snug",children:(p=o.issues[0])==null?void 0:p.message})]})]})},o.id)})})]})}function QE({issue:t,agents:l,onPromoted:i,onManageAgents:r}){const[s,o]=Z.useState(""),[f,h]=Z.useState(""),[p,m]=Z.useState(!1);Z.useEffect(()=>{Of().then(k=>{k.defaultAgentId&&o(k.defaultAgentId)}).catch(()=>{})},[]),Z.useEffect(()=>{l.length>0&&s&&!l.some(k=>k.id===s)&&o(l[0].id),l.length>0&&!s&&o(l[0].id)},[l,s]),Z.useEffect(()=>{h("")},[t.id,s]);const b=l.find(k=>k.id===s),y=async()=>{if(s){m(!0);try{await Mb(t.id,{agentId:s,planModel:f||null}),i()}catch(k){alert(String(k))}finally{m(!1)}}};return g.jsxs(g.Fragment,{children:[t.description&&g.jsx("div",{className:"rounded-xl p-4 glass-plate font-mono text-sm text-white/70 leading-relaxed whitespace-pre-wrap",children:t.description}),t.url&&g.jsx("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"text-sm text-[#AEB4FF] hover:underline inline-block",children:"Open in Linear ↗"}),g.jsx(l0,{agents:l,selectedId:s,onSelect:o,onManage:r,requireHealthy:!0}),b&&g.jsx(Hf,{runtime:b.runtime,label:"Planning model",value:f,onChange:h,defaultModelId:b.defaultPlanModel,disabled:p}),g.jsx("button",{type:"button",disabled:p||!s||!((b==null?void 0:b.healthy)??!1),onClick:y,className:"btn-gold w-full py-2",children:p?"Starting…":"Kick plan & next →"})]})}function GE({issue:t,agents:l,onClose:i,onPromoted:r,onManageAgents:s,queueNav:o}){const f=Z.useCallback(h=>{o&&(h.key==="ArrowLeft"&&o.index>0&&(h.preventDefault(),o.onPrev()),h.key==="ArrowRight"&&o.index<o.total-1&&(h.preventDefault(),o.onNext()))},[o]);return g.jsx(ad,{onClose:i,onKeyDown:f,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[g.jsx("h2",{className:"font-semibold text-2xl leading-snug",children:t.identifier}),g.jsx("p",{className:"text-sm text-white/55 leading-snug",children:t.title})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[o&&g.jsx(Ty,{index:o.index,total:o.total,onPrev:o.onPrev,onNext:o.onNext,label:"In Inbox"}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1","aria-label":"Close",children:"✕"})]})]}),children:g.jsx(QE,{issue:t,agents:l,onPromoted:r,onManageAgents:s})})}function XE({agents:t,onSaved:l}){const[i,r]=Z.useState(!1),[s,o]=Z.useState(null),[f,h]=Z.useState(null),[p,m]=Z.useState(null),[b,y]=Z.useState(null),[k,v]=Z.useState("Todo"),[_,M]=Z.useState(""),[H,T]=Z.useState(!0),[Y,q]=Z.useState(""),[ae,W]=Z.useState(!0),[z,P]=Z.useState(!1),[se,ce]=Z.useState(null),O=s==null?void 0:s.envOverrides,I=!!(O!=null&&O.stateFilter||O!=null&&O.teamId),X=async()=>{var j;try{const[G,ue]=await Promise.all([Xu(),Of()]);h(G.connected),m(((j=G.viewer)==null?void 0:j.name)??null),y(G.error??null),o(ue),v(ue.persisted.stateFilter.join(", ")),M(ue.persisted.teamId??""),T(ue.persisted.assigneeMe),q(ue.persisted.defaultAgentId??""),W(ue.persisted.syncEnabled)}catch(G){y(String(G))}};Z.useEffect(()=>{i&&X()},[i]);const he=async()=>{var j;P(!0),ce(null);try{const G=await Xu();h(G.connected),m(((j=G.viewer)==null?void 0:j.name)??null),y(G.error??null),ce(G.connected?"Connected":"Not connected")}catch(G){y(String(G))}finally{P(!1)}},re=async()=>{P(!0),ce(null);try{const j=k.split(",").map(ue=>ue.trim()).filter(Boolean),G=await Ob({stateFilter:j.length>0?j:["Todo"],teamId:_.trim()||null,assigneeMe:H,defaultAgentId:Y||null,syncEnabled:ae});o(G),ce(I?"Saved locally — env still overrides filters (see note below)":"Saved"),l==null||l()}catch(j){ce(String(j))}finally{P(!1)}},te=f===null?g.jsx("span",{className:"text-xs text-white/45",children:"Checking…"}):f?g.jsxs("span",{className:"text-xs text-emerald-300/90 bg-emerald-500/10 px-2 py-0.5 rounded-full border border-emerald-400/25",children:["Connected",p?` · ${p}`:""]}):g.jsx("span",{className:"text-xs text-amber-200/90 bg-amber-500/10 px-2 py-0.5 rounded-full border border-amber-400/25",children:"Missing API key"});return g.jsxs("div",{className:"rounded-xl glass-plate overflow-hidden",children:[g.jsxs("button",{type:"button",onClick:()=>r(j=>!j),className:"w-full flex items-center justify-between px-3 py-2 text-sm text-white/70 hover:text-white/90",children:[g.jsx("span",{children:"Linear settings"}),g.jsxs("span",{className:"flex items-center gap-2",children:[te,g.jsx("span",{className:"text-white/35",children:i?"▾":"▸"})]})]}),i&&g.jsxs("div",{className:"border-t border-white/10 px-3 py-3 space-y-3 text-sm",children:[b&&f===!1&&g.jsx("p",{className:"text-red-400/90 text-xs",children:b}),s&&g.jsxs("p",{className:"text-xs text-white/50 rounded-lg bg-black/20 border border-white/10 px-2 py-1.5",children:[g.jsx("span",{className:"text-white/70",children:"Inbox uses:"})," ",s.stateFilter.join(", "),s.assigneeMe?" · assigned to me":"",s.teamId?` · team ${s.teamId.slice(0,8)}…`:""]}),I&&g.jsxs("p",{className:"text-xs text-amber-200/90 rounded-lg bg-amber-500/10 border border-amber-400/20 px-2 py-1.5",children:[g.jsx("code",{className:"text-amber-100/90",children:"LINEAR_STATE_FILTER"})," or"," ",g.jsx("code",{className:"text-amber-100/90",children:"LINEAR_TEAM_ID"})," in env override saved filters. Remove from ",g.jsx("code",{className:"text-white/55",children:"~/.agent-dealer-dev/.env"})," to use the values below."]}),g.jsxs("p",{className:"text-xs text-white/45",children:["API key stays in ",g.jsx("code",{className:"text-white/60",children:"LINEAR_API_KEY"})," env — not stored here."]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"State filter (saved)"}),g.jsx("input",{type:"text",value:k,onChange:j=>v(j.target.value),placeholder:"Todo, Backlog",className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4]"})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"Team ID (optional, saved)"}),g.jsx("input",{type:"text",value:_,onChange:j=>M(j.target.value),placeholder:"UUID",className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4] font-mono text-xs"})]}),g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:H,onChange:j=>T(j.target.checked),className:"rounded"}),g.jsx("span",{children:"Assigned to me"})]}),g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:ae,onChange:j=>W(j.target.checked),className:"rounded"}),g.jsx("span",{children:"Sync status + comments to Linear"})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"Default agent"}),g.jsxs("select",{value:Y,onChange:j=>q(j.target.value),className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4]",children:[g.jsx("option",{value:"",children:"None"}),t.map(j=>g.jsxs("option",{value:j.id,children:[j.name,j.healthy?"":" (needs setup)"]},j.id))]})]}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",onClick:re,disabled:z,className:"btn-gold px-3 py-1.5 flex-1",children:z?"Saving…":"Save"}),g.jsx("button",{type:"button",onClick:he,disabled:z,className:"btn-ghost px-3 py-1.5",children:"Test"})]}),se&&g.jsx("p",{className:"text-xs text-white/50",children:se})]})]})}function JE({agents:t,loading:l,candidateCount:i,onRefresh:r,onConfigSaved:s}){var h;const[o,f]=Z.useState(null);return Z.useEffect(()=>{Xu().then(f).catch(()=>f({connected:!1,error:"Failed to check"}))},[]),g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"rounded-xl p-3 glass-plate space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("span",{className:"text-sm text-white/70",children:"Connection"}),o!=null&&o.connected?g.jsxs("span",{className:"text-xs text-emerald-300/90",children:["Connected · ",(h=o.viewer)==null?void 0:h.name]}):g.jsx("span",{className:"text-xs text-amber-200/90",children:(o==null?void 0:o.error)??"Not connected"})]}),g.jsx("p",{className:"text-sm text-white/45",children:l?"Fetching from Linear…":i===0?"No matching issues — adjust filters below or create issues in Linear.":`${i} issue${i===1?"":"s"} in inbox`}),g.jsx("button",{type:"button",onClick:r,disabled:l,className:"btn-gold w-full py-2",children:l?"Importing…":"Import from Linear"})]}),g.jsx(XE,{agents:t,onSaved:()=>{s(),r()}}),g.jsxs("p",{className:"text-xs text-white/40",children:["Set ",g.jsx("code",{className:"text-white/55",children:"LINEAR_API_KEY"})," in env. Filters are saved locally — not the API key."]})]})}function KE({agents:t,onCreated:l,onManageAgents:i,embedded:r}){const[s,o]=Z.useState(""),[f,h]=Z.useState(""),[p,m]=Z.useState("other"),[b,y]=Z.useState(""),[k,v]=Z.useState(Av),[_,M]=Z.useState(""),[H,T]=Z.useState(!1);Z.useEffect(()=>{t.length>0&&!t.some(W=>W.id===k)&&v(t[0].id)},[t,k]),Z.useEffect(()=>{const W=t.find(z=>z.id===k);if(!W){M("");return}M(W.defaultPlanModel??(W.runtime==="cursor_local"?is:""))},[k,t]);const Y=t.find(W=>W.id===k),q=!!k&&!!s.trim()&&(!!b.trim()||((Y==null?void 0:Y.healthy)??!1)),ae=async W=>{if(W.preventDefault(),!(!s.trim()||!k)){T(!0);try{await Ub({title:s.trim(),description:f.trim()||void 0,taskCategory:p,repo:b.trim()||void 0,agentId:k,planModel:_||null}),o(""),h(""),l()}catch(z){alert(String(z))}finally{T(!1)}}};return g.jsxs("form",{onSubmit:ae,className:r?"space-y-3":"panel space-y-3",children:[!r&&g.jsx("h2",{className:"heading-panel",children:"Manual Task"}),g.jsx(l0,{agents:t,selectedId:k,onSelect:v,onManage:i}),Y&&g.jsx(Hf,{runtime:Y.runtime,label:"Planning model",value:_,onChange:M,defaultModelId:Y.defaultPlanModel,disabled:H}),g.jsx("input",{className:"field",placeholder:"Title",value:s,onChange:W=>o(W.target.value)}),g.jsx("textarea",{className:"field-mono h-16 resize-y",placeholder:"Description",value:f,onChange:W=>h(W.target.value)}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("select",{className:"field flex-1",value:p,onChange:W=>m(W.target.value),children:["code","communication","email","research","content","other"].map(W=>g.jsx("option",{value:W,children:W},W))}),g.jsx("input",{className:"field flex-1",placeholder:"Repo override (optional)",value:b,onChange:W=>y(W.target.value)})]}),g.jsx("p",{className:"text-xs text-white/40 -mt-1",children:"Uses agent workspace by default. Override here for a one-off path."}),g.jsx("button",{type:"submit",disabled:H||!q,className:"btn-gold w-full py-2",children:H?"Starting…":"Kick plan"})]})}const $E=["plan_pending","queued"],PE=["review","failed"];function Sy(t,l,i){return $E.includes(t.status)?l.awaitingPlanReview:PE.includes(t.status)?l.resultReviewRuns:t.status==="done"&&i==="done"?l.runs.filter(r=>r.status==="done").sort((r,s)=>s.updatedAt.localeCompare(r.updatedAt)):[]}function id(t,l){return t.findIndex(i=>i.id===l)}function Df(t,l){const i=id(t,l);if(i<0)return t[0]??null;const r=t.filter(s=>s.id!==l);return r.length===0?null:r[Math.min(i,r.length-1)]??null}function WE({agents:t,onRefresh:l,onGoOperations:i,onManageAgents:r}){const[s,o]=Z.useState([]),[f,h]=Z.useState(!1),[p,m]=Z.useState(null),[b,y]=Z.useState(null),[k,v]=Z.useState(null),[_,M]=Z.useState(null),[H,T]=Z.useState(!1),Y=Z.useCallback(()=>(h(!0),m(null),Promise.all([zb(),Of(),Xu()]).then(([X,he,re])=>(o(X),M(he),T(re.connected),X)).catch(X=>(m(String(X)),o([]),[])).finally(()=>h(!1))),[]);Z.useEffect(()=>{Y()},[Y]);const q=s.find(X=>X.id===b)??null,ae=b?id(s,b):-1,W=Z.useCallback(X=>{const he=s[X];he&&(y(he.id),v("issue"))},[s]),z=Z.useCallback(async X=>{const he=Df(s,X);l();const re=await Y();if(!he){v(null),y(null);return}const te=re.find(G=>G.id===he.id);if(te){y(te.id),v("issue");return}const j=Df(re,X);j?(y(j.id),v("issue")):(v(null),y(null))},[s,l,Y]),P=()=>{l(),v(null),y(null),Y(),i()},se=()=>{v("import"),Y()},ce=()=>{y(null),v("manual")},O=X=>{y(X),v("issue")},I=()=>{v(null),y(null)};return g.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[g.jsx("div",{className:"px-6 pt-4 pb-3 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 max-w-6xl mx-auto w-full",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"heading-page",children:"Inbox"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Tasks waiting to kick — import from Linear or add manually"})]}),g.jsxs("div",{className:"flex gap-2 shrink-0",children:[g.jsx("button",{type:"button",onClick:se,className:"btn-ghost px-4 py-2 text-sm",children:"Linear Import"}),g.jsx("button",{type:"button",onClick:ce,className:"btn-gold px-4 py-2 text-sm",children:"+ Manual Task"})]})]})}),g.jsxs("div",{className:"flex-1 flex flex-col min-h-0 max-w-6xl mx-auto w-full px-6 py-4",children:[p&&g.jsx("p",{className:"text-sm text-red-400/90 mb-3",children:p}),g.jsxs("div",{className:"flex items-center justify-between gap-2 mb-3",children:[g.jsx("p",{className:"text-sm text-white/45",children:f?"Loading…":`${s.length} task${s.length===1?"":"s"}`}),g.jsx("button",{type:"button",onClick:()=>Y(),disabled:f,className:"btn-ghost px-2 py-1 text-xs",children:"Refresh"})]}),g.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 min-h-0",children:s.length===0&&!f?g.jsxs("div",{className:"py-12 text-center space-y-3",children:[g.jsx("p",{className:"text-sm text-white/45",children:"No tasks in inbox"}),H&&_&&g.jsxs("p",{className:"text-xs text-white/40 max-w-md mx-auto",children:["Filtering Linear: ",_.stateFilter.join(", "),_.assigneeMe?" · assigned to you":"",_.envOverrides.stateFilter||_.envOverrides.teamId?" · some filters from env":""]}),g.jsxs("div",{className:"flex justify-center gap-2",children:[g.jsx("button",{type:"button",onClick:se,className:"btn-ghost px-3 py-1.5 text-sm",children:"Linear settings"}),g.jsx("button",{type:"button",onClick:ce,className:"btn-gold px-3 py-1.5 text-sm",children:"+ Manual Task"})]})]}):s.map(X=>g.jsx(FE,{candidate:X,selected:b===X.id&&k==="issue",onSelect:()=>O(X.id)},X.id))})]}),k==="import"&&g.jsx(ky,{title:"Linear Import",subtitle:"Fetch issues assigned to you",onClose:I,children:g.jsx(JE,{agents:t,loading:f,candidateCount:s.length,onRefresh:Y,onConfigSaved:Y})}),k==="manual"&&g.jsx(ky,{title:"Manual Task",subtitle:"Add work that isn't in Linear yet",onClose:I,children:g.jsx(KE,{agents:t,onCreated:P,onManageAgents:r,embedded:!0})}),k==="issue"&&q&&g.jsx(GE,{issue:q,agents:t,onClose:I,onPromoted:()=>z(q.id),onManageAgents:r,queueNav:s.length>1?{index:ae,total:s.length,onPrev:()=>W(ae-1),onNext:()=>W(ae+1)}:void 0})]})}const eC=3;function tC(t){const l=Number.isFinite(t)?t:0;return String(Math.min(999,Math.max(0,l))).padStart(eC,"0")}function nC({value:t,label:l}){const i=tC(t).split("");return g.jsx("div",{className:"nixie-housing","aria-hidden":!l,"aria-label":l,children:i.map((r,s)=>g.jsxs("span",{className:"nixie-tube",children:[g.jsx("span",{className:"nixie-tube-ghost",children:"8"}),g.jsx("span",{className:"nixie-tube-digit",children:r})]},`${s}-${r}`))})}function wy({title:t,total:l,open:i,onToggle:r,accent:s,titleAccent:o,openRing:f="ring-[#92E4DD]/25"}){return g.jsx("section",{className:`flex flex-col self-start glass-column rounded-xl overflow-hidden border-t-2 ${s} ${i?`ring-1 ${f}`:""}`,children:g.jsxs("header",{className:"px-2 pt-2 pb-2 border-b border-white/[0.06] shrink-0 w-full",children:[g.jsx("h2",{className:`text-xs font-semibold leading-tight text-center ${o}`,children:t}),g.jsx("button",{type:"button",onClick:r,className:"nixie-stack-toggle w-full rounded mt-1.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#92E4DD]/45","aria-expanded":i,"aria-label":`${l} in ${t.toLowerCase()}. Click to ${i?"close":"show"} tickets.`,children:g.jsx("div",{className:"nixie-display-wrap",children:g.jsx(nC,{value:l})})})]})})}function rd({run:t,selected:l,onSelect:i,statusOverride:r,timeField:s="updated",compact:o=!1,queueBadge:f,queueActiveLabel:h="Running",queueQueuedLabel:p="In queue",hideStatusBadge:m=!1,extraBadge:b}){const y=r??t.status,k=jy(y),v=s==="created"?t.createdAt:t.updatedAt,_=Lf(t),M=f==="active"||f==="running"?"bg-[#92E4DD]/15 text-[#92E4DD] border-[#92E4DD]/35":f==="queued"||f==="waiting"?"bg-sky-500/15 text-sky-200 border-sky-400/30":null,H=f==="active"||f==="running";return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border-l-[3px] transition-colors ${k.accent} ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:`${o?"p-2.5":"p-3"} space-y-2`,children:[g.jsxs("div",{className:"flex items-center justify-between gap-2 min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[g.jsx(ot,{className:t.source==="linear"?"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 shrink-0":"bg-white/5 text-white/55 border-white/15 shrink-0",children:$u(t)}),g.jsx(ot,{className:"bg-white/5 text-white/45 border-white/10 shrink-0 normal-case",children:Rf(t.taskCategory)})]}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums shrink-0",title:new Date(v).toLocaleString(),children:Ku(v)})]}),g.jsx("h3",{className:`font-semibold text-[#E8F6F4] leading-snug ${o?"text-base line-clamp-2":"text-lg line-clamp-2"}`,children:t.title}),!o&&t.description&&g.jsx("p",{className:"text-sm text-white/45 line-clamp-2 leading-relaxed",children:t.description}),g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[g.jsxs(ot,{className:`${fs(t.runtime)} normal-case`,title:t.runtime?oa(t.runtime):void 0,children:[t.runtime&&g.jsx(e0,{runtime:t.runtime}),t.agentName??oa(t.runtime)]}),_&&g.jsxs(ot,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case max-w-[140px] truncate",title:_,children:["◆ ",_]}),b&&g.jsx(ot,{className:`${b.className} normal-case`,children:b.label}),f?g.jsxs(ot,{className:`${M} ml-auto`,children:[H&&g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-[#92E4DD] animate-pulse mr-0.5"}),H?h:p]}):m?null:g.jsx(ot,{className:`${k.tone} ml-auto`,title:k.hint,children:k.label})]})]})})}function _y({title:t,items:l,activeBadgeLabel:i,selectedId:r,onSelect:s,onClose:o,accent:f,titleAccent:h,empty:p,autoApprovedRunIds:m=[]}){return g.jsxs("section",{className:`absolute inset-0 z-10 flex flex-col min-h-0 glass-column rounded-xl overflow-hidden border-t-2 ${f} bg-[#0A0A07]/95`,children:[g.jsxs("header",{className:"px-4 pt-3 pb-2.5 border-b border-white/[0.06] shrink-0 flex items-center justify-between gap-3",children:[g.jsx("h2",{className:`heading-column ${h}`,children:t}),g.jsx("button",{type:"button",onClick:o,className:"text-xs text-white/45 hover:text-white/70 px-2 py-1 rounded border border-white/10 hover:border-white/20 transition-colors shrink-0",children:"Close"})]}),g.jsx("div",{className:"flex-1 min-h-0 p-2 space-y-2 overflow-y-auto",children:l.length===0?g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:p}):l.map(({run:b,queueBadge:y})=>g.jsx(rd,{run:b,selected:r===b.id,onSelect:()=>s(b),queueBadge:y,queueActiveLabel:i,queueQueuedLabel:"In queue",hideStatusBadge:!0,extraBadge:m.includes(b.id)?{label:"Auto-approved",className:"bg-emerald-400/15 text-emerald-200 border-emerald-400/35"}:void 0},b.id))})]})}function a0({title:t,count:l,children:i,empty:r,isEmpty:s,accent:o,titleAccent:f}){return g.jsxs("section",{className:`flex flex-col min-w-0 h-full glass-column rounded-xl overflow-hidden ${o?`border-t-2 ${o}`:"border-t border-white/[0.06]"}`,children:[g.jsx("header",{className:"px-4 pt-3 pb-2.5 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[g.jsx("h2",{className:`heading-column ${f??""}`,children:t}),l!==void 0&&g.jsx("span",{className:"text-base tabular-nums text-white/45",children:l})]})}),g.jsx("div",{className:"flex-1 min-h-0 p-2 space-y-2 overflow-y-auto",children:s?r:i})]})}function lC({runs:t,openQuestionCounts:l,selectedId:i,onSelect:r}){const s=t.filter(o=>l[o.id]).length;return g.jsx(a0,{title:s>0?`Review Plan · ${s} need answers`:"Review Plan",count:t.length,accent:"border-t-cyber-violet",titleAccent:"text-cyber-violet-light",isEmpty:t.length===0,empty:g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:"No plans ready yet"}),children:t.map(o=>{const f=l[o.id];return g.jsx(rd,{run:o,selected:i===o.id,onSelect:()=>r(o),hideStatusBadge:!0,extraBadge:f?{label:f===1?"1 question":`${f} questions`,className:"bg-amber-400/15 text-amber-200 border-amber-400/35"}:void 0},o.id)})})}function aC({snapshot:t,selectedRunId:l,onSelectRun:i}){const[r,s]=Z.useState(null),o=(t==null?void 0:t.awaitingPlanReview)??[],f=(t==null?void 0:t.planningActiveRuns)??[],h=(t==null?void 0:t.planningQueuedRuns)??[],p=(t==null?void 0:t.runningRuns)??[],m=(t==null?void 0:t.waitingExecution)??[],b=(t==null?void 0:t.resultReviewRuns)??[],y=[...f.map(_=>({run:_,queueBadge:"active"})),...h.map(_=>({run:_,queueBadge:"queued"}))],k=[...p.map(_=>({run:_,queueBadge:"active"})),...m.map(_=>({run:_,queueBadge:"queued"}))],v=_=>{s(M=>M===_?null:_)};return g.jsx("div",{className:"flex-1 min-h-0 px-6 py-4 w-full",children:g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 h-full w-full min-h-0",children:[g.jsxs("div",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-3 h-full min-h-0 items-start",children:[g.jsx(wy,{title:"In Planning",total:y.length,open:r==="planning",onToggle:()=>v("planning"),accent:"border-t-cyber-violet/60",titleAccent:"text-cyber-violet-light/80",openRing:"ring-cyber-violet/25"}),g.jsxs("div",{className:"relative min-h-0 h-full w-full self-stretch",children:[g.jsx(lC,{runs:o,openQuestionCounts:(t==null?void 0:t.openQuestionCounts)??{},selectedId:l,onSelect:i}),r==="planning"&&g.jsx(_y,{title:"In Planning",items:y,activeBadgeLabel:"Planning",selectedId:l,onSelect:i,onClose:()=>s(null),accent:"border-t-cyber-violet",titleAccent:"text-cyber-violet-light",empty:"Nothing planning — promote from Inbox"})]})]}),g.jsxs("div",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-3 h-full min-h-0 items-start",children:[g.jsx(wy,{title:"In Progress",total:k.length,open:r==="progress",onToggle:()=>v("progress"),accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",openRing:"ring-[#C4B643]/25"}),g.jsxs("div",{className:"relative min-h-0 h-full w-full self-stretch",children:[g.jsx(a0,{title:"Review Result",count:b.length,accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",isEmpty:b.length===0,empty:g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:"Nothing awaiting sign-off"}),children:b.map(_=>{const M=((t==null?void 0:t.pendingSendCounts)??{})[_.id];return g.jsx(rd,{run:_,selected:l===_.id,onSelect:()=>i(_),hideStatusBadge:_.status==="review",extraBadge:M?{label:"will send on approve",className:"bg-[#C4B643]/15 text-[#E8DC7A] border-[#C4B643]/35"}:void 0},_.id)})}),r==="progress"&&g.jsx(_y,{title:"In Progress",items:k,activeBadgeLabel:"Running",autoApprovedRunIds:(t==null?void 0:t.autoApprovedRunIds)??[],selectedId:l,onSelect:i,onClose:()=>s(null),accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",empty:"Queue empty — approve a plan to start"})]})]})]})})}function iC(){return g.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 overflow-hidden","aria-hidden":!0,children:[g.jsx("div",{className:"absolute top-16 left-12",children:g.jsx("div",{className:"ambient-orb ambient-orb-a w-[26rem] h-[26rem] rounded-full bg-cyan-500/10 blur-3xl"})}),g.jsx("div",{className:"absolute bottom-20 right-12",children:g.jsx("div",{className:"ambient-orb ambient-orb-b w-[26rem] h-[26rem] rounded-full bg-pink-500/10 blur-3xl"})}),g.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:g.jsx("div",{className:"ambient-orb ambient-orb-c w-[22rem] h-[22rem] rounded-full bg-blue-500/[0.07] blur-3xl"})})]})}function rC({className:t="w-5 h-5"}){return g.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:t,"aria-hidden":!0,children:[g.jsx("circle",{cx:"6.75",cy:"6.25",r:"3.25"}),g.jsx("circle",{cx:"13.5",cy:"6.75",r:"2.85",opacity:"0.85"}),g.jsx("path",{d:"M1.75 16v-1.1c0-2.35 1.928-4.25 4.3-4.25 1.16 0 2.21.456 3 1.2.79-.744 1.84-1.2 3-1.2 2.372 0 4.3 1.9 4.3 4.25V16H1.75z"})]})}const uC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAN5UlEQVR4AeydXagdVxmGF7loIKSpN/WHttqKktpAvWkVoRctp4gRtf4QbxRrREEb0wtRGkRovLCmKC1Y641CFGpBCtpIsVfHRvAm5KpIrMGfCCJUa8GmTWl6k+5nznlPvzOZ2Xtmz5o1a/Z8Ie/+vjU/a6351nPe/Xv22bFr185LLq9BbAZ2BP/nFeihAg5WD0X1LkNwsJyCXirgYPVSVu/UwXIGeqmAg9VLWTPsNPGUHKzEBZ/KcA7WVFY68XU6WIkLPpXhHKyprHTi63SwEhc89nDv37cndpdR+nOwopQxfScA9dDRfQGRM4O1ew+Fd3/wVtLB5WANtgTLDQxEwITI6eXoDz8dHvjrmbB2+J6ZDrFpcDlYgy9BswkAETAhcnvWnlfOBsS2G2aOlYNrOVisRsYCImBC5HVTveb5327tWjs8vGs5WFvLkVcCRMCEyO3szu/ea5tFjmMhGjm4loPFSmQkIAImRG6nBlDPvedbAZHbfeQ5uZaDxYpkICACJkRupwREwIR+c3w9fPu9+8LRb/7aHlLkOBaiMbRrOViswoACImBC5HYqVUCt/+jR4pBnz5wPqGiYm1xcy8F6c1GSZkAETIjcDj4PKHvcL574l20WuRyLxpCu5WCxAgkFRMCEyO3QTYHSOTgWUlvx2gyeITpYWo2eIxABEyK3w7UFyp5b5Vr27nAo13Kw7Cr1kAMRMCFyO0QXoNQPjoXUVhzatRwsrUTkCETAhMht9zGAsv3l6FoOll2hCDkQARMit13GBkp941hIbcUhXcvB0ip0jEAETIjcdtcXUHaM3Fwra7Bs4XLNgQiYELmdZwqgNB6OhdRWHMq1HCytQMsIRMCEyO3pKYGy4+bkWg6WXZkGORABEyK3pwwFlOaAYyG1FYdwLQdL1V8QgQiYELk93AJ16dyt4R2PXxNueXm/PSRZnotrOVgLlhyIgAmR28MtULw5/NID58LuP11ZHHLj9bcFVDQS3uBYqDxkatdysMorsNkGImBC5Jubi1AGik8b8ObwiWeOFft1c9cdR5QmjTm4loNVWnIgAiZEbnfXAaVj/vLPPwakNo6F1E4VcSxUHi+la7UDqzzTFWsDE2oLlC2Du9ZGNRysjTrU3sqliOdOnQ7c5dUePNuBY6FZWvzHsVDRSHiDY6HykKlcy8EylT91+l2mtZHy+SZEq+knBdy1gn+jH8DgKPcdfCp85AOPh4uv3symbbIfQ2nyGzA4FlIn9I/UThVxLFQeL4VrTdqxWGyAQhQfGF564XOk24RjITa6a1GFxZokWGWgHjz+sYC4C3vtws0r5Vp1CPTtWpMCqw4onIoFIKJVcC2e2fIMF3FtVjwRQdpW4cLatXScBFiLgLLVS+lad3/2urD+xIcCENg5dMnpC5gQue2Lx49/3/Odyt9LbPLY0fa1KF9psNoApULhWKhP1xJQXzhwbTHs3QeuK2KXGyACJkRu++IB/DeOngl/OPnxcOncLXbXVh7btVYSrGWA2qrwLDk7ewW9j8daV139y/Dhj34vCKjZUMV/QEBFo+UN5wETIrenCyigIseNr/jPznDFf3faw7bymK61UmB1BUoVfnLzPb9YrvX8ha+Fd960P1x19WMa4rLY1rWACJgQue0QiIAJkWsfToyu3HyjXNsVY7rWSoAVCygVmHji5LHQ1bXKd3n0WyfgQHX7tZ1jgAmRazsRiIAJkbOtrFSuNWqw+gBKC9HVtVj08l0effNsjO9gINK2muda9AdMiNyeB0TAhMjtvnKOY6G+XWuUYPUJlF2ILq718u69oQoe+mf7v9/+CdJtAhhkN9IGJkRu9wERMCFyu29ensK1RgVWKqC0KMu4Ft+m95XHfh6+PFMVPLyCj4ALaSxFuRYQARMi134iEAETImdbG+FYqE/XGgVYqYGyi9TGtQQUD4Lpg0VH5FZ677EKPCACJkRuz6MvYELkdl/bvG/XyhqsIYHSQrVxLQHFx2t+9vkvhp/OVPVpThwL4VhIYyn2CZTGwLFQX66VJVg5AKUFIDZ1LY4VUP84dZpm8R1WVe4i1+KxWHFgxQ3n4U6IvOKQTpv6dK2swMoNKK1aU9fS8eVY51rv+9sPggArnwNIfQGlsXAs1IdrZQFWrkBpAYi4FndbiLaVhaPq1WsgQfYccu4OiUOqL9caFKwxAKVFx7V4O+SFHQc2NplbAEFs4nEWzwzJrZ7983nbrM0Bl9e5fvz0rtpjYu7AsVBs1xoErDEBZRcR1+JNXBbfbievcy0eiPMMr+rFUs6T6BOgfvfi7eGhr34/6DGa9vcZ+3CtpGCNFSgtahvX+tSX7iz+zg1QAZf6KMcyUDyTTAkV88GxUEzXSgLW2IGi+NIi19rzytnAg/Kv779w2eesgAjRF9E61BBAMQ8ptmv1CtYqAaUFWORaQAVcOp4oiACJF0WJussbGijmh3AsFMu1egFrFYGi+NI819IxRAsUOdt4dshjqFyAYk5STNeKCtaqA6UFmOdaHANEuBIiZ5t9NT71YyjGbyIcC8VwrShg5QFUk9LFO6bKtYAImBC5Riu/Gq/tOcZYrtUJrCkCJRisawERMCFyHTPGiGOhrq61FFhTBsrCgms99/vXKn/rxR5X9Wq83Z9bHsO1WoHlQG1HANd6+MHPBB4/ofVHfrL9gM1W3avxm7uzCzgW6uJajcByoOavPc/wEN9EA2BVR0/NteaC5UBVITJ/2/ojj1YeMDXXqgTLgapko9FGXkpw1yp9jVFkoBotxCoeNCXXqlu/wrEsUOQ82+HbV3gAV3eib6+vwKRc695DlYUowGIPQBHR3utvI7g6VGAqrrV2+J7KKhVg4UxIRwAZUttj+wpM3bUKsCgbL4oRpaG+o1zjr0KcsmttgYVjIS0ojoXU9ti+AlN2rS2wKJu7FlWIq0m41qxk5cda28DCsdDsuOI/joWKht8sVYGputY2sKicuxZViKsputZlYOFYSKXFsZDaHttXYIqudRlYlM1diyrE1dRcqxIsHAuptDgWUttj+wpMzbUqwaJs7lpUIa6m5Fq1YOFYSKXFsZDaHttXIJ1rtZ9b2zMwHr5yoOobmPl0Ry1YDMTJRMlfjVcllo+r4lqvv+1iePHO/4XX33pxqxgApV8cmQsWjoV0Jo6F1PbYvgJjdy2+8ETfXCioLFBcH1WZCxYHuGtRhbgao2tZoPg0LBWpAortaCFYOBbiYIRjIXLXchXgp5pFqTp77XD155uqjk2xrS1QmtNCsDjQXYsqxFXurrUsUKpSI7BwLKSTcCyktsf2FcjVtboCpUo0AouD3bWowtKqPDEn14oFlC60MVg4FtKJOBZS22P7CuTgWrGBUhUag8UJ7lpUIa6Gcq2+gFJ1WoGFYyGdjGMhtT22r0Bq1+obKFWgFVic5K5FFeIqhWulAkqVaQ0WjoXUAY6F1PbYvgJ9ulZqoHT1rcHiRHctqhBXsV1rKKBUlaXAwrGQOsGxkNpjiLnNMZZrDQ2U6roUWJzsrkUV4qqLa+UClCqyNFg4FlJHOBZS22P7CizjWrkBpateGiw6cNeiCnHV1LVyBUrV6AQWjoXUGY6F1PbYvgKLXCt3oHTFncCiE3ctqhBX81yLvzXd5PNQcWfUvrfOYOFYSEPjWEhtj+0rMM+16I3PcukjwBzLttzUGSwuKIpr0ZFrqwJVrjUGoHQBUcDCsZA6xbGQ2h7bVYDaHbjp/qDfgBkTULrSKGDRmbsWVegmgLrv4FMB0RNf7537XR7zrFI0sHAspEEoElLbY30FqBMwIY7i+1/R0796OOlfWmXsWIoGFhNy16IKzVUHlP0Bbd5bXkdGBYuCIF0ihUNqe9yoADXBnRBbcCdka8f2MSsqWBTCXYsqVGsKQOnK54ClQ9pFfuqQzqKYSO0pRq4fd0JcP+6EbJ3YvkqKDhbFcdeiCiFMEaiNKy/9yRNt7Br5SUTqhwIjtVc9cq24E+JacSdka8L2VVYvjkXBpuhaDhQrv6HewOKnE20Ms3G3QOHVXqXIdeFOiOvCnZC9frZPSb2BRRFX3bUcKFa5Wr2CxU8s0tAsBFJ7rJFrwJ0Q14A7IXutbB+L+phnr2Ax4VVyLQeKFW2m3sHipxhpOiwOUnsMkfniToj54k7IXhfbXW9WoHewGGqsruVAsXrLKQlY/GQjTZEFQ2rnFpkb7oSYG+6E7DWw3VVfgSRgMfwYXOuTdxwJx7/7/63PQwETcqBYwXZKBhaLgzQ9XAGpPWQUUHfdfiQwR2BC5EPOa8xjJwOLIpVd68Ybhv3b09kCRbFGrqRg4QBINcMhlKeMDlT/1U4KFpdTdi0Wme0pxFg8hgJoAOfuDpGnGH9KYyQHi0VEKjKLrLyv6ED1Vdn6fpODxVRSuZYDRbWH0SBg4VhIlxzbtSxQJ04eCwfvf0vwuzxVO00cBCwurQ/XqgLqyWeOMZwrcQUGAwvHQrreLq7VP1CapcemFRgMLCbY1bUcKKqYpwYFC8dCKk1T13KgVLF846BgUZY2ruVAUbFxaHCwcCykclW5lgOl6ownDg4WpapzLQeK6oxTWYCFYyGVENfSWy96HcpfNlB1xhGzAItSlV1rAVCc4sq4AtmAhWMhBypjWlpMLRuwmDNvu/hdHpUYv7ICa/zl9CtQBRwsVcJj1Ao4WFHL6Z2pAg6WKuExagWigRV1Vt7Z6CvgYI1+CfO8AAcrz3UZ/awcrNEvYZ4X4GDluS6jn5WDNfolzPMCHKw81yXjWTWb2hsAAAD//0DhVxwAAAAGSURBVAMA8NLI/5AoLlwAAAAASUVORK5CYII=";function sC({className:t="",size:l=36}){return g.jsx("img",{src:uC,alt:"",width:l,height:l,className:`shrink-0 object-contain ${t}`,"aria-hidden":!0,draggable:!1})}function oC(){var q,ae,W;const[t,l]=Z.useState("ops"),[i,r]=Z.useState(null),[s,o]=Z.useState(null),f=Z.useCallback(()=>{hg().then(r).catch(console.error)},[]);Z.useEffect(()=>{f();const z=Kb(r),P=setInterval(f,5e3);return()=>{z(),clearInterval(P)}},[f]),Z.useEffect(()=>{if(!s||!i)return;const z=i.runs.find(P=>P.id===s.id);z&&o(z)},[i,s==null?void 0:s.id]);const h=((q=i==null?void 0:i.resultReviewRuns)==null?void 0:q.length)??0,p=((ae=i==null?void 0:i.awaitingPlanReview)==null?void 0:ae.length)??0,m=(i==null?void 0:i.runs.filter(z=>z.status==="done").length)??0,b=((W=i==null?void 0:i.agents)==null?void 0:W.length)??0,y=(i==null?void 0:i.agentIssueCount)??0,k=p+h,v=Z.useMemo(()=>!s||!i?[]:Sy(s,i,t),[s,i,t]),_=s?id(v,s.id):-1,M=Z.useCallback(z=>{const P=v[z];P&&o(P)},[v]),H=Z.useCallback(async z=>{if(!i)return;const P=Sy(i.runs.find(O=>O.id===z)??s,i,t),se=Df(P,z),ce=await hg();if(r(ce),!se){o(null);return}o(ce.runs.find(O=>O.id===se.id)??null)},[i,s,t]),T=z=>`px-3 py-2 text-base rounded ${t===z?"bg-[#92E4DD]/20 text-[#92E4DD]":"text-white/60 hover:text-white"}`,Y=()=>l("agents");return g.jsxs(g.Fragment,{children:[g.jsx(iC,{}),g.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[g.jsxs("header",{className:"px-6 py-4 border-b border-white/10 flex flex-wrap gap-4 items-center justify-between glass-header shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-6",children:[g.jsxs("button",{type:"button",onClick:()=>{l("ops"),o(null)},className:"flex items-center gap-3 text-left rounded cursor-pointer hover:opacity-90 transition-opacity focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#92E4DD]/45","aria-label":"AgentDealer — go to Operations",children:[g.jsx(sC,{size:40}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-xl font-bold sm:text-2xl",style:{background:"linear-gradient(to right, #C4B643, #D4C760)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"AgentDealer"}),g.jsx("p",{className:"text-sm text-[#92E4DD]",children:"Kick tasks, approve plans, review results"})]})]}),g.jsxs("nav",{className:"flex gap-1",children:[g.jsxs("button",{type:"button",onClick:()=>l("ops"),className:T("ops"),children:["Operations",k>0&&g.jsxs("span",{className:"ml-1.5 inline-flex items-center gap-1 align-middle",children:[p>0&&g.jsx("span",{className:"text-xs leading-none bg-cyber-violet/20 text-cyber-violet-light px-1.5 py-0.5 rounded tabular-nums border border-cyber-violet/35",title:`${p} plan${p===1?"":"s"} ready to review`,children:p}),h>0&&g.jsx("span",{className:"text-xs leading-none bg-[#C4B643]/30 text-[#E8DC7A] px-1.5 py-0.5 rounded tabular-nums",title:`${h} result${h===1?"":"s"} to review`,children:h})]})]}),g.jsx("button",{type:"button",onClick:()=>l("intake"),className:T("intake"),children:"Inbox"}),g.jsxs("button",{type:"button",onClick:()=>l("done"),className:T("done"),children:["Done",m>0&&g.jsx("span",{className:"ml-1 text-xs bg-white/10 px-1.5 py-0.5 rounded",children:m})]})]})]}),g.jsxs("button",{type:"button",onClick:Y,className:`${T("agents")} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[g.jsx(rC,{className:"w-6 h-6 shrink-0"}),b>0&&g.jsx("span",{className:"text-xs leading-none bg-white/10 text-white/55 px-1.5 py-0.5 rounded tabular-nums border border-white/10",title:`${b} configured agent${b===1?"":"s"}`,children:b}),y>0&&g.jsxs("span",{className:"inline-flex items-center gap-0.5 text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30",title:`${y} need${y===1?"s":""} attention`,children:[g.jsx(n0,{className:"w-3 h-3 shrink-0"}),y]})]})]}),g.jsxs("main",{className:"flex-1 flex overflow-hidden",children:[t==="ops"&&g.jsx(aC,{snapshot:i,selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:o}),t==="intake"&&g.jsx(WE,{agents:(i==null?void 0:i.agents)??[],onRefresh:f,onGoOperations:()=>l("ops"),onManageAgents:Y}),t==="agents"&&g.jsx(YE,{agents:(i==null?void 0:i.agents)??[],agentDeckOnline:(i==null?void 0:i.agentDeckOnline)??!1,onRefresh:f}),t==="done"&&g.jsx(ZE,{runs:(i==null?void 0:i.runs)??[],selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:o,sentRunIds:(i==null?void 0:i.sentRunIds)??[]})]}),s&&g.jsx(BE,{run:s,agents:(i==null?void 0:i.agents)??[],onClose:()=>o(null),onRefresh:f,onApproved:f,onApprovedAndNext:()=>H(s.id),onDoneAndNext:()=>H(s.id),queueNav:v.length>1?{runs:v,index:_,onPrev:()=>M(_-1),onNext:()=>M(_+1)}:void 0,onRetry:z=>{o(z),l("ops"),f()}})]})]})}function cC(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}cC();Nb.createRoot(document.getElementById("root")).render(g.jsx(Z.StrictMode,{children:g.jsx(oC,{})}));
|