agent-afk 5.355.0 → 5.356.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/background-registry.d.ts +1 -0
- package/dist/agent/background-registry.types.d.ts +1 -0
- package/dist/agent/daemon/builtin-task.d.ts +1 -0
- package/dist/agent/daemon/github-webhook-receiver.d.ts +36 -0
- package/dist/agent/daemon/shell-task.d.ts +1 -0
- package/dist/agent/daemon/tool-health-task.d.ts +1 -0
- package/dist/agent/daemon/triggers.d.ts +1 -0
- package/dist/agent/daemon/worktree-prune-task.d.ts +1 -0
- package/dist/agent/facets/schema.d.ts +1 -1
- package/dist/agent/provider.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/overage-tracker.d.ts +29 -0
- package/dist/agent/providers/anthropic-direct/provider-query-setup.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query/client-setup.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/query/turn-request.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query-options.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query-runtime.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query-turn-driver.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/request-types.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/query/context-pressure.arguments.d.ts +2 -0
- package/dist/agent/providers/openai-compatible/query/context-pressure.d.ts +3 -2
- package/dist/agent/providers/openai-compatible/query/turn-iteration.d.ts +1 -1
- package/dist/agent/session/accounting-accumulator.d.ts +6 -0
- package/dist/agent/session/closure-emitter.d.ts +4 -0
- package/dist/agent/session/turn-stream-runner.fatal-done.d.ts +4 -0
- package/dist/agent/session/wire-executors.d.ts +2 -0
- package/dist/agent/subagent/continuation-dispose.d.ts +9 -0
- package/dist/agent/subagent/continuation-registry.d.ts +12 -0
- package/dist/agent/tools/subagent/background-branch.d.ts +1 -0
- package/dist/agent/tools/subagent/continuation-dispatch.d.ts +8 -0
- package/dist/agent/tools/subagent/continuation-run.d.ts +1 -0
- package/dist/agent/tools/subagent/continuation-worktree.d.ts +21 -0
- package/dist/agent/tools/subagent/foreground-handoff.d.ts +1 -1
- package/dist/agent/tools/subagent/foreground-promotion.d.ts +5 -0
- package/dist/agent/tools/subagent-executor.execute-once.helpers.d.ts +1 -0
- package/dist/agent/trace/cost.d.ts +17 -0
- package/dist/agent/trace/events.d.ts +8 -0
- package/dist/agent/trace/events.session-phase.d.ts +2 -0
- package/dist/agent/trace/receipt.types.d.ts +3 -0
- package/dist/agent/trace/types.d.ts +2 -0
- package/dist/agent/trace/types.session-phase.d.ts +1 -1
- package/dist/agent/types/message-types.d.ts +2 -0
- package/dist/cli/commands/events.d.ts +2 -0
- package/dist/cli/commands/interactive/bootstrap-infra.d.ts +2 -0
- package/dist/cli/session-autosave.d.ts +1 -0
- package/dist/cli/session-store.d.ts +1 -1
- package/dist/cli/tty-trace.d.ts +8 -0
- package/dist/cli.mjs +525 -514
- package/dist/config/env.d.ts +30 -0
- package/dist/config/env.daemon.d.ts +23 -0
- package/dist/config/env.tty-trace.d.ts +8 -0
- package/dist/index.mjs +395 -395
- package/dist/insights/aggregators/session-prescreen.d.ts +1 -0
- package/dist/telegram/session-lifecycle.d.ts +1 -1
- package/dist/telegram/session-provider.d.ts +5 -0
- package/dist/telegram.mjs +425 -425
- package/dist/web-ui-assets/assets/{angular-html-BuB3Xwa-.js → angular-html-D3r_OvVu.js} +1 -1
- package/dist/web-ui-assets/assets/{angular-ts-DrWtBiBz.js → angular-ts-CYYKmYCY.js} +1 -1
- package/dist/web-ui-assets/assets/{apl-BfbHb7D4.js → apl-Qebclc6H.js} +1 -1
- package/dist/web-ui-assets/assets/{astro-Be6fp2Al.js → astro-EC7rA9tr.js} +1 -1
- package/dist/web-ui-assets/assets/{blade-DzrBc1Ik.js → blade-3LEHciyw.js} +1 -1
- package/dist/web-ui-assets/assets/{c-BmOCcIKK.js → c-BMHvDp3M.js} +1 -1
- package/dist/web-ui-assets/assets/{chapel-DqoMRDYP.js → chapel-DIdY1czS.js} +1 -1
- package/dist/web-ui-assets/assets/{cobol-BWcFjXux.js → cobol-B4veGjea.js} +1 -1
- package/dist/web-ui-assets/assets/{coffee-fgm8QvPo.js → coffee-CTW65drd.js} +1 -1
- package/dist/web-ui-assets/assets/{cpp-Bm53UCRY.js → cpp-UFv8IcpT.js} +1 -1
- package/dist/web-ui-assets/assets/{crystal-BOM_4uHZ.js → crystal-CAl2astP.js} +1 -1
- package/dist/web-ui-assets/assets/{css-NyBy1rdj.js → css-W4FP-8b5.js} +1 -1
- package/dist/web-ui-assets/assets/{dist-BwLOGCJM.js → dist-CL6azZY0.js} +2 -2
- package/dist/web-ui-assets/assets/{edge-DVJOwB-r.js → edge-BHV7W1lD.js} +1 -1
- package/dist/web-ui-assets/assets/{elixir-22WcAtSb.js → elixir-BSeMK1dJ.js} +1 -1
- package/dist/web-ui-assets/assets/{elm-Ddhj6iO2.js → elm-DBbEnhG_.js} +1 -1
- package/dist/web-ui-assets/assets/{erb-BBnnDLnf.js → erb-prErkLIh.js} +1 -1
- package/dist/web-ui-assets/assets/{git-rebase-C1maaghc.js → git-rebase-C2YnmdYZ.js} +1 -1
- package/dist/web-ui-assets/assets/{glimmer-js-CnZUZaVl.js → glimmer-js-UE5yPqqs.js} +1 -1
- package/dist/web-ui-assets/assets/{glimmer-ts-D8dEoCFG.js → glimmer-ts-CHUC7ee4.js} +1 -1
- package/dist/web-ui-assets/assets/{glsl-Bk477m8m.js → glsl-BP7hWcQl.js} +1 -1
- package/dist/web-ui-assets/assets/{graphql-DT_lK-LX.js → graphql-B2mDXSlF.js} +1 -1
- package/dist/web-ui-assets/assets/{hack-MX1qmO45.js → hack-CYmItAIT.js} +1 -1
- package/dist/web-ui-assets/assets/{haml-Dl9ZsNh1.js → haml-BE55kcBt.js} +1 -1
- package/dist/web-ui-assets/assets/{handlebars-Dfku37Fg.js → handlebars-HqWAfmn0.js} +1 -1
- package/dist/web-ui-assets/assets/{html-rBV1hv39.js → html-DQqmUNra.js} +1 -1
- package/dist/web-ui-assets/assets/{html-derivative-BugeKd9d.js → html-derivative-DHtOwb02.js} +1 -1
- package/dist/web-ui-assets/assets/{http-C1FdJQoT.js → http-qsOPQWSh.js} +1 -1
- package/dist/web-ui-assets/assets/{hurl-B8Tqv--n.js → hurl-CLG0zR7e.js} +1 -1
- package/dist/web-ui-assets/assets/{index-jxN_375F.css → index-7_rxjzbt.css} +1 -1
- package/dist/web-ui-assets/assets/index-CrFMdDLW.js +94 -0
- package/dist/web-ui-assets/assets/{java-i9tQYiUJ.js → java-CIoYCZPE.js} +1 -1
- package/dist/web-ui-assets/assets/{javascript-DHkYQPBV.js → javascript-BiSgC3HH.js} +1 -1
- package/dist/web-ui-assets/assets/{jinja-BsYyycs0.js → jinja-uoMhNXH1.js} +1 -1
- package/dist/web-ui-assets/assets/{jison-B4utk3Rp.js → jison-62dtSwty.js} +1 -1
- package/dist/web-ui-assets/assets/{json-CkQJ6hZ6.js → json-Cxps7Vp_.js} +1 -1
- package/dist/web-ui-assets/assets/{jsx-BxpqLhaw.js → jsx-i4FhzmZ3.js} +1 -1
- package/dist/web-ui-assets/assets/{julia-Bz0RIEKk.js → julia-4eQbL51O.js} +1 -1
- package/dist/web-ui-assets/assets/{just-CKJs0D30.js → just-DuzaqAD6.js} +1 -1
- package/dist/web-ui-assets/assets/{latex-Dkxnor6C.js → latex-DR1YiBEA.js} +1 -1
- package/dist/web-ui-assets/assets/{liquid-CYklfeLg.js → liquid-BCJgC6HS.js} +1 -1
- package/dist/web-ui-assets/assets/{lua-BMXYDhjN.js → lua-BC4drQZp.js} +1 -1
- package/dist/web-ui-assets/assets/{marko-DDcpjyDA.js → marko-DtJIqB68.js} +1 -1
- package/dist/web-ui-assets/assets/{mdc-DCfW6SUk.js → mdc-CYBfAC3q.js} +1 -1
- package/dist/web-ui-assets/assets/{nginx-HhjkSdae.js → nginx-CMR593MB.js} +1 -1
- package/dist/web-ui-assets/assets/{nim-DzYITBYm.js → nim-BbUeXd8c.js} +1 -1
- package/dist/web-ui-assets/assets/{org-OV0shxVF.js → org-oHqhaY5K.js} +1 -1
- package/dist/web-ui-assets/assets/{perl-CNHoCLMx.js → perl-DE4Fx5iS.js} +1 -1
- package/dist/web-ui-assets/assets/{php-D3UW9YmA.js → php-rh-d5On6.js} +1 -1
- package/dist/web-ui-assets/assets/{pug-gZURAtyY.js → pug-8Ni7Ix1b.js} +1 -1
- package/dist/web-ui-assets/assets/{qml-CxczNQrj.js → qml-CrGNXQfX.js} +1 -1
- package/dist/web-ui-assets/assets/{r-CYSQmhYh.js → r-BiZL36Lf.js} +1 -1
- package/dist/web-ui-assets/assets/{razor-C8RkL8GY.js → razor-DnQFAjmg.js} +1 -1
- package/dist/web-ui-assets/assets/{regexp-BROA9FZ9.js → regexp-ZehcoqOu.js} +1 -1
- package/dist/web-ui-assets/assets/{rst-6_5wei2F.js → rst-BHnIys2E.js} +1 -1
- package/dist/web-ui-assets/assets/{ruby-CGSkRBuk.js → ruby-CQjEBqXf.js} +1 -1
- package/dist/web-ui-assets/assets/{sas-BHzPKY9p.js → sas-DDw_qWwd.js} +1 -1
- package/dist/web-ui-assets/assets/{scss-BhdrfutF.js → scss-Buc-D2q0.js} +1 -1
- package/dist/web-ui-assets/assets/{shellscript-2oBOuRcG.js → shellscript-DSdjoUZi.js} +1 -1
- package/dist/web-ui-assets/assets/{shellsession-_NizP2ZG.js → shellsession-Dlf5ZOd7.js} +1 -1
- package/dist/web-ui-assets/assets/{soy-Cq1Cl1Y_.js → soy-BtqthtDI.js} +1 -1
- package/dist/web-ui-assets/assets/{sql-DCk2ZvIR.js → sql-Wbs3a-2M.js} +1 -1
- package/dist/web-ui-assets/assets/{stata-CY0XEIjf.js → stata-CZQadxtE.js} +1 -1
- package/dist/web-ui-assets/assets/{surrealql-DPCIj4-R.js → surrealql-BHX1_keB.js} +1 -1
- package/dist/web-ui-assets/assets/{svelte-mNYrrLYc.js → svelte-5Gzb7jP2.js} +1 -1
- package/dist/web-ui-assets/assets/{templ-CjaWoGHC.js → templ-6-2sxD2t.js} +1 -1
- package/dist/web-ui-assets/assets/{tex-D3ao8VCf.js → tex-s7OSL_QU.js} +1 -1
- package/dist/web-ui-assets/assets/{ts-tags-lFkQdLml.js → ts-tags-ILSDF7eF.js} +1 -1
- package/dist/web-ui-assets/assets/{tsx-CsdWmMpE.js → tsx-Ba3RCOh1.js} +1 -1
- package/dist/web-ui-assets/assets/{twig-CSGU10iK.js → twig-B5Q27p1D.js} +1 -1
- package/dist/web-ui-assets/assets/{typescript-CEegO1My.js → typescript-BGZwH6By.js} +1 -1
- package/dist/web-ui-assets/assets/{typst-DzDXDNft.js → typst-BNUBq5yx.js} +1 -1
- package/dist/web-ui-assets/assets/{vue-DWAhaqej.js → vue-BWxalE-A.js} +1 -1
- package/dist/web-ui-assets/assets/{vue-html-DF5GPB7J.js → vue-html-Czl3_Xc-.js} +1 -1
- package/dist/web-ui-assets/assets/{vue-vine-DXYE3l-Q.js → vue-vine-DbFJFkgw.js} +1 -1
- package/dist/web-ui-assets/assets/{xml-D6s8ylbB.js → xml-_-I97g00.js} +1 -1
- package/dist/web-ui-assets/assets/{xsl-C1cpADN5.js → xsl-BS-NWXy1.js} +1 -1
- package/dist/web-ui-assets/assets/{yaml-BxT2kUBY.js → yaml-Dru6aRB_.js} +1 -1
- package/dist/web-ui-assets/index.html +2 -2
- package/package.json +6 -3
- package/dist/web-ui-assets/assets/index-Fk5hxG58.js +0 -94
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ie(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+k(a,u),c+=ie(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+k(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function A(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var oe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function se(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ce(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else se(ce.bind(null,e))}var le={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=le,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ce,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:A}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=se,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function ne(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),ee=Symbol.for(`react.transitional.element`),te=Symbol.for(`react.portal`),ne=Symbol.for(`react.fragment`),k=Symbol.for(`react.strict_mode`),re=Symbol.for(`react.profiler`),ie=Symbol.for(`react.consumer`),ae=Symbol.for(`react.context`),A=Symbol.for(`react.forward_ref`),oe=Symbol.for(`react.suspense`),se=Symbol.for(`react.suspense_list`),ce=Symbol.for(`react.memo`),le=Symbol.for(`react.lazy`),ue=Symbol.for(`react.activity`),de=Symbol.for(`react.legacy_hidden`),fe=Symbol.for(`react.memo_cache_sentinel`),pe=Symbol.for(`react.view_transition`),me=Symbol.for(`react.recoverable`),he=Symbol.iterator;function ge(e){return typeof e!=`object`||!e?null:(e=he&&e[he]||e[`@@iterator`],typeof e==`function`?e:null)}var _e=Symbol.for(`react.client.reference`);function ve(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ne:return`Fragment`;case re:return`Profiler`;case k:return`StrictMode`;case oe:return`Suspense`;case se:return`SuspenseList`;case ue:return`Activity`;case pe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case te:return`Portal`;case ae:return e.displayName||`Context`;case ie:return(e._context.displayName||`Context`)+`.Consumer`;case A:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ce:return t=e.displayName||null,t===null?ve(e.type)||`Memo`:t;case le:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var ye=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},xe=[],Se=-1;function Ce(e){return{current:e}}function we(e){0>Se||(e.current=xe[Se],xe[Se]=null,Se--)}function Te(e,t){Se++,xe[Se]=e.current,e.current=t}var Ee=Ce(null),De=Ce(null),Oe=Ce(null),ke=Ce(null);function Ae(e,t){switch(Te(Oe,t),Te(De,e),Te(Ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=mp(t),e=hp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}we(Ee),Te(Ee,e)}function je(){we(Ee),we(De),we(Oe)}function Me(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,Te(ke,e)),t=Ee.current;var n=hp(t,e.type);t!==n&&(Te(De,e),Te(Ee,n))}function Ne(e){De.current===e&&(we(Ee),we(De)),ke.current===e&&(we(ke),sh._currentValue=be)}var Pe,Fe;function Ie(e){if(Pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Pe=t&&t[1]||``,Fe=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+Pe+e+Fe}var Le=!1;function Re(e,t){if(!e||Le)return``;Le=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Le=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ie(n):``}function ze(e,t){switch(e.tag){case 26:case 27:case 5:return Ie(e.type);case 16:return Ie(`Lazy`);case 13:return e.child!==t&&t!==null?Ie(`Suspense Fallback`):Ie(`Suspense`);case 19:return Ie(`SuspenseList`);case 0:case 15:return Re(e.type,!1);case 11:return Re(e.type.render,!1);case 1:return Re(e.type,!0);case 31:return Ie(`Activity`);case 30:return Ie(`ViewTransition`);default:return``}}function Be(e){try{var t=``,n=null;do t+=ze(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Ve=Object.prototype.hasOwnProperty,He=t.unstable_scheduleCallback,Ue=t.unstable_cancelCallback,We=t.unstable_shouldYield,Ge=t.unstable_requestPaint,Ke=t.unstable_now,qe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,Ye=t.unstable_UserBlockingPriority,Xe=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,$e=t.log,et=t.unstable_setDisableYieldValue,tt=null,nt=null;function rt(e){if(typeof $e==`function`&&et(e),nt&&typeof nt.setStrictMode==`function`)try{nt.setStrictMode(tt,e)}catch{}}var it=Math.clz32?Math.clz32:st,at=Math.log,ot=Math.LN2;function st(e){return e>>>=0,e===0?32:31-(at(e)/ot|0)|0}var ct=256,lt=262144,ut=4194304;function dt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;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 ft(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=dt(n))):i=dt(o):i=dt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=dt(n))):i=dt(o)):i=dt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function pt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function mt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-it(n),i=1<<r;t|=e[r],n&=~i}return t}function ht(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gt(){var e=ut;return ut<<=1,!(ut&62914560)&&(ut=4194304),e}function _t(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-it(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&bt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function bt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-it(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function xt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function St(e,t){var n=t&-t;return n=n&42?1:Ct(n),(n&(e.suspendedLanes|t))===0?n:0}function Ct(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 wt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Tt(){var e=M.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function Et(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var Dt=Math.random().toString(36).slice(2),Ot=`__reactFiber$`+Dt,kt=`__reactProps$`+Dt,At=`__reactContainer$`+Dt,jt=`__reactEvents$`+Dt,Mt=`__reactListeners$`+Dt,Nt=`__reactHandles$`+Dt,Pt=`__reactResources$`+Dt,Ft=`__reactMarker$`+Dt,It=`__reactLoad$`+Dt;function Lt(e){delete e[Ot],delete e[kt],delete e[Mt],delete e[Nt]}function Rt(e){var t;if(t=e[Ot])return t;for(var n=e.parentNode;n;){if(t=n[At]||n[Ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gm(e);e!==null;){if(n=e[Ot])return n;e=gm(e)}return t}e=n,n=e.parentNode}return null}function zt(e){if(e=e[Ot]||e[At]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Vt(e){var t=e[Pt];return t||=e[Pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ht(e){e[Ft]=!0}function Ut(e){e[It]=void 0}var Wt=new Set,Gt={};function Kt(e,t){qt(e,t),qt(e+`Capture`,t)}function qt(e,t){for(Gt[e]=t,e=0;e<t.length;e++)Wt.add(t[e])}var Jt=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]*$`),Yt={},Xt={};function Zt(e){return Ve.call(Xt,e)?!0:Ve.call(Yt,e)?!1:Jt.test(e)?Xt[e]=!0:(Yt[e]=!0,!1)}var Qt=!1;function $t(){var e=Qt;return Qt=!1,e}function en(e,t,n){if(Zt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function tn(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function nn(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function rn(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function an(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function on(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sn(e){if(!e._valueTracker){var t=an(e)?`checked`:`value`;e._valueTracker=on(e,t,``+e[t])}}function cn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=an(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var ln=/[\n"\\]/g;function un(e){return e.replace(ln,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function dn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+rn(t)):e.value!==``+rn(t)&&(e.value=``+rn(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):pn(e,rn(n)):o===`number`&&e.value==t?pn(e,rn(e.value)):pn(e,rn(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+rn(s):e.removeAttribute(`name`)}function fn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){sn(e);return}n=n==null?``:``+rn(n),t=t==null?n:``+rn(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),sn(e)}function pn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function mn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+rn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function hn(e,t,n){t!=null&&(t=``+rn(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+rn(n)}function gn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ye(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=rn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),sn(e)}function _n(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vn=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 yn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||vn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function bn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Qt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(yn(e,a,r),Qt=!0)}else for(var o in t)t.hasOwnProperty(o)&&yn(e,o,t[o])}function xn(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 Sn=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`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Cn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wn(e){return Cn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Tn(){}var En=null;function Dn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var On=null,kn=null;function An(e){var t=zt(e);if(t&&(e=t.stateNode)){var n=e[kt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(dn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+un(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[kt]||null;if(!a)throw Error(i(90));dn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&cn(r)}break a;case`textarea`:hn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&mn(e,!!n.multiple,t,!1)}}}var jn=!1;function Mn(e,t,n){if(jn)return e(t,n);jn=!0;try{return e(t)}finally{if(jn=!1,(On!==null||kn!==null)&&(Ud(),On&&(t=On,e=kn,kn=On=null,An(t),e)))for(t=0;t<e.length;t++)An(e[t])}}function Nn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[kt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Pn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Fn=!1;if(Pn)try{var In={};Object.defineProperty(In,"passive",{get:function(){Fn=!0}}),window.addEventListener(`test`,In,In),window.removeEventListener(`test`,In,In)}catch{Fn=!1}var Ln=null,Rn=null,zn=null;function Bn(){if(zn)return zn;var e,t=Rn,n=t.length,r,i=`value`in Ln?Ln.value:Ln.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return zn=i.slice(e,1<r?1-r:void 0)}function N(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Vn(){return!0}function Hn(){return!1}function Un(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Vn:Hn,this.isPropagationStopped=Hn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Vn)},persist:function(){},isPersistent:Vn}),t}var Wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gn=Un(Wn),Kn=D({},Wn,{view:0,detail:0}),qn=Un(Kn),Jn,Yn,Xn,Zn=D({},Kn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:or,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!==Xn&&(Xn&&e.type===`mousemove`?(Jn=e.screenX-Xn.screenX,Yn=e.screenY-Xn.screenY):Yn=Jn=0,Xn=e),Jn)},movementY:function(e){return`movementY`in e?e.movementY:Yn}}),P=Un(Zn),Qn=Un(D({},Zn,{dataTransfer:0})),$n=Un(D({},Kn,{relatedTarget:0})),er=Un(D({},Wn,{animationName:0,elapsedTime:0,pseudoElement:0})),tr=Un(D({},Wn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),nr=Un(D({},Wn,{data:0})),rr={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},ir={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`},F={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function ar(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=F[e])?!!t[e]:!1}function or(){return ar}var sr=Un(D({},Kn,{key:function(e){if(e.key){var t=rr[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=N(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?ir[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:or,charCode:function(e){return e.type===`keypress`?N(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?N(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),cr=Un(D({},Zn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),lr=Un(D({},Wn,{submitter:0})),ur=Un(D({},Kn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:or})),dr=Un(D({},Wn,{propertyName:0,elapsedTime:0,pseudoElement:0})),fr=Un(D({},Zn,{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})),pr=Un(D({},Wn,{newState:0,oldState:0,source:0})),mr=[9,13,27,32],hr=Pn&&`CompositionEvent`in window,gr=null;Pn&&`documentMode`in document&&(gr=document.documentMode);var _r=Pn&&`TextEvent`in window&&!gr,vr=Pn&&(!hr||gr&&8<gr&&11>=gr),yr=` `,br=!1;function xr(e,t){switch(e){case`keyup`:return mr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Sr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var I=!1;function Cr(e,t){switch(e){case`compositionend`:return Sr(t);case`keypress`:return t.which===32?(br=!0,yr):null;case`textInput`:return e=t.data,e===yr&&br?null:e;default:return null}}function L(e,t){if(I)return e===`compositionend`||!hr&&xr(e,t)?(e=Bn(),zn=Rn=Ln=null,I=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return vr&&t.locale!==`ko`?null:t.data;default:return null}}var wr={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 Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!wr[e.type]:t===`textarea`}function Er(e,t,n,r){On?kn?kn.push(r):kn=[r]:On=r,t=Zf(t,`onChange`),0<t.length&&(n=new Gn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Or=null;function kr(e){Wf(e,0)}function Ar(e){if(cn(Bt(e)))return e}function jr(e,t){if(e===`change`)return t}var Mr=!1;if(Pn){var Nr;if(Pn){var Pr=`oninput`in document;if(!Pr){var Fr=document.createElement(`div`);Fr.setAttribute(`oninput`,`return;`),Pr=typeof Fr.oninput==`function`}Nr=Pr}else Nr=!1;Mr=Nr&&(!document.documentMode||9<document.documentMode)}function Ir(){Dr&&(Dr.detachEvent(`onpropertychange`,Lr),Or=Dr=null)}function Lr(e){if(e.propertyName===`value`&&Ar(Or)){var t=[];Er(t,Or,e,Dn(e)),Mn(kr,t)}}function Rr(e,t,n){e===`focusin`?(Ir(),Dr=t,Or=n,Dr.attachEvent(`onpropertychange`,Lr)):e===`focusout`&&Ir()}function zr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ar(Or)}function Br(e,t){if(e===`click`)return Ar(t)}function Vr(e,t){if(e===`input`||e===`change`)return Ar(t)}function Hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ur=typeof Object.is==`function`?Object.is:Hr;function Wr(e,t){if(Ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ve.call(t,i)||!Ur(e[i],t[i]))return!1}return!0}function Gr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qr(e,t){var n=Kr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Kr(n)}}function Jr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gr(e.document)}return t}function Xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Zr=Pn&&`documentMode`in document&&11>=document.documentMode,Qr=null,$r=null,ei=null,ti=!1;function ni(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ti||Qr==null||Qr!==Gr(r)||(r=Qr,`selectionStart`in r&&Xr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ei&&Wr(ei,r)||(ei=r,r=Zf($r,`onSelect`),0<r.length&&(t=new Gn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ii={animationend:ri(`Animation`,`AnimationEnd`),animationiteration:ri(`Animation`,`AnimationIteration`),animationstart:ri(`Animation`,`AnimationStart`),transitionrun:ri(`Transition`,`TransitionRun`),transitionstart:ri(`Transition`,`TransitionStart`),transitioncancel:ri(`Transition`,`TransitionCancel`),transitionend:ri(`Transition`,`TransitionEnd`)},ai={},oi={};Pn&&(oi=document.createElement(`div`).style,`AnimationEvent`in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),`TransitionEvent`in window||delete ii.transitionend.transition);function si(e){if(ai[e])return ai[e];if(!ii[e])return e;var t=ii[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oi)return ai[e]=t[n];return e}var ci=si(`animationend`),li=si(`animationiteration`),ui=si(`animationstart`),di=si(`transitionrun`),fi=si(`transitionstart`),pi=si(`transitioncancel`),mi=si(`transitionend`),hi=new Map,gi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);gi.push(`scrollEnd`);function _i(e,t){hi.set(e,t),Kt(t,[e])}var vi=0;function yi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=wd.identifierPrefix;var n=vi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function bi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Md;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function xi(e,t){return e=bi(e),t=bi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Si=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Ci=[],wi=0,Ti=0;function Ei(){for(var e=wi,t=Ti=wi=0;t<e;){var n=Ci[t];Ci[t++]=null;var r=Ci[t];Ci[t++]=null;var i=Ci[t];Ci[t++]=null;var a=Ci[t];if(Ci[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ai(n,i,a)}}function Di(e,t,n,r){Ci[wi++]=e,Ci[wi++]=t,Ci[wi++]=n,Ci[wi++]=r,Ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Oi(e,t,n,r){return Di(e,t,n,r),ji(e)}function ki(e,t){return Di(e,null,null,t),ji(e)}function Ai(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-it(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ji(e){if(50<Nd)throw Nd=0,Pd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Mi={};function Ni(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pi(e,t,n,r){return new Ni(e,t,n,r)}function Fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ii(e,t){var n=e.alternate;return n===null?(n=Pi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Li(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ri(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Fi(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,Ee.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ue:return e=Pi(31,n,t,a),e.elementType=ue,e.lanes=o,e;case ne:return zi(n.children,a,o,t);case k:s=8,a|=24;break;case re:return e=Pi(12,n,t,a|2),e.elementType=re,e.lanes=o,e;case oe:return e=Pi(13,n,t,a),e.elementType=oe,e.lanes=o,e;case se:return e=Pi(19,n,t,a),e.elementType=se,e.lanes=o,e;case de:case pe:return e=a|32,e=Pi(30,n,t,e),e.elementType=pe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ae:s=10;break a;case ie:s=9;break a;case A:s=11;break a;case ce:s=14;break a;case le:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Pi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function zi(e,t,n,r){return e=Pi(7,e,r,t),e.lanes=n,e}function Bi(e,t,n){return e=Pi(6,e,null,t),e.lanes=n,e}function Vi(e){var t=Pi(18,null,null,0);return t.stateNode=e,t}function Hi(e,t,n){return t=Pi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ui=new WeakMap;function Wi(e,t){if(typeof e==`object`&&e){var n=Ui.get(e);return n===void 0?(t={value:e,source:t,stack:Be(t)},Ui.set(e,t),t):n}return{value:e,source:t,stack:Be(t)}}var Gi=[],Ki=0,qi=null,Ji=0,Yi=[],Xi=0,Zi=null,Qi=1,$i=``;function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=qi,qi=e,Ji=t}function ta(e,t,n){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Zi=e;var r=Qi;e=$i;var i=32-it(r)-1;r&=~(1<<i),n+=1;var a=32-it(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Qi=1<<32-it(t)+i|n<<i|r,$i=a+e}else Qi=1<<a|n<<i|r,$i=e}function na(e){e.return!==null&&(ea(e,1),ta(e,1,0))}function ra(e){for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null;for(;e===Zi;)Zi=Yi[--Xi],Yi[Xi]=null,$i=Yi[--Xi],Yi[Xi]=null,Qi=Yi[--Xi],Yi[Xi]=null}function ia(e,t){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Qi=t.id,$i=t.overflow,Zi=e}var R=null,aa=null,z=!1,oa=null,sa=!1,ca=Error(i(519));function la(e){throw ha(Wi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ca}function ua(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ot]=e,t[kt]=r,n){case`dialog`:Y(`cancel`,t),Y(`close`,t);break;case`iframe`:case`object`:case`embed`:Y(`load`,t);break;case`video`:case`audio`:for(n=0;n<Hf.length;n++)Y(Hf[n],t);break;case`source`:Y(`error`,t);break;case`img`:case`image`:case`link`:Y(`error`,t),Y(`load`,t);break;case`details`:Y(`toggle`,t);break;case`input`:Y(`invalid`,t),fn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Y(`invalid`,t);break;case`textarea`:Y(`invalid`,t),gn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||rp(t.textContent,n)?(r.popover!=null&&(Y(`beforetoggle`,t),Y(`toggle`,t)),r.onScroll!=null&&Y(`scroll`,t),r.onScrollEnd!=null&&Y(`scrollend`,t),r.onClick!=null&&(t.onclick=Tn),t=!0):t=!1,t||la(e,!0)}function da(e){for(R=e.return;R;)switch(R.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:R=R.return}}function fa(e){if(e!==R)return!1;if(!z)return da(e),z=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||_p(e.type,e.memoizedProps)),n=!n),n&&aa&&la(e),da(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=hm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=hm(e)}else t===27?(t=aa,Ep(e.type)?(e=mm,mm=null,aa=e):aa=t):aa=R?pm(e.stateNode.nextSibling):null;return!0}function pa(){aa=R=null,z=!1}function ma(){var e=oa;return e!==null&&(gd===null?gd=e:gd.push.apply(gd,e),oa=null),e}function ha(e){oa===null?oa=[e]:oa.push(e)}var ga=Ce(null),_a=null,va=null;function ya(e,t,n){Te(ga,t._currentValue),t._currentValue=n}function ba(e){e._currentValue=ga.current,we(ga)}function xa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Sa(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),xa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),xa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),xa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ca(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Ur(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ke.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&Sa(t,e,n,r),t.flags|=262144,e!==null}function wa(e){for(e=e.firstContext;e!==null;){if(!Ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ta(e){_a=e,va=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ea(e){return Oa(_a,e)}function Da(e,t){return _a===null&&Ta(e),Oa(e,t)}function Oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},va===null){if(e===null)throw Error(i(308));va=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else va=va.next=t;return n}var ka=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Aa=t.unstable_scheduleCallback,ja=t.unstable_NormalPriority,Ma={$$typeof:ae,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Na(){return{controller:new ka,data:new Map,refCount:0}}function Pa(e){e.refCount--,e.refCount===0&&Aa(ja,function(){e.controller.abort()})}function Fa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ia=null;function La(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ra=null,za=0,Ba=0,Va=null;function Ha(e,t){if(Ra===null){var n=Ra=[];za=0,Ba=Rf(),Va={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return za++,t.then(Ua,Ua),t}function Ua(){if(--za===0&&(Ia=null,Ra!==null)){Va!==null&&(Va.status=`fulfilled`);var e=Ra;Ra=null,Ba=0,Va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Wa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ga=j.S;j.S=function(e,t){if(yd=Ke(),typeof t==`object`&&t&&typeof t.then==`function`&&Ha(e,t),Ia!==null)for(var n=Tf;n!==null;)Fa(n,Ia),n=n.next;if(n=e.types,n!==null){for(var r=Tf;r!==null;)Fa(r,n),r=r.next;if(Ba!==0){r=Ia,r===null&&(r=Ia=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ga!==null&&Ga(e,t)};var Ka=Ce(null);function qa(){var e=Ka.current;return e===null?nd.pooledCache:e}function Ja(e,t){t===null?Te(Ka,Ka.current):Te(Ka,t.pool)}function Ya(){var e=qa();return e===null?null:{parent:Ma._currentValue,pool:e}}var Xa=Error(i(460)),Za=Error(i(474)),Qa=Error(i(542)),$a={then:function(){}};function eo(e){return e=e.status,e===`fulfilled`||e===`rejected`}function to(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Tn,Tn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ao(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(Tn,Tn);else{if(e=nd,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ao(e),e}throw ro=t,Xa}}function no(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ro=e,Xa):e}}var ro=null;function io(){if(ro===null)throw Error(i(459));var e=ro;return ro=null,e}function ao(e){if(e===Xa||e===Qa)throw Error(i(483))}var oo=null,so=0;function co(e){var t=so;return so+=1,oo===null&&(oo=[]),to(oo,e,t)}function lo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function uo(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function fo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ii(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Bi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===ne?(e=d(e,t,n.props.children,r,n.key),lo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===le&&no(i)===t.type)?(t=a(t,n.props),lo(t,n),t.return=e,t):(t=Ri(n.type,n.key,n.props,null,e.mode,r),lo(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Hi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=zi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ee:return n=Ri(t.type,t.key,t.props,null,e.mode,n),lo(n,t),n.return=e,n;case te:return t=Hi(t,e.mode,n),t.return=e,t;case le:return t=no(t),f(e,t,n)}if(ye(t)||ge(t))return t=zi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,co(t),n);if(t.$$typeof===ae)return f(e,Da(e,t),n);uo(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case ee:return n.key===i?l(e,t,n,r):null;case te:return n.key===i?u(e,t,n,r):null;case le:return n=no(n),p(e,t,n,r)}if(ye(n)||ge(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,co(n),r);if(n.$$typeof===ae)return p(e,t,Da(e,n),r);uo(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case ee:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case te:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case le:return r=no(r),m(e,t,n,r,i)}if(ye(r)||ge(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,co(r),i);if(r.$$typeof===ae)return m(e,t,n,Da(t,r),i);uo(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),z&&ea(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return z&&ea(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),z&&ea(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),z&&ea(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return z&&ea(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),z&&ea(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ne&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ee:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ne){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),lo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===le&&no(l)===r.type){n(e,r.sibling),c=a(r,o.props),lo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ne?(c=zi(o.props.children,e.mode,c,o.key),lo(c,o),c.return=e,e=c):(c=Ri(o.type,o.key,o.props,null,e.mode,c),lo(c,o),c.return=e,e=c)}return s(e);case te:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Hi(o,e.mode,c),c.return=e,e=c}return s(e);case le:return o=no(o),_(e,r,o,c)}if(ye(o))return h(e,r,o,c);if(ge(o)){if(l=ge(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,co(o),c);if(o.$$typeof===ae)return _(e,r,Da(e,o),c);uo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{so=0;var i=_(e,t,n,r);return oo=null,i}catch(t){if(t===Xa||t===Qa)throw t;var a=Pi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var po=fo(!0),mo=fo(!1),ho=!1;function go(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _o(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ji(e),Ai(e,null,n),t}return Di(e,r,t,n),ji(e)}function bo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}function xo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var So=!1;function Co(){if(So){var e=Va;if(e!==null)throw e}}function wo(e,t,n,r){So=!1;var i=e.updateQueue;ho=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(K&f)===f:(r&f)===f){f!==0&&f===Ba&&(So=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:ho=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ud|=o,e.lanes=o,e.memoizedState=d}}function To(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)To(n[e],t)}var Do=Ce(null),Oo=Ce(0);function ko(e,t){e=cd,Te(Oo,e),Te(Do,t),cd=e|t.baseLanes}function Ao(){Te(Oo,cd),Te(Do,Do.current)}function jo(){cd=Oo.current,we(Do),we(Oo)}var Mo=Ce(null),No=null;function Po(e){var t=e.alternate;Te(zo,zo.current&1),Te(Mo,e),No===null&&(t===null||Do.current!==null||t.memoizedState!==null)&&(No=e)}function Fo(e){Te(zo,zo.current),Te(Mo,e),No===null&&(No=e)}function Io(e){e.tag===22?(Te(zo,zo.current),Te(Mo,e),No===null&&(No=e)):Lo()}function Lo(){Te(zo,zo.current),Te(Mo,Mo.current)}function Ro(e){we(Mo),No===e&&(No=null),we(zo)}var zo=Ce(0);function Bo(e,t){Te(Mo,Mo.current),Te(zo,t)}function Vo(e){we(zo),we(Mo),No===e&&(No=null)}function Ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||um(n)||dm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Uo=0,B=null,Wo=null,Go=null,Ko=!1,qo=!1,Jo=!1,Yo=0,Xo=0,Zo=null,Qo=0;function $o(){throw Error(i(321))}function es(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function ts(e,t,n,r,i,a){return Uo=a,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?vc:yc,Jo=!1,a=n(r,i),Jo=!1,qo&&(a=rs(t,n,r,i)),ns(e),a}function ns(e){j.H=_c;var t=Wo!==null&&Wo.next!==null;if(Uo=0,Go=Wo=B=null,Ko=!1,Xo=0,Zo=null,t)throw Error(i(300));e===null||Fc||(e=e.dependencies,e!==null&&wa(e)&&(Fc=!0))}function rs(e,t,n,r){B=e;var a=0;do{if(qo&&(Zo=null),Xo=0,qo=!1,25<=a)throw Error(i(301));if(a+=1,Go=Wo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=bc,o=t(n,r)}while(qo);return o}function is(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?ds(t):t,e=e.useState()[0],(Wo===null?null:Wo.memoizedState)!==e&&(B.flags|=1024),t}function as(){var e=Yo!==0;return Yo=0,e}function os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ss(e){if(Ko){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ko=!1}Uo=0,Go=Wo=B=null,qo=!1,Xo=Yo=0,Zo=null}function cs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Go===null?B.memoizedState=Go=e:Go=Go.next=e,Go}function ls(){if(Wo===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=Wo.next;var t=Go===null?B.memoizedState:Go.next;if(t!==null)Go=t,Wo=e;else{if(e===null)throw B.alternate===null?Error(i(467)):Error(i(310));Wo=e,e={memoizedState:Wo.memoizedState,baseState:Wo.baseState,baseQueue:Wo.baseQueue,queue:Wo.queue,next:null},Go===null?B.memoizedState=Go=e:Go=Go.next=e}return Go}function us(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ds(e){var t=Xo;return Xo+=1,Zo===null&&(Zo=[]),e=to(Zo,e,t),t=B,(Go===null?t.memoizedState:Go.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?vc:yc),e}function fs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ds(e);if(e.$$typeof===me)return;if(e.$$typeof===ae)return Ea(e)}throw Error(i(438,String(e)))}function ps(e){var t=null,n=B.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=B.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=us(),B.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=fe;return t.index++,n}function ms(e,t){return typeof t==`function`?t(e):t}function hs(e){return gs(ls(),Wo,e)}function gs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Uo&f)===f:(K&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ba&&(d=!0);else if((Uo&p)===p){u=u.next,p===Ba&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,B.lanes|=p,ud|=p;f=u.action,Jo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,B.lanes|=f,ud|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ur(o,e.memoizedState)&&(Fc=!0,d&&(n=Va,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function _s(e){var t=ls(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ur(o,t.memoizedState)||(Fc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function vs(e,t,n){var r=B,a=ls(),o=z;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Ur((Wo||a).memoizedState,n);if(s&&(a.memoizedState=n,Fc=!0),a=a.queue,Us(xs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Go!==null&&!!(Go.memoizedState.tag&1),Rs(e?9:8,{destroy:void 0},bs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,nd===null)throw Error(i(349));o||Uo&127||ys(r,t,n)}return n}function ys(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t=us(),B.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function bs(e,t,n,r){t.value=n,t.getSnapshot=r,Ss(t)&&Cs(e)}function xs(e,t,n){return n(function(){Ss(t)&&Cs(e)})}function Ss(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ur(e,n)}catch{return!0}}function Cs(e){var t=ki(e,2);t!==null&&Rd(t,e,2)}function ws(e){var t=cs();if(typeof e==`function`){var n=e;if(e=n(),Jo){rt(!0);try{n()}finally{rt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:e},t}function Ts(e,t,n,r){return e.baseState=n,gs(e,Wo,typeof r==`function`?r:ms)}function Es(e,t,n,r,a){if(mc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ds(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ds(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};o.types=a===null?null:a.types,j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),Os(e,t,s)}catch(n){As(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),Os(e,t,a)}catch(n){As(e,t,n)}}function Os(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ks(e,t,n)},function(n){return As(e,t,n)}):ks(e,t,n)}function ks(e,t,n){t.status=`fulfilled`,t.value=n,js(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ds(e,n)))}function As(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,js(t),t=t.next;while(t!==r)}e.action=null}function js(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ms(e,t){return t}function Ns(e,t){if(z){var n=nd.formState;if(n!==null){a:{var r=B;if(z){if(aa){b:{for(var i=aa,a=sa;i.nodeType!==8;)if(!a||(i=pm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){aa=pm(i.nextSibling),r=i.data===`F!`;break a}}la(r)}r=!1}r&&(t=n[0])}}return n=cs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:t},n.queue=r,n=dc.bind(null,B,r),r.dispatch=n,r=ws(!1),a=pc.bind(null,B,!1,r.queue),r=cs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Es.bind(null,B,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ps(e){return Fs(ls(),Wo,e)}function Fs(e,t,n){if(t=gs(e,t,Ms)[0],e=hs(ms)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ds(t)}catch(e){throw e===Xa?Qa:e}else r=t;t=ls();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(B.flags|=2048,Rs(9,{destroy:void 0},Is.bind(null,i,n),null)),[r,a,e]}function Is(e,t){e.action=t}function Ls(e){var t=ls(),n=Wo;if(n!==null)return Fs(t,n,e);ls(),t=t.memoizedState,n=ls();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=B.updateQueue,t===null&&(t=us(),B.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function zs(){return ls().memoizedState}function Bs(e,t,n,r){var i=cs();B.flags|=e,i.memoizedState=Rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Vs(e,t,n,r){var i=ls();r=r===void 0?null:r;var a=i.memoizedState.inst;Wo!==null&&r!==null&&es(r,Wo.memoizedState.deps)?i.memoizedState=Rs(t,a,n,r):(B.flags|=e,i.memoizedState=Rs(1|t,a,n,r))}function Hs(e,t){Bs(8390656,8,e,t)}function Us(e,t){Vs(2048,8,e,t)}function Ws(e){B.flags|=4;var t=B.updateQueue;if(t===null)t=us(),B.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gs(e){var t=ls().memoizedState;return Ws({ref:t,nextImpl:e}),function(){if(W&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ks(e,t){return Vs(4,2,e,t)}function qs(e,t){return Vs(4,4,e,t)}function Js(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ys(e,t,n){n=n==null?null:n.concat([e]),Vs(4,4,Js.bind(null,t,e),n)}function Xs(){}function Zs(e,t){var n=ls();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&es(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qs(e,t){var n=ls();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&es(t,r[1]))return r[0];if(r=e(),Jo){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r}function $s(e,t,n){return n===void 0||Uo&1073741824&&!(K&261930)?e.memoizedState=t:(e.memoizedState=n,e=Id(),B.lanes|=e,ud|=e,n)}function ec(e,t,n,r){return Ur(n,t)?n:Do.current===null?!(Uo&106)||Uo&1073741824&&!(K&261930)?(Fc=!0,e.memoizedState=n):(e=Id(),B.lanes|=e,ud|=e,t):(e=$s(e,n,r),Ur(e,t)||(Fc=!0),e)}function tc(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};s.types=o===null?null:o.types,j.T=s,pc(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?fc(e,t,Wa(c,r),Fd(e)):fc(e,t,r,Fd(e))}catch(n){fc(e,t,{then:function(){},status:`rejected`,reason:n},Fd())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function nc(){}function rc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ic(e).queue;tc(e,a,t,be,n===null?nc:function(){return ac(e),n(r)})}function ic(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:be},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ac(e){var t=ic(e);t.next===null&&(t=e.alternate.memoizedState),fc(e,t.next.queue,{},Fd())}function oc(){return Ea(sh)}function sc(){return ls().memoizedState}function cc(){return ls().memoizedState}function lc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Fd();e=vo(n);var r=yo(t,e,n);r!==null&&(Rd(r,t,n),bo(r,t,n)),t={cache:Na()},e.payload=t;return}t=t.return}}function uc(e,t,n){var r=Fd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},mc(e)?hc(t,n):(n=Oi(e,t,n,r),n!==null&&(Rd(n,e,r),gc(n,t,r)))}function dc(e,t,n){fc(e,t,n,Fd())}function fc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(mc(e))hc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ur(s,o))return Di(e,t,i,0),nd===null&&Ei(),!1}catch{}if(n=Oi(e,t,i,r),n!==null)return Rd(n,e,r),gc(n,t,r),!0}return!1}function pc(e,t,n,r){if(r={lane:2,revertLane:Rf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},mc(e)){if(t)throw Error(i(479))}else t=Oi(e,n,r,2),t!==null&&Rd(t,e,2)}function mc(e){var t=e.alternate;return e===B||t!==null&&t===B}function hc(e,t){qo=Ko=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}var _c={readContext:Ea,use:fs,useCallback:$o,useContext:$o,useEffect:$o,useImperativeHandle:$o,useLayoutEffect:$o,useInsertionEffect:$o,useMemo:$o,useReducer:$o,useRef:$o,useState:$o,useDebugValue:$o,useDeferredValue:$o,useTransition:$o,useSyncExternalStore:$o,useId:$o,useHostTransitionStatus:$o,useFormState:$o,useActionState:$o,useOptimistic:$o,useMemoCache:$o,useCacheRefresh:$o,useEffectEvent:$o},vc={readContext:Ea,use:fs,useCallback:function(e,t){return cs().memoizedState=[e,t===void 0?null:t],e},useContext:Ea,useEffect:Hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Bs(4194308,4,Js.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bs(4194308,4,e,t)},useInsertionEffect:function(e,t){Bs(4,2,e,t)},useMemo:function(e,t){var n=cs();t=t===void 0?null:t;var r=e();if(Jo){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=cs();if(n!==void 0){var i=n(t);if(Jo){rt(!0);try{n(t)}finally{rt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=uc.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=cs();return e={current:e},t.memoizedState=e},useState:function(e){e=ws(e);var t=e.queue,n=dc.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xs,useDeferredValue:function(e,t){return $s(cs(),e,t)},useTransition:function(){var e=ws(!1);return e=tc.bind(null,B,e.queue,!0,!1),cs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=cs();if(z){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),nd===null)throw Error(i(349));K&127||ys(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Hs(xs.bind(null,r,o,e),[e]),r.flags|=2048,Rs(9,{destroy:void 0},bs.bind(null,r,o,n,t),null),n},useId:function(){var e=cs(),t=nd.identifierPrefix;if(z){var n=$i,r=Qi;n=(r&~(1<<32-it(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Yo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Qo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:oc,useFormState:Ns,useActionState:Ns,useOptimistic:function(e){var t=cs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=pc.bind(null,B,!0,n),n.dispatch=t,[e,t]},useMemoCache:ps,useCacheRefresh:function(){return cs().memoizedState=lc.bind(null,B)},useEffectEvent:function(e){var t=cs(),n={impl:e};return t.memoizedState=n,function(){if(W&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},yc={readContext:Ea,use:fs,useCallback:Zs,useContext:Ea,useEffect:Us,useImperativeHandle:Ys,useInsertionEffect:Ks,useLayoutEffect:qs,useMemo:Qs,useReducer:hs,useRef:zs,useState:function(){return hs(ms)},useDebugValue:Xs,useDeferredValue:function(e,t){return ec(ls(),Wo.memoizedState,e,t)},useTransition:function(){var e=hs(ms)[0],t=ls().memoizedState;return[typeof e==`boolean`?e:ds(e),t]},useSyncExternalStore:vs,useId:sc,useHostTransitionStatus:oc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){return Ts(ls(),Wo,e,t)},useMemoCache:ps,useCacheRefresh:cc,useEffectEvent:Gs},bc={readContext:Ea,use:fs,useCallback:Zs,useContext:Ea,useEffect:Us,useImperativeHandle:Ys,useInsertionEffect:Ks,useLayoutEffect:qs,useMemo:Qs,useReducer:_s,useRef:zs,useState:function(){return _s(ms)},useDebugValue:Xs,useDeferredValue:function(e,t){var n=ls();return Wo===null?$s(n,e,t):ec(n,Wo.memoizedState,e,t)},useTransition:function(){var e=_s(ms)[0],t=ls().memoizedState;return[typeof e==`boolean`?e:ds(e),t]},useSyncExternalStore:vs,useId:sc,useHostTransitionStatus:oc,useFormState:Ls,useActionState:Ls,useOptimistic:function(e,t){var n=ls();return Wo===null?(n.baseState=e,[e,n.queue.dispatch]):Ts(n,Wo,e,t)},useMemoCache:ps,useCacheRefresh:cc,useEffectEvent:Gs};function xc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fd(),i=vo(r);i.payload=t,n!=null&&(i.callback=n),t=yo(e,i,r),t!==null&&(Rd(t,e,r),bo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fd(),i=vo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=yo(e,i,r),t!==null&&(Rd(t,e,r),bo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fd(),r=vo(n);r.tag=2,t!=null&&(r.callback=t),t=yo(e,r,n),t!==null&&(Rd(t,e,n),bo(t,e,n))}};function Cc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Wr(n,r)||!Wr(i,a):!0}function wc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Sc.enqueueReplaceState(t,t.state,null)}function Tc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ec(e){Si(e)}function Dc(e){console.error(e)}function V(e){Si(e)}function Oc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function kc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ac(e,t,n){return n=vo(n),n.tag=3,n.payload={element:null},n.callback=function(){Oc(e,t)},n}function jc(e){return e=vo(e),e.tag=3,e}function Mc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){kc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){kc(t,n,r),typeof i!=`function`&&(Sd===null?Sd=new Set([this]):Sd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Nc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ca(t,n,a,!0),n=Mo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return No===null?Xd():n.alternate===null&&ld===0&&(ld=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===$a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),yf(e,r,a)),!1;case 22:return n.flags|=65536,r===$a?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),yf(e,r,a)),!1}throw Error(i(435,n.tag))}return yf(e,r,a),Xd(),!1}if(z)return t=Mo.current,t===null?(r!==ca&&(t=Error(i(423),{cause:r}),ha(Wi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Wi(r,n),a=Ac(e.stateNode,r,a),xo(e,a),ld!==4&&(ld=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ca&&(e=Error(i(422),{cause:r}),ha(Wi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Wi(o,n),hd===null?hd=[o]:hd.push(o),ld!==4&&(ld=2),t===null)return!0;r=Wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ac(n.stateNode,r,e),xo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(Sd===null||!Sd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=jc(a),Mc(a,e,n,r),xo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Pc=Error(i(461)),Fc=!1;function Ic(e,t,n,r){t.child=e===null?mo(t,null,n,r):po(t,e.child,n,r)}function Lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ta(t),r=ts(e,t,n,o,a,i),s=as(),e!==null&&!Fc?(os(e,t,i),dl(e,t,i)):(z&&s&&na(t),t.flags|=1,Ic(e,t,r,i),t.child)}function Rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,zc(e,t,a,r,i)):(e=Ri(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!fl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wr:n,n(o,r)&&e.ref===t.ref)return dl(e,t,i)}return t.flags|=1,e=Ii(a,r),e.ref=t.ref,e.return=t,t.child=e}function zc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wr(a,r)&&e.ref===t.ref){if(Fc=!1,t.pendingProps=r=a,fl(e,i))e.flags&131072&&(Fc=!0);else return t.lanes=e.lanes,dl(e,t,i)}}return qc(e,t,n,r,i)}function Bc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Hc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ja(t,a===null?null:a.cachePool),a===null?Ao():ko(t,a),Io(t);else return r=t.lanes=536870912,Hc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ja(t,null),Ao(),Lo()):(Ja(t,a.cachePool),ko(t,a),Lo(),t.memoizedState=null);return Ic(e,t,i,n),t.child}function Vc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Hc(e,t,n,r,i){var a=qa();return a=a===null?null:{parent:Ma._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ja(t,null),Ao(),Io(t),e!==null&&Ca(e,t,r,!0),t.childLanes=i,null}function Uc(e,t){return t=nl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Wc(e,t,n){return po(t,e.child,null,n),e=Uc(t,t.pendingProps),e.flags|=2,Ro(t),t.memoizedState=null,e}function Gc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(z){if(r.mode===`hidden`)return e=Uc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Vc(null,e);if(Fo(t),(e=aa)?(e=lm(e,sa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,R=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=536870912,null}return Uc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Fo(t),a){if(t.flags&256)t.flags&=-257,t=Wc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Fc||Ca(e,t,n,!1),a=(n&e.childLanes)!==0,Fc||a){if(Do.current===null){if(r=nd,r!==null&&(s=St(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ki(e,s),Rd(r,e,s),Pc;Xd()}t=Wc(e,t,n)}else e=o.treeContext,aa=pm(s.nextSibling),R=t,z=!0,oa=null,sa=!1,e!==null&&ia(t,e),t=Uc(t,r),t.flags|=134221824;return t}return e=Ii(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Kc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function qc(e,t,n,r,i){return Ta(t),n=ts(e,t,n,r,void 0,i),r=as(),e!==null&&!Fc?(os(e,t,i),dl(e,t,i)):(z&&r&&na(t),t.flags|=1,Ic(e,t,n,i),t.child)}function Jc(e,t,n,r,i,a){return Ta(t),t.updateQueue=null,n=rs(t,r,n,i),ns(e),r=as(),e!==null&&!Fc?(os(e,t,a),dl(e,t,a)):(z&&r&&na(t),t.flags|=1,Ic(e,t,n,a),t.child)}function Yc(e,t,n,r,i){if(Ta(t),t.stateNode===null){var a=Mi,o=n.contextType;typeof o==`object`&&o&&(a=Ea(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Sc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},go(t),o=n.contextType,a.context=typeof o==`object`&&o?Ea(o):Mi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(xc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Sc.enqueueReplaceState(a,a.state,null),wo(t,r,a,i),Co(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Tc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Mi,typeof u==`object`&&u&&(o=Ea(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&wc(t,a,r,o),ho=!1;var f=t.memoizedState;a.state=f,wo(t,r,a,i),Co(),l=t.memoizedState,s||f!==l||ho?(typeof d==`function`&&(xc(t,n,d,r),l=t.memoizedState),(c=ho||Cc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,_o(e,t),o=t.memoizedProps,u=Tc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Mi,typeof l==`object`&&l&&(c=Ea(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&wc(t,a,r,c),ho=!1,f=t.memoizedState,a.state=f,wo(t,r,a,i),Co();var p=t.memoizedState;o!==d||f!==p||ho||e!==null&&e.dependencies!==null&&wa(e.dependencies)?(typeof s==`function`&&(xc(t,n,s,r),p=t.memoizedState),(u=ho||Cc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&wa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Kc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=po(t,e.child,null,i),t.child=po(t,null,n,i)):Ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=dl(e,t,i),e}function Xc(e,t,n,r){return pa(),t.flags|=256,Ic(e,t,n,r),t.child}var Zc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qc(e){return{baseLanes:e,cachePool:Ya()}}function $c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=pd),e}function el(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(zo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(z){if(i?Po(t):Lo(),(e=aa)?(e=lm(e,sa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,R=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=dm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Lo(),i=t.mode,a=nl({mode:`hidden`,children:a},i),r=zi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Qc(n),r.childLanes=$c(e,o,n),t.memoizedState=Zc,Vc(null,r)):(Po(t),tl(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return il(e,t,a,o,r,c,s,n)}return i?(Lo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ii(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=zi(i,a,n,null),i.flags|=2):i=Ii(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Vc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Qc(n):(a=i.cachePool,a===null?a=Ya():(s=Ma._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=$c(e,o,n),t.memoizedState=Zc,Vc(e.child,r)):(Po(t),n=e.child,e=n.sibling,n=Ii(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function tl(e,t){return t=nl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function nl(e,t){return e=Pi(22,e,null,t),e.lanes=0,e}function rl(e,t,n){return po(t,e.child,null,n),e=tl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function il(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Po(t),t.flags&=-257,rl(e,t,c)):t.memoizedState===null?(Lo(),o=a.fallback,s=t.mode,a=nl({mode:`visible`,children:a.children},s),o=zi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,po(t,e.child,null,c),a=t.child,a.memoizedState=Qc(c),a.childLanes=$c(e,r,c),t.memoizedState=Zc,Vc(null,a)):(Lo(),t.child=e.child,t.flags|=128,null);if(Po(t),dm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ha({value:a,source:null,stack:null})),rl(e,t,c)}if(Fc||Ca(e,t,c,!1),r=(c&e.childLanes)!==0,Fc||r){if(Do.current!==null)return rl(e,t,c);if(r=nd,r!==null&&(a=St(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,ki(e,a),Rd(r,e,a),Pc;return um(o)||Xd(),rl(e,t,c)}return um(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,aa=pm(o.nextSibling),R=t,z=!0,oa=null,sa=!1,e!==null&&ia(t,e),t=tl(t,a.children),t.flags|=134221824,t)}function al(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),xa(e.return,t,n)}function ol(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Ho(n)===null&&(t=e),e=e.sibling}return t}function sl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function cl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function ll(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=zo.current;if(t.flags&128)return Bo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Bo(t,o),i===`backwards`&&e!==null?(cl(e),Ic(e,t,r,n),cl(e)):Ic(e,t,r,n),r=z?Ji:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&al(e,n,t);else if(e.tag===19)al(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=ol(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,cl(t)),sl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}sl(t,!0,n,null,a,r);break;case`together`:sl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=ol(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),sl(t,!1,i,n,a,r)}return t.child}function ul(e,t,n){var r=t.pendingProps;return ya(t,t.type,r.value),Ic(e,t,r.children,n),t.child}function dl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ud|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ca(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function fl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&wa(e)))}function pl(e,t,n){switch(t.tag){case 3:Ae(t,t.stateNode.containerInfo),ya(t,Ma,e.memoizedState.cache),pa();break;case 27:case 5:Me(t);break;case 4:Ae(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Fo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Po(t),t.flags|=128,null;r=Ca(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?el(e,t,n):(Po(t),e=dl(e,t,n),e===null?null:e.sibling)}Po(t);break;case 19:if(t.flags&128)return ll(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Ca(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return ll(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Bo(t,zo.current),r)break;return null;case 22:return t.lanes=0,Bc(e,t,n,t.pendingProps);case 24:ya(t,Ma,e.memoizedState.cache)}return dl(e,t,n)}function ml(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Fc=!0;else{if(!fl(e,n)&&!(t.flags&128))return Fc=!1,pl(e,t,n);Fc=!!(e.flags&131072)}}else Fc=!1,z&&t.flags&1048576&&ta(t,Ji,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=no(t.elementType),t.type=e,typeof e==`function`)Fi(e)?(r=Tc(e,r),t.tag=1,t=Yc(null,t,e,r,n)):(t.tag=0,t=qc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===A){t.tag=11,t=Lc(null,t,e,r,n);break a}if(a===ce){t.tag=14,t=Rc(null,t,e,r,n);break a}if(a===ae){t.tag=10,t.type=e,t=ul(null,t,n);break a}}throw t=ve(e)||e,Error(i(306,t,``))}}return t;case 0:return qc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Tc(r,t.pendingProps),Yc(e,t,r,a,n);case 3:a:{if(Ae(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,_o(e,t),wo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ya(t,Ma,r),r!==o.cache&&Sa(t,[Ma],n,!0),Co(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Xc(e,t,r,n);break a}if(r!==a){a=Wi(Error(i(424)),t),ha(a),t=Xc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(aa=pm(e.firstChild),R=t,z=!0,oa=null,sa=!0,n=mo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(pa(),r===a){t=dl(e,t,n);break a}Ic(e,t,r,n)}t=t.child}return t;case 26:return Kc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:z||(t.stateNode=gp(t.type,t.pendingProps,Oe.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Me(t),e===null&&z&&(r=t.stateNode=ym(t.type,t.pendingProps,Oe.current),R=t,sa=!0,a=aa,Ep(t.type)?(mm=a,aa=pm(r.firstChild)):aa=a),Ic(e,t,t.pendingProps.children,n),Kc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&z&&((a=r=aa)&&(r=sm(r,t.type,t.pendingProps,sa),r===null?a=!1:(t.stateNode=r,R=t,aa=pm(r.firstChild),sa=!1,a=!0)),a||la(t)),Me(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,_p(a,o)?r=null:s!==null&&_p(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ts(e,t,is,null,null,n),sh._currentValue=a),Kc(e,t),Ic(e,t,r,n),t.child;case 6:return e===null&&z&&((e=n=aa)&&(n=cm(n,t.pendingProps,sa),n===null?e=!1:(t.stateNode=n,R=t,aa=null,e=!0)),e||la(t)),null;case 13:return el(e,t,n);case 4:return Ae(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=po(t,null,r,n):Ic(e,t,r,n),t.child;case 11:return Lc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Kc(e,t),Ic(e,t,r,n),t.child;case 8:return Ic(e,t,t.pendingProps.children,n),t.child;case 12:return Ic(e,t,t.pendingProps.children,n),t.child;case 10:return ul(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ta(t),a=Ea(a),r=r(a),t.flags|=1,Ic(e,t,r,n),t.child;case 14:return Rc(e,t,t.type,t.pendingProps,n);case 15:return zc(e,t,t.type,t.pendingProps,n);case 19:return ll(e,t,n);case 31:return Gc(e,t,n);case 22:return Bc(e,t,n,t.pendingProps);case 24:return Ta(t),r=Ea(Ma),e===null?(a=qa(),a===null&&(a=nd,o=Na(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},go(t),ya(t,Ma,a)):((e.lanes&n)!==0&&(_o(e,t),wo(t,null,null,n),Co()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ya(t,Ma,r),r!==a.cache&&Sa(t,[Ma],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ya(t,Ma,r))),Ic(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:z&&na(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Kc(e,t),Ic(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function hl(e){e.flags|=4}function gl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(qd())e.flags|=8192;else throw ro=$a,Za}}else e.flags&=-16777217}function _l(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(qd())e.flags|=8192;else throw ro=$a,Za}}function vl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:gt(),e.lanes|=t,md|=t)}function yl(e,t){if(!z)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function bl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function xl(e,t,n){var r=t.pendingProps;switch(ra(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bl(t),null;case 1:return bl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ba(Ma),je(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(fa(t)?hl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ma())),bl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(hl(t),o===null?(bl(t),gl(t,a,null,r,n)):(bl(t),_l(t,o))):o?o===e.memoizedState?(bl(t),t.flags&=-16777217):(hl(t),bl(t),_l(t,o)):(e=e.memoizedProps,e!==r&&hl(t),bl(t),gl(t,a,e,r,n)),null;case 27:if(Ne(t),n=Oe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&hl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return bl(t),t.subtreeFlags&=-33554433,null}e=Ee.current,fa(t)?ua(t,e):(e=ym(a,r,n),t.stateNode=e,hl(t))}return bl(t),t.subtreeFlags&=-33554433,null;case 5:if(Ne(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&hl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return bl(t),t.subtreeFlags&=-33554433,null}if(o=Ee.current,fa(t))ua(t,o);else{var s=pp(Oe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ot]=t,o[kt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(op(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&hl(t)}}return bl(t),t.subtreeFlags&=-33554433,gl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&hl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Oe.current,fa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=R,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||rp(e.nodeValue,n)),e||la(t,!0)}else e=pp(e).createTextNode(r),e[Ot]=t,t.stateNode=e}return bl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=fa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ot]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bl(t),e=!1}else n=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ro(t),t):(Ro(t),null);if(t.flags&128)throw Error(i(558))}return bl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=fa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ot]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bl(t),a=!1}else a=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Ro(t),t):(Ro(t),null)}return Ro(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),vl(t,t.updateQueue),bl(t),null);case 4:return je(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,bl(t),null;case 10:return ba(t.type),bl(t),null;case 19:if(Vo(t),r=t.memoizedState,r===null)return bl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)yl(r,!1);else{if(ld!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ho(e),o!==null){for(t.flags|=128,yl(r,!1),e=o.updateQueue,t.updateQueue=e,vl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Li(n,e),n=n.sibling;return Bo(t,zo.current&1|2),z&&ea(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ke()>bd&&(t.flags|=128,a=!0,yl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,vl(t,e),yl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!z)return bl(t),null}else 2*Ke()-r.renderingStartTime>bd&&n!==536870912&&(t.flags|=128,a=!0,yl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ke(),e.sibling=null,o=zo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||z?Bo(t,o):(n=o,Te(Mo,t),Te(zo,n),No===null&&(No=t)),z&&ea(t,r.treeForkCount),e}return bl(t),null;case 22:case 23:return Ro(t),jo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(bl(t),t.subtreeFlags&6&&(t.flags|=8192)):bl(t),n=t.updateQueue,n!==null&&vl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&we(Ka),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ba(Ma),bl(t),null;case 25:return null;case 30:return t.flags|=33554432,bl(t),null}throw Error(i(156,t.tag))}function Sl(e,t){switch(ra(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ba(Ma),je(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ne(t),null;case 31:if(t.memoizedState!==null){if(Ro(t),t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ro(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return je(),null;case 10:return ba(t.type),null;case 22:case 23:return Ro(t),jo(),e!==null&&we(Ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ba(Ma),null;case 25:return null;default:return null}}function Cl(e,t){switch(ra(t),t.tag){case 3:ba(Ma),je();break;case 26:case 27:case 5:Ne(t);break;case 4:je();break;case 31:t.memoizedState!==null&&Ro(t);break;case 13:Ro(t);break;case 19:Vo(t);break;case 10:ba(t.type);break;case 22:case 23:Ro(t),jo(),e!==null&&we(Ka);break;case 24:ba(Ma)}}function wl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){vf(t,t.return,e)}}function Tl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){vf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){vf(t,t.return,e)}}function El(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Eo(t,n)}catch(t){vf(e,e.return,t)}}}function Dl(e,t,n){n.props=Tc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){vf(e,t,n)}}function Ol(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=yi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Rp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new zp(e);m(e.child,!1,nm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){vf(e,t,n)}}function kl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){vf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){vf(e,t,n)}else n.current=null}}function Al(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)im(e.stateNode,t[n])}function jl(e){for(var t=e.return;t!==null&&(Pl(t)&&im(e.stateNode,t.stateNode),!Nl(t));)t=t.return}function Ml(e){for(var t=e.return;t!==null&&(Pl(t)&&am(e.stateNode,t.stateNode),!Nl(t));)t=t.return}function Nl(e){return e.tag===5||e.tag===3||e.tag===27}function Pl(e){return e&&e.tag===7&&e.stateNode!==null}function Fl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){vf(e,e.return,t)}}function Il(e,t,n){try{var r=e.stateNode;cp(r,e.type,n,t),r[kt]=t}catch(t){vf(e,e.return,t)}}function Ll(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ep(e.type)||e.tag===4}function Rl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ll(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&&Ep(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Tn)),Al(e,r),Qt=!0;else if(i!==4&&(i===27&&(Al(e,r),r=null,Ep(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(zl(e,t,n,r),e=e.sibling;e!==null;)zl(e,t,n,r),e=e.sibling}function Bl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Al(e,r),Qt=!0;else if(i!==4&&(i===27&&(Al(e,r),r=null,Ep(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Bl(e,t,n,r),e=e.sibling;e!==null;)Bl(e,t,n,r),e=e.sibling}function Vl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);op(t,r,n),t[Ot]=e,t[kt]=n}catch(t){vf(e,e.return,t)}}var Hl=!1,Ul=null;function Wl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Hl=!0)}var Gl=null;function Kl(){var e=Gl;return Gl=null,e}var ql=0;function Jl(e,t,n,r,i){return ql=0,Yl(e.child,t,n,r,i)}function Yl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Mp(o);r.push(s),s.view&&(a=!0)}else a||Mp(o).view&&(a=!0);Hl=!0,kp(o,ql===0?t:t+`_`+ql,n),ql++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Yl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Xl(e,t){for(;e!==null;)e.tag===5?Ap(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Xl(e.child,t),e=e.sibling}function Zl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Zl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=xi(t.default,t.share),t!==`none`&&(Jl(e,n,t,null,!1)||Xl(e.child,!1))}e=e.sibling}}function Ql(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=yi(r,n),a=xi(r.default,n.paired?r.share:r.enter);a===`none`?Zl(e):Jl(e,i,a,null,!1)?(Zl(e),n.paired||t||Ld(e,r.onEnter)):Xl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e,t),e=e.sibling;else Zl(e)}function $l(e){if(Ul!==null&&Ul.size!==0){var t=Ul;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=xi(n.default,n.share);if(a!==`none`&&(Jl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Ld(e,n.onShare)):Xl(e.child,!1)),t.delete(r),t.size===0)break}}}$l(e)}e=e.sibling}}}function eu(e){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode),r=Ul===null?void 0:Ul.get(n),i=xi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Jl(e,n,i,null,!1)?r===void 0?Ld(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Ul.delete(n),Ld(e,t.onShare)):Xl(e.child,!1)),Ul!==null&&$l(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)eu(e),e=e.sibling;else Ul!==null&&$l(e)}function tu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode);t=xi(t.default,t.update),e.flags&=-5,t!==`none`&&Jl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&tu(e);e=e.sibling}}function nu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Xl(e.child,!1))}nu(e)}e=e.sibling}}function ru(e){if(e.tag===30)e.stateNode.paired=null,Xl(e.child,!1),nu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ru(e),e=e.sibling;else nu(e)}function iu(e){for(e=e.child;e!==null;)e.tag===30?Xl(e.child,!1):e.subtreeFlags&33554432&&iu(e),e=e.sibling}function au(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&ql<a.length){var l=a[ql],u=Mp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&kp(c,ql===0?n:n+`_`+ql,i),s&&e.flags&4||(Gl===null&&(Gl=[]),Gl.push(c,ql===0?r:r+`_`+ql,t.memoizedProps)),ql++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:au(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function ou(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=yi(n,r),a=xi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Np)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;ql=0,i=au(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Ld(e,n.onUpdate))}else e.subtreeFlags&33554432&&ou(e,t);e=e.sibling}}var su=!1,H=!1,cu=!1,lu=!1,uu=typeof WeakSet==`function`?WeakSet:Set,du=null,fu=!1,pu=!1,mu=!1,hu=!1;function gu(e,t,n){if(e=e.containerInfo,dp=gh,e=Yr(e),Xr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(fp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,du=t,t=n?9270:1024;du!==null;){if(e=du,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&eu(r[a]);if(e.alternate===null&&e.flags&2)n&&Wl(e),_u(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&eu(r),_u(n);continue}if(r!==null&&r.memoizedState!==null){n&&Wl(e),_u(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,du=r):(n&&tu(e),_u(n))}}Ul=null}function _u(e){for(;du!==null;){var t=du,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Tc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){vf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)om(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:om(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=yi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=xi(a.default,a.update),a!==`none`&&Jl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,du=r;break}du=t.return}}function vu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ru(e,n),r&4&&wl(5,n);break;case 1:if(Ru(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){vf(n,n.return,e)}else{var i=Tc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){vf(n,n.return,e)}}}r&64&&El(n),r&512&&Ol(n,n.return);break;case 3:if(Ru(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Eo(e,t)}catch(e){vf(n,n.return,e)}}break;case 27:t===null&&r&4&&Vl(n);case 26:case 5:Ru(e,n),t===null&&r&4&&Fl(n),r&512&&Ol(n,n.return);break;case 12:Ru(e,n);break;case 31:Ru(e,n),r&4&&Du(e,n);break;case 13:Ru(e,n),r&4&&Ou(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Sf.bind(null,n),fm(e,n))));break;case 22:if(r=n.memoizedState!==null||su,!r){var a=t!==null&&t.memoizedState!==null||H;t=su,i=H,su=r,(H=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Bu(e,n,r)):Ru(e,n),su=t,H=i}break;case 30:Ru(e,n),r&512&&Ol(n,n.return);break;case 7:r&512&&Ol(n,n.return);default:Ru(e,n)}}function yu(e,t){for(e=e.child;e!==null;)bu(e,t),e=e.sibling}function bu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){vf(e,e.return,t)}xu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Qt=!0}catch(t){vf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Op(s,!0):Op(e.stateNode,!1)}catch(t){vf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&yu(e,t);break;default:yu(e,t)}}function xu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:bu(n,r);break a;case 22:n.memoizedState===null&&xu(n,r);break a;default:xu(n,r)}}e=e.sibling}}function Su(e){var t=e.alternate;t!==null&&(e.alternate=null,Su(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Lt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Cu=null,wu=!1;function Tu(e,t,n){for(n=n.child;n!==null;)Eu(e,t,n),n=n.sibling}function Eu(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount==`function`)try{nt.onCommitFiberUnmount(tt,n)}catch{}switch(n.tag){case 26:H||kl(n,t),Tu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!H&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:H||kl(n,t),Ml(n);var r=Cu,i=wu;Ep(n.type)&&(Cu=n.stateNode,wu=!1),Tu(e,t,n),bm(n.stateNode,n.type,n.memoizedProps),Cu=r,wu=i;break;case 5:H||kl(n,t),Ml(n);case 6:if(n.tag===6&&Ml(n),r=Cu,i=wu,Cu=null,Tu(e,t,n),Cu=r,wu=i,Cu!==null){if(wu)try{(Cu.nodeType===9?Cu.body:Cu.nodeName===`HTML`?Cu.ownerDocument.body:Cu).removeChild(n.stateNode),Qt=!0}catch(e){vf(n,t,e)}else try{Cu.removeChild(n.stateNode),Qt=!0}catch(e){vf(n,t,e)}}break;case 18:Cu!==null&&(wu?(e=Cu,Dp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Dp(Cu,n.stateNode));break;case 4:r=Cu,i=wu,Cu=n.stateNode.containerInfo,wu=!0,Tu(e,t,n),Cu=r,wu=i;break;case 0:case 11:case 14:case 15:Tl(2,n,t),H||Tl(4,n,t),Tu(e,t,n);break;case 1:H||(kl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Dl(n,t,r)),Tu(e,t,n);break;case 21:Tu(e,t,n);break;case 22:H=(r=H)||n.memoizedState!==null,Tu(e,t,n),H=r;break;case 30:kl(n,t),Tu(e,t,n);break;case 7:H||kl(n,t),Tu(e,t,n);break;default:Tu(e,t,n)}}function Du(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){vf(t,t.return,e)}}}function Ou(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){vf(t,t.return,e)}}function ku(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new uu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new uu),t;default:throw Error(i(435,e.tag))}}function Au(e,t){var n=ku(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Cf.bind(null,e,t);t.then(r,r)}})}function ju(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Ep(l.type)){Cu=l.stateNode,wu=!1;break a}break;case 5:Cu=l.stateNode,wu=!1;break a;case 3:case 4:Cu=l.stateNode.containerInfo,wu=!0;break a}l=l.return}if(Cu===null)throw Error(i(160));Eu(s,c,o),Cu=null,wu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nu(t,e,n),t=t.sibling}var Mu=null;function Nu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}ju(t,e,n),Pu(e),a&4&&(Tl(3,e,e.return),wl(3,e),Tl(5,e,e.return));break;case 1:ju(t,e,n),Pu(e),a&512&&(H||r===null||kl(r,r.return)),a&64&&su&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Mu,ju(t,e,n),Pu(e),a&512&&(H||r===null||kl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(su)e.stateNode=gp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ft]||r[Ot]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),op(r,t,n),r[Ot]=e,Ht(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Ot]=e,Ht(r),t=r}e.stateNode=t}}else su||Km(o,e.type,e.stateNode)}else e.stateNode=Bm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Il(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||H||t.parentNode.removeChild(t)):a.count--,n===null?su||Km(o,e.type,e.stateNode):Bm(o,n,e.memoizedProps))}break;case 27:ju(t,e,n),Pu(e),a&512&&(H||r===null||kl(r,r.return)),r!==null&&a&4&&Il(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=cu,cu=!1,ju(t,e,n),cu=o,Pu(e),a&512&&(H||r===null||kl(r,r.return)),e.flags&32){t=e.stateNode;try{_n(t,``),Qt=!0}catch(t){vf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Il(e,t,r===null?t:r.memoizedProps)),a&1024&&(lu=!0);break;case 6:if(ju(t,e,n),Pu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Qt=!0}catch(t){vf(e,e.return,t)}}break;case 3:if(Qt=!1,Wm=null,o=Mu,Mu=xm(t.containerInfo),ju(t,e,n),Mu=o,Pu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){vf(e,e.return,t)}lu&&(lu=!1,Fu(e)),Qt=!1;break;case 4:a=cu,cu=su,r=$t(),o=Mu,Mu=xm(e.stateNode.containerInfo),ju(t,e,n),Pu(e),Mu=o,Qt&&pu&&(mu=!0),Qt=r,cu=a;break;case 12:ju(t,e,n),Pu(e);break;case 31:ju(t,e,n),Pu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Au(e,t)));break;case 13:ju(t,e,n),Pu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(vd=Ke()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Au(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=su,l=H,u=cu;su=c||o,cu=u||o,H=l||s,ju(t,e,n),H=l,cu=u,su=c,Pu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||su||H||(t=s||H,n=su,r=H,su=o||su,H=t,zu(e,2),su=n,H=r),!o&&cu||yu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Au(e,n))));break;case 19:ju(t,e,n),Pu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Au(e,t)));break;case 30:a&512&&(H||r===null||kl(r,r.return)),a=$t(),o=pu,s=(n&335544064)===n,c=e.memoizedProps,pu=s&&xi(c.default,c.update)!==`none`,ju(t,e,n),Pu(e),s&&r!==null&&Qt&&(e.flags|=4),pu=o,Qt=a;break;case 21:break;case 7:a&512&&(H||r===null||kl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:ju(t,e,n),Pu(e)}}function Pu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ll(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Pl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Nl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Bl(e,Rl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(_n(l,``),n.flags&=-33),Bl(e,Rl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;zl(e,Rl(e),u,s);break;default:throw Error(i(161))}}catch(t){vf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Iu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Lu(t,e),t=t.sibling;else ou(t,!1)}function Lu(e,t){var n=e.alternate;if(n===null)Ql(e,!1);else switch(e.tag){case 3:if(hu=fu=!1,Kl(),Iu(t,e),!fu&&!mu){if(e=Gl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ap(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),hu=!0}Gl=null;break;case 5:Iu(t,e);break;case 4:r=fu,fu=!1,Iu(t,e),fu&&(mu=!0),fu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Iu(t,e):Ql(e,!1));break;case 30:r=fu,i=Kl(),fu=!1,Iu(t,e),fu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=yi(a,o),o=yi(n.memoizedProps,o);var s=xi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,ql=0,t=au(e,n,t,o,s,a,!0),ql!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Ld(e,e.memoizedProps.onUpdate),Gl=i):i!==null&&(i.push.apply(i,Gl),Gl=i),fu=e.flags&32?!0:r;break;default:Iu(t,e)}}function Ru(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vu(e,t.alternate,t),t=t.sibling}function zu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Tl(4,n,n.return),zu(n,r);break;case 1:kl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Dl(n,n.return,i),zu(n,r);break;case 27:r&2&&bm(n.stateNode,n.type,n.memoizedProps);case 5:kl(n,n.return),n.tag!==5&&n.tag!==27||Ml(n),zu(n,r);break;case 6:Ml(n);break;case 26:kl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||H||i.parentNode.removeChild(i),zu(n,r);break;case 22:n.memoizedState===null&&zu(n,r);break;case 30:kl(n,n.return),zu(n,r);break;case 7:kl(n,n.return);default:zu(n,r)}e=e.sibling}}function Bu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Bu(i,a,n),wl(4,a);break;case 1:if(Bu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){vf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)To(l[i],c)}catch(e){vf(r,r.return,e)}}s&&o&64&&El(a),Ol(a,a.return);break;case 27:n&2&&Vl(a);case 5:a.tag!==5&&a.tag!==27||jl(a),Bu(i,a,n),s&&r===null&&o&4&&Fl(a),Ol(a,a.return);break;case 6:jl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||su||Km(xm(c.ownerDocument),a.type,c),Bu(i,a,n),s&&r===null&&o&4&&Fl(a),Ol(a,a.return);break;case 12:Bu(i,a,n);break;case 31:Bu(i,a,n),s&&o&4&&Du(i,a);break;case 13:Bu(i,a,n),s&&o&4&&Ou(i,a);break;case 22:a.memoizedState===null&&Bu(i,a,n),Ol(a,a.return);break;case 30:Bu(i,a,n),Ol(a,a.return);break;case 7:Ol(a,a.return);default:Bu(i,a,n)}t=t.sibling}}function U(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Pa(n))}function Vu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pa(e))}function Hu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Uu(e,t,n,r),t=t.sibling;else i&&iu(t)}function Uu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&ru(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Hu(e,t,n,r),a&2048&&wl(9,t);break;case 1:Hu(e,t,n,r);break;case 3:Hu(e,t,n,r),i&&hu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Pa(a)));break;case 12:if(a&2048){Hu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){vf(t,t.return,e)}}else Hu(e,t,n,r);break;case 31:Hu(e,t,n,r);break;case 13:Hu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&ru(t),o._visibility&2?Hu(e,t,n,r):(o._visibility|=2,Wu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&ru(s),o._visibility&2?Hu(e,t,n,r):Gu(e,t)),a&2048&&U(s,t);break;case 24:Hu(e,t,n,r),a&2048&&Vu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Xl(a.child,!0),Xl(t.child,!0))),Hu(e,t,n,r);break;default:Hu(e,t,n,r)}}function Wu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Wu(a,o,s,c,i),wl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Wu(a,o,s,c,i)):u._visibility&2?Wu(a,o,s,c,i):Gu(a,o),i&&l&2048&&U(o.alternate,o);break;case 24:Wu(a,o,s,c,i),i&&l&2048&&Vu(o.alternate,o);break;default:Wu(a,o,s,c,i)}t=t.sibling}}function Gu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Gu(n,r),i&2048&&U(r.alternate,r);break;case 24:Gu(n,r),i&2048&&Vu(r.alternate,r);break;default:Gu(n,r)}t=t.sibling}}var Ku=8192;function qu(e,t,n){if(e.subtreeFlags&Ku)for(e=e.child;e!==null;)Ju(e,t,n),e=e.sibling}function Ju(e,t,n){switch(e.tag){case 26:qu(e,t,n),e.flags&Ku&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,Mu,e.memoizedState,e.memoizedProps));break;case 5:qu(e,t,n),e.flags&Ku&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=Mu;Mu=xm(e.stateNode.containerInfo),qu(e,t,n),Mu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ku,Ku=16777216,qu(e,t,n),Ku=r):qu(e,t,n));break;case 30:if((e.flags&Ku)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Ul===null&&(Ul=new Map),Ul.set(r,i)}qu(e,t,n);break;default:qu(e,t,n)}}function Yu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];du=r,$u(r,e)}Yu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zu(e),e=e.sibling}function Zu(e){switch(e.tag){case 0:case 11:case 15:Xu(e),e.flags&2048&&Tl(9,e,e.return);break;case 3:Xu(e);break;case 12:Xu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qu(e)):Xu(e);break;default:Xu(e)}}function Qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];du=r,$u(r,e)}Yu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tl(8,t,t.return),Qu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Qu(t));break;default:Qu(t)}e=e.sibling}}function $u(e,t){for(;du!==null;){var n=du;switch(n.tag){case 0:case 11:case 15:Tl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Pa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,du=r;else a:for(n=e;du!==null;){r=du;var i=r.sibling,a=r.return;if(Su(r),r===n){du=null;break a}if(i!==null){i.return=a,du=i;break a}du=a}}}var ed={getCacheForType:function(e){var t=Ea(Ma),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ea(Ma).controller.signal}},td=typeof WeakMap==`function`?WeakMap:Map,W=0,nd=null,G=null,K=0,rd=0,id=null,ad=!1,od=!1,sd=!1,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=0,hd=null,gd=null,_d=!1,vd=0,yd=0,bd=1/0,xd=null,Sd=null,Cd=0,wd=null,Td=null,Ed=0,Dd=0,Od=null,kd=null,Ad=null,jd=null,Md=null,Nd=0,Pd=null;function Fd(){return W&2&&K!==0?K&-K:j.T===null?Tt():Rf()}function Id(){if(pd===0){if(!(K&536870912)||z){var e=lt;lt<<=1,!(lt&3932160)&&(lt=262144),pd=e}else pd=536870912}return e=Mo.current,e!==null&&(e.flags|=32),pd}function Ld(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Rp(yi(e.memoizedProps,n))),jd===null&&(jd=[]),jd.push(t.bind(null,r))}}function Rd(e,t,n){(e===nd&&(rd===2||rd===9)||e.cancelPendingCommit!==null)&&(Gd(e,0),Hd(e,K,pd,!1)),vt(e,n),W&2&&e===nd||(e===nd&&(!(W&2)&&(dd|=n),ld===4&&Hd(e,K,pd,!1)),jf(e))}function zd(e,t,n){if(W&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||pt(e,t),a=r?$d(e,t):Zd(e,t,!0),o=r;do{if(a===0){od&&!r&&Hd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Vd(n))a=Zd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=hd;var l=c.current.memoizedState.isDehydrated;if(l&&(Gd(c,s).flags|=256),s=Zd(c,s,!1),s!==2&&s!==6){if(sd&&!l){c.errorRecoveryDisabledLanes|=o,dd|=o,a=4;break a}o=gd,gd=a,o!==null&&(gd===null?gd=o:gd.push.apply(gd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Gd(e,0),Hd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Hd(r,t,pd,!ad);break a;case 2:gd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=vd+300-Ke(),10<a)){if(Hd(r,t,pd,!ad),ft(r,0,!0)!==0)break a;Ed=t,r.timeoutHandle=bp(Bd.bind(null,r,n,gd,xd,_d,t,pd,dd,md,ad,o,`Throttled`,-0,0),a);break a}Bd(r,n,gd,xd,_d,t,pd,dd,md,ad,o,null,-0,0)}break}}while(1);jf(e)}function Bd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Tn},Ul=null,Ju(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?vd-Ke():(a&4194048)===a?yd-Ke():0,m=eh(d,m),m!==null)?(Ed=a,e.cancelPendingCommit=m(sf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Hd(e,a,o,!l)):sf(e,t,a,n,r,i,o,s,c,l,u,d)}function Vd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ur(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Hd(e,t,n,r){t=mt(e,t),t&=~fd,t&=~dd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-it(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&bt(e,n,t)}function Ud(){return W&6?!0:(Mf(0,!1),!1)}function Wd(){if(G!==null){if(rd===0)var e=G.return;else e=G,va=_a=null,ss(e),oo=null,so=0,e=G;for(;e!==null;)Cl(e.alternate,e),e=e.return;G=null}}function Gd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,xp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ed=0,Wd(),nd=e,G=n=Ii(e.current,null),K=t,rd=0,id=null,ad=!1,od=pt(e,t),sd=!1,md=pd=fd=dd=ud=ld=0,gd=hd=null,_d=!1,cd=mt(e,t),Ei(),n}function Kd(e,t){B=null,j.H=_c,t===Xa||t===Qa?(t=io(),rd=3):t===Za?(t=io(),rd=4):rd=t===Pc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,id=t,G===null&&(ld=1,Oc(e,Wi(t,e.current)))}function qd(){var e=Mo.current;return e===null?!0:(K&4194048)===K?No===null:(K&62914560)===K||K&536870912?e===No:!1}function Jd(){var e=j.H;return j.H=_c,e===null?_c:e}function Yd(){var e=j.A;return j.A=ed,e}function Xd(){ld=4,ad||(K&4194048)!==K&&Mo.current!==null||(od=!0),!(ud&134217727)&&!(dd&134217727)||nd===null||Hd(nd,K,pd,!1)}function Zd(e,t,n){var r=W;W|=2;var i=Jd(),a=Yd();(nd!==e||K!==t)&&(xd=null,Gd(e,t)),t=!1;var o=ld;a:do try{if(rd!==0&&G!==null){var s=G,c=id;switch(rd){case 8:Wd(),o=6;break a;case 3:case 2:case 9:case 6:Mo.current===null&&(t=!0);var l=rd;if(rd=0,id=null,rf(e,s,c,l),n&&od){o=0;break a}break;default:l=rd,rd=0,id=null,rf(e,s,c,l)}}Qd(),o=ld;break}catch(t){Kd(e,t)}while(1);return t&&e.shellSuspendCounter++,va=_a=null,W=r,j.H=i,j.A=a,G===null&&(nd=null,K=0,Ei()),o}function Qd(){for(;G!==null;)tf(G)}function $d(e,t){var n=W;W|=2;var r=Jd(),a=Yd();nd!==e||K!==t?(xd=null,bd=Ke()+500,Gd(e,t)):od=pt(e,t);a:do try{if(rd!==0&&G!==null){t=G;var o=id;b:switch(rd){case 1:rd=0,id=null,rf(e,t,o,1);break;case 2:case 9:if(eo(o)){rd=0,id=null,nf(t);break}t=function(){rd!==2&&rd!==9||nd!==e||(rd=7),jf(e)},o.then(t,t);break a;case 3:rd=7;break a;case 4:rd=5;break a;case 7:eo(o)?(rd=0,id=null,nf(t)):(rd=0,id=null,rf(e,t,o,7));break;case 5:var s=null;switch(G.tag){case 26:s=G.memoizedState;case 5:case 27:var c=G;if(s?Ym(s):c.stateNode.complete){rd=0,id=null;var l=c.sibling;if(l!==null)G=l;else{var u=c.return;u===null?G=null:(G=u,af(u))}break b}}rd=0,id=null,rf(e,t,o,5);break;case 6:rd=0,id=null,rf(e,t,o,6);break;case 8:Wd(),ld=6;break a;default:throw Error(i(462))}}ef();break}catch(t){Kd(e,t)}while(1);return va=_a=null,j.H=r,j.A=a,W=n,G===null?(nd=null,K=0,Ei(),ld):0}function ef(){for(;G!==null&&!We();)tf(G)}function tf(e){var t=ml(e.alternate,e,cd);e.memoizedProps=e.pendingProps,t===null?af(e):G=t}function nf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Jc(n,t,t.pendingProps,t.type,void 0,K);break;case 11:t=Jc(n,t,t.pendingProps,t.type.render,t.ref,K);break;case 5:ss(t);var r=t;r===R&&(z?(da(r),r.tag===5&&r.stateNode!=null&&(aa=r.stateNode)):(da(r),z=!0));default:Cl(n,t),t=G=Li(t,cd),t=ml(n,t,cd)}e.memoizedProps=e.pendingProps,t===null?af(e):G=t}function rf(e,t,n,r){va=_a=null,ss(t),oo=null,so=0;var i=t.return;try{if(Nc(e,i,t,n,K)){ld=1,Oc(e,Wi(n,e.current)),G=null;return}}catch(t){if(i!==null)throw G=i,t;ld=1,Oc(e,Wi(n,e.current)),G=null;return}t.flags&32768?(z||r===1?e=!0:od||K&536870912?e=!1:(ad=e=!0,(r===2||r===9||r===3||r===6)&&(r=Mo.current,r!==null&&r.tag===13&&(r.flags|=16384))),of(t,e)):af(t)}function af(e){var t=e;do{if(t.flags&32768){of(t,ad);return}e=t.return;var n=xl(t.alternate,t,cd);if(n!==null){G=n;return}if(t=t.sibling,t!==null){G=t;return}G=t=e}while(t!==null);ld===0&&(ld=5)}function of(e,t){do{var n=Sl(e.alternate,e);if(n!==null){n.flags&=32767,G=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){G=e;return}G=e=n}while(e!==null);ld=6,G=null}function sf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do hf();while(Cd!==0);if(W&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===nd&&(G=nd=null,K=0),Td=t,wd=e,Ed=n,Od=a,kd=r,cf(e,t,n,s,c,l,f)}}function cf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Dd=s,s|=Ti,yt(e,n,s,r,i,a),jd=null,(n&335544064)===n?(Md=La(e),r=10262):(Md=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,wf(Xe,function(){return gf(),null})):(e.callbackNode=null,e.callbackPriority=0),Hl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=j.T,j.T=null,i=M.p,M.p=2,a=W,W|=4;try{gu(e,t,n)}finally{W=a,M.p=i,j.T=r}}Cd=1,Hl?Ad=Ip(o,e.containerInfo,Md,df,ff,uf,pf,gf,lf,null,null):(df(),ff(),pf())}function lf(e){if(Cd!==0){var t=wd.onRecoverableError;t(e,{componentStack:null})}}function uf(){Cd===3&&(Cd=0,Lu(Td,wd),Cd=4)}function df(){if(Cd===1){Cd=0;var e=wd,t=Td,n=Ed,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=j.T,j.T=null;var i=M.p;M.p=2;var a=W;W|=4;try{pu=mu=!1,Nu(t,e,n),n=fp;var o=Yr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Jr(s.ownerDocument.documentElement,s)){if(c!==null&&Xr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=qr(s,h),v=qr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!dp,fp=dp=null}finally{W=a,M.p=i,j.T=r}}e.current=t,Cd=2}}function ff(){if(Cd===2){Cd=0;var e=wd,t=Td,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=W;W|=4;try{vu(e,t.alternate,t)}finally{W=i,M.p=r,j.T=n}}Cd=3}}function pf(){if(Cd===4||Cd===3){Cd=0;var e=Ad;Ad=null,Ge();var t=wd,n=Td,r=Ed,i=kd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Cd=5:(Cd=0,Td=wd=null,mf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Sd=null),wt(r),n=n.stateNode,nt&&typeof nt.onCommitFiberRoot==`function`)try{nt.onCommitFiberRoot(tt,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=j.T,a=M.p,M.p=2,j.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{j.T=n,M.p=a}}if(i=jd,o=Md,Md=null,i!==null&&(jd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Ed&3&&hf(),jf(t),a=t.pendingLanes,r&261930&&a&42?t===Pd?Nd++:(Nd=0,Pd=t):(Nd=0,Pd=null),Mf(0,!1)}}function mf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Pa(t)))}function hf(){return Ad!==null&&(Ad.skipTransition(),Ad=null),df(),ff(),pf(),gf()}function gf(){if(Cd!==5)return!1;var e=wd,t=Dd;Dd=0;var n=wt(Ed),r=j.T,a=M.p;try{M.p=32>n?32:n,j.T=null,n=Od,Od=null;var o=wd,s=Ed;if(Cd=0,Td=wd=null,Ed=0,W&6)throw Error(i(331));var c=W;if(W|=4,Zu(o.current),Uu(o,o.current,s,n),W=c,Mf(0,!1),nt&&typeof nt.onPostCommitFiberRoot==`function`)try{nt.onPostCommitFiberRoot(tt,o)}catch{}return!0}finally{M.p=a,j.T=r,mf(e,t)}}function _f(e,t,n){t=Wi(n,t),t=Ac(e.stateNode,t,2),e=yo(e,t,2),e!==null&&(vt(e,2),jf(e))}function vf(e,t,n){if(e.tag===3)_f(e,e,n);else for(;t!==null;){if(t.tag===3){_f(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Sd===null||!Sd.has(r))){e=Wi(n,e),n=jc(2),r=yo(t,n,2),r!==null&&(Mc(n,r,t,e),vt(r,2),jf(r));break}}t=t.return}}function yf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new td;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(sd=!0,i.add(n),e=bf.bind(null,e,t,n),t.then(e,e))}function bf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,nd===e&&(K&n)===n&&(ld===4||ld===3&&(K&62914560)===K&&300>Ke()-vd?W&2?fd|=n:Gd(e,0):fd|=n,md===K&&(md=0)),jf(e)}function xf(e,t){t===0&&(t=gt()),e=ki(e,t),e!==null&&(vt(e,t),jf(e))}function Sf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xf(e,n)}function Cf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),xf(e,n)}function wf(e,t){return He(e,t)}var Tf=null,Ef=null,Df=!1,Of=!1,kf=!1,Af=0;function jf(e){e!==Ef&&e.next===null&&(Ef===null?Tf=Ef=e:Ef=Ef.next=e),Of=!0,Df||(Df=!0,Lf())}function Mf(e,t){if(!kf&&Of){kf=!0;do for(var n=!1,r=Tf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-it(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,q(r,a))}else a=K,a=ft(r,r===nd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||pt(r,a)||(n=!0,q(r,a))}r=r.next}while(n);kf=!1}}function Nf(){Pf()}function Pf(){Of=Df=!1;var e=0;Af!==0&&yp()&&(e=Af);for(var t=Ke(),n=null,r=Tf;r!==null;){var i=r.next,a=Ff(r,t);a===0?(r.next=null,n===null?Tf=i:n.next=i,i===null&&(Ef=n)):(n=r,(e!==0||a&3)&&(Of=!0)),r=i}Cd!==0&&Cd!==5||Mf(e,!1),Af!==0&&(Af=0)}function Ff(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-it(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ht(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=nd,n=K,n=ft(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(rd===2||rd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ue(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||pt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ue(r),wt(n)){case 2:case 8:n=Ye;break;case 32:n=Xe;break;case 268435456:n=Qe;break;default:n=Xe}return r=If.bind(null,e),n=He(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ue(r),e.callbackPriority=2,e.callbackNode=null,2}function If(e,t){if(Cd!==0&&Cd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(hf()&&e.callbackNode!==n)return null;var r=K;return r=ft(e,e===nd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(zd(e,r,t),Ff(e,Ke()),e.callbackNode!=null&&e.callbackNode===n?If.bind(null,e):null)}function q(e,t){if(hf())return null;zd(e,t,!0)}function Lf(){wp(function(){W&6?He(Je,Nf):Pf()})}function Rf(){if(Af===0){var e=Ba;e===0&&(e=ct,ct<<=1,!(ct&261888)&&(ct=256)),Af=e}return Af}function J(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:wn(e)}function zf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=J((i[kt]||null).action),o=r.submitter;o&&(t=(t=o[kt]||null)?J(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Gn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Af!==0){var e=new FormData(i,o);rc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),rc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Bf=0;Bf<gi.length;Bf++){var Vf=gi[Bf];_i(Vf.toLowerCase(),`on`+(Vf[0].toUpperCase()+Vf.slice(1)))}_i(ci,`onAnimationEnd`),_i(li,`onAnimationIteration`),_i(ui,`onAnimationStart`),_i(`dblclick`,`onDoubleClick`),_i(`focusin`,`onFocus`),_i(`focusout`,`onBlur`),_i(di,`onTransitionRun`),_i(fi,`onTransitionStart`),_i(pi,`onTransitionCancel`),_i(mi,`onTransitionEnd`),qt(`onMouseEnter`,[`mouseout`,`mouseover`]),qt(`onMouseLeave`,[`mouseout`,`mouseover`]),qt(`onPointerEnter`,[`pointerout`,`pointerover`]),qt(`onPointerLeave`,[`pointerout`,`pointerover`]),Kt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Kt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Kt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Kt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Kt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Kt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Hf=`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(` `),Uf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Hf));function Wf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Si(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Si(e)}i.currentTarget=null,a=c}}}}function Y(e,t){var n=t[jt];n===void 0&&(n=t[jt]=new Set);var r=e+`__bubble`;n.has(r)||(Jf(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),Jf(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,Wt.forEach(function(t){t!==`selectionchange`&&(Uf.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function Jf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!Fn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Yf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Rt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Mn(function(){var r=a,i=Dn(n),s=[];a:{var c=hi.get(e);if(c!==void 0){var l=Gn,u=e;switch(e){case`keypress`:if(N(n)===0)break a;case`keydown`:case`keyup`:l=sr;break;case`focusin`:u=`focus`,l=$n;break;case`focusout`:u=`blur`,l=$n;break;case`beforeblur`:case`afterblur`:l=$n;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=P;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Qn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ur;break;case ci:case li:case ui:l=er;break;case mi:l=dr;break;case`scroll`:case`scrollend`:l=qn;break;case`wheel`:l=fr;break;case`copy`:case`cut`:case`paste`:l=tr;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=cr;break;case`submit`:l=lr;break;case`toggle`:case`beforetoggle`:l=pr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Nn(m,p),g!=null&&d.push(Xf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==En&&(u=n.relatedTarget||n.fromElement)&&(Rt(u)||u[At]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Rt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=P,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=cr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Bt(c),h=l==null?u:Bt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Rt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Qf):null,c!==null&&$f(s,u,c,d,!1),l!==null&&f!==null&&$f(s,f,l,d,!0)))}a:{if(c=r?Bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=jr;else if(Tr(c)){if(Mr)_=Vr;else{_=zr;var v=Rr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&xn(r.elementType)&&(_=jr):_=Br;if(_&&=_(e,r)){Er(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Bt(r):window,e){case`focusin`:(Tr(v)||v.contentEditable===`true`)&&(Qr=v,$r=r,ei=null);break;case`focusout`:ei=$r=Qr=null;break;case`mousedown`:ti=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ti=!1,ni(s,n,i);break;case`selectionchange`:if(Zr)break;case`keydown`:case`keyup`:ni(s,n,i)}var y;if(hr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else I?xr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(vr&&n.locale!==`ko`&&(I||b!==`onCompositionStart`?b===`onCompositionEnd`&&I&&(y=Bn()):(Ln=i,Rn=`value`in Ln?Ln.value:Ln.textContent,I=!0)),v=Zf(r,b),0<v.length&&(b=new nr(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=Sr(n),y!==null&&(b.data=y)))),(y=_r?Cr(e,n):L(e,n))&&(b=Zf(r,`onBeforeInput`),0<b.length&&(v=new nr(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),zf(s,e,r,n,i)}Wf(s,t)})}function Xf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Nn(e,n),i!=null&&r.unshift(Xf(e,i,a)),i=Nn(e,t),i!=null&&r.push(Xf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Qf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $f(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Nn(n,a),l!=null&&o.unshift(Xf(n,l,c))):i||(l=Nn(n,a),l!=null&&o.push(Xf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ep=/\r\n?/g,tp=/\u0000|\uFFFD/g;function np(e){return(typeof e==`string`?e:``+e).replace(ep,`
|
|
9
|
+
`).replace(tp,``)}function rp(e,t){return t=np(t),np(e)===t}function ip(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||_n(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&_n(e,``+r);else return;break;case`className`:tn(e,`class`,r);break;case`tabIndex`:tn(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:tn(e,n,r);break;case`style`:bn(e,r,o);return;case`data`:if(t!==`object`){tn(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=wn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ip(e,t,`name`,a.name,a,null),ip(e,t,`formEncType`,a.formEncType,a,null),ip(e,t,`formMethod`,a.formMethod,a,null),ip(e,t,`formTarget`,a.formTarget,a,null)):(ip(e,t,`encType`,a.encType,a,null),ip(e,t,`method`,a.method,a,null),ip(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=wn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Tn);return;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=wn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`: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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Y(`beforetoggle`,e),Y(`toggle`,e),en(e,`popover`,r);break;case`xlinkActuate`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:nn(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:nn(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:nn(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:en(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=Sn.get(n)||n,en(e,n,r);else return}Qt=!0}function ap(e,t,n,r,a,o){switch(n){case`style`:bn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)_n(e,r);else if(typeof r==`number`||typeof r==`bigint`)_n(e,``+r);else return;break;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=Tn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Gt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[kt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Qt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):en(e,n,r)}return}Qt=!0}function op(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Y(`error`,e),Y(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,o,s,n,null)}}a&&ip(e,t,`srcSet`,n.srcSet,n,null),r&&ip(e,t,`src`,n.src,n,null);return;case`input`:Y(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ip(e,t,r,d,n,null)}}fn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ip(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&mn(e,!!r,n,!0):mn(e,!!r,t,!1);return;case`textarea`:for(s in Y(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ip(e,t,s,c,n,null)}gn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ip(e,t,l,r,n,null)}return;case`dialog`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<Hf.length;r++)Y(Hf[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,u,r,n,null)}return;default:if(xn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ap(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ip(e,t,c,r,n,null))}var sp={};function cp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ip(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Qt=!0),o=m;break;case`name`:m!==f&&(Qt=!0),a=m;break;case`checked`:m!==f&&(Qt=!0),u=m;break;case`defaultChecked`:m!==f&&(Qt=!0),d=m;break;case`value`:m!==f&&(Qt=!0),s=m;break;case`defaultValue`:m!==f&&(Qt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ip(e,t,p,m,r,f)}}dn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ip(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Qt=!0),p=o;break;case`defaultValue`:o!==l&&(Qt=!0),c=o;break;case`multiple`:o!==l&&(Qt=!0),s=o;default:o!==l&&ip(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?mn(e,!!n,n?[]:``,!1):mn(e,!!n,t,!0)):mn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ip(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Qt=!0),p=a;break;case`defaultValue`:a!==o&&(Qt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ip(e,t,s,a,r,o)}hn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ip(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Qt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ip(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ip(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ip(e,t,u,p,r,m)}return;default:if(xn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ap(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ap(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ip(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ip(e,t,f,p,r,m)}function lp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function up(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&lp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&lp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var dp=null,fp=null;function pp(e){return e.nodeType===9?e:e.ownerDocument}function mp(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 hp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function gp(e,t,n,r){return n=pp(n).createElement(e),n[Ot]=r,n[kt]=t,op(n,e,t),Ht(n),n}function _p(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vp=null;function yp(){var e=window.event;return e&&e.type===`popstate`?e!==vp&&(vp=e,!0):(vp=null,!1)}var bp=typeof setTimeout==`function`?setTimeout:void 0,xp=typeof clearTimeout==`function`?clearTimeout:void 0,Sp=typeof Promise==`function`?Promise:void 0,Cp=typeof requestAnimationFrame==`function`?requestAnimationFrame:bp,wp=typeof queueMicrotask==`function`?queueMicrotask:Sp===void 0?bp:function(e){return Sp.resolve(null).then(e).catch(Tp)};function Tp(e){setTimeout(function(){throw e})}function Ep(e){return e===`head`}function Dp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)X(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,X(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ft]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&X(e.ownerDocument.body)}n=i}while(n);Hh(t)}function Op(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function kp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ap(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function jp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Mp(e){return jp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Np(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return jp(t,n,e)}function Pp(e){return e.documentElement.clientHeight}function Fp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Ip(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Pp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(Fp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Lp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Lp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Lp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Lp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Rp(e){return{name:e,group:new Lp(`group`,e),imagePair:new Lp(`image-pair`,e),old:new Lp(`old`,e),new:new Lp(`new`,e)}}function zp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}zp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Wp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Hp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Bp,e,s,r)}this._eventListeners=a}};function Bp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}zp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Wp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Hp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Vp,e,n,i),r.splice(t,1),a!==null&&a()}};function Vp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Hp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Up(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Wp(e,t,n,r){if(e.length===0)return-1;r=Up(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Up(a.optionsOrUseCapture)===r)return i}return-1}zp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Hp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Hp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},zp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag!==6&&(e=b(e),_m(e,t))}zp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Kp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Gp(t[n],e);n--);};function Kp(e,t){return t.push(e),!1}zp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=pp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,qp,e,void 0,void 0))};function qp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}zp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Jp,e,void 0,void 0)};function Jp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}zp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,Yp,e,void 0,void 0);for(var n=t=0;n<Xp.length;n++){var r=Xp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Xp[t++]=r}Xp.length=t}};function Yp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Xp=[],Zp=!1;function Qp(e,t,n){Xp.push({fragmentInstance:e,observer:t,instance:n}),Zp||(Zp=!0,vm(function(){Zp=!1;var e=Xp;Xp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}zp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,$p,e,void 0,void 0),e};function $p(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}zp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},zp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Kp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||em(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function em(e,t,n,r,i){var a=Rt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function tm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}zp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Kp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),tm(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),tm(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function nm(e,t){return e=b(e),rm(e,t),!1}function rm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function im(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Hp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Xp.length;i++){var a=Xp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Xp[r++]=a)}Xp.length=r,n.observe(e)}),rm(e,t))}function am(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Hp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Qp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function om(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:om(n),Lt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ft])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=pm(e.nextSibling),e===null)break}return null}function cm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pm(e.nextSibling),e===null))return null;return e}function lm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pm(e.nextSibling),e===null))return null;return e}function um(e){return e.data===`$?`||e.data===`$~`}function dm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function fm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function pm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var mm=null;function hm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function _m(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function vm(e){Cp(function(){Cp(function(t){return e(t)})})}function ym(e,t,n){switch(t=pp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function bm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ip(e,t,r,null,sp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===Tn&&(e.onclick=null),Lt(e)}function X(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Lt(e)}var Z=new Map,Q=new Set;function xm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Sm=M.d;M.d={f:Cm,r:wm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Cm(){var e=Sm.f(),t=Ud();return e||t}function wm(e){var t=zt(e);t!==null&&t.tag===5&&t.type===`form`?ac(t):Sm.r(e)}var $=typeof document>`u`?null:document;function Tm(e,t,n){var r=$;if(r&&typeof t==`string`&&t){var i=un(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Q.has(i)||(Q.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),op(t,`link`,e),Ht(t),r.head.appendChild(t)))}}function Em(e){Sm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){Sm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){Sm.L(e,t,n);var r=$;if(r&&e&&t){var i=`link[rel="preload"][as="`+un(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+un(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+un(n.imageSizes)+`"]`)):i+=`[href="`+un(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(Z.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Z.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);op(o,`link`,e),t===`style`&&(o[It]=!0,o.onload=o.onerror=function(){Ut(o)}),Ht(o),r.head.appendChild(o)}}}function km(e,t){Sm.m(e,t);var n=$;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+un(r)+`"][href="`+un(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!Z.has(a)&&(e=D({rel:`modulepreload`,href:e},t),Z.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),op(r,`link`,e),Ht(r),n.head.appendChild(r)}}}function Am(e,t,n){Sm.S(e,t,n);var r=$;if(r&&e){var i=Vt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Z.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Ht(c),op(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){Sm.X(e,t);var n=$;if(n&&e){var r=Vt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=Z.get(i))&&Um(e,t),a=n.createElement(`script`),Ht(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){Sm.M(e,t);var n=$;if(n&&e){var r=Vt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=Z.get(i))&&Um(e,t),a=n.createElement(`script`),Ht(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=Oe.current)?xm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Vt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Vt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Z.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Z.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Vt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+un(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[It]){r.loading=1;return}}else t=e.createElement(`link`),t[It]=!0,t.onload=t.onerror=Ut.bind(null,t),op(t,`link`,n),Ht(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+un(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+un(n.href)+`"]`);if(r)return t.instance=r,Ht(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ht(r),op(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Ht(o),o;r=Im(n),(a=Z.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),op(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Ht(a),a):(r=n,(a=Z.get(o))&&(r=D({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ht(a),op(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ft]||a[Ot]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ht(a);return}a=t.ownerDocument||t,r=Im(r),(i=Z.get(i))&&Hm(r,i),a=a.createElement(`link`),Ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),op(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*up());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:ae,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function ch(e,t,n,r,i,a,o,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=_t(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_t(0),this.hiddenUpdates=_t(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Pi(3,null,null,t),e.current=a,a.stateNode=e,t=Na(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},go(a),e}function uh(e){return e?(e=Mi,e):Mi}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=vo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=yo(e,r,t),n!==null&&(Rd(n,e,t),bo(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=ki(e,67108864);t!==null&&Rd(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=Fd();t=Ct(t);var n=ki(e,t);n!==null&&Rd(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,yh(e,t,n,r)}finally{M.p=a,j.T=i}}function vh(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,yh(e,t,n,r)}finally{M.p=a,j.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Yf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=zt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=dt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-it(o);s.entanglements[1]|=c,o&=~c}jf(a),!(W&6)&&(bd=Ke()+500,Mf(0,!1))}}break;case 31:case 13:s=ki(a,2),s!==null&&Rd(s,a,2),Ud(),ph(a,2)}if(a=bh(r),a===null&&Yf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Yf(e,t,r,null,n)}}function bh(e){return e=Dn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Rt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(qe()){case Je:return 2;case Ye:return 8;case Xe:case Ze:return 32;case Qe:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`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 Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=zt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Rt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Et(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Et(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);En=r,n.target.dispatchEvent(r),En=null}else return t=zt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=zt(n);a!==null&&(e.splice(t,3),t-=3,rc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[kt]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[kt]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,Fd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Ud(),t[At]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{tt=Jh.inject(qh),nt=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ec,s=Dc,c=V;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[At]=t.current,qf(e),new Wh(t)}})),_=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function y(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:v(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var b=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},x=e=>{let t=b(e);return t.charAt(0).toUpperCase()+t.slice(1)},S=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),C={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function w(e){return e!=null}function T(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??C.width,a=e.size??e.height??C.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?S(...c):S(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??C[`stroke-width`])*Number(e.size??e.width??C.width)/Number(t.size??t.width??C.width):t.strokeWidth??C[`stroke-width`];return[`svg`,{...Object.entries(C).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&w(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&w(t.width)&&{[r(`width`)]:t.width},...`height`in t&&w(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function E(e,t={}){return T(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var D=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},O=l(d(),1),ee=(0,O.createContext)({}),te=()=>(0,O.useContext)(ee),ne=(0,O.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=te()??{},y=!!c||D(d),[b,x,C=[]]=E(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:S(v,s),hasA11yProp:y,attributes:d});return(0,O.createElement)(b,{ref:f,...x},[...C.map(([e,t])=>(0,O.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function k(e,t=[],n=[]){let r=typeof e==`string`?y(e,t,n):e,i=(0,O.forwardRef)(({className:e,...t},n)=>(0,O.createElement)(ne,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=x(r.name)),i}var re={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};re.node;var ie=k(re),ae={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};ae.node;var A=k(ae),oe={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};oe.node;var se=k(oe),ce={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};ce.node;var le=k(ce),ue={name:`briefcase`,size:24,node:[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]};ue.node;var de=k(ue),fe={name:`calendar`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]};fe.node;var pe=k(fe),me={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};me.node;var he=k(me),ge={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};ge.node;var _e=k(ge),ve={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};ve.node;var ye=k(ve),j={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};j.node;var M=k(j),be={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};be.node;var xe=k(be),Se={name:`circle-exclamation-point`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`,`circle-alert`]};Se.node;var Ce=k(Se),we={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9 9.5a3 2.5 0 016 0c0 2-2 2-3 3.5`,key:`1awbb0`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};we.node;var Te=k(we),Ee={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};Ee.node;var De=k(Ee),Oe={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};Oe.node;var ke=k(Oe),Ae={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Ae.node;var je=k(Ae),Me={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};Me.node;var Ne=k(Me),Pe={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};Pe.node;var Fe=k(Pe),Ie={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Ie.node;var Le=k(Ie),Re={name:`file-pen`,size:24,node:[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]],aliases:[`file-edit`]};Re.node;var ze=k(Re),Be={name:`file-search`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]};Be.node;var Ve=k(Be),He={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};He.node;var Ue=k(He),We={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};We.node;var Ge=k(We),Ke={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};Ke.node;var qe=k(Ke),Je={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};Je.node;var Ye=k(Je),Xe={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};Xe.node;var Ze=k(Xe),Qe={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};Qe.node;var $e=k(Qe),et={name:`list-todo`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]};et.node;var tt=k(et),nt={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};nt.node;var rt=k(nt),it={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};it.node;var at=k(it),ot={name:`network`,size:24,node:[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]};ot.node;var st=k(ot),ct={name:`octagon-x`,size:24,node:[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-octagon`]};ct.node;var lt=k(ct),ut={name:`panel-left-close`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]],aliases:[`sidebar-close`]};ut.node;var dt=k(ut),ft={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};ft.node;var pt=k(ft),mt={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};mt.node;var ht=k(mt),gt={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};gt.node;var _t=k(gt),vt={name:`plug`,size:24,node:[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]};vt.node;var yt=k(vt),bt={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};bt.node;var xt=k(bt),St={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};St.node;var Ct=k(St),wt={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};wt.node;var Tt=k(wt),Et={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Et.node;var Dt=k(Et),Ot={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};Ot.node;var kt=k(Ot),At={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};At.node;var jt=k(At),Mt={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Mt.node;var Nt=k(Mt),Pt={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]],aliases:[`pen-box`,`edit`,`pen-square`]};Pt.node;var Ft=k(Pt),It={name:`square-slash`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]],aliases:[`slash-square`]};It.node;var Lt=k(It),Rt={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Rt.node;var zt=k(Rt),Bt={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};Bt.node;var Vt=k(Bt),Ht={name:`triangle-exclamation-point`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`,`triangle-alert`]};Ht.node;var Ut=k(Ht),Wt={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};Wt.node;var Gt=k(Wt),Kt={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Kt.node;var qt=k(Kt),Jt=_();function Yt(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Yt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Xt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Yt(e))&&(r&&(r+=` `),r+=t);return r}var Zt=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Qt=(e,t)=>({classGroupId:e,validator:t}),$t=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),en=`-`,tn=[],nn=`arbitrary..`,rn=e=>{let t=sn(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return on(e);let n=e.split(en);return an(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Zt(i,t):t:i||tn}return n[e]||tn}}},an=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=an(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(en):e.slice(t).join(en),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},on=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?nn+r:void 0})(),sn=e=>{let{theme:t,classGroups:n}=e;return cn(n,t)},cn=(e,t)=>{let n=$t();for(let r in e){let i=e[r];ln(i,n,r,t)}return n},ln=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];un(i,t,n,r)}},un=(e,t,n,r)=>{typeof e==`string`?dn(e,t,n):typeof e==`function`?fn(e,t,n,r):pn(e,t,n,r)},dn=(e,t,n)=>{let r=e===``?t:mn(t,e);r.classGroupId=n},fn=(e,t,n,r)=>{hn(e)?ln(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(Qt(n,e)))},pn=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ln(o,mn(t,a),n,r)}},mn=(e,t)=>{let n=e,r=t.split(en),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=$t(),n.nextPart.set(t,i)),n=i}return n},hn=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,gn=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},_n=`!`,vn=`:`,yn=[],bn=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),xn=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===vn){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(_n)?(c=s.slice(0,-1),l=!0):s.startsWith(_n)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return bn(t,l,c,u)};if(t){let e=t+vn,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):bn(yn,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Sn=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Cn=e=>({cache:gn(e.cacheSize),parseClassName:xn(e),sortModifiers:Sn(e),postfixLookupClassGroupIds:wn(e),...rn(e)}),wn=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Tn=/\s+/,En=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Tn),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+_n:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Dn=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=On(n))&&(i&&(i+=` `),i+=r);return i},On=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=On(e[r]))&&(n&&(n+=` `),n+=t);return n},kn=(e,...t)=>{let n,r,i,a,o=o=>(n=Cn(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=En(e,n);return i(e,a),a};return a=o,(...e)=>a(Dn(...e))},An=[],jn=e=>{let t=t=>t[e]||An;return t.isThemeGetter=!0,t.themeKey=e,t},Mn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Pn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Fn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,In=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ln=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Rn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bn=e=>Pn.test(e),N=e=>!!e&&!Number.isNaN(Number(e)),Vn=e=>!!e&&Number.isInteger(Number(e)),Hn=e=>e.endsWith(`%`)&&N(e.slice(0,-1)),Un=e=>Fn.test(e),Wn=()=>!0,Gn=e=>In.test(e)&&!Ln.test(e),Kn=()=>!1,qn=e=>Rn.test(e),Jn=e=>zn.test(e),Yn=e=>!P(e)&&!F(e),Xn=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Zn=e=>fr(e,gr,Kn),P=e=>Mn.test(e),Qn=e=>fr(e,_r,Gn),$n=e=>fr(e,vr,N),er=e=>fr(e,br,Wn),tr=e=>fr(e,yr,Kn),nr=e=>fr(e,mr,Kn),rr=e=>fr(e,hr,Jn),ir=e=>fr(e,xr,qn),F=e=>Nn.test(e),ar=e=>pr(e,_r),or=e=>pr(e,yr),sr=e=>pr(e,mr),cr=e=>pr(e,gr),lr=e=>pr(e,hr),ur=e=>pr(e,xr,!0),dr=e=>pr(e,br,!0),fr=(e,t,n)=>{let r=Mn.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pr=(e,t,n=!1)=>{let r=Nn.exec(e);return r?r[1]?t(r[1]):n:!1},mr=e=>e===`position`||e===`percentage`,hr=e=>e===`image`||e===`url`,gr=e=>e===`length`||e===`size`||e===`bg-size`,_r=e=>e===`length`,vr=e=>e===`number`,yr=e=>e===`family-name`,br=e=>e===`number`||e===`weight`,xr=e=>e===`shadow`,Sr=kn(()=>{let e=jn(`color`),t=jn(`font`),n=jn(`text`),r=jn(`font-weight`),i=jn(`tracking`),a=jn(`leading`),o=jn(`breakpoint`),s=jn(`container`),c=jn(`spacing`),l=jn(`radius`),u=jn(`shadow`),d=jn(`inset-shadow`),f=jn(`text-shadow`),p=jn(`drop-shadow`),m=jn(`blur`),h=jn(`perspective`),g=jn(`aspect`),_=jn(`ease`),v=jn(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),F,P],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[F,P,c],T=()=>[Bn,`full`,`auto`,...w()],E=()=>[Vn,`none`,`subgrid`,F,P],D=()=>[`auto`,{span:[`full`,Vn,F,P]},Vn,F,P],O=()=>[Vn,`auto`,F,P],ee=()=>[`auto`,`min`,`max`,`fr`,F,P],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ne=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],re=()=>[Bn,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ie=()=>[s,Bn,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ae=()=>[Bn,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,F,P],oe=()=>[...b(),sr,nr,{position:[F,P]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,cr,Zn,{size:[F,P]}],le=()=>[Hn,ar,Qn],ue=()=>[``,`none`,`full`,l,F,P],de=()=>[``,N,ar,Qn],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[N,Hn,sr,nr],he=()=>[``,`none`,m,F,P],ge=()=>[`none`,N,F,P],_e=()=>[`none`,N,F,P],ve=()=>[N,F,P],ye=()=>[Bn,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Un],breakpoint:[Un],color:[Wn],container:[Un],"drop-shadow":[Un],ease:[`in`,`out`,`in-out`],font:[Yn],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Un],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Un],shadow:[Un],spacing:[`px`,N],text:[Un],"text-shadow":[Un],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Bn,P,F,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,F,P]}],"container-named":[Xn],columns:[{columns:[N,`auto`,P,F,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Vn,`auto`,F,P]}],basis:[{basis:[Bn,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[N,Bn,`auto`,`initial`,`none`,P]}],grow:[{grow:[``,N,F,P]}],shrink:[{shrink:[``,N,F,P]}],order:[{order:[Vn,`first`,`last`,`none`,F,P]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...ne(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ne()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...ne(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ne(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ne(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ne()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:re()}],"inline-size":[{inline:[`auto`,...ie()]}],"min-inline-size":[{"min-inline":[`auto`,...ie()]}],"max-inline-size":[{"max-inline":[`none`,...ie()]}],"block-size":[{block:[`auto`,...ae()]}],"min-block-size":[{"min-block":[`auto`,...ae()]}],"max-block-size":[{"max-block":[`none`,...ae()]}],w:[{w:[s,`screen`,...re()]}],"min-w":[{"min-w":[s,`screen`,`none`,...re()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...re()]}],h:[{h:[`screen`,`lh`,...re()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...re()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...re()]}],"font-size":[{text:[`base`,n,ar,Qn]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,dr,er]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Hn,P]}],"font-family":[{font:[or,tr,t]}],"font-features":[{"font-features":[P]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,F,P]}],"line-clamp":[{"line-clamp":[N,`none`,F,$n]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,F,P]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,F,P]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[N,`from-font`,`auto`,F,Qn]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[N,`auto`,F,P]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Vn,F,P]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,F,P]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,F,P]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Vn,F,P],radial:[``,F,P],conic:[``,Vn,F,P]},lr,rr]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[N,F,P]}],"outline-w":[{outline:[``,N,ar,Qn]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`inner`,`none`,u,ur,ir]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,ur,ir]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[N,Qn]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,ur,ir]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[N,F,P]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[N]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[F,P]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[N]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,F,P]}],filter:[{filter:[``,`none`,F,P]}],blur:[{blur:he()}],brightness:[{brightness:[N,F,P]}],contrast:[{contrast:[N,F,P]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ur,ir]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,N,F,P]}],"hue-rotate":[{"hue-rotate":[N,F,P]}],invert:[{invert:[``,N,F,P]}],saturate:[{saturate:[N,F,P]}],sepia:[{sepia:[``,N,F,P]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,F,P]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[N,F,P]}],"backdrop-contrast":[{"backdrop-contrast":[N,F,P]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,N,F,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N,F,P]}],"backdrop-invert":[{"backdrop-invert":[``,N,F,P]}],"backdrop-opacity":[{"backdrop-opacity":[N,F,P]}],"backdrop-saturate":[{"backdrop-saturate":[N,F,P]}],"backdrop-sepia":[{"backdrop-sepia":[``,N,F,P]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,F,P]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[N,`initial`,F,P]}],ease:[{ease:[`linear`,`initial`,_,F,P]}],delay:[{delay:[N,F,P]}],animate:[{animate:[`none`,v,F,P]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,F,P]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[F,P,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[Vn,F,P]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,F,P]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,F,P]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[N,ar,Qn,$n]}],stroke:[{stroke:[`none`,...A()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function I(...e){return Sr(Xt(e))}var Cr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),L=o(((e,t)=>{t.exports=Cr()}))(),wr={"needs-input":{label:`Needs Input`,className:`bg-status-blocked/20 text-status-blocked border-status-blocked/30`},active:{label:`Idle`,className:`bg-status-running/20 text-status-running border-status-running/30`},completed:{label:`Done`,className:`bg-muted text-muted-foreground border-border`}};function Tr(e,t,n){return t.has(e.id)?`needs-input`:e.mode===`live`||e.alive||n?.has(e.id)?`active`:`completed`}function Er({status:e,className:t,running:n=!1}){let r=wr[e];return(0,L.jsxs)(`span`,{className:I(`inline-flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-xs font-medium`,r.className,t),children:[e===`active`&&n&&(0,L.jsx)(`span`,{className:`size-1.5 animate-pulse rounded-full bg-current`}),e===`active`&&n?`Running`:r.label]})}function Dr(e){if(/\s/.test(e))return e;let t=e.replace(/[-_]+/g,` `).trim();return t.charAt(0).toUpperCase()+t.slice(1)}function Or(e,t){return e.title?e.titleExplicit?e.title:Dr(e.title):t}function kr(e){let t=Date.now(),n=new Date(e).getTime(),r=Math.floor((t-n)/1e3);if(r<60)return`just now`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<7?`${o}d ago`:new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})}function Ar(e){let t=e.replace(/\/+$/,``).split(`/`);return t[t.length-1]??e}function jr({session:e,pendingSessionIds:t,busySessionIds:n,selected:r,onSelect:i,onResume:a,running:o=!1}){let s=Tr(e,t,n),c=Or(e,e.mode===`live`?`New session`:`Untitled session`);return(0,L.jsxs)(`div`,{className:I(`group flex w-full flex-col gap-1.5 rounded-lg border p-3 text-left transition-colors`,`hover:bg-accent/50`,r?`border-brand/50 bg-brand/5`:`border-transparent`),children:[(0,L.jsxs)(`button`,{onClick:()=>i(e.id),className:`flex w-full flex-col gap-1.5 text-left`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,L.jsx)(`span`,{className:`line-clamp-2 text-sm font-medium leading-snug`,children:c}),(0,L.jsx)(Er,{status:s,running:o,className:`shrink-0`})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[e.model&&(0,L.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-foreground/80`,children:e.model}),e.cwd&&(0,L.jsx)(`span`,{className:`truncate font-mono text-[10px] text-foreground/60`,title:e.cwd,children:Ar(e.cwd)}),(0,L.jsx)(`span`,{className:`ml-auto shrink-0 text-foreground/60`,children:e.updatedAt?kr(e.updatedAt):``})]})]}),e.mode===`readonly`&&e.alive!==!0&&a&&(0,L.jsxs)(`button`,{onClick:t=>{t.stopPropagation(),a(e.id)},className:I(`flex items-center gap-1.5 self-start rounded px-2 py-0.5`,`text-xs text-muted-foreground transition-colors`,`hover:bg-accent hover:text-foreground`,`opacity-0 group-hover:opacity-100 focus-visible:opacity-100`),title:`Resume this session`,"aria-label":`Resume this session`,children:[(0,L.jsx)(Tt,{className:`size-3`}),`Resume`]})]})}var Mr=new Map;function Nr(e){Mr.set(e.id,Object.freeze({...e}))}function Pr(e){return Mr.get(e)}function Fr(){return[...Mr.values()]}[{id:`sessions`,label:`Sessions`,title:`Sessions`,icon:at},{id:`memory`,label:`Memory`,title:`Memory`,icon:le},{id:`schedules`,label:`Schedules`,title:`Schedules`,icon:pe},{id:`jobs`,label:`Jobs`,title:`Background Jobs`,icon:de},{id:`handoffs`,label:`Handoffs`,title:`Pending Handoffs`,icon:se},{id:`settings`,label:`Settings`,title:`Settings`,icon:jt}].forEach(Nr);function Ir({sessions:e,pendingSessionIds:t,busySessionIds:n,selectedSessionId:r,onSelectSession:i,onResumeSession:a,activeNav:o,onNavChange:s,collapsed:c,onToggleCollapse:l,onNewSession:u,starting:d=!1,runningSessionId:f}){return(0,L.jsxs)(`aside`,{className:I(`flex h-full shrink-0 flex-col border-r bg-card transition-[width] duration-200`,c?`w-72 md:w-14`:`w-72`,`max-w-[85vw]`),children:[(0,L.jsxs)(`div`,{className:`flex h-12 items-center justify-between border-b px-3`,children:[!c&&(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`img`,{src:`/brand-mark.svg`,alt:`AFK`,width:24,height:24}),(0,L.jsx)(`span`,{className:`text-sm font-semibold tracking-tight`,children:`AFK`})]}),(0,L.jsx)(`button`,{onClick:l,className:`hidden rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground md:block`,title:c?`Expand sidebar`:`Collapse sidebar`,children:c?(0,L.jsx)(pt,{className:`size-4`}):(0,L.jsx)(dt,{className:`size-4`})})]}),u&&(0,L.jsxs)(`button`,{onClick:u,disabled:d,title:`Start a new chat`,className:`mx-2 mt-3 flex min-h-10 items-center justify-center gap-2 rounded-lg bg-brand px-2 text-sm font-medium text-primary-foreground disabled:opacity-60`,children:[(0,L.jsx)(xt,{className:`size-4 shrink-0`}),!c&&(d?`Starting…`:`New chat`)]}),(0,L.jsx)(`nav`,{className:`flex flex-col gap-0.5 p-2`,children:Fr().map(e=>(0,L.jsxs)(`button`,{onClick:()=>s(e.id),className:I(`flex items-center gap-2 rounded-md px-2.5 py-1.5 text-sm transition-colors`,o===e.id?`bg-accent text-accent-foreground font-medium`:`text-muted-foreground hover:bg-accent/50 hover:text-foreground`),title:c?e.label:void 0,"aria-label":e.label,"aria-current":o===e.id?`page`:void 0,children:[(0,L.jsx)(e.icon,{className:`size-4`,"aria-hidden":`true`}),!c&&(0,L.jsx)(`span`,{children:e.label})]},e.id))}),o===`sessions`&&!c&&(0,L.jsx)(`div`,{className:`flex-1 overflow-y-auto border-t px-2 py-2`,children:e.length===0?(0,L.jsx)(`p`,{className:`px-2 py-4 text-center text-xs text-muted-foreground`,children:`No sessions found`}):(0,L.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.map(e=>(0,L.jsx)(jr,{session:e,pendingSessionIds:t,busySessionIds:n,selected:r===e.id,running:f===e.id,onSelect:i,onResume:a},e.id))})})]})}var Lr=1,Rr=.9,zr=.8,Br=.17,Vr=.1,Hr=.999,Ur=.9999,Wr=.99,Gr=/[\\\/_+.#"@\[\(\{&]/,Kr=/[\\\/_+.#"@\[\(\{&]/g,qr=/[\s-]/,Jr=/[\s-]/g;function Yr(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Lr:Wr;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Yr(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Lr:Gr.test(e.charAt(l-1))?(d*=zr,p=e.slice(i,l-1).match(Kr),p&&i>0&&(d*=Hr**+p.length)):qr.test(e.charAt(l-1))?(d*=Rr,m=e.slice(i,l-1).match(Jr),m&&i>0&&(d*=Hr**+m.length)):(d*=Br,i>0&&(d*=Hr**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Ur)),(d<Vr&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Yr(e,t,n,r,l+1,a+2,o),f*Vr>d&&(d=f*Vr)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Xr(e){return e.toLowerCase().replace(Jr,` `)}function Zr(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Yr(e,t,Xr(e),Xr(t),0,0,{})}var Qr=Object.defineProperty,$r=(e,t)=>Qr(e,`name`,{value:t,configurable:!0}),ei=!!(typeof window<`u`&&window.document&&window.document.createElement);function ti(e,t,{checkForDefaultPrevented:n=!0}={}){return $r(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}$r(ti,`composeEventHandlers`);function ni(e){if(!ei)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}$r(ni,`getOwnerWindow`);function ri(e){if(!ei)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}$r(ri,`getOwnerDocument`);function ii(e,t=!1){let{activeElement:n}=ri(e);if(!n?.nodeName)return null;if(ai(n)&&n.contentDocument)return ii(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ri(n).getElementById(e);if(t)return t}}return n}$r(ii,`getActiveElement`);function ai(e){return e.tagName===`IFRAME`}$r(ai,`isFrame`);var oi=Object.defineProperty,si=(e,t)=>oi(e,`name`,{value:t,configurable:!0});function ci(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}si(ci,`setRef`);function li(...e){return t=>{let n=!1,r=e.map(e=>{let r=ci(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():ci(e[t],null)}}}}si(li,`composeRefs`);function ui(...e){return O.useCallback(li(...e),e)}si(ui,`useComposedRefs`);var di=Object.defineProperty,fi=(e,t)=>di(e,`name`,{value:t,configurable:!0});function pi(e,t){let n=O.createContext(t);n.displayName=e+`Context`;let r=fi(e=>{let{children:t,...r}=e,i=O.useMemo(()=>r,Object.values(r));return(0,L.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=O.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return fi(i,`useContext`),[r,i]}fi(pi,`createContext`);function mi(e,t=[]){let n=[];function r(t,r){let i=O.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=fi(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=O.useMemo(()=>o,Object.values(o));return(0,L.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=O.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return fi(s,`useContext`),[o,s]}fi(r,`createContext`);let i=fi(()=>{let t=n.map(e=>O.createContext(e));return fi(function(n){let r=n?.[e]||t;return O.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,hi(i,...t)]}fi(mi,`createContextScope`);function hi(...e){let t=e[0];if(e.length===1)return t;let n=fi(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return fi(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return O.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}fi(hi,`composeContextScopes`);var gi=globalThis?.document?O.useLayoutEffect:()=>{},_i=Object.defineProperty,vi=(e,t)=>_i(e,`name`,{value:t,configurable:!0}),yi=O.useId||(()=>void 0),bi=0;function xi(e){let[t,n]=O.useState(yi());return gi(()=>{e||n(e=>e??String(bi++))},[e]),e||(t?`radix-${t}`:``)}vi(xi,`useId`);var Si=Object.defineProperty,Ci=(e,t)=>Si(e,`name`,{value:t,configurable:!0}),wi=O.useEffectEvent,Ti=O.useInsertionEffect;function Ei(e){if(typeof wi==`function`)return wi(e);let t=O.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Ti==`function`?Ti(()=>{t.current=e}):gi(()=>{t.current=e}),O.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ci(Ei,`useEffectEvent`);var Di=Object.defineProperty,Oi=(e,t)=>Di(e,`name`,{value:t,configurable:!0}),ki=O.useInsertionEffect||gi;function Ai({prop:e,defaultProp:t,onChange:n=Oi(()=>{},`onChange`),caller:r}){let[i,a,o]=ji({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,O.useCallback(t=>{if(s){let n=Mi(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Oi(Ai,`useControllableState`);function ji({defaultProp:e,onChange:t}){let[n,r]=O.useState(e),i=O.useRef(n),a=O.useRef(t);return ki(()=>{a.current=t},[t]),O.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Oi(ji,`useUncontrolledState`);function Mi(e){return typeof e==`function`}Oi(Mi,`isFunction`);var Ni=Symbol(`RADIX:SYNC_STATE`);function Pi(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Ei(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=O.useReducer((t,n)=>{if(n.type===Ni)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=O.useRef(p);O.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=O.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return O.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Ni,state:i})},[i,d.state,c]),[h,f]}Oi(Pi,`useControllableStateReducer`);var Fi=l(h(),1),Ii=Object.defineProperty,Li=(e,t)=>Ii(e,`name`,{value:t,configurable:!0});function Ri(e){let t=O.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Ki(r)&&typeof Xi==`function`&&(r=Xi(r._payload)),O.Children.forEach(r,e=>{if(Wi(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Ki(n)&&typeof Xi==`function`&&(n=Xi(n._payload)),a=Vi(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=O.cloneElement(a,void 0,s):!o&&O.Children.count(r)===1&&O.isValidElement(r)&&(a=r);let c=a?Ui(a):void 0,l=ui(n,c);if(!a){if(r||r===0)throw Error(o?Yi(e):Ji(e));return r}let u=Hi(i,a.props??{});return a.type!==O.Fragment&&(u.ref=n?l:c),O.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Li(Ri,`createSlot`);var zi=Symbol.for(`radix.slottable`);function Bi(e){let t=Li(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=zi,t}Li(Bi,`createSlottable`);var Vi=Li((e,t)=>{if(`child`in e.props){let t=e.props.child;return O.isValidElement(t)?O.cloneElement(t,void 0,e.props.children(t.props.children)):null}return O.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Hi(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}Li(Hi,`mergeProps`);function Ui(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Li(Ui,`getElementRef`);function Wi(e){return O.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===zi}Li(Wi,`isSlottable`);var Gi=Symbol.for(`react.lazy`);function Ki(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Gi&&`_payload`in e&&qi(e._payload)}Li(Ki,`isLazyComponent`);function qi(e){return typeof e==`object`&&!!e&&`then`in e}Li(qi,`isPromiseLike`);var Ji=Li(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Yi=Li(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Xi=O.use,Zi=Object.defineProperty,Qi=(e,t)=>Zi(e,`name`,{value:t,configurable:!0}),$i=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ri(`Primitive.${t}`),r=O.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ea(e,t){e&&Fi.flushSync(()=>e.dispatchEvent(t))}Qi(ea,`dispatchDiscreteCustomEvent`);var ta=Object.defineProperty,na=(e,t)=>ta(e,`name`,{value:t,configurable:!0});function ra(e){let t=O.useRef(e);return O.useEffect(()=>{t.current=e}),O.useMemo(()=>((...e)=>t.current?.(...e)),[])}na(ra,`useCallbackRef`);var ia=Object.defineProperty,R=(e,t)=>ia(e,`name`,{value:t,configurable:!0}),aa=`dismissableLayer.update`,z=`dismissableLayer.pointerDownOutside`,oa=`dismissableLayer.focusOutside`,sa,ca=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),la=O.forwardRef(R(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=O.useContext(ca),[d,f]=O.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=O.useState({}),h=ui(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=O.useRef(!1),C=fa(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:O.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=pa(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=ra(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return O.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),O.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(sa=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ma(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=sa))}},[d,p,n,u]),O.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ma())},[d,u]),O.useEffect(()=>{let e=R(()=>m({}),`handleUpdate`);return document.addEventListener(aa,e),()=>document.removeEventListener(aa,e)},[]),(0,L.jsx)($i.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:ti(e.onFocusCapture,w.onFocusCapture),onBlurCapture:ti(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:ti(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function ua(){let e=O.useContext(ca),[t,n]=O.useState(null);return O.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}R(ua,`useDismissableLayerSurface`);var da=R(()=>!0,`IS_TRUE`);function fa(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=da}=t,s=ra(e),c=O.useRef(!1),l=O.useRef(!1),u=O.useRef(new Map),d=O.useRef(()=>{});return O.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}R(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}R(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}R(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}R(p,`handleInteractionBubble`);let m=R(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||ha(z,s,p,{discrete:!0})};if(R(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:R(()=>c.current=!0,`onPointerDownCapture`)}}R(fa,`usePointerDownOutside`);function pa(e,t=globalThis?.document){let n=ra(e),r=O.useRef(!1);return O.useEffect(()=>{let e=R(e=>{e.target&&!r.current&&ha(oa,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:R(()=>r.current=!0,`onFocusCapture`),onBlurCapture:R(()=>r.current=!1,`onBlurCapture`)}}R(pa,`useFocusOutside`);function ma(){let e=new CustomEvent(aa);document.dispatchEvent(e)}R(ma,`dispatchUpdate`);function ha(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ea(i,a):i.dispatchEvent(a)}R(ha,`handleAndDispatchCustomEvent`);var ga=Object.defineProperty,_a=(e,t)=>ga(e,`name`,{value:t,configurable:!0}),va=`focusScope.autoFocusOnMount`,ya=`focusScope.autoFocusOnUnmount`,ba={bubbles:!1,cancelable:!0},xa=O.forwardRef(_a(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=O.useState(null),l=ra(i),u=ra(a),d=O.useRef(null),f=ui(t,c),p=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Oa(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Oa(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Oa(s)};_a(e,`handleFocusIn`),_a(t,`handleFocusOut`),_a(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),O.useEffect(()=>{if(s){ka.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(va,ba);s.addEventListener(va,l),s.dispatchEvent(t),t.defaultPrevented||(Sa(Ma(wa(s)),{select:!0}),document.activeElement===e&&Oa(s))}return()=>{s.removeEventListener(va,l),setTimeout(()=>{let t=new CustomEvent(ya,ba);s.addEventListener(ya,u),s.dispatchEvent(t),t.defaultPrevented||Oa(e??document.body,{select:!0}),s.removeEventListener(ya,u),ka.remove(p)},0)}}},[s,l,u,p]);let m=O.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ca(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Oa(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Oa(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,L.jsx)($i.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function Sa(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Oa(r,{select:t}),document.activeElement!==n)return}_a(Sa,`focusFirst`);function Ca(e){let t=wa(e);return[Ta(t,e),Ta(t.reverse(),e)]}_a(Ca,`getTabbableEdges`);function wa(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:_a(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}_a(wa,`getTabbableCandidates`);function Ta(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Ea(r,{upTo:t})))return r}_a(Ta,`findVisible`);function Ea(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}_a(Ea,`isHidden`);function Da(e){return e instanceof HTMLInputElement&&`select`in e}_a(Da,`isSelectableInput`);function Oa(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Da(e)&&t&&e.select()}}_a(Oa,`focus`);var ka=Aa();function Aa(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ja(e,t),e.unshift(t)},remove(t){e=ja(e,t),e[0]?.resume()}}}_a(Aa,`createFocusScopesStack`);function ja(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}_a(ja,`arrayRemove`);function Ma(e){return e.filter(e=>e.tagName!==`A`)}_a(Ma,`removeLinks`);var Na=Object.defineProperty,Pa=O.forwardRef(((e,t)=>Na(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=O.useState(!1);gi(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Fi.createPortal((0,L.jsx)($i.div,{...r,ref:t}),o):null},`Portal`)),Fa=Object.defineProperty,Ia=(e,t)=>Fa(e,`name`,{value:t,configurable:!0});function La(e,t){return O.useReducer((e,n)=>t[e][n]??e,e)}Ia(La,`useStateMachine`);var Ra=Ia(e=>{let{present:t,children:n}=e,r=za(t),i=typeof n==`function`?n({present:r.isPresent}):O.Children.only(n),a=Va(r.ref,Ua(i));return typeof n==`function`||r.isPresent?O.cloneElement(i,{ref:a}):null},`Presence`);function za(e){let[t,n]=O.useState(),r=O.useRef(null),i=O.useRef(e),a=O.useRef(`none`),o=O.useRef(void 0),[s,c]=La(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return O.useEffect(()=>{s===`mounted`?(a.current=o.current??Ha(r.current),o.current=void 0):a.current=`none`},[s]),gi(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Ha(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),gi(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Ia(a=>{let o=Ha(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Ia(e=>{e.target===t&&(a.current=Ha(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:O.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Ha(t)}else r.current=null;n(e)},[])}}Ia(za,`usePresence`);function Ba(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ia(Ba,`setRef`);function Va(...e){let t=O.useRef(e);return t.current=e,O.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ba(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ba(n[e],null)}}},[])}Ia(Va,`useStableComposedRefs`);function Ha(e){return e?.animationName||`none`}Ia(Ha,`getAnimationName`);function Ua(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ia(Ua,`getElementRef`);var Wa=Object.defineProperty,Ga=(e,t)=>Wa(e,`name`,{value:t,configurable:!0}),Ka=0,qa=null;function Ja(e){return Ya(),e.children}Ga(Ja,`FocusGuards`);function Ya(){O.useEffect(()=>{qa||={start:Xa(),end:Xa()};let{start:e,end:t}=qa;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Ka++,()=>{Ka===1&&(qa?.start.remove(),qa?.end.remove(),qa=null),Ka=Math.max(0,Ka-1)}},[])}Ga(Ya,`useFocusGuards`);function Xa(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}Ga(Xa,`createFocusGuard`);var Za=function(){return Za=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Za.apply(this,arguments)};function Qa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function $a(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var eo=`right-scroll-bar-position`,to=`width-before-scroll-bar`,no=`with-scroll-bars-hidden`,ro=`--removed-body-scroll-bar-size`;function io(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function ao(e,t){var n=(0,O.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var oo=typeof window<`u`?O.useLayoutEffect:O.useEffect,so=new WeakMap;function co(e,t){var n=ao(t||null,function(t){return e.forEach(function(e){return io(e,t)})});return oo(function(){var t=so.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||io(e,null)}),i.forEach(function(e){r.has(e)||io(e,a)})}so.set(n,e)},[e]),n}function lo(e){return e}function uo(e,t){t===void 0&&(t=lo);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function fo(e){e===void 0&&(e={});var t=uo(null);return t.options=Za({async:!0,ssr:!1},e),t}var po=function(e){var t=e.sideCar,n=Qa(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return O.createElement(r,Za({},n))};po.isSideCarExport=!0;function mo(e,t){return e.useMedium(t),po}var ho=fo(),go=function(){},_o=O.forwardRef(function(e,t){var n=O.useRef(null),r=O.useState({onScrollCapture:go,onWheelCapture:go,onTouchMoveCapture:go}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Qa(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=co([n,t]),C=Za(Za({},b),i);return O.createElement(O.Fragment,null,u&&O.createElement(x,{sideCar:ho,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?O.cloneElement(O.Children.only(s),Za(Za({},C),{ref:S})):O.createElement(v,Za({},C,{className:c,ref:S}),s))});_o.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},_o.classNames={fullWidth:to,zeroRight:eo};var vo=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function yo(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=vo();return t&&e.setAttribute(`nonce`,t),e}function bo(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xo(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var So=function(){var e=0,t=null;return{add:function(n){e==0&&(t=yo())&&(bo(t,n),xo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Co=function(){var e=So();return function(t,n){O.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wo=function(){var e=Co();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},To={left:0,top:0,right:0,gap:0},Eo=function(e){return parseInt(e||``,10)||0},Do=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Eo(n),Eo(r),Eo(i)]},Oo=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return To;var t=Do(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ko=wo(),Ao=`data-scroll-locked`,jo=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
10
|
+
.${no} {
|
|
11
|
+
overflow: hidden ${r};
|
|
12
|
+
padding-right: ${s}px ${r};
|
|
13
|
+
}
|
|
14
|
+
body[${Ao}] {
|
|
15
|
+
overflow: hidden ${r};
|
|
16
|
+
overscroll-behavior: contain;
|
|
17
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
18
|
+
padding-left: ${i}px;
|
|
19
|
+
padding-top: ${a}px;
|
|
20
|
+
padding-right: ${o}px;
|
|
21
|
+
margin-left:0;
|
|
22
|
+
margin-top:0;
|
|
23
|
+
margin-right: ${s}px ${r};
|
|
24
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.${eo} {
|
|
28
|
+
right: ${s}px ${r};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.${to} {
|
|
32
|
+
margin-right: ${s}px ${r};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.${eo} .${eo} {
|
|
36
|
+
right: 0 ${r};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.${to} .${to} {
|
|
40
|
+
margin-right: 0 ${r};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body[${Ao}] {
|
|
44
|
+
${ro}: ${s}px;
|
|
45
|
+
}
|
|
46
|
+
`},Mo=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},No=function(){O.useEffect(function(){return document.body.setAttribute(Ao,(Mo()+1).toString()),function(){var e=Mo()-1;e<=0?document.body.removeAttribute(Ao):document.body.setAttribute(Ao,e.toString())}},[])},Po=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;No();var a=O.useMemo(function(){return Oo(i)},[i]);return O.createElement(ko,{styles:jo(a,!t,i,n?``:`!important`)})},Fo=!1;if(typeof window<`u`)try{var Io=Object.defineProperty({},"passive",{get:function(){return Fo=!0,!0}});window.addEventListener(`test`,Io,Io),window.removeEventListener(`test`,Io,Io)}catch{Fo=!1}var Lo=Fo?{passive:!1}:!1,Ro=function(e){return e.tagName===`TEXTAREA`},zo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Ro(e)&&n[t]===`visible`)},Bo=function(e){return zo(e,`overflowY`)},Vo=function(e){return zo(e,`overflowX`)},Ho=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Wo(e,r)){var i=Go(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Uo=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},B=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Wo=function(e,t){return e===`v`?Bo(t):Vo(t)},Go=function(e,t){return e===`v`?Uo(t):B(t)},Ko=function(e,t){return e===`h`&&t===`rtl`?-1:1},qo=function(e,t,n,r,i){var a=Ko(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Go(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Wo(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Jo=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Yo=function(e){return[e.deltaX,e.deltaY]},Xo=function(e){return e&&`current`in e?e.current:e},Zo=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Qo=function(e){return`
|
|
47
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
48
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
49
|
+
`},$o=0,es=[];function ts(e){var t=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),i=O.useState($o++)[0],a=O.useState(wo)[0],o=O.useRef(e);O.useEffect(function(){o.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=$a([e.lockRef.current],(e.shards||[]).map(Xo),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=O.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Jo(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ho(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ho(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return qo(h,t,e,h===`h`?s:c,!0)},[]),c=O.useCallback(function(e){var n=e;if(es.length&&es[es.length-1]===a){var r=`deltaY`in n?Yo(n):Jo(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Zo(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(Xo).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=O.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ns(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=O.useCallback(function(e){n.current=Jo(e),r.current=void 0},[]),d=O.useCallback(function(t){l(t.type,Yo(t),t.target,s(t,e.lockRef.current))},[]),f=O.useCallback(function(t){l(t.type,Jo(t),t.target,s(t,e.lockRef.current))},[]);O.useEffect(function(){return es.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Lo),document.addEventListener(`touchmove`,c,Lo),document.addEventListener(`touchstart`,u,Lo),function(){es=es.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Lo),document.removeEventListener(`touchmove`,c,Lo),document.removeEventListener(`touchstart`,u,Lo)}},[]);var p=e.removeScrollBar,m=e.inert;return O.createElement(O.Fragment,null,m?O.createElement(a,{styles:Qo(i)}):null,p?O.createElement(Po,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ns(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var rs=mo(ho,ts),is=O.forwardRef(function(e,t){return O.createElement(_o,Za({},e,{ref:t,sideCar:rs}))});is.classNames=_o.classNames;var as=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},os=new WeakMap,ss=new WeakMap,cs={},ls=0,us=function(e){return e&&(e.host||us(e.parentNode))},ds=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=us(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},fs=function(e,t,n,r){var i=ds(t,Array.isArray(e)?e:[e]);cs[n]||(cs[n]=new WeakMap);var a=cs[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(os.get(e)||0)+1,l=(a.get(e)||0)+1;os.set(e,c),a.set(e,l),o.push(e),c===1&&i&&ss.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),ls++,function(){o.forEach(function(e){var t=os.get(e)-1,i=a.get(e)-1;os.set(e,t),a.set(e,i),t||(ss.has(e)||e.removeAttribute(r),ss.delete(e)),i||e.removeAttribute(n)}),ls--,ls||(os=new WeakMap,os=new WeakMap,ss=new WeakMap,cs={})}},ps=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||as(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),fs(r,i,n,`aria-hidden`)):function(){return null}},ms=Object.defineProperty,hs=(e,t)=>ms(e,`name`,{value:t,configurable:!0}),gs=`Dialog`,[_s,vs]=mi(gs),[ys,bs]=_s(gs),xs=hs(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=O.useRef(null),c=O.useRef(null),[l,u]=Ai({prop:r,defaultProp:i??!1,onChange:a,caller:gs}),[d,f]=O.useState(0),[p,m]=O.useState(0);return(0,L.jsx)(ys,{scope:t,triggerRef:s,contentRef:c,contentId:xi(),titleId:xi(),descriptionId:xi(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:O.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),Ss=`DialogPortal`,[Cs,ws]=_s(Ss,{forceMount:void 0}),Ts=hs(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=bs(Ss,t);return(0,L.jsx)(Cs,{scope:t,forceMount:n,children:O.Children.map(r,e=>(0,L.jsx)(Ra,{present:n||a.open,children:(0,L.jsx)(Pa,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Es=`DialogOverlay`,Ds=O.forwardRef(hs(function(e,t){let n=ws(Es,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=bs(Es,e.__scopeDialog);return a.modal?(0,L.jsx)(Ra,{present:r||a.open,children:(0,L.jsx)(ks,{...i,ref:t})}):null},`DialogOverlay`)),Os=Ri(`DialogOverlay.RemoveScroll`),ks=O.forwardRef(hs(function(e,t){let{__scopeDialog:n,...r}=e,i=bs(Es,n),a=ui(t,ua());return(0,L.jsx)(is,{as:Os,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)($i.div,{"data-state":Fs(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),As=`DialogContent`,js=O.forwardRef(hs(function(e,t){let n=ws(As,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=bs(As,e.__scopeDialog);return(0,L.jsx)(Ra,{present:r||a.open,children:a.modal?(0,L.jsx)(Ms,{...i,ref:t}):(0,L.jsx)(Ns,{...i,ref:t})})},`DialogContent`)),Ms=O.forwardRef(hs(function(e,t){let n=bs(As,e.__scopeDialog),r=O.useRef(null),i=ui(t,n.contentRef,r);return O.useEffect(()=>{let e=r.current;if(e)return ps(e)},[]),(0,L.jsx)(Ps,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:ti(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ti(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:ti(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Ns=O.forwardRef(hs(function(e,t){let n=bs(As,e.__scopeDialog),r=O.useRef(!1),i=O.useRef(!1);return(0,L.jsx)(Ps,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),Ps=O.forwardRef(hs(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=bs(As,n);return Ya(),(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(xa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(la,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Fs(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`));function Fs(e){return e?`open`:`closed`}hs(Fs,`getState`);var Is=`[cmdk-group=""]`,Ls=`[cmdk-group-items=""]`,Rs=`[cmdk-group-heading=""]`,zs=`[cmdk-item=""]`,Bs=`${zs}:not([aria-disabled="true"])`,Vs=`cmdk-item-select`,Hs=`data-value`,Us=(e,t,n)=>Zr(e,t,n),Ws=O.createContext(void 0),Gs=()=>O.useContext(Ws),Ks=O.createContext(void 0),qs=()=>O.useContext(Ks),Js=O.createContext(void 0),Ys=O.forwardRef((e,t)=>{let n=lc(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=lc(()=>new Set),i=lc(()=>new Map),a=lc(()=>new Map),o=lc(()=>new Set),s=sc(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=xi(),y=xi(),b=xi(),x=O.useRef(null),S=fc();cc(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),cc(()=>{S(6,te)},[]);let C=O.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)ee(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=ne()?.id,C.emit()}),r||S(5,te),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=O.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{ee(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=ne();S(4,()=>{ee(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??Us;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;k().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Ls);t?t.appendChild(e.parentElement===t?e:e.closest(`${Ls} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Ls} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${Is}[${Hs}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=k().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Hs);C.setState(`value`,e||void 0)}function ee(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function te(){var e;let t=ne();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Is)?.querySelector(Rs))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function ne(){return x.current?.querySelector(`${zs}[aria-selected="true"]`)}function k(){return Array.from(x.current?.querySelectorAll(Bs)||[])}function re(e){let t=k()[e];t&&C.setState(`value`,t.getAttribute(Hs))}function ie(e){var t;let n=ne(),r=k(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(Hs))}function ae(e){let t=ne()?.closest(Is),n;for(;t&&!n;)t=e>0?ac(t,Is):oc(t,Is),n=t?.querySelector(Bs);n?C.setState(`value`,n.getAttribute(Hs)):ie(e)}let A=()=>re(k().length-1),oe=e=>{e.preventDefault(),e.metaKey?A():e.altKey?ae(1):ie(1)},se=e=>{e.preventDefault(),e.metaKey?re(0):e.altKey?ae(-1):ie(-1)};return O.createElement($i.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&oe(e);break;case`ArrowDown`:oe(e);break;case`p`:case`k`:g&&e.ctrlKey&&se(e);break;case`ArrowUp`:se(e);break;case`Home`:e.preventDefault(),re(0);break;case`End`:e.preventDefault(),A();break;case`Enter`:{e.preventDefault();let t=ne();if(t){let e=new Event(Vs);t.dispatchEvent(e)}}}}},O.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:hc},c),mc(e,e=>O.createElement(Ks.Provider,{value:C},O.createElement(Ws.Provider,{value:w},e))))}),Xs=O.forwardRef((e,t)=>{let n=xi(),r=O.useRef(null),i=O.useContext(Js),a=Gs(),o=sc(e),s=o.current?.forceMount??i?.forceMount;cc(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=dc(n,r,[e.value,e.children,r],e.keywords),l=qs(),u=uc(e=>e.value&&e.value===c.current),d=uc(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);O.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(Vs,f),()=>t.removeEventListener(Vs,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return O.createElement($i.div,{ref:li(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),Zs=O.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=xi(),s=O.useRef(null),c=O.useRef(null),l=xi(),u=Gs(),d=uc(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));cc(()=>u.group(o),[]),dc(o,s,[e.value,e.heading,c]);let f=O.useMemo(()=>({id:o,forceMount:i}),[i]);return O.createElement($i.div,{ref:li(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&O.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),mc(e,e=>O.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},O.createElement(Js.Provider,{value:f},e))))}),Qs=O.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=O.useRef(null),a=uc(e=>!e.search);return!n&&!a?null:O.createElement($i.div,{ref:li(i,t),...r,"cmdk-separator":``,role:`separator`})}),$s=O.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=qs(),o=uc(e=>e.search),s=uc(e=>e.selectedItemId),c=Gs();return O.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),O.createElement($i.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),ec=O.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=O.useRef(null),o=O.useRef(null),s=uc(e=>e.selectedItemId),c=Gs();return O.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),O.createElement($i.div,{ref:li(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},mc(e,e=>O.createElement(`div`,{ref:li(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),tc=O.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return O.createElement(xs,{open:n,onOpenChange:r},O.createElement(Ts,{container:o},O.createElement(Ds,{"cmdk-overlay":``,className:i}),O.createElement(js,{"aria-label":e.label,"cmdk-dialog":``,className:a},O.createElement(Ys,{ref:t,...s}))))}),nc=O.forwardRef((e,t)=>uc(e=>e.filtered.count===0)?O.createElement($i.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),rc=O.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return O.createElement($i.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},mc(e,e=>O.createElement(`div`,{"aria-hidden":!0},e)))}),ic=Object.assign(Ys,{List:ec,Item:Xs,Input:$s,Group:Zs,Separator:Qs,Dialog:tc,Empty:nc,Loading:rc});function ac(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function oc(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function sc(e){let t=O.useRef(e);return cc(()=>{t.current=e}),t}var cc=typeof window>`u`?O.useEffect:O.useLayoutEffect;function lc(e){let t=O.useRef();return t.current===void 0&&(t.current=e()),t}function uc(e){let t=qs(),n=()=>e(t.snapshot());return O.useSyncExternalStore(t.subscribe,n,n)}function dc(e,t,n,r=[]){let i=O.useRef(),a=Gs();return cc(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(Hs,s),i.current=s}),i}var fc=()=>{let[e,t]=O.useState(),n=lc(()=>new Map);return cc(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function pc(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function mc({asChild:e,children:t},n){return e&&O.isValidElement(t)?O.cloneElement(pc(t),{ref:t.ref},n(t.props.children)):n(t)}var hc={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function gc(e,t){let n=t.trim().toLowerCase();if(!n)return 1;let r=e.toLowerCase();if(!r)return 0;if(r===n)return 1;if(r.startsWith(n))return .95;if(r.startsWith(`/`)&&!n.startsWith(`/`)&&r.slice(1).startsWith(n))return r.slice(1)===n?.99:.95;let i=r.indexOf(n);if(i>0)return _c(r,i)?.9:.8;let a=0,o=0,s=0,c=0;for(let e of n){if(e===` `)continue;let t=-1;for(;a<r.length;){if(r[a]===e){t=a;break}a++}if(t<0)return 0;o++,s=t>0&&r[t-1]===n[o-2]?s+1:0,c+=(_c(r,t)?2:0)+s,a=t+1}let l=o/Math.max(r.length,1);return Math.min(.7,.2+.3*l+.02*c)}function _c(e,t){return t===0||/[\s\-_/.:]/.test(e[t-1]??``)}function vc(e,t,n){if(!n||n.length===0)return 0;let r=0;return n.forEach((e,n)=>{let i=gc(e,t);r=Math.max(r,n===0?i:Math.min(i,.93))}),r}function yc(e){return e.startsWith(`/`)?e.slice(1):e}function bc(e){return`/${yc(e)}`}function xc(e,t){return yc(e).startsWith(yc(t))}var Sc=`afk_web_token`,Cc=`__AFK_WEB_TOKEN__`,wc=null;function Tc(){wc=null;try{sessionStorage.removeItem(Sc)}catch{}}function Ec(){if(wc)return wc;let e=document.querySelector(`meta[name="afk-token"]`)?.content;if(e&&e!==Cc){wc=e;try{sessionStorage.setItem(Sc,e)}catch{}return Dc(),e}try{let e=sessionStorage.getItem(Sc);if(e)return wc=e,e}catch{}return``}function Dc(){let e=new URL(window.location.href);(e.searchParams.has(`token`)||e.searchParams.has(`k`))&&(e.searchParams.delete(`token`),e.searchParams.delete(`k`),window.history.replaceState({},``,e.toString()))}async function V(e,t={}){let n=Ec(),r=new Headers(t.headers);n&&r.set(`Authorization`,`Bearer ${n}`),t.body&&!r.has(`Content-Type`)&&r.set(`Content-Type`,`application/json`);let i=await fetch(e,{...t,headers:r});if(!i.ok){i.status===401&&Tc();let e=await i.text().catch(()=>i.statusText),t;try{t=JSON.parse(e)}catch{}throw new Oc(i.status,e,t)}return i.json()}var Oc=class extends Error{status;body;constructor(e,t,n){super(`API ${e}: ${t}`),this.status=e,this.name=`ApiError`,this.body=n}},kc=`afk_slash_recent`,Ac=5;function jc(e){try{let t=[e,...JSON.parse(localStorage.getItem(kc)??`[]`).filter(t=>t!==e)].slice(0,Ac);localStorage.setItem(kc,JSON.stringify(t))}catch{}}function Mc(){try{return JSON.parse(localStorage.getItem(kc)??`[]`)}catch{return[]}}var Nc=new Set([`/model`,`/clear`,`/compact`,`/cost`,`/rewind`,`/fork`,`/resume`,`/help`,`/exit`]);function Pc(e,t,n,r=12){if(t.trim().toLowerCase().length>0){let n=e.filter(e=>xc(e.name,t)).slice(0,r);return n.length>0?[{label:``,commands:n}]:[]}let i=[],a=[],o=[],s=new Set;for(let t of Nc){if(i.length>=7)break;let n=e.find(e=>e.name===t);n&&(i.push(n),s.add(n.name))}for(let t of n){if(s.has(t))continue;let n=e.find(e=>e.name===t);n&&(a.push(n),s.add(n.name))}let c=e.filter(e=>!s.has(e.name));o.push(...c);let l=[];i.length>0&&l.push({label:`Chat`,commands:i}),a.length>0&&l.push({label:`Recent`,commands:a}),o.length>0&&l.push({label:`Skills`,commands:o});let u=r;return l.map(e=>{let t=e.commands.slice(0,u);return u=Math.max(0,u-t.length),{...e,commands:t}}).filter(e=>e.commands.length>0)}function Fc({query:e,commands:t,onSelect:n,visible:r}){let[i,a]=(0,O.useState)(0),[o,s]=(0,O.useState)([]),c=(0,O.useRef)(null);(0,O.useEffect)(()=>{r&&s(Mc())},[r]);let l=Pc(t,e,o),u=l.flatMap(e=>e.commands);return(0,O.useEffect)(()=>{a(0)},[e]),(0,O.useEffect)(()=>{(c.current?.querySelector(`[data-idx="${i}"]`))?.scrollIntoView({block:`nearest`})},[i]),!r||u.length===0?null:(0,L.jsx)(`ul`,{ref:c,role:`listbox`,"aria-label":`Slash commands`,className:I(`absolute bottom-full left-0 mb-1 w-full max-h-72 overflow-y-auto`,`rounded-lg border border-border bg-popover shadow-lg z-50`,`text-sm`),children:l.map(e=>(0,L.jsxs)(`li`,{role:`presentation`,children:[e.label&&(0,L.jsx)(`div`,{className:`px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground select-none`,children:e.label}),(0,L.jsx)(`ul`,{role:`presentation`,children:e.commands.map(e=>{let t=u.indexOf(e),r=t===i;return(0,L.jsxs)(`li`,{role:`option`,"aria-selected":r,"data-idx":t,className:I(`flex items-baseline gap-2 px-3 py-2 cursor-pointer select-none`,r?`bg-accent text-accent-foreground`:`hover:bg-accent/50`),onMouseEnter:()=>a(t),onMouseDown:t=>{t.preventDefault(),n(e.name)},children:[(0,L.jsx)(`span`,{className:`font-mono font-semibold shrink-0`,children:bc(e.name)}),(0,L.jsx)(`span`,{className:`text-muted-foreground truncate`,children:e.summary})]},e.name)})})]},e.label||`filtered`))})}function Ic(e,t,n,r,i,a,o,s=!1){return!t||n===0?!1:e.key===`Tab`?(a(r),!0):e.key===`Enter`&&s?!1:e.key===`ArrowDown`?(i((r+1)%n),!0):e.key===`ArrowUp`?(i((r-1+n)%n),!0):e.key===`Enter`?(a(r),!0):e.key===`Escape`&&(o(),!0)}function Lc(e){let t=e.trim();return t?t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`~/`)||/^[\w.]/.test(t):!1}function Rc({onInsert:e}){let[t,n]=(0,O.useState)(!1),[r,i]=(0,O.useState)(``),[a,o]=(0,O.useState)(!1),s=(0,O.useRef)(null),c=(0,O.useRef)(null),l=(0,O.useRef)(null),u=(0,O.useCallback)(()=>{n(!1),o(!1),i(``)},[]),d=(0,O.useCallback)(()=>{let t=r.trim();Lc(t)?(e(`@${t}`),u()):(o(!0),s.current?.focus())},[r,e,u]);return(0,O.useEffect)(()=>{t&&requestAnimationFrame(()=>s.current?.focus())},[t]),(0,O.useEffect)(()=>{if(!t)return;function e(e){let t=e.target;c.current&&!c.current.contains(t)&&l.current&&!l.current.contains(t)&&u()}return document.addEventListener(`click`,e,{capture:!0}),()=>document.removeEventListener(`click`,e,{capture:!0})},[t,u]),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(`button`,{ref:l,type:`button`,onClick:()=>t?u():n(!0),"aria-label":`Insert file reference`,"aria-expanded":t,className:I(`flex h-8 w-8 items-center justify-center rounded-md text-sm`,`transition-colors hover:bg-accent hover:text-accent-foreground`,t&&`bg-accent text-accent-foreground`),title:`Insert @file reference`,children:(0,L.jsx)(Ue,{className:`h-4 w-4`})}),t&&(0,L.jsxs)(`div`,{ref:c,role:`dialog`,"aria-label":`Insert file path`,className:I(`absolute bottom-full left-0 mb-2 w-72 rounded-lg border`,`bg-popover p-3 shadow-lg animate-fade-in`),children:[(0,L.jsxs)(`p`,{className:`mb-2 text-xs text-muted-foreground`,children:[`Type a file path. `,(0,L.jsx)(`code`,{className:`text-[10px]`,children:`@~/file.ts`}),` or`,` `,(0,L.jsx)(`code`,{className:`text-[10px]`,children:`@src/file.ts`})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`input`,{ref:s,type:`text`,value:r,onChange:e=>{i(e.target.value),o(!1)},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d()),e.key===`Escape`&&u()},placeholder:`src/foo.ts or ~/file.ts`,autoComplete:`off`,spellCheck:!1,className:I(`flex-1 rounded-md border bg-secondary px-2 py-1 text-sm`,`placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring`,a&&`border-destructive`)}),(0,L.jsx)(`button`,{type:`button`,onClick:d,className:I(`rounded-md bg-primary px-3 py-1 text-sm font-medium`,`text-primary-foreground hover:bg-primary/90`),children:`Add`})]}),a&&(0,L.jsx)(`p`,{className:`mt-1 text-xs text-destructive`,children:`Enter a valid file path.`})]})]})}var zc=[{id:`sonnet`,label:`Sonnet`},{id:`haiku`,label:`Haiku`},{id:`opus`,label:`Opus`}];function Bc({onSelect:e,current:t,className:n,disabled:r}){let[i,a]=(0,O.useState)(zc),[o,s]=(0,O.useState)();(0,O.useEffect)(()=>{let e=!1;return V(`/api/models`).then(t=>{e||(t.models?.length>0&&a(t.models),t.default&&s(t.default))}).catch(()=>{}),()=>{e=!0}},[]);let c=t??o??``,l=(0,O.useCallback)(t=>{t.target.value&&e(t.target.value)},[e]);return(0,L.jsxs)(`div`,{className:I(`relative inline-flex items-center`,n),children:[(0,L.jsxs)(`select`,{value:c,disabled:r,onChange:l,"aria-label":`Model`,className:I(`max-w-44 appearance-none rounded-md border bg-secondary pl-2 pr-7 py-1`,`text-xs font-medium text-secondary-foreground`,`cursor-pointer focus:outline-none focus:ring-1 focus:ring-ring`),children:[!i.some(e=>e.id===c)&&(0,L.jsx)(`option`,{value:c,disabled:!c,children:c||`Server default`}),i.map(e=>(0,L.jsx)(`option`,{value:e.id,children:e.label},e.id))]}),(0,L.jsx)(_e,{className:`pointer-events-none absolute right-1.5 h-3 w-3 text-muted-foreground`})]})}function Vc({queue:e}){let{entries:t,moveItemUp:n,moveItemDown:r,removeItem:i,editItem:a}=e;return t.length===0?null:(0,L.jsxs)(`div`,{className:`flex flex-col gap-1 border-b border-border/50 px-3 py-2`,children:[(0,L.jsxs)(`p`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:[`Queued (`,t.length,`)`]}),t.map((e,o)=>(0,L.jsx)(Hc,{text:e.text,isFirst:o===0,isLast:o===t.length-1,onMoveUp:()=>n(o),onMoveDown:()=>r(o),onRemove:()=>i(o),onEdit:e=>a(o,e)},e.id))]})}function Hc({text:e,isFirst:t,isLast:n,onMoveUp:r,onMoveDown:i,onRemove:a,onEdit:o}){let[s,c]=(0,O.useState)(!1),[l,u]=(0,O.useState)(e),d=(0,O.useRef)(null);(0,O.useEffect)(()=>{s&&d.current?.focus()},[s]);let f=(0,O.useCallback)(()=>{u(e),c(!0)},[e]),p=(0,O.useCallback)(()=>{let t=l.trim();t&&t!==e&&o(t),c(!1)},[l,e,o]),m=(0,O.useCallback)(()=>{c(!1),u(e)},[e]);return(0,L.jsxs)(`div`,{className:I(`group flex items-center gap-1.5 rounded-md border border-border/50`,`bg-secondary/50 px-2 py-1 text-sm animate-fade-in`),children:[s?(0,L.jsx)(`input`,{ref:d,type:`text`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&p(),e.key===`Escape`&&m()},onBlur:p,className:I(`min-w-0 flex-1 bg-transparent text-sm`,`focus:outline-none`)}):(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground/80`,children:e}),(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 opacity-60 group-hover:opacity-100`,children:[s?(0,L.jsx)(Uc,{label:`Confirm edit`,onClick:p,children:(0,L.jsx)(he,{className:`h-3 w-3`})}):(0,L.jsx)(Uc,{label:`Edit`,onClick:f,children:(0,L.jsx)(ht,{className:`h-3 w-3`})}),(0,L.jsx)(Uc,{label:`Move up`,onClick:r,disabled:t,children:(0,L.jsx)(A,{className:`h-3 w-3`})}),(0,L.jsx)(Uc,{label:`Move down`,onClick:i,disabled:n,children:(0,L.jsx)(ie,{className:`h-3 w-3`})}),(0,L.jsx)(Uc,{label:`Remove`,onClick:a,destructive:!0,children:(0,L.jsx)(qt,{className:`h-3 w-3`})})]})]})}function Uc({label:e,onClick:t,disabled:n,destructive:r,children:i}){return(0,L.jsx)(`button`,{type:`button`,onClick:t,disabled:n,"aria-label":e,title:e,className:I(`flex h-5 w-5 items-center justify-center rounded`,`transition-colors`,n?`cursor-not-allowed opacity-30`:r?`hover:bg-destructive/20 hover:text-destructive`:`hover:bg-accent hover:text-accent-foreground`),children:i})}function Wc({sessionId:e,setText:t,onNavigate:n,onSessionEnded:r,onToast:i}){return{handleControl:(0,O.useCallback)(async(a,o,s=0)=>{switch(a.kind){case`continue`:return!0;case`clear`:return!0;case`exit`:return r?.(),i?.(`Session ended. Select or create a session from the sidebar.`),!0;case`navigate`:return n?.(a.sessionId),!0;case`prefill`:return t(a.message),!1;case`submit`:return await V(`/api/sessions/${e}/prompt`,{method:`POST`,body:JSON.stringify({text:a.message})}),!0;case`rerun`:return s>=3?(i?.(`Command rerun limit reached`),!0):(await V(`/api/sessions/${e}/commands`,{method:`POST`,body:JSON.stringify({input:a.input})}),!0);case`forward`:return await V(`/api/sessions/${e}/prompt`,{method:`POST`,body:JSON.stringify({text:o})}),!0;default:return!0}},[e,t,n,r,i])}}var Gc=100,Kc=new Map;function qc(e){let t=Kc.get(e);return t||(t=[],Kc.set(e,t)),t}function Jc(e){let t=(0,O.useRef)(-1),n=(0,O.useRef)(``),r=(0,O.useRef)(e);return r.current!==e&&(r.current=e,t.current=-1,n.current=``),{push:(0,O.useCallback)(n=>{let r=n.trim();if(!r)return;let i=qc(e);i.length>0&&i[i.length-1]===r||(i.push(r),i.length>Gc&&i.splice(0,i.length-Gc),t.current=-1)},[e]),navigate:(0,O.useCallback)((r,i,a)=>{if(r===`ArrowUp`){let e=i.indexOf(`
|
|
50
|
+
`);if(!(e===-1||a<=e))return null}let o=qc(e);if(o.length===0)return null;if(r===`ArrowUp`){if(t.current===-1)n.current=i,t.current=o.length-1;else if(t.current>0)--t.current;else return o[0]??null;return o[t.current]??null}return t.current===-1?null:t.current<o.length-1?(t.current+=1,o[t.current]??null):(t.current=-1,n.current)},[e])}}var Yc=`afk:draft:`;function Xc(e){return`${Yc}${e}`}function Zc(e){let t=(0,O.useCallback)(()=>{try{return localStorage.getItem(Xc(e))??``}catch{return``}},[e]),n=(0,O.useCallback)(t=>{try{t?localStorage.setItem(Xc(e),t):localStorage.removeItem(Xc(e))}catch{}},[e]),r=(0,O.useCallback)(()=>{try{localStorage.removeItem(Xc(e))}catch{}},[e]);return(0,O.useEffect)(()=>{try{let t=`${Xc(e)}:ts`,n=localStorage.getItem(t);n?Date.now()-Number(n)>6048e5&&(localStorage.removeItem(Xc(e)),localStorage.removeItem(t)):localStorage.setItem(t,String(Date.now()))}catch{}},[e]),{load:t,save:n,clear:r}}var Qc=new Set;function $c(){if(Qc.size===0)return!1;for(let e of Qc)e();return!0}function el(e,t){let[n,r]=(0,O.useState)(null);(0,O.useEffect)(()=>{let e=()=>r(Date.now());return Qc.add(e),()=>{Qc.delete(e)}},[]),(0,O.useEffect)(()=>{if(n===null)return;if(Date.now()-n>1e4){r(null);return}let i=e.current;t&&i&&!i.disabled&&(i.focus(),r(null))},[n,t,e])}var tl=null;function nl(){tl=null}async function rl(){return tl||(tl=(await V(`/api/commands`)).commands,tl)}function il(e,t){return t!==void 0&&al(e.trimStart().split(/\s+/)[0]??``)===al(t)}function al(e){return e.startsWith(`/`)?e:`/${e}`}function ol(e,t){let n=al(t);return e.find(e=>al(e.name)===n)}function sl(e){return e.startsWith(`/`)&&e.indexOf(` `)===-1?e.slice(1):null}function cl(e,t){if(!(e instanceof Oc))return String(e);let n=e.body,r=typeof n?.error==`string`?n.error:``;if(r===`command_gated`)return(typeof n?.reason==`string`?n.reason:``)||(typeof n?.message==`string`?n.message:e.message);if(r===`unknown_command`){let e=typeof n?.suggestion==`string`?n.suggestion:``;return e?`Unknown command ${t}. Did you mean ${e}?`:`Unknown command ${t}.`}return r===`session_busy`?`Session is busy — try again when the turn finishes.`:typeof n?.message==`string`?n.message:e.message}function ll({sessionId:e,sessionMode:t,isBusy:n,queue:r,onModelSelect:i,currentModel:a,onCommandOutput:o,onCommandStart:s,onPromptSent:c,onToast:l,onNavigate:u,onSessionEnded:d,suggestions:f,prefill:p}){let m=Zc(e),[h,g]=(0,O.useState)(()=>m.load()),[_,v]=(0,O.useState)(!1),[y,b]=(0,O.useState)([]),[x,S]=(0,O.useState)(0),C=(0,O.useRef)(null),w=(0,O.useRef)({active:!0}),T=Jc(e);(0,O.useEffect)(()=>{let e={active:!0};return w.current=e,g(m.load()),()=>{e.active=!1}},[e]),(0,O.useEffect)(()=>{p&&(g(p.text),C.current?.focus())},[p]),(0,O.useEffect)(()=>{m.save(h)},[h,m]);let E=t===`readonly`;el(C,!E&&!_);let D=sl(h),ee=D!==null&&(y?.length??0)>0,te=ee?y.filter(e=>xc(e.name,D)).slice(0,8):[];(0,O.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&nl()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),(0,O.useEffect)(()=>{let e=C.current;if(!e)return;e.style.height=`auto`;let t=(parseInt(getComputedStyle(e).lineHeight)||20)*5;e.style.height=`${Math.min(e.scrollHeight,t)}px`},[h]),(0,O.useEffect)(()=>{if(D!==null){let e=!1;return rl().then(t=>{e||b(t??[])}).catch(()=>void 0),()=>{e=!0}}},[D]);let ne=(0,O.useCallback)(async t=>{c?.(),await V(`/api/sessions/${e}/prompt`,{method:`POST`,body:JSON.stringify({text:t})})},[e,c]),{handleControl:k}=Wc({sessionId:e,setText:g,onNavigate:u,onSessionEnded:d,onToast:l}),re=(0,O.useCallback)(async(t,n=0)=>{let r=w.current;s?.(t);let a=await V(`/api/sessions/${e}/commands`,{method:`POST`,body:JSON.stringify({input:t})});return r.active?(o?.(t,a),a.session?.model&&i?.(a.session.model),k(a.control,t,n)):!1},[e,s,o,i,k]),ie=(0,O.useCallback)(async e=>{if(!(E||_||n||e===a)){v(!0);try{await re(`/model ${e}`)}catch(e){l?.(cl(e,`/model`))}finally{v(!1)}}},[E,_,n,a,re,l]),ae=(0,O.useCallback)(async e=>{let t=(e??h).trim();if(!(!t||_||E)){v(!0);try{if(t.startsWith(`/`)){let e=await rl(),i=t.split(/\s+/)[0];jc(i);let a=ol(e,i);if(a?.kind===`skill`){n&&r?r.enqueue(t):await ne(t),T.push(t),g(``),m.clear();return}if(a?.kind===`native`&&a.web===`gated`){let e=a.gateReason??`${al(a.name)} is not available on the web surface`;l?l(e):console.warn(`[composer] gated command dismissed:`,e);return}try{await re(t)&&(T.push(t),g(``),m.clear())}catch(e){l?.(cl(e,i))}return}await ne(t),T.push(t),g(``),m.clear()}catch{}finally{v(!1)}}},[h,_,E,ne,re,l,T,m,n,r]),A=(0,O.useCallback)(async()=>{try{await V(`/api/sessions/${e}/interrupt`,{method:`POST`})}catch{}},[e]),oe=(0,O.useCallback)(e=>{jc(e),g(`${bc(e)} `),S(0),C.current?.focus()},[]),se=(0,O.useCallback)(e=>{if(e.key===`Escape`&&n)e.preventDefault(),A();else if(e.key===`.`&&(e.metaKey||e.ctrlKey)&&n)e.preventDefault(),A();else if(Ic(e,ee,te.length,x,S,e=>{let t=te[e];t&&oe(t.name)},()=>g(e=>e),il(h,te[x]?.name)))e.preventDefault();else{if(!ee&&(e.key===`ArrowUp`||e.key===`ArrowDown`)){let t=C.current?.selectionStart??0,n=T.navigate(e.key,h,t);if(n!==null){e.preventDefault(),g(n),requestAnimationFrame(()=>{let e=C.current;e&&e.setSelectionRange(e.value.length,e.value.length)});return}}if(e.key===`Enter`&&!e.shiftKey){if(e.preventDefault(),n&&r){let e=h.trim();e&&(r.enqueue(e),g(``),m.clear())}else ae()}}},[ee,te,x,oe,ae,n,h,r,A,T,m]),ce=(0,O.useCallback)(e=>{let t=C.current;if(!t){g(t=>t+` `+e+` `);return}let n=t.selectionStart??t.value.length,r=t.selectionEnd??n,i=t.value.slice(0,n),a=t.value.slice(r),o=i.length>0&&!/\s$/.test(i)?` `:``,s=i+o+e+` `+a;g(s),requestAnimationFrame(()=>{let r=n+o.length+e.length+1;t.setSelectionRange(r,r),t.focus()})},[]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`pointer-events-none h-8 bg-gradient-to-t from-background/80 to-transparent`}),(0,L.jsxs)(`div`,{className:I(`relative flex flex-col gap-2`,`border-t border-border/50 px-4 py-3`,`backdrop-blur-xl bg-background/80`,`shadow-[0_-4px_16px_-4px_rgba(0,0,0,0.1)]`,E&&`opacity-50`),children:[r&&(0,L.jsx)(Vc,{queue:r}),f&&f.length>0&&!h&&!n&&(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:f.map(e=>(0,L.jsx)(`button`,{type:`button`,onClick:()=>void ae(e),className:I(`rounded-full border border-border px-2.5 py-0.5 text-xs`,`text-muted-foreground hover:text-foreground hover:bg-secondary`,`transition-colors`),children:e},e))}),(0,L.jsx)(Fc,{query:D??``,commands:y,onSelect:oe,visible:ee}),(0,L.jsxs)(`div`,{className:I(`grid gap-x-2 gap-y-1.5`,`[grid-template-areas:"ta_btn"_"bar_bar"]`,`[grid-template-columns:1fr_auto]`,`sm:[grid-template-areas:"bar_ta_btn"]`,`sm:[grid-template-columns:auto_1fr_auto]`),children:[(0,L.jsx)(`textarea`,{ref:C,rows:1,"data-testid":`composer-textarea`,value:h,disabled:E||_,onChange:e=>g(e.target.value),onKeyDown:se,placeholder:E?`Read-only session`:n?`Running… (Esc or ⌘. to stop, Enter to queue)`:`Send a message… (/ for commands)`,className:I(`[grid-area:ta] self-end`,`w-full resize-none rounded-xl border border-input bg-background`,`px-3 py-2 text-sm leading-5 shadow-sm`,`placeholder:text-muted-foreground`,`focus:outline-none focus:ring-2 focus:ring-ring`,`disabled:cursor-not-allowed`)}),n?(0,L.jsx)(`button`,{onClick:()=>void A(),title:`Stop (Esc or ⌘.)`,className:`[grid-area:btn] self-end shrink-0 flex items-center justify-center h-9 w-9 rounded-lg bg-destructive text-destructive-foreground hover:bg-destructive/90 transition-colors`,children:(0,L.jsx)(zt,{className:`h-4 w-4 fill-current`})}):(0,L.jsx)(`button`,{onClick:()=>void ae(),disabled:!h.trim()||_||E,title:`Send`,className:I(`[grid-area:btn] self-end shrink-0 flex items-center justify-center h-9 w-9 rounded-lg`,`bg-primary text-primary-foreground hover:bg-primary/90 transition-colors`,`disabled:opacity-40 disabled:cursor-not-allowed`),children:(0,L.jsx)(kt,{className:`h-4 w-4`})}),(0,L.jsxs)(`div`,{className:`[grid-area:bar] flex shrink-0 items-center gap-1 self-end`,children:[(0,L.jsx)(Rc,{onInsert:ce}),i&&(0,L.jsx)(Bc,{onSelect:e=>void ie(e),current:a,disabled:E||_||n})]})]})]})]})}var ul=I(`flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-sm`,`text-popover-foreground transition-colors`,`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground`),dl=`px-2 [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group-heading]]:text-foreground/70`;function fl({onNavigate:e,sessions:t=[],onSelectSession:n,onInsertCommand:r}){let[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)([]),c=(0,O.useRef)(null);(0,O.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),a(e=>(e||(c.current=document.activeElement instanceof HTMLElement?document.activeElement:null),!e)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,O.useEffect)(()=>{if(!i||!r)return;let e=!1;return rl().then(t=>{e||s(t??[])}).catch(()=>void 0),()=>{e=!0}},[i,r]);let l=(0,O.useCallback)(e=>{if(a(!1),!e)return;let t=c.current;setTimeout(()=>{t?.isConnected&&t.focus()},0)},[]);if(!i)return null;let u=o.filter(e=>e.web!==`gated`);return(0,L.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center px-3 pt-[15vh]`,onClick:()=>l(!0),"data-testid":`command-palette`,children:[(0,L.jsx)(`div`,{className:`absolute inset-0 bg-black/50 backdrop-blur-sm`,"aria-hidden":!0}),(0,L.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,className:I(`relative z-10 w-full max-w-lg rounded-xl border border-border`,`bg-popover text-popover-foreground shadow-2xl`,`overflow-hidden`),onClick:e=>e.stopPropagation(),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),l(!0))},children:(0,L.jsxs)(ic,{filter:vc,loop:!0,label:`Command palette`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-4 py-3`,children:[(0,L.jsxs)(`svg`,{className:`h-4 w-4 shrink-0 text-muted-foreground`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":!0,children:[(0,L.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,L.jsx)(`path`,{d:`m21 21-4.35-4.35`})]}),(0,L.jsx)(ic.Input,{autoFocus:!0,placeholder:`Search sessions, commands, views…`,className:I(`flex-1 bg-transparent text-sm outline-none`,`placeholder:text-muted-foreground`)}),(0,L.jsx)(`kbd`,{className:`hidden rounded border border-border px-1.5 py-0.5 text-xs text-muted-foreground sm:inline-block`,children:`ESC`})]}),(0,L.jsxs)(ic.List,{className:`max-h-[min(60vh,24rem)] overflow-y-auto py-2`,children:[(0,L.jsx)(ic.Empty,{className:`py-6 text-center text-sm text-muted-foreground`,children:`No results found.`}),t.length>0&&(0,L.jsx)(ic.Group,{heading:`Sessions`,className:dl,children:t.map(e=>{let t=Or(e,e.mode===`live`?`New session`:`Untitled session`);return(0,L.jsxs)(ic.Item,{value:`session:${e.id}`,keywords:[t,e.model??``],onSelect:()=>{l(!1),n?.(e.id)},className:ul,children:[(0,L.jsx)(at,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),e.model&&(0,L.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:e.model})]},e.id)})}),r&&u.length>0&&(0,L.jsx)(ic.Group,{heading:`Commands`,className:dl,children:u.map(e=>{let t=bc(e.name);return(0,L.jsxs)(ic.Item,{value:`command:${e.name}`,keywords:[t,e.summary],onSelect:()=>{l(!1),r(`${t} `)},className:ul,children:[(0,L.jsx)(Lt,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,L.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:t}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-muted-foreground`,children:e.summary})]},e.name)})}),(0,L.jsx)(ic.Group,{heading:`Navigation`,className:dl,children:Fr().map(({id:t,label:n,title:r,icon:i})=>(0,L.jsxs)(ic.Item,{value:`nav:${t}`,keywords:[n,r],onSelect:()=>{l(!1),e(t)},className:ul,children:[(0,L.jsx)(i,{className:`h-4 w-4 text-muted-foreground`}),n]},t))})]})]})})]})}var pl={1:`sessions`,2:`memory`,3:`schedules`,4:`jobs`};function ml({onNavigate:e}){return(0,O.useEffect)(()=>{function t(t){if(!(t.metaKey||t.ctrlKey))return;let n=pl[t.key];n&&(t.preventDefault(),e(n))}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e]),null}function hl(){return(0,L.jsx)(`span`,{className:`text-muted-foreground/40`,"aria-hidden":!0,children:`·`})}function gl({label:e,value:t}){return(0,L.jsxs)(`span`,{className:`flex items-baseline gap-1`,children:[(0,L.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:e}),(0,L.jsx)(`span`,{className:`font-mono text-xs text-foreground`,children:t})]})}function _l(e){if(e<1e3)return`${e}ms`;let t=e/1e3;return t<60?`${t.toFixed(1)}s`:`${Math.floor(t/60)}m ${Math.round(t%60)}s`}function vl(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function yl({totals:e,className:t}){if(!e||e.costUsd===0&&e.durationMs===0&&e.turns===0)return null;let n=(e.inputTokens??0)+(e.outputTokens??0)+(e.cacheReadTokens??0),r=[];return e.turns>0&&r.push((0,L.jsx)(gl,{label:`turns`,value:String(e.turns)},`turns`)),e.costUsd>0&&(r.length>0&&r.push((0,L.jsx)(hl,{},`sep-cost`)),r.push((0,L.jsx)(gl,{label:`cost`,value:`$${e.costUsd.toFixed(4)}`},`cost`))),n>0&&(r.length>0&&r.push((0,L.jsx)(hl,{},`sep-tok`)),r.push((0,L.jsx)(gl,{label:`tokens`,value:vl(n)},`tokens`))),e.durationMs>0&&(r.length>0&&r.push((0,L.jsx)(hl,{},`sep-dur`)),r.push((0,L.jsx)(gl,{label:`duration`,value:_l(e.durationMs)},`duration`))),r.length===0?null:(0,L.jsx)(`div`,{className:I(`flex flex-nowrap items-center gap-2 whitespace-nowrap`,t),children:r})}var bl={preference:`Preference`,convention:`Convention`,decision:`Decision`,learning:`Learning`};function xl({type:e}){return(0,L.jsx)(`span`,{className:I(`inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium`,e===`fact`?`bg-blue-500/15 text-blue-400`:e===`session`?`bg-emerald-500/15 text-emerald-400`:`bg-violet-500/15 text-violet-400`),children:e})}function Sl({category:e}){return e?(0,L.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium bg-zinc-700 text-zinc-300`,children:bl[e]??e}):null}function Cl({result:e}){let t=e.content.length>200?e.content.slice(0,200)+`…`:e.content,n=e.created_at?new Date(e.created_at).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}):null;return(0,L.jsxs)(`div`,{className:`rounded-lg border border-zinc-800 bg-zinc-900 p-3 space-y-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,L.jsx)(xl,{type:e.type}),(0,L.jsx)(Sl,{category:e.category}),n&&(0,L.jsx)(`span`,{className:`text-xs text-zinc-500 ml-auto`,children:n})]}),(0,L.jsx)(`p`,{className:`text-sm text-zinc-300 leading-relaxed whitespace-pre-wrap break-words`,children:t})]})}function wl({pct:e,truncated:t}){let n=Math.min(e,100);return(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`div`,{className:`flex-1 h-2 rounded-full bg-zinc-800 overflow-hidden`,children:(0,L.jsx)(`div`,{className:I(`h-full rounded-full transition-all`,e>=100?`bg-red-500`:e>=80?`bg-amber-400`:`bg-accent`),style:{width:`${n}%`}})}),t&&(0,L.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium bg-amber-400/15 text-amber-400`,children:`Truncated`})]})}function Tl({hot:e}){if(!e)return null;let{content:t,usage:n}=e;return(0,L.jsxs)(`section`,{className:`space-y-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-semibold text-zinc-200`,children:`HOT Memory`}),(0,L.jsxs)(`span`,{className:`text-xs text-zinc-500`,children:[n.tokens.toLocaleString(),` / `,n.maxTokens.toLocaleString(),` tokens`]})]}),(0,L.jsx)(wl,{pct:n.pct,truncated:n.truncated}),t?(0,L.jsx)(`pre`,{className:`rounded-md border border-zinc-800 bg-zinc-950 p-3 text-xs text-zinc-300 font-mono overflow-x-auto whitespace-pre-wrap max-h-48`,children:t}):(0,L.jsx)(`p`,{className:`text-xs text-zinc-500 italic`,children:`No hot memory loaded.`})]})}var El=[{value:``,label:`All Categories`},{value:`preference`,label:`Preference`},{value:`convention`,label:`Convention`},{value:`decision`,label:`Decision`},{value:`learning`,label:`Learning`}];function Dl(){let[e,t]=(0,O.useState)(null),[n,r]=(0,O.useState)(``),[i,a]=(0,O.useState)(``),[o,s]=(0,O.useState)(null),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.useState)(null);(0,O.useEffect)(()=>{V(`/api/memory/hot`).then(t).catch(()=>{})},[]);let f=(0,O.useCallback)(async e=>{e.preventDefault(),l(!0),d(null);try{let e=new URLSearchParams({q:n,limit:`20`});i&&e.set(`category`,i);let t=await V(`/api/memory/search?${e.toString()}`);s(t.results)}catch(e){d(e instanceof Error?e.message:`Search failed`)}finally{l(!1)}},[n,i]);return(0,L.jsxs)(`div`,{className:`flex flex-col gap-6 p-4`,children:[(0,L.jsx)(Tl,{hot:e}),(0,L.jsxs)(`section`,{className:`space-y-3`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-semibold text-zinc-200`,children:`Search Memory`}),(0,L.jsxs)(`form`,{onSubmit:f,className:`flex gap-2 flex-wrap`,children:[(0,L.jsx)(`input`,{type:`text`,value:n,onChange:e=>r(e.target.value),placeholder:`FTS5 query…`,className:`flex-1 min-w-0 rounded-md border border-zinc-700 bg-zinc-900 px-3 py-1.5 text-sm text-zinc-100 placeholder-zinc-500 focus:outline-none focus:ring-1 focus:ring-accent`}),(0,L.jsx)(`select`,{value:i,onChange:e=>a(e.target.value),className:`rounded-md border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-100 focus:outline-none focus:ring-1 focus:ring-accent`,children:El.map(e=>(0,L.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,L.jsx)(`button`,{type:`submit`,disabled:c,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-50 hover:opacity-90 transition-opacity`,children:c?`Searching…`:`Search`})]}),u&&(0,L.jsx)(`p`,{className:`text-xs text-red-400`,children:u}),o!==null&&(0,L.jsx)(`div`,{className:`space-y-2`,children:o.length===0?(0,L.jsx)(`p`,{className:`text-sm text-zinc-500 italic text-center py-6`,children:`No results found.`}):o.map(e=>(0,L.jsx)(Cl,{result:e},`${e.type}-${e.created_at}-${e.content.slice(0,32)}`))})]})]})}var Ol={success:{label:`Success`,className:`bg-status-done/20 text-status-done border-status-done/30`},error:{label:`Error`,className:`bg-status-failed/20 text-status-failed border-status-failed/30`},skipped:{label:`Skipped`,className:`bg-muted text-muted-foreground border-border`}};function kl(e){if(e<1e3)return`${e}ms`;let t=Math.floor(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function Al(e){return new Date(e).toLocaleString(`en-US`,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function jl({schedule:e,onClose:t}){let[n,r]=(0,O.useState)([]),[i,a]=(0,O.useState)(!0),[o,s]=(0,O.useState)(null);return(0,O.useEffect)(()=>{let t=!1;return a(!0),s(null),V(`/api/schedules/${e.id}/history`).then(e=>{t||r(e.history)}).catch(e=>{t||s(e instanceof Error?e.message:`Failed to load history`)}).finally(()=>{t||a(!1)}),()=>{t=!0}},[e.id]),(0,O.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,L.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4`,onClick:e=>{e.target===e.currentTarget&&t()},children:(0,L.jsxs)(`div`,{className:`flex max-h-[80vh] w-full max-w-lg flex-col rounded-xl border border-border bg-card shadow-xl`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-5 py-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-sm font-semibold`,children:e.name}),(0,L.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-muted-foreground`,children:e.cron})]}),(0,L.jsx)(`button`,{onClick:t,className:`flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,"aria-label":`Close`,children:`✕`})]}),(0,L.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-5 py-3`,children:[i&&(0,L.jsx)(`p`,{className:`py-8 text-center text-sm text-muted-foreground`,children:`Loading history…`}),o&&(0,L.jsx)(`p`,{className:`py-8 text-center text-sm text-status-failed`,children:o}),!i&&!o&&n.length===0&&(0,L.jsx)(`p`,{className:`py-8 text-center text-sm text-muted-foreground`,children:`No runs recorded yet.`}),!i&&!o&&n.length>0&&(0,L.jsx)(`ul`,{className:`space-y-2`,children:n.map((e,t)=>{let n=Ol[e.status];return(0,L.jsxs)(`li`,{className:`flex items-start gap-3 rounded-lg border border-border bg-background/50 px-4 py-3`,children:[(0,L.jsx)(`span`,{className:I(`mt-0.5 shrink-0 rounded-full border px-2 py-0.5 text-xs font-medium`,n.className),children:n.label}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:Al(e.triggeredAt)}),(0,L.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:kl(e.durationMs)})]}),e.errorMessage&&(0,L.jsx)(`p`,{className:`mt-1 truncate font-mono text-xs text-status-failed`,children:e.errorMessage})]})]},`${e.taskId}-${e.triggeredAt}-${t}`)})})]})]})})}function Ml({status:e}){return e?(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`span`,{className:I(`size-2 rounded-full`,e.running?`animate-pulse bg-status-done`:`bg-status-failed`)}),(0,L.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.running?`Running${e.tasks==null?``:` (${e.tasks} task${e.tasks===1?``:`s`})`}`:`Stopped`})]}):null}function Nl({checked:e,onChange:t,disabled:n}){return(0,L.jsx)(`button`,{role:`switch`,"aria-checked":e,onClick:e=>{e.stopPropagation(),t()},disabled:n,className:I(`relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent`,`transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e?`bg-brand`:`bg-muted`),children:(0,L.jsx)(`span`,{className:I(`block size-4 rounded-full bg-white shadow transition-transform`,e?`translate-x-4`:`translate-x-0`)})})}function Pl({schedule:e,onToggle:t,onDelete:n,onShowHistory:r}){let[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(!1),c=async()=>{a(!0),await t(e.id).finally(()=>a(!1))},l=async t=>{t.stopPropagation(),window.confirm(`Delete schedule "${e.name}"? This cannot be undone.`)&&(s(!0),await n(e.id).finally(()=>s(!1)))},u=e.trigger===`both`?`cron + session start`:e.trigger??`cron`;return(0,L.jsxs)(`div`,{className:I(`group flex cursor-pointer flex-col gap-3 rounded-xl border border-border bg-card p-4`,`transition-colors hover:border-brand/40 hover:bg-accent/30`,!e.enabled&&`opacity-60`),onClick:()=>r(e),children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`p`,{className:`truncate text-sm font-semibold`,children:e.name}),(0,L.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-muted-foreground`,children:e.cron})]}),(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,L.jsx)(Nl,{checked:e.enabled,onChange:()=>{c()},disabled:i}),(0,L.jsx)(`button`,{onClick:l,disabled:o,"aria-label":`Delete schedule ${e.name}`,className:I(`flex size-7 items-center justify-center rounded-md text-muted-foreground`,`opacity-0 transition-opacity group-hover:opacity-100`,`hover:bg-destructive/20 hover:text-status-failed`,`disabled:cursor-not-allowed disabled:opacity-40`),children:`🗑`})]})]}),(0,L.jsx)(`code`,{className:`block truncate rounded-md bg-secondary px-3 py-2 font-mono text-xs text-secondary-foreground`,children:e.command}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 capitalize`,children:u}),e.notifyOn&&e.notifyOn!==`never`&&(0,L.jsxs)(`span`,{className:`rounded bg-muted px-1.5 py-0.5`,children:[`notify: `,e.notifyOn]}),(0,L.jsx)(`span`,{className:`ml-auto`,children:`Click for history`})]})]})}var Fl={name:``,command:``,cron:``,trigger:`cron`,notifyOn:`failure`,enabled:!0};function Il({onCreated:e,onCancel:t}){let[n,r]=(0,O.useState)(Fl),[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(null),c=async t=>{if(t.preventDefault(),s(null),!n.name.trim())s(`Name is required.`);else if(!n.command.trim())s(`Command is required.`);else if(!n.cron.trim())s(`Cron expression is required.`);else{a(!0);try{let t=await V(`/api/schedules`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});e(t.schedule,t.syncNote)}catch(e){s(e instanceof Error?e.message:`Failed to create schedule.`)}finally{a(!1)}}},l=(e,t)=>(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:e}),t]}),u=I(`h-8 rounded-md border border-border bg-card px-3 text-sm`,`placeholder:text-muted-foreground/50`,`focus:outline-none focus:ring-2 focus:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`);return(0,L.jsxs)(`form`,{onSubmit:e=>{c(e)},className:`flex flex-col gap-4 rounded-xl border border-brand/40 bg-card p-4`,children:[(0,L.jsx)(`p`,{className:`text-sm font-semibold`,children:`New Schedule`}),(0,L.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[l(`Name *`,(0,L.jsx)(`input`,{type:`text`,className:u,placeholder:`e.g. Nightly cleanup`,value:n.name,onChange:e=>r(t=>({...t,name:e.target.value})),required:!0,disabled:i})),l(`Cron expression *`,(0,L.jsx)(`input`,{type:`text`,className:I(u,`font-mono`),placeholder:`0 2 * * *`,value:n.cron,onChange:e=>r(t=>({...t,cron:e.target.value})),required:!0,disabled:i}))]}),l(`Command *`,(0,L.jsx)(`input`,{type:`text`,className:I(u,`font-mono`),placeholder:`/my-skill --auto`,value:n.command,onChange:e=>r(t=>({...t,command:e.target.value})),required:!0,disabled:i})),(0,L.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[l(`Trigger`,(0,L.jsxs)(`select`,{className:u,value:n.trigger,onChange:e=>r(t=>({...t,trigger:e.target.value})),disabled:i,children:[(0,L.jsx)(`option`,{value:`cron`,children:`cron`}),(0,L.jsx)(`option`,{value:`sessionstart`,children:`session start`}),(0,L.jsx)(`option`,{value:`both`,children:`both`})]})),l(`Notify on`,(0,L.jsxs)(`select`,{className:u,value:n.notifyOn,onChange:e=>r(t=>({...t,notifyOn:e.target.value})),disabled:i,children:[(0,L.jsx)(`option`,{value:`failure`,children:`failure`}),(0,L.jsx)(`option`,{value:`always`,children:`always`}),(0,L.jsx)(`option`,{value:`never`,children:`never`})]})),(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:`Enabled`}),(0,L.jsx)(`div`,{className:`flex h-8 items-center`,children:(0,L.jsx)(Nl,{checked:n.enabled,onChange:()=>r(e=>({...e,enabled:!e.enabled})),disabled:i})})]})]}),o&&(0,L.jsx)(`p`,{className:`rounded-md border border-status-failed/30 bg-status-failed/10 px-3 py-2 text-xs text-status-failed`,children:o}),(0,L.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:t,disabled:i,className:I(`h-8 rounded-md px-3 text-sm text-muted-foreground`,`hover:bg-accent hover:text-foreground`,`disabled:cursor-not-allowed disabled:opacity-50`),children:`Cancel`}),(0,L.jsx)(`button`,{type:`submit`,disabled:i,className:I(`h-8 rounded-md bg-brand px-4 text-sm font-medium text-white`,`hover:bg-brand/90`,`disabled:cursor-not-allowed disabled:opacity-50`),children:i?`Creating…`:`Create`})]})]})}function Ll(){let[e,t]=(0,O.useState)([]),[n,r]=(0,O.useState)(null),[i,a]=(0,O.useState)(!0),[o,s]=(0,O.useState)(null),[c,l]=(0,O.useState)(null),[u,d]=(0,O.useState)(!1),[f,p]=(0,O.useState)(null);(0,O.useEffect)(()=>{let e=!1;return a(!0),s(null),Promise.all([V(`/api/schedules`),V(`/api/daemon/status`)]).then(([n,i])=>{e||(t(n.schedules),r(i))}).catch(t=>{e||s(t instanceof Error?t.message:`Failed to load schedules`)}).finally(()=>{e||a(!1)}),()=>{e=!0}},[]);let m=(0,O.useCallback)(async e=>{let n=await V(`/api/schedules/${e}/toggle`,{method:`POST`});t(t=>t.map(t=>t.id===e?{...t,enabled:n.enabled}:t)),n.syncNote&&(p(n.syncNote),setTimeout(()=>p(null),8e3))},[]),h=(0,O.useCallback)(async e=>{await V(`/api/schedules/${e}`,{method:`DELETE`}),t(t=>t.filter(t=>t.id!==e))},[]),g=(0,O.useCallback)((e,n)=>{t(t=>[...t,e]),d(!1),n&&(p(n),setTimeout(()=>p(null),8e3))},[]);return i?(0,L.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading schedules…`})}):(0,L.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4 overflow-y-auto p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`h1`,{className:`text-base font-semibold`,children:`Schedules`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(Ml,{status:n}),(0,L.jsx)(`button`,{onClick:()=>d(e=>!e),className:I(`h-7 rounded-md px-3 text-xs font-medium`,u?`bg-muted text-muted-foreground hover:bg-muted/80`:`bg-brand text-white hover:bg-brand/90`),children:u?`Cancel`:`+ New Schedule`})]})]}),u&&(0,L.jsx)(Il,{onCreated:g,onCancel:()=>d(!1)}),f&&(0,L.jsx)(`p`,{className:`rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-4 py-3 text-sm text-yellow-700 dark:text-yellow-400`,children:f}),o&&(0,L.jsx)(`p`,{className:`rounded-lg border border-status-failed/30 bg-status-failed/10 px-4 py-3 text-sm text-status-failed`,children:o}),!o&&e.length===0&&!u&&(0,L.jsx)(`p`,{className:`mt-8 text-center text-sm text-muted-foreground`,children:`No schedules configured.`}),(0,L.jsx)(`div`,{className:`grid gap-3`,children:e.map(e=>(0,L.jsx)(Pl,{schedule:e,onToggle:m,onDelete:h,onShowHistory:l},e.id))}),c&&(0,L.jsx)(jl,{schedule:c,onClose:()=>l(null)})]})}function Rl(e,t){let n=(t??Date.now())-e;if(n<1e3)return`${n}ms`;let r=Math.floor(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60);return i<60?`${i}m ${r%60}s`:`${Math.floor(i/60)}h ${i%60}m`}function zl(e){let t=Math.floor((Date.now()-e)/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function Bl(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}var Vl={running:`bg-green-500/20 text-green-400 border border-green-500/30`,completed:`bg-blue-500/20 text-blue-400 border border-blue-500/30`,failed:`bg-red-500/20 text-red-400 border border-red-500/30`,cancelled:`bg-neutral-500/20 text-neutral-400 border border-neutral-500/30`};function Hl(e){return e.status!==`running`}function Ul({status:e}){return(0,L.jsxs)(`span`,{className:I(`inline-flex items-center gap-1.5 rounded px-1.5 py-0.5 text-xs font-medium`,Vl[e]),children:[e===`running`&&(0,L.jsx)(`span`,{className:`size-1.5 rounded-full bg-green-400 animate-pulse`}),e]})}function Wl({job:e,now:t}){let[n,r]=(0,O.useState)(!1),i=Rl(e.startedAt,e.status===`running`?t:e.endedAt),a=zl(e.startedAt);return(0,L.jsxs)(`div`,{className:`rounded-lg border border-neutral-800 bg-neutral-900 overflow-hidden`,children:[(0,L.jsxs)(`div`,{role:`button`,tabIndex:0,onClick:()=>r(e=>!e),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r(e=>!e))},className:`w-full text-left px-4 py-3 flex flex-col gap-2 hover:bg-neutral-800/50 transition-colors cursor-pointer`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,L.jsx)(n?_e:ye,{className:`size-3.5 shrink-0 text-neutral-500`}),(0,L.jsx)(`span`,{className:`text-sm font-medium text-neutral-100 truncate`,children:e.label||e.jobId})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,L.jsx)(Ul,{status:e.status}),e.status===`running`&&(0,L.jsx)(`button`,{type:`button`,disabled:!0,title:`Cancel from the owning session with /bgsub:cancel ${e.jobId}${e.ownerPid===void 0?``:` (owner PID: ${e.ownerPid})`}`,"aria-label":`Cancel job ${e.jobId} — use /bgsub:cancel from the owning session`,className:I(`flex items-center gap-1 rounded px-1.5 py-0.5 text-xs`,`text-neutral-600 cursor-not-allowed opacity-40`),children:`Cancel`})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-neutral-500 pl-5`,children:[(0,L.jsx)(`span`,{className:`font-mono bg-neutral-800 rounded px-1.5 py-0.5 text-neutral-300`,children:Bl(e.model)}),(0,L.jsx)(`span`,{children:i}),(0,L.jsx)(`span`,{children:a})]}),(e.status===`failed`||e.status===`cancelled`)&&e.stopReason&&(0,L.jsxs)(`div`,{className:`pl-5 text-xs text-neutral-500`,children:[(0,L.jsx)(`span`,{className:`text-neutral-600`,children:`reason:`}),` `,(0,L.jsx)(`span`,{className:`font-mono text-neutral-400 line-clamp-2`,title:e.stopReason,children:e.stopReason})]})]}),n&&(0,L.jsxs)(`div`,{className:`border-t border-neutral-800 px-4 py-3 bg-neutral-950 grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 text-xs`,children:[(0,L.jsx)(Gl,{label:`Job ID`,value:e.jobId,mono:!0}),(0,L.jsx)(Gl,{label:`Subagent ID`,value:e.subagentId,mono:!0}),(0,L.jsx)(Gl,{label:`Model`,value:e.model,mono:!0}),(0,L.jsx)(Gl,{label:`Status`,value:e.status}),(0,L.jsx)(Gl,{label:`Started`,value:new Date(e.startedAt).toLocaleString()}),e.endedAt!==void 0&&(0,L.jsx)(Gl,{label:`Ended`,value:new Date(e.endedAt).toLocaleString()}),(0,L.jsx)(Gl,{label:`Duration`,value:i}),e.parentSessionId&&(0,L.jsx)(Gl,{label:`Parent session`,value:e.parentSessionId,mono:!0}),e.stopReason&&(0,L.jsx)(Gl,{label:`Stop reason`,value:e.stopReason.length>200?e.stopReason.slice(0,200)+`…`:e.stopReason,mono:!0}),(0,L.jsx)(Gl,{label:`Prompt hash`,value:e.promptHash,mono:!0}),(0,L.jsx)(Gl,{label:`Schema version`,value:String(e.schemaVersion)})]})]})}function Gl({label:e,value:t,mono:n=!1}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`text-neutral-600 whitespace-nowrap`,children:e}),(0,L.jsx)(`span`,{className:I(`text-neutral-300 break-all`,n&&`font-mono`),children:t})]})}function Kl({label:e,count:t}){return(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-medium text-neutral-500 uppercase tracking-wider`,children:[(0,L.jsx)(`span`,{children:e}),(0,L.jsx)(`span`,{className:`rounded-full bg-neutral-800 px-1.5 py-0.5 text-neutral-400 normal-case`,children:t})]})}function ql(){let[e,t]=(0,O.useState)([]),[n,r]=(0,O.useState)(!0),[i,a]=(0,O.useState)(null),[o,s]=(0,O.useState)(()=>Date.now()),c=(0,O.useRef)(null),l=(0,O.useCallback)((e=!1)=>{e||r(!0),a(null),V(`/api/bg-jobs`).then(({jobs:e})=>t([...e].sort((e,t)=>t.startedAt-e.startedAt))).catch(e=>a(e instanceof Error?e.message:String(e))).finally(()=>{e||r(!1)})},[]);(0,O.useEffect)(()=>{l()},[l]),(0,O.useEffect)(()=>{let t=e.some(e=>!Hl(e));return t&&!c.current&&(c.current=setInterval(()=>l(!0),5e3)),!t&&c.current&&(clearInterval(c.current),c.current=null),()=>{c.current&&=(clearInterval(c.current),null)}},[e,l]),(0,O.useEffect)(()=>{if(!e.some(e=>!Hl(e)))return;let t=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(t)},[e]);let u=e.filter(e=>e.status===`running`),d=e.filter(e=>Hl(e)),f=e.some(e=>!Hl(e));return(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-neutral-200`,children:[(0,L.jsx)(de,{className:`size-4 text-neutral-400`}),`Background Jobs`,f&&(0,L.jsx)(`span`,{className:`text-xs font-normal text-neutral-500`,children:`(auto-refreshing)`})]}),(0,L.jsxs)(`button`,{onClick:()=>l(),disabled:n,className:`flex items-center gap-1.5 rounded px-2 py-1 text-xs text-neutral-400 hover:text-neutral-200 hover:bg-neutral-800 disabled:opacity-50 transition-colors`,children:[(0,L.jsx)(Ct,{className:I(`size-3`,n&&`animate-spin`)}),`Refresh`]})]}),i&&(0,L.jsx)(`p`,{className:`rounded border border-red-900/40 bg-red-950/30 px-3 py-2 text-xs text-red-400`,children:i}),!n&&e.length===0&&!i&&(0,L.jsx)(`p`,{className:`text-sm text-neutral-500 text-center py-8`,children:`No background jobs`}),u.length>0&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(Kl,{label:`Running`,count:u.length}),u.map(e=>(0,L.jsx)(Wl,{job:e,now:o},e.jobId))]}),d.length>0&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(Kl,{label:`Settled`,count:d.length}),d.map(e=>(0,L.jsx)(Wl,{job:e,now:o},e.jobId))]})]})}var Jl=3e3;async function Yl(){return(await V(`/api/handoffs`)).handoffs.filter(e=>e.status===`pending`)}async function Xl(e,t){await V(`/api/handoffs/${encodeURIComponent(e)}/answer`,{method:`POST`,body:JSON.stringify({answer:t})})}function Zl({handoff:e,onAnswered:t}){let{taskId:n,sessionId:r,createdAt:i,question:a}=e,[o,s]=(0,O.useState)(``),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.useState)(null),f=(0,O.useRef)(!1),p=(0,O.useCallback)(async e=>{if(!f.current){f.current=!0,l(!0),d(null);try{await Xl(n,e),s(``),t(n)}catch(e){e instanceof Oc&&e.status===409?d(`This handoff is no longer active (already answered).`):d(`Failed to submit — try again.`)}finally{f.current=!1,l(!1)}}},[n,t]),m=Array.isArray(a.choices)&&a.choices.length>0,h=a.type??`confirm`,g=m,_=!g&&h===`confirm`,v=(()=>{try{let e=Date.now()-new Date(i).getTime(),t=Math.floor(e/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}catch{return``}})();return(0,L.jsxs)(`div`,{className:I(`rounded-xl border-2 border-yellow-500/60 bg-yellow-500/5 p-4`,`flex flex-col gap-3`),children:[(0,L.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,L.jsx)(Ut,{className:`mt-0.5 h-4 w-4 shrink-0 text-yellow-500`}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Session `,(0,L.jsx)(`span`,{className:`font-mono`,children:r}),v&&(0,L.jsxs)(`span`,{children:[` · `,v]})]}),a.message&&(0,L.jsx)(`p`,{className:`mt-1 text-sm font-medium text-foreground`,children:a.message}),!a.message&&(0,L.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground italic`,children:`(no message)`})]})]}),g&&(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:(a.choices??[]).map((e,t)=>{let n=String(e);return(0,L.jsx)(`button`,{onClick:()=>{p(e)},disabled:c,className:I(`rounded-md border border-border px-3 py-1 text-xs font-medium`,`transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50`),children:n},`${n}-${t}`)})}),_&&(0,L.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,L.jsx)(`button`,{onClick:()=>{p(!1)},disabled:c,className:I(`h-7 rounded-md px-3 text-xs text-muted-foreground`,`hover:bg-accent hover:text-foreground disabled:opacity-50`),children:`No`}),(0,L.jsx)(`button`,{onClick:()=>{p(!0)},disabled:c,className:I(`h-7 rounded-md bg-brand px-3 text-xs font-medium text-white`,`hover:bg-brand/90 disabled:opacity-50`),children:`Yes`})]}),!g&&!_&&(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),disabled:c,placeholder:`Your answer…`,className:I(`flex-1 rounded-md border border-input bg-background px-3 py-1 text-sm`,`placeholder:text-muted-foreground/50`,`focus:outline-none focus:ring-2 focus:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`),onKeyDown:e=>{e.key===`Enter`&&o.trim()&&p(o.trim())}}),(0,L.jsx)(`button`,{onClick:()=>{p(o.trim())},disabled:c||!o.trim(),className:I(`h-8 rounded-md bg-brand px-3 text-xs font-medium text-white`,`hover:bg-brand/90 disabled:opacity-50`),children:`Submit`})]}),u&&(0,L.jsx)(`p`,{className:`rounded-md border border-status-failed/30 bg-status-failed/10 px-3 py-2 text-xs text-status-failed`,children:u}),(0,L.jsx)(`p`,{className:`font-mono text-[10px] text-muted-foreground/60`,children:n})]})}function Ql(){let[e,t]=(0,O.useState)([]),[n,r]=(0,O.useState)(!0),[i,a]=(0,O.useState)(null),[o,s]=(0,O.useState)(new Set),c=(0,O.useRef)(void 0),l=(0,O.useRef)(!1),u=(0,O.useCallback)(async()=>{if(!l.current){l.current=!0;try{let e=await Yl();t(e);let n=new Set(e.map(e=>e.taskId));s(e=>{let t=new Set([...e].filter(e=>n.has(e)));return t.size===e.size?e:t}),a(null)}catch(e){a(e instanceof Error?e.message:`Failed to load handoffs.`)}finally{l.current=!1,r(!1)}}},[]);(0,O.useEffect)(()=>{u();function e(){clearInterval(c.current),c.current=setInterval(()=>{u()},Jl)}function t(){clearInterval(c.current)}function n(){document.hidden?t():(u(),e())}return document.hidden||e(),document.addEventListener(`visibilitychange`,n),()=>{t(),document.removeEventListener(`visibilitychange`,n)}},[u]);let d=(0,O.useCallback)(e=>{s(t=>new Set([...t,e]))},[]),f=e.filter(e=>!o.has(e.taskId));return n?(0,L.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading handoffs…`})}):(0,L.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4 overflow-y-auto p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`h1`,{className:`text-base font-semibold`,children:`Pending Handoffs`}),f.length>0&&(0,L.jsxs)(`span`,{className:`rounded-full bg-yellow-500/20 px-2 py-0.5 text-xs font-medium text-yellow-700 dark:text-yellow-400`,children:[f.length,` pending`]})]}),i&&(0,L.jsx)(`p`,{className:`rounded-lg border border-status-failed/30 bg-status-failed/10 px-4 py-3 text-sm text-status-failed`,children:i}),!i&&f.length===0&&(0,L.jsx)(`p`,{className:`mt-8 text-center text-sm text-muted-foreground`,children:`No pending handoffs.`}),(0,L.jsx)(`div`,{className:`flex flex-col gap-3`,children:f.map(e=>(0,L.jsx)(Zl,{handoff:e,onAnswered:d},e.taskId))})]})}function $l({icon:e,title:t,children:n}){return(0,L.jsxs)(`section`,{className:`space-y-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(e,{className:`size-4 text-muted-foreground`}),(0,L.jsx)(`h2`,{className:`text-sm font-semibold`,children:t})]}),(0,L.jsx)(`div`,{className:`rounded-xl border border-border bg-card`,children:n})]})}function eu({label:e,value:t,mono:n=!1,last:r=!1}){return(0,L.jsxs)(`div`,{className:I(`flex items-center justify-between gap-4 px-4 py-2.5`,!r&&`border-b border-border`),children:[(0,L.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e}),(0,L.jsx)(`span`,{className:I(`min-w-0 truncate text-right text-xs`,n?`font-mono text-zinc-300`:`text-zinc-200`),children:t})]})}function tu({model:e,last:t}){return(0,L.jsxs)(`div`,{className:I(`flex items-center justify-between gap-4 px-4 py-2.5`,!t&&`border-b border-border`),children:[(0,L.jsx)(`span`,{className:`text-xs text-zinc-200`,children:e.label}),(0,L.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:e.id})]})}var nu=[{keys:`⌘K`,description:`Open command palette`},{keys:`⌘1`,description:`Go to Sessions`},{keys:`⌘2`,description:`Go to Memory`},{keys:`⌘3`,description:`Go to Schedules`},{keys:`⌘4`,description:`Go to Background Jobs`}];function ru({keys:e,description:t,last:n}){return(0,L.jsxs)(`div`,{className:I(`flex items-center justify-between gap-4 px-4 py-2.5`,!n&&`border-b border-border`),children:[(0,L.jsx)(`span`,{className:`text-xs text-zinc-200`,children:t}),(0,L.jsx)(`kbd`,{className:`rounded border border-border bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:e})]})}function iu({status:e}){return e?(0,L.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(`span`,{className:I(`size-1.5 rounded-full`,e.running?`animate-pulse bg-status-done`:`bg-status-failed`)}),(0,L.jsx)(`span`,{className:I(`text-xs`,e.running?`text-zinc-200`:`text-muted-foreground`),children:e.running?`Running${e.tasks==null?``:` · ${e.tasks} task${e.tasks===1?``:`s`}`}`:`Stopped`})]}):(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`–`})}function au(){let[e,t]=(0,O.useState)({config:null,models:null,daemon:null,configError:null,modelsError:null,daemonError:null});(0,O.useEffect)(()=>{let e=!1,n=e=>e instanceof Error?e.message:`Failed to load`;return Promise.all([V(`/api/config`).then(e=>({ok:!0,config:e}),e=>({ok:!1,error:n(e)})),V(`/api/models`).then(e=>({ok:!0,models:e.models}),e=>({ok:!1,error:n(e)})),V(`/api/daemon/status`).then(e=>({ok:!0,daemon:e}),e=>({ok:!1,error:n(e)}))]).then(([n,r,i])=>{e||t({config:n.ok?n.config:null,configError:n.ok?null:n.error,models:r.ok?r.models:null,modelsError:r.ok?null:r.error,daemon:i.ok?i.daemon:null,daemonError:i.ok?null:i.error})}).catch(()=>{}),()=>{e=!0}},[]);let n=e.config,r=(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Loading…`});return(0,L.jsxs)(`div`,{className:`flex flex-1 flex-col gap-6 overflow-y-auto p-4`,children:[(0,L.jsxs)($l,{icon:Ze,title:`About`,children:[(0,L.jsx)(eu,{label:`AFK version`,value:n?n.version:r,mono:!0}),(0,L.jsx)(eu,{label:`Node.js`,value:n?n.nodeVersion:r,mono:!0}),(0,L.jsx)(eu,{label:`App`,value:`AFK Dashboard`,last:!0})]}),(0,L.jsxs)($l,{icon:Ne,title:`Model`,children:[(0,L.jsx)(eu,{label:`Default model`,value:n?n.model:r,mono:!0}),e.modelsError?(0,L.jsx)(`div`,{className:`px-4 py-3 text-xs text-status-failed`,children:e.modelsError}):e.models===null?(0,L.jsx)(eu,{label:`Available tiers`,value:r,last:!0}):e.models.length===0?(0,L.jsx)(eu,{label:`Available tiers`,value:`None listed`,last:!0}):e.models.map((t,n)=>(0,L.jsx)(tu,{model:t,last:n===(e.models?.length??0)-1},t.id))]}),(0,L.jsxs)($l,{icon:Ge,title:`Paths`,children:[(0,L.jsx)(eu,{label:`AFK home`,value:n?n.afkHome:r,mono:!0}),(0,L.jsx)(eu,{label:`State dir`,value:n?n.stateDir:r,mono:!0}),(0,L.jsx)(eu,{label:`Config dir`,value:n?n.configDir:r,mono:!0,last:!0})]}),(0,L.jsxs)($l,{icon:Ye,title:`Web Server`,children:[(0,L.jsx)(eu,{label:`Host`,value:n?n.webHost:r,mono:!0}),(0,L.jsx)(eu,{label:`Port`,value:n?String(n.webPort):r,mono:!0}),(0,L.jsx)(eu,{label:`Daemon`,value:(0,L.jsx)(iu,{status:e.daemon})}),!e.daemonError&&(0,L.jsx)(eu,{label:`Tasks scheduled`,value:e.daemon?.tasks==null?`–`:String(e.daemon.tasks),last:!0}),e.daemonError&&(0,L.jsx)(eu,{label:`Daemon error`,value:e.daemonError,last:!0})]}),(0,L.jsx)($l,{icon:$e,title:`Keyboard Shortcuts`,children:nu.map((e,t)=>(0,L.jsx)(ru,{keys:e.keys,description:e.description,last:t===nu.length-1},e.keys))})]})}async function ou(e){await V(`/api/approve`,{method:`POST`,body:JSON.stringify(e)})}function su({approval:e,onAnswered:t}){let{id:n,request:r}=e,[i,a]=(0,O.useState)(typeof r.questionDefault==`string`?r.questionDefault:``),o=(0,O.useRef)(!1),[s,c]=(0,O.useState)(!1),[l,u]=(0,O.useState)(null),d=async(e,r)=>{if(!o.current){o.current=!0,c(!0),u(null);try{await ou({requestId:n,response:{action:e,content:r}}),t(),document.querySelector(`[data-testid="composer-textarea"]`)?.focus()}catch{u(`Failed to submit — try again`)}finally{o.current=!1,c(!1)}}},f=r.type??`confirm`;return(0,L.jsxs)(`div`,{role:`dialog`,"aria-label":r.title||`Approval required`,"aria-busy":s,tabIndex:0,onKeyDown:e=>{f!==`confirm`||s||e.repeat||e.ctrlKey||e.metaKey||e.altKey||(e.key.toLowerCase()===`y`||e.key.toLowerCase()===`n`)&&(e.preventDefault(),d(e.key.toLowerCase()===`y`?`accept`:`decline`))},className:I(`rounded-lg border-2 border-yellow-500/60 bg-yellow-500/5 p-3 text-sm`,`flex flex-col gap-2 focus-visible:outline-2 focus-visible:outline-ring [&_button:focus-visible]:outline-2 [&_button:focus-visible]:outline-ring`),children:[(0,L.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,L.jsx)(Ut,{className:`h-4 w-4 text-yellow-500 mt-0.5 shrink-0`}),(0,L.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[r.title&&(0,L.jsx)(`p`,{className:`font-semibold text-foreground`,children:r.title}),r.message&&(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:r.message}),r.description&&(0,L.jsx)(`p`,{className:`text-muted-foreground text-xs mt-0.5`,children:r.description})]}),(0,L.jsx)(`button`,{onClick:()=>void d(`decline`),disabled:s,className:`shrink-0 text-muted-foreground hover:text-foreground`,title:`Dismiss`,"aria-label":`Dismiss approval`,children:(0,L.jsx)(qt,{className:`h-4 w-4`})})]}),f===`number`&&(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`input`,{type:`number`,"aria-label":r.title||`Approval response`,value:i,onChange:e=>a(e.target.value),disabled:s,...r.questionMin===void 0?{}:{min:r.questionMin},...r.questionMax===void 0?{}:{max:r.questionMax},className:I(`flex-1 rounded border border-input bg-background px-2 py-1 text-sm`,`focus:outline-none focus:ring-1 focus:ring-ring`)}),(0,L.jsx)(H,{onClick:()=>{let e=Number(i);isNaN(e)||r.questionMin!==void 0&&e<r.questionMin||r.questionMax!==void 0&&e>r.questionMax||d(`accept`,{number:e})},disabled:s||i===``||isNaN(Number(i))||r.questionMin!==void 0&&Number(i)<r.questionMin||r.questionMax!==void 0&&Number(i)>r.questionMax,label:`Submit`,variant:`primary`})]}),f===`text`&&(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`input`,{type:`text`,"aria-label":r.title||`Approval response`,value:i,onChange:e=>a(e.target.value),disabled:s,className:I(`flex-1 rounded border border-input bg-background px-2 py-1 text-sm`,`focus:outline-none focus:ring-1 focus:ring-ring`)}),(0,L.jsx)(H,{onClick:()=>void d(`accept`,{text:i}),disabled:s,label:`Submit`,variant:`primary`})]}),f===`confirm`&&(0,L.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,L.jsx)(H,{onClick:()=>void d(`decline`),disabled:s,label:`No`,variant:`ghost`}),(0,L.jsx)(H,{onClick:()=>void d(`accept`),disabled:s,label:`Yes`,variant:`primary`})]}),(f===`choice`||f===`multi_choice`)&&(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:(r.choices??[]).map(e=>(0,L.jsx)(H,{onClick:()=>void d(`accept`,{choice:e}),disabled:s,label:e,variant:`outline`},e))}),l&&(0,L.jsx)(`p`,{role:`alert`,className:`text-xs text-foreground`,children:l})]})}function H({onClick:e,disabled:t,label:n,variant:r}){return(0,L.jsx)(`button`,{onClick:e,disabled:t,className:I(`rounded px-3 py-1 text-xs font-medium transition-colors disabled:opacity-50`,r===`primary`&&`bg-primary text-primary-foreground hover:bg-primary/90`,r===`ghost`&&`text-muted-foreground hover:text-foreground hover:bg-accent`,r===`outline`&&`border border-border hover:bg-accent`),children:n})}function cu({approvals:e,onDismiss:t}){let[n,r]=(0,O.useState)(new Set),i=e.filter(e=>!n.has(e.id)),a=e=>{r(t=>new Set([...t,e])),t?.()};return(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`sr-only`,children:i.length?`Approval required: ${i.map(e=>e.request.title||e.request.message||`Please respond`).join(`; `)}`:``}),i.map(e=>(0,L.jsx)(su,{approval:e,onAnswered:()=>a(e.id)},e.id))]})}function lu({open:e,onClose:t,children:n}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:I(`fixed inset-0 z-40 bg-black/50 transition-opacity duration-200 md:hidden`,e?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`),onClick:t,"aria-hidden":`true`}),(0,L.jsx)(`div`,{className:I(`fixed inset-y-0 left-0 z-50 w-max max-w-[85vw] overflow-hidden bg-sidebar transition-transform duration-200 ease-in-out md:hidden`,e?`translate-x-0`:`-translate-x-full`),role:`dialog`,"aria-label":`Sidebar`,"aria-modal":e||void 0,"aria-hidden":!e,inert:!e,children:n})]})}function uu({onClick:e,className:t}){return(0,L.jsx)(`button`,{onClick:e,className:I(`inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-muted hover:text-foreground md:hidden`,t),"aria-label":`Open sidebar`,children:(0,L.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M4 6h16M4 12h16M4 18h16`})})})}var du=(0,O.createContext)(null),fu={success:`bg-green-600 text-white`,error:`bg-red-600 text-white`,info:`bg-muted text-muted-foreground border border-border`};function pu({children:e}){let[t,n]=(0,O.useState)([]),r=(0,O.useRef)(0),i=(0,O.useCallback)((e,t=`info`)=>{let i=++r.current;n(n=>[...n.slice(-2),{id:i,message:e,type:t}]),setTimeout(()=>{n(e=>e.filter(e=>e.id!==i))},3e3)},[]);return(0,L.jsxs)(du.Provider,{value:{toast:i},children:[e,(0,L.jsx)(`div`,{className:`fixed bottom-4 right-4 z-50 flex flex-col gap-2 pointer-events-none`,"aria-live":`polite`,role:`region`,"aria-label":`Notifications`,children:t.map(e=>(0,L.jsx)(`div`,{className:I(`pointer-events-auto max-w-sm rounded-lg px-4 py-3 text-sm shadow-lg animate-slide-in-right`,fu[e.type]),children:e.message},e.id))})]})}function mu(){let e=(0,O.useContext)(du);if(!e)throw Error(`useToast must be used within <ToastProvider>`);return e}var hu=1e4;function gu(){let[e,t]=(0,O.useState)([]),[n,r]=(0,O.useState)(!0),[i,a]=(0,O.useState)(null),o=(0,O.useRef)(void 0),s=(0,O.useCallback)(async()=>{try{let e=await V(`/api/sessions`);t(_u(e.sessions)),a(null)}catch(e){a(e instanceof Error?e.message:`Failed to fetch sessions`)}finally{r(!1)}},[]);return(0,O.useEffect)(()=>(s(),o.current=setInterval(()=>void s(),hu),()=>clearInterval(o.current)),[s]),{sessions:e,loading:n,error:i,refresh:s}}function _u(e){return[...e].sort((e,t)=>{let n=+!!vu(e),r=+!!vu(t);if(n!==r)return r-n;let i=e.updatedAt?new Date(e.updatedAt).getTime():0;return(t.updatedAt?new Date(t.updatedAt).getTime():0)-i})}function vu(e){return e.mode===`live`||e.alive===!0}var yu=1e3;function bu(){let[e,t]=(0,O.useState)([]),n=(0,O.useRef)(void 0),r=(0,O.useCallback)(async()=>{try{let e=await V(`/api/pending`);t(e.pending)}catch{}},[]);return(0,O.useEffect)(()=>(r(),n.current=setInterval(()=>void r(),yu),()=>clearInterval(n.current)),[r]),{approvals:e,pendingSessionIds:new Set(e.map(e=>e.sessionId).filter(e=>!!e))}}function xu(e){return typeof e==`object`&&!!e&&typeof e.type==`string`&&e.type.startsWith(`live_`)}var Su=15e3,Cu=500;function wu(e){let t=e.replace(/\r\n/g,`
|
|
51
|
+
`).split(`
|
|
52
|
+
|
|
53
|
+
`),n=t.pop()??``,r=[];for(let e of t){if(e.trim()===``)continue;let t,n;for(let r of e.split(`
|
|
54
|
+
`))r.startsWith(`id: `)?t=r.slice(4):r.startsWith(`id:`)?t=r.slice(3).trimStart():r.startsWith(`data: `)?n=r.slice(6):r.startsWith(`data:`)&&(n=r.slice(5).trimStart());n!==void 0&&r.push({id:t,data:n})}return{events:r,remainder:n}}function Tu(e){return typeof e==`object`&&!!e&&e.end===!0}function Eu(e,t=0,n,r){let i=`${e??``}:${t}`,[a,o]=(0,O.useState)({key:i,events:[],generation:0}),s=(0,O.useRef)(n);s.current=n;let c=(0,O.useRef)(r);c.current=r;let[l,u]=(0,O.useState)(`connecting`),[d,f]=(0,O.useState)(null),p=(0,O.useRef)(void 0),m=(0,O.useRef)(void 0),h=(0,O.useRef)(0);return(0,O.useEffect)(()=>{let t=!1,n;if(e===null){o({key:i,events:[],generation:0}),u(`connecting`),f(null);return}let r=e;o({key:i,events:[],generation:0}),f(null),m.current=void 0,h.current=0;async function a(){if(t)return;u(h.current===0?`connecting`:`reconnecting`),h.current>0&&(o(e=>({...e,events:[...e.events,{type:`choice_stream_boundary`}]})),c.current?.({type:`live_reset`}));let e=!1,l=new AbortController;p.current=l;let d=Ec(),g={};d&&(g.authorization=`Bearer ${d}`),m.current!==void 0&&(g[`last-event-id`]=m.current);try{let n=await fetch(`/api/sessions/${encodeURIComponent(r)}/stream`,{headers:g,signal:l.signal});if(t)return;if(!n.ok){if(n.status===401||n.status===403||n.status===404){t=!0;let e=n.status===401?`unauthorized`:n.status===403?`forbidden`:`not-found`;f(e),u(`closed`);return}throw Error(`stream ${n.status}`)}if(n.body===null)throw Error(`stream: no body`);h.current=0,u(`open`);let a=n.body.getReader(),d=new TextDecoder,p=``;outer:for(;;){let{done:n,value:r}=await a.read();if(t||n)break;p+=d.decode(r,{stream:!0});let{events:l,remainder:u}=wu(p);p=u;let f=[],h=()=>{if(f.length===0)return;let e=f;f=[],o(t=>({...t,key:i,events:[...t.events,...e]}))};for(let n of l){n.id!==void 0&&(m.current=n.id);let r;try{r=JSON.parse(n.data)}catch{continue}if(Tu(r)){h(),e=!0,t=!0;break outer}typeof r==`object`&&r&&r.reset===!0?(m.current=n.id,f=[],s.current?.(),c.current?.({type:`live_reset`}),o(e=>({key:i,events:[],generation:e.generation+1}))):xu(r)?c.current?.(r):f.push(r)}h()}}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return}if(t){e&&u(`ended`);return}h.current+=1;let _=.75+Math.random()*.5,v=Math.min(Cu*2**(h.current-1),Su)*_;n=setTimeout(()=>void a(),v)}return a(),()=>{t=!0,clearTimeout(n),p.current?.abort()}},[e,t,i]),{events:a.key===i?a.events:[],status:l,error:d,generation:a.key===i?a.generation:0}}function Du(e){return e.live}var Ou=0,ku=(e,t,n)=>`${e}:${t}:${n}`,Au=e=>e.turn??0;function ju(e,t,n){let r;for(let i of e){let e=i[1];e.part===t&&e.seg===n&&(!r||e.turn<r[1].turn)&&(r=i)}return r}function Mu(e){return e.part===`text`?{kind:`assistant`,id:e.id,text:e.text,live:e.state}:{kind:`thinking`,id:e.id,text:e.text,live:e.state}}var Nu=e=>{if(typeof requestAnimationFrame==`function`){let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)}let t=setTimeout(e,16);return()=>clearTimeout(t)};function Pu(){let e=(0,O.useRef)(new Map),t=(0,O.useRef)(new Map),n=(0,O.useRef)(new Set),r=(0,O.useRef)(void 0),[i,a]=(0,O.useState)([]),o=(0,O.useRef)(void 0),s=(0,O.useCallback)(()=>{o.current?.(),o.current=void 0;let n=[...t.current.values(),...[...e.current.values()].sort((e,t)=>e.turn-t.turn||e.seg-t.seg)];a(n.filter(e=>e.text.length>0).map(Mu))},[]),c=(0,O.useCallback)(()=>{o.current||=Nu(()=>{o.current=void 0,s()})},[s]);return(0,O.useEffect)(()=>()=>o.current?.(),[]),{drafts:i,onLive:(0,O.useCallback)(i=>{let a=e.current;if(i.type!==`live_reset`){let e=Au(i),t=r.current;(!t||e>t.turn)&&(r.current={turn:e,ended:!1})}switch(i.type){case`live_reset`:a.clear(),n.current.clear(),r.current=void 0;break;case`live_snapshot`:{let e=ku(Au(i),i.part,i.seg);if(n.current.has(e))return;let t=a.get(e);a.set(e,{id:t?.id??`live-${++Ou}`,turn:Au(i),seg:i.seg,part:i.part,text:i.text,state:`streaming`,stale:!1});break}case`live_delta`:{let e=ku(Au(i),i.part,i.seg);if(n.current.has(e))return;let t=a.get(e);if(!t&&i.offset===0&&(t={id:`live-${++Ou}`,turn:Au(i),seg:i.seg,part:i.part,text:``,state:`streaming`,stale:!1},a.set(e,t)),!t||t.stale)return;let r=i.offset+i.text.length;if(i.offset>t.text.length){t.stale=!0;return}if(r<=t.text.length)return;t.text+=i.text.slice(t.text.length-i.offset);break}case`live_seal`:{let e=a.get(ku(Au(i),i.part,i.seg));e&&(e.state=`sealed`);break}case`live_end`:{let e=Au(i);r.current?.turn===e&&(r.current.ended=!0);for(let t of n.current){let r=Number(t.split(`:`)[0]);Number.isFinite(r)&&r<e&&n.current.delete(t)}for(let[n,r]of a)r.turn>e||(i.reason===`aborted`?(t.current.set(n,{...r,state:`interrupted`}),a.delete(n)):r.state=`sealed`);break}}c()},[c]),claim:(0,O.useCallback)((i,a)=>{let o=ju(t.current,i,a)??ju(e.current,i,a);if(!o){let e=r.current;e&&!e.ended&&n.current.add(ku(e.turn,i,a));return}let[c,l]=o;return t.current.get(c)===l?t.current.delete(c):(e.current.delete(c),n.current.add(c)),s(),l.id},[s]),settle:(0,O.useCallback)(()=>{let t=r.current,n=!1;for(let[r,i]of e.current){let a=!t||i.turn<t.turn||i.turn===t.turn&&t.ended;i.state===`sealed`&&a&&(e.current.delete(r),n=!0)}n&&s()},[s]),clearAll:(0,O.useCallback)(()=>{e.current.clear(),n.current.clear(),t.current.clear(),r.current=void 0,s()},[s])}}function Fu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Iu(e){if(!Fu(e)||typeof e.corrId!=`string`||typeof e.title!=`string`||!Array.isArray(e.options)||e.cancellable!==void 0&&typeof e.cancellable!=`boolean`)return null;let t=[];for(let n of e.options){if(!Fu(n)||typeof n.value!=`string`||typeof n.label!=`string`)return null;t.push({value:n.value,label:n.label,...typeof n.description==`string`?{description:n.description}:{}})}return t.length===0?null:{corrId:e.corrId,title:e.title,options:t,...typeof e.cancellable==`boolean`?{cancellable:e.cancellable}:{},...typeof e.default==`string`?{default:e.default}:{}}}function Lu(e){let t=(0,O.useRef)({first:void 0,count:0,choices:new Map,progress:new Map});return(0,O.useMemo)(()=>{let n=t.current;(e.length<n.count||n.count>0&&e[0]!==n.first)&&(n.count=0,n.choices=new Map,n.progress=new Map);let{choices:r,progress:i}=n;for(let t=n.count;t<e.length;t++){let n=e[t];if(Fu(n)){if(n.type===`choice_stream_boundary`)r.clear(),i.clear();else if(n.type===`choice_request`){let e=Iu(n.request);e&&r.set(e.corrId,e)}else if(n.type===`choice_settled`&&typeof n.corrId==`string`)r.delete(n.corrId);else if(n.type===`progress`&&typeof n.corrId==`string`){if(n.phase===`end`)i.delete(n.corrId);else if((n.phase===`start`||n.phase===`update`)&&typeof n.label==`string`){let e=typeof n.fraction==`number`&&Number.isFinite(n.fraction)?Math.max(0,Math.min(1,n.fraction)):void 0;i.set(n.corrId,{corrId:n.corrId,label:n.label,...e===void 0?{}:{fraction:e}})}}}}return n.first=e[0],n.count=e.length,{choices:[...r.values()],progress:[...i.values()]}},[e])}var Ru=0;function zu(){Ru=0}function Bu(e){return Ru+=1,`${e}_${Ru}`}function U(e){return typeof e==`string`?e:void 0}function Vu(e){return typeof e==`number`?e:void 0}var Hu=`… [truncated]`;function Uu(e){return e.endsWith(Hu)}function Wu(e,t){return`/api/sessions/${encodeURIComponent(e)}/tool-results/${encodeURIComponent(t)}`}function Gu(e,t){let n=U(e.toolUseId),r=U(e.content)??U(e.output)??``,i=n===void 0?void 0:t?.get(n);if(i===void 0)return{kind:`notice`,id:Bu(`n`),text:`tool result: ${r.slice(0,80)}`};i.output=r,i.outputUnavailable=!1,i.outputClipped=Uu(r),i.status=`ok`;let a=Vu(e.durationMs);a!==void 0&&(i.durationMs=a);let o=U(e.diff);o!==void 0&&(i.diff=o)}function Ku(e){if(e!==void 0)for(let t of e.values())t.status===`running`&&(t.status=`ok`)}function qu(e){let t=U(e.from)??`?`,n=U(e.to)??`?`;return{kind:`notice`,id:Bu(`n`),text:`ℹ Model switched: ${t} → ${n}`}}function Ju(e){let t=U(e.stopReason),n=t===`interrupted`,r=t===`error`||t===`budget_ceiling`||t===`stalled`,i=e.costUsd,a=e.durationMs,o=[];typeof i==`number`&&o.push(`$${i.toFixed(4)}`),typeof a==`number`&&o.push(`${(a/1e3).toFixed(1)}s`);let s=Vu(e.inputTokens),c=Vu(e.outputTokens),l=Vu(e.cacheReadTokens);if(s!==void 0||c!==void 0){let e=[];s!==void 0&&e.push(`${s}in`),c!==void 0&&e.push(`${c}out`),l!==void 0&&e.push(`${l}cache`),o.push(e.join(`/`))}if(n)return{kind:`stopped`,id:Bu(`n`),text:o.length?`Stopped · ${o.join(` · `)}`:`Stopped`};if(r){let e=`turn failed · ${t}`;return{kind:`notice`,id:Bu(`n`),text:o.length?`${e} · ${o.join(` · `)}`:e}}return{kind:`notice`,id:Bu(`n`),text:o.length?`turn complete · ${o.join(` · `)}`:`turn complete`}}function Yu(e,t,n){if(typeof e.kind==`string`)switch(e.kind){case`user`:{let t=U(e.input)??U(e.text)??``;return{kind:`user`,id:Bu(`u`),text:t,...e.ts===void 0?{}:{ts:e.ts}}}case`assistant`:return{kind:`assistant`,id:Bu(`a`),text:U(e.text)??``,...e.ts===void 0?{}:{ts:e.ts}};case`thinking`:return{kind:`thinking`,id:Bu(`th`),text:U(e.text)??``};case`tool`:{let n=U(e.input)??``;if(n.trim()===`…`)return;let r=U(e.toolUseId),i={kind:`tool`,id:Bu(`t`),name:U(e.toolName)??`tool`,toolUseId:r,inputPreview:n,status:`running`,outputUnavailable:!0};return t!==void 0&&r!==void 0&&t.set(r,i),i}case`tool_result`:return Gu(e,t);case`tool_error`:{let t=U(e.content)??``,n=t.split(`
|
|
55
|
+
`,1)[0]??``;return{kind:`tool`,id:Bu(`t`),name:U(e.toolName)??`error`,inputPreview:n,status:`error`,output:t}}case`error`:return Ku(t),{kind:`error`,id:Bu(`e`),message:U(e.message)??`error`};case`done`:return Ku(t),Ju(e);case`paused`:return{kind:`notice`,id:Bu(`n`),text:`paused — usage limit`};case`resumed`:return{kind:`notice`,id:Bu(`n`),text:`resumed`};case`tool_activity`:{let t=Vu(e.activeCount)??0;if(t===0)return{kind:`notice`,id:Bu(`n`),text:`tool wave complete`};let n=t===1?`tool`:`tools`;return{kind:`notice`,id:Bu(`n`),text:`Running ${t} ${n} in parallel`}}case`rate_limit`:{let t=Vu(e.retryAfterMs),n=t===void 0?``:` (retrying in ${Math.ceil(t/1e3)}s)`;return{kind:`notice`,id:Bu(`n`),text:`Rate limited${n}`}}case`progress`:return{kind:`notice`,id:Bu(`n`),text:U(e.message)??`progress`};case`subagent_lifecycle`:{let t=U(e.subagentId)??`subagent`,r=U(e.status)??`unknown`,i=U(e.agentType),a=i?`${i} (${t.slice(0,8)})`:t.slice(0,12);if(n!==void 0){let i=n.get(t);if(i!==void 0){i.status=r;let t=Vu(e.durationMs);t!==void 0&&(i.durationMs=t);let n=Vu(e.totalCostUsd);n!==void 0&&(i.totalCostUsd=n);let a=Vu(e.turnCount);a!==void 0&&(i.turnCount=a);let o=U(e.stopReason);o!==void 0&&(i.stopReason=o);return}}let o={kind:`subagent`,id:Bu(`sa`),subagentId:t,parentId:U(e.parentId),status:r,label:a,model:U(e.model),agentType:U(e.agentType),durationMs:Vu(e.durationMs),totalCostUsd:Vu(e.totalCostUsd),promptHead:U(e.promptHead),turnCount:Vu(e.turnCount),stopReason:U(e.stopReason),parentToolUseId:U(e.parentToolUseId)};return n?.set(t,o),o}case`background_job`:{let t=U(e.jobId)??`job`,n=U(e.status)??`unknown`,r=U(e.label)??t.slice(0,12);return{kind:`bg_job`,id:Bu(`bj`),jobId:t,status:n,label:r}}case`plan_mode`:{let t=U(e.mode)??`default`;return{kind:`notice`,id:Bu(`n`),text:`Switched to ${t} mode`}}case`model_fallback`:return qu(e);default:return}}function Xu(e,t){if(t.kind!==`done`)return e;let n=t.costUsd,r=t.durationMs,i=t.inputTokens,a=t.outputTokens,o=t.cacheReadTokens;return{costUsd:e.costUsd+(typeof n==`number`?n:0),durationMs:e.durationMs+(typeof r==`number`?r:0),turns:e.turns+1,inputTokens:(e.inputTokens??0)+(typeof i==`number`?i:0),outputTokens:(e.outputTokens??0)+(typeof a==`number`?a:0),cacheReadTokens:(e.cacheReadTokens??0)+(typeof o==`number`?o:0)}}var Zu={costUsd:0,durationMs:0,turns:0};function Qu(e,t){let[n,r]=(0,O.useState)({}),i=e?n[e]??0:0,a=Pu(),{events:o,status:s,error:c,generation:l}=Eu(e,i,t,a.onLive),{choices:u,progress:d}=Lu(o),[f,p]=(0,O.useState)([]),[m,h]=(0,O.useState)(Zu),[g,_]=(0,O.useState)(!1),[v,y]=(0,O.useState)(0),b=(0,O.useRef)(new Map),x=(0,O.useRef)(new Map),S=(0,O.useRef)(0),C=(0,O.useCallback)(()=>{e&&r(t=>({...t,[e]:(t[e]??0)+1}))},[e]);return(0,O.useEffect)(()=>{zu(),S.current=0,b.current=new Map,x.current=new Map,p([]),h(Zu),_(!1),y(0),l===0&&a.clearAll()},[e,i,l,a]),(0,O.useEffect)(()=>{let e=o.slice(S.current);if(e.length===0)return;S.current=o.length;let t=b.current,n=[],r=Zu,i=!1,s=null,c=0;for(let o of e){let e=o;if(e.type===`choice_request`||e.type===`choice_settled`||e.type===`choice_stream_boundary`||e.type===`progress`||e.type?.startsWith(`live_`))continue;let l=e.record??o,u=e.replay===!0;l.kind===`user`?s=!0:(l.kind===`done`||l.kind===`error`||l.kind===`stopped`)&&(s=!1,a.settle()),l.kind!==`done`&&l.kind!==`stopped`||u||(c+=1),r=Xu(r,l);let d=Yu(l,t,x.current);if(d!==void 0){let e=l.seg;if(typeof e==`number`&&(d.kind===`assistant`||d.kind===`thinking`)){let t=a.claim(d.kind===`assistant`?`text`:`thinking`,e);t!==void 0&&(d.id=t)}n.push(d)}else(l.kind===`tool_result`||l.kind===`subagent_lifecycle`)&&(i=!0)}n.length>0?p(e=>[...e,...n]):i&&p(e=>[...e]),(r.costUsd!==0||r.durationMs!==0||r.turns!==0)&&h(e=>({costUsd:e.costUsd+r.costUsd,durationMs:e.durationMs+r.durationMs,turns:e.turns+r.turns,inputTokens:(e.inputTokens??0)+(r.inputTokens??0),outputTokens:(e.outputTokens??0)+(r.outputTokens??0),cacheReadTokens:(e.cacheReadTokens??0)+(r.cacheReadTokens??0)})),s!==null&&_(s),c>0&&y(e=>e+c)},[o,l]),{items:(0,O.useMemo)(()=>a.drafts.length===0?f:[...f,...a.drafts],[f,a.drafts]),totals:m,status:s,error:c,turnActive:g,liveTurns:v,clear:C,choices:u,progress:d}}var $u=50,ed=200;function td(){let e=(0,O.useRef)(null),[t,n]=(0,O.useState)(!0),[r,i]=(0,O.useState)(!1),[a,o]=(0,O.useState)(!1),s=(0,O.useRef)(!1),c=(0,O.useRef)(!0),l=(0,O.useRef)(0);return(0,O.useEffect)(()=>{let t=e.current;if(t===null)return;l.current=t.scrollTop;let r=l.current,a=t.scrollHeight;function u(){if(t===null)return;let e=t.scrollHeight<a;a=t.scrollHeight;let u=t.scrollTop<r&&!e;r=t.scrollTop,l.current=r,c.current&&!u&&t.scrollHeight-t.scrollTop-t.clientHeight>$u&&(t.scrollTop=t.scrollHeight,r=t.scrollTop,l.current=r);let d=t.scrollHeight-t.scrollTop-t.clientHeight,f=d<=$u;c.current=f;let p=d>ed;s.current=p,n(f),i(p),f&&o(!1)}let d=t.firstElementChild,f=typeof ResizeObserver>`u`||d===null?null:new ResizeObserver(()=>{c.current&&t.scrollHeight-t.scrollTop-t.clientHeight>$u&&(t.scrollTop=t.scrollHeight,r=t.scrollTop,l.current=r)});return f!==null&&d!==null&&f.observe(d),t.addEventListener(`scroll`,u,{passive:!0}),()=>{f?.disconnect(),t.removeEventListener(`scroll`,u)}},[]),{containerRef:e,scrollToBottom:(0,O.useCallback)(()=>{let t=e.current;t!==null&&(t.scrollTop=t.scrollHeight,l.current=t.scrollTop,c.current=!0,o(!1))},[]),isPinned:t,showScrollButton:r,hasNewContent:a,notifyNewContent:(0,O.useCallback)(()=>{s.current&&o(!0)},[])}}function W(e,t){return Number.isInteger(t)&&t>=0&&t<e.length}function nd(e,t){if(!W(e,t)||t===0)return e.slice();let n=e.slice(),r=n[t-1],i=n[t];return r===void 0||i===void 0?e.slice():(n[t-1]=i,n[t]=r,n)}function G(e,t){if(!W(e,t)||t===e.length-1)return e.slice();let n=e.slice(),r=n[t+1],i=n[t];return r===void 0||i===void 0?e.slice():(n[t+1]=i,n[t]=r,n)}function K(e,t){if(!W(e,t))return e.slice();let n=e.slice();return n.splice(t,1),n}function rd(e,t,n){if(!W(e,t))return e.slice();let r=e.slice();return r[t]={...r[t],text:n},r}function id({submit:e,isLive:t}){let[n,r]=(0,O.useState)([]),i=(0,O.useRef)(!1),a=(0,O.useRef)(0),o=(0,O.useRef)([]);return{entries:n,enqueue:(0,O.useCallback)(e=>{let t=a.current++,n=[...o.current,{id:t,text:e}];o.current=n,r(n)},[]),moveItemUp:(0,O.useCallback)(e=>{let t=nd(o.current,e);o.current=t,r(t)},[]),moveItemDown:(0,O.useCallback)(e=>{let t=G(o.current,e);o.current=t,r(t)},[]),removeItem:(0,O.useCallback)(e=>{let t=K(o.current,e);o.current=t,r(t)},[]),editItem:(0,O.useCallback)((e,t)=>{let n=rd(o.current,e,t);o.current=n,r(n)},[]),clear:(0,O.useCallback)(()=>{o.current=[],r([])},[]),flush:(0,O.useCallback)(async()=>{if(i.current||!t)return;let n=o.current[0];if(n===void 0)return;let a=n.id,s=n.text;i.current=!0,e(s).then(()=>{let e=o.current.filter(e=>e.id!==a);o.current=e,r(e)}).catch(()=>{}).finally(()=>{i.current=!1})},[e,t])}}var ad=[],od=0,sd=`afk.command-outputs.v1`,cd=1e6;function ld(){try{let e=sessionStorage.getItem(sd);if(!e||e.length>cd)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t)){if(!Array.isArray(r))continue;let t=r.filter(e=>!!e&&typeof e.key==`number`&&typeof e.input==`string`&&Number.isInteger(e.afterCount)&&e.afterCount>=0&&Array.isArray(e.response?.blocks)&&typeof e.response?.control?.kind==`string`);n[e]=t;for(let e of t)od=Math.max(od,e.key)}return n}catch{return{}}}function ud(){let[e,t]=(0,O.useState)(ld);(0,O.useEffect)(()=>{try{let t=Object.fromEntries(Object.entries(e).slice(-20).map(([e,t])=>[e,t.slice(-50)])),n=JSON.stringify(t);for(;n.length>cd&&Object.keys(t).length;)delete t[Object.keys(t)[0]],n=JSON.stringify(t);sessionStorage.setItem(sd,n)}catch{}},[e]);let n=(0,O.useCallback)((e,n,r,i)=>{let a=r.control.kind===`clear`,o=!r.blocks.some(e=>e.text.trim().length>0)&&r.session?.model?{...r,blocks:[{text:`Switched to ${r.session.model}`,ansi:``}]}:r;if(!o.blocks.some(e=>e.text.trim().length>0)&&r.control.kind===`continue`)return;let s={key:++od,input:n,response:o,afterCount:a?0:i};t(t=>({...t,[e]:[...a?ad:t[e]??ad,s]}))},[]),r=(0,O.useCallback)((e,n=!1)=>{t(t=>{let r=n?[...t[e]??ad].reverse().find(e=>e.response.control.kind===`clear`):void 0;return{...t,[e]:r?[r]:ad}})},[]);return{itemsFor:(0,O.useCallback)(t=>t===null?ad:e[t]??ad,[e]),addItem:n,clearItems:r}}function dd(){return new URL(window.location.href).searchParams.get(`session`)||null}function fd(){let[e,t]=(0,O.useState)(dd);return(0,O.useEffect)(()=>{let e=()=>t(dd());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),[e,(0,O.useCallback)(e=>{let n=new URL(window.location.href);e?n.searchParams.set(`session`,e):n.searchParams.delete(`session`),n.href!==window.location.href&&window.history.pushState({},``,n),t(e)},[])]}var pd=200;function md({text:e,isStreaming:t=!1}){let[n,r]=(0,O.useState)(!1),i=e.length>pd,a=i&&!n?e.slice(0,pd)+`…`:e;return(0,L.jsxs)(`details`,{className:`group rounded-md border border-border/30 bg-muted/20`,children:[(0,L.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-1.5 px-3 py-2 text-xs text-muted-foreground select-none hover:text-foreground`,children:[(0,L.jsx)(le,{className:[`h-3.5 w-3.5 shrink-0 text-brand/60`,t?`animate-pulse`:``].filter(Boolean).join(` `)}),(0,L.jsx)(`span`,{className:`font-medium`,children:`Thinking`}),e.length>0&&(0,L.jsxs)(`span`,{className:`text-[10px] text-muted-foreground/50 tabular-nums`,children:[e.length.toLocaleString(),` chars`]}),t&&(0,L.jsx)(`span`,{className:`ml-0.5 flex items-center gap-px`,children:[0,150,300].map(e=>(0,L.jsx)(`span`,{className:`inline-block h-1 w-1 rounded-full bg-muted-foreground/50 animate-shimmer-pulse`,style:{animationDelay:`${e}ms`}},e))})]}),(0,L.jsxs)(`div`,{className:`border-t border-border/30 px-3 py-2`,children:[(0,L.jsx)(`p`,{className:`whitespace-pre-wrap break-words text-xs italic leading-relaxed text-muted-foreground/70`,children:a}),i&&(0,L.jsx)(`button`,{type:`button`,onClick:e=>{e.preventDefault(),r(e=>!e)},className:`mt-1.5 text-[10px] text-brand/60 hover:text-brand/80 transition-colors`,children:n?`Show less`:`Show more`})]})]})}var hd=(e,t)=>typeof e[t]==`string`?e[t]:``,gd=e=>t=>hd(t,e),_d=e=>{let t=hd(e,`url`);try{return new URL(t).host}catch{return t||hd(e,`query`)}};function vd(e,t){let n=hd(e,`pattern`);if(!n)return``;let r=hd(e,`path`)||hd(e,`include`);if(r&&t){let e=t.replace(/[\\/]+$/,``).replaceAll(`\\`,`/`),n=r.replaceAll(`\\`,`/`);n.startsWith(`${e}/`)?r=n.slice(e.length+1):n===e&&(r=`.`)}return r?`grep "${n}" in ${r}`:`grep "${n}"`}function yd(e){let t=hd(e,`pattern`);return t?`glob "${t}"`:``}var bd={read_file:gd(`file_path`),edit_file:gd(`file_path`),write_file:gd(`file_path`),list_directory:gd(`path`),extract_document:gd(`file_path`),bash:gd(`command`),grep:vd,glob:yd,web_scrape:_d,web_request:_d,browser_open:_d,agent:gd(`prompt`),remote_agent:gd(`prompt`),skill:gd(`name`)},xd=new Set([`read_file`,`edit_file`,`write_file`,`list_directory`,`extract_document`]);function Sd(e,t,n){let r=t.trim();try{let t=JSON.parse(r);t&&typeof t==`object`&&!Array.isArray(t)&&(r=bd[e]?.(t,n)||r)}catch{}if(xd.has(e)&&n){let e=n.replace(/[\\/]+$/,``).replaceAll(`\\`,`/`),t=r.replaceAll(`\\`,`/`);t.startsWith(`${e}/`)&&(r=t.slice(e.length+1))}if((e===`grep`||e===`glob`)&&n){let t=n.replace(/[\\/]+$/,``).replaceAll(`\\`,`/`);r=r.replaceAll(`\\`,`/`).replace(` in ${t}/`,` in `).replace(RegExp(` in ${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}$`),` in .`),e===`grep`&&r.startsWith(`"`)&&(r=`grep ${r}`),e===`glob`&&r.startsWith(`"`)&&(r=`glob ${r}`)}if([`web_scrape`,`web_request`,`browser_open`].includes(e))try{r=new URL(r).host}catch{}return r.split(/\r?\n/,1)[0]??``}var Cd=(0,O.createContext)(null);function wd(e){return e instanceof Oc&&e.status===404?e.message.includes(`journal_not_found`)?`Full output unavailable: this session has no message journal.`:`Full output not found in the session journal.`:e instanceof Error?e.message:String(e)}function Td(e){let t=(0,O.useContext)(Cd),[n,r]=(0,O.useState)({status:`idle`}),i=t!==null&&e!==void 0&&e.length>0,a=(0,O.useRef)(null);return(0,O.useEffect)(()=>(r({status:`idle`}),()=>{a.current?.abort(),a.current=null}),[t,e]),{state:n,canLoad:i,load:(0,O.useCallback)(()=>{if(!i||t===null||e===void 0)return;a.current?.abort();let n=new AbortController;a.current=n,r({status:`loading`}),V(Wu(t,e),{signal:n.signal}).then(e=>{n.signal.aborted||r({status:`loaded`,result:e})},e=>{n.signal.aborted||r({status:`error`,message:wd(e)})})},[i,t,e])}}var Ed=(0,O.createContext)(void 0);function Dd({children:e}){let t=(0,O.useContext)(Cd),[n,r]=(0,O.useState)();return(0,O.useEffect)(()=>{if(!t)return;let e=new AbortController;return V(`/api/sessions`,{signal:e.signal}).then(n=>{e.signal.aborted||r({id:t,cwd:n.sessions.find(e=>e.id===t)?.cwd})}).catch(()=>{}),()=>e.abort()},[t]),(0,L.jsx)(Ed.Provider,{value:n?.id===t?n?.cwd:void 0,children:e})}function Od({open:e,children:t}){return(0,L.jsx)(`div`,{className:I(`grid transition-[grid-template-rows] duration-200 ease-out`,e?`grid-rows-[1fr]`:`grid-rows-[0fr]`),children:(0,L.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:t})})}function kd({diff:e}){let t=e.split(`
|
|
56
|
+
`);return(0,L.jsx)(`div`,{className:`overflow-x-auto rounded bg-secondary font-mono text-xs leading-5`,children:(0,L.jsx)(`table`,{className:`w-full border-collapse`,children:(0,L.jsx)(`tbody`,{children:t.map((e,t)=>{let n=e.startsWith(`+`)&&!e.startsWith(`+++`),r=e.startsWith(`-`)&&!e.startsWith(`---`),i=e.startsWith(`@@`),a=e.startsWith(`+++`)||e.startsWith(`---`);return(0,L.jsxs)(`tr`,{className:I(n&&`bg-status-running/15 text-foreground`,r&&`bg-status-failed/15 text-foreground`,i&&`bg-muted text-muted-foreground`,a&&`text-muted-foreground`,!n&&!r&&!i&&!a&&`text-foreground`),children:[(0,L.jsx)(`td`,{className:`select-none px-2 py-0 text-right text-muted-foreground tabular-nums`,children:t+1}),(0,L.jsx)(`td`,{className:`w-full whitespace-pre px-2 py-0`,children:e||` `})]},t)})})})})}var Ad=`overflow-x-auto whitespace-pre-wrap font-mono text-[11px] text-foreground`;function jd({text:e}){let[t,n]=(0,O.useState)(!1),[r,i]=(0,O.useState)(!1),a=e.split(`
|
|
57
|
+
`),o=Math.max(0,a.length-25);return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>i(!0)).catch(()=>i(!1))},className:`mb-1 text-xs text-foreground rounded focus-visible:outline-2 focus-visible:outline-ring`,children:r?`Copied output`:`Copy output`}),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(`pre`,{className:Ad,children:t?e:a.slice(0,25).join(`
|
|
58
|
+
`)}),o>0&&!t&&(0,L.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-x-0 bottom-0 h-8 bg-gradient-to-t from-card to-transparent`})]}),o>0&&(0,L.jsx)(`button`,{type:`button`,"aria-expanded":t,onClick:()=>n(e=>!e),className:`w-full py-2 text-xs text-foreground rounded focus-visible:outline-2 focus-visible:outline-ring`,children:t?`Show less`:`Show ${o} more lines`})]})}function Md({toolUseId:e,preview:t,clipped:n,unavailable:r}){let{state:i,canLoad:a,load:o}=Td(e);if(i.status===`loaded`){let{result:e}=i;return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(jd,{text:e.text}),e.truncated&&(0,L.jsxs)(`p`,{className:`mt-1 text-[11px] italic text-muted-foreground`,children:[`Showing the first `,e.text.length.toLocaleString(),` of`,` `,e.totalChars.toLocaleString(),` characters.`]})]})}return(0,L.jsxs)(`div`,{children:[r&&!t&&(0,L.jsx)(`p`,{className:`text-[11px] italic text-muted-foreground`,children:`Output not in the live record (replayed session)`}),t&&(0,L.jsx)(jd,{text:t}),a&&(n===!0||r===!0)&&(0,L.jsx)(`button`,{type:`button`,onClick:o,disabled:i.status===`loading`,className:`mt-1 text-[11px] text-muted-foreground underline underline-offset-2 hover:text-foreground disabled:opacity-50`,children:i.status===`loading`?`Loading full output…`:`Load full output`}),i.status===`error`&&(0,L.jsx)(`p`,{className:`mt-1 text-[11px] italic text-status-failed`,children:i.message})]})}var Nd={read_file:{Icon:Ve,colorClass:`text-cat-read`},glob:{Icon:Ve,colorClass:`text-cat-read`},grep:{Icon:Ve,colorClass:`text-cat-read`},list_directory:{Icon:Ve,colorClass:`text-cat-read`},json_query:{Icon:Ve,colorClass:`text-cat-read`},write_file:{Icon:ze,colorClass:`text-cat-write`},edit_file:{Icon:ze,colorClass:`text-cat-write`},patch_apply:{Icon:ze,colorClass:`text-cat-write`},bash:{Icon:Vt,colorClass:`text-cat-shell`},test_run:{Icon:Vt,colorClass:`text-cat-shell`},agent:{Icon:qe,colorClass:`text-cat-agent`},compose:{Icon:qe,colorClass:`text-cat-agent`},skill:{Icon:qe,colorClass:`text-cat-agent`},browser_open:{Icon:Ye,colorClass:`text-cat-browser`},browser_act:{Icon:Ye,colorClass:`text-cat-browser`},browser_observe:{Icon:Ye,colorClass:`text-cat-browser`},browser_screenshot:{Icon:Ye,colorClass:`text-cat-browser`},web_scrape:{Icon:Le,colorClass:`text-cat-web`},web_request:{Icon:Le,colorClass:`text-cat-web`},memory_search:{Icon:Fe,colorClass:`text-cat-mcp`},memory_update:{Icon:Fe,colorClass:`text-cat-mcp`},state_get:{Icon:Fe,colorClass:`text-cat-mcp`},state_put:{Icon:Fe,colorClass:`text-cat-mcp`}};function Pd(e){return Nd[e]??{Icon:Gt,colorClass:`text-cat-other`}}function Fd({status:e}){return e===`running`?(0,L.jsx)(rt,{className:`h-3.5 w-3.5 shrink-0 animate-spin-slow text-status-blocked`,"aria-label":`running`}):e===`ok`?(0,L.jsx)(xe,{className:`h-3.5 w-3.5 shrink-0 text-status-running`,"aria-label":`ok`}):(0,L.jsx)(Ce,{className:`h-3.5 w-3.5 shrink-0 text-status-failed`,"aria-label":`error`})}function Id({ms:e,live:t}){let n=e===void 0?t===void 0?null:`...${t}s`:`${(e/1e3).toFixed(1)}s`;return n===null?null:(0,L.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:n})}var Ld=(0,O.memo)(function({toolUseId:e,name:t,inputPreview:n,status:r,output:i,outputUnavailable:a,outputClipped:o,diff:s,durationMs:c}){let[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(!1),[p,m]=(0,O.useState)(0),h=(0,O.useRef)(null);(0,O.useEffect)(()=>(r===`running`&&c===void 0?h.current=setInterval(()=>{m(e=>e+1)},1e3):h.current!==null&&(clearInterval(h.current),h.current=null),()=>{h.current!==null&&clearInterval(h.current)}),[r,c]);let{Icon:g,colorClass:_}=Pd(t),v=s||a||i&&i.trim().length>0,y=Sd(t,n,(0,O.useContext)(Ed)),b=n.trim();return(0,L.jsxs)(`div`,{className:I(`rounded-md border bg-card text-sm`,r===`error`?`border-status-failed/40`:`border-border`),children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[(0,L.jsx)(g,{className:I(`h-3.5 w-3.5 shrink-0`,_)}),(0,L.jsx)(`span`,{className:`font-mono text-xs font-medium text-foreground`,children:t}),(0,L.jsx)(`span`,{className:`text-xs text-foreground`,children:r===`ok`?`Done`:r===`error`?`Error`:`Running`}),(0,L.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,L.jsx)(Id,{ms:c,live:r===`running`?p:void 0}),(0,L.jsx)(Fd,{status:r})]})]}),y&&(0,L.jsx)(`p`,{"data-tool-summary":!0,title:y,className:`px-3 pb-2 truncate font-mono text-xs text-foreground`,children:y}),b.length>0&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>f(e=>!e),className:`w-full border-t border-border/50 px-3 py-1.5 text-left`,"aria-expanded":d,children:(0,L.jsx)(`p`,{className:I(`font-mono text-[11px] text-muted-foreground`,!d&&`line-clamp-2`),children:b})}),v&&(0,L.jsxs)(`div`,{className:`border-t border-border/50`,children:[(0,L.jsxs)(`button`,{type:`button`,onClick:()=>u(e=>!e),className:`flex w-full cursor-pointer items-center gap-1 px-3 py-1.5 text-[11px] text-muted-foreground select-none hover:text-foreground`,"aria-expanded":l,children:[(0,L.jsx)(ye,{className:I(`h-3 w-3 shrink-0 transition-transform duration-150`,l&&`rotate-90`)}),`Output`]}),(0,L.jsx)(Od,{open:l,children:(0,L.jsxs)(`div`,{className:`px-3 pb-2 pt-1`,children:[s&&(0,L.jsx)(kd,{diff:s}),!s&&(0,L.jsx)(Md,{toolUseId:e,preview:i,clipped:o,unavailable:a})]})})]})]})});function Rd(e){if(e<1e3)return`${e}ms`;let t=e/1e3;return t<60?`${t.toFixed(1)}s`:`${Math.floor(t/60)}m ${Math.floor(t%60)}s`}function zd(e){return e<.001?`<$0.001`:`$${e.toFixed(3)}`}function Bd({status:e}){let t=`h-3.5 w-3.5 shrink-0`;switch(e){case`started`:return(0,L.jsx)(_t,{className:I(t,`animate-pulse text-status-blocked`),"aria-label":`running`});case`succeeded`:case`completed`:return(0,L.jsx)(M,{className:I(t,`text-status-running`),"aria-label":`succeeded`});case`failed`:return(0,L.jsx)(De,{className:I(t,`text-status-failed`),"aria-label":`failed`});case`cancelled`:return(0,L.jsx)(zt,{className:I(t,`text-muted-foreground`),"aria-label":`cancelled`});default:return(0,L.jsx)(Te,{className:I(t,`text-muted-foreground`),"aria-label":`unknown`})}}function Vd(e){switch(e){case`succeeded`:case`completed`:return`text-foreground`;case`failed`:return`text-foreground`;case`started`:return`text-foreground`;default:return`text-muted-foreground`}}function Hd({node:e,isExpanded:t,onToggle:n,isChild:r}){let{item:i}=e,a=e.children.length>0;return(0,L.jsxs)(`div`,{className:I(`flex items-start gap-2 px-3 py-2`,a&&`cursor-pointer select-none`,r&&`py-1.5`),onClick:a?n:void 0,role:a?`button`:void 0,tabIndex:a?0:void 0,onKeyDown:a?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())}:void 0,"aria-expanded":a?t:void 0,children:[a?(0,L.jsx)(ye,{className:I(`mt-0.5 h-3 w-3 shrink-0 text-muted-foreground transition-transform`,t&&`rotate-90`)}):(0,L.jsx)(`span`,{className:`h-3 w-3 shrink-0`}),(0,L.jsx)(`span`,{className:`mt-0.5`,children:(0,L.jsx)(Bd,{status:i.status})}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,L.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:i.agentType??i.label}),i.model&&(0,L.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:i.model}),i.durationMs!==void 0&&(0,L.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:Rd(i.durationMs)}),i.totalCostUsd!==void 0&&(0,L.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:zd(i.totalCostUsd)}),(0,L.jsx)(`span`,{className:I(`ml-auto font-mono text-[10px] capitalize`,Vd(i.status)),children:i.status})]}),i.promptHead&&(0,L.jsxs)(`p`,{className:`mt-0.5 line-clamp-1 text-[11px] italic text-muted-foreground`,children:[`“`,i.promptHead,`”`]})]})]})}function Ud({node:e,isChild:t=!1}){let[n,r]=(0,O.useState)(!0),i=e.children.length>0;return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(Hd,{node:e,isExpanded:n,onToggle:()=>r(e=>!e),isChild:t}),i&&n&&(0,L.jsx)(`div`,{className:`ml-6 border-l border-border/50 pl-3`,children:e.children.map((t,n)=>(0,L.jsx)(`div`,{className:I(n<e.children.length-1&&`border-b border-border/30`),children:(0,L.jsx)(Ud,{node:t,isChild:!0})},t.item.subagentId))})]})}function Wd({roots:e,className:t}){return e.length===0?null:(0,L.jsx)(`div`,{className:I(`rounded-md border border-border bg-card`,t),children:e.map((t,n)=>(0,L.jsx)(`div`,{className:I(n<e.length-1&&`border-b border-border/50`),children:(0,L.jsx)(Ud,{node:t})},t.item.subagentId))})}function Gd(e){let t=new Map,n=[];for(let r of e){if(r.kind!==`subagent`||t.get(r.subagentId))continue;let e={item:r,children:[]};if(t.set(r.subagentId,e),r.parentId){let i=t.get(r.parentId);i?i.children.push(e):n.push(e)}else n.push(e)}let r=[];for(let e of n){let n=e.item.parentId?t.get(e.item.parentId):void 0;n?n.children.push(e):r.push(e)}return r}var Kd=new Set([`read_file`,`glob`,`grep`,`list_directory`,`json_query`,`read_witness`,`search_witness`,`get_facet`,`clipboard_read`]),qd=new Set([`write_file`,`edit_file`,`patch_apply`,`clipboard_write`,`procedure_write`]),Jd=new Set([`bash`,`test_run`,`wait_for`]),Yd=new Set([`agent`,`send_message_to_agent`,`cancel_background_job`]),Xd=new Set([`skill`]),Zd=new Set([`compose`]),Qd=new Set([`web_scrape`,`web_request`]),$d=new Set([`browser_open`,`browser_act`,`browser_observe`,`browser_screenshot`,`browser_close`]),ef=new Set([`memory_search`,`memory_update`,`state_get`,`state_put`,`state_cas`,`state_delete`,`state_query`,`workspace_publish`,`workspace_query`]);function tf(e){return Kd.has(e)?`read`:qd.has(e)?`write`:Jd.has(e)?`shell`:Yd.has(e)?`agent`:Xd.has(e)?`skill`:Zd.has(e)?`dag`:Qd.has(e)?`web`:$d.has(e)?`browser`:ef.has(e)?`other`:e.startsWith(`mcp__`)?`mcp`:`other`}function nf(e){if(e<1e3)return`<1s`;let t=e/1e3;return t<60?`${t.toFixed(1)}s`:`${Math.floor(t/60)}m ${Math.floor(t%60)}s`}function rf(e){return e<.001?`<$0.001`:`$${e.toFixed(3)}`}function af(e){return e===`error`?`error`:e===`ok`?`ok`:`running`}function of(e){return e===`succeeded`?`ok`:e===`failed`?`error`:e===`cancelled`?`cancelled`:`running`}function sf(e,t){let n=af(e.status);return{id:e.id,kind:`tool`,label:e.name,category:tf(e.name),status:n,preview:e.inputPreview,durationMs:e.durationMs,output:e.output,outputClipped:e.outputClipped,outputUnavailable:e.outputUnavailable,children:[],isActive:n===`running`,sourceId:e.toolUseId,seq:t}}function cf(e,t){let n=of(e.status);return{id:e.id,kind:`agent`,label:e.label,category:`agent`,status:n,preview:e.promptHead,durationMs:e.durationMs,costUsd:e.totalCostUsd,model:e.model,agentType:e.agentType,turnCount:e.turnCount,children:[],isActive:n===`running`,sourceId:e.subagentId,seq:t}}function lf(e){let t=[],n=[],r=new Map;for(let i=0;i<e.length;i++){let a=e[i];a!==void 0&&(a.kind===`tool`&&(t.push(a),r.set(a.id,i)),a.kind===`subagent`&&(n.push(a),r.set(a.id,i)))}let i=new Map;for(let e of t)e.toolUseId&&i.set(e.toolUseId,e);let a=new Map,o=new Map;for(let e of t)a.set(e.id,sf(e,r.get(e.id)??0));for(let e of n)o.set(e.subagentId,cf(e,r.get(e.id)??0));let s=[],c=[];for(let e of n){let t=o.get(e.subagentId);if(t){if(e.parentToolUseId){let n=i.get(e.parentToolUseId);if(n){let e=a.get(n.id);if(e){e.kind=`agent`,e.children.push(t);continue}}c.push(t)}else if(e.parentId){let n=o.get(e.parentId);if(n){n.children.push(t);continue}c.push(t)}else s.push(t)}}let l=[];for(let e of c){let t=n.find(t=>t.subagentId===e.sourceId);if(!t){s.push(e);continue}let r=!1;if(t.parentToolUseId){let n=i.get(t.parentToolUseId);if(n){let t=a.get(n.id);t&&(t.kind=`agent`,t.children.push(e),r=!0)}}if(!r&&t.parentId){let n=o.get(t.parentId);n&&(n.children.push(e),r=!0)}r||l.push(e)}for(let e of l)s.push(e);for(let e of t){let t=a.get(e.id);t&&s.push(t)}return s.sort((e,t)=>e.seq-t.seq),s}var uf={read:Ve,write:ze,shell:Vt,agent:qe,skill:Nt,dag:st,mcp:yt,web:Le,browser:Ye,plan:tt,other:Gt},df={read:`text-cat-read`,write:`text-cat-write`,shell:`text-cat-shell`,agent:`text-cat-agent`,skill:`text-cat-skill`,dag:`text-cat-dag`,mcp:`text-cat-mcp`,web:`text-cat-web`,browser:`text-cat-browser`,plan:`text-cat-plan`,other:`text-cat-other`};function ff(e){let t=0;for(let n of e.children)n.kind===`tool`&&t++,t+=ff(n);return t}function pf(e){let t=e.durationMs??0;for(let n of e.children)t+=pf(n);return t}function mf({category:e,status:t}){let n=uf[e],r=df[e];return(0,L.jsx)(n,{className:I(`h-3.5 w-3.5 shrink-0`,r,t===`running`&&`animate-shimmer-pulse`,t===`error`&&`text-status-failed`,t===`cancelled`&&`opacity-50`),"aria-hidden":!0})}function hf({node:e}){if(e.status===`running`||e.children.length===0)return null;if(e.status===`error`)return(0,L.jsx)(`div`,{className:`mt-0.5 pl-5 text-[11px] text-status-failed`,children:`Failed`});if(e.status===`cancelled`)return(0,L.jsx)(`div`,{className:`mt-0.5 pl-5 text-[11px] text-muted-foreground`,children:`Cancelled`});let t=ff(e),n=e.durationMs??pf(e),r=e.costUsd,i=[];return t>0&&i.push(`${t} tool${t===1?``:`s`}`),n>0&&i.push(nf(n)),r!=null&&r>0&&i.push(rf(r)),(0,L.jsxs)(`div`,{className:`mt-0.5 pl-5 text-[11px] text-muted-foreground`,children:[`Done`,i.length>0?` (${i.join(` · `)})`:``]})}function gf({node:e,depth:t=0,isLast:n=!1}){let r=e.kind===`agent`&&e.children.length>0,[i,a]=(0,O.useState)(e.isActive),o=e.kind===`tool`&&(e.output!==void 0&&e.output.trim().length>0||e.sourceId!==void 0&&e.outputUnavailable===!0),[s,c]=(0,O.useState)(!1),l=(0,O.useContext)(Ed),u=Sd(e.label,e.preview??``,l),d=e.children.length>0,f=e.kind===`agent`,p=i?_e:ye,m=r||o;return(0,L.jsxs)(`div`,{className:I(`relative`,t>0&&`pl-3`),children:[(0,L.jsxs)(`div`,{className:I(`flex flex-wrap items-center gap-1.5 py-1 group rounded focus-visible:outline-2 focus-visible:outline-ring`,m&&`cursor-pointer select-none hover:bg-muted/20`),onClick:m?()=>{r?a(e=>!e):o&&c(e=>!e)}:void 0,role:m?`button`:void 0,tabIndex:m?0:void 0,onKeyDown:m?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r?a(e=>!e):o&&c(e=>!e))}:void 0,"aria-expanded":r?i:o?s:void 0,children:[r?(0,L.jsx)(p,{className:`h-3 w-3 shrink-0 text-muted-foreground`}):(0,L.jsx)(`span`,{className:`h-3 w-3 shrink-0`,"aria-hidden":!0}),(0,L.jsx)(mf,{category:e.category,status:e.status}),(0,L.jsx)(`span`,{className:I(`text-[12px] font-mono leading-none`,e.status===`cancelled`&&`opacity-50`,e.status===`error`&&`text-foreground`,e.status===`running`&&`text-foreground`,e.status===`ok`&&`text-foreground/80`),children:e.label}),(0,L.jsx)(`span`,{className:`text-[10px] text-foreground shrink-0`,children:e.status===`ok`?`✓ Done`:e.status===`error`?`! Error`:e.status===`cancelled`?`— Cancelled`:`◌ Running`}),f&&e.model&&(0,L.jsx)(`span`,{className:`bg-secondary rounded px-1 py-0.5 text-[10px] font-mono text-muted-foreground`,children:e.model}),f&&e.agentType&&(0,L.jsx)(`span`,{className:`bg-secondary rounded px-1 py-0.5 text-[10px] font-mono text-muted-foreground`,children:e.agentType}),f&&e.turnCount!=null&&e.turnCount>0&&(0,L.jsxs)(`span`,{className:`text-[10px] font-mono text-muted-foreground`,children:[e.turnCount,` turn`,e.turnCount===1?``:`s`]}),e.durationMs!=null&&e.durationMs>0&&(0,L.jsx)(`span`,{className:`text-[10px] font-mono text-muted-foreground tabular-nums`,children:nf(e.durationMs)}),f&&e.costUsd!=null&&e.costUsd>0&&(0,L.jsx)(`span`,{className:`text-[10px] font-mono text-muted-foreground`,children:rf(e.costUsd)}),u&&(0,L.jsx)(`span`,{title:u,className:`min-w-0 basis-full pl-5 truncate font-mono text-xs text-foreground`,"data-tool-summary":!0,children:u})]}),o&&s&&(0,L.jsx)(`div`,{className:`pl-5 mb-1`,children:(0,L.jsx)(`div`,{className:`mt-0.5 rounded border border-border/50 bg-card px-2 py-1`,children:(0,L.jsx)(Md,{toolUseId:e.sourceId,preview:e.output,clipped:e.outputClipped,unavailable:e.outputUnavailable})})}),f&&!i&&d&&(0,L.jsx)(hf,{node:e}),d&&i&&(0,L.jsxs)(`div`,{className:I(`relative mt-0.5 ml-[22px]`,`border-l-2 border-spine`),children:[e.children.map((n,r)=>{let i=r===e.children.length-1;return(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(`div`,{className:I(`absolute left-0 top-[10px] h-0 w-3`,`border-t-2 border-spine`,i&&`last-child-clip`),"aria-hidden":!0}),i&&(0,L.jsx)(`div`,{className:`absolute left-[-2px] top-[10px] bottom-0 w-[2px] bg-background`,"aria-hidden":!0}),(0,L.jsx)(`div`,{className:`pl-3`,children:(0,L.jsx)(gf,{node:n,depth:t+1,isLast:i})})]},n.id)}),f&&e.status!==`running`&&(0,L.jsx)(hf,{node:e})]}),f&&(!d||!i)&&e.status!==`running`&&(d?null:(0,L.jsx)(hf,{node:e}))]})}function _f({nodes:e,className:t}){return e.length===0?null:(0,L.jsxs)(`div`,{className:I(`relative pl-3 border-l-2 border-spine/40`,t),children:[(0,L.jsx)(`div`,{className:`mb-1 text-[10px] font-semibold uppercase tracking-widest text-foreground/60 select-none`,children:`Execution`}),(0,L.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.map((t,n)=>(0,L.jsx)(gf,{node:t,depth:0,isLast:n===e.length-1},t.id))})]})}var vf=new Set([`tool`,`subagent`,`notice`]),yf=new Set([`user`,`assistant`,`thinking`,`error`,`stopped`,`bg_job`]);function bf(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===void 0){n++;continue}if(yf.has(r.kind)||!vf.has(r.kind)){t.push({kind:`text`,item:r}),n++;continue}let i=[];for(;n<e.length;){let t=e[n];if(t===void 0||!vf.has(t.kind))break;i.push(t),n++}if(i.length>0){let e=lf(i);e.length>0&&t.push({kind:`execution`,items:i,id:i[0].id,spineNodes:e})}}return t}function xf({slots:e,renderTextItem:t}){return(0,L.jsx)(Dd,{children:e.map((e,n)=>e.kind===`text`?t(e.item,n):(0,L.jsx)(`div`,{className:`py-2 px-1 [content-visibility:auto] [contain-intrinsic-size:auto_100px]`,children:(0,L.jsx)(_f,{nodes:e.spineNodes})},e.id))})}function Sf(e){return(0,O.useMemo)(()=>bf(e),[e])}function Cf(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var wf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ef={};function Df(e,t){return((t||Ef).jsx?Tf:wf).test(e)}var Of=/[ \t\n\f\r]/g;function kf(e){return typeof e==`object`?e.type===`text`&&Af(e.value):Af(e)}function Af(e){return e.replace(Of,``)===``}var jf=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};jf.prototype.normal={},jf.prototype.property={},jf.prototype.space=void 0;function Mf(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new jf(n,r,t)}function Nf(e){return e.toLowerCase()}var Pf=class{constructor(e,t){this.attribute=t,this.property=e}};Pf.prototype.attribute=``,Pf.prototype.booleanish=!1,Pf.prototype.boolean=!1,Pf.prototype.commaOrSpaceSeparated=!1,Pf.prototype.commaSeparated=!1,Pf.prototype.defined=!1,Pf.prototype.mustUseProperty=!1,Pf.prototype.number=!1,Pf.prototype.overloadedBoolean=!1,Pf.prototype.property=``,Pf.prototype.spaceSeparated=!1,Pf.prototype.space=void 0;var Ff=s({boolean:()=>q,booleanish:()=>Lf,commaOrSpaceSeparated:()=>Vf,commaSeparated:()=>Bf,number:()=>J,overloadedBoolean:()=>Rf,spaceSeparated:()=>zf}),If=0,q=Hf(),Lf=Hf(),Rf=Hf(),J=Hf(),zf=Hf(),Bf=Hf(),Vf=Hf();function Hf(){return 2**++If}var Uf=Object.keys(Ff),Wf=class extends Pf{constructor(e,t,n,r){let i=-1;if(super(e,t),Y(this,`space`,r),typeof n==`number`)for(;++i<Uf.length;){let e=Uf[i];Y(this,Uf[i],(n&Ff[e])===Ff[e])}}};Wf.prototype.defined=!0;function Y(e,t,n){n&&(e[t]=n)}function Gf(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Wf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Nf(r)]=r,n[Nf(a.attribute)]=r}return new jf(t,n,e.space)}var Kf=Gf({properties:{ariaActiveDescendant:null,ariaAtomic:Lf,ariaAutoComplete:null,ariaBusy:Lf,ariaChecked:Lf,ariaColCount:J,ariaColIndex:J,ariaColSpan:J,ariaControls:zf,ariaCurrent:null,ariaDescribedBy:zf,ariaDetails:null,ariaDisabled:Lf,ariaDropEffect:zf,ariaErrorMessage:null,ariaExpanded:Lf,ariaFlowTo:zf,ariaGrabbed:Lf,ariaHasPopup:null,ariaHidden:Lf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:zf,ariaLevel:J,ariaLive:null,ariaModal:Lf,ariaMultiLine:Lf,ariaMultiSelectable:Lf,ariaOrientation:null,ariaOwns:zf,ariaPlaceholder:null,ariaPosInSet:J,ariaPressed:Lf,ariaReadOnly:Lf,ariaRelevant:null,ariaRequired:Lf,ariaRoleDescription:zf,ariaRowCount:J,ariaRowIndex:J,ariaRowSpan:J,ariaSelected:Lf,ariaSetSize:J,ariaSort:null,ariaValueMax:J,ariaValueMin:J,ariaValueNow:J,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function qf(e,t){return t in e?e[t]:t}function Jf(e,t){return qf(e,t.toLowerCase())}var Yf=Gf({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Bf,acceptCharset:zf,accessKey:zf,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alpha:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:zf,autoFocus:q,autoPlay:q,blocking:zf,capture:null,charSet:null,checked:q,cite:null,className:zf,closedBy:null,colorSpace:null,cols:J,colSpan:J,command:null,commandFor:null,content:null,contentEditable:Lf,controls:q,controlsList:zf,coords:J|Bf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:Rf,draggable:Lf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:zf,height:J,hidden:Rf,high:J,href:null,hrefLang:null,htmlFor:zf,httpEquiv:zf,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:zf,itemRef:zf,itemScope:q,itemType:zf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:J,manifest:null,max:null,maxLength:J,media:null,method:null,min:null,minLength:J,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,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:q,optimum:J,pattern:null,ping:zf,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:zf,required:q,reversed:q,rows:J,rowSpan:J,sandbox:zf,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootCustomElementRegistry:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shadowRootSerializable:q,shape:null,size:J,sizes:null,slot:null,span:J,spellCheck:Lf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:J,step:null,style:null,tabIndex:J,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:Lf,width:J,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:zf,axis:null,background:null,bgColor:null,border:J,borderColor:null,bottomMargin:J,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:J,leftMargin:J,link:null,longDesc:null,lowSrc:null,marginHeight:J,marginWidth:J,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:J,rules:null,scheme:null,scrolling:Lf,standby:null,summary:null,text:null,topMargin:J,valueType:null,version:null,vAlign:null,vLink:null,vSpace:J,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:q,disablePictureInPicture:q,disableRemotePlayback:q,exportParts:Bf,part:zf,prefix:null,property:null,results:J,security:null,unselectable:null},space:`html`,transform:Jf}),Xf=Gf({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:Vf,accentHeight:J,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:J,amplitude:J,arabicForm:null,ascent:J,attributeName:null,attributeType:null,azimuth:J,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:J,by:null,calcMode:null,capHeight:J,className:zf,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:J,diffuseConstant:J,direction:null,display:null,dur:null,divisor:J,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:J,enableBackground:null,end:null,event:null,exponent:J,externalResourcesRequired:null,fill:null,fillOpacity:J,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:Bf,g2:Bf,glyphName:Bf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:J,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:J,horizOriginX:J,horizOriginY:J,id:null,ideographic:J,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:J,k:J,k1:J,k2:J,k3:J,k4:J,kernelMatrix:Vf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:J,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:J,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:J,overlineThickness:J,paintOrder:null,panose1:null,path:null,pathLength:J,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:zf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:J,pointsAtY:J,pointsAtZ:J,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Vf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vf,rev:Vf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vf,requiredFeatures:Vf,requiredFonts:Vf,requiredFormats:Vf,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:J,specularExponent:J,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:J,strikethroughThickness:J,string:null,stroke:null,strokeDashArray:Vf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:J,strokeOpacity:J,strokeWidth:null,style:null,surfaceScale:J,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Vf,tabIndex:J,tableValues:null,target:null,targetX:J,targetY:J,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Vf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:J,underlineThickness:J,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:J,values:null,vAlphabetic:J,vMathematical:J,vectorEffect:null,vHanging:J,vIdeographic:J,version:null,vertAdvY:J,vertOriginX:J,vertOriginY:J,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:J,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:qf}),Zf=Gf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Qf=Gf({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Jf}),$f=Gf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ep={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`},tp=/[A-Z]/g,np=/-[a-z]/g,rp=/^data[-\w.:]+$/i;function ip(e,t){let n=Nf(t),r=t,i=Pf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&rp.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(np,op);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!np.test(e)){let n=e.replace(tp,ap);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Wf}return new i(r,t)}function ap(e){return`-`+e.toLowerCase()}function op(e){return e.charAt(1).toUpperCase()}var sp=Mf([Kf,Yf,Zf,Qf,$f],`html`),cp=Mf([Kf,Xf,Zf,Qf,$f],`svg`);function lp(e){return e.join(` `).trim()}var up=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
59
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),dp=o(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(up());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),fp=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),pp=o(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(dp()),i=fp();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),mp=gp(`end`),hp=gp(`start`);function gp(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function _p(e){let t=hp(e),n=mp(e);if(t&&n)return{start:t,end:n}}function vp(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?bp(e.position):`start`in e||`end`in e?bp(e):`line`in e||`column`in e?yp(e):``}function yp(e){return xp(e&&e.line)+`:`+xp(e&&e.column)}function bp(e){return yp(e&&e.start)+`-`+yp(e&&e.end)}function xp(e){return e&&typeof e==`number`?e:1}var Sp=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=vp(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Sp.prototype.file=``,Sp.prototype.name=``,Sp.prototype.reason=``,Sp.prototype.message=``,Sp.prototype.stack=``,Sp.prototype.column=void 0,Sp.prototype.line=void 0,Sp.prototype.ancestors=void 0,Sp.prototype.cause=void 0,Sp.prototype.fatal=void 0,Sp.prototype.place=void 0,Sp.prototype.ruleId=void 0,Sp.prototype.source=void 0;var Cp=l(pp(),1),wp={}.hasOwnProperty,Tp=new Map,Ep=/[A-Z]/g,Dp=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Op=new Set([`td`,`th`]),kp=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Ap(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Vp(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Bp(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?cp:sp,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=jp(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function jp(e,t,n){if(t.type===`element`)return Mp(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Np(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Fp(e,t,n);if(t.type===`mdxjsEsm`)return Pp(e,t);if(t.type===`root`)return Ip(e,t,n);if(t.type===`text`)return Lp(e,t)}function Mp(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=cp,e.schema=i),e.ancestors.push(t);let a=qp(e,t.tagName,!1),o=Hp(e,t),s=Wp(e,t);return Dp.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!kf(e)})),Rp(e,o,a,t),zp(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Np(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Jp(e,t.position)}function Pp(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Jp(e,t.position)}function Fp(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=cp,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:qp(e,t.name,!0),o=Up(e,t),s=Wp(e,t);return Rp(e,o,a,t),zp(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ip(e,t,n){let r={};return zp(r,Wp(e,t)),e.create(t,e.Fragment,r,n)}function Lp(e,t){return t.value}function Rp(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zp(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Bp(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Vp(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=hp(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Hp(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&wp.call(t.properties,i)){let a=Gp(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Op.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Up(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Jp(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Jp(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Wp(e,t){let n=[],r=-1,i=e.passKeys?new Map:Tp;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=jp(e,a,o);s!==void 0&&n.push(s)}return n}function Gp(e,t,n){let r=ip(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Cf(n):lp(n)),r.property===`style`){let t=typeof n==`object`?n:Kp(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Yp(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ep[r.property]||r.property:r.attribute,n]}}function Kp(e,t){try{return(0,Cp.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Sp("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=kp+`#cannot-parse-style-attribute`,r}}function qp(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Df(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Df(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return wp.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Jp(e)}function Jp(e,t){let n=new Sp("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=kp+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Yp(e){let t={},n;for(n in e)wp.call(e,n)&&(t[Xp(n)]=e[n]);return t}function Xp(e){let t=e.replace(Ep,Zp);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Zp(e){return`-`+e.toLowerCase()}var Qp={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`]},$p={};function em(e,t){let n=t||$p;return tm(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function tm(e,t,n){if(rm(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return nm(e.children,t,n)}return Array.isArray(e)?nm(e,t,n):``}function nm(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=tm(e[i],t,n);return r.join(``)}function rm(e){return!!(e&&typeof e==`object`)}var im=document.createElement(`i`);function am(e){let t=`&`+e+`;`;im.innerHTML=t;let n=im.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function om(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function sm(e,t){return e.length>0?(om(e,e.length,0,t),e):t}var cm={}.hasOwnProperty;function lm(e){let t={},n=-1;for(;++n<e.length;)um(t,e[n]);return t}function um(e,t){let n;for(n in t){let r=(cm.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){cm.call(r,a)||(r[a]=[]);let e=i[a];dm(r[a],Array.isArray(e)?e:e?[e]:[])}}}function dm(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);om(e,0,0,r)}function fm(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function pm(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var mm=Cm(/[A-Za-z]/),hm=Cm(/[\dA-Za-z]/),gm=Cm(/[#-'*+\--9=?A-Z^-~]/);function _m(e){return e!==null&&(e<32||e===127)}var vm=Cm(/\d/),ym=Cm(/[\dA-Fa-f]/),bm=Cm(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var xm=Cm(/\p{P}|\p{S}/u),Sm=Cm(/\s/);function Cm(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function wm(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&hm(e.charCodeAt(n+1))&&hm(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function $(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Tm={tokenize:Em};function Em(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return X(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Dm={tokenize:km},Om={tokenize:Am};function km(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return om(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Om,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Om,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return X(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;om(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Am(e,t,n){return $(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function jm(e){if(e===null||Z(e)||Sm(e))return 1;if(xm(e))return 2}function Mm(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Nm={name:`attention`,resolveAll:Pm,tokenize:Fm};function Pm(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Im(d,-c),Im(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=sm(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=sm(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=sm(l,Mm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=sm(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=sm(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,om(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Fm(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=jm(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=jm(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Im(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Lm={name:`autolink`,tokenize:Rm};function Rm(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return mm(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||hm(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||hm(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||_m(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):gm(t)?(e.consume(t),l):n(t)}function u(e){return hm(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||hm(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var zm={partial:!0,tokenize:Bm};function Bm(e,t,n){return r;function r(t){return Q(t)?$(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||X(e)?t(e):n(e)}}var Vm={continuation:{tokenize:Um},exit:Wm,name:`blockQuote`,tokenize:Hm};function Hm(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Um(e,t,n){let r=this;return i;function i(t){return Q(t)?$(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Vm,t,n)(r)}}function Wm(e){e.exit(`blockQuote`)}var Gm={name:`characterEscape`,tokenize:Km};function Km(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return bm(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var qm={name:`characterReference`,tokenize:Jm};function Jm(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=hm,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=ym,u):(e.enter(`characterReferenceValue`),a=7,o=vm,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===hm&&!am(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Ym={partial:!0,tokenize:Qm},Xm={concrete:!0,name:`codeFenced`,tokenize:Zm};function Zm(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||X(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Ym,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||X(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Q(t)?$(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||X(t)?e.check(Ym,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||X(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Q(t)?$(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||X(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Qm(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var $m={name:`codeIndented`,tokenize:th},eh={partial:!0,tokenize:nh};function th(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),$(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):X(t)?e.attempt(eh,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||X(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function nh(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):$(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):X(e)?i(e):n(e)}}var rh={name:`codeText`,previous:ah,resolve:ih,tokenize:oh};function ih(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ah(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function oh(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||X(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var sh=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ch(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ch(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ch(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);ch(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ch(this.left,t.reverse())}}}};function ch(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function lh(e){let t={},n=-1,r,i,a,o,s,c,l,u=new sh(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,uh(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return om(e,0,1/0,u.slice(0)),!l}function uh(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var dh={resolve:ph,tokenize:mh},fh={partial:!0,tokenize:hh};function ph(e){return lh(e),e}function mh(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):X(t)?e.check(fh,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function hh(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,a,`linePrefix`)}function a(i){if(i===null||X(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function gh(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||_m(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||X(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Z(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||_m(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function _h(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):X(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||X(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function vh(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||X(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function yh(e,t){let n;return r;function r(i){return X(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?$(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var bh={name:`definition`,tokenize:Sh},xh={partial:!0,tokenize:Ch};function Sh(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return _h.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=pm(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Z(t)?yh(e,l)(t):l(t)}function l(t){return gh(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(xh,d,d)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||X(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ch(e,t,n){return r;function r(t){return Z(t)?yh(e,i)(t):n(t)}function i(t){return vh(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?$(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||X(e)?t(e):n(e)}}var wh={name:`hardBreakEscape`,tokenize:Th};function Th(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return X(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Eh={name:`headingAtx`,resolve:Dh,tokenize:Oh};function Dh(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},om(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Oh(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Z(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||X(n)?(e.exit(`atxHeading`),t(n)):Q(n)?$(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Z(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var kh=`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`.split(`.`),Ah=[`pre`,`script`,`style`,`textarea`],jh={concrete:!0,name:`htmlFlow`,resolveTo:Ph,tokenize:Fh},Mh={partial:!0,tokenize:Lh},Nh={partial:!0,tokenize:Ih};function Ph(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Fh(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:A):mm(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):mm(a)?(e.consume(a),i=4,r.interrupt?t:A):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:A):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return mm(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Z(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Ah.includes(l)?(i=1,r.interrupt?t(s):O(s)):kh.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||hm(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||mm(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||hm(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||X(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Z(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||X(t)?O(t):Q(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),k):t===60&&i===1?(e.consume(t),re):t===62&&i===4?(e.consume(t),oe):t===63&&i===3?(e.consume(t),A):t===93&&i===5?(e.consume(t),ae):X(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Mh,se,ee)(t)):t===null||X(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(Nh,te,se)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return t===null||X(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function k(t){return t===45?(e.consume(t),A):O(t)}function re(t){return t===47?(e.consume(t),o=``,ie):O(t)}function ie(t){if(t===62){let n=o.toLowerCase();return Ah.includes(n)?(e.consume(t),oe):O(t)}return mm(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ie):O(t)}function ae(t){return t===93?(e.consume(t),A):O(t)}function A(t){return t===62?(e.consume(t),oe):t===45&&i===2?(e.consume(t),A):O(t)}function oe(t){return t===null||X(t)?(e.exit(`htmlFlowData`),se(t)):(e.consume(t),oe)}function se(n){return e.exit(`htmlFlow`),t(n)}}function Ih(e,t,n){let r=this;return i;function i(t){return X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Lh(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(zm,t,n)}}var Rh={name:`htmlText`,tokenize:zh};function zh(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):mm(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):mm(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):X(t)?(o=d,re(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?k(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):X(t)?(o=h,re(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?k(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?k(t):X(t)?(o=v,re(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):X(t)?(o=y,re(t)):(e.consume(t),y)}function b(e){return e===62?k(e):y(e)}function x(t){return mm(t)?(e.consume(t),S):n(t)}function S(t){return t===45||hm(t)?(e.consume(t),S):C(t)}function C(t){return X(t)?(o=C,re(t)):Q(t)?(e.consume(t),C):k(t)}function w(t){return t===45||hm(t)?(e.consume(t),w):t===47||t===62||Z(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),k):t===58||t===95||mm(t)?(e.consume(t),E):X(t)?(o=T,re(t)):Q(t)?(e.consume(t),T):k(t)}function E(t){return t===45||t===46||t===58||t===95||hm(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):X(t)?(o=D,re(t)):Q(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):X(t)?(o=O,re(t)):Q(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,ne):t===null?n(t):X(t)?(o=ee,re(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Z(t)?T(t):(e.consume(t),te)}function ne(e){return e===47||e===62||Z(e)?T(e):n(e)}function k(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function re(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ie}function ie(t){return Q(t)?$(e,ae,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ae(t)}function ae(t){return e.enter(`htmlTextData`),o(t)}}var Bh={name:`labelEnd`,resolveAll:Wh,resolveTo:Gh,tokenize:Kh},Vh={tokenize:qh},Hh={tokenize:Jh},Uh={tokenize:Yh};function Wh(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&om(e,0,e.length,n),e}function Gh(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=sm(s,e.slice(a+1,a+r+3)),s=sm(s,[[`enter`,u,t]]),s=sm(s,Mm(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=sm(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=sm(s,e.slice(o+1)),s=sm(s,[[`exit`,c,t]]),om(e,a,e.length,s),e}function Kh(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(pm(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Vh,u,o?u:d)(t):t===91?e.attempt(Hh,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Uh,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function qh(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Z(t)?yh(e,a)(t):a(t)}function a(t){return t===41?u(t):gh(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Z(t)?yh(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?vh(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Z(t)?yh(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Jh(e,t,n){let r=this;return i;function i(t){return _h.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(pm(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Yh(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Xh={name:`labelStartImage`,resolveAll:Bh.resolveAll,tokenize:Zh};function Zh(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Qh={name:`labelStartLink`,resolveAll:Bh.resolveAll,tokenize:$h};function $h(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var eg={name:`lineEnding`,tokenize:tg};function tg(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}}var ng={name:`thematicBreak`,tokenize:rg};function rg(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||X(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?$(e,s,`whitespace`)(t):s(t))}}var ig={continuation:{tokenize:cg},exit:ug,name:`list`,tokenize:sg},ag={partial:!0,tokenize:dg},og={partial:!0,tokenize:lg};function sg(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:vm(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(ng,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return vm(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(zm,r.interrupt?n:u,e.attempt(ag,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function cg(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(zm,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(og,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(ig,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function lg(e,t,n){let r=this;return $(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function ug(e){e.exit(this.containerState.type)}function dg(e,t,n){let r=this;return $(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var fg={name:`setextUnderline`,resolveTo:pg,tokenize:mg};function pg(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function mg(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Q(t)?$(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||X(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var hg={tokenize:gg};function gg(e){let t=this,n=e.attempt(zm,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(dh,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var _g={resolveAll:xg()},vg=bg(`string`),yg=bg(`text`);function bg(e){return{resolveAll:xg(e===`text`?Sg:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function xg(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Sg(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Cg=s({attentionMarkers:()=>jg,contentInitial:()=>Tg,disable:()=>Mg,document:()=>wg,flow:()=>Dg,flowInitial:()=>Eg,insideSpan:()=>Ag,string:()=>Og,text:()=>kg}),wg={42:ig,43:ig,45:ig,48:ig,49:ig,50:ig,51:ig,52:ig,53:ig,54:ig,55:ig,56:ig,57:ig,62:Vm},Tg={91:bh},Eg={[-2]:$m,[-1]:$m,32:$m},Dg={35:Eh,42:ng,45:[fg,ng],60:jh,61:fg,95:ng,96:Xm,126:Xm},Og={38:qm,92:Gm},kg={[-5]:eg,[-4]:eg,[-3]:eg,33:Xh,38:qm,42:Nm,60:[Lm,Rh],91:Qh,92:[wh,Gm],93:Bh,95:Nm,96:rh},Ag={null:[Nm,_g]},jg={null:[42,95]},Mg={null:[]};function Ng(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=sm(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Mm(a,l.events,l),l.events):[]}function f(e,t){return Fg(p(e),t)}function p(e){return Pg(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){X(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&om(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Pg(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Fg(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
60
|
+
`;break;case-3:o=`\r
|
|
61
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Ig(e){let t={constructs:lm([Cg,...(e||{}).extensions||[]]),content:n(Tm),defined:[],document:n(Dm),flow:n(hg),lazy:{},string:n(vg),text:n(yg)};return t;function n(e){return n;function n(n){return Ng(t,e,n)}}}function Lg(e){for(;!lh(e););return e}var Rg=/[\0\t\n\r]/g;function zg(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Rg.lastIndex=u,c=Rg.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Bg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vg(e){return e.replace(Bg,Hg)}function Hg(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return fm(n.slice(t?2:1),t?16:10)}return am(n)||e}var Ug={}.hasOwnProperty;function Wg(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Gg(n)(Lg(Ig(n).document().write(zg()(e,t,!0))))}function Gg(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Se),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(j),blockQuote:a(he),characterEscape:T,characterReference:T,codeFenced:a(ge),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ge,o),codeText:a(_e,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ve),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ye),hardBreakEscape:a(M),hardBreakTrailing:a(M),htmlFlow:a(be,o),htmlFlowData:T,htmlText:a(be,o),htmlTextData:T,image:a(xe),label:o,link:a(Se),listItem:a(we),listItemValue:f,listOrdered:a(Ce,d),listUnordered:a(Ce),paragraph:a(Te),reference:ce,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(j),strong:a(Ee),thematicBreak:a(Oe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:me,autolinkProtocol:pe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:de,characterReference:fe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ne),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(te),htmlTextData:E,image:c(re),label:ae,labelText:ie,lineEnding:D,link:c(k),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:le,resourceDestinationString:A,resourceTitleString:oe,resource:se,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};qg(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Ug.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Yg).call(a,void 0,e[0])}for(r.position={start:Kg(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Kg(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Kg(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Yg).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+vp({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Kg(e.end)}function u(){return em(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=pm(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=De(),n.position={start:Kg(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Kg(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Kg(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function re(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ie(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Vg(t),n.identifier=pm(t).toLowerCase()}function ae(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function se(){this.data.inReference=void 0}function ce(){this.data.referenceType=`collapsed`}function le(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=pm(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ue(e){this.data.characterReferenceType=e.type}function de(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=fm(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=am(t);let i=this.stack[this.stack.length-1];i.value+=r}function fe(e){let t=this.stack.pop();t.position.end=Kg(e.end)}function pe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function me(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function he(){return{type:`blockquote`,children:[]}}function ge(){return{type:`code`,lang:null,meta:null,value:``}}function _e(){return{type:`inlineCode`,value:``}}function ve(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ye(){return{type:`emphasis`,children:[]}}function j(){return{type:`heading`,depth:0,children:[]}}function M(){return{type:`break`}}function be(){return{type:`html`,value:``}}function xe(){return{type:`image`,title:null,url:``,alt:null}}function Se(){return{type:`link`,title:null,url:``,children:[]}}function Ce(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function we(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Te(){return{type:`paragraph`,children:[]}}function Ee(){return{type:`strong`,children:[]}}function De(){return{type:`text`,value:``}}function Oe(){return{type:`thematicBreak`}}}function Kg(e){return{line:e.line,column:e.column,offset:e.offset}}function qg(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?qg(e,r):Jg(e,r)}}function Jg(e,t){let n;for(n in t)if(Ug.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Yg(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+vp({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vp({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+vp({start:t.start,end:t.end})+`) is still open`)}function Xg(e){let t=this;t.parser=n;function n(n){return Wg(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Zg(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Qg(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
62
|
+
`}]}function $g(e,t){let n=t.value?t.value+`
|
|
63
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function e_(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function t_(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function n_(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=wm(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function r_(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function i_(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function a_(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function o_(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return a_(e,t);let i={src:wm(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function s_(e,t){let n={src:wm(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function c_(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function l_(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return a_(e,t);let i={href:wm(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function u_(e,t){let n={href:wm(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function d_(e,t,n){let r=e.all(t),i=n?f_(n):p_(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
64
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
65
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function f_(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=p_(n[r])}return t}function p_(e){return e.spread??e.children.length>1}function m_(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function h_(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function g_(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function __(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function v_(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=hp(t.children[1]),o=mp(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function y_(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function b_(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var x_=9,S_=32;function C_(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(w_(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(w_(t.slice(i),i>0,!1)),a.join(``)}function w_(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===x_||t===S_;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===x_||t===S_;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function T_(e,t){let n={type:`text`,value:C_(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function E_(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var D_={blockquote:Zg,break:Qg,code:$g,delete:e_,emphasis:t_,footnoteReference:n_,heading:r_,html:i_,imageReference:o_,image:s_,inlineCode:c_,linkReference:l_,link:u_,listItem:d_,list:m_,paragraph:h_,root:g_,strong:__,table:v_,tableCell:b_,tableRow:y_,text:T_,thematicBreak:E_,toml:O_,yaml:O_,definition:O_,footnoteDefinition:O_};function O_(){}var{defineProperty:k_}=Object,A_=typeof self==`object`?self:globalThis,j_=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new A_[e](t)},M_=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?k_(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof A_[e]==`function`?j_(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(j_(a,o),i)};return r},N_=e=>M_(new Map,e)(0),P_=``,{toString:F_}={},{keys:I_,is:L_}=Object,R_=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=F_.call(e).slice(8,-1);switch(n){case`Array`:return[1,P_];case`Object`:return[2,P_];case`Date`:return[3,P_];case`RegExp`:return[4,P_];case`Map`:return[5,P_];case`Set`:return[6,P_];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},z_=([e,t])=>e===0&&(t===`function`||t===`symbol`),B_=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=R_(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&L_(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of I_(o))(e||!z_(R_(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?P_:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(z_(R_(n))||z_(R_(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!z_(R_(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},V_=(e,{json:t,lossy:n}={})=>{let r=[];return B_(!(t||n),!!t,new Map,r)(e),r},H_=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?N_(V_(e,t)):structuredClone(e):(e,t)=>N_(V_(e,t));function U_(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function W_(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function G_(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||U_,r=e.options.footnoteBackLabel||W_,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=wm(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...H_(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
66
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
67
|
+
`}]}}var K_=(function(e){if(e==null)return Z_;if(typeof e==`function`)return X_(e);if(typeof e==`object`)return Array.isArray(e)?q_(e):J_(e);if(typeof e==`string`)return Y_(e);throw Error(`Expected function, string, or object as test`)});function q_(e){let t=[],n=-1;for(;++n<e.length;)t[n]=K_(e[n]);return X_(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function J_(e){let t=e;return X_(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Y_(e){return X_(t);function t(t){return t&&t.type===e}}function X_(e){return t;function t(t,n,r){return!!(Q_(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Z_(){return!0}function Q_(e){return typeof e==`object`&&!!e&&`type`in e}function $_(e){return e}var ev=[];function tv(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=K_(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+$_(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=ev,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=nv(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function nv(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ev:[e]}function rv(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),tv(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var iv={}.hasOwnProperty,av={};function ov(e,t){let n=t||av,r=new Map,i=new Map,a={all:s,applyData:cv,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...D_,...n.handlers},one:o,options:n,patch:sv,wrap:uv};return rv(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(iv.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=H_(n);return r.children=a.all(e),r}return H_(e)}return(a.options.unknownHandler||lv)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=dv(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=dv(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function sv(e,t){e.position&&(t.position=_p(e))}function cv(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,H_(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function lv(e,t){let n=t.data||{},r=`value`in t&&!(iv.call(n,`hProperties`)||iv.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function uv(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
68
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
69
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
70
|
+
`}),n}function dv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function fv(e,t){let n=ov(e,t),r=n.one(e,void 0),i=G_(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
71
|
+
`},i)),a}function pv(e,t){return e&&`run`in e?async function(n,r){let i=fv(n,{file:r,...t});await e.run(i,r)}:function(n,r){return fv(n,{file:r,...e||t})}}function mv(e){if(e)throw e}var hv=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function gv(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function _v(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?vv(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function vv(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var yv={basename:bv,dirname:xv,extname:Sv,join:Cv,sep:`/`};function bv(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Ev(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function xv(e){if(Ev(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Sv(e){Ev(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Cv(...e){let t=-1,n;for(;++t<e.length;)Ev(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:wv(n)}function wv(e){Ev(e);let t=e.codePointAt(0)===47,n=Tv(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Tv(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Ev(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Dv={cwd:Ov};function Ov(){return`/`}function kv(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Av(e){if(typeof e==`string`)e=new URL(e);else if(!kv(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return jv(e)}function jv(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Mv=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Nv=class{constructor(e){let t;t=e?kv(e)?{path:e}:typeof e==`string`||Lv(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Dv.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Mv.length;){let e=Mv[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Mv.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?yv.basename(this.path):void 0}set basename(e){Fv(e,`basename`),Pv(e,`basename`),this.path=yv.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?yv.dirname(this.path):void 0}set dirname(e){Iv(this.basename,`dirname`),this.path=yv.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?yv.extname(this.path):void 0}set extname(e){if(Pv(e,`extname`),Iv(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=yv.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){kv(e)&&(e=Av(e)),Fv(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?yv.basename(this.path,this.extname):void 0}set stem(e){Fv(e,`stem`),Pv(e,`stem`),this.path=yv.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Sp(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Pv(e,t){if(e&&e.includes(yv.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+yv.sep+"`")}function Fv(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Iv(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Lv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Rv=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),zv=l(hv(),1),Bv={}.hasOwnProperty,Vv=new class e extends Rv{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=_v()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,zv.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Wv(`data`,this.frozen),this.namespace[e]=t,this):Bv.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Wv(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=qv(e),n=this.parser||this.Parser;return Hv(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Hv(`process`,this.parser||this.Parser),Uv(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=qv(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Yv(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Hv(`processSync`,this.parser||this.Parser),Uv(`processSync`,this.compiler||this.Compiler),this.process(e,r),Kv(`processSync`,`process`,t),n;function r(e,r){t=!0,mv(e),n=r}}run(e,t,n){Gv(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=qv(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Kv(`runSync`,`run`,n),r;function i(e,t){mv(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=qv(t),r=this.compiler||this.Compiler;return Uv(`stringify`,r),Gv(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Wv(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,zv.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];gv(o)&&gv(r)&&(r=(0,zv.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Hv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Uv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Wv(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Gv(e){if(!gv(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Kv(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function qv(e){return Jv(e)?e:new Nv(e)}function Jv(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Yv(e){return typeof e==`string`||Xv(e)}function Xv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Zv=[],Qv={allowDangerousHtml:!0},$v=/^(https?|ircs?|mailto|xmpp)$/i,ey=[{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 ty(e){let t=ny(e),n=ry(e);return iy(t.runSync(t.parse(n),n),e)}function ny(e){let t=e.rehypePlugins||Zv,n=e.remarkPlugins||Zv,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Qv}:Qv;return Vv().use(Xg).use(n).use(pv,r).use(t)}function ry(e){let t=e.children||``,n=new Nv;return typeof t==`string`?n.value=t:``+t,n}function iy(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||ay;for(let e of ey)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return rv(e,l),Ap(e,{Fragment:L.Fragment,components:i,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Qp)if(Object.hasOwn(Qp,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Qp[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function ay(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||$v.test(e.slice(0,t))?e:``}function oy(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function sy(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function cy(e,t,n){let r=K_((n||{}).ignore||[]),i=ly(t),a=-1;for(;++a<i.length;)tv(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function ly(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([uy(e[0]),dy(e[1])])}return t}function uy(e){return typeof e==`string`?new RegExp(sy(e),`g`):e}function dy(e){return typeof e==`function`?e:function(){return e}}var fy=`phrasing`,py=[`autolink`,`link`,`image`,`label`];function my(){return{transforms:[Sy],enter:{literalAutolink:gy,literalAutolinkEmail:_y,literalAutolinkHttp:_y,literalAutolinkWww:_y},exit:{literalAutolink:xy,literalAutolinkEmail:by,literalAutolinkHttp:vy,literalAutolinkWww:yy}}}function hy(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:fy,notInConstruct:py},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:fy,notInConstruct:py},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:fy,notInConstruct:py}]}}function gy(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function _y(e){this.config.enter.autolinkProtocol.call(this,e)}function vy(e){this.config.exit.autolinkProtocol.call(this,e)}function yy(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function by(e){this.config.exit.autolinkEmail.call(this,e)}function xy(e){this.exit(e)}function Sy(e){cy(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Cy],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,wy]],{ignore:[`link`,`linkReference`]})}function Cy(e,t,n,r,i){let a=``;if(!Dy(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Ty(n)))return!1;let o=Ey(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function wy(e,t,n,r){return!Dy(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Ty(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Ey(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=oy(e,`(`),a=oy(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Dy(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Sm(n)||xm(n))&&(!t||n!==47)}Ly.peek=Iy;function Oy(){this.buffer()}function ky(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Ay(){this.buffer()}function jy(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function My(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pm(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ny(e){this.exit(e)}function Py(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pm(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Fy(e){this.exit(e)}function Iy(){return`[`}function Ly(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Ry(){return{enter:{gfmFootnoteCallString:Oy,gfmFootnoteCall:ky,gfmFootnoteDefinitionLabelString:Ay,gfmFootnoteDefinition:jy},exit:{gfmFootnoteCallString:My,gfmFootnoteCall:Ny,gfmFootnoteDefinitionLabelString:Py,gfmFootnoteDefinition:Fy}}}function zy(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ly},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
72
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Vy:By))),s(),o}}function By(e,t,n){return t===0?e:Vy(e,t,n)}function Vy(e,t,n){return(n?``:` `)+e}var Hy=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];qy.peek=Jy;function Uy(){return{canContainEols:[`delete`],enter:{strikethrough:Gy},exit:{strikethrough:Ky}}}function Wy(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Hy}],handlers:{delete:qy}}}function Gy(e){this.enter({type:`delete`,children:[]},e)}function Ky(e){this.exit(e)}function qy(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Jy(){return`~`}function Yy(e){return e.length}function Xy(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Yy,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Zy(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Qy(r[d]);else{let e=Qy(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
73
|
+
`)}function Zy(e){return e==null?``:String(e)}function Qy(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function $y(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),eb);return i(),o}function eb(e,t,n){return`>`+(n?``:` `)+e}function tb(e,t){return nb(e,t.inConstruct,!0)&&!nb(e,t.notInConstruct,!1)}function nb(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function rb(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
74
|
+
`&&tb(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
75
|
+
`}function ib(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function ab(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ob(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function sb(e,t,n,r){let i=ob(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(ab(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,cb);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(ib(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
76
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
77
|
+
`),a&&(u+=s.move(a+`
|
|
78
|
+
`)),u+=s.move(c),l(),u}function cb(e,t,n){return(n?``:` `)+e}function lb(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ub(e,t,n,r){let i=lb(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
79
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function db(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function fb(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function pb(e,t,n){let r=jm(e),i=jm(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}mb.peek=hb;function mb(e,t,n,r){let i=db(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=pb(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=fb(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=pb(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+fb(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function hb(e,t,n){return n.options.emphasis||`*`}function gb(e,t){let n=!1;return rv(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&em(e)&&(t.options.setext||n))}function _b(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(gb(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
80
|
+
`,after:`
|
|
81
|
+
`});return r(),t(),o+`
|
|
82
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
83
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
84
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=fb(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}vb.peek=yb;function vb(e){return e.value||``}function yb(){return`<`}bb.peek=xb;function bb(e,t,n,r){let i=lb(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function xb(){return`!`}Sb.peek=Cb;function Sb(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Cb(){return`!`}wb.peek=Tb;function wb(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Tb(){return"`"}function Eb(e,t){let n=em(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][a-z+.-]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}Db.peek=Ob;function Db(e,t,n,r){let i=lb(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Eb(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Ob(e,t,n){return Eb(e,n)?`<`:`[`}kb.peek=Ab;function kb(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Ab(){return`[`}function jb(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Mb(e){let t=jb(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Nb(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Pb(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Fb(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Nb(n):jb(n),s=e.ordered?o===`.`?`)`:`.`:Mb(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),Pb(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Ib(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Lb(e,t,n,r){let i=Ib(n),a=n.bulletCurrent||jb(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Rb(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var zb=K_([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Bb(e,t,n,r){return(e.children.some(function(e){return zb(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Vb(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Hb.peek=Ub;function Hb(e,t,n,r){let i=Vb(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=pb(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=fb(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=pb(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+fb(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Ub(e,t,n){return n.options.strong||`*`}function Wb(e,t,n,r){return n.safe(e.value,r)}function Gb(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Kb(e,t,n){let r=(Pb(n)+(n.options.ruleSpaces?` `:``)).repeat(Gb(n));return n.options.ruleSpaces?r.slice(0,-1):r}var qb={blockquote:$y,break:rb,code:sb,definition:ub,emphasis:mb,hardBreak:rb,heading:_b,html:vb,image:bb,imageReference:Sb,inlineCode:wb,link:Db,linkReference:kb,list:Fb,listItem:Lb,paragraph:Rb,root:Bb,strong:Hb,text:Wb,thematicBreak:Kb};function Jb(){return{enter:{table:Yb,tableData:$b,tableHeader:$b,tableRow:Zb},exit:{codeText:ex,table:Xb,tableData:Qb,tableHeader:Qb,tableRow:Qb}}}function Yb(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Xb(e){this.exit(e),this.data.inTable=void 0}function Zb(e){this.enter({type:`tableRow`,children:[]},e)}function Qb(e){this.exit(e)}function $b(e){this.enter({type:`tableCell`,children:[]},e)}function ex(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,tx));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function tx(e,t){return t===`|`?t:e}function nx(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
85
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
86
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Xy(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=qb.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function rx(){return{exit:{taskListCheckValueChecked:ax,taskListCheckValueUnchecked:ax,paragraph:ox}}}function ix(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:sx}}}function ax(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function ox(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function sx(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=qb.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function cx(){return[my(),Ry(),Uy(),Jb(),rx()]}function lx(e){return{extensions:[hy(),zy(e),Wy(),nx(e),ix()]}}var ux={tokenize:wx,partial:!0},dx={tokenize:Tx,partial:!0},fx={tokenize:Ex,partial:!0},px={tokenize:Dx,partial:!0},mx={tokenize:Ox,partial:!0},hx={name:`wwwAutolink`,tokenize:Sx,previous:kx},gx={name:`protocolAutolink`,tokenize:Cx,previous:Ax},_x={name:`emailAutolink`,tokenize:xx,previous:jx},vx={};function yx(){return{text:vx}}for(var bx=48;bx<123;)vx[bx]=_x,bx++,bx===58?bx=65:bx===91&&(bx=97);vx[43]=_x,vx[45]=_x,vx[46]=_x,vx[95]=_x,vx[72]=[_x,gx],vx[104]=[_x,gx],vx[87]=[_x,hx],vx[119]=[_x,hx];function xx(e,t,n){let r=this,i,a;return o;function o(t){return!Mx(t)||!jx.call(r,r.previous)||Nx(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Mx(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(mx,u,l)(t):t===45||t===95||hm(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&mm(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Sx(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!kx.call(r,r.previous)||Nx(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ux,e.attempt(dx,e.attempt(fx,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Cx(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Ax.call(r,r.previous)&&!Nx(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(mm(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||_m(t)||Z(t)||Sm(t)||xm(t)?n(t):e.attempt(dx,e.attempt(fx,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function wx(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Tx(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(px,c,s)(t):t===null||Z(t)||Sm(t)||t!==45&&xm(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Ex(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(px,t,a)(o):o===null||Z(o)||Sm(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Dx(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Z(o)||Sm(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Z(e)||Sm(e)?t(e):r(e)}function a(e){return mm(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):mm(t)?(e.consume(t),o):n(t)}}function Ox(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return hm(e)?n(e):t(e)}}function kx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Z(e)}function Ax(e){return!mm(e)}function jx(e){return!(e===47||Mx(e))}function Mx(e){return e===43||e===45||e===46||e===95||hm(e)}function Nx(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Px={tokenize:Hx,partial:!0};function Fx(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:zx,continuation:{tokenize:Bx},exit:Vx}},text:{91:{name:`gfmFootnoteCall`,tokenize:Rx},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Ix,resolveTo:Lx}}}}function Ix(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=pm(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Lx(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Rx(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Z(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(pm(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Z(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function zx(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Z(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=pm(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Z(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),$(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Bx(e,t,n){return e.check(zm,t,e.attempt(Px,t,n))}function Vx(e){e.exit(`gfmFootnoteDefinition`)}function Hx(e,t,n){let r=this;return $(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Ux(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&om(o,o.length,0,Mm(s,e.slice(r+1,n),t)),om(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),om(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=jm(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=jm(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Wx=class{constructor(){this.map=[]}add(e,t,n){Gx(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Gx(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Kx(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function qx(){return{flow:{null:{name:`table`,tokenize:Jx,resolveAll:Yx}}}}function Jx(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):X(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Q(t)?$(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Z(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Q(t)?$(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Q(t)?$(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||X(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Q(t)?$(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||X(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||X(n)?(e.exit(`tableRow`),t(n)):Q(n)?$(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Z(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Yx(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Wx;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Zx(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Xx(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Xx(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Xx(f,t,o,i,n,d)):(o[0]=o[1],d=Xx(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Zx(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Kx(t.events,n))}return e}function Xx(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Qx(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Qx(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Qx(t.events,n[2]),a=Qx(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Qx(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Zx(e,t,n,r,i){let a=[],o=Qx(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Qx(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var $x={name:`tasklistCheck`,tokenize:tS};function eS(){return{text:{91:$x}}}function tS(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Z(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return X(r)?t(r):Q(r)?e.check({tokenize:nS},t,n)(r):n(r)}}function nS(e,t,n){return $(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function rS(e){return lm([yx(),Fx(),Ux(e),qx(),eS()])}var iS={};function aS(e){let t=this,n=e||iS,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(rS(n)),a.push(cx()),o.push(lx(n))}var oS=`modulepreload`,sS=function(e){return`/`+e},cS={},lS=function(e){return e.pathname.endsWith(`.css`)},uS=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},dS=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=sS(t,n);let r=s(t),i=lS(r);return uS(cS,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:oS,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},fS=null,pS=new Map;function mS(){return fS||=(async()=>{let{createHighlighter:e,createJavaScriptRegexEngine:t}=await dS(async()=>{let{createHighlighter:e,createJavaScriptRegexEngine:t}=await import(`./dist-CL6azZY0.js`);return{createHighlighter:e,createJavaScriptRegexEngine:t}},[]);return e({themes:[`github-dark`],langs:[`plaintext`],engine:t()})})(),fS}async function hS(e){let t=pS.get(e);if(t)return t;let n=(async()=>{let{isSpecialLang:t,bundledLanguages:n}=await dS(async()=>{let{isSpecialLang:e,bundledLanguages:t}=await import(`./dist-CL6azZY0.js`);return{isSpecialLang:e,bundledLanguages:t}},[]);if(t(e))return;let r=n[e];if(!r)throw Error(`shiki: unknown lang "${e}"`);let i=await mS();i.getLoadedLanguages().includes(e)||await i.loadLanguage(r)})().catch(t=>{throw pS.delete(e),t});return pS.set(e,n),n}async function gS(e,t){let n=await mS(),r=`plaintext`;if(t){let{isSpecialLang:e}=await dS(async()=>{let{isSpecialLang:e}=await import(`./dist-CL6azZY0.js`);return{isSpecialLang:e}},[]),i=n.getLoadedLanguages();e(t)||i.includes(t)?r=t:(await hS(t).catch(()=>{}),n.getLoadedLanguages().includes(t)&&(r=t))}let i=n.codeToTokens(e,{lang:r,theme:`github-dark`});return{lines:i.tokens,bg:i.bg??`#24292e`,fg:i.fg??`#e1e4e8`}}function _S(e){return hS(e).catch(()=>{})}var vS=25;function yS({lines:e,fg:t}){return(0,L.jsx)(L.Fragment,{children:e.map((e,n)=>(0,L.jsx)(`span`,{style:{display:`block`,minHeight:`1.25rem`},children:e.length===0?`
|
|
87
|
+
`:e.map((e,n)=>(0,L.jsx)(`span`,{style:{color:e.color??t,fontStyle:e.fontStyle!==void 0&&e.fontStyle&1?`italic`:void 0,fontWeight:e.fontStyle!==void 0&&e.fontStyle&2?`bold`:void 0,textDecoration:e.fontStyle!==void 0&&e.fontStyle&4?`underline`:void 0},children:e.content},n))},n))})}var bS=(0,O.memo)(function({code:e,language:t}){let[n,r]=(0,O.useState)(!1),i=e.split(`
|
|
88
|
+
`),a=Math.max(0,i.length-vS),o=n?e:i.slice(0,vS).join(`
|
|
89
|
+
`),[s,c]=(0,O.useState)(null),[l,u]=(0,O.useState)(!1),d=(0,O.useRef)(null);(0,O.useEffect)(()=>()=>{d.current!==null&&clearTimeout(d.current)},[]),(0,O.useEffect)(()=>{let e=!1;async function n(){t&&_S(t);let n=await gS(o,t);e||c(n)}return c(null),n().catch(()=>{}),()=>{e=!0}},[o,t]);let f=(0,O.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{u(!0),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>u(!1),2e3)}).catch(()=>{})},[e]),p=s?.bg??`#0d1117`;return(0,L.jsxs)(`div`,{className:`relative group rounded-md overflow-hidden mb-2`,style:{backgroundColor:p},children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between px-3 pt-1.5 pb-0.5`,children:[(0,L.jsx)(`span`,{className:`text-[10px] select-none font-mono`,style:{color:`#9ba3ae`},children:t??`plaintext`}),(0,L.jsx)(`button`,{onClick:f,"aria-label":`Copy code`,className:`opacity-100 focus-visible:outline-2 focus-visible:outline-ring transition-opacity rounded p-1 text-muted-foreground hover:text-foreground hover:bg-white/10`,children:l?(0,L.jsx)(he,{size:13,strokeWidth:2.5}):(0,L.jsx)(je,{size:13,strokeWidth:2})})]}),(0,L.jsxs)(`div`,{className:`relative`,children:[s===null?(0,L.jsx)(`pre`,{className:`overflow-x-auto p-3 font-mono text-xs leading-5 text-foreground`,tabIndex:0,"aria-label":t?`${t} code block`:`code block`,children:(0,L.jsx)(`code`,{children:o})}):(0,L.jsx)(`div`,{className:`overflow-x-auto whitespace-pre p-3 font-mono text-xs leading-5`,tabIndex:0,"aria-label":t?`${t} code block`:`code block`,style:{backgroundColor:p},children:(0,L.jsx)(yS,{lines:s.lines,fg:s.fg})}),a>0&&!n&&(0,L.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-x-0 bottom-0 h-10`,style:{background:`linear-gradient(to top, ${p}, transparent)`}})]}),a>0&&(0,L.jsx)(`button`,{type:`button`,"aria-expanded":n,onClick:()=>r(e=>!e),className:`w-full py-2 text-xs text-foreground hover:bg-white/5 rounded focus-visible:outline-2 focus-visible:outline-ring`,children:n?`Show less`:`Show ${a} more lines`})]})});function xS(e){let t=``;return O.Children.forEach(e,e=>{typeof e==`string`||typeof e==`number`?t+=String(e):(0,O.isValidElement)(e)&&(t+=xS(e.props.children))}),t}function SS(e){return xS(e).trim().length<=40?`whitespace-nowrap`:`min-w-[14rem] max-w-[28rem]`}function CS({children:e}){let t=(0,O.useRef)(null),[n,r]=(0,O.useState)({left:!1,right:!1}),i=(0,O.useCallback)(()=>{let e=t.current;if(!e)return;let n=e.scrollLeft>1,i=e.scrollLeft+e.clientWidth<e.scrollWidth-1;r(e=>e.left===n&&e.right===i?e:{left:n,right:i})},[]);return(0,O.useEffect)(()=>{i();let e=t.current;if(!e||typeof ResizeObserver>`u`)return;let n=new ResizeObserver(i);return n.observe(e),e.firstElementChild&&n.observe(e.firstElementChild),()=>n.disconnect()},[i]),(0,L.jsxs)(`div`,{className:`relative mb-2`,"data-table-scroll":n.right||n.left?`scrollable`:`fits`,children:[(0,L.jsx)(`div`,{ref:t,onScroll:i,className:`overflow-x-auto rounded border border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,tabIndex:0,"aria-label":`data table`,role:`region`,children:(0,L.jsx)(`table`,{className:`w-full text-xs sm:text-sm`,children:e})}),(0,L.jsx)(`div`,{"aria-hidden":!0,"data-edge-fade":`left`,className:I(`pointer-events-none absolute inset-y-px left-px w-6 rounded-l bg-gradient-to-r from-background to-transparent transition-opacity`,n.left?`opacity-100`:`opacity-0`)}),(0,L.jsx)(`div`,{"aria-hidden":!0,"data-edge-fade":`right`,className:I(`pointer-events-none absolute inset-y-px right-px w-8 rounded-r bg-gradient-to-l from-background to-transparent transition-opacity`,n.right?`opacity-100`:`opacity-0`)})]})}var wS={h1:({children:e})=>(0,L.jsx)(`h1`,{className:`mb-3 text-xl font-bold`,children:e}),h2:({children:e})=>(0,L.jsx)(`h2`,{className:`mb-2 text-lg font-semibold`,children:e}),h3:({children:e})=>(0,L.jsx)(`h3`,{className:`mb-1.5 text-base font-semibold`,children:e}),p:({children:e})=>(0,L.jsx)(`p`,{className:`mb-2 last:mb-0 leading-relaxed text-[15px]`,children:e}),ul:({children:e})=>(0,L.jsx)(`ul`,{className:`mb-2 pl-6 list-disc list-outside space-y-0.5`,children:e}),ol:({children:e,start:t})=>{let n=Array.isArray(e)?e.length:1,r=(typeof t==`number`?t:1)+n-1>=100?`pl-9`:`pl-6`;return(0,L.jsx)(`ol`,{className:`mb-2 ${r} list-decimal list-outside space-y-0.5`,children:e})},li:({children:e})=>(0,L.jsx)(`li`,{className:`text-[15px] leading-relaxed`,children:e}),blockquote:({children:e})=>(0,L.jsx)(`blockquote`,{className:`mb-2 border-l-2 border-brand/50 pl-3 italic text-muted-foreground`,children:e}),a:({href:e,children:t})=>e&&/^(https?:\/\/|\/(?!\/)|#)/i.test(e)?(0,L.jsx)(`a`,{href:e,className:`text-brand underline underline-offset-2 hover:text-brand/80`,target:`_blank`,rel:`noopener noreferrer`,children:t}):(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:t}),strong:({children:e})=>(0,L.jsx)(`strong`,{className:`font-semibold text-foreground`,children:e}),em:({children:e})=>(0,L.jsx)(`em`,{className:`italic text-muted-foreground`,children:e}),hr:()=>(0,L.jsx)(`hr`,{className:`my-3 border-border`}),table:({children:e})=>(0,L.jsx)(CS,{children:e}),thead:({children:e})=>(0,L.jsx)(`thead`,{className:`bg-secondary text-secondary-foreground`,children:e}),th:({children:e})=>(0,L.jsx)(`th`,{className:I(`px-3 py-1.5 text-left font-medium min-w-[80px]`,SS(e)),children:e}),td:({children:e})=>(0,L.jsx)(`td`,{className:I(`border-t border-border px-3 py-1.5 min-w-[80px]`,SS(e)),children:e}),code:({children:e,className:t})=>/language-(\w+)/.exec(t??``)?.[1]?(0,L.jsx)(`code`,{className:I(`text-xs`,t),children:e}):(0,L.jsx)(`code`,{className:`rounded bg-secondary px-1 py-0.5 font-mono text-[11px] text-foreground`,children:e}),pre:({children:e})=>{let t=e,n=/language-(\w+)/.exec(t?.props?.className??``)?.[1],r=String(t?.props?.children??``).replace(/\n$/,``);return(0,L.jsx)(bS,{code:r,language:n})}},TS=(0,O.memo)(function({text:e,className:t}){return(0,L.jsx)(`div`,{className:I(`text-[15px] text-foreground max-w-[70ch]`,t),children:(0,L.jsx)(ty,{remarkPlugins:[aS],components:wS,children:e})})});function ES(){return(0,L.jsx)(`span`,{className:`streaming-cursor`,"aria-hidden":`true`})}var DS=/^[ \t]*(`{3,}|~{4,})/;function OS(e){let t=e.lastIndexOf(`
|
|
90
|
+
`)+1;return t>=e.length?e.length:DS.test(e.slice(t))?t:e.length}function kS({text:e,isStreaming:t}){let n=t?e.slice(0,OS(e)):e;return(0,L.jsxs)(`span`,{className:`streaming-text-root`,children:[(0,L.jsx)(TS,{text:n}),t&&(0,L.jsx)(ES,{})]})}function AS({kind:e,text:t,ts:n,className:r,onRetry:i,onEdit:a,isBusy:o}){let[s,c]=(0,O.useState)(!1),[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(t),p=(0,O.useRef)(null),m=(0,O.useRef)(null);(0,O.useEffect)(()=>{f(t)},[t]),(0,O.useEffect)(()=>()=>{p.current!==null&&clearTimeout(p.current)},[]),(0,O.useEffect)(()=>{if(l){let e=m.current;e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))}},[l]);function h(){navigator.clipboard.writeText(t).then(()=>{c(!0),p.current!==null&&clearTimeout(p.current),p.current=setTimeout(()=>c(!1),2e3)}).catch(()=>{})}function g(){let e=d.trim();u(!1),e&&e!==t&&a?.(e)}function _(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),g()),e.key===`Escape`&&(u(!1),f(t))}let v=n===void 0?void 0:new Date(n).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`});return l?(0,L.jsxs)(`div`,{className:`mt-1 flex w-full max-w-2xl flex-col gap-1`,children:[(0,L.jsx)(`textarea`,{ref:m,value:d,onChange:e=>f(e.target.value),onKeyDown:_,rows:Math.min(8,d.split(`
|
|
91
|
+
`).length+1),className:I(`w-full resize-none rounded-lg border border-ring bg-background`,`px-3 py-2 text-sm leading-5 shadow-sm`,`focus:outline-none focus:ring-2 focus:ring-ring`)}),(0,L.jsxs)(`div`,{className:`flex gap-1.5 justify-end`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>{u(!1),f(t)},className:`rounded px-2 py-0.5 text-xs text-muted-foreground hover:text-foreground border border-border hover:bg-secondary transition-colors`,children:`Cancel`}),(0,L.jsx)(`button`,{type:`button`,onClick:g,disabled:!d.trim()||o,className:I(`rounded px-2 py-0.5 text-xs font-medium`,`bg-primary text-primary-foreground hover:bg-primary/90 transition-colors`,`disabled:opacity-40 disabled:cursor-not-allowed`),children:`Send`})]})]}):(0,L.jsx)(`div`,{className:I(`absolute top-1 right-1`,`opacity-0 group-hover:opacity-100 transition-opacity duration-150`,r),children:(0,L.jsxs)(`div`,{className:`flex items-center gap-0.5 rounded-md border border-border bg-card px-1 py-0.5 shadow-sm`,children:[v&&(0,L.jsxs)(`span`,{className:`flex items-center gap-0.5 px-1 text-[10px] text-muted-foreground/70`,title:n===void 0?void 0:new Date(n).toLocaleString(),children:[(0,L.jsx)(ke,{className:`h-2.5 w-2.5`}),v]}),(0,L.jsx)(jS,{onClick:h,title:s?`Copied!`:`Copy`,children:s?(0,L.jsx)(he,{className:`h-3.5 w-3.5 text-status-running`}):(0,L.jsx)(je,{className:`h-3.5 w-3.5`})}),e===`assistant`&&i&&(0,L.jsx)(jS,{onClick:i,title:o?`Stop the turn before retrying`:`Retry`,disabled:o,children:(0,L.jsx)(Tt,{className:`h-3.5 w-3.5`})}),e===`user`&&a&&(0,L.jsx)(jS,{onClick:()=>u(!0),title:o?`Stop the turn before editing`:`Edit and resend`,disabled:o,children:(0,L.jsx)(ht,{className:`h-3.5 w-3.5`})})]})})}function jS({onClick:e,title:t,disabled:n,children:r}){return(0,L.jsx)(`button`,{type:`button`,onClick:e,title:t,disabled:n,className:I(`h-6 w-6 rounded flex items-center justify-center`,`hover:bg-secondary text-muted-foreground hover:text-foreground transition-colors`,n&&`opacity-40 cursor-not-allowed`),children:r})}function MS({text:e,ts:t,onEdit:n,isBusy:r}){return(0,L.jsxs)(`div`,{className:`group relative flex flex-col items-start gap-1`,children:[(0,L.jsx)(`span`,{className:`text-[11px] font-medium uppercase tracking-widest text-muted-foreground`,children:`You`}),(0,L.jsx)(`div`,{className:`max-w-xl rounded-xl bg-secondary/70 px-4 py-2.5 border border-border/50`,children:(0,L.jsx)(`p`,{className:`text-[15px] leading-relaxed text-foreground whitespace-pre-wrap`,children:e})}),(0,L.jsx)(AS,{kind:`user`,text:e,ts:t,onEdit:n,isBusy:r})]})}function NS({text:e,ts:t,isStreaming:n=!1,onRetry:r,isBusy:i}){return(0,L.jsxs)(`div`,{className:`group relative flex flex-col gap-1`,children:[(0,L.jsx)(`span`,{className:`text-[11px] font-medium uppercase tracking-widest text-brand/80`,children:`Agent`}),(0,L.jsx)(`div`,{className:`max-w-3xl`,children:n?(0,L.jsx)(kS,{text:e,isStreaming:!0}):(0,L.jsx)(TS,{text:e})}),(0,L.jsx)(AS,{kind:`assistant`,text:e,ts:t,onRetry:r,isBusy:i})]})}function PS({message:e}){return(0,L.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-xl border border-destructive/20 bg-destructive/5 px-4 py-3`,children:[(0,L.jsx)(Ce,{className:`mt-0.5 h-4 w-4 shrink-0 text-status-failed`}),(0,L.jsx)(`p`,{className:`text-sm leading-relaxed text-status-failed`,children:e})]})}function FS({text:e}){return(0,L.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-border bg-muted/30 px-3 py-2`,children:[(0,L.jsx)(Ze,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e})]})}function IS({text:e,onRetry:t,isBusy:n}){return(0,L.jsxs)(`div`,{"data-testid":`stopped-item`,className:`flex items-center gap-2.5 rounded-xl border border-amber-500/20 bg-amber-500/5 px-4 py-2.5`,children:[(0,L.jsx)(lt,{className:`h-3.5 w-3.5 shrink-0 text-amber-500`}),(0,L.jsx)(`p`,{className:`flex-1 text-xs text-amber-600 dark:text-amber-400`,children:e}),t&&(0,L.jsx)(`button`,{type:`button`,onClick:t,disabled:n,className:I(`rounded px-2 py-0.5 text-[11px] font-medium`,`border border-amber-500/30 text-amber-600 dark:text-amber-400`,`hover:bg-amber-500/10 transition-colors`,`disabled:opacity-40 disabled:cursor-not-allowed`),children:`Retry`})]})}function LS({item:e}){return(0,L.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-border bg-muted/30 px-3 py-1.5`,children:[(0,L.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`BG`}),(0,L.jsx)(`span`,{className:`text-xs text-foreground`,children:e.label}),(0,L.jsx)(`span`,{className:I(`ml-auto font-mono text-[10px] capitalize`,e.status===`completed`?`text-status-running`:``,e.status===`failed`?`text-status-failed`:``,e.status===`running`?`text-status-blocked`:``),children:e.status})]})}function RS(){let[e,t]=(0,O.useState)(0),n=(0,O.useRef)(null);return(0,O.useEffect)(()=>(t(0),n.current=setInterval(()=>t(e=>e+1),1e3),()=>{n.current!==null&&clearInterval(n.current)}),[]),e}function zS(e,t){return e===`running`?t?`Running ${t}`:`Running tool`:e===`writing`?`Writing…`:`Thinking`}function BS({className:e}){return(0,L.jsx)(`span`,{"aria-hidden":`true`,className:I(`inline-block h-2 w-2 rounded-full bg-brand motion-safe:animate-pulse`,e)})}function VS({phase:e=`thinking`,toolName:t,className:n}){let r=RS(),i=zS(e,t);return(0,L.jsxs)(`div`,{className:I(`flex min-h-10 items-center gap-2 rounded-md px-1 py-2`,n),children:[(0,L.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:i}),(0,L.jsx)(BS,{}),(0,L.jsx)(`span`,{className:`text-sm text-muted-foreground`,"aria-hidden":`true`,children:i}),(0,L.jsxs)(`span`,{className:`font-mono text-xs text-muted-foreground`,"aria-hidden":`true`,children:[r,`s`]})]})}function HS(e){let t={};for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.kind===`stopped`&&!t.user&&!t.stopped&&(t.stopped=r.id),r.kind===`assistant`&&!t.user&&!t.assistant&&(t.assistant=r.id),r.kind===`user`){t.user=r.id;break}}return t}function US(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===void 0){n++;continue}if(r.kind!==`subagent`){t.push({kind:`item`,item:r}),n++;continue}let i=[];for(;n<e.length;){let t=e[n];if(t===void 0||t.kind!==`subagent`)break;i.push(t),n++}t.push({kind:`subagent-group`,items:i,id:i[0].id})}return t}function WS(e,t=!1){let n=typeof t==`boolean`?t:t.isStreaming??!1,r=typeof t==`object`?t:{};switch(e.kind){case`user`:return(0,L.jsx)(MS,{text:e.text,ts:e.ts,onEdit:r.onEdit,isBusy:r.isBusy});case`assistant`:return(0,L.jsx)(NS,{text:e.text,ts:e.ts,isStreaming:n,onRetry:r.onRetry,isBusy:r.isBusy});case`thinking`:return(0,L.jsx)(md,{text:e.text,isStreaming:n});case`tool`:return(0,L.jsx)(Ld,{...e});case`error`:return(0,L.jsx)(PS,{message:e.message});case`notice`:return(0,L.jsx)(FS,{text:e.text});case`stopped`:return(0,L.jsx)(IS,{text:e.text,onRetry:r.onRetry,isBusy:r.isBusy});case`bg_job`:return(0,L.jsx)(LS,{item:e});case`subagent`:return null}}function GS(e,t=!1){let n=typeof t==`boolean`?t:t.isStreaming??!1,r=typeof t==`object`?t:{};switch(e.kind){case`user`:return(0,L.jsx)(MS,{text:e.text,ts:e.ts,onEdit:r.onEdit,isBusy:r.isBusy});case`assistant`:return(0,L.jsx)(NS,{text:e.text,ts:e.ts,isStreaming:n,onRetry:r.onRetry,isBusy:r.isBusy});case`thinking`:return(0,L.jsx)(md,{text:e.text,isStreaming:n});case`error`:return(0,L.jsx)(PS,{message:e.message});case`notice`:return(0,L.jsx)(FS,{text:e.text});case`stopped`:return(0,L.jsx)(IS,{text:e.text,onRetry:r.onRetry,isBusy:r.isBusy});case`bg_job`:return(0,L.jsx)(LS,{item:e});default:return null}}function KS(e){return e.kind!==`assistant`&&e.kind!==`thinking`?!1:e.text.slice(0,OS(e.text)).replace(/^[ \t]*(?:[-*+]|\d+[.)]|#{1,6}|>)[ \t]*$/gm,``).trim().length>0}function qS(e,t){let n=e[e.length-1],r,i=-1;for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.kind===`user`){i=t;break}n.kind===`tool`&&n.status===`running`&&r===void 0&&(r=n.name)}let a=e.some((e,t)=>{let n=Du(e);return e.kind!==`assistant`||!KS(e)?!1:n===`streaming`||n===`sealed`&&t>i&&!r}),o=n?.kind===`tool`||n?.kind===`notice`;return{showWorking:t&&!a,workingPhase:r?`running`:o?`writing`:`thinking`,...r?{runningTool:r}:{}}}function JS({sessionId:e,...t}){return(0,L.jsx)(Cd.Provider,{value:e??null,children:(0,L.jsx)(YS,{...t})})}function YS({items:e,thinkingUi:t=`live`,spineMode:n=!0,turnActive:r=!1,hideEmptyState:i=!1,onRetry:a,onEdit:o,isBusy:s,rewindIds:c}){let l=(0,O.useMemo)(()=>HS(e),[e]),u=c??l,d=(0,O.useCallback)((e,t)=>({isStreaming:t,isBusy:s,...e.id===u.assistant||e.id===u.stopped?{onRetry:a}:{},...e.id===u.user?{onEdit:o}:{}}),[u.user,u.assistant,u.stopped,a,o,s]),f=(0,O.useMemo)(()=>t===`off`?e.filter(e=>e.kind!==`thinking`):e,[e,t]),p=(0,O.useMemo)(()=>US(f),[f]),m=Sf(f),h=(0,O.useCallback)((e,t)=>{let n=e.kind===`user`&&t>0,r=Du(e)===`streaming`;return(0,L.jsxs)(`div`,{className:Du(e)?void 0:`[content-visibility:auto] [contain-intrinsic-size:auto_160px]`,...Du(e)?{"data-live":Du(e)}:{},children:[n&&(0,L.jsx)(`div`,{className:`my-6 border-t border-border/40`,"aria-hidden":`true`}),(0,L.jsx)(`div`,{className:`py-2 px-1`,children:GS(e,d(e,r))})]},e.id)},[d]),{showWorking:g,workingPhase:_,runningTool:v}=qS(f,r);return(0,L.jsxs)(`div`,{role:`log`,"aria-label":`Conversation`,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-busy":r,className:`flex flex-col gap-0 max-w-4xl mx-auto w-full [&_button:focus-visible]:outline-2 [&_button:focus-visible]:outline-ring [&_a:focus-visible]:outline-2 [&_a:focus-visible]:outline-ring`,children:[e.length===0&&i?null:e.length===0?(0,L.jsx)(`p`,{className:`py-12 text-center text-sm text-muted-foreground`,children:`No transcript items yet.`}):n?(0,L.jsx)(xf,{slots:m,renderTextItem:h}):p.map((e,t)=>{if(e.kind===`item`){let{item:n}=e,r=n.kind===`user`&&t>0,i=Du(n)===`streaming`;return(0,L.jsxs)(`div`,{className:Du(n)?void 0:`[content-visibility:auto] [contain-intrinsic-size:auto_160px]`,...Du(n)?{"data-live":Du(n)}:{},children:[r&&(0,L.jsx)(`div`,{className:`my-6 border-t border-border/40`,"aria-hidden":`true`}),(0,L.jsx)(`div`,{className:`py-2 px-1`,children:WS(n,d(n,i))})]},n.id)}let n=Gd(e.items);return(0,L.jsx)(`div`,{className:`py-2 px-1 [content-visibility:auto] [contain-intrinsic-size:auto_100px]`,children:(0,L.jsx)(Wd,{roots:n})},e.id)}),g&&(0,L.jsx)(`div`,{className:`py-2 px-1`,"data-testid":`working-indicator`,children:(0,L.jsx)(VS,{phase:_,...v?{toolName:v}:{}})})]})}var XS={30:`black`,31:`red`,32:`green`,33:`yellow`,34:`blue`,35:`magenta`,36:`cyan`,37:`white`,90:`bright-black`,91:`bright-red`,92:`bright-green`,93:`bright-yellow`,94:`bright-blue`,95:`bright-magenta`,96:`bright-cyan`,97:`bright-white`},ZS={40:`black`,41:`red`,42:`green`,43:`yellow`,44:`blue`,45:`magenta`,46:`cyan`,47:`white`,100:`bright-black`,101:`bright-red`,102:`bright-green`,103:`bright-yellow`,104:`bright-blue`,105:`bright-magenta`,106:`bright-cyan`,107:`bright-white`},QS={0:`black`,1:`red`,2:`green`,3:`yellow`,4:`blue`,5:`magenta`,6:`cyan`,7:`white`,8:`bright-black`,9:`bright-red`,10:`bright-green`,11:`bright-yellow`,12:`bright-blue`,13:`bright-magenta`,14:`bright-cyan`,15:`bright-white`};function $S(){return{bold:!1,dim:!1,italic:!1,underline:!1,fg:null,bg:null,fgClass:null,bgClass:null}}function eC(e){if(e<16)return{cls:`ansi-fg-${QS[e]??`white`}`,color:null};if(e<232){let t=e-16,n=t%6,r=Math.floor(t/6)%6,i=Math.floor(t/36),a=e=>e===0?0:55+e*40;return{cls:null,color:`rgb(${a(i)},${a(r)},${a(n)})`}}let t=8+(e-232)*10;return{cls:null,color:`rgb(${t},${t},${t})`}}function tC(e){let{cls:t,color:n}=eC(e);return{cls:t?t.replace(`ansi-fg-`,`ansi-bg-`):null,color:n}}function nC(e,t){let n=0;for(;n<e.length;){let r=e[n];if(r===0)Object.assign(t,$S());else if(r===1)t.bold=!0;else if(r===2)t.dim=!0;else if(r===3)t.italic=!0;else if(r===4)t.underline=!0;else if(r===22)t.bold=!1,t.dim=!1;else if(r===23)t.italic=!1;else if(r===24)t.underline=!1;else if(r in XS)t.fgClass=`ansi-fg-${XS[r]}`,t.fg=null;else if(r===39)t.fg=null,t.fgClass=null;else if(r in ZS)t.bgClass=`ansi-bg-${ZS[r]}`,t.bg=null;else if(r===49)t.bg=null,t.bgClass=null;else if(r===38){if(e[n+1]===5&&n+2<e.length){let{cls:r,color:i}=eC(e[n+2]);t.fgClass=r,t.fg=i,n+=2}else e[n+1]===2&&n+4<e.length&&(t.fg=`rgb(${e[n+2]},${e[n+3]},${e[n+4]})`,t.fgClass=null,n+=4)}else if(r===48){if(e[n+1]===5&&n+2<e.length){let{cls:r,color:i}=tC(e[n+2]);t.bgClass=r,t.bg=i,n+=2}else e[n+1]===2&&n+4<e.length&&(t.bg=`rgb(${e[n+2]},${e[n+3]},${e[n+4]})`,t.bgClass=null,n+=4)}n++}}function rC(e,t,n){let r=[],i={};t.bold&&r.push(`ansi-bold`),t.dim&&r.push(`ansi-dim`),t.italic&&r.push(`ansi-italic`),t.underline&&r.push(`ansi-underline`),t.fgClass&&r.push(t.fgClass),t.bgClass&&r.push(t.bgClass),t.fg&&(i.color=t.fg),t.bg&&(i.backgroundColor=t.bg);let a={key:n};return r.length&&(a.className=r.join(` `)),Object.keys(i).length&&(a.style=i),(0,O.createElement)(`span`,a,e)}function iC(e){try{return(0,O.createElement)(`span`,null,...aC(e))}catch{return(0,O.createElement)(`span`,null,e)}}function aC(e){let t=[],n=0,r=$S(),i=/\x1b\[([0-9;]*)m|\x1b\]8;;([^\x07\x1b]*)(?:\x07|\x1b\\)([^\x1b]*)(?:\x1b\]8;;(?:\x07|\x1b\\))?|\x1b\[[0-9;]*[@-~]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\x1b./g,a=0;for(let o of e.matchAll(i)){let i=o.index;if(i>a){let o=e.slice(a,i);t.push(rC(o,r,n++))}let[s,c,l,u]=o;c===void 0?l!==void 0&&u!==void 0&&(/^https?:\/\//i.test(l)&&u?t.push((0,O.createElement)(`a`,{key:n++,href:l,rel:`noopener noreferrer`,target:`_blank`},u)):u&&t.push(rC(u,r,n++))):nC(c===``?[0]:c.split(`;`).map(Number),r),a=i+s.length}return a<e.length&&t.push(rC(e.slice(a),r,n++)),t}function oC(e){return e.kind===`table`?(0,L.jsx)(`div`,{className:I(`max-w-full overflow-x-auto rounded border border-border`,`focus:outline-none focus:ring-1 focus:ring-ring`),role:`region`,"aria-label":e.title??`Command table`,tabIndex:0,children:(0,L.jsxs)(`table`,{className:`w-full text-left text-sm`,children:[e.title&&(0,L.jsx)(`caption`,{className:`px-3 py-2 text-left font-medium text-foreground`,children:e.title}),(0,L.jsx)(`thead`,{className:`bg-muted/50 text-muted-foreground`,children:(0,L.jsx)(`tr`,{children:e.columns.map((e,t)=>(0,L.jsx)(`th`,{scope:`col`,className:`whitespace-nowrap px-3 py-2 font-medium`,children:e},t))})}),(0,L.jsx)(`tbody`,{children:e.rows.map((e,t)=>(0,L.jsx)(`tr`,{className:`border-t border-border/50`,children:e.map((e,t)=>(0,L.jsx)(`td`,{className:`whitespace-pre-wrap px-3 py-2 align-top`,children:e},t))},t))})]})}):(0,L.jsx)(`span`,{children:e.text})}function sC(e){return e.kind===`keyValue`?(0,L.jsxs)(`div`,{children:[e.title&&(0,L.jsx)(`h3`,{className:`mb-2 font-medium text-foreground`,children:e.title}),(0,L.jsx)(`dl`,{className:`grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] gap-x-4 gap-y-1`,children:e.entries.map((e,t)=>(0,L.jsxs)(O.Fragment,{children:[(0,L.jsx)(`dt`,{className:`text-muted-foreground`,children:e.key}),(0,L.jsx)(`dd`,{className:`whitespace-pre-wrap break-words`,children:e.value})]},t))})]}):(0,L.jsx)(`span`,{children:e.text})}function cC(e){return e.kind===`diff`?(0,L.jsxs)(`div`,{children:[e.fileName&&(0,L.jsx)(`h3`,{className:`mb-2 font-medium text-foreground`,children:e.fileName}),(0,L.jsx)(`pre`,{className:`max-w-full overflow-x-auto rounded border border-border p-2 text-xs`,"aria-label":e.fileName?`Diff for ${e.fileName}`:`Diff`,tabIndex:0,children:(0,L.jsx)(`code`,{children:e.diff.split(`
|
|
92
|
+
`).map((e,t,n)=>(0,L.jsxs)(`span`,{className:I(e.startsWith(`+`)&&!e.startsWith(`+++`)&&`bg-status-done/10 text-status-done`,e.startsWith(`-`)&&!e.startsWith(`---`)&&`bg-status-failed/10 text-status-failed`,(e.startsWith(`@@`)||e.startsWith(`+++`)||e.startsWith(`---`))&&`text-muted-foreground`),children:[e,t<n.length-1?`
|
|
93
|
+
`:``]},t))})})]}):(0,L.jsx)(`span`,{children:e.text})}function lC(e){return e.kind===`list`?(0,L.jsxs)(`div`,{children:[e.title&&(0,L.jsx)(`h3`,{className:`mb-2 font-medium text-foreground`,children:e.title}),(0,L.jsx)(`ul`,{className:`list-disc space-y-1 pl-5`,children:e.items.map((e,t)=>(0,L.jsxs)(`li`,{children:[(0,L.jsx)(`span`,{children:e.text}),e.description&&(0,L.jsx)(`p`,{className:`whitespace-pre-wrap text-muted-foreground`,children:e.description})]},t))})]}):(0,L.jsx)(`span`,{children:e.text})}function uC(e){if(e.kind!==`link`)return(0,L.jsx)(`span`,{children:e.text});let t;try{t=new URL(e.url)}catch{return(0,L.jsx)(`span`,{children:e.text})}return[`https:`,`http:`].includes(t.protocol)?(0,L.jsx)(`a`,{href:t.href,target:`_blank`,rel:`noopener noreferrer`,className:I(`break-all text-primary underline underline-offset-2`,`rounded focus:outline-none focus:ring-1 focus:ring-ring`),children:e.label}):(0,L.jsx)(`span`,{children:e.text})}var dC=new Map;function fC(e,t){dC.set(e,t)}function pC(e){return dC.get(e)??mC}var mC=e=>(0,O.createElement)(`span`,null,e.text);fC(`text`,e=>{try{return iC(e.ansi)}catch{return(0,O.createElement)(`span`,null,e.text)}}),fC(`table`,oC),fC(`keyValue`,sC),fC(`diff`,cC),fC(`list`,lC),fC(`link`,uC);function hC({input:e,blocks:t}){let[n,r]=(0,O.useState)(!1),i=t.map(e=>e.text).join(`
|
|
94
|
+
`);return(0,L.jsxs)(`div`,{className:I(`rounded-lg border border-border/50 bg-muted/20`,`text-sm font-mono`,`overflow-hidden`),role:`region`,"aria-label":`Output for ${e}`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 border-b border-border/40 bg-muted/40 select-none`,children:[(0,L.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground min-w-0`,children:[(0,L.jsx)(`span`,{className:`text-primary/70`,"aria-hidden":`true`,children:`❯`}),(0,L.jsx)(`span`,{className:`truncate font-medium`,children:e})]}),(0,L.jsxs)(`button`,{type:`button`,onClick:()=>{navigator.clipboard.writeText(i).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})},title:`Copy output`,"aria-label":`Copy command output`,className:I(`ml-2 shrink-0 flex items-center gap-1 rounded px-1.5 py-0.5 text-xs`,`text-muted-foreground hover:text-foreground hover:bg-accent transition-colors`,`focus:outline-none focus:ring-1 focus:ring-ring`),children:[n?(0,L.jsx)(he,{className:`h-3 w-3 text-status-done`,"aria-hidden":`true`}):(0,L.jsx)(je,{className:`h-3 w-3`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{children:n?`Copied`:`Copy`})]})]}),(0,L.jsx)(`div`,{className:`min-w-0 px-3 py-2 flex flex-col gap-2 break-words leading-snug`,children:t.map((e,t)=>{let n=pC(e.kind??`text`);try{return(0,L.jsx)(`div`,{className:`min-w-0 whitespace-pre-wrap`,children:n(e)},t)}catch{return(0,L.jsx)(`div`,{className:`whitespace-pre-wrap`,children:e.text},t)}})})]})}function gC(e,t){let n=[...t].sort((e,t)=>e.afterCount-t.afterCount||e.key-t.key),r=[],i=0;for(let t of n){let n=Math.min(Math.max(t.afterCount,0),e.length);n>i&&(r.push({kind:`transcript`,items:e.slice(i,n)}),i=n),r.push({kind:`command`,item:t})}return i<e.length&&r.push({kind:`transcript`,items:e.slice(i)}),r}function _C({loading:e,sessions:t,selectedSession:n,items:r,cmdItems:i,totals:a,status:o,turnActive:s,thinkingUi:c,onNewSession:l,starting:u,onSuggest:d,onRetry:f,onEdit:p,isBusy:m,currentModel:h,serverCwd:g}){if(e&&!t.length)return(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,L.jsxs)(`div`,{className:`flex flex-col items-center gap-2 text-muted-foreground`,children:[(0,L.jsx)(`div`,{className:`size-6 animate-spin rounded-full border-2 border-current border-t-transparent`}),(0,L.jsx)(`span`,{className:`text-sm`,children:`Loading sessions...`})]})});if(n&&(r.length>0||i.length>0))return(0,L.jsx)(vC,{sessionId:n.id,items:r,cmdItems:i,totals:a,turnActive:s,thinkingUi:c,onRetry:f,onEdit:p,isBusy:m});if(n)return(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center text-muted-foreground`,children:(0,L.jsx)(`div`,{className:`flex flex-col items-center gap-2`,children:o===`connecting`||o===`reconnecting`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`size-5 animate-spin rounded-full border-2 border-current border-t-transparent`}),(0,L.jsx)(`span`,{className:`text-sm`,children:`Connecting to session...`})]}):n.mode===`live`?(0,L.jsxs)(`div`,{className:`mx-auto w-full max-w-xl px-5 py-10 text-center`,children:[(0,L.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`What can we work on?`}),(0,L.jsx)(bC,{cwd:n.cwd??g,model:h}),(0,L.jsx)(`p`,{className:`mt-3 text-sm leading-relaxed`,children:`Ask a question, explore your project, or turn an idea into working code.`}),(0,L.jsx)(`div`,{className:`mt-6 grid gap-3 sm:grid-cols-2`,children:[[`Explore this project`,`Give me a concise overview of this project and its architecture.`],[`Find a bug`,`Help me investigate a bug. Ask me what is going wrong first.`],[`Plan a feature`,`Help me plan a new feature. Ask me what I want to build.`],[`Review my changes`,`Review my current changes for correctness and potential risks.`]].map(([e,t])=>(0,L.jsx)(`button`,{onClick:()=>d?.(t),className:`rounded-xl border bg-card p-4 text-left text-sm font-medium text-foreground transition-colors hover:border-brand/60 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring`,children:e},e))})]}):(0,L.jsx)(`span`,{className:`text-sm`,children:`No transcript data`})})});let _=yC(g??t.find(e=>e.cwd)?.cwd);return(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center text-muted-foreground`,children:(0,L.jsxs)(`div`,{className:`max-w-lg px-6 py-12 text-center`,children:[(0,L.jsx)(`img`,{src:`/brand-mark.svg`,alt:``,className:`mx-auto mb-6 size-12`}),(0,L.jsx)(`h2`,{className:`text-3xl font-semibold tracking-tight text-foreground`,children:`Your next idea starts here`}),(_??h)&&(0,L.jsxs)(`p`,{className:`mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground`,children:[_&&(0,L.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-foreground/70`,children:_}),h&&(0,L.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-foreground/70`,children:h})]}),(0,L.jsx)(`p`,{className:`mt-4 text-sm leading-relaxed`,children:`Chat with an agent that can explore your project, explain code, and help you get things done. You stay in control.`}),(0,L.jsx)(`button`,{onClick:l,disabled:u,className:`mt-7 min-h-11 rounded-xl bg-brand px-6 text-sm font-semibold text-primary-foreground transition-colors hover:bg-brand/90 disabled:opacity-60`,children:u?`Starting…`:`New chat`}),t.length>0&&(0,L.jsx)(`p`,{className:`mt-4 text-xs`,children:`Or continue a conversation from the sidebar.`})]})})}function vC({sessionId:e,items:t,cmdItems:n,totals:r,turnActive:i,thinkingUi:a,onRetry:o,onEdit:s,isBusy:c}){let l=gC(t,n),u=HS(t),d=l[0]?.kind!==`transcript`;return(0,L.jsxs)(`div`,{className:`flex flex-col gap-0 max-w-4xl mx-auto w-full px-1`,children:[d&&(0,L.jsx)(JS,{sessionId:e,items:[],totals:r,hideEmptyState:!0}),l.map((t,n)=>t.kind===`transcript`?(0,L.jsx)(JS,{sessionId:e,items:t.items,...n===0?{totals:r}:{},turnActive:i&&n===l.length-1,hideEmptyState:!0,thinkingUi:a,onRetry:o,onEdit:s,isBusy:c,rewindIds:u},`t-${n}`):(0,L.jsx)(`div`,{className:`px-2 py-3`,children:(0,L.jsx)(hC,{input:t.item.input,blocks:t.item.response.blocks})},`c-${t.item.key}`))]})}function yC(e){if(e)return e.replace(/[/\\]+$/,``).split(/[/\\]/).pop()||e}function bC({cwd:e,model:t}){let n=yC(e);return!n&&!t?null:(0,L.jsxs)(`p`,{className:`mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground`,"data-testid":`workspace-chips`,children:[n&&(0,L.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-foreground/70`,title:e,"data-testid":`folder-chip`,children:n}),t&&(0,L.jsx)(`span`,{className:`rounded bg-secondary px-1.5 py-0.5 font-mono text-foreground/70`,"data-testid":`model-chip`,children:t})]})}function xC(e){return/model/i.test(e)}function SC({sessionId:e,request:t,onAnswered:n}){let[r,i]=(0,O.useState)(()=>{let e=t.options.findIndex(e=>e.value===t.default);return e<0?0:e}),[a,o]=(0,O.useState)(!1),[s,c]=(0,O.useState)(``),l=(0,O.useRef)(null),u=(0,O.useRef)([]),d=(0,O.useRef)(null),f=(0,O.useRef)(null),p=(0,O.useRef)(!0);(0,O.useEffect)(()=>{p.current=!0;let e=document.activeElement instanceof HTMLElement?document.activeElement:null;u.current[r]?.focus();let t=e=>{l.current?.contains(e.target)||u.current[r]?.focus()};return document.addEventListener(`focusin`,t),()=>{p.current=!1,document.removeEventListener(`focusin`,t),e?.focus()}},[]);async function m(r){if(!a){o(!0),c(``);try{await V(`/api/sessions/${encodeURIComponent(e)}/choices/${encodeURIComponent(t.corrId)}`,{method:`POST`,body:JSON.stringify({value:r})}),p.current&&n()}catch{p.current&&(c(`Could not submit choice. Try again.`),o(!1))}}}function h(e){if(e.key===`Escape`)e.stopPropagation(),t.cancellable&&!a&&(e.preventDefault(),m(null));else{if(e.key===`Tab`){e.stopPropagation();let n=[...u.current.filter(e=>!!e&&!e.disabled),...t.cancellable&&d.current&&!d.current.disabled?[d.current]:[],...f.current&&!f.current.disabled?[f.current]:[]];if(!n.length){e.preventDefault(),l.current?.focus();return}let r=n.indexOf(document.activeElement);e.preventDefault(),n[r<0?e.shiftKey?n.length-1:0:(r+(e.shiftKey?-1:1)+n.length)%n.length]?.focus()}if((e.key===`ArrowDown`||e.key===`ArrowRight`||e.key===`ArrowUp`||e.key===`ArrowLeft`)&&u.current.includes(document.activeElement)){e.preventDefault();let n=(r+(e.key===`ArrowDown`||e.key===`ArrowRight`?1:-1)+t.options.length)%t.options.length;i(n),u.current[n]?.focus()}}}return(0,L.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4`,children:(0,L.jsxs)(`div`,{ref:l,role:`dialog`,tabIndex:-1,"aria-modal":`true`,"aria-labelledby":`choice-title`,"aria-describedby":s?`choice-error`:void 0,onKeyDown:h,className:`flex max-h-[calc(100dvh-2rem)] w-full max-w-lg flex-col rounded-lg border bg-background p-5 shadow-xl`,children:[(0,L.jsx)(`h2`,{id:`choice-title`,className:`text-lg font-semibold`,children:t.title}),(0,L.jsx)(`div`,{role:`radiogroup`,"aria-label":`Choices`,className:`mt-4 flex min-h-0 flex-col gap-2 overflow-y-auto`,children:t.options.map((e,t)=>(0,L.jsxs)(`button`,{ref:e=>{u.current[t]=e},type:`button`,role:`radio`,"aria-checked":r===t,tabIndex:r===t?0:-1,disabled:a,onClick:()=>i(t),className:`rounded-md border p-3 text-left text-sm focus-visible:ring-2 focus-visible:ring-ring ${r===t?`border-brand bg-accent`:`border-border`}`,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:e.label}),e.description&&(0,L.jsx)(`span`,{className:`mt-1 block text-muted-foreground`,children:e.description})]},e.value))}),s&&(0,L.jsx)(`p`,{id:`choice-error`,role:`alert`,className:`mt-3 text-sm text-red-400`,children:s}),(0,L.jsxs)(`div`,{className:`mt-5 flex justify-end gap-2`,children:[t.cancellable&&(0,L.jsx)(`button`,{ref:d,type:`button`,disabled:a,className:`rounded border px-3 py-2 text-sm`,onClick:()=>void m(null),children:`Cancel`}),(0,L.jsx)(`button`,{ref:f,type:`button`,disabled:a,className:`rounded bg-brand px-3 py-2 text-sm text-primary-foreground disabled:opacity-50`,onClick:()=>void m(t.options[r].value),children:a?`Submitting…`:`Select`})]})]})})}var CC=2;function wC({aliases:e,has1m:t,selectedAlias:n,rowId:r,onSelect:i}){let a=[...e.map(e=>({key:e,label:e,alias:e})),...t?[{key:`${r}_1m`,label:`1M`,alias:`${r}_1m`}]:[]],o=a.slice(0,CC),s=a.length-CC;return(0,L.jsxs)(`span`,{className:`ml-2 flex shrink-0 items-center gap-1`,children:[o.map(({key:e,label:t,alias:r})=>(0,L.jsx)(`span`,{onClick:e=>{e.stopPropagation(),i(r)},className:[`cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-mono transition-colors`,n===r?`bg-brand text-primary-foreground`:`bg-muted text-muted-foreground hover:bg-muted/70`].join(` `),children:t},e)),s>0&&(0,L.jsxs)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 text-[10px] font-mono text-muted-foreground`,children:[`+`,s]})]})}function TC({sessionId:e,request:t,onAnswered:n,groups:r,currentModel:i}){let[a,o]=(0,O.useState)(``),[s,c]=(0,O.useState)(t.default??i??r[0]?.rows[0]?.id??``),[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(``),p=(0,O.useRef)(null),m=(0,O.useRef)(!0),h=(0,O.useRef)(null);(0,O.useEffect)(()=>(m.current=!0,h.current=document.activeElement instanceof HTMLElement?document.activeElement:null,p.current?.focus(),()=>{m.current=!1,$c()||h.current?.focus()}),[]);async function g(r){if(!l){u(!0),f(``);try{await V(`/api/sessions/${encodeURIComponent(e)}/choices/${encodeURIComponent(t.corrId)}`,{method:`POST`,body:JSON.stringify({value:r})}),m.current&&n()}catch{m.current&&(f(`Could not submit. Try again.`),u(!1))}}}function _(r){r.key===`Escape`&&(r.stopPropagation(),r.preventDefault(),l||(n(),$c()||h.current?.focus(),V(`/api/sessions/${encodeURIComponent(e)}/choices/${encodeURIComponent(t.corrId)}`,{method:`POST`,body:JSON.stringify({value:null})}).catch(()=>void 0)))}let v=a.trim().toLowerCase(),y=r.map(e=>({...e,rows:e.rows.filter(e=>!v||e.id.toLowerCase().includes(v)||e.name.toLowerCase().includes(v)||e.aliases.some(e=>e.toLowerCase().includes(v)))})).filter(e=>e.rows.length>0);return(0,L.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4`,onKeyDown:_,children:(0,L.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`mpicker-title`,"aria-describedby":d?`mpicker-error`:void 0,className:`flex max-h-[calc(100dvh-2rem)] w-full max-w-lg flex-col rounded-lg border bg-background shadow-xl`,children:[(0,L.jsxs)(`div`,{className:`px-5 pt-5 pb-3 shrink-0`,children:[(0,L.jsx)(`h2`,{id:`mpicker-title`,className:`text-lg font-semibold mb-3`,children:t.title}),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(Dt,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground pointer-events-none`}),(0,L.jsx)(`input`,{ref:p,type:`text`,value:a,onChange:e=>o(e.target.value),placeholder:`Filter models…`,"aria-label":`Filter models`,className:`w-full rounded-md border bg-secondary pl-8 pr-3 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-ring`})]})]}),(0,L.jsxs)(`div`,{role:`radiogroup`,"aria-label":`Models`,className:`min-h-0 overflow-y-auto px-5 pb-2 flex flex-col gap-3`,children:[y.length===0&&(0,L.jsxs)(`p`,{className:`py-4 text-center text-sm text-muted-foreground`,children:[`No models match “`,a,`”`]}),y.map(e=>(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`mb-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground`,children:e.label}),(0,L.jsx)(`div`,{className:`flex flex-col gap-1`,children:e.rows.map(e=>{let t=e.aliases.includes(i)||e.id===i,n=e.aliases.includes(s)||e.id===s;return(0,L.jsxs)(`button`,{type:`button`,role:`radio`,disabled:l,"aria-checked":n,"aria-label":e.name,tabIndex:n?0:-1,onClick:()=>c(e.id),onDoubleClick:()=>{c(e.id),g(e.id)},className:[`flex items-center justify-between rounded-md border px-3 py-2 text-left text-sm transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,n?`border-brand bg-accent`:`border-border hover:bg-accent/50`].join(` `),children:[(0,L.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`font-medium truncate`,children:e.name}),t&&(0,L.jsx)(`span`,{className:`shrink-0 rounded-full bg-status-done/15 px-1.5 py-0.5 text-[10px] font-medium text-status-done`,children:`current`})]}),(0,L.jsx)(wC,{aliases:e.aliases,has1m:e.has1m,selectedAlias:s,rowId:e.id,onSelect:e=>{c(e)}})]},e.id)})})]},e.label))]}),d&&(0,L.jsx)(`p`,{id:`mpicker-error`,role:`alert`,className:`mx-5 mt-1 text-sm text-red-400`,children:d}),(0,L.jsxs)(`div`,{className:`shrink-0 flex justify-end gap-2 border-t border-border/40 px-5 py-3`,children:[(0,L.jsx)(`button`,{type:`button`,disabled:l,className:`rounded border px-3 py-2 text-sm hover:bg-accent`,onClick:()=>{g(null),$c()},children:`Cancel`}),(0,L.jsx)(`button`,{type:`button`,disabled:l||!s,className:`rounded bg-brand px-3 py-2 text-sm text-primary-foreground disabled:opacity-50`,onClick:()=>void g(s),children:l?`Switching…`:`Select`})]})]})})}function EC({sessionId:e,request:t,onAnswered:n}){let[r,i]=(0,O.useState)(null),[a,o]=(0,O.useState)({}),[s,c]=(0,O.useState)(``),l=xC(t.title);if((0,O.useEffect)(()=>{if(!l)return;let e=!1;return V(`/api/models`).then(t=>{e||(t?.groups&&i(t.groups),t?.models&&o(Object.fromEntries(t.models.map(e=>[e.id,e.label]))),t?.default&&c(t.default))}).catch(()=>void 0),()=>{e=!0}},[l]),l){let i=r??[{label:`Models`,rows:t.options.map(e=>({id:e.value,name:a[e.value]??e.label,aliases:[e.value],has1m:!1}))}];return(0,L.jsx)(TC,{sessionId:e,request:t,onAnswered:n,groups:i,currentModel:s})}return(0,L.jsx)(SC,{sessionId:e,request:t,onAnswered:n})}function DC({progress:e}){return e.length?(0,L.jsx)(`div`,{role:`group`,"aria-label":`Command progress`,className:`mx-auto w-full max-w-4xl space-y-2 px-3 py-2`,children:e.map(({corrId:e,label:t,fraction:n})=>(0,L.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border bg-secondary/40 px-3 py-2 text-xs`,children:[(0,L.jsx)(`span`,{children:t}),n!==void 0&&(0,L.jsx)(`progress`,{className:`mt-1 block w-full`,value:n,max:1,"aria-label":`${t} progress`})]},e))}):null}function OC(e,t){return{retry:(0,O.useCallback)(async n=>{t||await V(`/api/sessions/${encodeURIComponent(e)}/rewind`,{method:`POST`,body:JSON.stringify(n?.trim()?{mode:`retry`,text:n}:{mode:`retry`})})},[e,t]),editAndResend:(0,O.useCallback)(async n=>{!t&&n.trim()&&await V(`/api/sessions/${encodeURIComponent(e)}/rewind`,{method:`POST`,body:JSON.stringify({mode:`edit`,text:n})})},[e,t])}}var kC=`(✓) `;function AC({liveTurns:e,sessionTitle:t,isSelected:n}){let r=(0,O.useRef)(e),i=(0,O.useRef)(!1),a=(0,O.useRef)(document.title.startsWith(kC)?document.title.slice(4):document.title);(0,O.useEffect)(()=>{function e(){i.current&&=(document.title=a.current,!1)}return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[]),(0,O.useEffect)(()=>{let o=r.current;if(r.current=e,!(e<=o)&&(document.hidden||n===!1)&&(i.current||(a.current=document.title.startsWith(kC)?document.title.slice(4):document.title),document.title=kC+a.current,i.current=!0,typeof Notification<`u`&&Notification.permission===`granted`))try{let e=new Notification(`afk — turn complete`,{body:t?`Session: ${t}`:`A turn finished.`,tag:`afk-turn-complete`});setTimeout(()=>e.close(),5e3)}catch{}},[e,t,n])}function jC(){return(0,L.jsx)(pu,{children:(0,L.jsx)(MC,{})})}function MC(){let{sessions:e,loading:t,refresh:n}=gu(),[r,i]=(0,O.useState)({}),a=e.map(e=>({...e,...r[e.id]})),{approvals:o,pendingSessionIds:s}=bu(),{toast:c}=mu(),[l,u]=(0,O.useState)(`sessions`),[d,f]=fd(),[p,m]=(0,O.useState)(),[h,g]=(0,O.useState)(!1),_=(0,O.useRef)(!1),[v,y]=(0,O.useState)(!1),[b,x]=(0,O.useState)(!1),S=a.find(e=>e.id===d),C=(0,O.useRef)({}),w=(0,O.useRef)({}),T=(0,O.useRef)({}),{items:E,totals:D,status:ee,turnActive:te,liveTurns:ne,choices:k,progress:re}=Qu(d,()=>{d&&(C.current[d]=(C.current[d]??0)+1,fe(d,T.current[d]),T.current[d]=!1,Me.clear(),Ne.current=0,je.current?.abort())}),{containerRef:ae,scrollToBottom:A,isPinned:oe,showScrollButton:se,hasNewContent:ce,notifyNewContent:le}=td(),{itemsFor:ue,addItem:de,clearItems:fe}=ud(),pe=ue(d),[me,he]=(0,O.useState)(null),ge=ee===`open`&&S?.mode===`live`?k.find(e=>`${d}:${e.corrId}`!==me):void 0;(0,O.useEffect)(()=>{he(null),m(void 0),Te(void 0)},[d]),(0,O.useEffect)(()=>{me&&!k.some(e=>`${d}:${e.corrId}`===me)&&he(null)},[k,d,me]),(0,O.useEffect)(()=>{oe?A():le()},[E,pe.length]),(0,O.useEffect)(()=>{A()},[d,A]),(0,O.useEffect)(()=>{d&&u(`sessions`)},[d]);let _e=e=>{Pr(e)&&(u(e),x(!1))},ve=e=>{f(e),u(`sessions`),x(!1)},ye=te,{retry:j,editAndResend:M}=OC(d??``,ye);AC({liveTurns:ne,sessionTitle:S?.title,isSelected:!0});let be=e=>{let t=e instanceof Oc&&typeof e.body?.message==`string`?e.body.message:e instanceof Error?e.message:``;c(t?`Could not rewind: ${t}`:`Could not rewind`,`info`)},[xe,Se]=(0,O.useState)(),Ce=S?.model??xe,[we,Te]=(0,O.useState)(),Ee=(e,t)=>{if(!d)return;t.control.kind===`clear`&&(Me.clear(),Ne.current=0,T.current[d]=w.current[d]===(C.current[d]??0)),de(d,e,t,E.length);let n=t.session;n&&i(e=>({...e,[d]:{...e[d],...n.model===void 0?{}:{model:n.model},...n.name===void 0?{}:{title:n.name,titleExplicit:n.nameExplicit===!0},...n.thinkingUi===void 0?{}:{thinkingUi:n.thinkingUi}}}))},De=(0,O.useCallback)(e=>{f(e),u(`sessions`),n()},[n,f]),Oe=(0,O.useCallback)(()=>{f(null),n()},[n,f]),ke=(0,O.useCallback)(async e=>{try{let t=await V(`/api/sessions/${encodeURIComponent(e)}/resume`,{method:`POST`});f(t.session.id),n()}catch(e){c(e instanceof Error?`Could not resume: ${e.message}`:`Could not resume this session`,`info`)}},[c,n,f]),Ae=(0,O.useCallback)(async()=>{if(!_.current){_.current=!0,g(!0);try{let e=await V(`/api/sessions`,{method:`POST`,body:JSON.stringify(xe?{model:xe}:{})});f(e.session.id),u(`sessions`),x(!1),Te(e.session.cwd),await n()}catch(e){c(e instanceof Error?`Could not start chat: ${e.message}`:`Could not start chat`,`info`)}finally{_.current=!1,g(!1)}}},[xe,f,n,c]),je=(0,O.useRef)(null),Me=id({submit:(0,O.useCallback)(async e=>{if(!d)throw Error(`no session`);let t=new AbortController;je.current=t,await V(`/api/sessions/${d}/prompt`,{method:`POST`,body:JSON.stringify({text:e}),signal:t.signal})},[d]),isLive:S?.mode===`live`}),Ne=(0,O.useRef)(0);(0,O.useEffect)(()=>{je.current?.abort(),je.current=null,Me.clear(),Ne.current=0},[d]),(0,O.useEffect)(()=>{ne>Ne.current&&Me.flush(),Ne.current=ne},[ne,Me.flush]);let Pe=(0,L.jsx)(Ir,{sessions:a,pendingSessionIds:s,busySessionIds:ye&&d?new Set([d]):void 0,selectedSessionId:d,onSelectSession:ve,onResumeSession:e=>void ke(e),activeNav:l,onNavChange:_e,collapsed:v,runningSessionId:te?d:null,onNewSession:()=>void Ae(),starting:h,onToggleCollapse:()=>y(e=>!e)});return(0,L.jsxs)(`div`,{className:`flex h-dvh overflow-hidden`,children:[(0,L.jsx)(fl,{onNavigate:_e,sessions:a,onSelectSession:ve,...S?.mode===`live`&&d?{onInsertCommand:e=>{u(`sessions`),m({text:e,nonce:Date.now(),sessionId:d})}}:{}}),(0,L.jsx)(ml,{onNavigate:_e}),(0,L.jsx)(`div`,{className:`hidden md:block`,children:Pe}),(0,L.jsx)(lu,{open:b,onClose:()=>x(!1),children:(0,L.jsx)(Ir,{sessions:a,pendingSessionIds:s,busySessionIds:ye&&d?new Set([d]):void 0,selectedSessionId:d,onSelectSession:ve,onResumeSession:e=>void ke(e),activeNav:l,onNavChange:_e,collapsed:!1,onToggleCollapse:()=>void 0,runningSessionId:te?d:null,onNewSession:()=>void Ae(),starting:h})}),(0,L.jsxs)(`main`,{className:`flex min-w-0 flex-1 flex-col overflow-hidden`,children:[(0,L.jsxs)(`header`,{className:`flex min-h-14 shrink-0 items-center justify-between gap-2 border-b px-3 md:px-4`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,L.jsx)(uu,{className:`md:hidden`,onClick:()=>x(!0)}),l===`sessions`&&S?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(NC,{status:ee}),(0,L.jsx)(`h1`,{className:`min-w-0 truncate text-sm font-medium text-foreground`,title:S.title??void 0,children:Or(S,`New session`)}),S.model&&(0,L.jsx)(`span`,{className:`hidden shrink-0 rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-secondary-foreground sm:inline-block`,title:`Session model`,children:S.model})]}):(0,L.jsx)(`h1`,{className:`text-sm font-medium text-muted-foreground`,children:Pr(l)?.title})]}),(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>void Ae(),disabled:h,title:`New chat`,"aria-label":`New chat`,className:`inline-flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground hover:bg-secondary hover:text-foreground disabled:opacity-50 md:hidden`,children:(0,L.jsx)(Ft,{className:`h-4 w-4`})}),l===`sessions`&&S&&(0,L.jsx)(yl,{totals:D,className:`hidden lg:flex`}),(0,L.jsx)(`kbd`,{className:`hidden rounded border bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-foreground/70 sm:inline-block`,children:`⌘K`})]})]}),(0,L.jsxs)(`div`,{className:`relative flex flex-1 flex-col overflow-hidden`,children:[(0,L.jsx)(`div`,{ref:ae,"data-testid":`transcript-scroll`,tabIndex:0,"aria-label":`Conversation transcript`,className:`relative flex min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,children:(0,L.jsxs)(`div`,{className:`flex-1`,children:[l===`sessions`&&(0,L.jsx)(_C,{loading:t,sessions:a,selectedSession:S,items:E,cmdItems:pe,totals:D,status:ee,turnActive:te,thinkingUi:S?.thinkingUi,onNewSession:()=>void Ae(),starting:h,onSuggest:e=>{d&&m({text:e,nonce:Date.now(),sessionId:d})},onRetry:()=>{A(),j(PC(E)).catch(be)},onEdit:e=>{A(),M(e).catch(be)},isBusy:ye,currentModel:Ce,serverCwd:S?.cwd??we}),l===`sessions`&&S&&ee===`open`&&(0,L.jsx)(DC,{progress:re}),l===`memory`&&(0,L.jsx)(Dl,{}),l===`schedules`&&(0,L.jsx)(Ll,{}),l===`jobs`&&(0,L.jsx)(ql,{}),l===`handoffs`&&(0,L.jsx)(Ql,{}),l===`settings`&&(0,L.jsx)(au,{})]})}),l===`sessions`&&S&&S.mode===`live`&&(0,L.jsxs)(`div`,{className:`relative shrink-0 pb-[env(safe-area-inset-bottom)]`,"data-testid":`composer-dock`,children:[se&&(0,L.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-full flex justify-center pb-2`,children:(0,L.jsxs)(`button`,{onClick:A,"aria-label":ce?`New messages`:`Jump to latest`,className:`pointer-events-auto flex items-center gap-1.5 whitespace-nowrap rounded-full bg-brand px-3 py-2 text-xs font-medium text-primary-foreground shadow-lg`,children:[(0,L.jsx)(ie,{className:`size-3`}),ce?`New messages`:`Jump to latest`]})}),o.length>0&&(0,L.jsx)(cu,{approvals:o}),(0,L.jsx)(ll,{sessionId:S.id,prefill:p?.sessionId===S.id?p:void 0,sessionMode:S.mode,isBusy:ye,queue:Me,onModelSelect:Se,currentModel:Ce,onPromptSent:A,onCommandStart:e=>{A(),/^\/clear(?:\s|$)/.test(e)&&(w.current[S.id]=C.current[S.id]??0)},onCommandOutput:Ee,onToast:e=>c(e,`info`),onNavigate:De,onSessionEnded:Oe},S.id)]})]})]}),l===`sessions`&&d&&ge&&(0,L.jsx)(EC,{sessionId:d,request:ge,onAnswered:()=>he(`${d}:${ge.corrId}`)},`${d}:${ge.corrId}`)]})}function NC({status:e}){return e===`open`?(0,L.jsx)(`span`,{className:`size-2 rounded-full bg-status-running`,title:`Live`}):e===`connecting`||e===`reconnecting`?(0,L.jsx)(`span`,{className:`size-2 animate-pulse rounded-full bg-status-blocked`,title:e}):e===`ended`?(0,L.jsx)(`span`,{className:`size-2 rounded-full bg-muted-foreground`,title:`Session ended`}):null}function PC(e){for(let t=e.length-1;t>=0;t--)if(e[t].kind===`user`)return e[t].text}var FC=document.getElementById(`root`);if(!FC)throw Error(`Root element #root not found`);(0,Jt.createRoot)(FC).render((0,L.jsx)(O.StrictMode,{children:(0,L.jsx)(jC,{})}));export{cp as a,Cf as c,sp as i,s as l,oy as n,ip as o,lp as r,kf as s,dS as t};
|