@polderlabs/bizar 4.4.13 → 4.5.1
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/bizar-dash/CHANGELOG.md +37 -276
- package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js +2 -0
- package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js.map +1 -0
- package/bizar-dash/dist/assets/main-eWZ4NlCL.css +1 -0
- package/bizar-dash/dist/assets/main-usWhlPWa.js +362 -0
- package/bizar-dash/dist/assets/main-usWhlPWa.js.map +1 -0
- package/bizar-dash/dist/assets/{mobile-DSb-t42Y.js → mobile-DQLFCjwJ.js} +2 -2
- package/bizar-dash/dist/assets/{mobile-DSb-t42Y.js.map → mobile-DQLFCjwJ.js.map} +1 -1
- package/bizar-dash/dist/assets/mobile-O6ANdD4W.js +352 -0
- package/bizar-dash/dist/assets/mobile-O6ANdD4W.js.map +1 -0
- package/bizar-dash/dist/index.html +3 -3
- package/bizar-dash/dist/mobile.html +2 -2
- package/bizar-dash/skills/agent-baseline/SKILL.md +80 -0
- package/bizar-dash/skills/bizar/SKILL.md +116 -0
- package/bizar-dash/skills/chat/SKILL.md +74 -0
- package/bizar-dash/skills/headroom/SKILL.md +94 -0
- package/bizar-dash/skills/lightrag/SKILL.md +86 -0
- package/bizar-dash/skills/minimax/SKILL.md +80 -0
- package/bizar-dash/skills/obsidian/SKILL.md +68 -0
- package/bizar-dash/skills/providers/SKILL.md +75 -0
- package/bizar-dash/skills/sdk/SKILL.md +138 -0
- package/bizar-dash/skills/self-improvement/SKILL.md +53 -0
- package/bizar-dash/skills/skills-cli/SKILL.md +94 -0
- package/bizar-dash/skills/usage/SKILL.md +62 -0
- package/bizar-dash/src/server/api.mjs +18 -0
- package/bizar-dash/src/server/headroom.mjs +645 -0
- package/bizar-dash/src/server/memory-lightrag.mjs +272 -2
- package/bizar-dash/src/server/memory-obsidian.mjs +230 -0
- package/bizar-dash/src/server/memory-store.mjs +189 -0
- package/bizar-dash/src/server/minimax-usage-store.mjs +372 -0
- package/bizar-dash/src/server/minimax.mjs +196 -5
- package/bizar-dash/src/server/providers-store.mjs +956 -0
- package/bizar-dash/src/server/routes/_shared.mjs +17 -0
- package/bizar-dash/src/server/routes/config.mjs +52 -1
- package/bizar-dash/src/server/routes/env-vars.mjs +165 -0
- package/bizar-dash/src/server/routes/headroom.mjs +126 -0
- package/bizar-dash/src/server/routes/lightrag.mjs +154 -0
- package/bizar-dash/src/server/routes/memory.mjs +668 -1
- package/bizar-dash/src/server/routes/opencode-session-detail.mjs +14 -29
- package/bizar-dash/src/server/routes/opencode-sessions.mjs +205 -3
- package/bizar-dash/src/server/routes/providers.mjs +266 -5
- package/bizar-dash/src/server/routes/skills.mjs +32 -43
- package/bizar-dash/src/server/routes/update.mjs +340 -0
- package/bizar-dash/src/server/routes/usage.mjs +136 -0
- package/bizar-dash/src/server/serve-info.mjs +135 -4
- package/bizar-dash/src/server/server.mjs +20 -0
- package/bizar-dash/src/server/skills-store.mjs +152 -262
- package/bizar-dash/src/web/App.tsx +120 -29
- package/bizar-dash/src/web/components/EnvVarManager.tsx +247 -0
- package/bizar-dash/src/web/components/HeadroomSettings.tsx +418 -0
- package/bizar-dash/src/web/components/HeadroomStatus.tsx +158 -0
- package/bizar-dash/src/web/components/SettingsSearch.tsx +213 -0
- package/bizar-dash/src/web/components/Topbar.tsx +2 -1
- package/bizar-dash/src/web/components/UsageChart.tsx +250 -0
- package/bizar-dash/src/web/components/UsageTable.tsx +90 -0
- package/bizar-dash/src/web/components/chat/ChatComposer.tsx +21 -25
- package/bizar-dash/src/web/components/chat/ChatInfoPanel.tsx +199 -37
- package/bizar-dash/src/web/components/chat/ChatThread.tsx +29 -17
- package/bizar-dash/src/web/components/chat/FloatingComposer.tsx +7 -1
- package/bizar-dash/src/web/components/chat/InfoPanel.tsx +71 -6
- package/bizar-dash/src/web/components/chat/useChat.ts +751 -257
- package/bizar-dash/src/web/lib/api.ts +43 -0
- package/bizar-dash/src/web/lib/types.ts +16 -0
- package/bizar-dash/src/web/main.tsx +2 -0
- package/bizar-dash/src/web/mobile/views/MobileChat.tsx +110 -35
- package/bizar-dash/src/web/styles/chat.css +135 -1
- package/bizar-dash/src/web/styles/main.css +46 -0
- package/bizar-dash/src/web/styles/memory.css +955 -0
- package/bizar-dash/src/web/styles/minimax-usage.css +335 -0
- package/bizar-dash/src/web/styles/settings.css +418 -0
- package/bizar-dash/src/web/styles/skills.css +302 -0
- package/bizar-dash/src/web/styles/tasks.css +288 -0
- package/bizar-dash/src/web/views/Chat.tsx +276 -48
- package/bizar-dash/src/web/views/Config.tsx +3 -2065
- package/bizar-dash/src/web/views/Memory.tsx +140 -0
- package/bizar-dash/src/web/views/MiniMaxUsage.tsx +476 -461
- package/bizar-dash/src/web/views/Overview.tsx +3 -0
- package/bizar-dash/src/web/views/Settings.tsx +36 -0
- package/bizar-dash/src/web/views/Skills.tsx +208 -260
- package/bizar-dash/src/web/views/Tasks.tsx +348 -1119
- package/bizar-dash/src/web/views/memory/ConfigPanel.tsx +289 -0
- package/bizar-dash/src/web/views/memory/GitSyncPanel.tsx +220 -0
- package/bizar-dash/src/web/views/memory/LightragPanel.tsx +307 -0
- package/bizar-dash/src/web/views/memory/MemoryOverview.tsx +354 -0
- package/bizar-dash/src/web/views/memory/MemoryStatusCard.tsx +160 -0
- package/bizar-dash/src/web/views/memory/ObsidianPanel.tsx +642 -0
- package/bizar-dash/src/web/views/memory/SemanticSearchPanel.tsx +194 -0
- package/bizar-dash/tests/chat-session-create.test.mjs +391 -0
- package/bizar-dash/tests/chat-session-stream.test.mjs +308 -0
- package/bizar-dash/tests/env-vars-store.test.mjs +216 -0
- package/bizar-dash/tests/headroom-install.test.mjs +173 -0
- package/bizar-dash/tests/headroom-settings.test.mjs +126 -0
- package/bizar-dash/tests/headroom-status.test.mjs +117 -0
- package/bizar-dash/tests/lightrag-defaults.node.test.mjs +118 -0
- package/bizar-dash/tests/memory-lightrag-extended.test.mjs +162 -0
- package/bizar-dash/tests/memory-obsidian.test.mjs +269 -0
- package/bizar-dash/tests/memory-tab.test.mjs +322 -0
- package/bizar-dash/tests/minimax-chat-usage.test.mjs +178 -0
- package/bizar-dash/tests/minimax-usage-store.node.test.mjs +293 -0
- package/bizar-dash/tests/mod-upgrade.node.test.mjs +1 -1
- package/bizar-dash/tests/opencode-sessions-detail.test.mjs +12 -9
- package/bizar-dash/tests/providers-store-backup-keys.node.test.mjs +479 -3
- package/bizar-dash/tests/providers-store-search.node.test.mjs +166 -0
- package/bizar-dash/tests/skills-list.test.mjs +232 -0
- package/bizar-dash/tests/skills-search.test.mjs +222 -0
- package/bizar-dash/tests/submit-feedback.test.mjs +6 -6
- package/bizar-dash/tests/tasks-create.test.mjs +187 -0
- package/bizar-dash/tests/update-check.test.mjs +127 -0
- package/bizar-dash/tests/update-run.test.mjs +266 -0
- package/cli/bin.mjs +247 -1
- package/cli/provision.mjs +118 -4
- package/config/agents/_shared/SKILLS.md +109 -0
- package/package.json +1 -1
- package/bizar-dash/dist/assets/main-BB5mJurD.js +0 -352
- package/bizar-dash/dist/assets/main-BB5mJurD.js.map +0 -1
- package/bizar-dash/dist/assets/main-BsnQLXdh.css +0 -1
- package/bizar-dash/dist/assets/mobile-Dl1q7Cyq.js +0 -354
- package/bizar-dash/dist/assets/mobile-Dl1q7Cyq.js.map +0 -1
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
var hg=Object.defineProperty;var mg=(e,t,n)=>t in e?hg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var rt=(e,t,n)=>mg(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var El=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cf={exports:{}},os={},jf={exports:{}},ce={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ai=Symbol.for("react.element"),pg=Symbol.for("react.portal"),gg=Symbol.for("react.fragment"),yg=Symbol.for("react.strict_mode"),xg=Symbol.for("react.profiler"),vg=Symbol.for("react.provider"),kg=Symbol.for("react.context"),wg=Symbol.for("react.forward_ref"),bg=Symbol.for("react.suspense"),Sg=Symbol.for("react.memo"),Cg=Symbol.for("react.lazy"),tc=Symbol.iterator;function jg(e){return e===null||typeof e!="object"?null:(e=tc&&e[tc]||e["@@iterator"],typeof e=="function"?e:null)}var Nf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ef=Object.assign,Tf={};function Mr(e,t,n){this.props=e,this.context=t,this.refs=Tf,this.updater=n||Nf}Mr.prototype.isReactComponent={};Mr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};Mr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function If(){}If.prototype=Mr.prototype;function _a(e,t,n){this.props=e,this.context=t,this.refs=Tf,this.updater=n||Nf}var Oa=_a.prototype=new If;Oa.constructor=_a;Ef(Oa,Mr.prototype);Oa.isPureReactComponent=!0;var nc=Array.isArray,zf=Object.prototype.hasOwnProperty,Fa={current:null},Pf={key:!0,ref:!0,__self:!0,__source:!0};function Af(e,t,n){var r,i={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)zf.call(t,r)&&!Pf.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var u=Array(o),d=0;d<o;d++)u[d]=arguments[d+2];i.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:Ai,type:e,key:l,ref:s,props:i,_owner:Fa.current}}function Ng(e,t){return{$$typeof:Ai,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function $a(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ai}function Eg(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var rc=/\/+/g;function Ds(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Eg(""+e.key):t.toString(36)}function fl(e,t,n,r,i){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ai:case pg:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Ds(s,0):r,nc(i)?(n="",e!=null&&(n=e.replace(rc,"$&/")+"/"),fl(i,t,n,"",function(d){return d})):i!=null&&($a(i)&&(i=Ng(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(rc,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",nc(e))for(var o=0;o<e.length;o++){l=e[o];var u=r+Ds(l,o);s+=fl(l,t,n,u,i)}else if(u=jg(e),typeof u=="function")for(e=u.call(e),o=0;!(l=e.next()).done;)l=l.value,u=r+Ds(l,o++),s+=fl(l,t,n,u,i);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Vi(e,t,n){if(e==null)return e;var r=[],i=0;return fl(e,r,"","",function(l){return t.call(n,l,i++)}),r}function Tg(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var et={current:null},hl={transition:null},Ig={ReactCurrentDispatcher:et,ReactCurrentBatchConfig:hl,ReactCurrentOwner:Fa};function Mf(){throw Error("act(...) is not supported in production builds of React.")}ce.Children={map:Vi,forEach:function(e,t,n){Vi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Vi(e,function(){t++}),t},toArray:function(e){return Vi(e,function(t){return t})||[]},only:function(e){if(!$a(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ce.Component=Mr;ce.Fragment=gg;ce.Profiler=xg;ce.PureComponent=_a;ce.StrictMode=yg;ce.Suspense=bg;ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ig;ce.act=Mf;ce.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ef({},e.props),i=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=Fa.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)zf.call(t,u)&&!Pf.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var d=0;d<u;d++)o[d]=arguments[d+2];r.children=o}return{$$typeof:Ai,type:e.type,key:i,ref:l,props:r,_owner:s}};ce.createContext=function(e){return e={$$typeof:kg,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:vg,_context:e},e.Consumer=e};ce.createElement=Af;ce.createFactory=function(e){var t=Af.bind(null,e);return t.type=e,t};ce.createRef=function(){return{current:null}};ce.forwardRef=function(e){return{$$typeof:wg,render:e}};ce.isValidElement=$a;ce.lazy=function(e){return{$$typeof:Cg,_payload:{_status:-1,_result:e},_init:Tg}};ce.memo=function(e,t){return{$$typeof:Sg,type:e,compare:t===void 0?null:t}};ce.startTransition=function(e){var t=hl.transition;hl.transition={};try{e()}finally{hl.transition=t}};ce.unstable_act=Mf;ce.useCallback=function(e,t){return et.current.useCallback(e,t)};ce.useContext=function(e){return et.current.useContext(e)};ce.useDebugValue=function(){};ce.useDeferredValue=function(e){return et.current.useDeferredValue(e)};ce.useEffect=function(e,t){return et.current.useEffect(e,t)};ce.useId=function(){return et.current.useId()};ce.useImperativeHandle=function(e,t,n){return et.current.useImperativeHandle(e,t,n)};ce.useInsertionEffect=function(e,t){return et.current.useInsertionEffect(e,t)};ce.useLayoutEffect=function(e,t){return et.current.useLayoutEffect(e,t)};ce.useMemo=function(e,t){return et.current.useMemo(e,t)};ce.useReducer=function(e,t,n){return et.current.useReducer(e,t,n)};ce.useRef=function(e){return et.current.useRef(e)};ce.useState=function(e){return et.current.useState(e)};ce.useSyncExternalStore=function(e,t,n){return et.current.useSyncExternalStore(e,t,n)};ce.useTransition=function(){return et.current.useTransition()};ce.version="18.3.1";jf.exports=ce;var w=jf.exports;const _e=Da(w);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var zg=w,Pg=Symbol.for("react.element"),Ag=Symbol.for("react.fragment"),Mg=Object.prototype.hasOwnProperty,Lg=zg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Rg={key:!0,ref:!0,__self:!0,__source:!0};function Lf(e,t,n){var r,i={},l=null,s=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Mg.call(t,r)&&!Rg.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Pg,type:e,key:l,ref:s,props:i,_owner:Lg.current}}os.Fragment=Ag;os.jsx=Lf;os.jsxs=Lf;Cf.exports=os;var a=Cf.exports,Rf={exports:{}},vt={},Df={exports:{}},_f={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(R,V){var S=R.length;R.push(V);e:for(;0<S;){var Y=S-1>>>1,ie=R[Y];if(0<i(ie,V))R[Y]=V,R[S]=ie,S=Y;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var V=R[0],S=R.pop();if(S!==V){R[0]=S;e:for(var Y=0,ie=R.length,N=ie>>>1;Y<N;){var ge=2*(Y+1)-1,Le=R[ge],oe=ge+1,Ne=R[oe];if(0>i(Le,S))oe<ie&&0>i(Ne,Le)?(R[Y]=Ne,R[oe]=S,Y=oe):(R[Y]=Le,R[ge]=S,Y=ge);else if(oe<ie&&0>i(Ne,S))R[Y]=Ne,R[oe]=S,Y=oe;else break e}}return V}function i(R,V){var S=R.sortIndex-V.sortIndex;return S!==0?S:R.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var u=[],d=[],c=1,f=null,m=3,h=!1,p=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(R){for(var V=n(d);V!==null;){if(V.callback===null)r(d);else if(V.startTime<=R)r(d),V.sortIndex=V.expirationTime,t(u,V);else break;V=n(d)}}function C(R){if(x=!1,v(R),!p)if(n(u)!==null)p=!0,de(z);else{var V=n(d);V!==null&&ee(C,V.startTime-R)}}function z(R,V){p=!1,x&&(x=!1,y(L),L=-1),h=!0;var S=m;try{for(v(V),f=n(u);f!==null&&(!(f.expirationTime>V)||R&&!j());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,m=f.priorityLevel;var ie=Y(f.expirationTime<=V);V=e.unstable_now(),typeof ie=="function"?f.callback=ie:f===n(u)&&r(u),v(V)}else r(u);f=n(u)}if(f!==null)var N=!0;else{var ge=n(d);ge!==null&&ee(C,ge.startTime-V),N=!1}return N}finally{f=null,m=S,h=!1}}var E=!1,A=null,L=-1,I=5,k=-1;function j(){return!(e.unstable_now()-k<I)}function P(){if(A!==null){var R=e.unstable_now();k=R;var V=!0;try{V=A(!0,R)}finally{V?B():(E=!1,A=null)}}else E=!1}var B;if(typeof g=="function")B=function(){g(P)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,W=O.port2;O.port1.onmessage=P,B=function(){W.postMessage(null)}}else B=function(){b(P,0)};function de(R){A=R,E||(E=!0,B())}function ee(R,V){L=b(function(){R(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,de(z))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(R){switch(m){case 1:case 2:case 3:var V=3;break;default:V=m}var S=m;m=V;try{return R()}finally{m=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,V){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var S=m;m=R;try{return V()}finally{m=S}},e.unstable_scheduleCallback=function(R,V,S){var Y=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?Y+S:Y):S=Y,R){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=S+ie,R={id:c++,callback:V,priorityLevel:R,startTime:S,expirationTime:ie,sortIndex:-1},S>Y?(R.sortIndex=S,t(d,R),n(u)===null&&R===n(d)&&(x?(y(L),L=-1):x=!0,ee(C,S-Y))):(R.sortIndex=ie,t(u,R),p||h||(p=!0,de(z))),R},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(R){var V=m;return function(){var S=m;m=V;try{return R.apply(this,arguments)}finally{m=S}}}})(_f);Df.exports=_f;var Dg=Df.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var _g=w,yt=Dg;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var Of=new Set,hi={};function Gn(e,t){Cr(e,t),Cr(e+"Capture",t)}function Cr(e,t){for(hi[e]=t,e=0;e<t.length;e++)Of.add(t[e])}var Zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),No=Object.prototype.hasOwnProperty,Og=/^[: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]*$/,ic={},lc={};function Fg(e){return No.call(lc,e)?!0:No.call(ic,e)?!1:Og.test(e)?lc[e]=!0:(ic[e]=!0,!1)}function $g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Bg(e,t,n,r){if(t===null||typeof t>"u"||$g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function tt(e,t,n,r,i,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ve[e]=new tt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ve[t]=new tt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ve[e]=new tt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ve[e]=new tt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ve[e]=new tt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ve[e]=new tt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ve[e]=new tt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ve[e]=new tt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ve[e]=new tt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ba=/[\-:]([a-z])/g;function Ua(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ba,Ua);Ve[t]=new tt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ba,Ua);Ve[t]=new tt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ba,Ua);Ve[t]=new tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ve[e]=new tt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ve.xlinkHref=new tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ve[e]=new tt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ha(e,t,n,r){var i=Ve.hasOwnProperty(t)?Ve[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Bg(t,n,i,r)&&(n=null),r||i===null?Fg(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var nn=_g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wi=Symbol.for("react.element"),rr=Symbol.for("react.portal"),ir=Symbol.for("react.fragment"),Va=Symbol.for("react.strict_mode"),Eo=Symbol.for("react.profiler"),Ff=Symbol.for("react.provider"),$f=Symbol.for("react.context"),Wa=Symbol.for("react.forward_ref"),To=Symbol.for("react.suspense"),Io=Symbol.for("react.suspense_list"),Qa=Symbol.for("react.memo"),an=Symbol.for("react.lazy"),Bf=Symbol.for("react.offscreen"),sc=Symbol.iterator;function $r(e){return e===null||typeof e!="object"?null:(e=sc&&e[sc]||e["@@iterator"],typeof e=="function"?e:null)}var ze=Object.assign,_s;function Gr(e){if(_s===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_s=t&&t[1]||""}return`
|
|
34
|
+
`+_s+e}var Os=!1;function Fs(e,t){if(!e||Os)return"";Os=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.stack.split(`
|
|
35
|
+
`),l=r.stack.split(`
|
|
36
|
+
`),s=i.length-1,o=l.length-1;1<=s&&0<=o&&i[s]!==l[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==l[o]){if(s!==1||o!==1)do if(s--,o--,0>o||i[s]!==l[o]){var u=`
|
|
37
|
+
`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=o);break}}}finally{Os=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Gr(e):""}function Ug(e){switch(e.tag){case 5:return Gr(e.type);case 16:return Gr("Lazy");case 13:return Gr("Suspense");case 19:return Gr("SuspenseList");case 0:case 2:case 15:return e=Fs(e.type,!1),e;case 11:return e=Fs(e.type.render,!1),e;case 1:return e=Fs(e.type,!0),e;default:return""}}function zo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ir:return"Fragment";case rr:return"Portal";case Eo:return"Profiler";case Va:return"StrictMode";case To:return"Suspense";case Io:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $f:return(e.displayName||"Context")+".Consumer";case Ff:return(e._context.displayName||"Context")+".Provider";case Wa:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Qa:return t=e.displayName||null,t!==null?t:zo(e.type)||"Memo";case an:t=e._payload,e=e._init;try{return zo(e(t))}catch{}}return null}function Hg(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return zo(t);case 8:return t===Va?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function bn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Uf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Vg(e){var t=Uf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qi(e){e._valueTracker||(e._valueTracker=Vg(e))}function Hf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Uf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Tl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Po(e,t){var n=t.checked;return ze({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function oc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=bn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Vf(e,t){t=t.checked,t!=null&&Ha(e,"checked",t,!1)}function Ao(e,t){Vf(e,t);var n=bn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Mo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mo(e,t.type,bn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ac(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Mo(e,t,n){(t!=="number"||Tl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xr=Array.isArray;function yr(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=""+bn(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 Lo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(F(91));return ze({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function uc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(F(92));if(Xr(n)){if(1<n.length)throw Error(F(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:bn(n)}}function Wf(e,t){var n=bn(t.value),r=bn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function cc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Qf(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ro(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Qf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qi,qf=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(qi=qi||document.createElement("div"),qi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ei={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wg=["Webkit","ms","Moz","O"];Object.keys(ei).forEach(function(e){Wg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ei[t]=ei[e]})});function Yf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ei.hasOwnProperty(e)&&ei[e]?(""+t).trim():t+"px"}function Kf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Yf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Qg=ze({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Do(e,t){if(t){if(Qg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function _o(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Oo=null;function qa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fo=null,xr=null,vr=null;function dc(e){if(e=Ri(e)){if(typeof Fo!="function")throw Error(F(280));var t=e.stateNode;t&&(t=fs(t),Fo(e.stateNode,e.type,t))}}function Gf(e){xr?vr?vr.push(e):vr=[e]:xr=e}function Xf(){if(xr){var e=xr,t=vr;if(vr=xr=null,dc(e),t)for(e=0;e<t.length;e++)dc(t[e])}}function Zf(e,t){return e(t)}function Jf(){}var $s=!1;function eh(e,t,n){if($s)return e(t,n);$s=!0;try{return Zf(e,t,n)}finally{$s=!1,(xr!==null||vr!==null)&&(Jf(),Xf())}}function pi(e,t){var n=e.stateNode;if(n===null)return null;var r=fs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(F(231,t,typeof n));return n}var $o=!1;if(Zt)try{var Br={};Object.defineProperty(Br,"passive",{get:function(){$o=!0}}),window.addEventListener("test",Br,Br),window.removeEventListener("test",Br,Br)}catch{$o=!1}function qg(e,t,n,r,i,l,s,o,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(c){this.onError(c)}}var ti=!1,Il=null,zl=!1,Bo=null,Yg={onError:function(e){ti=!0,Il=e}};function Kg(e,t,n,r,i,l,s,o,u){ti=!1,Il=null,qg.apply(Yg,arguments)}function Gg(e,t,n,r,i,l,s,o,u){if(Kg.apply(this,arguments),ti){if(ti){var d=Il;ti=!1,Il=null}else throw Error(F(198));zl||(zl=!0,Bo=d)}}function Xn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function th(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 fc(e){if(Xn(e)!==e)throw Error(F(188))}function Xg(e){var t=e.alternate;if(!t){if(t=Xn(e),t===null)throw Error(F(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return fc(i),e;if(l===r)return fc(i),t;l=l.sibling}throw Error(F(188))}if(n.return!==r.return)n=i,r=l;else{for(var s=!1,o=i.child;o;){if(o===n){s=!0,n=i,r=l;break}if(o===r){s=!0,r=i,n=l;break}o=o.sibling}if(!s){for(o=l.child;o;){if(o===n){s=!0,n=l,r=i;break}if(o===r){s=!0,r=l,n=i;break}o=o.sibling}if(!s)throw Error(F(189))}}if(n.alternate!==r)throw Error(F(190))}if(n.tag!==3)throw Error(F(188));return n.stateNode.current===n?e:t}function nh(e){return e=Xg(e),e!==null?rh(e):null}function rh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=rh(e);if(t!==null)return t;e=e.sibling}return null}var ih=yt.unstable_scheduleCallback,hc=yt.unstable_cancelCallback,Zg=yt.unstable_shouldYield,Jg=yt.unstable_requestPaint,Me=yt.unstable_now,ey=yt.unstable_getCurrentPriorityLevel,Ya=yt.unstable_ImmediatePriority,lh=yt.unstable_UserBlockingPriority,Pl=yt.unstable_NormalPriority,ty=yt.unstable_LowPriority,sh=yt.unstable_IdlePriority,as=null,Ht=null;function ny(e){if(Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(as,e,void 0,(e.current.flags&128)===128)}catch{}}var At=Math.clz32?Math.clz32:ly,ry=Math.log,iy=Math.LN2;function ly(e){return e>>>=0,e===0?32:31-(ry(e)/iy|0)|0}var Yi=64,Ki=4194304;function Zr(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Al(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var o=s&~i;o!==0?r=Zr(o):(l&=s,l!==0&&(r=Zr(l)))}else s=n&~i,s!==0?r=Zr(s):l!==0&&(r=Zr(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-At(t),i=1<<n,r|=e[n],t&=~i;return r}function sy(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oy(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-At(l),o=1<<s,u=i[s];u===-1?(!(o&n)||o&r)&&(i[s]=sy(o,t)):u<=t&&(e.expiredLanes|=o),l&=~o}}function Uo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function oh(){var e=Yi;return Yi<<=1,!(Yi&4194240)&&(Yi=64),e}function Bs(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Mi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-At(t),e[t]=n}function ay(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-At(n),l=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~l}}function Ka(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-At(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ye=0;function ah(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var uh,Ga,ch,dh,fh,Ho=!1,Gi=[],mn=null,pn=null,gn=null,gi=new Map,yi=new Map,cn=[],uy="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 submit".split(" ");function mc(e,t){switch(e){case"focusin":case"focusout":mn=null;break;case"dragenter":case"dragleave":pn=null;break;case"mouseover":case"mouseout":gn=null;break;case"pointerover":case"pointerout":gi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yi.delete(t.pointerId)}}function Ur(e,t,n,r,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},t!==null&&(t=Ri(t),t!==null&&Ga(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function cy(e,t,n,r,i){switch(t){case"focusin":return mn=Ur(mn,e,t,n,r,i),!0;case"dragenter":return pn=Ur(pn,e,t,n,r,i),!0;case"mouseover":return gn=Ur(gn,e,t,n,r,i),!0;case"pointerover":var l=i.pointerId;return gi.set(l,Ur(gi.get(l)||null,e,t,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,yi.set(l,Ur(yi.get(l)||null,e,t,n,r,i)),!0}return!1}function hh(e){var t=Rn(e.target);if(t!==null){var n=Xn(t);if(n!==null){if(t=n.tag,t===13){if(t=th(n),t!==null){e.blockedOn=t,fh(e.priority,function(){ch(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 ml(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Oo=r,n.target.dispatchEvent(r),Oo=null}else return t=Ri(n),t!==null&&Ga(t),e.blockedOn=n,!1;t.shift()}return!0}function pc(e,t,n){ml(e)&&n.delete(t)}function dy(){Ho=!1,mn!==null&&ml(mn)&&(mn=null),pn!==null&&ml(pn)&&(pn=null),gn!==null&&ml(gn)&&(gn=null),gi.forEach(pc),yi.forEach(pc)}function Hr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ho||(Ho=!0,yt.unstable_scheduleCallback(yt.unstable_NormalPriority,dy)))}function xi(e){function t(i){return Hr(i,e)}if(0<Gi.length){Hr(Gi[0],e);for(var n=1;n<Gi.length;n++){var r=Gi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(mn!==null&&Hr(mn,e),pn!==null&&Hr(pn,e),gn!==null&&Hr(gn,e),gi.forEach(t),yi.forEach(t),n=0;n<cn.length;n++)r=cn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<cn.length&&(n=cn[0],n.blockedOn===null);)hh(n),n.blockedOn===null&&cn.shift()}var kr=nn.ReactCurrentBatchConfig,Ml=!0;function fy(e,t,n,r){var i=ye,l=kr.transition;kr.transition=null;try{ye=1,Xa(e,t,n,r)}finally{ye=i,kr.transition=l}}function hy(e,t,n,r){var i=ye,l=kr.transition;kr.transition=null;try{ye=4,Xa(e,t,n,r)}finally{ye=i,kr.transition=l}}function Xa(e,t,n,r){if(Ml){var i=Vo(e,t,n,r);if(i===null)Xs(e,t,r,Ll,n),mc(e,r);else if(cy(i,e,t,n,r))r.stopPropagation();else if(mc(e,r),t&4&&-1<uy.indexOf(e)){for(;i!==null;){var l=Ri(i);if(l!==null&&uh(l),l=Vo(e,t,n,r),l===null&&Xs(e,t,r,Ll,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else Xs(e,t,r,null,n)}}var Ll=null;function Vo(e,t,n,r){if(Ll=null,e=qa(r),e=Rn(e),e!==null)if(t=Xn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=th(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 Ll=e,null}function mh(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ey()){case Ya:return 1;case lh:return 4;case Pl:case ty:return 16;case sh:return 536870912;default:return 16}default:return 16}}var fn=null,Za=null,pl=null;function ph(){if(pl)return pl;var e,t=Za,n=t.length,r,i="value"in fn?fn.value:fn.textContent,l=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[l-r];r++);return pl=i.slice(e,1<r?1-r:void 0)}function gl(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 Xi(){return!0}function gc(){return!1}function kt(e){function t(n,r,i,l,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Xi:gc,this.isPropagationStopped=gc,this}return ze(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Xi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Xi)},persist:function(){},isPersistent:Xi}),t}var Lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ja=kt(Lr),Li=ze({},Lr,{view:0,detail:0}),my=kt(Li),Us,Hs,Vr,us=ze({},Li,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eu,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!==Vr&&(Vr&&e.type==="mousemove"?(Us=e.screenX-Vr.screenX,Hs=e.screenY-Vr.screenY):Hs=Us=0,Vr=e),Us)},movementY:function(e){return"movementY"in e?e.movementY:Hs}}),yc=kt(us),py=ze({},us,{dataTransfer:0}),gy=kt(py),yy=ze({},Li,{relatedTarget:0}),Vs=kt(yy),xy=ze({},Lr,{animationName:0,elapsedTime:0,pseudoElement:0}),vy=kt(xy),ky=ze({},Lr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wy=kt(ky),by=ze({},Lr,{data:0}),xc=kt(by),Sy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cy={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"},jy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ny(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jy[e])?!!t[e]:!1}function eu(){return Ny}var Ey=ze({},Li,{key:function(e){if(e.key){var t=Sy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Cy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eu,charCode:function(e){return e.type==="keypress"?gl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ty=kt(Ey),Iy=ze({},us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vc=kt(Iy),zy=ze({},Li,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eu}),Py=kt(zy),Ay=ze({},Lr,{propertyName:0,elapsedTime:0,pseudoElement:0}),My=kt(Ay),Ly=ze({},us,{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}),Ry=kt(Ly),Dy=[9,13,27,32],tu=Zt&&"CompositionEvent"in window,ni=null;Zt&&"documentMode"in document&&(ni=document.documentMode);var _y=Zt&&"TextEvent"in window&&!ni,gh=Zt&&(!tu||ni&&8<ni&&11>=ni),kc=" ",wc=!1;function yh(e,t){switch(e){case"keyup":return Dy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lr=!1;function Oy(e,t){switch(e){case"compositionend":return xh(t);case"keypress":return t.which!==32?null:(wc=!0,kc);case"textInput":return e=t.data,e===kc&&wc?null:e;default:return null}}function Fy(e,t){if(lr)return e==="compositionend"||!tu&&yh(e,t)?(e=ph(),pl=Za=fn=null,lr=!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 gh&&t.locale!=="ko"?null:t.data;default:return null}}var $y={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 bc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$y[e.type]:t==="textarea"}function vh(e,t,n,r){Gf(r),t=Rl(t,"onChange"),0<t.length&&(n=new Ja("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ri=null,vi=null;function By(e){zh(e,0)}function cs(e){var t=ar(e);if(Hf(t))return e}function Uy(e,t){if(e==="change")return t}var kh=!1;if(Zt){var Ws;if(Zt){var Qs="oninput"in document;if(!Qs){var Sc=document.createElement("div");Sc.setAttribute("oninput","return;"),Qs=typeof Sc.oninput=="function"}Ws=Qs}else Ws=!1;kh=Ws&&(!document.documentMode||9<document.documentMode)}function Cc(){ri&&(ri.detachEvent("onpropertychange",wh),vi=ri=null)}function wh(e){if(e.propertyName==="value"&&cs(vi)){var t=[];vh(t,vi,e,qa(e)),eh(By,t)}}function Hy(e,t,n){e==="focusin"?(Cc(),ri=t,vi=n,ri.attachEvent("onpropertychange",wh)):e==="focusout"&&Cc()}function Vy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cs(vi)}function Wy(e,t){if(e==="click")return cs(t)}function Qy(e,t){if(e==="input"||e==="change")return cs(t)}function qy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rt=typeof Object.is=="function"?Object.is:qy;function ki(e,t){if(Rt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)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(!No.call(t,i)||!Rt(e[i],t[i]))return!1}return!0}function jc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nc(e,t){var n=jc(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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=jc(n)}}function bh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sh(){for(var e=window,t=Tl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Tl(e.document)}return t}function nu(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")}function Yy(e){var t=Sh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&bh(n.ownerDocument.documentElement,n)){if(r!==null&&nu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=Nc(n,l);var s=Nc(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ky=Zt&&"documentMode"in document&&11>=document.documentMode,sr=null,Wo=null,ii=null,Qo=!1;function Ec(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qo||sr==null||sr!==Tl(r)||(r=sr,"selectionStart"in r&&nu(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}),ii&&ki(ii,r)||(ii=r,r=Rl(Wo,"onSelect"),0<r.length&&(t=new Ja("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=sr)))}function Zi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var or={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionend:Zi("Transition","TransitionEnd")},qs={},Ch={};Zt&&(Ch=document.createElement("div").style,"AnimationEvent"in window||(delete or.animationend.animation,delete or.animationiteration.animation,delete or.animationstart.animation),"TransitionEvent"in window||delete or.transitionend.transition);function ds(e){if(qs[e])return qs[e];if(!or[e])return e;var t=or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ch)return qs[e]=t[n];return e}var jh=ds("animationend"),Nh=ds("animationiteration"),Eh=ds("animationstart"),Th=ds("transitionend"),Ih=new Map,Tc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Cn(e,t){Ih.set(e,t),Gn(t,[e])}for(var Ys=0;Ys<Tc.length;Ys++){var Ks=Tc[Ys],Gy=Ks.toLowerCase(),Xy=Ks[0].toUpperCase()+Ks.slice(1);Cn(Gy,"on"+Xy)}Cn(jh,"onAnimationEnd");Cn(Nh,"onAnimationIteration");Cn(Eh,"onAnimationStart");Cn("dblclick","onDoubleClick");Cn("focusin","onFocus");Cn("focusout","onBlur");Cn(Th,"onTransitionEnd");Cr("onMouseEnter",["mouseout","mouseover"]);Cr("onMouseLeave",["mouseout","mouseover"]);Cr("onPointerEnter",["pointerout","pointerover"]);Cr("onPointerLeave",["pointerout","pointerover"]);Gn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jr="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(" "),Zy=new Set("cancel close invalid load scroll toggle".split(" ").concat(Jr));function Ic(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Gg(r,t,void 0,e),e.currentTarget=null}function zh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],u=o.instance,d=o.currentTarget;if(o=o.listener,u!==l&&i.isPropagationStopped())break e;Ic(i,o,d),l=u}else for(s=0;s<r.length;s++){if(o=r[s],u=o.instance,d=o.currentTarget,o=o.listener,u!==l&&i.isPropagationStopped())break e;Ic(i,o,d),l=u}}}if(zl)throw e=Bo,zl=!1,Bo=null,e}function Ce(e,t){var n=t[Xo];n===void 0&&(n=t[Xo]=new Set);var r=e+"__bubble";n.has(r)||(Ph(t,e,2,!1),n.add(r))}function Gs(e,t,n){var r=0;t&&(r|=4),Ph(n,e,r,t)}var Ji="_reactListening"+Math.random().toString(36).slice(2);function wi(e){if(!e[Ji]){e[Ji]=!0,Of.forEach(function(n){n!=="selectionchange"&&(Zy.has(n)||Gs(n,!1,e),Gs(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ji]||(t[Ji]=!0,Gs("selectionchange",!1,t))}}function Ph(e,t,n,r){switch(mh(t)){case 1:var i=fy;break;case 4:i=hy;break;default:i=Xa}n=i.bind(null,t,n,e),i=void 0,!$o||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Xs(e,t,n,r,i){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;o!==null;){if(s=Rn(o),s===null)return;if(u=s.tag,u===5||u===6){r=l=s;continue e}o=o.parentNode}}r=r.return}eh(function(){var d=l,c=qa(n),f=[];e:{var m=Ih.get(e);if(m!==void 0){var h=Ja,p=e;switch(e){case"keypress":if(gl(n)===0)break e;case"keydown":case"keyup":h=Ty;break;case"focusin":p="focus",h=Vs;break;case"focusout":p="blur",h=Vs;break;case"beforeblur":case"afterblur":h=Vs;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=yc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=gy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Py;break;case jh:case Nh:case Eh:h=vy;break;case Th:h=My;break;case"scroll":h=my;break;case"wheel":h=Ry;break;case"copy":case"cut":case"paste":h=wy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=vc}var x=(t&4)!==0,b=!x&&e==="scroll",y=x?m!==null?m+"Capture":null:m;x=[];for(var g=d,v;g!==null;){v=g;var C=v.stateNode;if(v.tag===5&&C!==null&&(v=C,y!==null&&(C=pi(g,y),C!=null&&x.push(bi(g,C,v)))),b)break;g=g.return}0<x.length&&(m=new h(m,p,null,n,c),f.push({event:m,listeners:x}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",m&&n!==Oo&&(p=n.relatedTarget||n.fromElement)&&(Rn(p)||p[Jt]))break e;if((h||m)&&(m=c.window===c?c:(m=c.ownerDocument)?m.defaultView||m.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=d,p=p?Rn(p):null,p!==null&&(b=Xn(p),p!==b||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=d),h!==p)){if(x=yc,C="onMouseLeave",y="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=vc,C="onPointerLeave",y="onPointerEnter",g="pointer"),b=h==null?m:ar(h),v=p==null?m:ar(p),m=new x(C,g+"leave",h,n,c),m.target=b,m.relatedTarget=v,C=null,Rn(c)===d&&(x=new x(y,g+"enter",p,n,c),x.target=v,x.relatedTarget=b,C=x),b=C,h&&p)t:{for(x=h,y=p,g=0,v=x;v;v=tr(v))g++;for(v=0,C=y;C;C=tr(C))v++;for(;0<g-v;)x=tr(x),g--;for(;0<v-g;)y=tr(y),v--;for(;g--;){if(x===y||y!==null&&x===y.alternate)break t;x=tr(x),y=tr(y)}x=null}else x=null;h!==null&&zc(f,m,h,x,!1),p!==null&&b!==null&&zc(f,b,p,x,!0)}}e:{if(m=d?ar(d):window,h=m.nodeName&&m.nodeName.toLowerCase(),h==="select"||h==="input"&&m.type==="file")var z=Uy;else if(bc(m))if(kh)z=Qy;else{z=Vy;var E=Hy}else(h=m.nodeName)&&h.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(z=Wy);if(z&&(z=z(e,d))){vh(f,z,n,c);break e}E&&E(e,m,d),e==="focusout"&&(E=m._wrapperState)&&E.controlled&&m.type==="number"&&Mo(m,"number",m.value)}switch(E=d?ar(d):window,e){case"focusin":(bc(E)||E.contentEditable==="true")&&(sr=E,Wo=d,ii=null);break;case"focusout":ii=Wo=sr=null;break;case"mousedown":Qo=!0;break;case"contextmenu":case"mouseup":case"dragend":Qo=!1,Ec(f,n,c);break;case"selectionchange":if(Ky)break;case"keydown":case"keyup":Ec(f,n,c)}var A;if(tu)e:{switch(e){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else lr?yh(e,n)&&(L="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(L="onCompositionStart");L&&(gh&&n.locale!=="ko"&&(lr||L!=="onCompositionStart"?L==="onCompositionEnd"&&lr&&(A=ph()):(fn=c,Za="value"in fn?fn.value:fn.textContent,lr=!0)),E=Rl(d,L),0<E.length&&(L=new xc(L,e,null,n,c),f.push({event:L,listeners:E}),A?L.data=A:(A=xh(n),A!==null&&(L.data=A)))),(A=_y?Oy(e,n):Fy(e,n))&&(d=Rl(d,"onBeforeInput"),0<d.length&&(c=new xc("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:d}),c.data=A))}zh(f,t)})}function bi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Rl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=pi(e,n),l!=null&&r.unshift(bi(e,l,i)),l=pi(e,t),l!=null&&r.push(bi(e,l,i))),e=e.return}return r}function tr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function zc(e,t,n,r,i){for(var l=t._reactName,s=[];n!==null&&n!==r;){var o=n,u=o.alternate,d=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&d!==null&&(o=d,i?(u=pi(n,l),u!=null&&s.unshift(bi(n,u,o))):i||(u=pi(n,l),u!=null&&s.push(bi(n,u,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Jy=/\r\n?/g,e1=/\u0000|\uFFFD/g;function Pc(e){return(typeof e=="string"?e:""+e).replace(Jy,`
|
|
38
|
+
`).replace(e1,"")}function el(e,t,n){if(t=Pc(t),Pc(e)!==t&&n)throw Error(F(425))}function Dl(){}var qo=null,Yo=null;function Ko(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Go=typeof setTimeout=="function"?setTimeout:void 0,t1=typeof clearTimeout=="function"?clearTimeout:void 0,Ac=typeof Promise=="function"?Promise:void 0,n1=typeof queueMicrotask=="function"?queueMicrotask:typeof Ac<"u"?function(e){return Ac.resolve(null).then(e).catch(r1)}:Go;function r1(e){setTimeout(function(){throw e})}function Zs(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==="/$"){if(r===0){e.removeChild(i),xi(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);xi(t)}function yn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Mc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Rr=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Rr,Si="__reactProps$"+Rr,Jt="__reactContainer$"+Rr,Xo="__reactEvents$"+Rr,i1="__reactListeners$"+Rr,l1="__reactHandles$"+Rr;function Rn(e){var t=e[Ut];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jt]||n[Ut]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Mc(e);e!==null;){if(n=e[Ut])return n;e=Mc(e)}return t}e=n,n=e.parentNode}return null}function Ri(e){return e=e[Ut]||e[Jt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ar(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(F(33))}function fs(e){return e[Si]||null}var Zo=[],ur=-1;function jn(e){return{current:e}}function je(e){0>ur||(e.current=Zo[ur],Zo[ur]=null,ur--)}function be(e,t){ur++,Zo[ur]=e.current,e.current=t}var Sn={},Ke=jn(Sn),ot=jn(!1),Un=Sn;function jr(e,t){var n=e.type.contextTypes;if(!n)return Sn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function at(e){return e=e.childContextTypes,e!=null}function _l(){je(ot),je(Ke)}function Lc(e,t,n){if(Ke.current!==Sn)throw Error(F(168));be(Ke,t),be(ot,n)}function Ah(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(F(108,Hg(e)||"Unknown",i));return ze({},n,r)}function Ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sn,Un=Ke.current,be(Ke,e),be(ot,ot.current),!0}function Rc(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=Ah(e,t,Un),r.__reactInternalMemoizedMergedChildContext=e,je(ot),je(Ke),be(Ke,e)):je(ot),be(ot,n)}var Yt=null,hs=!1,Js=!1;function Mh(e){Yt===null?Yt=[e]:Yt.push(e)}function s1(e){hs=!0,Mh(e)}function Nn(){if(!Js&&Yt!==null){Js=!0;var e=0,t=ye;try{var n=Yt;for(ye=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Yt=null,hs=!1}catch(i){throw Yt!==null&&(Yt=Yt.slice(e+1)),ih(Ya,Nn),i}finally{ye=t,Js=!1}}return null}var cr=[],dr=0,Fl=null,$l=0,wt=[],bt=0,Hn=null,Kt=1,Gt="";function Pn(e,t){cr[dr++]=$l,cr[dr++]=Fl,Fl=e,$l=t}function Lh(e,t,n){wt[bt++]=Kt,wt[bt++]=Gt,wt[bt++]=Hn,Hn=e;var r=Kt;e=Gt;var i=32-At(r)-1;r&=~(1<<i),n+=1;var l=32-At(t)+i;if(30<l){var s=i-i%5;l=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Kt=1<<32-At(t)+i|n<<i|r,Gt=l+e}else Kt=1<<l|n<<i|r,Gt=e}function ru(e){e.return!==null&&(Pn(e,1),Lh(e,1,0))}function iu(e){for(;e===Fl;)Fl=cr[--dr],cr[dr]=null,$l=cr[--dr],cr[dr]=null;for(;e===Hn;)Hn=wt[--bt],wt[bt]=null,Gt=wt[--bt],wt[bt]=null,Kt=wt[--bt],wt[bt]=null}var pt=null,mt=null,Ee=!1,Pt=null;function Rh(e,t){var n=Ct(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Dc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,pt=e,mt=yn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,pt=e,mt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Hn!==null?{id:Kt,overflow:Gt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ct(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,pt=e,mt=null,!0):!1;default:return!1}}function Jo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ea(e){if(Ee){var t=mt;if(t){var n=t;if(!Dc(e,t)){if(Jo(e))throw Error(F(418));t=yn(n.nextSibling);var r=pt;t&&Dc(e,t)?Rh(r,n):(e.flags=e.flags&-4097|2,Ee=!1,pt=e)}}else{if(Jo(e))throw Error(F(418));e.flags=e.flags&-4097|2,Ee=!1,pt=e}}}function _c(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pt=e}function tl(e){if(e!==pt)return!1;if(!Ee)return _c(e),Ee=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ko(e.type,e.memoizedProps)),t&&(t=mt)){if(Jo(e))throw Dh(),Error(F(418));for(;t;)Rh(e,t),t=yn(t.nextSibling)}if(_c(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){mt=yn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}mt=null}}else mt=pt?yn(e.stateNode.nextSibling):null;return!0}function Dh(){for(var e=mt;e;)e=yn(e.nextSibling)}function Nr(){mt=pt=null,Ee=!1}function lu(e){Pt===null?Pt=[e]:Pt.push(e)}var o1=nn.ReactCurrentBatchConfig;function Wr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(F(309));var r=n.stateNode}if(!r)throw Error(F(147,e));var i=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var o=i.refs;s===null?delete o[l]:o[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error(F(284));if(!n._owner)throw Error(F(290,e))}return e}function nl(e,t){throw e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Oc(e){var t=e._init;return t(e._payload)}function _h(e){function t(y,g){if(e){var v=y.deletions;v===null?(y.deletions=[g],y.flags|=16):v.push(g)}}function n(y,g){if(!e)return null;for(;g!==null;)t(y,g),g=g.sibling;return null}function r(y,g){for(y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function i(y,g){return y=wn(y,g),y.index=0,y.sibling=null,y}function l(y,g,v){return y.index=v,e?(v=y.alternate,v!==null?(v=v.index,v<g?(y.flags|=2,g):v):(y.flags|=2,g)):(y.flags|=1048576,g)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function o(y,g,v,C){return g===null||g.tag!==6?(g=so(v,y.mode,C),g.return=y,g):(g=i(g,v),g.return=y,g)}function u(y,g,v,C){var z=v.type;return z===ir?c(y,g,v.props.children,C,v.key):g!==null&&(g.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===an&&Oc(z)===g.type)?(C=i(g,v.props),C.ref=Wr(y,g,v),C.return=y,C):(C=Sl(v.type,v.key,v.props,null,y.mode,C),C.ref=Wr(y,g,v),C.return=y,C)}function d(y,g,v,C){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=oo(v,y.mode,C),g.return=y,g):(g=i(g,v.children||[]),g.return=y,g)}function c(y,g,v,C,z){return g===null||g.tag!==7?(g=$n(v,y.mode,C,z),g.return=y,g):(g=i(g,v),g.return=y,g)}function f(y,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=so(""+g,y.mode,v),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Wi:return v=Sl(g.type,g.key,g.props,null,y.mode,v),v.ref=Wr(y,null,g),v.return=y,v;case rr:return g=oo(g,y.mode,v),g.return=y,g;case an:var C=g._init;return f(y,C(g._payload),v)}if(Xr(g)||$r(g))return g=$n(g,y.mode,v,null),g.return=y,g;nl(y,g)}return null}function m(y,g,v,C){var z=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return z!==null?null:o(y,g,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Wi:return v.key===z?u(y,g,v,C):null;case rr:return v.key===z?d(y,g,v,C):null;case an:return z=v._init,m(y,g,z(v._payload),C)}if(Xr(v)||$r(v))return z!==null?null:c(y,g,v,C,null);nl(y,v)}return null}function h(y,g,v,C,z){if(typeof C=="string"&&C!==""||typeof C=="number")return y=y.get(v)||null,o(g,y,""+C,z);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Wi:return y=y.get(C.key===null?v:C.key)||null,u(g,y,C,z);case rr:return y=y.get(C.key===null?v:C.key)||null,d(g,y,C,z);case an:var E=C._init;return h(y,g,v,E(C._payload),z)}if(Xr(C)||$r(C))return y=y.get(v)||null,c(g,y,C,z,null);nl(g,C)}return null}function p(y,g,v,C){for(var z=null,E=null,A=g,L=g=0,I=null;A!==null&&L<v.length;L++){A.index>L?(I=A,A=null):I=A.sibling;var k=m(y,A,v[L],C);if(k===null){A===null&&(A=I);break}e&&A&&k.alternate===null&&t(y,A),g=l(k,g,L),E===null?z=k:E.sibling=k,E=k,A=I}if(L===v.length)return n(y,A),Ee&&Pn(y,L),z;if(A===null){for(;L<v.length;L++)A=f(y,v[L],C),A!==null&&(g=l(A,g,L),E===null?z=A:E.sibling=A,E=A);return Ee&&Pn(y,L),z}for(A=r(y,A);L<v.length;L++)I=h(A,y,L,v[L],C),I!==null&&(e&&I.alternate!==null&&A.delete(I.key===null?L:I.key),g=l(I,g,L),E===null?z=I:E.sibling=I,E=I);return e&&A.forEach(function(j){return t(y,j)}),Ee&&Pn(y,L),z}function x(y,g,v,C){var z=$r(v);if(typeof z!="function")throw Error(F(150));if(v=z.call(v),v==null)throw Error(F(151));for(var E=z=null,A=g,L=g=0,I=null,k=v.next();A!==null&&!k.done;L++,k=v.next()){A.index>L?(I=A,A=null):I=A.sibling;var j=m(y,A,k.value,C);if(j===null){A===null&&(A=I);break}e&&A&&j.alternate===null&&t(y,A),g=l(j,g,L),E===null?z=j:E.sibling=j,E=j,A=I}if(k.done)return n(y,A),Ee&&Pn(y,L),z;if(A===null){for(;!k.done;L++,k=v.next())k=f(y,k.value,C),k!==null&&(g=l(k,g,L),E===null?z=k:E.sibling=k,E=k);return Ee&&Pn(y,L),z}for(A=r(y,A);!k.done;L++,k=v.next())k=h(A,y,L,k.value,C),k!==null&&(e&&k.alternate!==null&&A.delete(k.key===null?L:k.key),g=l(k,g,L),E===null?z=k:E.sibling=k,E=k);return e&&A.forEach(function(P){return t(y,P)}),Ee&&Pn(y,L),z}function b(y,g,v,C){if(typeof v=="object"&&v!==null&&v.type===ir&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Wi:e:{for(var z=v.key,E=g;E!==null;){if(E.key===z){if(z=v.type,z===ir){if(E.tag===7){n(y,E.sibling),g=i(E,v.props.children),g.return=y,y=g;break e}}else if(E.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===an&&Oc(z)===E.type){n(y,E.sibling),g=i(E,v.props),g.ref=Wr(y,E,v),g.return=y,y=g;break e}n(y,E);break}else t(y,E);E=E.sibling}v.type===ir?(g=$n(v.props.children,y.mode,C,v.key),g.return=y,y=g):(C=Sl(v.type,v.key,v.props,null,y.mode,C),C.ref=Wr(y,g,v),C.return=y,y=C)}return s(y);case rr:e:{for(E=v.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(y,g.sibling),g=i(g,v.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else t(y,g);g=g.sibling}g=oo(v,y.mode,C),g.return=y,y=g}return s(y);case an:return E=v._init,b(y,g,E(v._payload),C)}if(Xr(v))return p(y,g,v,C);if($r(v))return x(y,g,v,C);nl(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(y,g.sibling),g=i(g,v),g.return=y,y=g):(n(y,g),g=so(v,y.mode,C),g.return=y,y=g),s(y)):n(y,g)}return b}var Er=_h(!0),Oh=_h(!1),Bl=jn(null),Ul=null,fr=null,su=null;function ou(){su=fr=Ul=null}function au(e){var t=Bl.current;je(Bl),e._currentValue=t}function ta(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function wr(e,t){Ul=e,su=fr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(st=!0),e.firstContext=null)}function Nt(e){var t=e._currentValue;if(su!==e)if(e={context:e,memoizedValue:t,next:null},fr===null){if(Ul===null)throw Error(F(308));fr=e,Ul.dependencies={lanes:0,firstContext:e}}else fr=fr.next=e;return t}var Dn=null;function uu(e){Dn===null?Dn=[e]:Dn.push(e)}function Fh(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,uu(t)):(n.next=i.next,i.next=n),t.interleaved=n,en(e,r)}function en(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var un=!1;function cu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $h(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,pe&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,en(e,n)}return i=r.interleaved,i===null?(t.next=t,uu(r)):(t.next=i.next,i.next=t),r.interleaved=t,en(e,n)}function yl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ka(e,n)}}function Fc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hl(e,t,n,r){var i=e.updateQueue;un=!1;var l=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var u=o,d=u.next;u.next=null,s===null?l=d:s.next=d,s=u;var c=e.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==s&&(o===null?c.firstBaseUpdate=d:o.next=d,c.lastBaseUpdate=u))}if(l!==null){var f=i.baseState;s=0,c=d=u=null,o=l;do{var m=o.lane,h=o.eventTime;if((r&m)===m){c!==null&&(c=c.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,x=o;switch(m=t,h=n,x.tag){case 1:if(p=x.payload,typeof p=="function"){f=p.call(h,f,m);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=x.payload,m=typeof p=="function"?p.call(h,f,m):p,m==null)break e;f=ze({},f,m);break e;case 2:un=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[o]:m.push(o))}else h={eventTime:h,lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(d=c=h,u=f):c=c.next=h,s|=m;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;m=o,o=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(c===null&&(u=f),i.baseState=u,i.firstBaseUpdate=d,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);Wn|=s,e.lanes=s,e.memoizedState=f}}function $c(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(F(191,i));i.call(r)}}}var Di={},Vt=jn(Di),Ci=jn(Di),ji=jn(Di);function _n(e){if(e===Di)throw Error(F(174));return e}function du(e,t){switch(be(ji,t),be(Ci,e),be(Vt,Di),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ro(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ro(t,e)}je(Vt),be(Vt,t)}function Tr(){je(Vt),je(Ci),je(ji)}function Bh(e){_n(ji.current);var t=_n(Vt.current),n=Ro(t,e.type);t!==n&&(be(Ci,e),be(Vt,n))}function fu(e){Ci.current===e&&(je(Vt),je(Ci))}var Te=jn(0);function Vl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var eo=[];function hu(){for(var e=0;e<eo.length;e++)eo[e]._workInProgressVersionPrimary=null;eo.length=0}var xl=nn.ReactCurrentDispatcher,to=nn.ReactCurrentBatchConfig,Vn=0,Ie=null,Oe=null,$e=null,Wl=!1,li=!1,Ni=0,a1=0;function We(){throw Error(F(321))}function mu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rt(e[n],t[n]))return!1;return!0}function pu(e,t,n,r,i,l){if(Vn=l,Ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xl.current=e===null||e.memoizedState===null?f1:h1,e=n(r,i),li){l=0;do{if(li=!1,Ni=0,25<=l)throw Error(F(301));l+=1,$e=Oe=null,t.updateQueue=null,xl.current=m1,e=n(r,i)}while(li)}if(xl.current=Ql,t=Oe!==null&&Oe.next!==null,Vn=0,$e=Oe=Ie=null,Wl=!1,t)throw Error(F(300));return e}function gu(){var e=Ni!==0;return Ni=0,e}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?Ie.memoizedState=$e=e:$e=$e.next=e,$e}function Et(){if(Oe===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=$e===null?Ie.memoizedState:$e.next;if(t!==null)$e=t,Oe=e;else{if(e===null)throw Error(F(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},$e===null?Ie.memoizedState=$e=e:$e=$e.next=e}return $e}function Ei(e,t){return typeof t=="function"?t(e):t}function no(e){var t=Et(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=Oe,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var s=i.next;i.next=l.next,l.next=s}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var o=s=null,u=null,d=l;do{var c=d.lane;if((Vn&c)===c)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var f={lane:c,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(o=u=f,s=r):u=u.next=f,Ie.lanes|=c,Wn|=c}d=d.next}while(d!==null&&d!==l);u===null?s=r:u.next=o,Rt(r,t.memoizedState)||(st=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do l=i.lane,Ie.lanes|=l,Wn|=l,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ro(e){var t=Et(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do l=e(l,s.action),s=s.next;while(s!==i);Rt(l,t.memoizedState)||(st=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function Uh(){}function Hh(e,t){var n=Ie,r=Et(),i=t(),l=!Rt(r.memoizedState,i);if(l&&(r.memoizedState=i,st=!0),r=r.queue,yu(Qh.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||$e!==null&&$e.memoizedState.tag&1){if(n.flags|=2048,Ti(9,Wh.bind(null,n,r,i,t),void 0,null),Be===null)throw Error(F(349));Vn&30||Vh(n,t,i)}return i}function Vh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wh(e,t,n,r){t.value=n,t.getSnapshot=r,qh(t)&&Yh(e)}function Qh(e,t,n){return n(function(){qh(t)&&Yh(e)})}function qh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rt(e,n)}catch{return!0}}function Yh(e){var t=en(e,1);t!==null&&Mt(t,e,1,-1)}function Bc(e){var t=$t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:e},t.queue=e,e=e.dispatch=d1.bind(null,Ie,e),[t.memoizedState,e]}function Ti(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Kh(){return Et().memoizedState}function vl(e,t,n,r){var i=$t();Ie.flags|=e,i.memoizedState=Ti(1|t,n,void 0,r===void 0?null:r)}function ms(e,t,n,r){var i=Et();r=r===void 0?null:r;var l=void 0;if(Oe!==null){var s=Oe.memoizedState;if(l=s.destroy,r!==null&&mu(r,s.deps)){i.memoizedState=Ti(t,n,l,r);return}}Ie.flags|=e,i.memoizedState=Ti(1|t,n,l,r)}function Uc(e,t){return vl(8390656,8,e,t)}function yu(e,t){return ms(2048,8,e,t)}function Gh(e,t){return ms(4,2,e,t)}function Xh(e,t){return ms(4,4,e,t)}function Zh(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Jh(e,t,n){return n=n!=null?n.concat([e]):null,ms(4,4,Zh.bind(null,t,e),n)}function xu(){}function em(e,t){var n=Et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&mu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function tm(e,t){var n=Et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&mu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function nm(e,t,n){return Vn&21?(Rt(n,t)||(n=oh(),Ie.lanes|=n,Wn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,st=!0),e.memoizedState=n)}function u1(e,t){var n=ye;ye=n!==0&&4>n?n:4,e(!0);var r=to.transition;to.transition={};try{e(!1),t()}finally{ye=n,to.transition=r}}function rm(){return Et().memoizedState}function c1(e,t,n){var r=kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},im(e))lm(t,n);else if(n=Fh(e,t,n,r),n!==null){var i=Je();Mt(n,e,r,i),sm(n,t,r)}}function d1(e,t,n){var r=kn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(im(e))lm(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,o=l(s,n);if(i.hasEagerState=!0,i.eagerState=o,Rt(o,s)){var u=t.interleaved;u===null?(i.next=i,uu(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=Fh(e,t,i,r),n!==null&&(i=Je(),Mt(n,e,r,i),sm(n,t,r))}}function im(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function lm(e,t){li=Wl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ka(e,n)}}var Ql={readContext:Nt,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},f1={readContext:Nt,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:Uc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vl(4194308,4,Zh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vl(4194308,4,e,t)},useInsertionEffect:function(e,t){return vl(4,2,e,t)},useMemo:function(e,t){var n=$t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=c1.bind(null,Ie,e),[r.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:Bc,useDebugValue:xu,useDeferredValue:function(e){return $t().memoizedState=e},useTransition:function(){var e=Bc(!1),t=e[0];return e=u1.bind(null,e[1]),$t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ie,i=$t();if(Ee){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),Be===null)throw Error(F(349));Vn&30||Vh(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,Uc(Qh.bind(null,r,l,e),[e]),r.flags|=2048,Ti(9,Wh.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=$t(),t=Be.identifierPrefix;if(Ee){var n=Gt,r=Kt;n=(r&~(1<<32-At(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ni++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=a1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},h1={readContext:Nt,useCallback:em,useContext:Nt,useEffect:yu,useImperativeHandle:Jh,useInsertionEffect:Gh,useLayoutEffect:Xh,useMemo:tm,useReducer:no,useRef:Kh,useState:function(){return no(Ei)},useDebugValue:xu,useDeferredValue:function(e){var t=Et();return nm(t,Oe.memoizedState,e)},useTransition:function(){var e=no(Ei)[0],t=Et().memoizedState;return[e,t]},useMutableSource:Uh,useSyncExternalStore:Hh,useId:rm,unstable_isNewReconciler:!1},m1={readContext:Nt,useCallback:em,useContext:Nt,useEffect:yu,useImperativeHandle:Jh,useInsertionEffect:Gh,useLayoutEffect:Xh,useMemo:tm,useReducer:ro,useRef:Kh,useState:function(){return ro(Ei)},useDebugValue:xu,useDeferredValue:function(e){var t=Et();return Oe===null?t.memoizedState=e:nm(t,Oe.memoizedState,e)},useTransition:function(){var e=ro(Ei)[0],t=Et().memoizedState;return[e,t]},useMutableSource:Uh,useSyncExternalStore:Hh,useId:rm,unstable_isNewReconciler:!1};function It(e,t){if(e&&e.defaultProps){t=ze({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function na(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ze({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ps={isMounted:function(e){return(e=e._reactInternals)?Xn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Je(),i=kn(e),l=Xt(r,i);l.payload=t,n!=null&&(l.callback=n),t=xn(e,l,i),t!==null&&(Mt(t,e,i,r),yl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Je(),i=kn(e),l=Xt(r,i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=xn(e,l,i),t!==null&&(Mt(t,e,i,r),yl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Je(),r=kn(e),i=Xt(n,r);i.tag=2,t!=null&&(i.callback=t),t=xn(e,i,r),t!==null&&(Mt(t,e,r,n),yl(t,e,r))}};function Hc(e,t,n,r,i,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,s):t.prototype&&t.prototype.isPureReactComponent?!ki(n,r)||!ki(i,l):!0}function om(e,t,n){var r=!1,i=Sn,l=t.contextType;return typeof l=="object"&&l!==null?l=Nt(l):(i=at(t)?Un:Ke.current,r=t.contextTypes,l=(r=r!=null)?jr(e,i):Sn),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ps,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function Vc(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&&ps.enqueueReplaceState(t,t.state,null)}function ra(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},cu(e);var l=t.contextType;typeof l=="object"&&l!==null?i.context=Nt(l):(l=at(t)?Un:Ke.current,i.context=jr(e,l)),i.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(na(e,t,l,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ps.enqueueReplaceState(i,i.state,null),Hl(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ir(e,t){try{var n="",r=t;do n+=Ug(r),r=r.return;while(r);var i=n}catch(l){i=`
|
|
39
|
+
Error generating stack: `+l.message+`
|
|
40
|
+
`+l.stack}return{value:e,source:t,stack:i,digest:null}}function io(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ia(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var p1=typeof WeakMap=="function"?WeakMap:Map;function am(e,t,n){n=Xt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yl||(Yl=!0,ma=r),ia(e,t)},n}function um(e,t,n){n=Xt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ia(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){ia(e,t),typeof r!="function"&&(vn===null?vn=new Set([this]):vn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Wc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new p1;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)||(i.add(n),e=I1.bind(null,e,t,n),t.then(e,e))}function Qc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function qc(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Xt(-1,1),t.tag=2,xn(n,t,1))),n.lanes|=1),e)}var g1=nn.ReactCurrentOwner,st=!1;function Xe(e,t,n,r){t.child=e===null?Oh(t,null,n,r):Er(t,e.child,n,r)}function Yc(e,t,n,r,i){n=n.render;var l=t.ref;return wr(t,i),r=pu(e,t,n,r,l,i),n=gu(),e!==null&&!st?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,tn(e,t,i)):(Ee&&n&&ru(t),t.flags|=1,Xe(e,t,r,i),t.child)}function Kc(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!Nu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,cm(e,t,l,r,i)):(e=Sl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&i)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:ki,n(s,r)&&e.ref===t.ref)return tn(e,t,i)}return t.flags|=1,e=wn(l,r),e.ref=t.ref,e.return=t,t.child=e}function cm(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(ki(l,r)&&e.ref===t.ref)if(st=!1,t.pendingProps=r=l,(e.lanes&i)!==0)e.flags&131072&&(st=!0);else return t.lanes=e.lanes,tn(e,t,i)}return la(e,t,n,r,i)}function dm(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},be(mr,ht),ht|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,be(mr,ht),ht|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,be(mr,ht),ht|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,be(mr,ht),ht|=r;return Xe(e,t,i,n),t.child}function fm(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function la(e,t,n,r,i){var l=at(n)?Un:Ke.current;return l=jr(t,l),wr(t,i),n=pu(e,t,n,r,l,i),r=gu(),e!==null&&!st?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,tn(e,t,i)):(Ee&&r&&ru(t),t.flags|=1,Xe(e,t,n,i),t.child)}function Gc(e,t,n,r,i){if(at(n)){var l=!0;Ol(t)}else l=!1;if(wr(t,i),t.stateNode===null)kl(e,t),om(t,n,r),ra(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var u=s.context,d=n.contextType;typeof d=="object"&&d!==null?d=Nt(d):(d=at(n)?Un:Ke.current,d=jr(t,d));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==r||u!==d)&&Vc(t,s,r,d),un=!1;var m=t.memoizedState;s.state=m,Hl(t,r,s,i),u=t.memoizedState,o!==r||m!==u||ot.current||un?(typeof c=="function"&&(na(t,n,c,r),u=t.memoizedState),(o=un||Hc(t,n,o,r,m,u,d))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=d,r=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,$h(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:It(t.type,o),s.props=d,f=t.pendingProps,m=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=Nt(u):(u=at(n)?Un:Ke.current,u=jr(t,u));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==f||m!==u)&&Vc(t,s,r,u),un=!1,m=t.memoizedState,s.state=m,Hl(t,r,s,i);var p=t.memoizedState;o!==f||m!==p||ot.current||un?(typeof h=="function"&&(na(t,n,h,r),p=t.memoizedState),(d=un||Hc(t,n,d,r,m,p,u)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=u,r=d):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return sa(e,t,n,r,l,i)}function sa(e,t,n,r,i,l){fm(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Rc(t,n,!1),tn(e,t,l);r=t.stateNode,g1.current=t;var o=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Er(t,e.child,null,l),t.child=Er(t,null,o,l)):Xe(e,t,o,l),t.memoizedState=r.state,i&&Rc(t,n,!0),t.child}function hm(e){var t=e.stateNode;t.pendingContext?Lc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Lc(e,t.context,!1),du(e,t.containerInfo)}function Xc(e,t,n,r,i){return Nr(),lu(i),t.flags|=256,Xe(e,t,n,r),t.child}var oa={dehydrated:null,treeContext:null,retryLane:0};function aa(e){return{baseLanes:e,cachePool:null,transitions:null}}function mm(e,t,n){var r=t.pendingProps,i=Te.current,l=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),be(Te,i&1),e===null)return ea(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=xs(s,r,0,null),e=$n(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=aa(n),t.memoizedState=oa,e):vu(t,s));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return y1(e,t,s,r,o,i,n);if(l){l=r.fallback,s=t.mode,i=e.child,o=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=wn(i,u),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?l=wn(o,l):(l=$n(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?aa(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=oa,r}return l=e.child,e=l.sibling,r=wn(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function vu(e,t){return t=xs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rl(e,t,n,r){return r!==null&&lu(r),Er(t,e.child,null,n),e=vu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function y1(e,t,n,r,i,l,s){if(n)return t.flags&256?(t.flags&=-257,r=io(Error(F(422))),rl(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=xs({mode:"visible",children:r.children},i,0,null),l=$n(l,i,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Er(t,e.child,null,s),t.child.memoizedState=aa(s),t.memoizedState=oa,l);if(!(t.mode&1))return rl(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,l=Error(F(419)),r=io(l,r,void 0),rl(e,t,s,r)}if(o=(s&e.childLanes)!==0,st||o){if(r=Be,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,en(e,i),Mt(r,e,i,-1))}return ju(),r=io(Error(F(421))),rl(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=z1.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,mt=yn(i.nextSibling),pt=t,Ee=!0,Pt=null,e!==null&&(wt[bt++]=Kt,wt[bt++]=Gt,wt[bt++]=Hn,Kt=e.id,Gt=e.overflow,Hn=t),t=vu(t,r.children),t.flags|=4096,t)}function Zc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ta(e.return,t,n)}function lo(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function pm(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if(Xe(e,t,r.children,n),r=Te.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zc(e,n,t);else if(e.tag===19)Zc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(be(Te,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Vl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),lo(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Vl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}lo(t,!0,n,null,l);break;case"together":lo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function kl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=wn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function x1(e,t,n){switch(t.tag){case 3:hm(t),Nr();break;case 5:Bh(t);break;case 1:at(t.type)&&Ol(t);break;case 4:du(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;be(Bl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(be(Te,Te.current&1),t.flags|=128,null):n&t.child.childLanes?mm(e,t,n):(be(Te,Te.current&1),e=tn(e,t,n),e!==null?e.sibling:null);be(Te,Te.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return pm(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(Te,Te.current),r)break;return null;case 22:case 23:return t.lanes=0,dm(e,t,n)}return tn(e,t,n)}var gm,ua,ym,xm;gm=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ua=function(){};ym=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_n(Vt.current);var l=null;switch(n){case"input":i=Po(e,i),r=Po(e,r),l=[];break;case"select":i=ze({},i,{value:void 0}),r=ze({},r,{value:void 0}),l=[];break;case"textarea":i=Lo(e,i),r=Lo(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Dl)}Do(n,r);var s;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var o=i[d];for(s in o)o.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(hi.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in r){var u=r[d];if(o=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&u!==o&&(u!=null||o!=null))if(d==="style")if(o){for(s in o)!o.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&o[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(l||(l=[]),l.push(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(hi.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&Ce("scroll",e),l||o===u||(l=[])):(l=l||[]).push(d,u))}n&&(l=l||[]).push("style",n);var d=l;(t.updateQueue=d)&&(t.flags|=4)}};xm=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qr(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var 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}}function Qe(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&14680064,r|=i.flags&14680064,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 v1(e,t,n){var r=t.pendingProps;switch(iu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return at(t.type)&&_l(),Qe(t),null;case 3:return r=t.stateNode,Tr(),je(ot),je(Ke),hu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Pt!==null&&(ya(Pt),Pt=null))),ua(e,t),Qe(t),null;case 5:fu(t);var i=_n(ji.current);if(n=t.type,e!==null&&t.stateNode!=null)ym(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(F(166));return Qe(t),null}if(e=_n(Vt.current),tl(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Ut]=t,r[Si]=l,e=(t.mode&1)!==0,n){case"dialog":Ce("cancel",r),Ce("close",r);break;case"iframe":case"object":case"embed":Ce("load",r);break;case"video":case"audio":for(i=0;i<Jr.length;i++)Ce(Jr[i],r);break;case"source":Ce("error",r);break;case"img":case"image":case"link":Ce("error",r),Ce("load",r);break;case"details":Ce("toggle",r);break;case"input":oc(r,l),Ce("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Ce("invalid",r);break;case"textarea":uc(r,l),Ce("invalid",r)}Do(n,l),i=null;for(var s in l)if(l.hasOwnProperty(s)){var o=l[s];s==="children"?typeof o=="string"?r.textContent!==o&&(l.suppressHydrationWarning!==!0&&el(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&el(r.textContent,o,e),i=["children",""+o]):hi.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&Ce("scroll",r)}switch(n){case"input":Qi(r),ac(r,l,!0);break;case"textarea":Qi(r),cc(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Dl)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Qf(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ut]=t,e[Si]=r,gm(e,t,!1,!1),t.stateNode=e;e:{switch(s=_o(n,r),n){case"dialog":Ce("cancel",e),Ce("close",e),i=r;break;case"iframe":case"object":case"embed":Ce("load",e),i=r;break;case"video":case"audio":for(i=0;i<Jr.length;i++)Ce(Jr[i],e);i=r;break;case"source":Ce("error",e),i=r;break;case"img":case"image":case"link":Ce("error",e),Ce("load",e),i=r;break;case"details":Ce("toggle",e),i=r;break;case"input":oc(e,r),i=Po(e,r),Ce("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ze({},r,{value:void 0}),Ce("invalid",e);break;case"textarea":uc(e,r),i=Lo(e,r),Ce("invalid",e);break;default:i=r}Do(n,i),o=i;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?Kf(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&qf(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&mi(e,u):typeof u=="number"&&mi(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(hi.hasOwnProperty(l)?u!=null&&l==="onScroll"&&Ce("scroll",e):u!=null&&Ha(e,l,u,s))}switch(n){case"input":Qi(e),ac(e,r,!1);break;case"textarea":Qi(e),cc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+bn(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?yr(e,!!r.multiple,l,!1):r.defaultValue!=null&&yr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Dl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Qe(t),null;case 6:if(e&&t.stateNode!=null)xm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(F(166));if(n=_n(ji.current),_n(Vt.current),tl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ut]=t,(l=r.nodeValue!==n)&&(e=pt,e!==null))switch(e.tag){case 3:el(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&el(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ut]=t,t.stateNode=r}return Qe(t),null;case 13:if(je(Te),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ee&&mt!==null&&t.mode&1&&!(t.flags&128))Dh(),Nr(),t.flags|=98560,l=!1;else if(l=tl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(F(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(F(317));l[Ut]=t}else Nr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qe(t),l=!1}else Pt!==null&&(ya(Pt),Pt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Te.current&1?Fe===0&&(Fe=3):ju())),t.updateQueue!==null&&(t.flags|=4),Qe(t),null);case 4:return Tr(),ua(e,t),e===null&&wi(t.stateNode.containerInfo),Qe(t),null;case 10:return au(t.type._context),Qe(t),null;case 17:return at(t.type)&&_l(),Qe(t),null;case 19:if(je(Te),l=t.memoizedState,l===null)return Qe(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)Qr(l,!1);else{if(Fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Vl(e),s!==null){for(t.flags|=128,Qr(l,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return be(Te,Te.current&1|2),t.child}e=e.sibling}l.tail!==null&&Me()>zr&&(t.flags|=128,r=!0,Qr(l,!1),t.lanes=4194304)}else{if(!r)if(e=Vl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!Ee)return Qe(t),null}else 2*Me()-l.renderingStartTime>zr&&n!==1073741824&&(t.flags|=128,r=!0,Qr(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Me(),t.sibling=null,n=Te.current,be(Te,r?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return Cu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ht&1073741824&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function k1(e,t){switch(iu(t),t.tag){case 1:return at(t.type)&&_l(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tr(),je(ot),je(Ke),hu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return fu(t),null;case 13:if(je(Te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));Nr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return je(Te),null;case 4:return Tr(),null;case 10:return au(t.type._context),null;case 22:case 23:return Cu(),null;case 24:return null;default:return null}}var il=!1,qe=!1,w1=typeof WeakSet=="function"?WeakSet:Set,Q=null;function hr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ae(e,t,r)}else n.current=null}function ca(e,t,n){try{n()}catch(r){Ae(e,t,r)}}var Jc=!1;function b1(e,t){if(qo=Ml,e=Sh(),nu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,o=-1,u=-1,d=0,c=0,f=e,m=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(o=s+i),f!==l||r!==0&&f.nodeType!==3||(u=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(h=f.firstChild)!==null;)m=f,f=h;for(;;){if(f===e)break t;if(m===n&&++d===i&&(o=s),m===l&&++c===r&&(u=s),(h=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=h}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yo={focusedElem:e,selectionRange:n},Ml=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var x=p.memoizedProps,b=p.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?x:It(t.type,x),b);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(C){Ae(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return p=Jc,Jc=!1,p}function si(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&ca(t,n,l)}i=i.next}while(i!==r)}}function gs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function da(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function vm(e){var t=e.alternate;t!==null&&(e.alternate=null,vm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ut],delete t[Si],delete t[Xo],delete t[i1],delete t[l1])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function km(e){return e.tag===5||e.tag===3||e.tag===4}function ed(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||km(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Dl));else if(r!==4&&(e=e.child,e!==null))for(fa(e,t,n),e=e.sibling;e!==null;)fa(e,t,n),e=e.sibling}function ha(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ha(e,t,n),e=e.sibling;e!==null;)ha(e,t,n),e=e.sibling}var Ue=null,zt=!1;function sn(e,t,n){for(n=n.child;n!==null;)wm(e,t,n),n=n.sibling}function wm(e,t,n){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(as,n)}catch{}switch(n.tag){case 5:qe||hr(n,t);case 6:var r=Ue,i=zt;Ue=null,sn(e,t,n),Ue=r,zt=i,Ue!==null&&(zt?(e=Ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ue.removeChild(n.stateNode));break;case 18:Ue!==null&&(zt?(e=Ue,n=n.stateNode,e.nodeType===8?Zs(e.parentNode,n):e.nodeType===1&&Zs(e,n),xi(e)):Zs(Ue,n.stateNode));break;case 4:r=Ue,i=zt,Ue=n.stateNode.containerInfo,zt=!0,sn(e,t,n),Ue=r,zt=i;break;case 0:case 11:case 14:case 15:if(!qe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&ca(n,t,s),i=i.next}while(i!==r)}sn(e,t,n);break;case 1:if(!qe&&(hr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){Ae(n,t,o)}sn(e,t,n);break;case 21:sn(e,t,n);break;case 22:n.mode&1?(qe=(r=qe)||n.memoizedState!==null,sn(e,t,n),qe=r):sn(e,t,n);break;default:sn(e,t,n)}}function td(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new w1),t.forEach(function(r){var i=P1.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:Ue=o.stateNode,zt=!1;break e;case 3:Ue=o.stateNode.containerInfo,zt=!0;break e;case 4:Ue=o.stateNode.containerInfo,zt=!0;break e}o=o.return}if(Ue===null)throw Error(F(160));wm(l,s,i),Ue=null,zt=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(d){Ae(i,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)bm(t,e),t=t.sibling}function bm(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Tt(t,e),Ft(e),r&4){try{si(3,e,e.return),gs(3,e)}catch(x){Ae(e,e.return,x)}try{si(5,e,e.return)}catch(x){Ae(e,e.return,x)}}break;case 1:Tt(t,e),Ft(e),r&512&&n!==null&&hr(n,n.return);break;case 5:if(Tt(t,e),Ft(e),r&512&&n!==null&&hr(n,n.return),e.flags&32){var i=e.stateNode;try{mi(i,"")}catch(x){Ae(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&Vf(i,l),_o(o,s);var d=_o(o,l);for(s=0;s<u.length;s+=2){var c=u[s],f=u[s+1];c==="style"?Kf(i,f):c==="dangerouslySetInnerHTML"?qf(i,f):c==="children"?mi(i,f):Ha(i,c,f,d)}switch(o){case"input":Ao(i,l);break;case"textarea":Wf(i,l);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var h=l.value;h!=null?yr(i,!!l.multiple,h,!1):m!==!!l.multiple&&(l.defaultValue!=null?yr(i,!!l.multiple,l.defaultValue,!0):yr(i,!!l.multiple,l.multiple?[]:"",!1))}i[Si]=l}catch(x){Ae(e,e.return,x)}}break;case 6:if(Tt(t,e),Ft(e),r&4){if(e.stateNode===null)throw Error(F(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(x){Ae(e,e.return,x)}}break;case 3:if(Tt(t,e),Ft(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{xi(t.containerInfo)}catch(x){Ae(e,e.return,x)}break;case 4:Tt(t,e),Ft(e);break;case 13:Tt(t,e),Ft(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(bu=Me())),r&4&&td(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(qe=(d=qe)||c,Tt(t,e),qe=d):Tt(t,e),Ft(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!c&&e.mode&1)for(Q=e,c=e.child;c!==null;){for(f=Q=c;Q!==null;){switch(m=Q,h=m.child,m.tag){case 0:case 11:case 14:case 15:si(4,m,m.return);break;case 1:hr(m,m.return);var p=m.stateNode;if(typeof p.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(x){Ae(r,n,x)}}break;case 5:hr(m,m.return);break;case 22:if(m.memoizedState!==null){rd(f);continue}}h!==null?(h.return=m,Q=h):rd(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,d?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=f.stateNode,u=f.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=Yf("display",s))}catch(x){Ae(e,e.return,x)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=d?"":f.memoizedProps}catch(x){Ae(e,e.return,x)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Tt(t,e),Ft(e),r&4&&td(e);break;case 21:break;default:Tt(t,e),Ft(e)}}function Ft(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(km(n)){var r=n;break e}n=n.return}throw Error(F(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(mi(i,""),r.flags&=-33);var l=ed(e);ha(e,l,i);break;case 3:case 4:var s=r.stateNode.containerInfo,o=ed(e);fa(e,o,s);break;default:throw Error(F(161))}}catch(u){Ae(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function S1(e,t,n){Q=e,Sm(e)}function Sm(e,t,n){for(var r=(e.mode&1)!==0;Q!==null;){var i=Q,l=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||il;if(!s){var o=i.alternate,u=o!==null&&o.memoizedState!==null||qe;o=il;var d=qe;if(il=s,(qe=u)&&!d)for(Q=i;Q!==null;)s=Q,u=s.child,s.tag===22&&s.memoizedState!==null?id(i):u!==null?(u.return=s,Q=u):id(i);for(;l!==null;)Q=l,Sm(l),l=l.sibling;Q=i,il=o,qe=d}nd(e)}else i.subtreeFlags&8772&&l!==null?(l.return=i,Q=l):nd(e)}}function nd(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:qe||gs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!qe)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:It(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&$c(t,l,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}$c(t,s,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var c=d.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&xi(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(F(163))}qe||t.flags&512&&da(t)}catch(m){Ae(t,t.return,m)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function rd(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function id(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{gs(4,t)}catch(u){Ae(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){Ae(t,i,u)}}var l=t.return;try{da(t)}catch(u){Ae(t,l,u)}break;case 5:var s=t.return;try{da(t)}catch(u){Ae(t,s,u)}}}catch(u){Ae(t,t.return,u)}if(t===e){Q=null;break}var o=t.sibling;if(o!==null){o.return=t.return,Q=o;break}Q=t.return}}var C1=Math.ceil,ql=nn.ReactCurrentDispatcher,ku=nn.ReactCurrentOwner,jt=nn.ReactCurrentBatchConfig,pe=0,Be=null,De=null,He=0,ht=0,mr=jn(0),Fe=0,Ii=null,Wn=0,ys=0,wu=0,oi=null,lt=null,bu=0,zr=1/0,qt=null,Yl=!1,ma=null,vn=null,ll=!1,hn=null,Kl=0,ai=0,pa=null,wl=-1,bl=0;function Je(){return pe&6?Me():wl!==-1?wl:wl=Me()}function kn(e){return e.mode&1?pe&2&&He!==0?He&-He:o1.transition!==null?(bl===0&&(bl=oh()),bl):(e=ye,e!==0||(e=window.event,e=e===void 0?16:mh(e.type)),e):1}function Mt(e,t,n,r){if(50<ai)throw ai=0,pa=null,Error(F(185));Mi(e,n,r),(!(pe&2)||e!==Be)&&(e===Be&&(!(pe&2)&&(ys|=n),Fe===4&&dn(e,He)),ut(e,r),n===1&&pe===0&&!(t.mode&1)&&(zr=Me()+500,hs&&Nn()))}function ut(e,t){var n=e.callbackNode;oy(e,t);var r=Al(e,e===Be?He:0);if(r===0)n!==null&&hc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&hc(n),t===1)e.tag===0?s1(ld.bind(null,e)):Mh(ld.bind(null,e)),n1(function(){!(pe&6)&&Nn()}),n=null;else{switch(ah(r)){case 1:n=Ya;break;case 4:n=lh;break;case 16:n=Pl;break;case 536870912:n=sh;break;default:n=Pl}n=Pm(n,Cm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Cm(e,t){if(wl=-1,bl=0,pe&6)throw Error(F(327));var n=e.callbackNode;if(br()&&e.callbackNode!==n)return null;var r=Al(e,e===Be?He:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Gl(e,r);else{t=r;var i=pe;pe|=2;var l=Nm();(Be!==e||He!==t)&&(qt=null,zr=Me()+500,Fn(e,t));do try{E1();break}catch(o){jm(e,o)}while(!0);ou(),ql.current=l,pe=i,De!==null?t=0:(Be=null,He=0,t=Fe)}if(t!==0){if(t===2&&(i=Uo(e),i!==0&&(r=i,t=ga(e,i))),t===1)throw n=Ii,Fn(e,0),dn(e,r),ut(e,Me()),n;if(t===6)dn(e,r);else{if(i=e.current.alternate,!(r&30)&&!j1(i)&&(t=Gl(e,r),t===2&&(l=Uo(e),l!==0&&(r=l,t=ga(e,l))),t===1))throw n=Ii,Fn(e,0),dn(e,r),ut(e,Me()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(F(345));case 2:An(e,lt,qt);break;case 3:if(dn(e,r),(r&130023424)===r&&(t=bu+500-Me(),10<t)){if(Al(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Je(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Go(An.bind(null,e,lt,qt),t);break}An(e,lt,qt);break;case 4:if(dn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-At(r);l=1<<s,s=t[s],s>i&&(i=s),r&=~l}if(r=i,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*C1(r/1960))-r,10<r){e.timeoutHandle=Go(An.bind(null,e,lt,qt),r);break}An(e,lt,qt);break;case 5:An(e,lt,qt);break;default:throw Error(F(329))}}}return ut(e,Me()),e.callbackNode===n?Cm.bind(null,e):null}function ga(e,t){var n=oi;return e.current.memoizedState.isDehydrated&&(Fn(e,t).flags|=256),e=Gl(e,t),e!==2&&(t=lt,lt=n,t!==null&&ya(t)),e}function ya(e){lt===null?lt=e:lt.push.apply(lt,e)}function j1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],l=i.getSnapshot;i=i.value;try{if(!Rt(l(),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 dn(e,t){for(t&=~wu,t&=~ys,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-At(t),r=1<<n;e[n]=-1,t&=~r}}function ld(e){if(pe&6)throw Error(F(327));br();var t=Al(e,0);if(!(t&1))return ut(e,Me()),null;var n=Gl(e,t);if(e.tag!==0&&n===2){var r=Uo(e);r!==0&&(t=r,n=ga(e,r))}if(n===1)throw n=Ii,Fn(e,0),dn(e,t),ut(e,Me()),n;if(n===6)throw Error(F(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,An(e,lt,qt),ut(e,Me()),null}function Su(e,t){var n=pe;pe|=1;try{return e(t)}finally{pe=n,pe===0&&(zr=Me()+500,hs&&Nn())}}function Qn(e){hn!==null&&hn.tag===0&&!(pe&6)&&br();var t=pe;pe|=1;var n=jt.transition,r=ye;try{if(jt.transition=null,ye=1,e)return e()}finally{ye=r,jt.transition=n,pe=t,!(pe&6)&&Nn()}}function Cu(){ht=mr.current,je(mr)}function Fn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,t1(n)),De!==null)for(n=De.return;n!==null;){var r=n;switch(iu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&_l();break;case 3:Tr(),je(ot),je(Ke),hu();break;case 5:fu(r);break;case 4:Tr();break;case 13:je(Te);break;case 19:je(Te);break;case 10:au(r.type._context);break;case 22:case 23:Cu()}n=n.return}if(Be=e,De=e=wn(e.current,null),He=ht=t,Fe=0,Ii=null,wu=ys=Wn=0,lt=oi=null,Dn!==null){for(t=0;t<Dn.length;t++)if(n=Dn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=i,r.next=s}n.pending=r}Dn=null}return e}function jm(e,t){do{var n=De;try{if(ou(),xl.current=Ql,Wl){for(var r=Ie.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Wl=!1}if(Vn=0,$e=Oe=Ie=null,li=!1,Ni=0,ku.current=null,n===null||n.return===null){Fe=1,Ii=t,De=null;break}e:{var l=e,s=n.return,o=n,u=t;if(t=He,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,c=o,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var m=c.alternate;m?(c.updateQueue=m.updateQueue,c.memoizedState=m.memoizedState,c.lanes=m.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Qc(s);if(h!==null){h.flags&=-257,qc(h,s,o,l,t),h.mode&1&&Wc(l,d,t),t=h,u=d;var p=t.updateQueue;if(p===null){var x=new Set;x.add(u),t.updateQueue=x}else p.add(u);break e}else{if(!(t&1)){Wc(l,d,t),ju();break e}u=Error(F(426))}}else if(Ee&&o.mode&1){var b=Qc(s);if(b!==null){!(b.flags&65536)&&(b.flags|=256),qc(b,s,o,l,t),lu(Ir(u,o));break e}}l=u=Ir(u,o),Fe!==4&&(Fe=2),oi===null?oi=[l]:oi.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var y=am(l,u,t);Fc(l,y);break e;case 1:o=u;var g=l.type,v=l.stateNode;if(!(l.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(vn===null||!vn.has(v)))){l.flags|=65536,t&=-t,l.lanes|=t;var C=um(l,o,t);Fc(l,C);break e}}l=l.return}while(l!==null)}Tm(n)}catch(z){t=z,De===n&&n!==null&&(De=n=n.return);continue}break}while(!0)}function Nm(){var e=ql.current;return ql.current=Ql,e===null?Ql:e}function ju(){(Fe===0||Fe===3||Fe===2)&&(Fe=4),Be===null||!(Wn&268435455)&&!(ys&268435455)||dn(Be,He)}function Gl(e,t){var n=pe;pe|=2;var r=Nm();(Be!==e||He!==t)&&(qt=null,Fn(e,t));do try{N1();break}catch(i){jm(e,i)}while(!0);if(ou(),pe=n,ql.current=r,De!==null)throw Error(F(261));return Be=null,He=0,Fe}function N1(){for(;De!==null;)Em(De)}function E1(){for(;De!==null&&!Zg();)Em(De)}function Em(e){var t=zm(e.alternate,e,ht);e.memoizedProps=e.pendingProps,t===null?Tm(e):De=t,ku.current=null}function Tm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=k1(n,t),n!==null){n.flags&=32767,De=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fe=6,De=null;return}}else if(n=v1(n,t,ht),n!==null){De=n;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);Fe===0&&(Fe=5)}function An(e,t,n){var r=ye,i=jt.transition;try{jt.transition=null,ye=1,T1(e,t,n,r)}finally{jt.transition=i,ye=r}return null}function T1(e,t,n,r){do br();while(hn!==null);if(pe&6)throw Error(F(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(F(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(ay(e,l),e===Be&&(De=Be=null,He=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ll||(ll=!0,Pm(Pl,function(){return br(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=jt.transition,jt.transition=null;var s=ye;ye=1;var o=pe;pe|=4,ku.current=null,b1(e,n),bm(n,e),Yy(Yo),Ml=!!qo,Yo=qo=null,e.current=n,S1(n),Jg(),pe=o,ye=s,jt.transition=l}else e.current=n;if(ll&&(ll=!1,hn=e,Kl=i),l=e.pendingLanes,l===0&&(vn=null),ny(n.stateNode),ut(e,Me()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Yl)throw Yl=!1,e=ma,ma=null,e;return Kl&1&&e.tag!==0&&br(),l=e.pendingLanes,l&1?e===pa?ai++:(ai=0,pa=e):ai=0,Nn(),null}function br(){if(hn!==null){var e=ah(Kl),t=jt.transition,n=ye;try{if(jt.transition=null,ye=16>e?16:e,hn===null)var r=!1;else{if(e=hn,hn=null,Kl=0,pe&6)throw Error(F(331));var i=pe;for(pe|=4,Q=e.current;Q!==null;){var l=Q,s=l.child;if(Q.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var d=o[u];for(Q=d;Q!==null;){var c=Q;switch(c.tag){case 0:case 11:case 15:si(8,c,l)}var f=c.child;if(f!==null)f.return=c,Q=f;else for(;Q!==null;){c=Q;var m=c.sibling,h=c.return;if(vm(c),c===d){Q=null;break}if(m!==null){m.return=h,Q=m;break}Q=h}}}var p=l.alternate;if(p!==null){var x=p.child;if(x!==null){p.child=null;do{var b=x.sibling;x.sibling=null,x=b}while(x!==null)}}Q=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,Q=s;else e:for(;Q!==null;){if(l=Q,l.flags&2048)switch(l.tag){case 0:case 11:case 15:si(9,l,l.return)}var y=l.sibling;if(y!==null){y.return=l.return,Q=y;break e}Q=l.return}}var g=e.current;for(Q=g;Q!==null;){s=Q;var v=s.child;if(s.subtreeFlags&2064&&v!==null)v.return=s,Q=v;else e:for(s=g;Q!==null;){if(o=Q,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:gs(9,o)}}catch(z){Ae(o,o.return,z)}if(o===s){Q=null;break e}var C=o.sibling;if(C!==null){C.return=o.return,Q=C;break e}Q=o.return}}if(pe=i,Nn(),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(as,e)}catch{}r=!0}return r}finally{ye=n,jt.transition=t}}return!1}function sd(e,t,n){t=Ir(n,t),t=am(e,t,1),e=xn(e,t,1),t=Je(),e!==null&&(Mi(e,1,t),ut(e,t))}function Ae(e,t,n){if(e.tag===3)sd(e,e,n);else for(;t!==null;){if(t.tag===3){sd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(vn===null||!vn.has(r))){e=Ir(n,e),e=um(t,e,1),t=xn(t,e,1),e=Je(),t!==null&&(Mi(t,1,e),ut(t,e));break}}t=t.return}}function I1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Je(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(He&n)===n&&(Fe===4||Fe===3&&(He&130023424)===He&&500>Me()-bu?Fn(e,0):wu|=n),ut(e,t)}function Im(e,t){t===0&&(e.mode&1?(t=Ki,Ki<<=1,!(Ki&130023424)&&(Ki=4194304)):t=1);var n=Je();e=en(e,t),e!==null&&(Mi(e,t,n),ut(e,n))}function z1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Im(e,n)}function P1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),Im(e,n)}var zm;zm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)st=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return st=!1,x1(e,t,n);st=!!(e.flags&131072)}else st=!1,Ee&&t.flags&1048576&&Lh(t,$l,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;kl(e,t),e=t.pendingProps;var i=jr(t,Ke.current);wr(t,n),i=pu(null,t,r,e,i,n);var l=gu();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,at(r)?(l=!0,Ol(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,cu(t),i.updater=ps,t.stateNode=i,i._reactInternals=t,ra(t,r,e,n),t=sa(null,t,r,!0,l,n)):(t.tag=0,Ee&&l&&ru(t),Xe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(kl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=M1(r),e=It(r,e),i){case 0:t=la(null,t,r,e,n);break e;case 1:t=Gc(null,t,r,e,n);break e;case 11:t=Yc(null,t,r,e,n);break e;case 14:t=Kc(null,t,r,It(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),la(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),Gc(e,t,r,i,n);case 3:e:{if(hm(t),e===null)throw Error(F(387));r=t.pendingProps,l=t.memoizedState,i=l.element,$h(e,t),Hl(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=Ir(Error(F(423)),t),t=Xc(e,t,r,n,i);break e}else if(r!==i){i=Ir(Error(F(424)),t),t=Xc(e,t,r,n,i);break e}else for(mt=yn(t.stateNode.containerInfo.firstChild),pt=t,Ee=!0,Pt=null,n=Oh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Nr(),r===i){t=tn(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return Bh(t),e===null&&ea(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,s=i.children,Ko(r,i)?s=null:l!==null&&Ko(r,l)&&(t.flags|=32),fm(e,t),Xe(e,t,s,n),t.child;case 6:return e===null&&ea(t),null;case 13:return mm(e,t,n);case 4:return du(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Er(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),Yc(e,t,r,i,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,s=i.value,be(Bl,r._currentValue),r._currentValue=s,l!==null)if(Rt(l.value,s)){if(l.children===i.children&&!ot.current){t=tn(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){s=l.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=Xt(-1,n&-n),u.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var c=d.pending;c===null?u.next=u:(u.next=c.next,c.next=u),d.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),ta(l.return,n,t),o.lanes|=n;break}u=u.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(F(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ta(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}Xe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,wr(t,n),i=Nt(i),r=r(i),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,i=It(r,t.pendingProps),i=It(r.type,i),Kc(e,t,r,i,n);case 15:return cm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),kl(e,t),t.tag=1,at(r)?(e=!0,Ol(t)):e=!1,wr(t,n),om(t,r,i),ra(t,r,i,n),sa(null,t,r,!0,e,n);case 19:return pm(e,t,n);case 22:return dm(e,t,n)}throw Error(F(156,t.tag))};function Pm(e,t){return ih(e,t)}function A1(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.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 Ct(e,t,n,r){return new A1(e,t,n,r)}function Nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function M1(e){if(typeof e=="function")return Nu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Wa)return 11;if(e===Qa)return 14}return 2}function wn(e,t){var n=e.alternate;return n===null?(n=Ct(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&14680064,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}function Sl(e,t,n,r,i,l){var s=2;if(r=e,typeof e=="function")Nu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ir:return $n(n.children,i,l,t);case Va:s=8,i|=8;break;case Eo:return e=Ct(12,n,t,i|2),e.elementType=Eo,e.lanes=l,e;case To:return e=Ct(13,n,t,i),e.elementType=To,e.lanes=l,e;case Io:return e=Ct(19,n,t,i),e.elementType=Io,e.lanes=l,e;case Bf:return xs(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ff:s=10;break e;case $f:s=9;break e;case Wa:s=11;break e;case Qa:s=14;break e;case an:s=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=Ct(s,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function $n(e,t,n,r){return e=Ct(7,e,r,t),e.lanes=n,e}function xs(e,t,n,r){return e=Ct(22,e,r,t),e.elementType=Bf,e.lanes=n,e.stateNode={isHidden:!1},e}function so(e,t,n){return e=Ct(6,e,null,t),e.lanes=n,e}function oo(e,t,n){return t=Ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function L1(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bs(0),this.expirationTimes=Bs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bs(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Eu(e,t,n,r,i,l,s,o,u){return e=new L1(e,t,n,o,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Ct(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},cu(l),e}function R1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:rr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Am(e){if(!e)return Sn;e=e._reactInternals;e:{if(Xn(e)!==e||e.tag!==1)throw Error(F(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(at(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(F(171))}if(e.tag===1){var n=e.type;if(at(n))return Ah(e,n,t)}return t}function Mm(e,t,n,r,i,l,s,o,u){return e=Eu(n,r,!0,e,i,l,s,o,u),e.context=Am(null),n=e.current,r=Je(),i=kn(n),l=Xt(r,i),l.callback=t??null,xn(n,l,i),e.current.lanes=i,Mi(e,i,r),ut(e,r),e}function vs(e,t,n,r){var i=t.current,l=Je(),s=kn(i);return n=Am(n),t.context===null?t.context=n:t.pendingContext=n,t=Xt(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xn(i,t,s),e!==null&&(Mt(e,i,s,l),yl(e,i,s)),s}function Xl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function od(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Tu(e,t){od(e,t),(e=e.alternate)&&od(e,t)}function D1(){return null}var Lm=typeof reportError=="function"?reportError:function(e){console.error(e)};function Iu(e){this._internalRoot=e}ks.prototype.render=Iu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));vs(e,t,null,null)};ks.prototype.unmount=Iu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qn(function(){vs(null,e,null,null)}),t[Jt]=null}};function ks(e){this._internalRoot=e}ks.prototype.unstable_scheduleHydration=function(e){if(e){var t=dh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<cn.length&&t!==0&&t<cn[n].priority;n++);cn.splice(n,0,e),n===0&&hh(e)}};function zu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ws(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ad(){}function _1(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var d=Xl(s);l.call(d)}}var s=Mm(t,r,e,0,null,!1,!1,"",ad);return e._reactRootContainer=s,e[Jt]=s.current,wi(e.nodeType===8?e.parentNode:e),Qn(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var d=Xl(u);o.call(d)}}var u=Eu(e,0,!1,null,null,!1,!1,"",ad);return e._reactRootContainer=u,e[Jt]=u.current,wi(e.nodeType===8?e.parentNode:e),Qn(function(){vs(t,u,n,r)}),u}function bs(e,t,n,r,i){var l=n._reactRootContainer;if(l){var s=l;if(typeof i=="function"){var o=i;i=function(){var u=Xl(s);o.call(u)}}vs(t,s,e,i)}else s=_1(n,t,e,i,r);return Xl(s)}uh=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Zr(t.pendingLanes);n!==0&&(Ka(t,n|1),ut(t,Me()),!(pe&6)&&(zr=Me()+500,Nn()))}break;case 13:Qn(function(){var r=en(e,1);if(r!==null){var i=Je();Mt(r,e,1,i)}}),Tu(e,1)}};Ga=function(e){if(e.tag===13){var t=en(e,134217728);if(t!==null){var n=Je();Mt(t,e,134217728,n)}Tu(e,134217728)}};ch=function(e){if(e.tag===13){var t=kn(e),n=en(e,t);if(n!==null){var r=Je();Mt(n,e,t,r)}Tu(e,t)}};dh=function(){return ye};fh=function(e,t){var n=ye;try{return ye=e,t()}finally{ye=n}};Fo=function(e,t,n){switch(t){case"input":if(Ao(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=fs(r);if(!i)throw Error(F(90));Hf(r),Ao(r,i)}}}break;case"textarea":Wf(e,n);break;case"select":t=n.value,t!=null&&yr(e,!!n.multiple,t,!1)}};Zf=Su;Jf=Qn;var O1={usingClientEntryPoint:!1,Events:[Ri,ar,fs,Gf,Xf,Su]},qr={findFiberByHostInstance:Rn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},F1={bundleType:qr.bundleType,version:qr.version,rendererPackageName:qr.rendererPackageName,rendererConfig:qr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:nn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=nh(e),e===null?null:e.stateNode},findFiberByHostInstance:qr.findFiberByHostInstance||D1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sl.isDisabled&&sl.supportsFiber)try{as=sl.inject(F1),Ht=sl}catch{}}vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O1;vt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zu(t))throw Error(F(200));return R1(e,t,null,n)};vt.createRoot=function(e,t){if(!zu(e))throw Error(F(299));var n=!1,r="",i=Lm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Eu(e,1,!1,null,null,n,!1,r,i),e[Jt]=t.current,wi(e.nodeType===8?e.parentNode:e),new Iu(t)};vt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=nh(t),e=e===null?null:e.stateNode,e};vt.flushSync=function(e){return Qn(e)};vt.hydrate=function(e,t,n){if(!ws(t))throw Error(F(200));return bs(null,e,t,!0,n)};vt.hydrateRoot=function(e,t,n){if(!zu(e))throw Error(F(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",s=Lm;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Mm(t,null,e,1,n??null,i,!1,l,s),e[Jt]=t.current,wi(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new ks(t)};vt.render=function(e,t,n){if(!ws(t))throw Error(F(200));return bs(null,e,t,!1,n)};vt.unmountComponentAtNode=function(e){if(!ws(e))throw Error(F(40));return e._reactRootContainer?(Qn(function(){bs(null,null,e,!1,function(){e._reactRootContainer=null,e[Jt]=null})}),!0):!1};vt.unstable_batchedUpdates=Su;vt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ws(n))throw Error(F(200));if(e==null||e._reactInternals===void 0)throw Error(F(38));return bs(e,t,n,!1,r)};vt.version="18.3.1-next-f1338f8080-20240426";function Rm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rm)}catch(e){console.error(e)}}Rm(),Rf.exports=vt;var Dm=Rf.exports,$1,ud=Dm;$1=ud.createRoot,ud.hydrateRoot;/**
|
|
41
|
+
* @license lucide-react v0.460.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/const B1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_m=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
46
|
+
* @license lucide-react v0.460.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/var U1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
51
|
+
* @license lucide-react v0.460.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/const H1=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:l,iconNode:s,...o},u)=>w.createElement("svg",{ref:u,...U1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_m("lucide",i),...o},[...s.map(([d,c])=>w.createElement(d,c)),...Array.isArray(l)?l:[l]]));/**
|
|
56
|
+
* @license lucide-react v0.460.0 - ISC
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the ISC license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/const J=(e,t)=>{const n=w.forwardRef(({className:r,...i},l)=>w.createElement(H1,{ref:l,iconNode:t,className:_m(`lucide-${B1(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
|
61
|
+
* @license lucide-react v0.460.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const xa=J("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
66
|
+
* @license lucide-react v0.460.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const V1=J("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
71
|
+
* @license lucide-react v0.460.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const cd=J("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
|
76
|
+
* @license lucide-react v0.460.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const W1=J("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
81
|
+
* @license lucide-react v0.460.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const Dr=J("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
86
|
+
* @license lucide-react v0.460.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const Q1=J("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/**
|
|
91
|
+
* @license lucide-react v0.460.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const Ss=J("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
96
|
+
* @license lucide-react v0.460.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const dd=J("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
101
|
+
* @license lucide-react v0.460.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const q1=J("CircleAlert",[["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"}]]);/**
|
|
106
|
+
* @license lucide-react v0.460.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const Y1=J("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
111
|
+
* @license lucide-react v0.460.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const K1=J("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
116
|
+
* @license lucide-react v0.460.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const va=J("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
121
|
+
* @license lucide-react v0.460.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const G1=J("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
126
|
+
* @license lucide-react v0.460.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const X1=J("Copy",[["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"}]]);/**
|
|
131
|
+
* @license lucide-react v0.460.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const Z1=J("ExternalLink",[["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"}]]);/**
|
|
136
|
+
* @license lucide-react v0.460.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const qn=J("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
141
|
+
* @license lucide-react v0.460.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const Pu=J("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
146
|
+
* @license lucide-react v0.460.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const J1=J("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
151
|
+
* @license lucide-react v0.460.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const ka=J("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
156
|
+
* @license lucide-react v0.460.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const ex=J("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
161
|
+
* @license lucide-react v0.460.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const tx=J("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
166
|
+
* @license lucide-react v0.460.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const nx=J("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
|
171
|
+
* @license lucide-react v0.460.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const On=J("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
176
|
+
* @license lucide-react v0.460.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const rx=J("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
181
|
+
* @license lucide-react v0.460.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const ix=J("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
186
|
+
* @license lucide-react v0.460.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const fd=J("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
|
|
191
|
+
* @license lucide-react v0.460.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const lx=J("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
196
|
+
* @license lucide-react v0.460.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const Au=J("Pencil",[["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"}]]);/**
|
|
201
|
+
* @license lucide-react v0.460.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const sx=J("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
|
|
206
|
+
* @license lucide-react v0.460.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const Zl=J("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
211
|
+
* @license lucide-react v0.460.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const xt=J("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
216
|
+
* @license lucide-react v0.460.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const Om=J("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
|
|
221
|
+
* @license lucide-react v0.460.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const ox=J("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
|
|
226
|
+
* @license lucide-react v0.460.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const _t=J("RefreshCw",[["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"}]]);/**
|
|
231
|
+
* @license lucide-react v0.460.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const ax=J("RotateCcw",[["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"}]]);/**
|
|
236
|
+
* @license lucide-react v0.460.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const ux=J("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
|
|
241
|
+
* @license lucide-react v0.460.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const Fm=J("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
246
|
+
* @license lucide-react v0.460.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const hd=J("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
251
|
+
* @license lucide-react v0.460.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const $m=J("Send",[["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"}]]);/**
|
|
256
|
+
* @license lucide-react v0.460.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const cx=J("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
261
|
+
* @license lucide-react v0.460.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const Bm=J("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
266
|
+
* @license lucide-react v0.460.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const Pr=J("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
|
|
271
|
+
* @license lucide-react v0.460.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const dx=J("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
276
|
+
* @license lucide-react v0.460.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const Jl=J("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
281
|
+
* @license lucide-react v0.460.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const es=J("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
286
|
+
* @license lucide-react v0.460.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const md=J("StickyNote",[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]]);/**
|
|
291
|
+
* @license lucide-react v0.460.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const fx=J("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
296
|
+
* @license lucide-react v0.460.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const hx=J("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
301
|
+
* @license lucide-react v0.460.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const _r=J("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
306
|
+
* @license lucide-react v0.460.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const mx=J("TriangleAlert",[["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"}]]);/**
|
|
311
|
+
* @license lucide-react v0.460.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const Zn=J("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Mu(...e){return e.filter(Boolean).join(" ")}function Sr(e){if(!e&&e!==0)return"";const t=typeof e=="number"?e:new Date(e).getTime();if(Number.isNaN(t))return"";const n=Date.now()-t;return n<0||n<6e4?"just now":n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:n<7*864e5?`${Math.floor(n/864e5)}d ago`:new Date(t).toLocaleDateString()}function px(e){if(!e)return"";const t=typeof e=="number"?new Date(e):new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString()}function $C(e,t=160){return e?e.length>t?e.slice(0,t)+"…":e:""}const gx={low:"var(--text-dim)",normal:"var(--info)",high:"var(--error)"},Cl="bizar-auth-token",pd="bizar-loopback-trusted";class wa extends Error{constructor(n,r,i){super(n);rt(this,"status");rt(this,"data");this.name="ApiError",this.status=r,this.data=i}}class yx{constructor(){rt(this,"base","/api")}getToken(){try{return localStorage.getItem(Cl)||""}catch{return""}}setToken(t){try{t?localStorage.setItem(Cl,t):localStorage.removeItem(Cl)}catch{}}pickupTokenFromUrl(){try{const t=new URLSearchParams(window.location.search),n=t.get("token");if(!n)return!1;this.setToken(n),t.delete("token");const r=t.toString(),i=r?`${window.location.pathname}?${r}`:window.location.pathname;return history.replaceState(null,"",i),!0}catch{return!1}}urlWithToken(t){const n=this.base+t,r=this.getToken();if(!r)return n;const i=n.includes("?")?"&":"?";return`${n}${i}token=${encodeURIComponent(r)}`}async probeAuthStatus(){try{const t=await this.get("/auth/status");try{localStorage.setItem(pd,t.loopback?"1":"0")}catch{}return t}catch{return{required:!1,loopback:!0,peer:""}}}isLoopbackTrusted(){try{return localStorage.getItem(pd)!=="0"}catch{return!0}}async get(t){return this.req("GET",t)}async post(t,n){return this.req("POST",t,n)}async put(t,n){return this.req("PUT",t,n)}async patch(t,n){return this.req("PATCH",t,n)}async del(t){return this.req("DELETE",t)}async req(t,n,r){const i={"Content-Type":"application/json"},l=this.getToken();l&&(i.Authorization=`Bearer ${l}`);const s={method:t,headers:i};r!=null&&(s.body=typeof r=="string"?r:JSON.stringify(r));const o=await fetch(this.base+n,s);if((o.headers.get("content-type")||"").includes("application/json")){const c=await o.json();if(!o.ok){const f=(c&&typeof c=="object"&&"message"in c?c.message:void 0)||`${t} ${n}: ${o.status}`;throw new wa(f,o.status,c)}return c}const d=await o.text();if(!o.ok)throw new wa(`${t} ${n}: ${o.status} — ${d.slice(0,200)}`,o.status,d);try{return JSON.parse(d)}catch{return d}}}const q=new yx;q.pickupTokenFromUrl();async function xx(e){return e}const Um=w.createContext(null),vx=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function kx(){const e=w.useContext(Um);return e||{open:()=>"",close:()=>{},isModalOpen:!1}}function BC({children:e}){const[t,n]=w.useState([]),r=w.useCallback(l=>{n(s=>{if(!l)return s.slice(0,-1);const o=s.findIndex(u=>u.id===l);return o===-1||o!==s.length-1?s:s.slice(0,-1)})},[]),i=w.useCallback(l=>{const s=`m${Math.random().toString(36).slice(2,9)}`;return n(o=>[...o,{...l,id:s}]),s},[]);return w.useEffect(()=>{if(t.length===0)return;const l=s=>{s.key==="Escape"&&(s.stopPropagation(),r())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[t.length,r]),a.jsxs(Um.Provider,{value:{open:i,close:r,isModalOpen:t.length>0},children:[e,typeof document<"u"&&Dm.createPortal(a.jsx("div",{className:"modal-stack","aria-hidden":t.length===0,children:t.map((l,s)=>a.jsx(wx,{modal:l,onClose:()=>{var o;(o=l.onClose)==null||o.call(l),r(l.id)},depth:s},l.id))}),document.body)]})}function wx({modal:e,onClose:t,depth:n}){const r=w.useRef(null),i=w.useRef(null),l=w.useId(),s=()=>{const o=r.current;return o?Array.from(o.querySelectorAll(vx)).filter(u=>!u.hasAttribute("disabled")&&u.tabIndex!==-1):[]};return w.useEffect(()=>{var d;i.current=document.activeElement instanceof HTMLElement?document.activeElement:null,(d=s()[0]??r.current)==null||d.focus();const u=c=>{var x,b,y;if(c.key!=="Tab")return;const f=s();if(f.length===0){c.preventDefault(),(x=r.current)==null||x.focus();return}const m=f[0],h=f[f.length-1],p=document.activeElement instanceof HTMLElement?document.activeElement:null;if(c.shiftKey){(!p||p===m||!((b=r.current)!=null&&b.contains(p)))&&(c.preventDefault(),h.focus());return}(!p||p===h||!((y=r.current)!=null&&y.contains(p)))&&(c.preventDefault(),m.focus())};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u);const c=i.current;c&&c.isConnected&&c.focus()}},[]),a.jsx("div",{className:"modal-backdrop",onClick:o=>{o.stopPropagation(),o.target===o.currentTarget&&t()},style:n>0?{background:"rgba(0,0,0,0.4)"}:void 0,children:a.jsxs("div",{ref:r,className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":e.title?l:void 0,tabIndex:-1,onClick:o=>o.stopPropagation(),style:e.width?{maxWidth:e.width}:void 0,children:[e.title&&a.jsxs("header",{className:"modal-header",children:[a.jsx("h2",{id:l,className:"modal-title",children:e.title}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close",onClick:t,children:a.jsx(Zn,{size:16})})]}),a.jsx("div",{className:"modal-body",children:e.children}),e.footer&&a.jsx("footer",{className:"modal-footer",children:e.footer})]})})}const pr=w.forwardRef(function({variant:t="secondary",size:n="md",iconOnly:r=!1,loading:i=!1,disabled:l,className:s,children:o,...u},d){return a.jsxs("button",{ref:d,type:u.type??"button",disabled:l||i,className:Mu("btn",`btn-${t}`,`btn-size-${n}`,r&&"btn-icon",i&&"btn-loading",s),...u,children:[i?a.jsx("span",{className:"btn-spinner","aria-hidden":!0}):null,o]})}),Hm=w.createContext(null);function bx(){const e=w.useContext(Hm);return e||{show:()=>{},info:()=>{},success:()=>{},error:()=>{},warning:()=>{},dismiss:()=>{},toasts:[]}}const Sx={info:tx,success:Y1,error:q1,warning:mx};function UC({children:e}){const[t,n]=w.useState([]),r=w.useRef(1),i=w.useRef(new Map),l=w.useCallback(u=>{n(c=>c.filter(f=>f.id!==u));const d=i.current.get(u);d&&(clearTimeout(d),i.current.delete(u))},[]),s=w.useCallback((u,d="info",c=4e3)=>{const f=r.current++;if(n(m=>[...m,{id:f,kind:d,message:u}]),c>0){const m=setTimeout(()=>l(f),c);i.current.set(f,m)}},[l]);w.useEffect(()=>()=>{for(const u of i.current.values())clearTimeout(u);i.current.clear()},[]);const o=w.useMemo(()=>({show:s,info:(u,d)=>s(u,"info",d),success:(u,d)=>s(u,"success",d),error:(u,d)=>s(u,"error",d),warning:(u,d)=>s(u,"warning",d),dismiss:l,toasts:t}),[s,l,t]);return a.jsxs(Hm.Provider,{value:o,children:[e,a.jsx(Cx,{toasts:t,onDismiss:l})]})}function Cx({toasts:e,onDismiss:t}){return a.jsx("div",{className:"toast-stack","aria-live":"polite",children:e.map(n=>a.jsx(jx,{toast:n,onDismiss:t},n.id))})}function jx({toast:e,onDismiss:t}){const n=Sx[e.kind];return a.jsxs("div",{className:`toast toast-${e.kind}`,role:"status",children:[a.jsx(n,{size:16,className:"toast-icon"}),a.jsx("span",{className:"toast-message",children:e.message}),a.jsx("button",{type:"button",className:"toast-close","aria-label":"Dismiss",onClick:()=>t(e.id),children:a.jsx(Zn,{size:14})})]})}function Nx(){if(typeof location>"u")return"ws://localhost/ws";const e=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws`;let t="";try{t=localStorage.getItem(Cl)||""}catch{}return t?`${e}?token=${encodeURIComponent(t)}`:e}class Vm{constructor(t){rt(this,"urlOverride");rt(this,"handlers",new Set);rt(this,"statusHandlers",new Set);rt(this,"ws",null);rt(this,"reconnectDelay",1e3);rt(this,"maxReconnectDelay",15e3);rt(this,"reconnectTimer",null);rt(this,"_status","connecting");rt(this,"pingTimer",null);rt(this,"closed",!1);this.urlOverride=t,this.connect()}on(t){return this.handlers.add(t),()=>{this.handlers.delete(t)}}onStatus(t){return this.statusHandlers.add(t),t(this._status),()=>{this.statusHandlers.delete(t)}}get status(){return this._status}send(t){return this.ws&&this.ws.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(t)),!0):!1}close(){var t;this.closed=!0,this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.pingTimer&&clearInterval(this.pingTimer),this.pingTimer=null;try{(t=this.ws)==null||t.close()}catch{}this.ws=null,this.setStatus("disconnected")}connect(){if(this.closed)return;this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.setStatus("connecting");const t=this.urlOverride??Nx();let n;try{n=new WebSocket(t),this.ws=n}catch(r){console.warn("[ws] construct failed:",r),this.scheduleReconnect();return}n.addEventListener("open",()=>{this.ws!==n||this.closed||(this.reconnectDelay=1e3,this.setStatus("connected"),this.pingTimer&&clearInterval(this.pingTimer),this.pingTimer=setInterval(()=>{this._status==="connected"&&this.send({type:"ping"})},3e4))}),n.addEventListener("close",()=>{this.ws===n&&(this.ws=null,this.setStatus("disconnected"),this.pingTimer&&(clearInterval(this.pingTimer),this.pingTimer=null),this.closed||this.scheduleReconnect())}),n.addEventListener("error",()=>{this.ws===n&&console.warn("[ws] error")}),n.addEventListener("message",r=>{let i;try{i=JSON.parse(r.data)}catch{console.warn("[ws] bad message");return}for(const l of this.handlers)try{l(i)}catch(s){console.error("[ws] handler error:",s)}})}scheduleReconnect(){this.closed||this.reconnectTimer||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*1.6,this.maxReconnectDelay))}setStatus(t){this._status=t;for(const n of this.statusHandlers)try{n(t)}catch(r){console.error("[ws] status handler error:",r)}}}const Ex=Object.freeze(Object.defineProperty({__proto__:null,Ws:Vm},Symbol.toStringTag,{value:"Module"}));function ts(e){const t=typeof e=="string"?e:e.mode,n=t==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark":t==="light"?"light":"dark";return typeof document<"u"&&(n==="light"?document.documentElement.setAttribute("data-theme","light"):document.documentElement.removeAttribute("data-theme")),n}function ui(e){if(typeof document>"u")return;const t=document.documentElement;t.style.setProperty("--accent",e.accent),t.style.setProperty("--success",e.success),t.style.setProperty("--warning",e.warning),t.style.setProperty("--error",e.error),t.style.setProperty("--info",e.info),t.style.setProperty("--accent-bg",gd(e.accent,.12)),t.style.setProperty("--accent-border",gd(e.accent,.4)),e.fontFamily&&t.style.setProperty("--font-sans",`'${e.fontFamily}', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif`),e.fontSize&&t.style.setProperty("--base-font-size",`${e.fontSize}px`),t.dataset.compactMode=e.compactMode?"true":"false",t.dataset.animations=e.animations?"true":"false"}function gd(e,t){const n=/^#?([0-9a-f]{6})$/i.exec(e||"");if(!n)return`rgba(139, 92, 246, ${t})`;const r=parseInt(n[1],16),i=r>>16&255,l=r>>8&255,s=r&255;return`rgba(${i}, ${l}, ${s}, ${t})`}function Wm({size:e="md",className:t,label:n}){return a.jsx("span",{className:Mu("spinner",`spinner-${e}`,t),role:"status","aria-label":n||"Loading"})}function Tx({activeProject:e,sessionCount:t,sessionsOpen:n,infoOpen:r,onToggleSessions:i,onToggleInfo:l,onOpenOverview:s}){return a.jsxs("header",{className:"chat-topbar",children:[a.jsxs("button",{type:"button",className:"chat-topbar-project",onClick:s,children:[a.jsx(Pu,{size:14}),a.jsx("span",{className:"chat-topbar-project-name",children:(e==null?void 0:e.name)??"No project"}),a.jsx(Ss,{size:12})]}),a.jsx("div",{className:"chat-topbar-spacer"}),a.jsxs("button",{type:"button",className:`chat-topbar-btn ${n?"active":""}`,onClick:i,"aria-pressed":n,children:["Sessions (",t,")"]}),a.jsx("button",{type:"button",className:`chat-topbar-btn ${r?"active":""}`,onClick:l,"aria-pressed":r,children:"Info"})]})}function Ix({icon:e,title:t,message:n,action:r}){return a.jsxs("div",{className:"chat-empty-state",children:[e&&a.jsx("div",{className:"chat-empty-state-icon",children:e}),a.jsx("h2",{className:"chat-empty-state-title",children:t}),a.jsx("p",{className:"chat-empty-state-message",children:n}),r&&a.jsx("div",{className:"chat-empty-state-action",children:r})]})}function zx({count:e=3}){return a.jsx("div",{className:"chat-loading-skeleton","aria-label":"Loading messages",children:Array.from({length:e}).map((t,n)=>a.jsxs("div",{className:"chat-loading-skeleton-bubble",children:[a.jsx("div",{className:"chat-loading-skeleton-meta"}),a.jsx("div",{className:"chat-loading-skeleton-line"}),a.jsx("div",{className:"chat-loading-skeleton-line short"})]},n))})}function Px({projectName:e,onPickSuggestion:t}){const n=[{icon:a.jsx(G1,{size:16}),title:e?`Explain ${e}`:"Explain this project",preview:"Give me a tour of the codebase, highlight the architecture, and call out any anti-patterns or hotspots.",prompt:e?`Explain the ${e} project. Give me a tour of the codebase, highlight the architecture, and call out any anti-patterns or hotspots.`:"Explain the current project. Give me a tour of the codebase, highlight the architecture, and call out any anti-patterns or hotspots."},{icon:a.jsx(W1,{size:16}),title:"Summarize recent sessions",preview:"Read my last 5 chat sessions and give me a 3-bullet summary of what I worked on and what got stuck.",prompt:"Read my last 5 chat sessions and give me a 3-bullet summary of what I worked on and what got stuck."},{icon:a.jsx(nx,{size:16}),title:"Suggest a refactor",preview:"Look for the largest, most painful files in this project and propose a concrete refactor for the worst one.",prompt:"Look for the largest, most painful files in this project and propose a concrete refactor for the worst one."},{icon:a.jsx(ex,{size:16}),title:"Find visual regressions",preview:"Open the dashboard, screenshot the Chat tab, and flag any layout problems or anti-patterns you see.",prompt:"Open the dashboard, screenshot the Chat tab, and flag any layout problems or anti-patterns you see."}];return a.jsx("div",{className:"chat-suggestions",children:n.map((r,i)=>a.jsxs("button",{type:"button",className:"chat-suggestion",onClick:()=>t(r.prompt),children:[a.jsxs("div",{className:"chat-suggestion-title",children:[r.icon,a.jsx("span",{children:r.title})]}),a.jsx("div",{className:"chat-suggestion-preview",children:r.preview})]},i))})}function yd({variant:e,projectName:t,onPickSuggestion:n}){if(e==="no-project")return a.jsxs("div",{className:"chat-welcome",children:[a.jsx("h1",{className:"chat-welcome-h1",children:a.jsx("span",{className:"chat-greeting-hello",children:"No project selected."})}),a.jsx("p",{className:"chat-welcome-subtitle",children:"Pick a project in Overview to scope chat sessions."})]});const r=t||"there";return a.jsxs("div",{className:"chat-welcome",children:[a.jsxs("h1",{className:"chat-welcome-h1",children:[a.jsx("span",{className:"chat-greeting-hello",children:"Hello, "}),a.jsxs("span",{className:"chat-greeting-name",children:[r,"."]})]}),a.jsx("p",{className:"chat-welcome-subtitle",children:"How can I help you today?"}),a.jsx(Px,{projectName:t,onPickSuggestion:n})]})}function Ax(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Mx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rx={};function xd(e,t){return(Rx.jsx?Lx:Mx).test(e)}const Dx=/[ \t\n\f\r]/g;function _x(e){return typeof e=="object"?e.type==="text"?vd(e.value):!1:vd(e)}function vd(e){return e.replace(Dx,"")===""}class _i{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}_i.prototype.normal={};_i.prototype.property={};_i.prototype.space=void 0;function Qm(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new _i(n,r,t)}function ba(e){return e.toLowerCase()}class ct{constructor(t,n){this.attribute=n,this.property=t}}ct.prototype.attribute="";ct.prototype.booleanish=!1;ct.prototype.boolean=!1;ct.prototype.commaOrSpaceSeparated=!1;ct.prototype.commaSeparated=!1;ct.prototype.defined=!1;ct.prototype.mustUseProperty=!1;ct.prototype.number=!1;ct.prototype.overloadedBoolean=!1;ct.prototype.property="";ct.prototype.spaceSeparated=!1;ct.prototype.space=void 0;let Ox=0;const ne=Jn(),Re=Jn(),Sa=Jn(),$=Jn(),ve=Jn(),Bn=Jn(),ft=Jn();function Jn(){return 2**++Ox}const Ca=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Re,commaOrSpaceSeparated:ft,commaSeparated:Bn,number:$,overloadedBoolean:Sa,spaceSeparated:ve},Symbol.toStringTag,{value:"Module"})),ao=Object.keys(Ca);class Lu extends ct{constructor(t,n,r,i){let l=-1;if(super(t,n),kd(this,"space",i),typeof r=="number")for(;++l<ao.length;){const s=ao[l];kd(this,ao[l],(r&Ca[s])===Ca[s])}}}Lu.prototype.defined=!0;function kd(e,t,n){n&&(e[t]=n)}function Or(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new Lu(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[ba(r)]=r,n[ba(l.attribute)]=r}return new _i(t,n,e.space)}const qm=Or({properties:{ariaActiveDescendant:null,ariaAtomic:Re,ariaAutoComplete:null,ariaBusy:Re,ariaChecked:Re,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:ve,ariaCurrent:null,ariaDescribedBy:ve,ariaDetails:null,ariaDisabled:Re,ariaDropEffect:ve,ariaErrorMessage:null,ariaExpanded:Re,ariaFlowTo:ve,ariaGrabbed:Re,ariaHasPopup:null,ariaHidden:Re,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ve,ariaLevel:$,ariaLive:null,ariaModal:Re,ariaMultiLine:Re,ariaMultiSelectable:Re,ariaOrientation:null,ariaOwns:ve,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Re,ariaReadOnly:Re,ariaRelevant:null,ariaRequired:Re,ariaRoleDescription:ve,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Re,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ym(e,t){return t in e?e[t]:t}function Km(e,t){return Ym(e,t.toLowerCase())}const Fx=Or({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Bn,acceptCharset:ve,accessKey:ve,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alpha:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:ve,autoFocus:ne,autoPlay:ne,blocking:ve,capture:null,charSet:null,checked:ne,cite:null,className:ve,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:Re,controls:ne,controlsList:ve,coords:$|Bn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:Sa,draggable:Re,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:ve,height:$,hidden:Sa,high:$,href:null,hrefLang:null,htmlFor:ve,httpEquiv:ve,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:ve,itemRef:ve,itemScope:ne,itemType:ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,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:ne,optimum:$,pattern:null,ping:ve,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:ve,required:ne,reversed:ne,rows:$,rowSpan:$,sandbox:ve,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootCustomElementRegistry:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shadowRootSerializable:ne,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Re,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Re,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ve,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Re,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ne,disablePictureInPicture:ne,disableRemotePlayback:ne,exportParts:Bn,part:ve,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:Km}),$x=Or({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:ft,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:ve,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:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,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:Bn,g2:Bn,glyphName:Bn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:ft,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,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:$,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:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ft,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ft,rev:ft,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ft,requiredFeatures:ft,requiredFonts:ft,requiredFormats:ft,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:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:ft,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ft,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ft,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ym}),Gm=Or({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()}}),Xm=Or({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Km}),Zm=Or({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Bx={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"},Ux=/[A-Z]/g,wd=/-[a-z]/g,Hx=/^data[-\w.:]+$/i;function Vx(e,t){const n=ba(t);let r=t,i=ct;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Hx.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(wd,Qx);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!wd.test(l)){let s=l.replace(Ux,Wx);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Lu}return new i(r,t)}function Wx(e){return"-"+e.toLowerCase()}function Qx(e){return e.charAt(1).toUpperCase()}const qx=Qm([qm,Fx,Gm,Xm,Zm],"html"),Ru=Qm([qm,$x,Gm,Xm,Zm],"svg");function Yx(e){return e.join(" ").trim()}var Du={},bd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Kx=/\n/g,Gx=/^\s*/,Xx=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Zx=/^:\s*/,Jx=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ev=/^[;\s]*/,tv=/^\s+|\s+$/g,nv=`
|
|
316
|
+
`,Sd="/",Cd="*",Ln="",rv="comment",iv="declaration";function lv(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var x=p.match(Kx);x&&(n+=x.length);var b=p.lastIndexOf(nv);r=~b?p.length-b:r+p.length}function l(){var p={line:n,column:r};return function(x){return x.position=new s(p),d(),x}}function s(p){this.start=p,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function o(p){var x=new Error(t.source+":"+n+":"+r+": "+p);if(x.reason=p,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(p){var x=p.exec(e);if(x){var b=x[0];return i(b),e=e.slice(b.length),x}}function d(){u(Gx)}function c(p){var x;for(p=p||[];x=f();)x!==!1&&p.push(x);return p}function f(){var p=l();if(!(Sd!=e.charAt(0)||Cd!=e.charAt(1))){for(var x=2;Ln!=e.charAt(x)&&(Cd!=e.charAt(x)||Sd!=e.charAt(x+1));)++x;if(x+=2,Ln===e.charAt(x-1))return o("End of comment missing");var b=e.slice(2,x-2);return r+=2,i(b),e=e.slice(x),r+=2,p({type:rv,comment:b})}}function m(){var p=l(),x=u(Xx);if(x){if(f(),!u(Zx))return o("property missing ':'");var b=u(Jx),y=p({type:iv,property:jd(x[0].replace(bd,Ln)),value:b?jd(b[0].replace(bd,Ln)):Ln});return u(ev),y}}function h(){var p=[];c(p);for(var x;x=m();)x!==!1&&(p.push(x),c(p));return p}return d(),h()}function jd(e){return e?e.replace(tv,Ln):Ln}var sv=lv,ov=El&&El.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Du,"__esModule",{value:!0});Du.default=uv;const av=ov(sv);function uv(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,av.default)(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:s,value:o}=l;i?t(s,o,l):o&&(n=n||{},n[s]=o)}),n}var Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.camelCase=void 0;var cv=/^--[a-zA-Z0-9_-]+$/,dv=/-([a-z])/g,fv=/^[^-]+$/,hv=/^-(webkit|moz|ms|o|khtml)-/,mv=/^-(ms)-/,pv=function(e){return!e||fv.test(e)||cv.test(e)},gv=function(e,t){return t.toUpperCase()},Nd=function(e,t){return"".concat(t,"-")},yv=function(e,t){return t===void 0&&(t={}),pv(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(mv,Nd):e=e.replace(hv,Nd),e.replace(dv,gv))};Cs.camelCase=yv;var xv=El&&El.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},vv=xv(Du),kv=Cs;function ja(e,t){var n={};return!e||typeof e!="string"||(0,vv.default)(e,function(r,i){r&&i&&(n[(0,kv.camelCase)(r,t)]=i)}),n}ja.default=ja;var wv=ja;const bv=Da(wv),Jm=ep("end"),_u=ep("start");function ep(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Sv(e){const t=_u(e),n=Jm(e);if(t&&n)return{start:t,end:n}}function ci(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ed(e.position):"start"in e||"end"in e?Ed(e):"line"in e||"column"in e?Na(e):""}function Na(e){return Td(e&&e.line)+":"+Td(e&&e.column)}function Ed(e){return Na(e&&e.start)+"-"+Na(e&&e.end)}function Td(e){return e&&typeof e=="number"?e:1}class Ge extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},s=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(s=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const o=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=ci(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=s&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ge.prototype.file="";Ge.prototype.name="";Ge.prototype.reason="";Ge.prototype.message="";Ge.prototype.stack="";Ge.prototype.column=void 0;Ge.prototype.line=void 0;Ge.prototype.ancestors=void 0;Ge.prototype.cause=void 0;Ge.prototype.fatal=void 0;Ge.prototype.place=void 0;Ge.prototype.ruleId=void 0;Ge.prototype.source=void 0;const Ou={}.hasOwnProperty,Cv=new Map,jv=/[A-Z]/g,Nv=new Set(["table","tbody","thead","tfoot","tr"]),Ev=new Set(["td","th"]),tp="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Tv(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Dv(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Rv(n,t.jsx,t.jsxs)}const 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"?Ru:qx,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=np(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function np(e,t,n){if(t.type==="element")return Iv(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return zv(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Av(e,t,n);if(t.type==="mdxjsEsm")return Pv(e,t);if(t.type==="root")return Mv(e,t,n);if(t.type==="text")return Lv(e,t)}function Iv(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ru,e.schema=i),e.ancestors.push(t);const l=ip(e,t.tagName,!1),s=_v(e,t);let o=$u(e,t);return Nv.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!_x(u):!0})),rp(e,s,l,t),Fu(s,o),e.ancestors.pop(),e.schema=r,e.create(t,l,s,n)}function zv(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}zi(e,t.position)}function Pv(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zi(e,t.position)}function Av(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ru,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:ip(e,t.name,!0),s=Ov(e,t),o=$u(e,t);return rp(e,s,l,t),Fu(s,o),e.ancestors.pop(),e.schema=r,e.create(t,l,s,n)}function Mv(e,t,n){const r={};return Fu(r,$u(e,t)),e.create(t,e.Fragment,r,n)}function Lv(e,t){return t.value}function rp(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Fu(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Rv(e,t,n){return r;function r(i,l,s,o){const d=Array.isArray(s.children)?n:t;return o?d(l,s,o):d(l,s)}}function Dv(e,t){return n;function n(r,i,l,s){const o=Array.isArray(l.children),u=_u(r);return t(i,l,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function _v(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ou.call(t.properties,i)){const l=Fv(e,i,t.properties[i]);if(l){const[s,o]=l;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&Ev.has(t.tagName)?r=o:n[s]=o}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ov(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const s=l.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else zi(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,l=e.evaluater.evaluateExpression(o.expression)}else zi(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function $u(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Cv;for(;++r<t.children.length;){const l=t.children[r];let s;if(e.passKeys){const u=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(u){const d=i.get(u)||0;s=u+"-"+d,i.set(u,d+1)}}const o=np(e,l,s);o!==void 0&&n.push(o)}return n}function Fv(e,t,n){const r=Vx(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ax(n):Yx(n)),r.property==="style"){let i=typeof n=="object"?n:$v(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Bv(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Bx[r.property]||r.property:r.attribute,n]}}function $v(e,t){try{return bv(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ge("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=tp+"#cannot-parse-style-attribute",i}}function ip(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,s;for(;++l<i.length;){const o=xd(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(l&&o.type==="Literal"),optional:!1}:o}r=s}else r=xd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ou.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);zi(e)}function zi(e,t){const n=new Ge("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=tp+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Bv(e){const t={};let n;for(n in e)Ou.call(e,n)&&(t[Uv(n)]=e[n]);return t}function Uv(e){let t=e.replace(jv,Hv);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Hv(e){return"-"+e.toLowerCase()}const uo={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"]},Vv={};function Bu(e,t){const n=Vv,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return lp(e,r,i)}function lp(e,t,n){if(Wv(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 Id(e.children,t,n)}return Array.isArray(e)?Id(e,t,n):""}function Id(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=lp(e[i],t,n);return r.join("")}function Wv(e){return!!(e&&typeof e=="object")}const zd=document.createElement("i");function Uu(e){const t="&"+e+";";zd.innerHTML=t;const n=zd.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function gt(e,t,n,r){const i=e.length;let l=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);l<r.length;)s=r.slice(l,l+1e4),s.unshift(t,0),e.splice(...s),l+=1e4,t+=1e4}function St(e,t){return e.length>0?(gt(e,e.length,0,t),e):t}const Pd={}.hasOwnProperty;function sp(e){const t={};let n=-1;for(;++n<e.length;)Qv(t,e[n]);return t}function Qv(e,t){let n;for(n in t){const i=(Pd.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let s;if(l)for(s in l){Pd.call(i,s)||(i[s]=[]);const o=l[s];qv(i[s],Array.isArray(o)?o:o?[o]:[])}}}function qv(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);gt(e,0,0,r)}function op(e,t){const 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 Lt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ze=En(/[A-Za-z]/),Ye=En(/[\dA-Za-z]/),Yv=En(/[#-'*+\--9=?A-Z^-~]/);function ns(e){return e!==null&&(e<32||e===127)}const Ea=En(/\d/),Kv=En(/[\dA-Fa-f]/),Gv=En(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function ke(e){return e!==null&&(e<0||e===32)}function ue(e){return e===-2||e===-1||e===32}const js=En(new RegExp("\\p{P}|\\p{S}","u")),Yn=En(/\s/);function En(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Fr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let s="";if(l===37&&Ye(e.charCodeAt(n+1))&&Ye(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(s=String.fromCharCode(l));else if(l>55295&&l<57344){const o=e.charCodeAt(n+1);l<56320&&o>56319&&o<57344?(s=String.fromCharCode(l,o),i=1):s="�"}else s=String.fromCharCode(l);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function me(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return s;function s(u){return ue(u)?(e.enter(n),o(u)):t(u)}function o(u){return ue(u)&&l++<i?(e.consume(u),o):(e.exit(n),t(u))}}const Xv={tokenize:Zv};function Zv(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),me(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),l(o)}function l(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return K(o)?(e.consume(o),e.exit("chunkText"),l):(e.consume(o),s)}}const Jv={tokenize:ek},Ad={tokenize:tk};function ek(e){const t=this,n=[];let r=0,i,l,s;return o;function o(v){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,u,d)(v)}return d(v)}function u(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&g();const C=t.events.length;let z=C,E;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){E=t.events[z][1].end;break}y(r);let A=C;for(;A<t.events.length;)t.events[A][1].end={...E},A++;return gt(t.events,z+1,0,t.events.slice(C)),t.events.length=A,d(v)}return o(v)}function d(v){if(r===n.length){if(!i)return m(v);if(i.currentConstruct&&i.currentConstruct.concrete)return p(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ad,c,f)(v)}function c(v){return i&&g(),y(r),m(v)}function f(v){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,p(v)}function m(v){return t.containerState={},e.attempt(Ad,h,p)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),m(v)}function p(v){if(v===null){i&&g(),y(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),x(v)}function x(v){if(v===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(v);return}return K(v)?(e.consume(v),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(v),x)}function b(v,C){const z=t.sliceStream(v);if(C&&z.push(null),v.previous=l,l&&(l.next=v),l=v,i.defineSkip(v.start),i.write(z),t.parser.lazy[v.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<s&&(!i.events[E][1].end||i.events[E][1].end.offset>s))return;const A=t.events.length;let L=A,I,k;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(I){k=t.events[L][1].end;break}I=!0}for(y(r),E=A;E<t.events.length;)t.events[E][1].end={...k},E++;gt(t.events,L+1,0,t.events.slice(A)),t.events.length=E}}function y(v){let C=n.length;for(;C-- >v;){const z=n[C];t.containerState=z[1],z[0].exit.call(t,e)}n.length=v}function g(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function tk(e,t,n){return me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ar(e){if(e===null||ke(e)||Yn(e))return 1;if(js(e))return 2}function Ns(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const Ta={name:"attention",resolveAll:nk,tokenize:rk};function nk(e,t){let n=-1,r,i,l,s,o,u,d,c;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;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},m={...e[n][1].start};Md(f,-u),Md(m,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=St(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=St(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",l,t]]),d=St(d,Ns(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=St(d,[["exit",l,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,d=St(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,gt(e,r-1,n-r+3,d),n=r+d.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function rk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ar(r);let l;return s;function s(u){return l=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===l)return e.consume(u),o;const d=e.exit("attentionSequence"),c=Ar(u),f=!c||c===2&&i||n.includes(u),m=!i||i===2&&c||n.includes(r);return d._open=!!(l===42?f:f&&(i||!m)),d._close=!!(l===42?m:m&&(c||!f)),t(u)}}function Md(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ik={name:"autolink",tokenize:lk};function lk(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(h){return Ze(h)?(e.consume(h),s):h===64?n(h):d(h)}function s(h){return h===43||h===45||h===46||Ye(h)?(r=1,o(h)):d(h)}function o(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||Ye(h))&&r++<32?(e.consume(h),o):(r=0,d(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||ns(h)?n(h):(e.consume(h),u)}function d(h){return h===64?(e.consume(h),c):Yv(h)?(e.consume(h),d):n(h)}function c(h){return Ye(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):m(h)}function m(h){if((h===45||Ye(h))&&r++<63){const p=h===45?m:f;return e.consume(h),p}return n(h)}}const Oi={partial:!0,tokenize:sk};function sk(e,t,n){return r;function r(l){return ue(l)?me(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||K(l)?t(l):n(l)}}const ap={continuation:{tokenize:ak},exit:uk,name:"blockQuote",tokenize:ok};function ok(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),l}return n(s)}function l(s){return ue(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function ak(e,t,n){const r=this;return i;function i(s){return ue(s)?me(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):l(s)}function l(s){return e.attempt(ap,t,n)(s)}}function uk(e){e.exit("blockQuote")}const up={name:"characterEscape",tokenize:ck};function ck(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Gv(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const cp={name:"characterReference",tokenize:dk};function dk(e,t,n){const r=this;let i=0,l,s;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),l=31,s=Ye,c(f))}function d(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,s=Kv,c):(e.enter("characterReferenceValue"),l=7,s=Ea,c(f))}function c(f){if(f===59&&i){const m=e.exit("characterReferenceValue");return s===Ye&&!Uu(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<l?(e.consume(f),c):n(f)}}const Ld={partial:!0,tokenize:hk},Rd={concrete:!0,name:"codeFenced",tokenize:fk};function fk(e,t,n){const r=this,i={partial:!0,tokenize:z};let l=0,s=0,o;return u;function u(E){return d(E)}function d(E){const A=r.events[r.events.length-1];return l=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,o=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===o?(s++,e.consume(E),c):s<3?n(E):(e.exit("codeFencedFenceSequence"),ue(E)?me(e,f,"whitespace")(E):f(E))}function f(E){return E===null||K(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(Ld,x,C)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||K(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):ue(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),me(e,h,"whitespace")(E)):E===96&&E===o?n(E):(e.consume(E),m)}function h(E){return E===null||K(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||K(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===o?n(E):(e.consume(E),p)}function x(E){return e.attempt(i,C,b)(E)}function b(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),y}function y(E){return l>0&&ue(E)?me(e,g,"linePrefix",l+1)(E):g(E)}function g(E){return E===null||K(E)?e.check(Ld,x,C)(E):(e.enter("codeFlowValue"),v(E))}function v(E){return E===null||K(E)?(e.exit("codeFlowValue"),g(E)):(e.consume(E),v)}function C(E){return e.exit("codeFenced"),t(E)}function z(E,A,L){let I=0;return k;function k(W){return E.enter("lineEnding"),E.consume(W),E.exit("lineEnding"),j}function j(W){return E.enter("codeFencedFence"),ue(W)?me(E,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):P(W)}function P(W){return W===o?(E.enter("codeFencedFenceSequence"),B(W)):L(W)}function B(W){return W===o?(I++,E.consume(W),B):I>=s?(E.exit("codeFencedFenceSequence"),ue(W)?me(E,O,"whitespace")(W):O(W)):L(W)}function O(W){return W===null||K(W)?(E.exit("codeFencedFence"),A(W)):L(W)}}}function hk(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l)}function l(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const co={name:"codeIndented",tokenize:pk},mk={partial:!0,tokenize:gk};function pk(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),me(e,l,"linePrefix",5)(d)}function l(d){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?u(d):K(d)?e.attempt(mk,s,u)(d):(e.enter("codeFlowValue"),o(d))}function o(d){return d===null||K(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),o)}function u(d){return e.exit("codeIndented"),t(d)}}function gk(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):K(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):me(e,l,"linePrefix",5)(s)}function l(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):K(s)?i(s):n(s)}}const yk={name:"codeText",previous:vk,resolve:xk,tokenize:kk};function xk(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 vk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kk(e,t,n){let r=0,i,l;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(l=e.enter("codeTextSequence"),i=0,c(f)):K(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),d(f))}function d(f){return f===null||f===32||f===96||K(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),d)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(l.type="codeTextData",d(f))}}class wk{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Yr(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Yr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yr(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Yr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Yr(this.left,n.reverse())}}}function Yr(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 dp(e){const t={};let n=-1,r,i,l,s,o,u,d;const c=new wk(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,l=0,l<u.length&&u[l][1].type==="lineEndingBlank"&&(l+=2),l<u.length&&u[l][1].type==="content"))for(;++l<u.length&&u[l][1].type!=="content";)u[l][1].type==="chunkText"&&(u[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,bk(c,n)),n=t[n],d=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(s=c.get(l),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=l);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},o=c.slice(i,n),o.unshift(r),c.splice(i,n-i+1,o))}}return gt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!d}function bk(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,u=[],d={};let c,f,m=-1,h=n,p=0,x=0;const b=[x];for(;h;){for(;e.get(++i)[1]!==h;);l.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(x=m+1,b.push(x),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),m=b.length;m--;){const y=o.slice(b[m],b[m+1]),g=l.pop();u.push([g,g+y.length-1]),e.splice(g,2,y)}for(u.reverse(),m=-1;++m<u.length;)d[p+u[m][0]]=p+u[m][1],p+=u[m][1]-u[m][0]-1;return d}const Sk={resolve:jk,tokenize:Nk},Ck={partial:!0,tokenize:Ek};function jk(e){return dp(e),e}function Nk(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?l(o):K(o)?e.check(Ck,s,l)(o):(e.consume(o),i)}function l(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ek(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),me(e,l,"linePrefix")}function l(s){if(s===null||K(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function fp(e,t,n,r,i,l,s,o,u){const d=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(y){return y===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(y),e.exit(l),m):y===null||y===32||y===41||ns(y)?n(y):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),x(y))}function m(y){return y===62?(e.enter(l),e.consume(y),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(o),m(y)):y===null||y===60||K(y)?n(y):(e.consume(y),y===92?p:h)}function p(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function x(y){return!c&&(y===null||y===41||ke(y))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(y)):c<d&&y===40?(e.consume(y),c++,x):y===41?(e.consume(y),c--,x):y===null||y===32||y===40||ns(y)?n(y):(e.consume(y),y===92?b:x)}function b(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}function hp(e,t,n,r,i,l){const s=this;let o=0,u;return d;function d(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(l),c}function c(h){return o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):K(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||K(h)||o++>999?(e.exit("chunkString"),c(h)):(e.consume(h),u||(u=!ue(h)),h===92?m:f)}function m(h){return h===91||h===92||h===93?(e.consume(h),o++,f):f(h)}}function mp(e,t,n,r,i,l){let s;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),s=m===40?41:m,u):n(m)}function u(m){return m===s?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(l),d(m))}function d(m){return m===s?(e.exit(l),u(s)):m===null?n(m):K(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),me(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(m))}function c(m){return m===s||m===null||K(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?f:c)}function f(m){return m===s||m===92?(e.consume(m),c):c(m)}}function di(e,t){let n;return r;function r(i){return K(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ue(i)?me(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Tk={name:"definition",tokenize:zk},Ik={partial:!0,tokenize:Pk};function zk(e,t,n){const r=this;let i;return l;function l(h){return e.enter("definition"),s(h)}function s(h){return hp.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return ke(h)?di(e,d)(h):d(h)}function d(h){return fp(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(Ik,f,f)(h)}function f(h){return ue(h)?me(e,m,"whitespace")(h):m(h)}function m(h){return h===null||K(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Pk(e,t,n){return r;function r(o){return ke(o)?di(e,i)(o):n(o)}function i(o){return mp(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function l(o){return ue(o)?me(e,s,"whitespace")(o):s(o)}function s(o){return o===null||K(o)?t(o):n(o)}}const Ak={name:"hardBreakEscape",tokenize:Mk};function Mk(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return K(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const Lk={name:"headingAtx",resolve:Rk,tokenize:Dk};function Rk(e,t){let n=e.length-2,r=3,i,l;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},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},gt(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function Dk(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),l(c)}function l(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||ke(c)?(e.exit("atxHeadingSequence"),o(c)):n(c)}function o(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||K(c)?(e.exit("atxHeading"),t(c)):ue(c)?me(e,o,"whitespace")(c):(e.enter("atxHeadingText"),d(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),o(c))}function d(c){return c===null||c===35||ke(c)?(e.exit("atxHeadingText"),o(c)):(e.consume(c),d)}}const _k=["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"],Dd=["pre","script","style","textarea"],Ok={concrete:!0,name:"htmlFlow",resolveTo:Bk,tokenize:Uk},Fk={partial:!0,tokenize:Vk},$k={partial:!0,tokenize:Hk};function Bk(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 Uk(e,t,n){const r=this;let i,l,s,o,u;return d;function d(N){return c(N)}function c(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),f}function f(N){return N===33?(e.consume(N),m):N===47?(e.consume(N),l=!0,x):N===63?(e.consume(N),i=3,r.interrupt?t:S):Ze(N)?(e.consume(N),s=String.fromCharCode(N),b):n(N)}function m(N){return N===45?(e.consume(N),i=2,h):N===91?(e.consume(N),i=5,o=0,p):Ze(N)?(e.consume(N),i=4,r.interrupt?t:S):n(N)}function h(N){return N===45?(e.consume(N),r.interrupt?t:S):n(N)}function p(N){const ge="CDATA[";return N===ge.charCodeAt(o++)?(e.consume(N),o===ge.length?r.interrupt?t:P:p):n(N)}function x(N){return Ze(N)?(e.consume(N),s=String.fromCharCode(N),b):n(N)}function b(N){if(N===null||N===47||N===62||ke(N)){const ge=N===47,Le=s.toLowerCase();return!ge&&!l&&Dd.includes(Le)?(i=1,r.interrupt?t(N):P(N)):_k.includes(s.toLowerCase())?(i=6,ge?(e.consume(N),y):r.interrupt?t(N):P(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):l?g(N):v(N))}return N===45||Ye(N)?(e.consume(N),s+=String.fromCharCode(N),b):n(N)}function y(N){return N===62?(e.consume(N),r.interrupt?t:P):n(N)}function g(N){return ue(N)?(e.consume(N),g):k(N)}function v(N){return N===47?(e.consume(N),k):N===58||N===95||Ze(N)?(e.consume(N),C):ue(N)?(e.consume(N),v):k(N)}function C(N){return N===45||N===46||N===58||N===95||Ye(N)?(e.consume(N),C):z(N)}function z(N){return N===61?(e.consume(N),E):ue(N)?(e.consume(N),z):v(N)}function E(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),u=N,A):ue(N)?(e.consume(N),E):L(N)}function A(N){return N===u?(e.consume(N),u=null,I):N===null||K(N)?n(N):(e.consume(N),A)}function L(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||ke(N)?z(N):(e.consume(N),L)}function I(N){return N===47||N===62||ue(N)?v(N):n(N)}function k(N){return N===62?(e.consume(N),j):n(N)}function j(N){return N===null||K(N)?P(N):ue(N)?(e.consume(N),j):n(N)}function P(N){return N===45&&i===2?(e.consume(N),de):N===60&&i===1?(e.consume(N),ee):N===62&&i===4?(e.consume(N),Y):N===63&&i===3?(e.consume(N),S):N===93&&i===5?(e.consume(N),V):K(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Fk,ie,B)(N)):N===null||K(N)?(e.exit("htmlFlowData"),B(N)):(e.consume(N),P)}function B(N){return e.check($k,O,ie)(N)}function O(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),W}function W(N){return N===null||K(N)?B(N):(e.enter("htmlFlowData"),P(N))}function de(N){return N===45?(e.consume(N),S):P(N)}function ee(N){return N===47?(e.consume(N),s="",R):P(N)}function R(N){if(N===62){const ge=s.toLowerCase();return Dd.includes(ge)?(e.consume(N),Y):P(N)}return Ze(N)&&s.length<8?(e.consume(N),s+=String.fromCharCode(N),R):P(N)}function V(N){return N===93?(e.consume(N),S):P(N)}function S(N){return N===62?(e.consume(N),Y):N===45&&i===2?(e.consume(N),S):P(N)}function Y(N){return N===null||K(N)?(e.exit("htmlFlowData"),ie(N)):(e.consume(N),Y)}function ie(N){return e.exit("htmlFlow"),t(N)}}function Hk(e,t,n){const r=this;return i;function i(s){return K(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l):n(s)}function l(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Vk(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Oi,t,n)}}const Wk={name:"htmlText",tokenize:Qk};function Qk(e,t,n){const r=this;let i,l,s;return o;function o(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),u}function u(S){return S===33?(e.consume(S),d):S===47?(e.consume(S),z):S===63?(e.consume(S),v):Ze(S)?(e.consume(S),L):n(S)}function d(S){return S===45?(e.consume(S),c):S===91?(e.consume(S),l=0,p):Ze(S)?(e.consume(S),g):n(S)}function c(S){return S===45?(e.consume(S),h):n(S)}function f(S){return S===null?n(S):S===45?(e.consume(S),m):K(S)?(s=f,ee(S)):(e.consume(S),f)}function m(S){return S===45?(e.consume(S),h):f(S)}function h(S){return S===62?de(S):S===45?m(S):f(S)}function p(S){const Y="CDATA[";return S===Y.charCodeAt(l++)?(e.consume(S),l===Y.length?x:p):n(S)}function x(S){return S===null?n(S):S===93?(e.consume(S),b):K(S)?(s=x,ee(S)):(e.consume(S),x)}function b(S){return S===93?(e.consume(S),y):x(S)}function y(S){return S===62?de(S):S===93?(e.consume(S),y):x(S)}function g(S){return S===null||S===62?de(S):K(S)?(s=g,ee(S)):(e.consume(S),g)}function v(S){return S===null?n(S):S===63?(e.consume(S),C):K(S)?(s=v,ee(S)):(e.consume(S),v)}function C(S){return S===62?de(S):v(S)}function z(S){return Ze(S)?(e.consume(S),E):n(S)}function E(S){return S===45||Ye(S)?(e.consume(S),E):A(S)}function A(S){return K(S)?(s=A,ee(S)):ue(S)?(e.consume(S),A):de(S)}function L(S){return S===45||Ye(S)?(e.consume(S),L):S===47||S===62||ke(S)?I(S):n(S)}function I(S){return S===47?(e.consume(S),de):S===58||S===95||Ze(S)?(e.consume(S),k):K(S)?(s=I,ee(S)):ue(S)?(e.consume(S),I):de(S)}function k(S){return S===45||S===46||S===58||S===95||Ye(S)?(e.consume(S),k):j(S)}function j(S){return S===61?(e.consume(S),P):K(S)?(s=j,ee(S)):ue(S)?(e.consume(S),j):I(S)}function P(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,B):K(S)?(s=P,ee(S)):ue(S)?(e.consume(S),P):(e.consume(S),O)}function B(S){return S===i?(e.consume(S),i=void 0,W):S===null?n(S):K(S)?(s=B,ee(S)):(e.consume(S),B)}function O(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||ke(S)?I(S):(e.consume(S),O)}function W(S){return S===47||S===62||ke(S)?I(S):n(S)}function de(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function ee(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),R}function R(S){return ue(S)?me(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):V(S)}function V(S){return e.enter("htmlTextData"),s(S)}}const Hu={name:"labelEnd",resolveAll:Gk,resolveTo:Xk,tokenize:Zk},qk={tokenize:Jk},Yk={tokenize:e0},Kk={tokenize:t0};function Gk(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&>(e,0,e.length,n),e}function Xk(e,t){let n=e.length,r=0,i,l,s,o;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[l][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",u,t],["enter",d,t]],o=St(o,e.slice(l+1,l+r+3)),o=St(o,[["enter",c,t]]),o=St(o,Ns(t.parser.constructs.insideSpan.null,e.slice(l+r+4,s-3),t)),o=St(o,[["exit",c,t],e[s-2],e[s-1],["exit",d,t]]),o=St(o,e.slice(s+1)),o=St(o,[["exit",u,t]]),gt(e,l,e.length,o),e}function Zk(e,t,n){const r=this;let i=r.events.length,l,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return o;function o(m){return l?l._inactive?f(m):(s=r.parser.defined.includes(Lt(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):n(m)}function u(m){return m===40?e.attempt(qk,c,s?c:f)(m):m===91?e.attempt(Yk,c,s?d:f)(m):s?c(m):f(m)}function d(m){return e.attempt(Kk,c,f)(m)}function c(m){return t(m)}function f(m){return l._balanced=!0,n(m)}}function Jk(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return ke(f)?di(e,l)(f):l(f)}function l(f){return f===41?c(f):fp(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return ke(f)?di(e,u)(f):c(f)}function o(f){return n(f)}function u(f){return f===34||f===39||f===40?mp(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function d(f){return ke(f)?di(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function e0(e,t,n){const r=this;return i;function i(o){return hp.call(r,e,l,s,"reference","referenceMarker","referenceString")(o)}function l(o){return r.parser.defined.includes(Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function t0(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const n0={name:"labelStartImage",resolveAll:Hu.resolveAll,tokenize:r0};function r0(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),l}function l(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const i0={name:"labelStartLink",resolveAll:Hu.resolveAll,tokenize:l0};function l0(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),l}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const fo={name:"lineEnding",tokenize:s0};function s0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),me(e,t,"linePrefix")}}const jl={name:"thematicBreak",tokenize:o0};function o0(e,t,n){let r=0,i;return l;function l(d){return e.enter("thematicBreak"),s(d)}function s(d){return i=d,o(d)}function o(d){return d===i?(e.enter("thematicBreakSequence"),u(d)):r>=3&&(d===null||K(d))?(e.exit("thematicBreak"),t(d)):n(d)}function u(d){return d===i?(e.consume(d),r++,u):(e.exit("thematicBreakSequence"),ue(d)?me(e,o,"whitespace")(d):o(d))}}const it={continuation:{tokenize:d0},exit:h0,name:"list",tokenize:c0},a0={partial:!0,tokenize:m0},u0={partial:!0,tokenize:f0};function c0(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Ea(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(jl,n,d)(h):d(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return Ea(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),d(h)):n(h)}function d(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Oi,r.interrupt?n:c,e.attempt(a0,m,f))}function c(h){return r.containerState.initialBlankLine=!0,l++,m(h)}function f(h){return ue(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),m):n(h)}function m(h){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function d0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Oi,i,l);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,me(e,t,"listItemIndent",r.containerState.size+1)(o)}function l(o){return r.containerState.furtherBlankLines||!ue(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(u0,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,me(e,e.attempt(it,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function f0(e,t,n){const r=this;return me(e,i,"listItemIndent",r.containerState.size+1);function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(l):n(l)}}function h0(e){e.exit(this.containerState.type)}function m0(e,t,n){const r=this;return me(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const s=r.events[r.events.length-1];return!ue(l)&&s&&s[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const _d={name:"setextUnderline",resolveTo:p0,tokenize:g0};function p0(e,t){let n=e.length,r,i,l;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),!l&&e[n][1].type==="definition"&&(l=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",s,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function g0(e,t,n){const r=this;let i;return l;function l(d){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),o(d)}function o(d){return d===i?(e.consume(d),o):(e.exit("setextHeadingLineSequence"),ue(d)?me(e,u,"lineSuffix")(d):u(d))}function u(d){return d===null||K(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const y0={tokenize:x0};function x0(e){const t=this,n=e.attempt(Oi,r,e.attempt(this.parser.constructs.flowInitial,i,me(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Sk,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const v0={resolveAll:gp()},k0=pp("string"),w0=pp("text");function pp(e){return{resolveAll:gp(e==="text"?b0:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,s,o);return s;function s(c){return d(c)?l(c):o(c)}function o(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return d(c)?(n.exit("data"),l(c)):(n.consume(c),u)}function d(c){if(c===null)return!0;const f=i[c];let m=-1;if(f)for(;++m<f.length;){const h=f[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function gp(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function b0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let l=i.length,s=-1,o=0,u;for(;l--;){const d=i[l];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(d===-2)u=!0,o++;else if(d!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const d={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?s:r.start._bufferIndex+s,_index:r.start._index+l,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const S0={42:it,43:it,45:it,48:it,49:it,50:it,51:it,52:it,53:it,54:it,55:it,56:it,57:it,62:ap},C0={91:Tk},j0={[-2]:co,[-1]:co,32:co},N0={35:Lk,42:jl,45:[_d,jl],60:Ok,61:_d,95:jl,96:Rd,126:Rd},E0={38:cp,92:up},T0={[-5]:fo,[-4]:fo,[-3]:fo,33:n0,38:cp,42:Ta,60:[ik,Wk],91:i0,92:[Ak,up],93:Hu,95:Ta,96:yk},I0={null:[Ta,v0]},z0={null:[42,95]},P0={null:[]},A0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:z0,contentInitial:C0,disable:P0,document:S0,flow:N0,flowInitial:j0,insideSpan:I0,string:E0,text:T0},Symbol.toStringTag,{value:"Module"}));function M0(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let s=[],o=[];const u={attempt:A(z),check:A(E),consume:g,enter:v,exit:C,interrupt:A(E,{interrupt:!0})},d={code:null,containerState:{},defineSkip:x,events:[],now:p,parser:e,previous:null,sliceSerialize:m,sliceStream:h,write:f};let c=t.tokenize.call(d,u);return t.resolveAll&&l.push(t),d;function f(j){return s=St(s,j),b(),s[s.length-1]!==null?[]:(L(t,0),d.events=Ns(l,d.events,d),d.events)}function m(j,P){return R0(h(j),P)}function h(j){return L0(s,j)}function p(){const{_bufferIndex:j,_index:P,line:B,column:O,offset:W}=r;return{_bufferIndex:j,_index:P,line:B,column:O,offset:W}}function x(j){i[j.line]=j.column,k()}function b(){let j;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<P.length;)y(P.charCodeAt(r._bufferIndex));else y(P)}}function y(j){c=c(j)}function g(j){K(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,k()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=j}function v(j,P){const B=P||{};return B.type=j,B.start=p(),d.events.push(["enter",B,d]),o.push(B),B}function C(j){const P=o.pop();return P.end=p(),d.events.push(["exit",P,d]),P}function z(j,P){L(j,P.from)}function E(j,P){P.restore()}function A(j,P){return B;function B(O,W,de){let ee,R,V,S;return Array.isArray(O)?ie(O):"tokenize"in O?ie([O]):Y(O);function Y(oe){return Ne;function Ne(H){const te=H!==null&&oe[H],re=H!==null&&oe.null,Se=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(re)?re:re?[re]:[]];return ie(Se)(H)}}function ie(oe){return ee=oe,R=0,oe.length===0?de:N(oe[R])}function N(oe){return Ne;function Ne(H){return S=I(),V=oe,oe.partial||(d.currentConstruct=oe),oe.name&&d.parser.constructs.disable.null.includes(oe.name)?Le():oe.tokenize.call(P?Object.assign(Object.create(d),P):d,u,ge,Le)(H)}}function ge(oe){return j(V,S),W}function Le(oe){return S.restore(),++R<ee.length?N(ee[R]):de}}}function L(j,P){j.resolveAll&&!l.includes(j)&&l.push(j),j.resolve&>(d.events,P,d.events.length-P,j.resolve(d.events.slice(P),d)),j.resolveTo&&(d.events=j.resolveTo(d.events,d))}function I(){const j=p(),P=d.previous,B=d.currentConstruct,O=d.events.length,W=Array.from(o);return{from:O,restore:de};function de(){r=j,d.previous=P,d.currentConstruct=B,d.events.length=O,o=W,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function L0(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,l)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}l>0&&s.push(e[i].slice(0,l))}return s}function R0(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let s;if(typeof l=="string")s=l;else switch(l){case-5:{s="\r";break}case-4:{s=`
|
|
317
|
+
`;break}case-3:{s=`\r
|
|
318
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(l)}i=l===-2,r.push(s)}return r.join("")}function D0(e){const r={constructs:sp([A0,...(e||{}).extensions||[]]),content:i(Xv),defined:[],document:i(Jv),flow:i(y0),lazy:{},string:i(k0),text:i(w0)};return r;function i(l){return s;function s(o){return M0(r,l,o)}}}function _0(e){for(;!dp(e););return e}const Od=/[\0\t\n\r]/g;function O0(){let e=1,t="",n=!0,r;return i;function i(l,s,o){const u=[];let d,c,f,m,h;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(s||void 0).decode(l)),f=0,t="",n&&(l.charCodeAt(0)===65279&&f++,n=void 0);f<l.length;){if(Od.lastIndex=f,d=Od.exec(l),m=d&&d.index!==void 0?d.index:l.length,h=l.charCodeAt(m),!d){t=l.slice(f);break}if(h===10&&f===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<m&&(u.push(l.slice(f,m)),e+=m-f),h){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const F0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $0(e){return e.replace(F0,B0)}function B0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return op(n.slice(l?2:1),l?16:10)}return Uu(n)||e}const yp={}.hasOwnProperty;function U0(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),H0(n)(_0(D0(n).document().write(O0()(e,t,!0))))}function H0(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Ui),autolinkProtocol:I,autolinkEmail:I,atxHeading:l(er),blockQuote:l(re),characterEscape:I,characterReference:I,codeFenced:l(Se),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:l(Se,s),codeText:l(Ot,s),codeTextData:I,data:I,codeFlowValue:I,definition:l(ln),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:l(In),hardBreakEscape:l($i),hardBreakTrailing:l($i),htmlFlow:l(Bi,s),htmlFlowData:I,htmlText:l(Bi,s),htmlTextData:I,image:l(zs),label:s,link:l(Ui),listItem:l(Ps),listItemValue:m,listOrdered:l(Hi,f),listUnordered:l(Hi),paragraph:l(As),reference:N,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:l(er),strong:l(Ms),thematicBreak:l(Rs)},exit:{atxHeading:u(),atxHeadingSequence:z,autolink:u(),autolinkEmail:te,autolinkProtocol:H,blockQuote:u(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Le,characterReferenceMarkerNumeric:Le,characterReferenceValue:oe,characterReference:Ne,codeFenced:u(b),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:k,codeIndented:u(y),codeText:u(W),codeTextData:k,data:k,definition:u(),definitionDestinationString:C,definitionLabelString:g,definitionTitleString:v,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(B),htmlFlowData:k,htmlText:u(O),htmlTextData:k,image:u(ee),label:V,labelText:R,lineEnding:j,link:u(de),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ge,resourceDestinationString:S,resourceTitleString:Y,resource:ie,setextHeading:u(L),setextHeadingLineSequence:A,setextHeadingText:E,strong:u(),thematicBreak:u()}};xp(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(M){let T={type:"root",children:[]};const D={stack:[T],tokenStack:[],config:t,enter:o,exit:d,buffer:s,resume:c,data:n},_=[];let U=-1;for(;++U<M.length;)if(M[U][1].type==="listOrdered"||M[U][1].type==="listUnordered")if(M[U][0]==="enter")_.push(U);else{const G=_.pop();U=i(M,G,U)}for(U=-1;++U<M.length;){const G=t[M[U][0]];yp.call(G,M[U][1].type)&&G[M[U][1].type].call(Object.assign({sliceSerialize:M[U][2].sliceSerialize},D),M[U][1])}if(D.tokenStack.length>0){const G=D.tokenStack[D.tokenStack.length-1];(G[1]||Fd).call(D,void 0,G[0])}for(T.position={start:on(M.length>0?M[0][1].start:{line:1,column:1,offset:0}),end:on(M.length>0?M[M.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<t.transforms.length;)T=t.transforms[U](T)||T;return T}function i(M,T,D){let _=T-1,U=-1,G=!1,le,xe,we,X;for(;++_<=D;){const Z=M[_];switch(Z[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Z[0]==="enter"?U++:U--,X=void 0;break}case"lineEndingBlank":{Z[0]==="enter"&&(le&&!X&&!U&&!we&&(we=_),X=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:X=void 0}if(!U&&Z[0]==="enter"&&Z[1].type==="listItemPrefix"||U===-1&&Z[0]==="exit"&&(Z[1].type==="listUnordered"||Z[1].type==="listOrdered")){if(le){let fe=_;for(xe=void 0;fe--;){const he=M[fe];if(he[1].type==="lineEnding"||he[1].type==="lineEndingBlank"){if(he[0]==="exit")continue;xe&&(M[xe][1].type="lineEndingBlank",G=!0),he[1].type="lineEnding",xe=fe}else if(!(he[1].type==="linePrefix"||he[1].type==="blockQuotePrefix"||he[1].type==="blockQuotePrefixWhitespace"||he[1].type==="blockQuoteMarker"||he[1].type==="listItemIndent"))break}we&&(!xe||we<xe)&&(le._spread=!0),le.end=Object.assign({},xe?M[xe][1].start:Z[1].end),M.splice(xe||_,0,["exit",le,Z[2]]),_++,D++}if(Z[1].type==="listItemPrefix"){const fe={type:"listItem",_spread:!1,start:Object.assign({},Z[1].start),end:void 0};le=fe,M.splice(_,0,["enter",fe,Z[2]]),_++,D++,we=void 0,X=!0}}}return M[T][1]._spread=G,D}function l(M,T){return D;function D(_){o.call(this,M(_),_),T&&T.call(this,_)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(M,T,D){this.stack[this.stack.length-1].children.push(M),this.stack.push(M),this.tokenStack.push([T,D||void 0]),M.position={start:on(T.start),end:void 0}}function u(M){return T;function T(D){M&&M.call(this,D),d.call(this,D)}}function d(M,T){const D=this.stack.pop(),_=this.tokenStack.pop();if(_)_[0].type!==M.type&&(T?T.call(this,M,_[0]):(_[1]||Fd).call(this,M,_[0]));else throw new Error("Cannot close `"+M.type+"` ("+ci({start:M.start,end:M.end})+"): it’s not open");D.position.end=on(M.end)}function c(){return Bu(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(M){if(this.data.expectingFirstListItemValue){const T=this.stack[this.stack.length-2];T.start=Number.parseInt(this.sliceSerialize(M),10),this.data.expectingFirstListItemValue=void 0}}function h(){const M=this.resume(),T=this.stack[this.stack.length-1];T.lang=M}function p(){const M=this.resume(),T=this.stack[this.stack.length-1];T.meta=M}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const M=this.resume(),T=this.stack[this.stack.length-1];T.value=M.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const M=this.resume(),T=this.stack[this.stack.length-1];T.value=M.replace(/(\r?\n|\r)$/g,"")}function g(M){const T=this.resume(),D=this.stack[this.stack.length-1];D.label=T,D.identifier=Lt(this.sliceSerialize(M)).toLowerCase()}function v(){const M=this.resume(),T=this.stack[this.stack.length-1];T.title=M}function C(){const M=this.resume(),T=this.stack[this.stack.length-1];T.url=M}function z(M){const T=this.stack[this.stack.length-1];if(!T.depth){const D=this.sliceSerialize(M).length;T.depth=D}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function A(M){const T=this.stack[this.stack.length-1];T.depth=this.sliceSerialize(M).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function I(M){const D=this.stack[this.stack.length-1].children;let _=D[D.length-1];(!_||_.type!=="text")&&(_=Ls(),_.position={start:on(M.start),end:void 0},D.push(_)),this.stack.push(_)}function k(M){const T=this.stack.pop();T.value+=this.sliceSerialize(M),T.position.end=on(M.end)}function j(M){const T=this.stack[this.stack.length-1];if(this.data.atHardBreak){const D=T.children[T.children.length-1];D.position.end=on(M.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(T.type)&&(I.call(this,M),k.call(this,M))}function P(){this.data.atHardBreak=!0}function B(){const M=this.resume(),T=this.stack[this.stack.length-1];T.value=M}function O(){const M=this.resume(),T=this.stack[this.stack.length-1];T.value=M}function W(){const M=this.resume(),T=this.stack[this.stack.length-1];T.value=M}function de(){const M=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=T,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function ee(){const M=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=T,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function R(M){const T=this.sliceSerialize(M),D=this.stack[this.stack.length-2];D.label=$0(T),D.identifier=Lt(T).toLowerCase()}function V(){const M=this.stack[this.stack.length-1],T=this.resume(),D=this.stack[this.stack.length-1];if(this.data.inReference=!0,D.type==="link"){const _=M.children;D.children=_}else D.alt=T}function S(){const M=this.resume(),T=this.stack[this.stack.length-1];T.url=M}function Y(){const M=this.resume(),T=this.stack[this.stack.length-1];T.title=M}function ie(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function ge(M){const T=this.resume(),D=this.stack[this.stack.length-1];D.label=T,D.identifier=Lt(this.sliceSerialize(M)).toLowerCase(),this.data.referenceType="full"}function Le(M){this.data.characterReferenceType=M.type}function oe(M){const T=this.sliceSerialize(M),D=this.data.characterReferenceType;let _;D?(_=op(T,D==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_=Uu(T);const U=this.stack[this.stack.length-1];U.value+=_}function Ne(M){const T=this.stack.pop();T.position.end=on(M.end)}function H(M){k.call(this,M);const T=this.stack[this.stack.length-1];T.url=this.sliceSerialize(M)}function te(M){k.call(this,M);const T=this.stack[this.stack.length-1];T.url="mailto:"+this.sliceSerialize(M)}function re(){return{type:"blockquote",children:[]}}function Se(){return{type:"code",lang:null,meta:null,value:""}}function Ot(){return{type:"inlineCode",value:""}}function ln(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function In(){return{type:"emphasis",children:[]}}function er(){return{type:"heading",depth:0,children:[]}}function $i(){return{type:"break"}}function Bi(){return{type:"html",value:""}}function zs(){return{type:"image",title:null,url:"",alt:null}}function Ui(){return{type:"link",title:null,url:"",children:[]}}function Hi(M){return{type:"list",ordered:M.type==="listOrdered",start:null,spread:M._spread,children:[]}}function Ps(M){return{type:"listItem",spread:M._spread,checked:null,children:[]}}function As(){return{type:"paragraph",children:[]}}function Ms(){return{type:"strong",children:[]}}function Ls(){return{type:"text",value:""}}function Rs(){return{type:"thematicBreak"}}}function on(e){return{line:e.line,column:e.column,offset:e.offset}}function xp(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?xp(e,r):V0(e,r)}}function V0(e,t){let n;for(n in t)if(yp.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Fd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ci({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ci({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ci({start:t.start,end:t.end})+") is still open")}function W0(e){const t=this;t.parser=n;function n(r){return U0(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Q0(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function q0(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
319
|
+
`}]}function Y0(e,t){const n=t.value?t.value+`
|
|
320
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function K0(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function G0(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function X0(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Fr(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=l+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const d={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,d),e.applyData(t,d)}function Z0(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function J0(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function vp(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function ew(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vp(e,t);const i={src:Fr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function tw(e,t){const n={src:Fr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function nw(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function rw(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vp(e,t);const i={href:Fr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function iw(e,t){const n={href:Fr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lw(e,t,n){const r=e.all(t),i=n?sw(n):kp(t),l={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const c=r[o];(i||o!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
321
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
|
|
322
|
+
`});const d={type:"element",tagName:"li",properties:l,children:s};return e.patch(t,d),e.applyData(t,d)}function sw(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=kp(n[r])}return t}function kp(e){const t=e.spread;return t??e.children.length>1}function ow(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function aw(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uw(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function cw(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dw(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=_u(t.children[1]),u=Jm(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function fw(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const d=[];for(;++u<o;){const f=t.children[u],m={},h=s?s[u]:void 0;h&&(m.align=h);let p={type:"element",tagName:l,properties:m,children:[]};f&&(p.children=e.all(f),e.patch(f,p),p=e.applyData(f,p)),d.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,c),e.applyData(t,c)}function hw(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const $d=9,Bd=32;function mw(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(Ud(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(Ud(t.slice(i),i>0,!1)),l.join("")}function Ud(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===$d||l===Bd;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===$d||l===Bd;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function pw(e,t){const n={type:"text",value:mw(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function gw(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const yw={blockquote:Q0,break:q0,code:Y0,delete:K0,emphasis:G0,footnoteReference:X0,heading:Z0,html:J0,imageReference:ew,image:tw,inlineCode:nw,linkReference:rw,link:iw,listItem:lw,list:ow,paragraph:aw,root:uw,strong:cw,table:dw,tableCell:hw,tableRow:fw,text:pw,thematicBreak:gw,toml:ol,yaml:ol,definition:ol,footnoteDefinition:ol};function ol(){}const wp=-1,Es=0,fi=1,rs=2,Vu=3,Wu=4,Qu=5,qu=6,bp=7,Sp=8,xw=typeof self=="object"?self:globalThis,Hd=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new xw[e](t)},vw=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,s]=t[i];switch(l){case Es:case wp:return n(s,i);case fi:{const o=n([],i);for(const u of s)o.push(r(u));return o}case rs:{const o=n({},i);for(const[u,d]of s)o[r(u)]=r(d);return o}case Vu:return n(new Date(s),i);case Wu:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case Qu:{const o=n(new Map,i);for(const[u,d]of s)o.set(r(u),r(d));return o}case qu:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case bp:{const{name:o,message:u}=s;return n(Hd(o,u),i)}case Sp:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(Hd(l,s),i)};return r},Vd=e=>vw(new Map,e)(0),Mn="",{toString:kw}={},{keys:ww}=Object,Kr=e=>{const t=typeof e;if(t!=="object"||!e)return[Es,t];const n=kw.call(e).slice(8,-1);switch(n){case"Array":return[fi,Mn];case"Object":return[rs,Mn];case"Date":return[Vu,Mn];case"RegExp":return[Wu,Mn];case"Map":return[Qu,Mn];case"Set":return[qu,Mn];case"DataView":return[fi,n]}return n.includes("Array")?[fi,n]:n.includes("Error")?[bp,n]:[rs,n]},al=([e,t])=>e===Es&&(t==="function"||t==="symbol"),bw=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},l=s=>{if(n.has(s))return n.get(s);let[o,u]=Kr(s);switch(o){case Es:{let c=s;switch(u){case"bigint":o=Sp,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([wp],s)}return i([o,c],s)}case fi:{if(u){let m=s;return u==="DataView"?m=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(s)),i([u,[...m]],s)}const c=[],f=i([o,c],s);for(const m of s)c.push(l(m));return f}case rs:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return l(s.toJSON());const c=[],f=i([o,c],s);for(const m of ww(s))(e||!al(Kr(s[m])))&&c.push([l(m),l(s[m])]);return f}case Vu:return i([o,isNaN(s.getTime())?Mn:s.toISOString()],s);case Wu:{const{source:c,flags:f}=s;return i([o,{source:c,flags:f}],s)}case Qu:{const c=[],f=i([o,c],s);for(const[m,h]of s)(e||!(al(Kr(m))||al(Kr(h))))&&c.push([l(m),l(h)]);return f}case qu:{const c=[],f=i([o,c],s);for(const m of s)(e||!al(Kr(m)))&&c.push(l(m));return f}}const{message:d}=s;return i([o,{name:u,message:d}],s)};return l},Wd=(e,{json:t,lossy:n}={})=>{const r=[];return bw(!(t||n),!!t,new Map,r)(e),r},is=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Vd(Wd(e,t)):structuredClone(e):(e,t)=>Vd(Wd(e,t));function Sw(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Cw(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function jw(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Sw,r=e.options.footnoteBackLabel||Cw,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[u]);if(!d)continue;const c=e.all(d),f=String(d.identifier).toUpperCase(),m=Fr(f.toLowerCase());let h=0;const p=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++h<=x;){p.length>0&&p.push({type:"text",value:" "});let g=typeof n=="string"?n:n(u,h);typeof g=="string"&&(g={type:"text",value:g}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const b=c[c.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const g=b.children[b.children.length-1];g&&g.type==="text"?g.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...p)}else c.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(c,!0)};e.patch(d,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...is(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
323
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
324
|
+
`}]}}const Ts=function(e){if(e==null)return Iw;if(typeof e=="function")return Is(e);if(typeof e=="object")return Array.isArray(e)?Nw(e):Ew(e);if(typeof e=="string")return Tw(e);throw new Error("Expected function, string, or object as test")};function Nw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ts(e[n]);return Is(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function Ew(e){const t=e;return Is(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function Tw(e){return Is(t);function t(n){return n&&n.type===e}}function Is(e){return t;function t(n,r,i){return!!(zw(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Iw(){return!0}function zw(e){return e!==null&&typeof e=="object"&&"type"in e}const Cp=[],Pw=!0,Ia=!1,Aw="skip";function jp(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=Ts(i),s=r?-1:1;o(e,void 0,[])();function o(u,d,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return m;function m(){let h=Cp,p,x,b;if((!t||l(u,d,c[c.length-1]||void 0))&&(h=Mw(n(u,c)),h[0]===Ia))return h;if("children"in u&&u.children){const y=u;if(y.children&&h[0]!==Aw)for(x=(r?y.children.length:-1)+s,b=c.concat(y);x>-1&&x<y.children.length;){const g=y.children[x];if(p=o(g,x,b)(),p[0]===Ia)return p;x=typeof p[1]=="number"?p[1]:x+s}}return h}}}function Mw(e){return Array.isArray(e)?e:typeof e=="number"?[Pw,e]:e==null?Cp:[e]}function Yu(e,t,n,r){let i,l,s;typeof t=="function"&&typeof n!="function"?(l=void 0,s=t,i=n):(l=t,s=n,i=r),jp(e,l,o,i);function o(u,d){const c=d[d.length-1],f=c?c.children.indexOf(u):void 0;return s(u,f,c)}}const za={}.hasOwnProperty,Lw={};function Rw(e,t){const n=t||Lw,r=new Map,i=new Map,l=new Map,s={...yw,...n.handlers},o={all:d,applyData:_w,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:s,one:u,options:n,patch:Dw,wrap:Fw};return Yu(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,m=String(c.identifier).toUpperCase();f.has(m)||f.set(m,c)}}),o;function u(c,f){const m=c.type,h=o.handlers[m];if(za.call(o.handlers,m)&&h)return h(o,c,f);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in c){const{children:x,...b}=c,y=is(b);return y.children=o.all(c),y}return is(c)}return(o.options.unknownHandler||Ow)(o,c,f)}function d(c){const f=[];if("children"in c){const m=c.children;let h=-1;for(;++h<m.length;){const p=o.one(m[h],c);if(p){if(h&&m[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=Qd(p.value)),!Array.isArray(p)&&p.type==="element")){const x=p.children[0];x&&x.type==="text"&&(x.value=Qd(x.value))}Array.isArray(p)?f.push(...p):f.push(p)}}}return f}}function Dw(e,t){e.position&&(t.position=Sv(e))}function _w(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&l&&Object.assign(n.properties,is(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Ow(e,t){const n=t.data||{},r="value"in t&&!(za.call(n,"hProperties")||za.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 Fw(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
325
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
326
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
327
|
+
`}),n}function Qd(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qd(e,t){const n=Rw(e,t),r=n.one(e,void 0),i=jw(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
328
|
+
`},i),l}function $w(e,t){return e&&"run"in e?async function(n,r){const i=qd(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qd(n,{file:r,...e||t})}}function Yd(e){if(e)throw e}var Nl=Object.prototype.hasOwnProperty,Np=Object.prototype.toString,Kd=Object.defineProperty,Gd=Object.getOwnPropertyDescriptor,Xd=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Np.call(t)==="[object Array]"},Zd=function(t){if(!t||Np.call(t)!=="[object Object]")return!1;var n=Nl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Nl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Nl.call(t,i)},Jd=function(t,n){Kd&&n.name==="__proto__"?Kd(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},ef=function(t,n){if(n==="__proto__")if(Nl.call(t,n)){if(Gd)return Gd(t,n).value}else return;return t[n]},Bw=function e(){var t,n,r,i,l,s,o=arguments[0],u=1,d=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},u=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});u<d;++u)if(t=arguments[u],t!=null)for(n in t)r=ef(o,n),i=ef(t,n),o!==i&&(c&&i&&(Zd(i)||(l=Xd(i)))?(l?(l=!1,s=r&&Xd(r)?r:[]):s=r&&Zd(r)?r:{},Jd(o,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&Jd(o,{name:n,newValue:i}));return o};const ho=Da(Bw);function Pa(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Uw(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...d){const c=e[++l];let f=-1;if(u){s(u);return}for(;++f<i.length;)(d[f]===null||d[f]===void 0)&&(d[f]=i[f]);i=d,c?Hw(c,o)(...d):s(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Hw(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(d){const c=d;if(o&&n)throw c;return i(c)}o||(u&&u.then&&typeof u.then=="function"?u.then(l,i):u instanceof Error?i(u):l(u))}function i(s,...o){n||(n=!0,t(s,...o))}function l(s){i(null,s)}}const Bt={basename:Vw,dirname:Ww,extname:Qw,join:qw,sep:"/"};function Vw(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fi(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else s<0&&(l=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Ww(e){if(Fi(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||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Qw(e){Fi(e);let t=e.length,n=-1,r=0,i=-1,l=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function qw(...e){let t=-1,n;for(;++t<e.length;)Fi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Yw(n)}function Yw(e){Fi(e);const t=e.codePointAt(0)===47;let n=Kw(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Kw(e,t){let n="",r=0,i=-1,l=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||l===1))if(i!==s-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,l=0;continue}}else if(n.length>0){n="",r=0,i=s,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,l=0}else o===46&&l>-1?l++:l=-1}return n}function Fi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Gw={cwd:Xw};function Xw(){return"/"}function Aa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Zw(e){if(typeof e=="string")e=new URL(e);else if(!Aa(e)){const t=new 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:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Jw(e)}function Jw(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const mo=["history","path","basename","stem","extname","dirname"];class Ep{constructor(t){let n;t?Aa(t)?n={path:t}:typeof t=="string"||eb(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Gw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<mo.length;){const l=mo[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)mo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Bt.basename(this.path):void 0}set basename(t){go(t,"basename"),po(t,"basename"),this.path=Bt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Bt.dirname(this.path):void 0}set dirname(t){tf(this.basename,"dirname"),this.path=Bt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Bt.extname(this.path):void 0}set extname(t){if(po(t,"extname"),tf(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Bt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Aa(t)&&(t=Zw(t)),go(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Bt.basename(this.path,this.extname):void 0}set stem(t){go(t,"stem"),po(t,"stem"),this.path=Bt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ge(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function po(e,t){if(e&&e.includes(Bt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Bt.sep+"`")}function go(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function tf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function eb(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tb=function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l},nb={}.hasOwnProperty;class Ku extends tb{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=Uw()}copy(){const t=new Ku;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ho(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(vo("data",this.frozen),this.namespace[t]=n,this):nb.call(this.namespace,t)&&this.namespace[t]||void 0:t?(vo("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ul(t),r=this.parser||this.Parser;return yo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),yo("process",this.parser||this.Parser),xo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,s){const o=ul(t),u=r.parse(o);r.run(u,o,function(c,f,m){if(c||!f||!m)return d(c);const h=f,p=r.stringify(h,m);lb(p)?m.value=p:m.result=p,d(c,m)});function d(c,f){c||!f?s(c):l?l(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),yo("processSync",this.parser||this.Parser),xo("processSync",this.compiler||this.Compiler),this.process(t,i),rf("processSync","process",n),r;function i(l,s){n=!0,Yd(l),r=s}}run(t,n,r){nf(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(s,o){const u=ul(n);i.run(t,u,d);function d(c,f,m){const h=f||t;c?o(c):s?s(h):r(void 0,h,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),rf("runSync","run",r),i;function l(s,o){Yd(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=ul(n),i=this.compiler||this.Compiler;return xo("stringify",i),nf(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(vo("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(d){if(typeof d=="function")u(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[c,...f]=d;u(c,f)}else s(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function s(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(d.plugins),d.settings&&(i.settings=ho(!0,i.settings,d.settings))}function o(d){let c=-1;if(d!=null)if(Array.isArray(d))for(;++c<d.length;){const f=d[c];l(f)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function u(d,c){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===d){m=f;break}if(m===-1)r.push([d,...c]);else if(c.length>0){let[h,...p]=c;const x=r[m][1];Pa(x)&&Pa(h)&&(h=ho(!0,x,h)),r[m]=[d,h,...p]}}}}const rb=new Ku().freeze();function yo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function vo(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nf(e){if(!Pa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function rf(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ul(e){return ib(e)?e:new Ep(e)}function ib(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function lb(e){return typeof e=="string"||sb(e)}function sb(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ob="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",lf=[],sf={allowDangerousHtml:!0},ab=/^(https?|ircs?|mailto|xmpp)$/i,ub=[{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:"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 cb(e){const t=db(e),n=fb(e);return hb(t.runSync(t.parse(n),n),e)}function db(e){const t=e.rehypePlugins||lf,n=e.remarkPlugins||lf,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...sf}:sf;return rb().use(W0).use(n).use($w,r).use(t)}function fb(e){const t=e.children||"",n=new Ep;return typeof t=="string"&&(n.value=t),n}function hb(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,u=t.urlTransform||mb;for(const c of ub)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+ob+c.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Yu(e,d),Tv(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function d(c,f,m){if(c.type==="raw"&&m&&typeof f=="number")return s?m.children.splice(f,1):m.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let h;for(h in uo)if(Object.hasOwn(uo,h)&&Object.hasOwn(c.properties,h)){const p=c.properties[h],x=uo[h];(x===null||x.includes(c.tagName))&&(c.properties[h]=u(String(p||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):l?l.includes(c.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(c,f,m)),h&&m&&typeof f=="number")return o&&c.children?m.children.splice(f,1,...c.children):m.children.splice(f,1),f}}}function mb(e){const 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||ab.test(e.slice(0,t))?e:""}function of(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function pb(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function gb(e,t,n){const i=Ts((n||{}).ignore||[]),l=yb(t);let s=-1;for(;++s<l.length;)jp(e,"text",o);function o(d,c){let f=-1,m;for(;++f<c.length;){const h=c[f],p=m?m.children:void 0;if(i(h,p?p.indexOf(h):void 0,m))return;m=h}if(m)return u(d,c)}function u(d,c){const f=c[c.length-1],m=l[s][0],h=l[s][1];let p=0;const b=f.children.indexOf(d);let y=!1,g=[];m.lastIndex=0;let v=m.exec(d.value);for(;v;){const C=v.index,z={index:v.index,input:v.input,stack:[...c,d]};let E=h(...v,z);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?m.lastIndex=C+1:(p!==C&&g.push({type:"text",value:d.value.slice(p,C)}),Array.isArray(E)?g.push(...E):E&&g.push(E),p=C+v[0].length,y=!0),!m.global)break;v=m.exec(d.value)}return y?(p<d.value.length&&g.push({type:"text",value:d.value.slice(p)}),f.children.splice(b,1,...g)):g=[d],b+g.length}}function yb(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([xb(i[0]),vb(i[1])])}return t}function xb(e){return typeof e=="string"?new RegExp(pb(e),"g"):e}function vb(e){return typeof e=="function"?e:function(){return e}}const ko="phrasing",wo=["autolink","link","image","label"];function kb(){return{transforms:[Eb],enter:{literalAutolink:bb,literalAutolinkEmail:bo,literalAutolinkHttp:bo,literalAutolinkWww:bo},exit:{literalAutolink:Nb,literalAutolinkEmail:jb,literalAutolinkHttp:Sb,literalAutolinkWww:Cb}}}function wb(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ko,notInConstruct:wo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ko,notInConstruct:wo},{character:":",before:"[ps]",after:"\\/",inConstruct:ko,notInConstruct:wo}]}}function bb(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bo(e){this.config.enter.autolinkProtocol.call(this,e)}function Sb(e){this.config.exit.autolinkProtocol.call(this,e)}function Cb(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function jb(e){this.config.exit.autolinkEmail.call(this,e)}function Nb(e){this.exit(e)}function Eb(e){gb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Tb],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ib]],{ignore:["link","linkReference"]})}function Tb(e,t,n,r,i){let l="";if(!Tp(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!zb(n)))return!1;const s=Pb(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:l+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function Ib(e,t,n,r){return!Tp(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function zb(e){const 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 Pb(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=of(e,"(");let l=of(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function Tp(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yn(n)||js(n))&&(!t||n!==47)}Ip.peek=$b;function Ab(){this.buffer()}function Mb(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Lb(){this.buffer()}function Rb(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Db(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _b(e){this.exit(e)}function Ob(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Fb(e){this.exit(e)}function $b(){return"["}function Ip(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),o(),s(),l+=i.move("]"),l}function Bb(){return{enter:{gfmFootnoteCallString:Ab,gfmFootnoteCall:Mb,gfmFootnoteDefinitionLabelString:Lb,gfmFootnoteDefinition:Rb},exit:{gfmFootnoteCallString:Db,gfmFootnoteCall:_b,gfmFootnoteDefinitionLabelString:Ob,gfmFootnoteDefinition:Fb}}}function Ub(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ip},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,s){const o=l.createTracker(s);let u=o.move("[^");const d=l.enter("footnoteDefinition"),c=l.enter("label");return u+=o.move(l.safe(l.associationId(r),{before:u,after:"]"})),c(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
|
|
329
|
+
`:" ")+l.indentLines(l.containerFlow(r,o.current()),t?zp:Hb))),d(),u}}function Hb(e,t,n){return t===0?e:zp(e,t,n)}function zp(e,t,n){return(n?"":" ")+e}const Vb=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Pp.peek=Kb;function Wb(){return{canContainEols:["delete"],enter:{strikethrough:qb},exit:{strikethrough:Yb}}}function Qb(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Vb}],handlers:{delete:Pp}}}function qb(e){this.enter({type:"delete",children:[]},e)}function Yb(e){this.exit(e)}function Pp(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),l(),s}function Kb(){return"~"}function Gb(e){return e.length}function Xb(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Gb,l=[],s=[],o=[],u=[];let d=0,c=-1;for(;++c<e.length;){const x=[],b=[];let y=-1;for(e[c].length>d&&(d=e[c].length);++y<e[c].length;){const g=Zb(e[c][y]);if(n.alignDelimiters!==!1){const v=i(g);b[y]=v,(u[y]===void 0||v>u[y])&&(u[y]=v)}x.push(g)}s[c]=x,o[c]=b}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<d;)l[f]=af(r[f]);else{const x=af(r);for(;++f<d;)l[f]=x}f=-1;const m=[],h=[];for(;++f<d;){const x=l[f];let b="",y="";x===99?(b=":",y=":"):x===108?b=":":x===114&&(y=":");let g=n.alignDelimiters===!1?1:Math.max(1,u[f]-b.length-y.length);const v=b+"-".repeat(g)+y;n.alignDelimiters!==!1&&(g=b.length+g+y.length,g>u[f]&&(u[f]=g),h[f]=g),m[f]=v}s.splice(1,0,m),o.splice(1,0,h),c=-1;const p=[];for(;++c<s.length;){const x=s[c],b=o[c];f=-1;const y=[];for(;++f<d;){const g=x[f]||"";let v="",C="";if(n.alignDelimiters!==!1){const z=u[f]-(b[f]||0),E=l[f];E===114?v=" ".repeat(z):E===99?z%2?(v=" ".repeat(z/2+.5),C=" ".repeat(z/2-.5)):(v=" ".repeat(z/2),C=v):C=" ".repeat(z)}n.delimiterStart!==!1&&!f&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||f)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(g),n.alignDelimiters!==!1&&y.push(C),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||f!==d-1)&&y.push("|")}p.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(`
|
|
330
|
+
`)}function Zb(e){return e==null?"":String(e)}function af(e){const 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 Jb(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const s=n.indentLines(n.containerFlow(e,l.current()),eS);return i(),s}function eS(e,t,n){return">"+(n?"":" ")+e}function tS(e,t){return uf(e,t.inConstruct,!0)&&!uf(e,t.notInConstruct,!1)}function uf(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 cf(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
331
|
+
`&&tS(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
332
|
+
`}function nS(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>s&&(s=l):l=1,i=r+t.length,r=n.indexOf(t,i);return s}function rS(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 iS(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function lS(e,t,n,r){const i=iS(n),l=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(rS(e,n)){const f=n.enter("codeIndented"),m=n.indentLines(l,sS);return f(),m}const o=n.createTracker(r),u=i.repeat(Math.max(nS(l,i)+1,3)),d=n.enter("codeFenced");let c=o.move(u);if(e.lang){const f=n.enter(`codeFencedLang${s}`);c+=o.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);c+=o.move(" "),c+=o.move(n.safe(e.meta,{before:c,after:`
|
|
333
|
+
`,encode:["`"],...o.current()})),f()}return c+=o.move(`
|
|
334
|
+
`),l&&(c+=o.move(l+`
|
|
335
|
+
`)),c+=o.move(u),d(),c}function sS(e,t,n){return(n?"":" ")+e}function Gu(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function oS(e,t,n,r){const i=Gu(n),l=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let d=u.move("[");return d+=u.move(n.safe(n.associationId(e),{before:d,after:"]",...u.current()})),d+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),d+=u.move("<"),d+=u.move(n.safe(e.url,{before:d,after:">",...u.current()})),d+=u.move(">")):(o=n.enter("destinationRaw"),d+=u.move(n.safe(e.url,{before:d,after:e.title?" ":`
|
|
336
|
+
`,...u.current()}))),o(),e.title&&(o=n.enter(`title${l}`),d+=u.move(" "+i),d+=u.move(n.safe(e.title,{before:d,after:i,...u.current()})),d+=u.move(i),o()),s(),d}function aS(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Pi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ls(e,t,n){const r=Ar(e),i=Ar(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}}Ap.peek=uS;function Ap(e,t,n,r){const i=aS(n),l=n.enter("emphasis"),s=n.createTracker(r),o=s.move(i);let u=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const d=u.charCodeAt(0),c=ls(r.before.charCodeAt(r.before.length-1),d,i);c.inside&&(u=Pi(d)+u.slice(1));const f=u.charCodeAt(u.length-1),m=ls(r.after.charCodeAt(0),f,i);m.inside&&(u=u.slice(0,-1)+Pi(f));const h=s.move(i);return l(),n.attentionEncodeSurroundingInfo={after:m.outside,before:c.outside},o+u+h}function uS(e,t,n){return n.options.emphasis||"*"}function cS(e,t){let n=!1;return Yu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ia}),!!((!e.depth||e.depth<3)&&Bu(e)&&(t.options.setext||n))}function dS(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(cS(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),m=n.containerPhrasing(e,{...l.current(),before:`
|
|
337
|
+
`,after:`
|
|
338
|
+
`});return f(),c(),m+`
|
|
339
|
+
`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
|
|
340
|
+
`))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");l.move(s+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
|
|
341
|
+
`,...l.current()});return/^[\t ]/.test(d)&&(d=Pi(d.charCodeAt(0))+d.slice(1)),d=d?s+" "+d:s,n.options.closeAtx&&(d+=" "+s),u(),o(),d}Mp.peek=fS;function Mp(e){return e.value||""}function fS(){return"<"}Lp.peek=hS;function Lp(e,t,n,r){const i=Gu(n),l=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let d=u.move("![");return d+=u.move(n.safe(e.alt,{before:d,after:"]",...u.current()})),d+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),d+=u.move("<"),d+=u.move(n.safe(e.url,{before:d,after:">",...u.current()})),d+=u.move(">")):(o=n.enter("destinationRaw"),d+=u.move(n.safe(e.url,{before:d,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${l}`),d+=u.move(" "+i),d+=u.move(n.safe(e.title,{before:d,after:i,...u.current()})),d+=u.move(i),o()),d+=u.move(")"),s(),d}function hS(){return"!"}Rp.peek=mS;function Rp(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const d=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(d+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=c,l(),i==="full"||!d||d!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function mS(){return"!"}Dp.peek=pS;function Dp(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const s=n.unsafe[l],o=n.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let d=u.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(u.index+1)}}return i+r+i}function pS(){return"`"}function _p(e,t){const n=Bu(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))}Op.peek=gS;function Op(e,t,n,r){const i=Gu(n),l=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,u;if(_p(e,n)){const c=n.stack;n.stack=[],o=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),o(),n.stack=c,f}o=n.enter("link"),u=n.enter("label");let d=s.move("[");return d+=s.move(n.containerPhrasing(e,{before:d,after:"](",...s.current()})),d+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=s.move("<"),d+=s.move(n.safe(e.url,{before:d,after:">",...s.current()})),d+=s.move(">")):(u=n.enter("destinationRaw"),d+=s.move(n.safe(e.url,{before:d,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${l}`),d+=s.move(" "+i),d+=s.move(n.safe(e.title,{before:d,after:i,...s.current()})),d+=s.move(i),u()),d+=s.move(")"),o(),d}function gS(e,t,n){return _p(e,n)?"<":"["}Fp.peek=yS;function Fp(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const d=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(d+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=c,l(),i==="full"||!d||d!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function yS(){return"["}function Xu(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function xS(e){const t=Xu(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function vS(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function $p(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function kS(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let s=e.ordered?vS(n):Xu(n);const o=e.ordered?s==="."?")":".":xS(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.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&&(u=!0),$p(n)===s&&c){let f=-1;for(;++f<e.children.length;){const m=e.children[f];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const d=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=l,i(),d}function wS(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function bS(e,t,n,r){const i=wS(n);let l=n.bulletCurrent||Xu(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let s=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(l+" ".repeat(s-l.length)),o.shift(s);const u=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,o.current()),c);return u(),d;function c(f,m,h){return m?(h?"":" ".repeat(s))+f:(h?l:l+" ".repeat(s-l.length))+f}}function SS(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),s=n.containerPhrasing(e,r);return l(),i(),s}const CS=Ts(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function jS(e,t,n,r){return(e.children.some(function(s){return CS(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function NS(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Bp.peek=ES;function Bp(e,t,n,r){const i=NS(n),l=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let u=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const d=u.charCodeAt(0),c=ls(r.before.charCodeAt(r.before.length-1),d,i);c.inside&&(u=Pi(d)+u.slice(1));const f=u.charCodeAt(u.length-1),m=ls(r.after.charCodeAt(0),f,i);m.inside&&(u=u.slice(0,-1)+Pi(f));const h=s.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:m.outside,before:c.outside},o+u+h}function ES(e,t,n){return n.options.strong||"*"}function TS(e,t,n,r){return n.safe(e.value,r)}function IS(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function zS(e,t,n){const r=($p(n)+(n.options.ruleSpaces?" ":"")).repeat(IS(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Up={blockquote:Jb,break:cf,code:lS,definition:oS,emphasis:Ap,hardBreak:cf,heading:dS,html:Mp,image:Lp,imageReference:Rp,inlineCode:Dp,link:Op,linkReference:Fp,list:kS,listItem:bS,paragraph:SS,root:jS,strong:Bp,text:TS,thematicBreak:zS};function PS(){return{enter:{table:AS,tableData:df,tableHeader:df,tableRow:LS},exit:{codeText:RS,table:MS,tableData:So,tableHeader:So,tableRow:So}}}function AS(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function MS(e){this.exit(e),this.data.inTable=void 0}function LS(e){this.enter({type:"tableRow",children:[]},e)}function So(e){this.exit(e)}function df(e){this.enter({type:"tableCell",children:[]},e)}function RS(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,DS));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function DS(e,t){return t==="|"?t:e}function _S(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
342
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:s,tableCell:u,tableRow:o}};function s(h,p,x,b){return d(c(h,x,b),h.align)}function o(h,p,x,b){const y=f(h,x,b),g=d([y]);return g.slice(0,g.indexOf(`
|
|
343
|
+
`))}function u(h,p,x,b){const y=x.enter("tableCell"),g=x.enter("phrasing"),v=x.containerPhrasing(h,{...b,before:l,after:l});return g(),y(),v}function d(h,p){return Xb(h,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function c(h,p,x){const b=h.children;let y=-1;const g=[],v=p.enter("table");for(;++y<b.length;)g[y]=f(b[y],p,x);return v(),g}function f(h,p,x){const b=h.children;let y=-1;const g=[],v=p.enter("tableRow");for(;++y<b.length;)g[y]=u(b[y],h,p,x);return v(),g}function m(h,p,x){let b=Up.inlineCode(h,p,x);return x.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function OS(){return{exit:{taskListCheckValueChecked:ff,taskListCheckValueUnchecked:ff,paragraph:$S}}}function FS(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:BS}}}function ff(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function $S(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,s;for(;++l<i.length;){const o=i[l];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function BS(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);l&&o.move(s);let u=Up.listItem(e,t,n,{...r,...o.current()});return l&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),u;function d(c){return c+s}}function US(){return[kb(),Bb(),Wb(),PS(),OS()]}function HS(e){return{extensions:[wb(),Ub(e),Qb(),_S(e),FS()]}}const VS={tokenize:GS,partial:!0},Hp={tokenize:XS,partial:!0},Vp={tokenize:ZS,partial:!0},Wp={tokenize:JS,partial:!0},WS={tokenize:e2,partial:!0},Qp={name:"wwwAutolink",tokenize:YS,previous:Yp},qp={name:"protocolAutolink",tokenize:KS,previous:Kp},rn={name:"emailAutolink",tokenize:qS,previous:Gp},Wt={};function QS(){return{text:Wt}}let zn=48;for(;zn<123;)Wt[zn]=rn,zn++,zn===58?zn=65:zn===91&&(zn=97);Wt[43]=rn;Wt[45]=rn;Wt[46]=rn;Wt[95]=rn;Wt[72]=[rn,qp];Wt[104]=[rn,qp];Wt[87]=[rn,Qp];Wt[119]=[rn,Qp];function qS(e,t,n){const r=this;let i,l;return s;function s(f){return!Ma(f)||!Gp.call(r,r.previous)||Zu(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return Ma(f)?(e.consume(f),o):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(WS,c,d)(f):f===45||f===95||Ye(f)?(l=!0,e.consume(f),u):c(f)}function d(f){return e.consume(f),i=!0,u}function c(f){return l&&i&&Ze(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function YS(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Yp.call(r,r.previous)||Zu(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(VS,e.attempt(Hp,e.attempt(Vp,l),n),n)(s))}function l(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function KS(e,t,n){const r=this;let i="",l=!1;return s;function s(f){return(f===72||f===104)&&Kp.call(r,r.previous)&&!Zu(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(Ze(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),l?d:(l=!0,u)):n(f)}function d(f){return f===null||ns(f)||ke(f)||Yn(f)||js(f)?n(f):e.attempt(Hp,e.attempt(Vp,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function GS(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),l):n(s)}function l(s){return s===null?n(s):t(s)}}function XS(e,t,n){let r,i,l;return s;function s(d){return d===46||d===95?e.check(Wp,u,o)(d):d===null||ke(d)||Yn(d)||d!==45&&js(d)?u(d):(l=!0,e.consume(d),s)}function o(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),s}function u(d){return i||r||!l?n(d):t(d)}}function ZS(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?l(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Wp,t,l)(s):s===null||ke(s)||Yn(s)?t(s):(e.consume(s),i)}function l(s){return s===41&&r++,e.consume(s),i}}function JS(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),l):o===93?(e.consume(o),i):o===60||o===null||ke(o)||Yn(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||ke(o)||Yn(o)?t(o):r(o)}function l(o){return Ze(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):Ze(o)?(e.consume(o),s):n(o)}}function e2(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return Ye(l)?n(l):t(l)}}function Yp(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ke(e)}function Kp(e){return!Ze(e)}function Gp(e){return!(e===47||Ma(e))}function Ma(e){return e===43||e===45||e===46||e===95||Ye(e)}function Zu(e){let t=e.length,n=!1;for(;t--;){const 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}const t2={tokenize:u2,partial:!0};function n2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:s2,continuation:{tokenize:o2},exit:a2}},text:{91:{name:"gfmFootnoteCall",tokenize:l2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:r2,resolveTo:i2}}}}function r2(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const d=Lt(r.sliceSerialize({start:s.end,end:r.now()}));return d.codePointAt(0)!==94||!l.includes(d.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function i2(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";const 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++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",s,t],["exit",s,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function l2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(f){if(l>999||f===93&&!s||f===null||f===91||ke(f))return n(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Lt(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return ke(f)||(s=!0),l++,e.consume(f),f===92?c:d}function c(f){return f===91||f===92||f===93?(e.consume(f),l++,d):d(f)}}function s2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,s=0,o;return u;function u(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(p)}function c(p){if(s>999||p===93&&!o||p===null||p===91||ke(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return l=Lt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return ke(p)||(o=!0),s++,e.consume(p),p===92?f:c}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}function m(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(l)||i.push(l),me(e,h,"gfmFootnoteDefinitionWhitespace")):n(p)}function h(p){return t(p)}}function o2(e,t,n){return e.check(Oi,t,e.attempt(t2,t,n))}function a2(e){e.exit("gfmFootnoteDefinition")}function u2(e,t,n){const r=this;return me(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(l):n(l)}}function c2(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let d=u;for(;d--;)if(s[d][0]==="exit"&&s[d][1].type==="strikethroughSequenceTemporary"&&s[d][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[d][1].end.offset-s[d][1].start.offset){s[u][1].type="strikethroughSequence",s[d][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[d][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[d][1].end),end:Object.assign({},s[u][1].start)},m=[["enter",c,o],["enter",s[d][1],o],["exit",s[d][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&>(m,m.length,0,Ns(h,s.slice(d+1,u),o)),gt(m,m.length,0,[["exit",f,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",c,o]]),gt(s,d-1,u-d+3,m),u=d+m.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function l(s,o,u){const d=this.previous,c=this.events;let f=0;return m;function m(p){return d===126&&c[c.length-1][1].type!=="characterEscape"?u(p):(s.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const x=Ar(d);if(p===126)return f>1?u(p):(s.consume(p),f++,h);if(f<2&&!n)return u(p);const b=s.exit("strikethroughSequenceTemporary"),y=Ar(p);return b._open=!y||y===2&&!!x,b._close=!x||x===2&&!!y,o(p)}}}class d2{constructor(){this.map=[]}add(t,n,r){f2(this,t,n,r)}consume(t){if(this.map.sort(function(l,s){return l[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function f2(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 h2(e,t){let n=!1;const r=[];for(;t<e.length;){const 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"){const l=r.length-1;r[l]=r[l]==="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 m2(){return{flow:{null:{name:"table",tokenize:p2,resolveAll:g2}}}}function p2(e,t,n){const r=this;let i=0,l=0,s;return o;function o(k){let j=r.events.length-1;for(;j>-1;){const O=r.events[j][1].type;if(O==="lineEnding"||O==="linePrefix")j--;else break}const P=j>-1?r.events[j][1].type:null,B=P==="tableHead"||P==="tableRow"?E:u;return B===E&&r.parser.lazy[r.now().line]?n(k):B(k)}function u(k){return e.enter("tableHead"),e.enter("tableRow"),d(k)}function d(k){return k===124||(s=!0,l+=1),c(k)}function c(k){return k===null?n(k):K(k)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):n(k):ue(k)?me(e,c,"whitespace")(k):(l+=1,s&&(s=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),f(k)))}function f(k){return k===null||k===124||ke(k)?(e.exit("data"),c(k)):(e.consume(k),k===92?m:f)}function m(k){return k===92||k===124?(e.consume(k),f):f(k)}function h(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),s=!1,ue(k)?me(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):p(k))}function p(k){return k===45||k===58?b(k):k===124?(s=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),x):z(k)}function x(k){return ue(k)?me(e,b,"whitespace")(k):b(k)}function b(k){return k===58?(l+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(l+=1,y(k)):k===null||K(k)?C(k):z(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),g(k)):z(k)}function g(k){return k===45?(e.consume(k),g):k===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(k))}function v(k){return ue(k)?me(e,C,"whitespace")(k):C(k)}function C(k){return k===124?p(k):k===null||K(k)?!s||i!==l?z(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):z(k)}function z(k){return n(k)}function E(k){return e.enter("tableRow"),A(k)}function A(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),A):k===null||K(k)?(e.exit("tableRow"),t(k)):ue(k)?me(e,A,"whitespace")(k):(e.enter("data"),L(k))}function L(k){return k===null||k===124||ke(k)?(e.exit("data"),A(k)):(e.consume(k),k===92?I:L)}function I(k){return k===92||k===124?(e.consume(k),L):L(k)}}function g2(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,d,c,f;const m=new d2;for(;++n<e.length;){const h=e[n],p=h[1];h[0]==="enter"?p.type==="tableHead"?(o=!1,u!==0&&(hf(m,t,u,d,c),c=void 0,u=0),d={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},m.add(n,0,[["enter",d,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,f=void 0,l=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},m.add(n,0,[["enter",c,t]])),i=p.type==="tableDelimiterRow"?2:c?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(l[1]!==0&&(s[0]=s[1],f=cl(m,t,l,i,void 0,f),l=[0,0,0,0]),s[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(s[0]=s[1],f=cl(m,t,l,i,void 0,f)),l=s,s=[l[1],n,0,0])):p.type==="tableHead"?(o=!0,u=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(u=n,l[1]!==0?(s[0]=s[1],f=cl(m,t,l,i,n,f)):s[1]!==0&&(f=cl(m,t,s,i,n,f)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&hf(m,t,u,d,c),m.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=h2(t.events,n))}return e}function cl(e,t,n,r,i,l){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(l.end=Object.assign({},nr(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const u=nr(t.events,n[1]);if(l={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const d=nr(t.events,n[2]),c=nr(t.events,n[3]),f={type:o,start:Object.assign({},d),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const m=t.events[n[2]],h=t.events[n[3]];if(m[1].end=Object.assign({},h[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,x=n[3]-n[2]-1;e.add(p,x,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(l.end=Object.assign({},nr(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function hf(e,t,n,r,i){const l=[],s=nr(t.events,n);i&&(i.end=Object.assign({},s),l.push(["exit",i,t])),r.end=Object.assign({},s),l.push(["exit",r,t]),e.add(n+1,0,l)}function nr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const y2={name:"tasklistCheck",tokenize:v2};function x2(){return{text:{91:y2}}}function v2(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),l)}function l(u){return ke(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return K(u)?t(u):ue(u)?e.check({tokenize:k2},t,n)(u):n(u)}}function k2(e,t,n){return me(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function w2(e){return sp([QS(),n2(),c2(e),m2(),x2()])}const b2={};function S2(e){const t=this,n=e||b2,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(w2(n)),l.push(US()),s.push(HS(n))}function C2({message:e,pinned:t,onCopy:n,onDelete:r,onTogglePin:i,onRegenerate:l}){const s=(e.role||"assistant").toLowerCase(),o=e.ts?px(e.ts):"",u=e.content||e.message||"",d=s==="user";return a.jsxs("article",{className:`chat-message ${d?"chat-message-user":"chat-message-assistant"} ${t?"chat-message-pinned":""}`,children:[a.jsxs("header",{className:"chat-message-meta",children:[a.jsx("span",{className:"chat-message-role",children:s}),e.agent&&a.jsxs("span",{className:"chat-message-agent",children:["@",e.agent]}),o&&a.jsx("time",{className:"chat-message-time",children:o}),t&&a.jsx("span",{className:"chat-message-pin",children:"pinned"}),a.jsxs("div",{className:"chat-message-actions",children:[a.jsx("button",{type:"button",className:"chat-msg-action-btn",onClick:n,title:"Copy","aria-label":"Copy",children:a.jsx(X1,{size:12})}),!d&&a.jsx("button",{type:"button",className:"chat-msg-action-btn",onClick:l,title:"Regenerate","aria-label":"Regenerate",children:a.jsx(_t,{size:12})}),a.jsx("button",{type:"button",className:"chat-msg-action-btn",onClick:i,title:"Pin","aria-label":"Pin",children:a.jsx(sx,{size:12})}),a.jsx("button",{type:"button",className:"chat-msg-action-btn chat-msg-action-btn-danger",onClick:r,title:"Delete","aria-label":"Delete",children:a.jsx(_r,{size:12})})]})]}),a.jsx("div",{className:"chat-message-content markdown-body",children:a.jsx(cb,{remarkPlugins:[S2],children:u})})]})}function j2({messages:e,loading:t,activeProject:n,sessionId:r,pinned:i,activeSource:l,onPickSuggestion:s,onCopy:o,onDelete:u,onTogglePin:d,onRegenerate:c}){const f=w.useRef(null);w.useEffect(()=>{const h=f.current;if(!h)return;let p=h.parentElement,x=!1;for(;p;){if(p.classList.contains("chat-thread-scroll")){x=!0;break}p=p.parentElement}x||(h.scrollTop=h.scrollHeight)},[e]);const m=l==="opencode"?"opencode":"bizar";return t?a.jsx("div",{className:"chat-thread legacy",ref:f,"data-stream":m,children:a.jsx(zx,{count:3})}):n?e.length===0?a.jsx("div",{className:"chat-thread legacy",ref:f,"data-stream":m,children:a.jsx(yd,{variant:"empty",projectName:n.name,onPickSuggestion:s})}):a.jsx("div",{className:"chat-thread legacy",ref:f,children:e.map((h,p)=>a.jsx(C2,{message:h,pinned:i.has(p),onCopy:()=>o(h),onDelete:()=>u(p),onTogglePin:()=>d(p),onRegenerate:()=>c(String(h.ts??p))},`${p}-${h.ts??""}`))}):a.jsx("div",{className:"chat-thread legacy",ref:f,"data-stream":m,children:a.jsx(yd,{variant:"no-project",projectName:"",onPickSuggestion:s})})}function N2({agent:e,setAgent:t,agents:n}){const[r,i]=w.useState(!1),l=w.useRef(null);w.useEffect(()=>{if(!r)return;const u=d=>{l.current&&!l.current.contains(d.target)&&i(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[r]);const s=e||"no agent",o=s.startsWith("@")?s.slice(1):s;return a.jsxs("div",{className:"chat-agent-chip",ref:l,children:[a.jsxs("button",{type:"button",className:"chat-agent-chip-btn",onClick:()=>i(u=>!u),"aria-haspopup":"listbox","aria-expanded":r,children:[a.jsx(Dr,{size:14}),a.jsx("span",{children:o}),a.jsx(Ss,{size:12,className:r?"rotated":""})]}),r&&a.jsxs("div",{className:"chat-agent-chip-menu",role:"listbox",children:[a.jsx("button",{type:"button",role:"option","aria-selected":!e,onClick:()=>{t(""),i(!1)},children:a.jsx("span",{children:"no agent"})}),n.map(u=>a.jsx("button",{type:"button",role:"option","aria-selected":e===u.name,onClick:()=>{t(u.name),i(!1)},children:a.jsxs("span",{children:["@",u.name]})},u.name))]})]})}function E2(e,t,n=240){w.useLayoutEffect(()=>{const r=e.current;if(!r)return;r.style.height="auto";const i=Math.min(r.scrollHeight,n);r.style.height=`${i}px`,r.style.overflowY=r.scrollHeight>n?"auto":"hidden"},[e,t,n])}function T2({agent:e,setAgent:t,model:n,setModel:r,text:i,setText:l,sending:s,onSend:o,attachments:u,setAttachments:d,suggestions:c,onPickSuggestion:f,agents:m,onAttach:h}){const p=w.useRef(null),x=w.useRef(null);E2(p,i,200);const b=g=>{if(g.key==="Enter"&&(g.metaKey||g.ctrlKey))g.preventDefault(),o();else if(g.key==="Enter"&&!g.shiftKey)g.preventDefault(),o();else if(g.key==="Tab"&&c.length){g.preventDefault();const v=c[0].cmd.split(" ")[0];l(`${v} `)}},y=g=>{const v=g.target.files;if(!v)return;const C=[];for(let z=0;z<v.length;z++)C.push(v[z].name);d(z=>[...z,...C]),g.target.value=""};return a.jsxs("div",{className:"chat-composer",children:[c.length>0&&a.jsx("div",{className:"chat-composer-suggestions",children:c.map(g=>a.jsxs("button",{type:"button",className:"chat-composer-suggestion",onClick:()=>{var C;const v=g.cmd.split(" ")[0];l(`${v} `),(C=p.current)==null||C.focus()},children:[a.jsx("span",{className:"mono",children:g.cmd}),a.jsx("span",{children:g.desc})]},g.cmd))}),u.length>0&&a.jsx("div",{className:"chat-composer-attachments",children:u.map((g,v)=>a.jsxs("span",{className:"chat-composer-attachment-tag",children:[a.jsx(fd,{size:10})," ",g,a.jsx("button",{type:"button",className:"chat-composer-attachment-remove",onClick:()=>d(C=>C.filter((z,E)=>E!==v)),"aria-label":`Remove ${g}`,children:a.jsx(Zn,{size:10})})]},v))}),a.jsxs("div",{className:"chat-composer-input",children:[a.jsx(N2,{agent:e,setAgent:t,agents:m}),a.jsx("textarea",{ref:p,className:"chat-composer-textarea",placeholder:s?"Sending…":"Send a message…",rows:1,value:i,onChange:g=>l(g.target.value),onKeyDown:b,disabled:s,"aria-label":"Message"}),a.jsx("input",{ref:x,type:"file",multiple:!0,style:{display:"none"},onChange:y}),a.jsx("button",{type:"button",className:"chat-attach-btn",onClick:h,title:"Attach files","aria-label":"Attach files",children:a.jsx(fd,{size:14})}),a.jsx("button",{type:"button",className:"chat-attach-btn",onClick:async()=>{if(!i.trim())return;const g=await xx(i);g!==i&&l(g)},title:"Enhance prompt with AI","aria-label":"Enhance prompt",children:a.jsx(Jl,{size:14})}),a.jsx("button",{type:"button",className:"chat-send-btn",onClick:o,disabled:s||!i.trim(),title:"Send (Enter)","aria-label":"Send message",children:a.jsx($m,{size:16})})]})]})}const I2="modulepreload",z2=function(e){return"/"+e},mf={},P2=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=z2(u),u in mf)return;mf[u]=!0;const d=u.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":I2,d||(f.as="script"),f.crossOrigin="",f.href=u,o&&f.setAttribute("nonce",o),document.head.appendChild(f),d)return new Promise((m,h)=>{f.addEventListener("load",m),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${u}`)))})}))}function l(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&l(o.reason);return t().catch(l)})};function A2(e,t,n){const[r,i]=w.useState([]),[l,s]=w.useState([]),[o,u]=w.useState(""),[d,c]=w.useState(!0),[f,m]=w.useState({create:!1,send:!1,rename:!1,delete:!1}),[h,p]=w.useState([]),[x,b]=w.useState([]),[y,g]=w.useState(null),[v,C]=w.useState(null),[z,E]=w.useState(null),[A,L]=w.useState({}),[I,k]=w.useState(!0),[j,P]=w.useState(0),[B,O]=w.useState(new Set),[W,de]=w.useState(new Set),ee=w.useRef(null),R=w.useRef(null),V=w.useRef(null),S=w.useRef(0),Y=w.useRef(null),ie=w.useRef(null),N=w.useRef(!1),ge=w.useCallback(T=>{T&&b(D=>{if(T.id&&D.some(U=>U.id===T.id))return D;const _=D.findIndex(U=>typeof U.id=="string"&&U.id.startsWith("msg_")&&U.role===T.role&&(U.content||"")===(T.content||""));if(_>=0){const U=D.slice();return U[_]={...T,id:T.id??D[_].id},U}return[...D,T]})},[]),Le=w.useCallback(T=>{T&&O(D=>{if(D.has(T))return D;const _=new Set(D);return _.add(T),_})},[]),oe=w.useCallback((T,D)=>{L(_=>{const U=_[T]??{state:"idle",unread:0,pinned:!1};return{..._,[T]:{...U,...D}}})},[]),Ne=w.useCallback((T,D)=>{oe(T,{state:D?"streaming":"idle"})},[oe]),H=w.useCallback(T=>{R.current=T},[]),te=w.useCallback(async T=>{var D;try{const _=T?`/chat?session=${encodeURIComponent(T)}`:"/chat?limit=200",U=await q.get(_);i(U.messages||[]),s(U.sessions||[])}catch(_){(D=R.current)==null||D.error(`Chat load failed: ${_.message}`)}finally{c(!1)}},[]),re=w.useCallback(async T=>{var D;c(!0);try{const _=await q.get(`/tasks/${encodeURIComponent(T)}/chat`);i(_.messages||[]),u(_.sessionId||T)}catch(_){(D=R.current)==null||D.error(`Task chat load failed: ${_.message}`)}finally{c(!1)}},[]),Se=w.useCallback(async()=>{try{const T=await q.get("/chat/sessions");s(T.sessions||[])}catch{}},[]),Ot=w.useCallback(async()=>{try{const D=((await q.get("/opencode-sessions")).sessions||[]).map(_=>({..._,source:"opencode",title:_.title||_.id}));p(D)}catch{}},[]),ln=w.useCallback(T=>{if(V.current){try{V.current.close()}catch{}V.current=null}Y.current!==null&&(clearTimeout(Y.current),Y.current=null);const D=q.getToken(),_=D?`/api/opencode-sessions/${encodeURIComponent(T)}/stream?token=${encodeURIComponent(D)}`:`/api/opencode-sessions/${encodeURIComponent(T)}/stream`;ie.current=T,N.current=!0,S.current=0,E(null);const U=()=>{if(!N.current||ie.current!==T)return;const G=new EventSource(_);V.current=G;const le=X=>{var he,nt,dt,Qt;if(!X||!X.type||X.sessionID&&X.sessionID!==T)return;const Z=new Date().toISOString(),fe=T;if(X.type==="message.user.created"||X.type==="message.user.updated"){const se=X.data;ge({id:(se==null?void 0:se.messageID)??X.messageID,role:"user",content:((he=se==null?void 0:se.data)==null?void 0:he.content)??"",ts:Z}),Le((se==null?void 0:se.messageID)??X.messageID);return}if(X.type==="message.assistant.created"||X.type==="message.assistant.updated"){const se=X.data;ge({id:(se==null?void 0:se.messageID)??X.messageID,role:"assistant",content:((nt=se==null?void 0:se.data)==null?void 0:nt.content)??"",ts:Z}),Le((se==null?void 0:se.messageID)??X.messageID),Ne(fe,!0);return}if(X.type==="message.part.updated"){const se=X.data,ec=((dt=se==null?void 0:se.part)==null?void 0:dt.text)??"";if(!ec)return;ge({id:(se==null?void 0:se.id)??(se==null?void 0:se.messageID)??X.messageID,role:"assistant",content:ec,ts:Z}),Le((se==null?void 0:se.id)??(se==null?void 0:se.messageID)??X.messageID),Ne(fe,!0);return}if(X.type==="session.idle"||X.type==="message.assistant.completed"||X.type==="session.completed"){Ne(fe,!1);return}if(X.type==="session.awaiting"||X.type==="session.awaiting_input"||X.type==="message.assistant.awaiting"){oe(fe,{state:"awaiting"});return}if(X.type==="session.error"){E(((Qt=X.data)==null?void 0:Qt.message)||"opencode session error");return}},xe=X=>{if(!X)return null;try{const Z=JSON.parse(X);if(typeof Z.type=="string"){const fe=Z.properties,he=Z.data??fe,nt=typeof Z.sessionID=="string"?Z.sessionID:typeof(fe==null?void 0:fe.sessionID)=="string"?fe.sessionID:typeof(he==null?void 0:he.sessionID)=="string"?he.sessionID:void 0,dt=typeof Z.messageID=="string"?Z.messageID:typeof(fe==null?void 0:fe.messageID)=="string"?fe.messageID:typeof(he==null?void 0:he.messageID)=="string"?he.messageID:void 0;let Qt=Z.type;const se=/\.\d+$/.exec(Qt);return se&&(Qt=Qt.slice(0,se.index)),{type:Qt,sessionID:nt,messageID:dt,data:Z}}if(Z.type==="sync"&&Z.syncEvent&&typeof Z.syncEvent=="object"){const fe=Z.syncEvent;let he=fe.type||"";const nt=/\.\d+$/.exec(he);nt&&(he=he.slice(0,nt.index));const dt=fe.data||{};return{type:he,sessionID:typeof dt.sessionID=="string"?dt.sessionID:void 0,messageID:typeof dt.messageID=="string"?dt.messageID:void 0,data:fe}}return null}catch{return null}},we=["message.user.created","message.user.updated","message.assistant.created","message.assistant.updated","message.part.updated","session.idle","message.assistant.completed","session.completed","session.awaiting","session.awaiting_input","message.assistant.awaiting","session.error"];for(const X of we)G.addEventListener(X,Z=>{le(xe(Z.data))});G.onerror=()=>{if(ie.current!==T)return;if(!N.current){try{G.close()}catch{}V.current=null;return}try{G.close()}catch{}V.current=null;const X=S.current+1;S.current=X;const Z=Math.min(3e4,1e3*2**(X-1));Y.current!==null&&clearTimeout(Y.current),Y.current=window.setTimeout(()=>{Y.current=null,N.current&&ie.current===T&&U()},Z)},G.onopen=()=>{S.current=0,E(null)}};U()},[ge,Le,Ne,oe]),In=w.useCallback(()=>{if(N.current=!1,ie.current=null,Y.current!==null&&(clearTimeout(Y.current),Y.current=null),V.current){try{V.current.close()}catch{}V.current=null}b([]),O(new Set),E(null),C(null),g("bizar")},[]),er=w.useCallback(async T=>{var D;if(N.current=!1,V.current){try{V.current.close()}catch{}V.current=null}Y.current!==null&&(clearTimeout(Y.current),Y.current=null),E(null),c(!0);try{const _=await q.get(`/opencode-sessions/${encodeURIComponent(T)}/messages`);b(_.messages||[])}catch(_){const U=_.message;(D=R.current)==null||D.error(`Opencode session load failed: ${U}`),b([])}finally{c(!1)}C(T),g("opencode"),Ne(T,!1),ln(T)},[Ne,ln]),$i=w.useCallback(T=>{In(),u(T),g("bizar"),te(T),oe(T,{unread:0})},[In,te,oe]),Bi=w.useCallback(async()=>{var D,_,U,G,le;if(f.create)return{ok:!1};const T=t.defaultAgent||"odin";m(xe=>({...xe,create:!0}));try{try{const we=await q.post("/opencode-sessions/new",{agent:T});return await Ot(),await er(we.id),(D=R.current)==null||D.success(`Session ${we.id} created.`),{ok:!0,source:"opencode",id:we.id}}catch(we){if(!(we instanceof wa)||we.status!==503)return(_=R.current)==null||_.error(`Create failed: ${we.message}`),{ok:!1}}if(!e.activeProject)return(U=R.current)==null||U.error("Pick a project in Overview to scope chat sessions."),{ok:!1};const xe=await q.post("/chat/sessions",{});return u(xe.id),i([]),de(new Set),oe(xe.id,{state:"idle",unread:0}),await te(xe.id),Se().catch(()=>{}),(G=R.current)==null||G.success(`Session ${xe.id} created.`),{ok:!0,source:"bizar",id:xe.id}}catch(xe){return(le=R.current)==null||le.error(`Create failed: ${xe.message}`),{ok:!1}}finally{m(xe=>({...xe,create:!1}))}},[f.create,t.defaultAgent,e.activeProject,Ot,er,te,Se,oe]),zs=w.useCallback(async(T,D,_,U)=>{var xe,we,X;if(f.send)return{ok:!1};const G=T.trim();if(!G)return{ok:!1};if(y==="opencode"&&v){const Z=v,fe=`msg_${Date.now().toString(36)}${Math.random().toString(36).slice(2,8)}`,he={id:fe,role:"user",content:G,agent:D,ts:new Date().toISOString()};ge(he),Le(fe),m(nt=>({...nt,send:!0}));try{return await q.post(`/opencode-sessions/${encodeURIComponent(Z)}/send`,{message:G,agent:D}),Ne(Z,!0),{ok:!0}}catch(nt){return b(dt=>dt.filter(Qt=>Qt.id!==fe)),(xe=R.current)==null||xe.error(`Send failed: ${nt.message}`),{ok:!1}}finally{m(nt=>({...nt,send:!1}))}}const le={role:"user",content:G,agent:D,ts:new Date().toISOString()};i(Z=>[...Z,le]),m(Z=>({...Z,send:!0})),Ne(o,!0);try{const Z=await q.post("/chat",{message:G,agent:D,model:_,attachments:U||[]});if(Z!=null&&Z.messages)for(const fe of Z.messages)fe.role==="assistant"&&i(he=>he.some(dt=>dt.ts===fe.ts)?he:[...he,fe]);else(we=R.current)==null||we.info("Still processing… the response will appear shortly.");return{ok:!0}}catch(Z){return i(fe=>fe.filter(he=>he!==le)),(X=R.current)==null||X.error(`Send failed: ${Z.message}`),{ok:!1}}finally{m(Z=>({...Z,send:!1})),Ne(o,!1)}},[y,v,ge,Le,Ne,o,f.send]),Ui=w.useCallback(async T=>{var D,_;if(!o){(D=R.current)==null||D.error("No active session to regenerate.");return}try{await q.post("/chat/regenerate",{sessionId:o,messageId:T}),await te(o)}catch(U){(_=R.current)==null||_.error(`Regenerate failed: ${U.message}`)}},[o,te]),Hi=w.useCallback(T=>{y==="opencode"?b(D=>D.filter((_,U)=>U!==T)):i(D=>D.filter((_,U)=>U!==T))},[y]),Ps=w.useCallback(T=>{de(D=>{const _=new Set(D);return _.has(T)?_.delete(T):_.add(T),_})},[]),As=w.useCallback(T=>{var _,U;const D=T.content||T.message||"";try{(_=navigator.clipboard)==null||_.writeText(D).then(()=>{var G;return(G=R.current)==null?void 0:G.success("Copied.")},()=>{var G;return(G=R.current)==null?void 0:G.error("Copy failed.")})}catch{(U=R.current)==null||U.error("Copy failed.")}},[]),Ms=w.useCallback(()=>{const T=ee.current;if(!T)return;const _=T.scrollHeight-T.scrollTop-T.clientHeight<32;k(_),_&&P(0)},[]),Ls=w.useCallback(()=>{const T=ee.current;T&&(T.scrollTop=T.scrollHeight,k(!0),P(0))},[]),Rs=w.useCallback(async(T,D)=>{var _,U,G;if(f.rename)return!1;m(le=>({...le,rename:!0}));try{const le=D.trim();return le?(h.some(we=>we.id===T)?(await q.patch(`/opencode-sessions/${encodeURIComponent(T)}`,{title:le}),p(we=>we.map(X=>X.id===T?{...X,title:le}:X))):(await q.post(`/chat/sessions/${encodeURIComponent(T)}/rename`,{title:le}),s(we=>we.map(X=>X.id===T?{...X,title:le}:X))),(U=R.current)==null||U.success("Renamed."),!0):((_=R.current)==null||_.error("Title cannot be empty."),!1)}catch(le){return(G=R.current)==null||G.error(`Rename failed: ${le.message}`),!1}finally{m(le=>({...le,rename:!1}))}},[f.rename,h]),M=w.useCallback(async T=>{var D,_;if(f.delete)return!1;m(U=>({...U,delete:!0}));try{return h.some(G=>G.id===T)?(await q.del(`/opencode-sessions/${encodeURIComponent(T)}`),p(G=>G.filter(le=>le.id!==T)),v===T&&In()):(await q.del(`/chat/sessions/${encodeURIComponent(T)}`),s(G=>G.filter(le=>le.id!==T)),o===T&&(u(""),i([]))),L(G=>{const le={...G};return delete le[T],le}),(D=R.current)==null||D.success("Session deleted."),!0}catch(U){return(_=R.current)==null||_.error(`Delete failed: ${U.message}`),!1}finally{m(U=>({...U,delete:!1}))}},[f.delete,h,v,In,o]);return w.useEffect(()=>{ee.current&&(I?ee.current.scrollTop=ee.current.scrollHeight:P(T=>T+1))},[r,x]),w.useEffect(()=>()=>{if(N.current=!1,ie.current=null,Y.current!==null&&(clearTimeout(Y.current),Y.current=null),V.current){try{V.current.close()}catch{}V.current=null}},[]),w.useEffect(()=>{n?re(n):te(),Ot()},[]),w.useEffect(()=>{const T=D=>{var U;const _=(U=D.detail)==null?void 0:U.taskId;_&&re(_)};return window.addEventListener("bizar:setChatTask",T),()=>window.removeEventListener("bizar:setChatTask",T)},[re]),w.useEffect(()=>{let T=!1;return P2(async()=>{const{Ws:D}=await Promise.resolve().then(()=>Ex);return{Ws:D}},void 0).then(({Ws:D})=>{if(T)return;new D().on(U=>{if(U.type!=="chat:message")return;const G=U.message;G&&i(le=>le.some(we=>we.ts===G.ts)?le:[...le,G])})}),()=>{T=!0}},[]),{messages:y==="opencode"?x:r,bizarMessages:r,opencodeMessages:x,sessions:l,opencodeSessions:h,sessionId:o,setSessionId:u,loading:d,sending:f.send,pinned:W,listRef:ee,activeSource:y,activeOpencodeSessionId:v,opencodeError:z,sessionStates:A,busy:f,getSessionDisplay:T=>{var D,_,U,G;return{...T,state:((D=A[T.id])==null?void 0:D.state)??"idle",unread:((_=A[T.id])==null?void 0:_.unread)??0,pinned:((U=A[T.id])==null?void 0:U.pinned)??!1,tree:(G=A[T.id])==null?void 0:G.tree}},stickToBottom:I,newMessageCount:j,handleScroll:Ms,jumpToLatest:Ls,setToast:H,loadChat:te,loadTaskChat:re,refreshSessions:Se,refreshOpencodeSessions:Ot,loadOpencodeSession:er,closeOpencodeSession:In,selectBizarSession:$i,onCreateSession:Bi,onSend:zs,onRegenerate:Ui,deleteMessage:Hi,togglePin:Ps,copyMessage:As,renameSession:Rs,deleteSession:M,seenOpencodeMessages:B}}const M2=[{cmd:"/visual-plan [on|off|status]",desc:"Toggle or view visual plan mode"},{cmd:"/plan new <slug> [template]",desc:"Create a new plan"},{cmd:"/plan list",desc:"List all plans"},{cmd:"/plan open <slug>",desc:"Open a plan in the viewer"},{cmd:"/plan status <slug> <status>",desc:"Set plan status"},{cmd:"/plan get <slug>",desc:"Fetch plan canvas"},{cmd:"/plan add <slug> --title T --type kind",desc:"Add element to a plan"},{cmd:"/plan update <slug> <id>",desc:"Update a plan element"},{cmd:"/plan delete <slug> <id>",desc:"Delete a plan element"},{cmd:'/plan comment <slug> [id] "text"',desc:"Add a comment"},{cmd:"/plan comments <slug> [id]",desc:"Read plan comments"},{cmd:"/bizar",desc:"Launch Bizar dashboard"},{cmd:"/bizar <args>",desc:"Route via Bizar menu"},{cmd:"/audit",desc:"Run security audit"},{cmd:"/explain <q>",desc:"Read-only code Q&A"},{cmd:"/init",desc:"Initialize .bizar/ in this project"},{cmd:"/learn",desc:"Extract patterns from session"},{cmd:"/pr-review",desc:"PR review"},{cmd:"/help | /commands",desc:"Show all Bizar commands"}];function L2(e){const[t,n]=w.useState(""),r=w.useMemo(()=>[...M2,...(e.mods||[]).flatMap(l=>{var s;return(s=l.entry)!=null&&s.command?[{cmd:`/${l.id}`,desc:l.description||l.name,mod:l.id}]:[]})],[e.mods]),i=w.useMemo(()=>{if(!t.startsWith("/")||t.includes(" "))return[];const l=t.toLowerCase();return r.filter(s=>s.cmd.toLowerCase().startsWith(l)).slice(0,6)},[t,r]);return{allCommands:r,suggestions:i,setQuery:n}}var R2=Object.defineProperty,ss=Object.getOwnPropertySymbols,Xp=Object.prototype.hasOwnProperty,Zp=Object.prototype.propertyIsEnumerable,pf=(e,t,n)=>t in e?R2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,La=(e,t)=>{for(var n in t||(t={}))Xp.call(t,n)&&pf(e,n,t[n]);if(ss)for(var n of ss(t))Zp.call(t,n)&&pf(e,n,t[n]);return e},Ra=(e,t)=>{var n={};for(var r in e)Xp.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ss)for(var r of ss(e))t.indexOf(r)<0&&Zp.call(e,r)&&(n[r]=e[r]);return n};/**
|
|
344
|
+
* @license QR Code generator library (TypeScript)
|
|
345
|
+
* Copyright (c) Project Nayuki.
|
|
346
|
+
* SPDX-License-Identifier: MIT
|
|
347
|
+
*/var Kn;(e=>{const t=class ae{constructor(u,d,c,f){if(this.version=u,this.errorCorrectionLevel=d,this.modules=[],this.isFunction=[],u<ae.MIN_VERSION||u>ae.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=u*4+17;let m=[];for(let p=0;p<this.size;p++)m.push(!1);for(let p=0;p<this.size;p++)this.modules.push(m.slice()),this.isFunction.push(m.slice());this.drawFunctionPatterns();const h=this.addEccAndInterleave(c);if(this.drawCodewords(h),f==-1){let p=1e9;for(let x=0;x<8;x++){this.applyMask(x),this.drawFormatBits(x);const b=this.getPenaltyScore();b<p&&(f=x,p=b),this.applyMask(x)}}i(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(u,d){const c=e.QrSegment.makeSegments(u);return ae.encodeSegments(c,d)}static encodeBinary(u,d){const c=e.QrSegment.makeBytes(u);return ae.encodeSegments([c],d)}static encodeSegments(u,d,c=1,f=40,m=-1,h=!0){if(!(ae.MIN_VERSION<=c&&c<=f&&f<=ae.MAX_VERSION)||m<-1||m>7)throw new RangeError("Invalid value");let p,x;for(p=c;;p++){const v=ae.getNumDataCodewords(p,d)*8,C=s.getTotalBits(u,p);if(C<=v){x=C;break}if(p>=f)throw new RangeError("Data too long")}for(const v of[ae.Ecc.MEDIUM,ae.Ecc.QUARTILE,ae.Ecc.HIGH])h&&x<=ae.getNumDataCodewords(p,v)*8&&(d=v);let b=[];for(const v of u){n(v.mode.modeBits,4,b),n(v.numChars,v.mode.numCharCountBits(p),b);for(const C of v.getData())b.push(C)}i(b.length==x);const y=ae.getNumDataCodewords(p,d)*8;i(b.length<=y),n(0,Math.min(4,y-b.length),b),n(0,(8-b.length%8)%8,b),i(b.length%8==0);for(let v=236;b.length<y;v^=253)n(v,8,b);let g=[];for(;g.length*8<b.length;)g.push(0);return b.forEach((v,C)=>g[C>>>3]|=v<<7-(C&7)),new ae(p,d,g,m)}getModule(u,d){return 0<=u&&u<this.size&&0<=d&&d<this.size&&this.modules[d][u]}getModules(){return this.modules}drawFunctionPatterns(){for(let c=0;c<this.size;c++)this.setFunctionModule(6,c,c%2==0),this.setFunctionModule(c,6,c%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const u=this.getAlignmentPatternPositions(),d=u.length;for(let c=0;c<d;c++)for(let f=0;f<d;f++)c==0&&f==0||c==0&&f==d-1||c==d-1&&f==0||this.drawAlignmentPattern(u[c],u[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(u){const d=this.errorCorrectionLevel.formatBits<<3|u;let c=d;for(let m=0;m<10;m++)c=c<<1^(c>>>9)*1335;const f=(d<<10|c)^21522;i(f>>>15==0);for(let m=0;m<=5;m++)this.setFunctionModule(8,m,r(f,m));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(let m=9;m<15;m++)this.setFunctionModule(14-m,8,r(f,m));for(let m=0;m<8;m++)this.setFunctionModule(this.size-1-m,8,r(f,m));for(let m=8;m<15;m++)this.setFunctionModule(8,this.size-15+m,r(f,m));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let u=this.version;for(let c=0;c<12;c++)u=u<<1^(u>>>11)*7973;const d=this.version<<12|u;i(d>>>18==0);for(let c=0;c<18;c++){const f=r(d,c),m=this.size-11+c%3,h=Math.floor(c/3);this.setFunctionModule(m,h,f),this.setFunctionModule(h,m,f)}}drawFinderPattern(u,d){for(let c=-4;c<=4;c++)for(let f=-4;f<=4;f++){const m=Math.max(Math.abs(f),Math.abs(c)),h=u+f,p=d+c;0<=h&&h<this.size&&0<=p&&p<this.size&&this.setFunctionModule(h,p,m!=2&&m!=4)}}drawAlignmentPattern(u,d){for(let c=-2;c<=2;c++)for(let f=-2;f<=2;f++)this.setFunctionModule(u+f,d+c,Math.max(Math.abs(f),Math.abs(c))!=1)}setFunctionModule(u,d,c){this.modules[d][u]=c,this.isFunction[d][u]=!0}addEccAndInterleave(u){const d=this.version,c=this.errorCorrectionLevel;if(u.length!=ae.getNumDataCodewords(d,c))throw new RangeError("Invalid argument");const f=ae.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][d],m=ae.ECC_CODEWORDS_PER_BLOCK[c.ordinal][d],h=Math.floor(ae.getNumRawDataModules(d)/8),p=f-h%f,x=Math.floor(h/f);let b=[];const y=ae.reedSolomonComputeDivisor(m);for(let v=0,C=0;v<f;v++){let z=u.slice(C,C+x-m+(v<p?0:1));C+=z.length;const E=ae.reedSolomonComputeRemainder(z,y);v<p&&z.push(0),b.push(z.concat(E))}let g=[];for(let v=0;v<b[0].length;v++)b.forEach((C,z)=>{(v!=x-m||z>=p)&&g.push(C[v])});return i(g.length==h),g}drawCodewords(u){if(u.length!=Math.floor(ae.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let d=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let f=0;f<this.size;f++)for(let m=0;m<2;m++){const h=c-m,x=(c+1&2)==0?this.size-1-f:f;!this.isFunction[x][h]&&d<u.length*8&&(this.modules[x][h]=r(u[d>>>3],7-(d&7)),d++)}}i(d==u.length*8)}applyMask(u){if(u<0||u>7)throw new RangeError("Mask value out of range");for(let d=0;d<this.size;d++)for(let c=0;c<this.size;c++){let f;switch(u){case 0:f=(c+d)%2==0;break;case 1:f=d%2==0;break;case 2:f=c%3==0;break;case 3:f=(c+d)%3==0;break;case 4:f=(Math.floor(c/3)+Math.floor(d/2))%2==0;break;case 5:f=c*d%2+c*d%3==0;break;case 6:f=(c*d%2+c*d%3)%2==0;break;case 7:f=((c+d)%2+c*d%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[d][c]&&f&&(this.modules[d][c]=!this.modules[d][c])}}getPenaltyScore(){let u=0;for(let m=0;m<this.size;m++){let h=!1,p=0,x=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[m][b]==h?(p++,p==5?u+=ae.PENALTY_N1:p>5&&u++):(this.finderPenaltyAddHistory(p,x),h||(u+=this.finderPenaltyCountPatterns(x)*ae.PENALTY_N3),h=this.modules[m][b],p=1);u+=this.finderPenaltyTerminateAndCount(h,p,x)*ae.PENALTY_N3}for(let m=0;m<this.size;m++){let h=!1,p=0,x=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[b][m]==h?(p++,p==5?u+=ae.PENALTY_N1:p>5&&u++):(this.finderPenaltyAddHistory(p,x),h||(u+=this.finderPenaltyCountPatterns(x)*ae.PENALTY_N3),h=this.modules[b][m],p=1);u+=this.finderPenaltyTerminateAndCount(h,p,x)*ae.PENALTY_N3}for(let m=0;m<this.size-1;m++)for(let h=0;h<this.size-1;h++){const p=this.modules[m][h];p==this.modules[m][h+1]&&p==this.modules[m+1][h]&&p==this.modules[m+1][h+1]&&(u+=ae.PENALTY_N2)}let d=0;for(const m of this.modules)d=m.reduce((h,p)=>h+(p?1:0),d);const c=this.size*this.size,f=Math.ceil(Math.abs(d*20-c*10)/c)-1;return i(0<=f&&f<=9),u+=f*ae.PENALTY_N4,i(0<=u&&u<=2568888),u}getAlignmentPatternPositions(){if(this.version==1)return[];{const u=Math.floor(this.version/7)+2,d=this.version==32?26:Math.ceil((this.version*4+4)/(u*2-2))*2;let c=[6];for(let f=this.size-7;c.length<u;f-=d)c.splice(1,0,f);return c}}static getNumRawDataModules(u){if(u<ae.MIN_VERSION||u>ae.MAX_VERSION)throw new RangeError("Version number out of range");let d=(16*u+128)*u+64;if(u>=2){const c=Math.floor(u/7)+2;d-=(25*c-10)*c-55,u>=7&&(d-=36)}return i(208<=d&&d<=29648),d}static getNumDataCodewords(u,d){return Math.floor(ae.getNumRawDataModules(u)/8)-ae.ECC_CODEWORDS_PER_BLOCK[d.ordinal][u]*ae.NUM_ERROR_CORRECTION_BLOCKS[d.ordinal][u]}static reedSolomonComputeDivisor(u){if(u<1||u>255)throw new RangeError("Degree out of range");let d=[];for(let f=0;f<u-1;f++)d.push(0);d.push(1);let c=1;for(let f=0;f<u;f++){for(let m=0;m<d.length;m++)d[m]=ae.reedSolomonMultiply(d[m],c),m+1<d.length&&(d[m]^=d[m+1]);c=ae.reedSolomonMultiply(c,2)}return d}static reedSolomonComputeRemainder(u,d){let c=d.map(f=>0);for(const f of u){const m=f^c.shift();c.push(0),d.forEach((h,p)=>c[p]^=ae.reedSolomonMultiply(h,m))}return c}static reedSolomonMultiply(u,d){if(u>>>8||d>>>8)throw new RangeError("Byte out of range");let c=0;for(let f=7;f>=0;f--)c=c<<1^(c>>>7)*285,c^=(d>>>f&1)*u;return i(c>>>8==0),c}finderPenaltyCountPatterns(u){const d=u[1];i(d<=this.size*3);const c=d>0&&u[2]==d&&u[3]==d*3&&u[4]==d&&u[5]==d;return(c&&u[0]>=d*4&&u[6]>=d?1:0)+(c&&u[6]>=d*4&&u[0]>=d?1:0)}finderPenaltyTerminateAndCount(u,d,c){return u&&(this.finderPenaltyAddHistory(d,c),d=0),d+=this.size,this.finderPenaltyAddHistory(d,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(u,d){d[0]==0&&(u+=this.size),d.pop(),d.unshift(u)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(o,u,d){if(u<0||u>31||o>>>u)throw new RangeError("Value out of range");for(let c=u-1;c>=0;c--)d.push(o>>>c&1)}function r(o,u){return(o>>>u&1)!=0}function i(o){if(!o)throw new Error("Assertion error")}const l=class Pe{constructor(u,d,c){if(this.mode=u,this.numChars=d,this.bitData=c,d<0)throw new RangeError("Invalid argument");this.bitData=c.slice()}static makeBytes(u){let d=[];for(const c of u)n(c,8,d);return new Pe(Pe.Mode.BYTE,u.length,d)}static makeNumeric(u){if(!Pe.isNumeric(u))throw new RangeError("String contains non-numeric characters");let d=[];for(let c=0;c<u.length;){const f=Math.min(u.length-c,3);n(parseInt(u.substring(c,c+f),10),f*3+1,d),c+=f}return new Pe(Pe.Mode.NUMERIC,u.length,d)}static makeAlphanumeric(u){if(!Pe.isAlphanumeric(u))throw new RangeError("String contains unencodable characters in alphanumeric mode");let d=[],c;for(c=0;c+2<=u.length;c+=2){let f=Pe.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c))*45;f+=Pe.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c+1)),n(f,11,d)}return c<u.length&&n(Pe.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c)),6,d),new Pe(Pe.Mode.ALPHANUMERIC,u.length,d)}static makeSegments(u){return u==""?[]:Pe.isNumeric(u)?[Pe.makeNumeric(u)]:Pe.isAlphanumeric(u)?[Pe.makeAlphanumeric(u)]:[Pe.makeBytes(Pe.toUtf8ByteArray(u))]}static makeEci(u){let d=[];if(u<0)throw new RangeError("ECI assignment value out of range");if(u<128)n(u,8,d);else if(u<16384)n(2,2,d),n(u,14,d);else if(u<1e6)n(6,3,d),n(u,21,d);else throw new RangeError("ECI assignment value out of range");return new Pe(Pe.Mode.ECI,0,d)}static isNumeric(u){return Pe.NUMERIC_REGEX.test(u)}static isAlphanumeric(u){return Pe.ALPHANUMERIC_REGEX.test(u)}getData(){return this.bitData.slice()}static getTotalBits(u,d){let c=0;for(const f of u){const m=f.mode.numCharCountBits(d);if(f.numChars>=1<<m)return 1/0;c+=4+m+f.bitData.length}return c}static toUtf8ByteArray(u){u=encodeURI(u);let d=[];for(let c=0;c<u.length;c++)u.charAt(c)!="%"?d.push(u.charCodeAt(c)):(d.push(parseInt(u.substring(c+1,c+3),16)),c+=2);return d}};l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let s=l;e.QrSegment=l})(Kn||(Kn={}));(e=>{(t=>{const n=class{constructor(i,l){this.ordinal=i,this.formatBits=l}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(Kn||(Kn={}));(e=>{(t=>{const n=class{constructor(i,l){this.modeBits=i,this.numBitsCharCount=l}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Kn||(Kn={}));var gr=Kn;/**
|
|
348
|
+
* @license qrcode.react
|
|
349
|
+
* Copyright (c) Paul O'Shannessy
|
|
350
|
+
* SPDX-License-Identifier: ISC
|
|
351
|
+
*/var D2={L:gr.QrCode.Ecc.LOW,M:gr.QrCode.Ecc.MEDIUM,Q:gr.QrCode.Ecc.QUARTILE,H:gr.QrCode.Ecc.HIGH},Jp=128,eg="L",tg="#FFFFFF",ng="#000000",rg=!1,ig=1,_2=4,O2=0,F2=.1;function lg(e,t=0){const n=[];return e.forEach(function(r,i){let l=null;r.forEach(function(s,o){if(!s&&l!==null){n.push(`M${l+t} ${i+t}h${o-l}v1H${l+t}z`),l=null;return}if(o===r.length-1){if(!s)return;l===null?n.push(`M${o+t},${i+t} h1v1H${o+t}z`):n.push(`M${l+t},${i+t} h${o+1-l}v1H${l+t}z`);return}s&&l===null&&(l=o)})}),n.join("")}function sg(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((i,l)=>l<t.x||l>=t.x+t.w?i:!1))}function $2(e,t,n,r){if(r==null)return null;const i=e.length+n*2,l=Math.floor(t*F2),s=i/t,o=(r.width||l)*s,u=(r.height||l)*s,d=r.x==null?e.length/2-o/2:r.x*s,c=r.y==null?e.length/2-u/2:r.y*s,f=r.opacity==null?1:r.opacity;let m=null;if(r.excavate){let p=Math.floor(d),x=Math.floor(c),b=Math.ceil(o+d-p),y=Math.ceil(u+c-x);m={x:p,y:x,w:b,h:y}}const h=r.crossOrigin;return{x:d,y:c,h:u,w:o,excavation:m,opacity:f,crossOrigin:h}}function B2(e,t){return t!=null?Math.max(Math.floor(t),0):e?_2:O2}function og({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:l,size:s,boostLevel:o}){let u=_e.useMemo(()=>{const p=(Array.isArray(e)?e:[e]).reduce((x,b)=>(x.push(...gr.QrSegment.makeSegments(b)),x),[]);return gr.QrCode.encodeSegments(p,D2[t],n,void 0,void 0,o)},[e,t,n,o]);const{cells:d,margin:c,numCells:f,calculatedImageSettings:m}=_e.useMemo(()=>{let h=u.getModules();const p=B2(r,i),x=h.length+p*2,b=$2(h,s,p,l);return{cells:h,margin:p,numCells:x,calculatedImageSettings:b}},[u,s,l,r,i]);return{qrcode:u,margin:c,cells:d,numCells:f,calculatedImageSettings:m}}var U2=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),H2=_e.forwardRef(function(t,n){const r=t,{value:i,size:l=Jp,level:s=eg,bgColor:o=tg,fgColor:u=ng,includeMargin:d=rg,minVersion:c=ig,boostLevel:f,marginSize:m,imageSettings:h}=r,x=Ra(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:b}=x,y=Ra(x,["style"]),g=h==null?void 0:h.src,v=_e.useRef(null),C=_e.useRef(null),z=_e.useCallback(O=>{v.current=O,typeof n=="function"?n(O):n&&(n.current=O)},[n]),[E,A]=_e.useState(!1),{margin:L,cells:I,numCells:k,calculatedImageSettings:j}=og({value:i,level:s,minVersion:c,boostLevel:f,includeMargin:d,marginSize:m,imageSettings:h,size:l});_e.useEffect(()=>{if(v.current!=null){const O=v.current,W=O.getContext("2d");if(!W)return;let de=I;const ee=C.current,R=j!=null&&ee!==null&&ee.complete&&ee.naturalHeight!==0&&ee.naturalWidth!==0;R&&j.excavation!=null&&(de=sg(I,j.excavation));const V=window.devicePixelRatio||1;O.height=O.width=l*V;const S=l/k*V;W.scale(S,S),W.fillStyle=o,W.fillRect(0,0,k,k),W.fillStyle=u,U2?W.fill(new Path2D(lg(de,L))):I.forEach(function(Y,ie){Y.forEach(function(N,ge){N&&W.fillRect(ge+L,ie+L,1,1)})}),j&&(W.globalAlpha=j.opacity),R&&W.drawImage(ee,j.x+L,j.y+L,j.w,j.h)}}),_e.useEffect(()=>{A(!1)},[g]);const P=La({height:l,width:l},b);let B=null;return g!=null&&(B=_e.createElement("img",{src:g,key:g,style:{display:"none"},onLoad:()=>{A(!0)},ref:C,crossOrigin:j==null?void 0:j.crossOrigin})),_e.createElement(_e.Fragment,null,_e.createElement("canvas",La({style:P,height:l,width:l,ref:z,role:"img"},y)),B)});H2.displayName="QRCodeCanvas";var ag=_e.forwardRef(function(t,n){const r=t,{value:i,size:l=Jp,level:s=eg,bgColor:o=tg,fgColor:u=ng,includeMargin:d=rg,minVersion:c=ig,boostLevel:f,title:m,marginSize:h,imageSettings:p}=r,x=Ra(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:b,cells:y,numCells:g,calculatedImageSettings:v}=og({value:i,level:s,minVersion:c,boostLevel:f,includeMargin:d,marginSize:h,imageSettings:p,size:l});let C=y,z=null;p!=null&&v!=null&&(v.excavation!=null&&(C=sg(y,v.excavation)),z=_e.createElement("image",{href:p.src,height:v.h,width:v.w,x:v.x+b,y:v.y+b,preserveAspectRatio:"none",opacity:v.opacity,crossOrigin:v.crossOrigin}));const E=lg(C,b);return _e.createElement("svg",La({height:l,width:l,viewBox:`0 0 ${g} ${g}`,ref:n,role:"img"},x),!!m&&_e.createElement("title",null,m),_e.createElement("path",{fill:o,d:`M0,0 h${g}v${g}H0z`,shapeRendering:"crispEdges"}),_e.createElement("path",{fill:u,d:E,shapeRendering:"crispEdges"}),z)});ag.displayName="QRCodeSVG";function V2({tabs:e,activeTab:t,onChange:n}){return a.jsx("nav",{className:"mobile-bottom-nav",role:"navigation","aria-label":"Mobile navigation",children:e.map(r=>{const i=r.icon;return a.jsxs("button",{type:"button",className:Mu("mobile-nav-btn",t===r.id&&"mobile-nav-btn-active"),onClick:()=>n(r.id),"aria-label":r.label,"aria-current":t===r.id?"page":void 0,children:[a.jsx(i,{size:22}),a.jsx("span",{className:"mobile-nav-label",children:r.label})]},r.id)})})}function Dt({open:e,onClose:t,title:n,children:r,actions:i,maxHeight:l="85vh"}){const s=w.useRef(null),o=w.useRef(null),u=w.useId(),d=w.useRef(null),c=w.useRef(null),f=w.useRef(0),m=w.useRef(0),h=()=>{var y;return((y=s.current)==null?void 0:y.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))??[]};if(w.useEffect(()=>{if(!e)return;d.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const y=g=>{var A;if(g.key==="Escape"&&t(),g.key!=="Tab")return;const v=Array.from(h());if(v.length===0){g.preventDefault(),(A=s.current)==null||A.focus();return}const C=v[0],z=v[v.length-1],E=document.activeElement;if(g.shiftKey){(!E||E===C||E===s.current)&&(g.preventDefault(),z==null||z.focus());return}E===z&&(g.preventDefault(),C==null||C.focus())};return window.addEventListener("keydown",y),requestAnimationFrame(()=>{var g,v;((g=o.current)==null?void 0:g.focus())??((v=s.current)==null||v.focus())}),()=>{var g;window.removeEventListener("keydown",y),(g=d.current)==null||g.focus()}},[e,t]),w.useEffect(()=>(e?(m.current=window.scrollY,document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${m.current}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%"):(document.documentElement.style.overflow="",document.body.style.overflow="",document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width=""),()=>{document.documentElement.style.overflow="",document.body.style.overflow="",document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width="",window.scrollTo(0,m.current)}),[e]),!e)return null;const p=y=>{var g;y.isPrimary&&(c.current=y.clientY,f.current=0,(g=s.current)==null||g.setPointerCapture(y.pointerId))},x=y=>{if(c.current==null||!s.current)return;const g=Math.max(0,y.clientY-c.current);f.current=g,s.current.style.transform=`translateY(${g}px)`},b=y=>{if(!s.current)return;y&&s.current.hasPointerCapture(y.pointerId)&&s.current.releasePointerCapture(y.pointerId);const g=f.current;s.current.style.transform="",c.current=null,f.current=0,g>72&&t()};return a.jsx("div",{className:"mobile-sheet-overlay",onClick:t,children:a.jsxs("div",{ref:s,className:"mobile-sheet",style:{maxHeight:l},onClick:y=>y.stopPropagation(),role:"dialog","aria-modal":!0,"aria-label":n?void 0:"Sheet","aria-labelledby":n?u:void 0,tabIndex:-1,children:[a.jsx("div",{className:"mobile-sheet-handle",onPointerDown:p,onPointerMove:x,onPointerUp:b,onPointerCancel:b,"aria-hidden":"true"}),a.jsxs("div",{className:"mobile-sheet-header",children:[n?a.jsx("h3",{id:u,className:"mobile-sheet-title",children:n}):a.jsx("div",{}),a.jsx("button",{ref:o,type:"button",className:"mobile-icon-btn",onClick:t,"aria-label":"Close",children:a.jsx(Zn,{size:18})})]}),a.jsx("div",{className:"mobile-sheet-content",children:r}),i&&a.jsx("div",{className:"mobile-sheet-actions",children:i})]})})}function W2(e){switch(e){case"success":return"✓";case"error":return"✗";case"warning":return"⚠";default:return"ℹ"}}function Q2(e){const t=new Date(e),r=Date.now()-t.getTime();return r<6e4?"just now":r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:t.toLocaleDateString()}function q2({onSelect:e}){const[t,n]=w.useState(!1),[r,i]=w.useState([]),[l,s]=w.useState(0),o=async()=>{var c;try{const f=await q.get("/notifications");i(f.notifications||[]),s(((c=f.stats)==null?void 0:c.unread)||0)}catch{}};w.useEffect(()=>{o()},[]),w.useEffect(()=>{t&&o()},[t]);const u=async()=>{try{await q.post("/notifications/read-all"),i(c=>c.map(f=>({...f,read:!0}))),s(0)}catch{}},d=async c=>{try{await q.post(`/notifications/${encodeURIComponent(c)}/read`),i(f=>f.map(m=>m.id===c?{...m,read:!0}:m)),s(f=>Math.max(0,f-1))}catch{}};return a.jsxs(a.Fragment,{children:[a.jsxs("button",{type:"button",className:"mobile-icon-btn mobile-notif-btn",onClick:()=>n(!0),"aria-label":`Notifications${l>0?` (${l} unread)`:""}`,children:[a.jsx(cd,{size:20}),l>0&&a.jsx("span",{className:"mobile-notif-badge",children:l>9?"9+":l})]}),a.jsx(Dt,{open:t,onClose:()=>n(!1),title:"Notifications",actions:l>0?a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",style:{width:"100%"},onClick:u,children:[a.jsx(Q1,{size:14})," Mark all read"]}):void 0,children:a.jsxs("div",{className:"mobile-notif-list",children:[r.length===0&&a.jsxs("div",{className:"mobile-empty",children:[a.jsx(cd,{size:32}),a.jsx("p",{children:"No notifications"})]}),r.map(c=>a.jsxs("button",{type:"button",className:`mobile-notif-item ${c.read?"read":"unread"}`,onClick:()=>{c.read||d(c.id),e(c),n(!1)},children:[a.jsx("span",{className:`mobile-notif-icon severity-${c.severity}`,children:W2(c.severity)}),a.jsxs("div",{className:"mobile-notif-body",children:[a.jsx("span",{className:"mobile-notif-title",children:c.title||c.message}),c.message&&c.title&&a.jsx("span",{className:"mobile-notif-text",children:c.message}),a.jsx("span",{className:"mobile-notif-time",children:Q2(c.ts)})]}),!c.read&&a.jsx("span",{className:"mobile-notif-dot"})]},c.id))]})})]})}const Y2={activity:"Activity",chat:"Chat",tasks:"Tasks",settings:"Settings",more:"More",plans:"Plans",agents:"Agents",skills:"Skills",mods:"Mods",schedules:"Schedules",history:"History",config:"Config","plan-detail":"Plan","agent-detail":"Agent","task-detail":"Task"};function K2({activeTab:e,snapshot:t,onSearch:n,onNavigate:r}){const[i,l]=w.useState(!1),s=async o=>{try{await q.post(`/projects/${encodeURIComponent(o)}/activate`),l(!1),window.location.reload()}catch{}};return a.jsxs("header",{className:"mobile-topbar",children:[a.jsxs("div",{className:"mobile-topbar-left",children:[a.jsx("span",{className:"mobile-logo",children:"ᛒ"}),(t==null?void 0:t.activeProject)&&a.jsxs("button",{type:"button",className:"mobile-project-btn",onClick:()=>l(!0),"aria-label":"Select project",children:[a.jsx("span",{className:"mobile-project-name",children:t.activeProject.name}),a.jsx(Ss,{size:14})]}),a.jsx("span",{className:"mobile-title",children:Y2[e]||"Bizar"})]}),a.jsxs("div",{className:"mobile-topbar-right",children:[a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:n,"aria-label":"Search",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("path",{d:"m21 21-4.35-4.35"})]})}),a.jsx(q2,{onSelect:o=>{r("notification",o.link||"",o.meta??null)}}),(t==null?void 0:t.activeProject)&&a.jsx(Dt,{open:i,onClose:()=>l(!1),title:"Projects",children:a.jsx("div",{className:"mobile-project-list",children:(t.projects||[]).map(o=>{var u,d;return a.jsxs("button",{type:"button",className:`mobile-project-item ${o.id===((u=t.activeProject)==null?void 0:u.id)?"active":""}`,onClick:()=>s(o.id),children:[a.jsx("div",{className:"mobile-project-status","data-status":o.status}),a.jsxs("div",{className:"mobile-project-info",children:[a.jsx("span",{className:"mobile-project-item-name",children:o.name}),a.jsx("span",{className:"mobile-project-item-path",children:o.path})]}),o.id===((d=t.activeProject)==null?void 0:d.id)&&a.jsx("span",{className:"mobile-active-badge",children:"active"})]},o.id)})})})]})]})}const G2=["all","tasks","agents","bg","artifacts","mods"],Co={all:"All",tasks:"Tasks",agents:"Agents",bg:"Background",artifacts:"Plans",mods:"Mods"};function X2({snapshot:e,onRefresh:t}){var L;const[n,r]=w.useState(((L=e.overview)==null?void 0:L.recentActivity)||[]),[i,l]=w.useState(!0),[s,o]=w.useState("all"),[u,d]=w.useState(!1),[c,f]=w.useState(null),[m,h]=w.useState(""),[p,x]=w.useState(!1);w.useEffect(()=>{var I;(I=e.overview)!=null&&I.recentActivity?(r(e.overview.recentActivity),l(!1)):b()},[e.overview]);const b=async()=>{var I;try{const k=await q.get("/snapshot");r(((I=k.overview)==null?void 0:I.recentActivity)||[])}catch{}finally{l(!1)}},y=s==="all"?n:n.filter(I=>{var k,j,P,B,O,W;return s==="tasks"?(k=I.kind)==null?void 0:k.startsWith("task"):s==="agents"?(j=I.kind)==null?void 0:j.startsWith("agent"):s==="bg"?((P=I.kind)==null?void 0:P.includes("bg"))||((B=I.kind)==null?void 0:B.includes("schedule")):s==="artifacts"?(O=I.kind)==null?void 0:O.includes("artifacts"):s==="mods"?(W=I.kind)==null?void 0:W.includes("mod"):!0}),g=e.agents||[],v=e.tasks||[],C=v.filter(I=>I.status==="doing"||I.status==="queued"),z=v.filter(I=>I.status==="done"),E=async()=>{if(!(!m.trim()||p)){x(!0);try{await q.post("/chat",{message:m.trim(),agent:"odin"}),h(""),await t().catch(()=>{}),await b()}catch{}finally{x(!1)}}},A=async()=>{await t().catch(()=>{}),await b()};return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-submit-hero",children:[a.jsx("textarea",{className:"mobile-submit-input",placeholder:"What needs to be done? Describe a task, bug, or refactor for Odin to artifacts…",value:m,onChange:I=>h(I.target.value),rows:2}),a.jsxs("div",{className:"mobile-submit-actions",children:[a.jsx("div",{className:"mobile-submit-chips",children:["Implement feature","Fix bug","Refactor","Investigate","Write tests"].map(I=>a.jsx("button",{type:"button",className:"mobile-submit-chip",onClick:()=>h(k=>k?`${k} ${I}`:I),children:I},I))}),a.jsxs("button",{type:"button",className:"mobile-btn",disabled:!m.trim()||p,onClick:E,children:[a.jsx($m,{size:14})," Submit to Odin"]})]})]}),a.jsxs("div",{className:"mobile-stats",children:[a.jsxs("div",{className:"mobile-stat",children:[a.jsx("div",{className:"mobile-stat-value",children:g.length}),a.jsx("div",{className:"mobile-stat-label",children:"Agents"})]}),a.jsxs("div",{className:"mobile-stat",children:[a.jsx("div",{className:"mobile-stat-value",children:C.length}),a.jsx("div",{className:"mobile-stat-label",children:"Active"})]}),a.jsxs("div",{className:"mobile-stat",children:[a.jsx("div",{className:"mobile-stat-value",children:z.length}),a.jsx("div",{className:"mobile-stat-label",children:"Done"})]}),a.jsxs("div",{className:"mobile-stat",children:[a.jsx("div",{className:"mobile-stat-value",children:e.artifacts.length||0}),a.jsx("div",{className:"mobile-stat-label",children:"Plans"})]})]}),i&&n.length===0&&a.jsx("div",{className:"mobile-loading mobile-loading-inline",children:a.jsx("p",{children:"Loading activity…"})}),a.jsxs("div",{className:"mobile-activity-header",children:[a.jsx("h3",{className:"mobile-section-title",style:{margin:0},children:"Recent Activity"}),a.jsxs("div",{style:{display:"flex",gap:4},children:[a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>d(I=>!I),"aria-label":u?"Resume":"Pause",children:u?a.jsx(Zl,{size:14}):a.jsx(lx,{size:14})}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:A,"aria-label":"Refresh",children:a.jsx(_t,{size:14})})]})]}),a.jsx("div",{className:"mobile-search-scopes",children:G2.map(I=>a.jsx("button",{type:"button",className:`mobile-scope-chip ${s===I?"active":""}`,onClick:()=>o(I),children:Co[I]},I))}),g.length>0&&a.jsxs("section",{className:"mobile-section",children:[a.jsxs("h3",{className:"mobile-section-title",children:[a.jsx(Dr,{size:14})," Agents"]}),a.jsx("div",{className:"mobile-card-list",children:g.slice(0,6).map(I=>a.jsxs("div",{className:"mobile-agent-card",children:[a.jsx("div",{className:"mobile-agent-dot","data-status":I.status||"idle"}),a.jsxs("div",{className:"mobile-agent-info",children:[a.jsx("span",{className:"mobile-agent-name",children:I.name}),a.jsx("span",{className:"mobile-agent-meta",children:I.status||"idle"})]})]},I.name))})]}),!u&&y.length>0&&a.jsx("section",{className:"mobile-section",children:a.jsx("div",{className:"mobile-card-list",children:y.slice(0,30).map((I,k)=>a.jsxs("button",{type:"button",className:"mobile-event-item",onClick:()=>f(I),children:[a.jsx("span",{className:"mobile-event-kind","data-kind":I.kind,children:Co[I.kind]||I.kind}),a.jsx("span",{className:"mobile-event-msg",children:Z2(I)}),a.jsx("span",{className:"mobile-event-time",children:Sr(I.ts)})]},`${I.ts}-${I.kind}-${k}`))})}),!u&&y.length===0&&n.length>0&&a.jsxs("div",{className:"mobile-empty",children:[a.jsx(xa,{size:40}),a.jsx("p",{children:"No matching activity."}),a.jsx("p",{className:"muted",children:"Try a different filter."})]}),c&&a.jsx(Dt,{open:!0,onClose:()=>f(null),title:Co[c.kind]||c.kind,children:a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Kind"}),a.jsx("span",{children:c.kind})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Time"}),a.jsx("span",{children:new Date(c.ts).toLocaleString()})]}),Object.entries(c).filter(([I])=>!["ts","kind"].includes(I)).map(([I,k])=>a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:I}),a.jsx("span",{style:{fontSize:12,maxWidth:200,wordBreak:"break-all"},children:typeof k=="object"?JSON.stringify(k):String(k)})]},I))]})}),g.length===0&&C.length===0&&a.jsxs("div",{className:"mobile-empty",children:[a.jsx(xa,{size:40}),a.jsx("p",{children:"No activity yet."}),a.jsx("p",{className:"muted",children:"Start a task or chat to see things here."})]})]})}function Z2(e){const t=e.kind||"";return t.includes("task")?`Task: ${e.title||e.id||"updated"}`:t.includes("agent")?`Agent: ${e.name||"status changed"}`:t.includes("artifacts")?`Plan: ${e.slug||"changed"}`:t.includes("mod")?`Mod: ${e.name||"changed"}`:t.includes("schedule")?`Schedule: ${e.name||"triggered"}`:JSON.stringify(e).slice(0,80)}function Tn({open:e,onClose:t,title:n,children:r,actions:i}){const l=w.useRef(null),s=w.useRef(null),o=w.useRef(null),u=w.useId(),d=w.useRef(0);return w.useEffect(()=>{if(!e)return;o.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const c='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',f=m=>{var y,g;if(m.key==="Escape"&&t(),m.key!=="Tab")return;const h=Array.from(((y=l.current)==null?void 0:y.querySelectorAll(c))??[]);if(h.length===0){m.preventDefault(),(g=l.current)==null||g.focus();return}const p=h[0],x=h[h.length-1],b=document.activeElement;if(m.shiftKey){(!b||b===p||b===l.current)&&(m.preventDefault(),x==null||x.focus());return}b===x&&(m.preventDefault(),p==null||p.focus())};return window.addEventListener("keydown",f),d.current=window.scrollY,document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${d.current}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%",requestAnimationFrame(()=>{var m,h;((m=s.current)==null?void 0:m.focus())??((h=l.current)==null||h.focus())}),()=>{var m;window.removeEventListener("keydown",f),document.documentElement.style.overflow="",document.body.style.overflow="",document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width="",window.scrollTo(0,d.current),(m=o.current)==null||m.focus()}},[e,t]),e?a.jsx("div",{className:"mobile-modal-overlay",onClick:c=>{c.target===c.currentTarget&&t()},children:a.jsxs("div",{ref:l,className:"mobile-modal",onClick:c=>c.stopPropagation(),role:"dialog","aria-modal":!0,"aria-label":n?void 0:"Modal","aria-labelledby":n?u:void 0,tabIndex:-1,children:[a.jsxs("div",{className:"mobile-modal-header",children:[n?a.jsx("h2",{id:u,className:"mobile-modal-title",children:n}):a.jsx("div",{}),a.jsx("button",{ref:s,type:"button",className:"mobile-icon-btn",onClick:t,"aria-label":"Close",children:a.jsx(Zn,{size:20})})]}),a.jsx("div",{className:"mobile-modal-content",children:r}),i&&a.jsx("div",{className:"mobile-modal-actions",children:i})]})}):null}const ug=["reasoning","code","design","planning","gitops","analysis"],gf={reasoning:"var(--accent)",code:"var(--info)",design:"var(--success)",planning:"var(--warning)",gitops:"var(--error)",analysis:"var(--text-dim)"};function yf({snapshot:e,onBack:t,onOpenAgent:n,selectedAgent:r,onRefresh:i}){const[l,s]=w.useState(e.agents||[]),[o,u]=w.useState(!e.agents),[d,c]=w.useState(""),[f,m]=w.useState(""),[h,p]=w.useState(null),[x,b]=w.useState(!1),[y,g]=w.useState(""),[v,C]=w.useState(!1);w.useEffect(()=>{if(r){const j=l.find(P=>P.name===r);j&&p(j)}},[r,l]);const z=async()=>{try{const j=await q.get("/agents");s(j.agents||[])}catch{}finally{u(!1)}},E=l.filter(j=>{if(d&&j.category!==d)return!1;if(f){const P=f.toLowerCase();if(!j.name.toLowerCase().includes(P)&&!(j.description||"").toLowerCase().includes(P))return!1}return!0}),A=async(j,P)=>{try{await q.post(`/agents/${encodeURIComponent(j)}/invoke`,{prompt:P}),C(!1),g("")}catch{}},L=async j=>{try{await q.post(`/agents/${encodeURIComponent(j)}/restart`),await z()}catch{}},I=async j=>{if(confirm(`Delete agent "${j}"?`))try{await q.del(`/agents/${encodeURIComponent(j)}`),s(P=>P.filter(B=>B.name!==j)),p(null),i==null||i()}catch{}},k=async j=>{try{const P=await q.post("/agents",j);s(B=>[...B,P]),b(!1),i==null||i()}catch{}};return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search agents…",value:f,onChange:j=>m(j.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>z(),"aria-label":"Refresh",children:a.jsx(_t,{size:16})}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>b(!0),"aria-label":"New agent",children:a.jsx(xt,{size:16})})]}),a.jsxs("div",{className:"mobile-search-scopes",children:[a.jsx("button",{type:"button",className:`mobile-scope-chip ${d?"":"active"}`,onClick:()=>c(""),children:"All"}),ug.map(j=>a.jsx("button",{type:"button",className:`mobile-scope-chip ${d===j?"active":""}`,onClick:()=>c(j),children:j},j))]}),o?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):E.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(Dr,{size:40}),a.jsx("p",{children:"No agents found."})]}):a.jsx("div",{className:"mobile-card-list",children:E.map(j=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>{p(j),n(j.name)},children:[a.jsx("div",{className:"mobile-agent-dot","data-status":j.status||"idle"}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:j.name}),a.jsx("span",{className:"mobile-list-meta",children:j.model||j.mode||"—"})]}),j.category&&a.jsx("span",{className:"mobile-list-badge",style:{color:gf[j.category]||"var(--text-dim)"},children:j.category}),a.jsx("span",{className:"mobile-list-badge","data-status":j.status||"idle",children:j.status||"idle"})]},j.name))}),h&&a.jsx(Dt,{open:!0,onClose:()=>p(null),title:h.name,actions:a.jsxs("div",{className:"mobile-task-detail-actions",children:[a.jsxs("button",{type:"button",className:"mobile-btn",onClick:()=>{g(""),C(!0)},children:[a.jsx(Zl,{size:14})," Invoke"]}),(h.isStuck||h.status==="error"||h.status==="working")&&a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",onClick:()=>L(h.name),children:[a.jsx(ux,{size:14})," Restart"]}),a.jsx("button",{type:"button",className:"mobile-btn mobile-btn-danger",onClick:()=>I(h.name),children:a.jsx(_r,{size:14})})]}),children:a.jsxs("div",{className:"mobile-agent-detail",children:[a.jsxs("div",{className:"mobile-agent-detail-status",children:[a.jsx("span",{className:"mobile-agent-dot","data-status":h.status||"idle"}),a.jsx("span",{className:"mobile-agent-detail-status-text",children:h.status||"idle"}),h.category&&a.jsx("span",{className:"mobile-list-badge",style:{color:gf[h.category]},children:h.category})]}),a.jsx("p",{className:"mobile-agent-detail-desc",children:h.description||"No description."}),a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Model"}),a.jsx("span",{className:"mono",children:h.model||"—"})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Mode"}),a.jsx("span",{children:h.mode||"subagent"})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Path"}),a.jsx("span",{className:"mono",style:{fontSize:11},children:h.path})]}),h.lastError&&a.jsxs("div",{className:"mobile-task-detail-row",style:{color:"var(--error)"},children:[a.jsx("span",{children:"Last error"}),a.jsx("span",{children:h.lastError.message})]}),h.tasksTotal!=null&&h.tasksTotal>0&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Success rate"}),a.jsxs("span",{children:[Math.round((h.successRate||0)*100),"%"]})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Last modified"}),a.jsx("span",{children:Sr(h.mtime)})]})]})]})}),a.jsxs(Tn,{open:v,onClose:()=>C(!1),title:`Invoke ${h==null?void 0:h.name}`,actions:a.jsxs("button",{type:"button",className:"mobile-btn",style:{width:"100%"},disabled:!y.trim(),onClick:()=>{h&&A(h.name,y.trim())},children:[a.jsx(Zl,{size:14})," Invoke"]}),children:[a.jsxs("p",{className:"muted",style:{marginBottom:12},children:["Model: ",a.jsx("span",{className:"mono",children:(h==null?void 0:h.model)||"—"})]}),a.jsx("textarea",{className:"mobile-input",rows:5,placeholder:"What should this agent do?",value:y,onChange:j=>g(j.target.value),autoFocus:!0})]}),a.jsx(J2,{open:x,onClose:()=>b(!1),onCreate:k})]})}function J2({open:e,onClose:t,onCreate:n}){const[r,i]=w.useState(""),[l,s]=w.useState(""),[o,u]=w.useState(""),[d,c]=w.useState("subagent"),[f,m]=w.useState("#8b5cf6"),[h,p]=w.useState(""),[x,b]=w.useState(""),[y,g]=w.useState(""),v=C=>{C.preventDefault(),r.trim()&&(n({name:r.trim(),description:l.trim(),model:o,mode:d,color:f,tools:[],tags:x.split(",").map(z=>z.trim()).filter(Boolean),category:h,prompt:y}),i(""),s(""),u(""),c("subagent"),m("#8b5cf6"),p(""),b(""),g(""))};return a.jsx(Tn,{open:e,onClose:t,title:"New Agent",actions:a.jsxs("button",{type:"submit",form:"new-agent-form",className:"mobile-btn",style:{width:"100%"},children:[a.jsx(xt,{size:14})," Create"]}),children:a.jsxs("form",{id:"new-agent-form",onSubmit:v,className:"mobile-task-form",children:[a.jsx("label",{className:"mobile-field-label",children:"Name *"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"my-agent",pattern:"[a-z0-9][a-z0-9-]{0,63}",value:r,onChange:C=>i(C.target.value),autoFocus:!0,required:!0}),a.jsx("label",{className:"mobile-field-label",children:"Description"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"What does this agent do?",value:l,onChange:C=>s(C.target.value)}),a.jsx("label",{className:"mobile-field-label",children:"Model"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"(provider default)",value:o,onChange:C=>u(C.target.value)}),a.jsx("label",{className:"mobile-field-label",children:"Category"}),a.jsxs("select",{className:"mobile-input",value:h,onChange:C=>p(C.target.value),children:[a.jsx("option",{value:"",children:"None"}),ug.map(C=>a.jsx("option",{value:C,children:C},C))]}),a.jsx("label",{className:"mobile-field-label",children:"Tags (comma-separated)"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"tag1, tag2",value:x,onChange:C=>b(C.target.value)})]})})}function eC({sessions:e,opencodeSessions:t,activeSessionId:n,activeOpencodeSessionId:r,activeProject:i,creating:l,onCreateSession:s,onSelectSession:o,onSelectOpencodeSession:u}){const[d,c]=w.useState("all"),[f,m]=w.useState(!1),h=30,p=d==="all"?[...e,...t].sort((g,v)=>Number(v.mtime)-Number(g.mtime)):e,x=f?p:p.slice(0,h),b=t.length,y=g=>{if(g.source==="opencode"){u(g);return}o(g.id)};return a.jsxs("div",{className:"chat-sessions",children:[a.jsxs("div",{className:"chat-sessions-header",children:[a.jsx("span",{className:"chat-sessions-header-title",children:"Sessions"}),a.jsx("span",{className:"chat-sessions-count",children:x.length})]}),b>0&&a.jsxs("div",{className:"chat-sessions-toggle",children:[a.jsx("button",{type:"button",className:`chat-sessions-toggle-btn ${d==="bizar"?"active":""}`,onClick:()=>c("bizar"),children:"Bizar"}),a.jsxs("button",{type:"button",className:`chat-sessions-toggle-btn ${d==="all"?"active":""}`,onClick:()=>c("all"),children:["All (",b," opencode)"]})]}),a.jsxs("button",{type:"button",className:"chat-sessions-new",onClick:s,disabled:l||!i,title:i?"Create new session":"Pick a project first","aria-label":"Create new session",children:[l?a.jsx(Wm,{size:"sm"}):a.jsx(xt,{size:14}),a.jsx("span",{children:l?"Creating…":"New session"})]}),e.length===0?a.jsx("div",{className:"chat-sessions-empty",children:a.jsx(Ix,{icon:a.jsx(Jl,{size:20}),title:i?"No sessions yet":"No project",message:i?"Create your first session to start chatting.":"Pick a project in Overview to scope chat sessions.",action:i?a.jsxs(pr,{variant:"primary",size:"sm",onClick:s,loading:l,children:[a.jsx(xt,{size:12})," New session"]}):a.jsxs(pr,{variant:"secondary",size:"sm",onClick:()=>{window.location.hash="#overview"},children:[a.jsx(Pu,{size:12})," Open Overview"]})})}):a.jsx("ul",{className:"chat-sessions-list",children:x.map(g=>{const v=g.source==="opencode",C=v?r===g.id:n===g.id;return a.jsxs("li",{className:`chat-sessions-item ${C?"active":""} ${v?"chat-sessions-item-opencode":""}`,onClick:()=>y(g),title:v?`Open in dashboard: ${g.title||g.id}`:g.id,children:[v&&a.jsx(Z1,{size:10,className:"chat-sessions-item-icon"}),a.jsx("span",{className:"chat-sessions-item-id",children:g.title||g.id}),a.jsx("span",{className:"chat-sessions-item-meta",children:new Date(Number(g.mtime)).toLocaleDateString()})]},v?`oc-${g.id}`:g.id)})}),p.length>h&&a.jsx("button",{type:"button",className:"chat-sessions-show-more",onClick:()=>m(g=>!g),children:f?`Show less (${p.length-h} hidden)`:`Show all ${p.length} sessions`})]})}function tC(e){const{activeSource:t}=e;return a.jsx("div",{className:`chat-composer-wrap chat-composer-source-${t??"none"} legacy`,children:a.jsx("div",{className:"chat-composer-pill",children:a.jsx(T2,{...e})})})}function nC({sessionId:e,messages:t,pinned:n,agent:r,model:i,agents:l,mcps:s,allCommands:o,activeSource:u="bizar",onRename:d,onDelete:c}){const[f,m]=w.useState(!1),[h,p]=w.useState(!1),x=f?l:l.slice(0,4),b=h?o:o.slice(0,4),y=i.includes("/")?i.split("/")[0]:"";return a.jsxs("div",{className:"chat-info",children:[a.jsxs("div",{className:"chat-info-card",children:[a.jsxs("div",{className:"chat-info-card-title",children:[a.jsx(On,{size:14})," Session",a.jsx("span",{className:`chat-source-badge chat-source-${u??"none"}`,style:{marginLeft:"auto"},children:u==="opencode"?"opencode":"bizar chat"})]}),a.jsxs("dl",{className:"env-table",children:[a.jsx("dt",{children:"id"}),a.jsx("dd",{className:"mono",children:e||"Live"}),a.jsx("dt",{children:"Messages"}),a.jsx("dd",{className:"mono",children:t.length}),a.jsx("dt",{children:"Pinned"}),a.jsx("dd",{className:"mono",children:n.size}),a.jsx("dt",{children:"Agent"}),a.jsx("dd",{className:"mono",children:r||"—"}),a.jsx("dt",{children:"Model"}),a.jsx("dd",{className:"mono ellipsis",title:i,children:i||"—"}),y&&a.jsxs(a.Fragment,{children:[a.jsx("dt",{children:"Provider"}),a.jsx("dd",{className:"mono",children:y})]})]}),(d||c)&&a.jsxs("div",{className:"chat-info-actions",children:[d&&a.jsxs("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:d,children:[a.jsx(Au,{size:12,"aria-hidden":!0})," Rename"]}),c&&a.jsxs("button",{type:"button",className:"btn btn-ghost btn-danger btn-sm",onClick:c,children:[a.jsx(_r,{size:12,"aria-hidden":!0})," Delete"]})]})]}),a.jsxs("div",{className:"chat-info-card",children:[a.jsxs("div",{className:"chat-info-card-title",children:[a.jsx(Dr,{size:14})," Agents",a.jsx("span",{className:"chat-info-card-count",children:l.length})]}),a.jsx("ul",{className:"mod-mini-list",children:x.map(g=>a.jsxs("li",{className:"mod-mini",children:[a.jsxs("span",{className:"mod-mini-name",children:["@",g.name]}),a.jsx("span",{className:"mod-mini-meta",children:g.model||g.mode||""})]},g.name))}),l.length>4&&a.jsx("button",{type:"button",className:"chat-info-card-toggle",onClick:()=>m(g=>!g),children:f?"− Show fewer":`+ ${l.length-4} more`})]}),a.jsxs("div",{className:"chat-info-card",children:[a.jsxs("div",{className:"chat-info-card-title",children:[a.jsx(cx,{size:14})," MCPs",a.jsx("span",{className:"chat-info-card-count",children:s.length})]}),a.jsxs("ul",{className:"mod-mini-list",children:[s.length===0?a.jsx("li",{className:"muted",children:"No MCPs configured."}):null,s.map(g=>a.jsxs("li",{className:"mod-mini",children:[a.jsx("span",{className:"mod-mini-name",children:g.id}),a.jsx("span",{className:`mod-mini-pill ${g.enabled?"on":"off"}`,children:g.enabled?"on":"off"})]},g.id))]})]}),a.jsxs("div",{className:"chat-info-card",children:[a.jsxs("button",{type:"button",className:"chat-info-card-title chat-info-card-title-button",onClick:()=>p(g=>!g),"aria-expanded":h,children:[a.jsx(hx,{size:14})," Slash commands",a.jsx("span",{className:"chat-info-card-count",children:o.length}),a.jsx(Ss,{size:12,className:`chat-info-card-chevron ${h?"open":""}`})]}),h&&a.jsx("ul",{className:"mod-mini-list",children:b.map(g=>a.jsxs("li",{children:[a.jsx("code",{children:g.cmd}),a.jsx("span",{className:"muted",children:g.desc})]},g.cmd))})]})]})}function rC({snapshot:e,settings:t,setActiveTab:n,initialTaskId:r,onClearTaskId:i}){const l=bx(),s=kx(),o=A2(e,t,r??"");w.useEffect(()=>{o.setToast({error:O=>l.error(O),success:O=>l.success(O),info:O=>l.info(O),warning:O=>l.warning(O)})},[o,l]);const[u,d]=w.useState(""),[c,f]=w.useState(t.defaultAgent||"odin"),[m,h]=w.useState(t.defaultModel||""),[p,x]=w.useState([]),[b,y]=w.useState(!1),[g,v]=w.useState(!1),C=w.useRef(null),{allCommands:z,suggestions:E,setQuery:A}=L2(e);w.useEffect(()=>{A(u)},[u,A]);const L=()=>{var O;return(O=C.current)==null?void 0:O.click()},I=O=>{const W=O.target.files;if(!W)return;const de=[];for(let ee=0;ee<W.length;ee++)de.push(W[ee].name);x(ee=>{const R=de.filter(V=>!ee.includes(V));return[...ee,...R]}),C.current&&(C.current.value="")},k=async()=>{const O=u.trim();if(!O)return;d(""),A(""),(await o.onSend(O,c,m,p)).ok&&o.jumpToLatest()},j=async()=>{o.busy.create||(await o.onCreateSession(),y(!1))},P=O=>{s.open({title:"Delete message?",children:a.jsx("p",{style:{margin:0},children:"This action cannot be undone."}),footer:a.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[a.jsx(pr,{variant:"secondary",size:"sm",onClick:()=>s.close(),children:"Cancel"}),a.jsx(pr,{variant:"danger",size:"sm",onClick:()=>{s.close(),o.deleteMessage(O)},children:"Delete"})]})})},B=(O,W)=>{s.open({title:"Delete session?",children:a.jsxs("p",{style:{margin:0},children:["Delete ",a.jsx("strong",{children:W}),"? This cannot be undone."]}),footer:a.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[a.jsx(pr,{variant:"secondary",size:"sm",onClick:()=>s.close(),children:"Cancel"}),a.jsx(pr,{variant:"danger",size:"sm",onClick:async()=>{s.close(),await o.deleteSession(O)},children:"Delete"})]})})};return a.jsxs("div",{className:"chat-shell",children:[a.jsx(Tx,{activeProject:e.activeProject,sessionCount:o.sessions.length,sessionsOpen:b,infoOpen:g,onToggleSessions:()=>y(O=>!O),onToggleInfo:()=>v(O=>!O),onOpenOverview:()=>n==null?void 0:n("overview")}),a.jsxs("div",{className:"chat-body",children:[a.jsx("aside",{className:`chat-sessions ${b?"":"chat-sessions-hidden"}`,children:a.jsx(eC,{sessions:o.sessions,opencodeSessions:o.opencodeSessions,activeSessionId:o.sessionId,activeOpencodeSessionId:o.activeOpencodeSessionId,activeProject:e.activeProject,onCreateSession:j,onSelectSession:o.selectBizarSession,onSelectOpencodeSession:O=>o.loadOpencodeSession(O.id),creating:o.busy.create})}),a.jsxs("main",{className:"chat-main",children:[a.jsx(j2,{messages:o.activeSource==="opencode"?o.opencodeMessages:o.bizarMessages,loading:o.loading,activeProject:e.activeProject,sessionId:o.activeSource==="opencode"?o.activeOpencodeSessionId??o.sessionId:o.sessionId,pinned:o.pinned,activeSource:o.activeSource,onPickSuggestion:O=>d(O),onCopy:O=>o.copyMessage(O),onDelete:P,onTogglePin:o.togglePin,onRegenerate:o.onRegenerate}),a.jsx(tC,{agent:c,setAgent:f,model:m,setModel:h,text:u,setText:d,sending:o.sending,activeSource:o.activeSource,onSend:k,attachments:p,setAttachments:x,suggestions:E,onPickSuggestion:O=>d(`${O.split(" ")[0]} `),agents:e.agents||[],onAttach:L,sessionsOpen:b,infoOpen:g}),a.jsx("input",{ref:C,type:"file",multiple:!0,style:{display:"none"},onChange:I})]}),a.jsx("aside",{className:`chat-info ${g?"":"chat-info-hidden"}`,children:a.jsx(nC,{sessionId:o.activeSource==="opencode"?o.activeOpencodeSessionId??o.sessionId:o.sessionId,messages:o.activeSource==="opencode"?o.opencodeMessages:o.bizarMessages,pinned:o.pinned,agent:c,model:m,agents:e.agents||[],mcps:e.mcps||[],allCommands:z,activeSource:o.activeSource,onDelete:()=>{const O=o.activeSource==="opencode"?o.activeOpencodeSessionId:o.sessionId;O&&B(O,O)}})})]})]})}function iC({onBack:e}){const[t,n]=w.useState([]),[r,i]=w.useState(!0),[l,s]=w.useState({}),[o,u]=w.useState(!1),d=async()=>{try{const x=await q.get("/config"),b=Object.entries(x).map(([y,g])=>({key:y,value:g,type:c(g)}));n(b),s(Object.fromEntries(Object.entries(x).map(([y,g])=>[y,g])))}catch{}finally{i(!1)}};w.useEffect(()=>{d()},[]);const c=x=>typeof x=="boolean"?"boolean":typeof x=="number"?"number":typeof x=="string"?"string":Array.isArray(x)?"array":x&&typeof x=="object"?"object":"unknown",f=(x,b)=>{s(y=>({...y,[x]:b}))},m=async()=>{u(!0);try{await q.patch("/config",l),await d()}catch{}finally{u(!1)}},h=(x,b)=>{s(y=>({...y,[x]:b}))},p=x=>{const b=l[x.key];switch(x.type){case"boolean":return a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:!!b,onChange:y=>f(x.key,y.target.checked)}),a.jsx("span",{className:"mobile-toggle-slider"})]});case"number":return a.jsx("input",{className:"mobile-input mobile-input-sm",type:"number",inputMode:"numeric",value:String(b??""),onChange:y=>f(x.key,Number(y.target.value))});case"string":return a.jsx("input",{className:"mobile-input mobile-input-sm",type:"text",value:String(b??""),onChange:y=>f(x.key,y.target.value)});case"object":case"array":return a.jsx("textarea",{className:"mobile-input mobile-input-sm",rows:2,value:JSON.stringify(b??null,null,2),onChange:y=>{try{f(x.key,JSON.parse(y.target.value))}catch{}}});default:return a.jsx("span",{className:"mobile-setting-value mono",children:String(b??"null")})}};return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsxs("span",{style:{fontSize:14,color:"var(--text-muted)",flex:1},children:[t.length," config entries"]}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>d(),"aria-label":"Refresh",children:a.jsx(_t,{size:16})}),a.jsxs("button",{type:"button",className:"mobile-btn",disabled:o,onClick:()=>m(),children:[a.jsx(Fm,{size:14})," ",o?"Saving…":"Save all"]})]}),r?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):t.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(Pr,{size:40}),a.jsx("p",{children:"No config entries."})]}):a.jsx("div",{className:"mobile-config-list",children:t.map(x=>a.jsxs("div",{className:"mobile-config-row",children:[a.jsxs("div",{className:"mobile-config-key",children:[a.jsx("span",{className:"mono",children:x.key}),a.jsx("span",{className:"mobile-config-type",children:x.type})]}),a.jsx("div",{className:"mobile-config-value",children:p(x)}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>h(x.key,x.defaultValue),"aria-label":"Reset to default",title:"Reset",children:a.jsx(ax,{size:14})})]},x.key))})]})}function lC({onBack:e}){const[t,n]=w.useState([]),[r,i]=w.useState(!0),[l,s]=w.useState(null),[o,u]=w.useState(""),d=async()=>{try{const h=await q.get("/history");if(Array.isArray(h.history)){n(h.history);return}if(Array.isArray(h.projects)){const p=new Map;for(const x of h.events||[]){const b=x.projectId;if(!b)continue;const y=p.get(b);(!y||new Date(x.ts).getTime()>new Date(y.ts).getTime())&&p.set(b,x)}n(h.projects.map(x=>{const b=p.get(x.id);return{id:x.id,ts:x.lastAccessed||(b==null?void 0:b.ts)||new Date(0).toISOString(),agent:x.name,taskCount:x.tasks.total,summary:`${x.path} · ${x.tasks.done}/${x.tasks.total} done · ${x.plans} plan${x.plans===1?"":"s"}`,output:b?`${b.kind}${b.text?` — ${b.text}`:""}`:"No recent events."}}));return}n([])}catch{}finally{i(!1)}};w.useEffect(()=>{d()},[]);const c=h=>{if(!h)return"—";const p=Math.floor(h/1e3);if(p<60)return`${p}s`;const x=Math.floor(p/60),b=p%60;return`${x}m ${b}s`},f=h=>new Date(h).toLocaleString(),m=o.trim()?t.filter(h=>{const p=o.toLowerCase();return(h.agent||"session").toLowerCase().includes(p)||(h.summary||"").toLowerCase().includes(p)||(h.output||"").toLowerCase().includes(p)}):t;return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search history…",value:o,onChange:h=>u(h.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>d(),"aria-label":"Refresh",children:a.jsx(_t,{size:16})})]}),r?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):m.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(ka,{size:40}),a.jsx("p",{children:t.length===0?"No history yet.":"No matching sessions."})]}):a.jsx("div",{className:"mobile-card-list",children:m.map(h=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>s(h),children:[a.jsx("div",{className:"mobile-list-icon",children:a.jsx(ka,{size:16})}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:h.agent||"Session"}),a.jsxs("span",{className:"mobile-list-meta",children:[f(h.ts),h.duration?` · ${c(h.duration)}`:"",h.taskCount?` · ${h.taskCount} tasks`:""]})]})]},h.id))}),l&&a.jsxs(Dt,{open:!0,onClose:()=>s(null),title:"Session Detail",children:[a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Agent"}),a.jsx("span",{children:l.agent||"—"})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Started"}),a.jsx("span",{children:f(l.ts)})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Duration"}),a.jsx("span",{children:c(l.duration)})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Tasks"}),a.jsx("span",{children:l.taskCount||0})]})]}),l.summary&&a.jsxs("div",{style:{marginTop:12},children:[a.jsx("h4",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4},children:"Summary"}),a.jsx("p",{style:{fontSize:13},children:l.summary})]}),l.output&&a.jsxs("div",{style:{marginTop:12},children:[a.jsx("h4",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4},children:"Output"}),a.jsxs("pre",{className:"mono",style:{fontSize:11,whiteSpace:"pre-wrap",wordBreak:"break-all",background:"var(--bg-elev-2)",padding:8,borderRadius:6},children:[l.output.slice(0,1e3),l.output.length>1e3?"…":""]})]})]})]})}function sC({snapshot:e,onBack:t}){const[n,r]=w.useState(e.mods||[]),[i,l]=w.useState(!e.mods),[s,o]=w.useState(""),[u,d]=w.useState("all"),[c,f]=w.useState(null),m=async()=>{try{const x=await q.get("/mods");r(x.mods||[])}catch{}finally{l(!1)}};w.useEffect(()=>{e.mods?(r(e.mods),l(!1)):m()},[e.mods]);const h=async(x,b)=>{try{await q.patch(`/mods/${encodeURIComponent(x)}`,{enabled:b}),r(y=>y.map(g=>g.id===x?{...g,enabled:b}:g)),(c==null?void 0:c.id)===x&&f(y=>y&&{...y,enabled:b})}catch{}},p=n.filter(x=>{if(u==="enabled"&&!x.enabled||u==="disabled"&&x.enabled)return!1;if(s){const b=s.toLowerCase();return x.name.toLowerCase().includes(b)||x.description.toLowerCase().includes(b)}return!0});return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search mods…",value:s,onChange:x=>o(x.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>m(),"aria-label":"Refresh",children:a.jsx(_t,{size:16})})]}),a.jsx("div",{className:"mobile-search-scopes",children:["all","enabled","disabled"].map(x=>a.jsx("button",{type:"button",className:`mobile-scope-chip ${u===x?"active":""}`,onClick:()=>d(x),children:x.charAt(0).toUpperCase()+x.slice(1)},x))}),i?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):p.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(Pr,{size:40}),a.jsx("p",{children:"No mods found."})]}):a.jsx("div",{className:"mobile-card-list",children:p.map(x=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>f(x),children:[a.jsx("div",{className:"mobile-list-icon",children:a.jsx(Pr,{size:16})}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:x.name}),a.jsxs("span",{className:"mobile-list-meta",children:["v",x.version," · ",x.author]})]}),a.jsx("span",{className:`mobile-list-badge ${x.enabled?"badge-on":"badge-off"}`,children:x.enabled?"on":"off"})]},x.id))}),c&&a.jsx(Dt,{open:!0,onClose:()=>f(null),title:c.name,actions:a.jsx("div",{className:"mobile-task-detail-actions",children:a.jsxs("button",{type:"button",className:"mobile-btn",style:{flex:1},onClick:()=>{c&&h(c.id,!c.enabled)},children:[a.jsx(Om,{size:14})," ",c.enabled?"Disable":"Enable"]})}),children:a.jsxs("div",{className:"mobile-agent-detail",children:[a.jsx("p",{className:"mobile-agent-detail-desc",children:c.description||"No description."}),a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Version"}),a.jsx("span",{className:"mono",children:c.version})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Author"}),a.jsx("span",{children:c.author})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Bizar"}),a.jsx("span",{className:"mono",children:c.bizar})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Type"}),a.jsx("span",{children:c.type})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Permissions"}),a.jsx("span",{children:c.permissions.length})]}),c.installedAt&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Installed"}),a.jsx("span",{children:new Date(c.installedAt).toLocaleDateString()})]})]})]})})]})}function oC({snapshot:e,onNavigate:t}){var s,o,u;const[n,r]=w.useState(""),i=[{id:"artifacts",icon:qn,label:"Plans",count:e.artifacts.length||0,desc:"Visual artifacts with elements & comments"},{id:"agents",icon:Dr,label:"Agents",count:((s=e.agents)==null?void 0:s.length)||0,desc:"The Norse pantheon"},{id:"skills",icon:Pr,label:"Skills",count:null,desc:"Agent capabilities & tools"},{id:"mods",icon:Pr,label:"Mods",count:((o=e.mods)==null?void 0:o.length)||0,desc:"Installed modifications"},{id:"schedules",icon:va,label:"Schedules",count:((u=e.schedules)==null?void 0:u.length)||0,desc:"Cron jobs & automated tasks"},{id:"history",icon:ka,label:"History",count:null,desc:"Past sessions & outputs"},{id:"config",icon:Bm,label:"Config",count:null,desc:"Key-value configuration editor"}],l=n.trim()?i.filter(d=>d.label.toLowerCase().includes(n.toLowerCase())||d.desc.toLowerCase().includes(n.toLowerCase())):i;return a.jsxs("div",{className:"mobile-view",children:[a.jsx("div",{className:"mobile-tasks-toolbar",children:a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search…",value:n,onChange:d=>r(d.target.value),style:{flex:1}})}),a.jsx("div",{className:"mobile-card-list",children:l.map(d=>{const c=d.icon;return a.jsxs("button",{type:"button",className:"mobile-more-nav-item",onClick:()=>t(d.id),children:[a.jsx("div",{className:"mobile-more-nav-icon",children:a.jsx(c,{size:20})}),a.jsxs("div",{className:"mobile-more-nav-content",children:[a.jsxs("span",{className:"mobile-more-nav-label",children:[d.label,d.count!=null&&a.jsx("span",{className:"mobile-more-nav-count",children:d.count})]}),a.jsx("span",{className:"mobile-more-nav-desc",children:d.desc})]}),a.jsx(dd,{size:16,className:"mobile-more-nav-arrow"})]},d.id)})}),a.jsx("div",{className:"mobile-more-footer",children:a.jsxs("a",{href:"/?desktop=1",className:"mobile-more-link",children:["Switch to Desktop ",a.jsx(dd,{size:14})]})})]})}const Ju=[{id:"task",label:"Task",color:"var(--info)"},{id:"note",label:"Note",color:"var(--text-dim)"},{id:"decision",label:"Decision",color:"var(--accent)"},{id:"question",label:"Question",color:"var(--warning)"}];function jo(e){var t;return((t=Ju.find(n=>n.id===e))==null?void 0:t.color)||"var(--text-dim)"}function aC({type:e,size:t=12}){switch(e){case"task":return a.jsx(es,{size:t,style:{color:"var(--info)"}});case"note":return a.jsx(md,{size:t,style:{color:"var(--text-dim)"}});case"decision":return a.jsx(es,{size:t,style:{color:"var(--accent)"}});case"question":return a.jsx(K1,{size:t,style:{color:"var(--warning)"}});default:return a.jsx(md,{size:t})}}function uC({slug:e,onBack:t}){const[n,r]=w.useState(null),[i,l]=w.useState(null),[s,o]=w.useState(!0),[u,d]=w.useState(!1),[c,f]=w.useState(null),[m,h]=w.useState(!1),[p,x]=w.useState(!1),[b,y]=w.useState(!1),[g,v]=w.useState(""),C=async()=>{o(!0);try{const I=await q.get(`/plans/${encodeURIComponent(e)}`);r(I.canvas),l(I.meta)}catch{}finally{o(!1)}};w.useEffect(()=>{C()},[e]);const z=async(I,k,j)=>{try{const P=((n==null?void 0:n.elements)||[]).reduce((O,W)=>Math.max(O,W.x||0),40),B=((n==null?void 0:n.elements)||[]).reduce((O,W)=>Math.max(O,W.y||0),40);await q.post(`/plans/${encodeURIComponent(e)}/elements`,{type:I,title:k,content:j,x:20+P,y:20+B,width:240,height:120}),await C(),x(!1)}catch{}},E=async(I,k)=>{try{await q.put(`/plans/${encodeURIComponent(e)}/elements/${encodeURIComponent(I)}`,k),await C(),f(null)}catch{}},A=async I=>{if(confirm("Delete this element?"))try{await q.del(`/plans/${encodeURIComponent(e)}/elements/${encodeURIComponent(I)}`),f(null),await C()}catch{}},L=async(I,k)=>{try{const j=k?`/plans/${encodeURIComponent(e)}/elements/${encodeURIComponent(k)}/comments`:`/plans/${encodeURIComponent(e)}/comments`;await q.post(j,{text:I,elementId:k}),await C(),v(""),y(!1)}catch{}};return s||!n||!i?a.jsx("div",{className:"mobile-view",children:a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading canvas…"})})}):a.jsxs("div",{className:"mobile-view mobile-view-canvas",children:[a.jsxs("div",{className:"mobile-canvas-bar",children:[a.jsxs("div",{className:"mobile-canvas-meta",children:[a.jsx("span",{className:"mobile-canvas-title",children:i.title||e}),a.jsx("span",{className:"mobile-canvas-status","data-status":i.status,children:i.status})]}),a.jsxs("div",{className:"mobile-canvas-actions",children:[a.jsx("button",{type:"button",className:`mobile-icon-btn ${u?"active":""}`,onClick:()=>d(I=>!I),"aria-label":u?"Done editing":"Edit",children:a.jsx(Au,{size:16})}),a.jsxs("button",{type:"button",className:"mobile-icon-btn",onClick:()=>h(I=>!I),"aria-label":"Comments",children:[a.jsx(On,{size:16}),n.comments.length>0&&a.jsx("span",{className:"mobile-canvas-comment-count",children:n.comments.length})]}),u&&a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>x(!0),"aria-label":"Add element",children:a.jsx(xt,{size:16})})]})]}),a.jsxs("div",{className:"mobile-canvas-elements",children:[n.elements.length===0&&a.jsxs("div",{className:"mobile-empty",children:[a.jsx("p",{children:"No elements yet."}),u&&a.jsxs("button",{type:"button",className:"mobile-btn",onClick:()=>x(!0),children:[a.jsx(xt,{size:14})," Add Element"]})]}),n.elements.map(I=>a.jsxs("button",{type:"button",className:`mobile-canvas-element ${(c==null?void 0:c.id)===I.id?"selected":""}`,style:{borderColor:jo(I.type)},onClick:()=>{u&&f(I)},"aria-pressed":(c==null?void 0:c.id)===I.id,children:[a.jsxs("div",{className:"mobile-canvas-el-header",style:{background:`${jo(I.type)}18`},children:[a.jsx(aC,{type:I.type,size:12}),a.jsx("span",{className:"mobile-canvas-el-type",style:{color:jo(I.type)},children:I.type}),I.status&&I.status!=="open"&&a.jsx("span",{className:"mobile-canvas-el-status",children:I.status})]}),a.jsx("div",{className:"mobile-canvas-el-title",children:I.title||"Untitled"}),I.content&&a.jsxs("div",{className:"mobile-canvas-el-content",children:[I.content.slice(0,120),I.content.length>120?"…":""]}),a.jsxs("div",{className:"mobile-canvas-el-comments",children:[a.jsx(On,{size:10}),n.comments.filter(k=>k.elementId===I.id).length]})]},I.id))]}),m&&a.jsxs("div",{className:"mobile-canvas-comments",children:[a.jsxs("div",{className:"mobile-canvas-comments-header",children:[a.jsxs("h4",{children:["Comments (",n.comments.length,")"]}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>h(!1),children:a.jsx(Zn,{size:16})})]}),a.jsxs("div",{className:"mobile-canvas-comment-list",children:[n.comments.length===0&&a.jsx("p",{className:"mobile-empty-inline",children:"No comments yet."}),n.comments.map(I=>a.jsxs("div",{className:"mobile-canvas-comment",children:[a.jsxs("div",{className:"mobile-canvas-comment-head",children:[a.jsx("span",{className:"mono",children:I.author}),a.jsx("span",{className:"muted",children:Sr(I.created)})]}),a.jsx("div",{className:"mobile-canvas-comment-text",children:I.text})]},I.id))]}),a.jsxs("div",{className:"mobile-canvas-comment-input",children:[a.jsx("textarea",{className:"mobile-input",rows:2,placeholder:"Add a comment…",value:g,onChange:I=>v(I.target.value)}),a.jsx("button",{type:"button",className:"mobile-btn",disabled:!g.trim(),onClick:()=>{L(g.trim(),null)},children:"Post"})]})]}),c&&a.jsx(Dt,{open:!0,onClose:()=>f(null),title:`Edit ${c.title||c.type}`,actions:a.jsxs("div",{className:"mobile-task-detail-actions",children:[a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-danger",onClick:()=>A(c.id),children:[a.jsx(_r,{size:14})," Delete"]}),a.jsxs("button",{type:"button",className:"mobile-btn",onClick:()=>y(!0),children:[a.jsx(On,{size:14})," Comment"]})]}),children:a.jsx(cC,{element:c,onSave:I=>E(c.id,I),onClose:()=>f(null)})}),a.jsx(dC,{open:p,onClose:()=>x(!1),onAdd:z}),a.jsx(Tn,{open:b,onClose:()=>y(!1),title:"Add Comment",actions:a.jsxs("button",{type:"button",className:"mobile-btn",style:{width:"100%"},disabled:!g.trim(),onClick:()=>{L(g.trim(),(c==null?void 0:c.id)||null),y(!1)},children:[a.jsx(On,{size:14})," Post"]}),children:a.jsx("textarea",{className:"mobile-input",rows:3,placeholder:"Your comment…",value:g,onChange:I=>v(I.target.value),autoFocus:!0})})]})}function cC({element:e,onSave:t,onClose:n}){const[r,i]=w.useState(e.type),[l,s]=w.useState(e.title||""),[o,u]=w.useState(e.content||""),[d,c]=w.useState(e.status||"open");return a.jsxs("form",{className:"mobile-task-form",onSubmit:f=>{f.preventDefault(),t({type:r,title:l,content:o,status:d}),n()},children:[a.jsx("label",{className:"mobile-field-label",children:"Type"}),a.jsx("select",{className:"mobile-input",value:r,onChange:f=>i(f.target.value),children:Ju.map(f=>a.jsx("option",{value:f.id,children:f.label},f.id))}),a.jsx("label",{className:"mobile-field-label",children:"Title"}),a.jsx("input",{className:"mobile-input",type:"text",value:l,onChange:f=>s(f.target.value)}),a.jsx("label",{className:"mobile-field-label",children:"Status"}),a.jsx("input",{className:"mobile-input",type:"text",value:d,onChange:f=>c(f.target.value),placeholder:"open / done / blocked"}),a.jsx("label",{className:"mobile-field-label",children:"Content (markdown)"}),a.jsx("textarea",{className:"mobile-input",rows:4,value:o,onChange:f=>u(f.target.value)}),a.jsx("button",{type:"submit",className:"mobile-btn",style:{width:"100%",marginTop:8},children:"Save"})]})}function dC({open:e,onClose:t,onAdd:n}){const[r,i]=w.useState("task"),[l,s]=w.useState(""),[o,u]=w.useState(""),d=c=>{c.preventDefault(),l.trim()&&(n(r,l.trim(),o.trim()),s(""),u(""))};return a.jsx(Tn,{open:e,onClose:t,title:"Add Element",actions:a.jsxs("button",{type:"submit",form:"add-el-form",className:"mobile-btn",style:{width:"100%"},children:[a.jsx(xt,{size:14})," Add"]}),children:a.jsxs("form",{id:"add-el-form",onSubmit:d,className:"mobile-task-form",children:[a.jsx("label",{className:"mobile-field-label",children:"Type"}),a.jsx("select",{className:"mobile-input",value:r,onChange:c=>i(c.target.value),children:Ju.map(c=>a.jsx("option",{value:c.id,children:c.label},c.id))}),a.jsx("label",{className:"mobile-field-label",children:"Title *"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"Element title",value:l,onChange:c=>s(c.target.value),autoFocus:!0,required:!0}),a.jsx("label",{className:"mobile-field-label",children:"Content (markdown)"}),a.jsx("textarea",{className:"mobile-input",rows:3,placeholder:"Description…",value:o,onChange:c=>u(c.target.value)})]})})}function fC({snapshot:e,onBack:t,onOpenArtifact:n}){const[r,i]=w.useState(e.artifacts||[]),[l,s]=w.useState(!e.artifacts),[o,u]=w.useState(""),[d,c]=w.useState(!1),[f,m]=w.useState(""),[h,p]=w.useState(""),x=async()=>{try{const g=await q.get("/artifacts");i(g.artifacts||[])}catch{}finally{s(!1)}},b=async()=>{if(f.trim())try{const g=await q.post("/artifacts",{slug:f.trim(),title:h.trim()||void 0});c(!1),m(""),p(""),n(g.slug)}catch{}},y=o.trim()?r.filter(g=>(g.title||g.slug||"").toLowerCase().includes(o.toLowerCase())):r;return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search artifacts…",value:o,onChange:g=>u(g.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>x(),"aria-label":"Refresh",children:a.jsx(_t,{size:16})})]}),a.jsx("div",{style:{marginBottom:12},children:a.jsxs("button",{type:"button",className:"mobile-btn",style:{width:"100%"},onClick:()=>c(!0),children:[a.jsx(xt,{size:14})," New Artifact"]})}),l?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):y.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(qn,{size:40}),a.jsx("p",{children:"No artifacts yet."})]}):a.jsx("div",{className:"mobile-card-list",children:y.map(g=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>n(g.slug),children:[a.jsx("div",{className:"mobile-list-icon",children:a.jsx(qn,{size:16})}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:g.title||g.slug}),a.jsxs("span",{className:"mobile-list-meta",children:[g.status," · ",g.source,g.elementCount!=null?` · ${g.elementCount} elements`:"",g.commentCount!=null?` · ${g.commentCount} comments`:""]})]}),a.jsx("span",{className:"mobile-list-badge","data-status":g.status,children:g.status})]},g.slug))}),a.jsx(Tn,{open:d,onClose:()=>c(!1),title:"New Artifact",actions:a.jsxs("button",{type:"submit",form:"new-plan-form",className:"mobile-btn",style:{width:"100%"},children:[a.jsx(xt,{size:14})," Create"]}),children:a.jsxs("form",{id:"new-plan-form",onSubmit:g=>{g.preventDefault(),b()},className:"mobile-task-form",children:[a.jsx("label",{className:"mobile-field-label",children:"Slug *"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"my-plan",pattern:"[a-z0-9][a-z0-9-]{0,63}",value:f,onChange:g=>m(g.target.value),autoFocus:!0,required:!0}),a.jsx("label",{className:"mobile-field-label",children:"Title (optional)"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"My Artifact",value:h,onChange:g=>p(g.target.value)})]})})]})}const hC=["cron","interval","once"],mC=["command","agent","webhook"],xf=["UTC","America/New_York","America/Los_Angeles","Europe/London","Europe/Berlin","Asia/Tokyo"],cg=Array.from({length:24},(e,t)=>({value:t,label:t===0?"12 AM":t<12?`${t} AM`:t===12?"12 PM":`${t-12} PM`})),pC=Array.from({length:12},(e,t)=>t*5),dg=[{value:"*",label:"Every day"},{value:"0",label:"Sun"},{value:"1",label:"Mon"},{value:"2",label:"Tue"},{value:"3",label:"Wed"},{value:"4",label:"Thu"},{value:"5",label:"Fri"},{value:"6",label:"Sat"}],gC=[{value:"s",label:"sec"},{value:"m",label:"min"},{value:"h",label:"hr"},{value:"d",label:"day"}];function yC({snapshot:e}){var b;const[t,n]=w.useState(e.schedules||[]),[r,i]=w.useState(!e.schedules),[l,s]=w.useState(""),[o,u]=w.useState(null),[d,c]=w.useState({open:!1}),f=async()=>{try{const y=await q.get("/schedules");n(y.schedules||[])}catch{}finally{i(!1)}};w.useEffect(()=>{e.schedules?(n(e.schedules),i(!1)):f()},[e.schedules]);const m=async(y,g)=>{try{await q.patch(`/schedules/${encodeURIComponent(y)}`,{enabled:g}),n(v=>v.map(C=>C.id===y?{...C,enabled:g}:C)),(o==null?void 0:o.id)===y&&u(v=>v&&{...v,enabled:g})}catch{}},h=async y=>{if(confirm("Delete this schedule?"))try{await q.del(`/schedules/${encodeURIComponent(y)}`),n(g=>g.filter(v=>v.id!==y)),(o==null?void 0:o.id)===y&&u(null)}catch{}},p=async y=>{try{await q.post(`/schedules/${encodeURIComponent(y)}/trigger`)}catch{}},x=l.trim()?t.filter(y=>y.name.toLowerCase().includes(l.toLowerCase())):t;return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search schedules…",value:l,onChange:y=>s(y.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>f(),"aria-label":"Refresh",children:a.jsx(_t,{size:16})}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>c({open:!0}),"aria-label":"New schedule",children:a.jsx(xt,{size:16})})]}),r?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):x.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(va,{size:40}),a.jsx("p",{children:"No schedules found."})]}):a.jsx("div",{className:"mobile-card-list",children:x.map(y=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>u(y),children:[a.jsx("div",{className:"mobile-list-icon",children:a.jsx(va,{size:16})}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:y.name}),a.jsxs("span",{className:"mobile-list-meta",children:[wf(y)," ·"," ",y.nextRun?`next ${kf(y.nextRun,y.timezone)}`:"no next run"]})]}),a.jsx("span",{className:`mobile-list-badge ${y.enabled?"badge-on":"badge-off"}`,children:y.enabled?"on":"off"})]},y.id))}),o&&a.jsx(Dt,{open:!0,onClose:()=>u(null),title:o.name,actions:a.jsxs("div",{className:"mobile-task-detail-actions",children:[a.jsxs("button",{type:"button",className:"mobile-btn",onClick:()=>{o&&p(o.id)},children:[a.jsx(Zl,{size:14})," Trigger now"]}),a.jsx("button",{type:"button",className:`mobile-btn ${o.enabled?"mobile-btn-secondary":""}`,onClick:()=>{o&&m(o.id,!o.enabled)},children:o.enabled?"Disable":"Enable"}),a.jsxs("button",{type:"button",className:"mobile-btn",onClick:()=>{o&&(c({open:!0,initial:o}),u(null))},children:[a.jsx(Au,{size:14})," Edit"]}),a.jsx("button",{type:"button",className:"mobile-btn mobile-btn-danger",onClick:()=>{o&&h(o.id)},children:a.jsx(_r,{size:14})})]}),children:a.jsx("div",{className:"mobile-agent-detail",children:a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Type"}),a.jsx("span",{children:o.type})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Schedule"}),a.jsx("span",{className:"mono",children:wf(o)||o.schedule})]}),o.timezone&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Timezone"}),a.jsx("span",{className:"mono",children:o.timezone})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Action"}),a.jsxs("span",{children:[o.action.type,": ",o.action.target]})]}),o.action.type==="agent"&&o.action.prompt&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Prompt"}),a.jsx("span",{style:{fontSize:12},children:o.action.prompt})]}),((b=o.budgetCheck)==null?void 0:b.skipIfBudgetLow)&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Budget gate"}),a.jsxs("span",{children:["skip if ≥ ",o.budgetCheck.maxConcurrent??6," concurrent"]})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Next run"}),a.jsx("span",{children:o.nextRun?kf(o.nextRun,o.timezone):"—"})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Last run"}),a.jsx("span",{children:o.lastRun?kC(o.lastRun):"—"})]}),o.lastResult&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Last result"}),a.jsx("span",{style:{fontSize:12},children:o.lastResult})]}),o.lastError&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Last error"}),a.jsx("span",{style:{fontSize:12},children:o.lastError})]})]})})}),a.jsx(vC,{open:d.open,initial:d.initial,onClose:()=>c({open:!1}),onSaved:()=>{c({open:!1}),f()}})]})}function vf(e){var r,i;if(!e)return{name:"",type:"cron",cronMinute:0,cronHour:13,cronDow:"0",intervalN:30,intervalUnit:"m",onceAt:"",timezone:"UTC",actionType:"agent",actionTarget:"",actionPrompt:"",skipIfBudgetLow:!1,maxConcurrent:6,enabled:!0};const t=e.type==="cron"?fg(e.schedule):null,n=e.type==="interval"?wC(e.schedule):null;return{name:e.name||"",type:e.type,cronMinute:(t==null?void 0:t.minute)??0,cronHour:(t==null?void 0:t.hour)??9,cronDow:(t==null?void 0:t.dow)??"*",intervalN:(n==null?void 0:n.n)??30,intervalUnit:(n==null?void 0:n.unit)??"m",onceAt:e.type==="once"?bC(e.schedule):"",timezone:e.timezone||"UTC",actionType:e.action.type,actionTarget:e.action.target||"",actionPrompt:e.action.prompt||"",skipIfBudgetLow:!!((r=e.budgetCheck)!=null&&r.skipIfBudgetLow),maxConcurrent:Number.isFinite((i=e.budgetCheck)==null?void 0:i.maxConcurrent)?e.budgetCheck.maxConcurrent:6,enabled:e.enabled!==!1}}function xC(e){if(e.type==="cron")return`${e.cronMinute} ${e.cronHour} * * ${e.cronDow}`;if(e.type==="interval")return`${e.intervalN}${e.intervalUnit}`;if(!e.onceAt)return"";try{return new Date(e.onceAt).toISOString()}catch{return e.onceAt}}function vC({open:e,initial:t,onClose:n,onSaved:r}){const[i,l]=w.useState(()=>vf(t)),[s,o]=w.useState(!1);w.useEffect(()=>{e&&l(vf(t))},[e,t]);const u=(c,f)=>{l(m=>({...m,[c]:f}))},d=async c=>{if(c.preventDefault(),!i.name.trim())return;const f=xC(i);if(f){o(!0);try{const m={name:i.name.trim(),type:i.type,schedule:f,timezone:i.timezone,action:{type:i.actionType,target:i.actionTarget.trim(),...i.actionType==="agent"&&i.actionPrompt.trim()?{prompt:i.actionPrompt.trim()}:{}},budgetCheck:{maxConcurrent:i.maxConcurrent,skipIfBudgetLow:i.skipIfBudgetLow},enabled:i.enabled};t?await q.put(`/schedules/${encodeURIComponent(t.id)}`,m):await q.post("/schedules",m),r()}catch{}finally{o(!1)}}};return a.jsx(Tn,{open:e,onClose:n,title:t?`Edit ${t.name}`:"New schedule",actions:a.jsxs("button",{type:"submit",form:"mobile-schedule-form",className:"mobile-btn",style:{width:"100%"},disabled:s,children:[a.jsx(xt,{size:14})," ",t?"Save":"Create"]}),children:a.jsxs("form",{id:"mobile-schedule-form",onSubmit:d,className:"mobile-task-form",children:[a.jsx("label",{className:"mobile-field-label",children:"Name *"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"Weekly review",value:i.name,onChange:c=>u("name",c.target.value),autoFocus:!0,required:!0}),a.jsx("label",{className:"mobile-field-label",children:"Type"}),a.jsx("select",{className:"mobile-input",value:i.type,onChange:c=>u("type",c.target.value),children:hC.map(c=>a.jsx("option",{value:c,children:c},c))}),i.type==="cron"&&a.jsxs(a.Fragment,{children:[a.jsx("label",{className:"mobile-field-label",children:"Day of week"}),a.jsx("select",{className:"mobile-input",value:i.cronDow,onChange:c=>u("cronDow",c.target.value),children:dg.map(c=>a.jsx("option",{value:c.value,children:c.label},c.value))}),a.jsxs("div",{className:"mobile-form-row",children:[a.jsxs("div",{style:{flex:1},children:[a.jsx("label",{className:"mobile-field-label",children:"Hour"}),a.jsx("select",{className:"mobile-input",value:String(i.cronHour),onChange:c=>u("cronHour",parseInt(c.target.value,10)),children:cg.map(c=>a.jsx("option",{value:String(c.value),children:c.label},c.value))})]}),a.jsxs("div",{style:{flex:1},children:[a.jsx("label",{className:"mobile-field-label",children:"Minute"}),a.jsx("select",{className:"mobile-input",value:String(i.cronMinute),onChange:c=>u("cronMinute",parseInt(c.target.value,10)),children:pC.map(c=>a.jsx("option",{value:String(c),children:String(c).padStart(2,"0")},c))})]})]})]}),i.type==="interval"&&a.jsxs("div",{className:"mobile-form-row",children:[a.jsxs("div",{style:{flex:1},children:[a.jsx("label",{className:"mobile-field-label",children:"Every"}),a.jsx("input",{className:"mobile-input",type:"number",min:1,value:i.intervalN,onChange:c=>u("intervalN",parseInt(c.target.value,10)||1)})]}),a.jsxs("div",{style:{flex:1},children:[a.jsx("label",{className:"mobile-field-label",children:"Unit"}),a.jsx("select",{className:"mobile-input",value:i.intervalUnit,onChange:c=>u("intervalUnit",c.target.value),children:gC.map(c=>a.jsx("option",{value:c.value,children:c.label},c.value))})]})]}),i.type==="once"&&a.jsxs(a.Fragment,{children:[a.jsx("label",{className:"mobile-field-label",children:"Run at"}),a.jsx("input",{className:"mobile-input",type:"datetime-local",value:i.onceAt,onChange:c=>u("onceAt",c.target.value)})]}),a.jsx("label",{className:"mobile-field-label",children:"Timezone"}),a.jsx("select",{className:"mobile-input",value:xf.includes(i.timezone)?i.timezone:"UTC",onChange:c=>u("timezone",c.target.value),children:xf.map(c=>a.jsx("option",{value:c,children:c},c))}),a.jsx("label",{className:"mobile-field-label",children:"Action type"}),a.jsx("select",{className:"mobile-input",value:i.actionType,onChange:c=>u("actionType",c.target.value),children:mC.map(c=>a.jsx("option",{value:c,children:c},c))}),a.jsx("label",{className:"mobile-field-label",children:"Target"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:i.actionType==="webhook"?"https://...":i.actionType==="agent"?"agent or task ref":"echo hello",value:i.actionTarget,onChange:c=>u("actionTarget",c.target.value)}),i.actionType==="agent"&&a.jsxs(a.Fragment,{children:[a.jsx("label",{className:"mobile-field-label",children:"Prompt"}),a.jsx("textarea",{className:"mobile-input",rows:3,placeholder:"What should the agent do?",value:i.actionPrompt,onChange:c=>u("actionPrompt",c.target.value)})]}),a.jsxs("fieldset",{className:"mobile-budget-card",children:[a.jsx("legend",{children:"Budget pre-flight"}),a.jsxs("label",{className:"mobile-checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:i.skipIfBudgetLow,onChange:c=>u("skipIfBudgetLow",c.target.checked)}),a.jsx("span",{children:"Skip if too many bg tasks are running"})]}),a.jsx("label",{className:"mobile-field-label",children:"Cap"}),a.jsx("input",{className:"mobile-input",type:"number",min:1,max:64,value:i.maxConcurrent,onChange:c=>u("maxConcurrent",parseInt(c.target.value,10)||6),disabled:!i.skipIfBudgetLow})]}),a.jsxs("label",{className:"mobile-checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:i.enabled,onChange:c=>u("enabled",c.target.checked)}),a.jsx("span",{children:"Enabled"})]})]})})}function kC(e){const t=Date.now()-new Date(e).getTime();return t<6e4?"just now":t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:new Date(e).toLocaleDateString()}function kf(e,t){try{return new Date(e).toLocaleString(void 0,{timeZone:t||void 0,weekday:"short",hour:"numeric",minute:"2-digit",month:"short",day:"numeric"})}catch{return new Date(e).toLocaleString()}}function fg(e){if(typeof e!="string")return null;const t=e.trim().split(/\s+/);if(t.length!==5)return null;const[n,r,,,i]=t,l=parseInt(n,10),s=parseInt(r,10);return!Number.isFinite(l)||!Number.isFinite(s)||n!==String(l)||r!==String(s)?null:{minute:l,hour:s,dow:i==="*"?"*":Number.isFinite(parseInt(i,10))?i:"*"}}function wC(e){if(typeof e!="string")return null;const t=/^(\d+)([smhd])$/i.exec(e.trim());return t?{n:parseInt(t[1],10),unit:t[2].toLowerCase()}:null}function bC(e){if(!e)return"";try{const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=r=>String(r).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}catch{return""}}function wf(e){var l,s;if(e.type!=="cron")return e.schedule;const t=fg(e.schedule);if(!t)return e.schedule;const n=((l=dg.find(o=>o.value===t.dow))==null?void 0:l.label)||t.dow,r=((s=cg.find(o=>o.value===t.hour))==null?void 0:s.label)||`${t.hour}`,i=String(t.minute).padStart(2,"0");return n==="Every day"?`Every day ${r} :${i}`:`Every ${n} ${r} :${i}`}const SC=["all","tasks","agents","artifacts","projects","settings"],CC={tasks:es,agents:Dr,plans:qn,projects:Pu,settings:Pr};function jC({open:e,onClose:t,onNavigate:n}){const[r,i]=w.useState(""),[l,s]=w.useState("all"),[o,u]=w.useState([]),[d,c]=w.useState(!1),f=w.useRef(null);w.useEffect(()=>{e&&(i(""),u([]),requestAnimationFrame(()=>{var p;return(p=f.current)==null?void 0:p.focus()}))},[e]),w.useEffect(()=>{if(!r.trim()){u([]);return}const p=setTimeout(async()=>{c(!0);try{const x=await q.get(`/search?q=${encodeURIComponent(r)}&scope=${l}`);u(x.results||[])}catch{u([])}finally{c(!1)}},250);return()=>clearTimeout(p)},[r,l]);const m=p=>{const x=p.item,b=x.id||x.slug||x.name||"";n(p.type,b),t()},h=o.reduce((p,x)=>(p[x.type]||(p[x.type]=[]),p[x.type].push(x),p),{});return a.jsx(Tn,{open:e,onClose:t,title:"Search",children:a.jsxs("div",{className:"mobile-search-container",children:[a.jsxs("div",{className:"mobile-search-input-row",children:[a.jsx(hd,{size:16,style:{color:"var(--text-muted)",flexShrink:0}}),a.jsx("input",{ref:f,className:"mobile-search-field",type:"text",placeholder:"Search…",value:r,onChange:p=>i(p.target.value),enterKeyHint:"search",onKeyDown:p=>{p.key==="Escape"&&t(),p.key==="Enter"&&o.length>0&&m(o[0])}}),r&&a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>i(""),"aria-label":"Clear",children:a.jsx(Zn,{size:16})})]}),a.jsx("div",{className:"mobile-search-scopes",children:SC.map(p=>a.jsx("button",{type:"button",className:`mobile-scope-chip ${l===p?"active":""}`,onClick:()=>s(p),children:p==="all"?"All":p.charAt(0).toUpperCase()+p.slice(1)},p))}),a.jsxs("div",{className:"mobile-search-results",children:[d&&a.jsx("div",{className:"mobile-search-loading",children:"Searching…"}),!d&&r&&o.length===0&&a.jsxs("div",{className:"mobile-empty",children:[a.jsx(hd,{size:32}),a.jsx("p",{children:"No results found"})]}),!d&&!r&&a.jsx("div",{className:"mobile-empty",children:a.jsx("p",{children:"Type to search across tasks, agents, plans, and more."})}),Object.entries(h).map(([p,x])=>{const b=CC[p]||qn;return a.jsxs("div",{className:"mobile-search-group",children:[a.jsxs("h4",{className:"mobile-search-group-title",children:[a.jsx(b,{size:12})," ",p.charAt(0).toUpperCase()+p.slice(1)," (",x.length,")"]}),x.map((y,g)=>{const v=y.item;return a.jsxs("button",{type:"button",className:"mobile-search-result-item",onClick:()=>m(y),children:[a.jsx("span",{className:"mobile-search-result-title",children:v.title||v.name||v.slug||"(unnamed)"}),v.description&&a.jsx("span",{className:"mobile-search-result-meta",children:v.description.slice(0,80)})]},g)})]},p)})]})]})})}const NC=[{id:"dark",label:"Dark",Icon:ix},{id:"light",label:"Light",Icon:fx},{id:"system",label:"System",Icon:rx}],EC=[{name:"Purple",accent:"#8b5cf6"},{name:"Blue",accent:"#3b82f6"},{name:"Green",accent:"#10b981"},{name:"Orange",accent:"#f97316"},{name:"Red",accent:"#ef4444"},{name:"Pink",accent:"#ec4899"},{name:"Cyan",accent:"#06b6d4"},{name:"Mono",accent:"#6b7280"}];function TC(e){if(e<=0)return"expired";const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,"0")}`}function IC({settings:e,snapshot:t,onRefresh:n}){var z,E,A,L,I,k;const[r,i]=w.useState(e),[l,s]=w.useState(!1),[o,u]=w.useState(!1),[d,c]=w.useState(null),[f,m]=w.useState(!1),[h,p]=w.useState(Date.now());w.useEffect(()=>{i(e),s(!1),e.theme&&ui(e.theme)},[e]),w.useEffect(()=>{if(!d)return;const j=setInterval(()=>p(Date.now()),1e3);return()=>clearInterval(j)},[d]);const x=j=>{i(P=>{const B={...P,theme:{...P.theme,...j}};return ts(B.theme),ui(B.theme),B}),s(!0)},b=(j,P)=>{i(B=>({...B,[j]:P})),s(!0)},y=async()=>{u(!0);try{const j=await q.put("/settings",r);i(j.data),s(!1),ts(j.data.theme),ui(j.data.theme),n()}catch{}finally{u(!1)}},g=async()=>{m(!0);try{const j=await q.post("/pair/start");c(j)}catch{}finally{m(!1)}},v=d?d.expiresAt-h:0,C=d!=null&&v<=0;return a.jsxs("div",{className:"mobile-view",children:[l&&a.jsxs("div",{className:"mobile-settings-save-bar",children:[a.jsx("span",{children:"Unsaved changes"}),a.jsxs("button",{type:"button",className:"mobile-btn",disabled:o,onClick:y,children:[a.jsx(Fm,{size:14})," ",o?"Saving…":"Save"]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"Appearance"}),a.jsxs("div",{className:"mobile-card",children:[a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Theme"}),a.jsx("div",{className:"mobile-theme-btns",children:NC.map(({id:j,label:P,Icon:B})=>a.jsxs("button",{type:"button",className:`mobile-theme-btn ${r.theme.mode===j?"active":""}`,onClick:()=>x({mode:j}),children:[a.jsx(B,{size:14})," ",P]},j))})]}),a.jsxs("div",{className:"mobile-setting-row",style:{flexDirection:"column",alignItems:"flex-start",gap:8},children:[a.jsx("span",{className:"mobile-setting-label",children:"Accent color"}),a.jsx("div",{className:"mobile-accent-swatches",children:EC.map(j=>a.jsx("button",{type:"button",className:`mobile-accent-swatch ${r.theme.accent===j.accent?"active":""}`,style:{background:j.accent},onClick:()=>x({accent:j.accent}),title:j.name},j.name))})]}),a.jsxs("div",{className:"mobile-setting-row",style:{flexDirection:"column",alignItems:"flex-start",gap:8},children:[a.jsxs("span",{className:"mobile-setting-label",children:["Font size: ",r.theme.fontSize,"px"]}),a.jsx("input",{type:"range",min:12,max:20,value:r.theme.fontSize,onChange:j=>x({fontSize:Number(j.target.value)}),style:{width:"100%"}})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Compact mode"}),a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:r.theme.compactMode,onChange:j=>x({compactMode:j.target.checked})}),a.jsx("span",{className:"mobile-toggle-slider"})]})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Animations"}),a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:r.theme.animations,onChange:j=>x({animations:j.target.checked})}),a.jsx("span",{className:"mobile-toggle-slider"})]})]})]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"Chat Defaults"}),a.jsxs("div",{className:"mobile-card",children:[a.jsx("label",{className:"mobile-field-label",children:"Default Agent"}),a.jsx("select",{className:"mobile-input",value:r.defaultAgent||"odin",onChange:j=>b("defaultAgent",j.target.value),children:((t==null?void 0:t.agents)||[]).map(j=>a.jsxs("option",{value:j.name,children:["@",j.name]},j.name))}),a.jsx("label",{className:"mobile-field-label",style:{marginTop:8},children:"Default Model"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"(auto)",value:r.defaultModel||"",onChange:j=>b("defaultModel",j.target.value)})]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"Notifications"}),a.jsxs("div",{className:"mobile-card",children:[a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Agent completion"}),a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:!!r.notifications.onAgentComplete,onChange:j=>{i(P=>({...P,notifications:{...P.notifications,onAgentComplete:j.target.checked}})),s(!0)}}),a.jsx("span",{className:"mobile-toggle-slider"})]})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Plan approval"}),a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:!!r.notifications.onPlanApproval,onChange:j=>{i(P=>({...P,notifications:{...P.notifications,onPlanApproval:j.target.checked}})),s(!0)}}),a.jsx("span",{className:"mobile-toggle-slider"})]})]})]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"Agent Behavior"}),a.jsxs("div",{className:"mobile-card",children:[a.jsx("label",{className:"mobile-field-label",children:"Max parallel agents"}),a.jsx("input",{className:"mobile-input",type:"number",inputMode:"numeric",min:1,max:20,value:((z=r.agents)==null?void 0:z.maxParallel)??6,onChange:j=>{i(P=>({...P,agents:{...P.agents,maxParallel:Math.max(1,Math.min(20,parseInt(j.target.value,10)||6))}})),s(!0)}}),a.jsx("label",{className:"mobile-field-label",style:{marginTop:8},children:"Stuck threshold (ms)"}),a.jsx("input",{className:"mobile-input",type:"number",inputMode:"numeric",min:6e4,max:36e5,step:6e4,value:((E=r.agents)==null?void 0:E.stuckThresholdMs)??6e5,onChange:j=>{i(P=>({...P,agents:{...P.agents,stuckThresholdMs:Math.max(6e4,parseInt(j.target.value,10)||6e5)}})),s(!0)}}),a.jsxs("div",{className:"mobile-setting-row",style:{marginTop:8},children:[a.jsx("span",{className:"mobile-setting-label",children:"Auto-restart stuck agents"}),a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:!!((A=r.agents)!=null&&A.autoRestart),onChange:j=>{i(P=>({...P,agents:{...P.agents,autoRestart:j.target.checked}})),s(!0)}}),a.jsx("span",{className:"mobile-toggle-slider"})]})]})]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"Tailscale Serve"}),a.jsx("div",{className:"mobile-card",children:a.jsxs("p",{className:"muted",style:{fontSize:13},children:["Use ",a.jsx("code",{children:"bizar service"})," commands in the terminal to configure Tailscale serve."]})})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsxs("h3",{className:"mobile-section-title",children:[a.jsx(dx,{size:14})," Companion App"]}),a.jsxs("div",{className:"mobile-card",children:[!d&&a.jsxs("button",{type:"button",className:"mobile-btn",onClick:g,disabled:f,style:{width:"100%"},children:[a.jsx(ox,{size:14})," ",f?"Generating…":"Generate QR Code"]}),d&&!C&&a.jsxs("div",{style:{textAlign:"center"},children:[a.jsx("div",{style:{background:"#fff",padding:12,borderRadius:12,display:"inline-block"},children:a.jsx(ag,{value:d.qrPayload,size:180,level:"M"})}),a.jsxs("div",{style:{marginTop:8,fontSize:12},children:["Expires in ",a.jsx("strong",{children:TC(v)})]}),a.jsx("div",{className:"mono",style:{fontSize:10,wordBreak:"break-all",marginTop:4},children:d.publicUrl})]}),d&&C&&a.jsxs("button",{type:"button",className:"mobile-btn",onClick:g,style:{width:"100%"},children:[a.jsx(_t,{size:14})," Generate new QR"]})]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"About"}),a.jsxs("div",{className:"mobile-card",children:[a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Version"}),a.jsx("span",{className:"mobile-setting-value mono",children:((L=r.about)==null?void 0:L.version)||"—"})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Agents"}),a.jsx("span",{className:"mobile-setting-value",children:((I=t==null?void 0:t.agents)==null?void 0:I.length)||0})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Tasks"}),a.jsx("span",{className:"mobile-setting-value",children:((k=t==null?void 0:t.tasks)==null?void 0:k.length)||0})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Plans"}),a.jsx("span",{className:"mobile-setting-value",children:(t==null?void 0:t.artifacts.length)||0})]})]})]}),a.jsx("div",{className:"mobile-view-footer",children:a.jsx("a",{href:"/?desktop=1",className:"mobile-btn mobile-btn-secondary",children:"Switch to Desktop"})})]})}const zC=["languages","framework","design","testing","devops","data","security","integration"];function PC({snapshot:e,onBack:t}){const[n,r]=w.useState([]),[i,l]=w.useState(!0),[s,o]=w.useState(""),[u,d]=w.useState(""),[c,f]=w.useState(null),m=async()=>{try{const x=await q.get("/skills");r(x.skills||[])}catch{}finally{l(!1)}};w.useEffect(()=>{m()},[]);const h=async(x,b)=>{try{await q.patch(`/skills/${encodeURIComponent(x)}`,{enabled:b}),r(y=>y.map(g=>g.id===x?{...g,enabled:b}:g)),(c==null?void 0:c.id)===x&&f(y=>y&&{...y,enabled:b})}catch{}},p=n.filter(x=>{if(u&&x.category!==u)return!1;if(s){const b=s.toLowerCase();return x.name.toLowerCase().includes(b)||x.description.toLowerCase().includes(b)}return!0});return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search skills…",value:s,onChange:x=>o(x.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>m(),"aria-label":"Refresh",children:a.jsx(_t,{size:16})})]}),a.jsxs("div",{className:"mobile-search-scopes",children:[a.jsx("button",{type:"button",className:`mobile-scope-chip ${u?"":"active"}`,onClick:()=>d(""),children:"All"}),zC.map(x=>a.jsx("button",{type:"button",className:`mobile-scope-chip ${u===x?"active":""}`,onClick:()=>d(x),children:x},x))]}),i?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):p.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(Jl,{size:40}),a.jsx("p",{children:"No skills found."})]}):a.jsx("div",{className:"mobile-card-list",children:p.map(x=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>f(x),children:[a.jsx("div",{className:"mobile-list-icon",children:a.jsx(Jl,{size:16})}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:x.name}),a.jsxs("span",{className:"mobile-list-meta",children:[x.category," · v",x.version]})]}),a.jsx("span",{className:`mobile-list-badge ${x.enabled?"badge-on":"badge-off"}`,children:x.enabled?"on":"off"})]},x.id))}),c&&a.jsx(Dt,{open:!0,onClose:()=>f(null),title:c.name,actions:a.jsxs("button",{type:"button",className:`mobile-btn ${c.enabled?"mobile-btn-secondary":""}`,style:{width:"100%"},onClick:()=>{c&&h(c.id,!c.enabled)},children:[a.jsx(Om,{size:14})," ",c.enabled?"Disable":"Enable"]}),children:a.jsxs("div",{className:"mobile-agent-detail",children:[a.jsx("p",{className:"mobile-agent-detail-desc",children:c.description||"No description."}),a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Category"}),a.jsx("span",{children:c.category})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Version"}),a.jsx("span",{className:"mono",children:c.version})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Source"}),a.jsx("span",{children:c.source})]}),c.tags.length>0&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Tags"}),a.jsx("span",{children:c.tags.join(", ")})]})]})]})})]})}const AC=["queued","doing","blocked","done"],dl={queued:"Queued",doing:"Doing",blocked:"Blocked",done:"Done"},bf={queued:"doing",doing:"done",blocked:"queued",done:"queued"};function MC(e){const t=e.metadata??{};return!!(t.sessionId||t.bgInstanceId)}function LC(e){var n;const t=e.metadata??{};return!!((n=t.artifactIds)!=null&&n.length||t.artifactId)}function Sf({snapshot:e,onRefresh:t,selectedTaskId:n,onCloseDetail:r,onOpenChat:i,onOpenArtifact:l}){var oe,Ne;const[s,o]=w.useState(e.tasks||[]),[u,d]=w.useState(!e.tasks),[c,f]=w.useState(""),[m,h]=w.useState("queued"),[p,x]=w.useState(null),[b,y]=w.useState(!1),[g,v]=w.useState(null),[C,z]=w.useState([]),[E,A]=w.useState(""),[L,I]=w.useState(null),[k,j]=w.useState(!1),[P,B]=w.useState(""),[O,W]=w.useState("updated");w.useEffect(()=>{var H;if(e.tasks&&(o(e.tasks),d(!1)),n){const te=(H=e.tasks)==null?void 0:H.find(re=>re.id===n);te&&x(te)}},[e.tasks,n]),w.useEffect(()=>{if(n){const H=s.find(te=>te.id===n);H&&x(H)}},[n,s]);const de=async()=>{try{const H=await q.get("/tasks");o(Array.isArray(H)?H:[])}catch{}finally{d(!1)}},ee=async(H,te)=>{o(re=>re.map(Se=>Se.id===H?{...Se,status:te}:Se)),(p==null?void 0:p.id)===H&&x(re=>re&&{...re,status:te});try{await q.patch(`/tasks/${encodeURIComponent(H)}/status`,{status:te})}catch{await de()}},R=async H=>{if(confirm("Delete this task?"))try{await q.del(`/tasks/${encodeURIComponent(H)}`),o(te=>te.filter(re=>re.id!==H)),(p==null?void 0:p.id)===H&&x(null)}catch{await de()}},V=async H=>{try{await q.post(`/tasks/${encodeURIComponent(H)}/archive`),o(te=>te.filter(re=>re.id!==H)),(p==null?void 0:p.id)===H&&x(null)}catch{}},Y=[...s.filter(H=>{var te,re;if(c.trim()){const Se=c.toLowerCase();if(!(H.title||"").toLowerCase().includes(Se)&&!(H.description||"").toLowerCase().includes(Se))return!1}if(P.trim()){const Se=P==="mine"?((re=(te=e.settings)==null?void 0:te.data)==null?void 0:re.defaultAgent)||RC(e):P.replace(/^@/,"");if((H.assignee||"").toLowerCase()!==Se.toLowerCase())return!1}return!0})].sort((H,te)=>{switch(O){case"priority":{const re={high:0,normal:1,low:2};return(re[H.priority]??1)-(re[te.priority]??1)}case"created":return new Date(te.createdAt).getTime()-new Date(H.createdAt).getTime();case"updated":default:return new Date(te.updatedAt).getTime()-new Date(H.updatedAt).getTime()}}),ie=Y.filter(H=>H.status===m),N=e.agents||[],ge=async(H,te,re,Se)=>{try{const Ot=await q.post("/tasks",{title:H,description:te,assignee:re||null,priority:Se});o(ln=>[Ot,...ln]),y(!1)}catch{}},Le=async H=>{j(!0),A(""),I(null),v(H);try{const re=((await q.get(`/tasks/${encodeURIComponent(H)}/artifacts`)).artifacts||[]).map(Se=>Se.id);if(z(re),re.length>0){const[Se,Ot]=await Promise.all([q.get(`/artifacts/${encodeURIComponent(re[0])}`),fetch(q.urlWithToken(`/artifacts/${encodeURIComponent(re[0])}/content`)).then(ln=>ln.text())]);I(Se),A(Ot)}}catch{}finally{j(!1)}};return u?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):a.jsxs("div",{className:"mobile-view mobile-view-tasks",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search tasks…",value:c,onChange:H=>f(H.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>de(),"aria-label":"Refresh",children:a.jsx(_t,{size:16})})]}),a.jsxs("div",{className:"mobile-tasks-filters",children:[a.jsxs("select",{className:"mobile-filter-select",value:P,onChange:H=>B(H.target.value),children:[a.jsx("option",{value:"",children:"All"}),a.jsx("option",{value:"mine",children:"Mine"}),N.map(H=>a.jsxs("option",{value:`@${H.name}`,children:["@",H.name]},H.name))]}),a.jsxs("select",{className:"mobile-filter-select",value:O,onChange:H=>W(H.target.value),children:[a.jsx("option",{value:"updated",children:"Updated"}),a.jsx("option",{value:"created",children:"Created"}),a.jsx("option",{value:"priority",children:"Priority"})]})]}),a.jsx("div",{className:"mobile-kanban-tabs",children:AC.map(H=>{const te=Y.filter(re=>re.status===H).length;return a.jsxs("button",{type:"button",className:`mobile-kanban-tab ${m===H?"active":""}`,onClick:()=>h(H),children:[dl[H]," (",te,")"]},H)})}),a.jsxs("div",{className:"mobile-card-list",children:[ie.length===0&&a.jsxs("div",{className:"mobile-empty mobile-empty-compact",children:[a.jsxs("p",{children:["No ",dl[m].toLowerCase()," tasks."]}),a.jsx("p",{className:"muted",children:"Create one or switch columns."})]}),ie.map(H=>{var te;return a.jsxs("button",{type:"button",className:"mobile-task-card",onClick:()=>x(H),children:[a.jsx("div",{className:"priority-dot",style:{background:gx[H.priority]||"var(--info)"}}),a.jsxs("div",{className:"task-content",children:[a.jsx("div",{className:"task-title",children:H.title}),a.jsxs("div",{className:"task-meta",children:[H.assignee?`@${H.assignee}`:"unassigned"," · ",Sr(H.updatedAt||H.createdAt),(te=H.dependencies)!=null&&te.length?` · ${H.dependencies.length} deps`:""]})]})]},H.id)})]}),a.jsx("button",{type:"button",className:"mobile-fab",onClick:()=>y(!0),"aria-label":"Add task",children:a.jsx(xt,{size:24})}),a.jsx(Dt,{open:!!p,onClose:()=>{x(null),r==null||r()},title:"Task Detail",actions:p&&a.jsxs("div",{className:"mobile-task-detail-actions",children:[p.status!=="done"&&a.jsxs("button",{type:"button",className:"mobile-btn",style:{flex:1},onClick:()=>{p&&ee(p.id,bf[p.status])},children:["Move to ",dl[bf[p.status]||"queued"]]}),a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",onClick:()=>{p&&V(p.id)},children:[a.jsx(V1,{size:14})," Archive"]}),MC(p)&&a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",onClick:()=>{i==null||i(p.id)},children:[a.jsx(On,{size:14})," Chat"]}),LC(p)&&a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",onClick:()=>{Le(p.id)},children:[a.jsx(qn,{size:14})," Artifact"]}),a.jsx("button",{type:"button",className:"mobile-btn mobile-btn-danger",onClick:()=>{p&&R(p.id)},children:a.jsx(_r,{size:14})})]}),children:p&&a.jsxs("div",{className:"mobile-task-detail",children:[a.jsxs("div",{className:"mobile-task-detail-header",children:[a.jsx("span",{className:`mobile-task-status-badge status-${p.status}`,children:dl[p.status]||p.status}),a.jsx("span",{className:`mobile-task-priority priority-${p.priority}`,children:p.priority})]}),a.jsx("h3",{className:"mobile-task-detail-title",children:p.title}),p.description&&a.jsx("p",{className:"mobile-task-detail-desc",children:p.description}),a.jsxs("div",{className:"mobile-task-detail-meta",children:[p.assignee&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Assignee"}),a.jsxs("span",{children:["@",p.assignee]})]}),p.dueDate&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Due"}),a.jsx("span",{children:new Date(p.dueDate).toLocaleDateString()})]}),p.timeSpent!=null&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Time spent"}),a.jsxs("span",{children:[Math.round(p.timeSpent/6e4),"min"]})]}),(oe=p.dependencies)!=null&&oe.length?a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Dependencies"}),a.jsx("span",{children:p.dependencies.length})]}):null,(Ne=p.comments)!=null&&Ne.length?a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Comments"}),a.jsx("span",{children:p.comments.length})]}):null,a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Created"}),a.jsx("span",{children:Sr(p.createdAt)})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Updated"}),a.jsx("span",{children:Sr(p.updatedAt)})]})]})]})}),a.jsx(DC,{open:b,onClose:()=>y(!1),onCreate:ge,agents:N}),a.jsx(Dt,{open:!!g,onClose:()=>{v(null),A(""),I(null)},title:(L==null?void 0:L.name)||"Artifact",actions:C.length>1?a.jsx("div",{className:"mobile-task-detail-actions",children:C.map((H,te)=>a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",style:{flex:1},onClick:()=>{j(!0),Promise.all([q.get(`/artifacts/${encodeURIComponent(H)}`),fetch(q.urlWithToken(`/artifacts/${encodeURIComponent(H)}/content`)).then(re=>re.text())]).then(([re,Se])=>{I(re),A(Se),j(!1)}).catch(()=>j(!1))},children:["Artifact ",te+1]},H))}):null,children:a.jsx("div",{className:"mobile-artifact-viewer",children:k?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading artifact…"})}):E?a.jsx("iframe",{srcDoc:E,className:"mobile-artifact-iframe",sandbox:"allow-scripts allow-forms allow-popups allow-same-origin",title:(L==null?void 0:L.name)||"Artifact",loading:"lazy"}):a.jsxs("div",{className:"mobile-empty",children:[a.jsx(qn,{size:32}),a.jsx("p",{className:"muted",children:"No artifact content available."})]})})})]})}function RC(e){var t,n;return((n=(t=e.settings)==null?void 0:t.data)==null?void 0:n.defaultAgent)||"odin"}function DC({open:e,onClose:t,onCreate:n,agents:r}){const[i,l]=w.useState(""),[s,o]=w.useState(""),[u,d]=w.useState(""),[c,f]=w.useState("normal"),m=h=>{h.preventDefault(),i.trim()&&(n(i.trim(),s.trim(),u,c),l(""),o(""),d(""),f("normal"))};return a.jsx(Tn,{open:e,onClose:t,title:"New Task",actions:a.jsxs("button",{type:"submit",form:"new-task-form",className:"mobile-btn",style:{width:"100%"},children:[a.jsx(xt,{size:14})," Create Task"]}),children:a.jsxs("form",{id:"new-task-form",onSubmit:m,className:"mobile-task-form",children:[a.jsx("label",{className:"mobile-field-label",children:"Title *"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"Task title",value:i,onChange:h=>l(h.target.value),autoFocus:!0,required:!0}),a.jsx("label",{className:"mobile-field-label",children:"Description"}),a.jsx("textarea",{className:"mobile-input",rows:3,placeholder:"Optional description",value:s,onChange:h=>o(h.target.value)}),a.jsx("label",{className:"mobile-field-label",children:"Assignee"}),a.jsxs("select",{className:"mobile-input",value:u,onChange:h=>d(h.target.value),children:[a.jsx("option",{value:"",children:"Unassigned"}),r.map(h=>a.jsxs("option",{value:h.name,children:["@",h.name]},h.name))]}),a.jsx("label",{className:"mobile-field-label",children:"Priority"}),a.jsxs("select",{className:"mobile-input",value:c,onChange:h=>f(h.target.value),children:[a.jsx("option",{value:"low",children:"Low"}),a.jsx("option",{value:"normal",children:"Normal"}),a.jsx("option",{value:"high",children:"High"})]})]})})}const _C=[{id:"activity",label:"Activity",icon:xa},{id:"chat",label:"Chat",icon:On},{id:"tasks",label:"Tasks",icon:es},{id:"settings",label:"Settings",icon:Bm},{id:"more",label:"More",icon:J1}];function OC(e){const t=e.meta??{},n=typeof t.taskId=="string"?t.taskId:null,r=typeof t.slug=="string"?t.slug:null,i=typeof t.agent=="string"?t.agent:null;if(n)return{id:"task-detail",taskId:n};if(r)return{id:"artifacts?-detail",slug:r};if(i)return{id:"agent-detail",name:i};const l=e.link??"";return l.startsWith("/artifacts?/")?{id:"artifacts?-detail",slug:decodeURIComponent(l.slice(12))}:l.startsWith("/tasks/")?{id:"task-detail",taskId:decodeURIComponent(l.slice(7))}:l.startsWith("/agents/")?{id:"agent-detail",name:decodeURIComponent(l.slice(8))}:null}function WC(){const[e,t]=w.useState("activity"),[n,r]=w.useState([]),[i,l]=w.useState(!1),[s,o]=w.useState(null),[u,d]=w.useState(null),[c,f]=w.useState(null),[m,h]=w.useState(null),[p,x]=w.useState(!0),[b,y]=w.useState(0),g=w.useMemo(()=>n[n.length-1]??{id:e},[e,n]),v=w.useCallback(k=>{r(j=>[...j,k])},[]),C=w.useCallback(()=>{r(k=>k.slice(0,-1))},[]),z=w.useCallback(k=>{r([]),t(k)},[]),E=w.useCallback(async()=>{var k;try{const j=await q.get("/snapshot");d(j),(k=j.settings)!=null&&k.data&&f(j.settings.data),h(null)}catch(j){throw h(j.message||"Dashboard server unreachable."),j}},[]);w.useEffect(()=>{let k=!1;return Promise.all([q.get("/snapshot").catch(()=>null),q.get("/settings").catch(()=>null),q.probeAuthStatus().catch(()=>null)]).then(([j,P])=>{var O;if(k)return;const B=(P==null?void 0:P.data)??((O=j==null?void 0:j.settings)==null?void 0:O.data)??null;j&&d(j),B&&f(B),h(!j&&!B?"Dashboard server unreachable.":null)}).catch(j=>{k||h(j.message||"Dashboard server unreachable.")}).finally(()=>{k||x(!1)}),()=>{k=!0}},[]),w.useEffect(()=>{c!=null&&c.theme&&(ts(c.theme),ui(c.theme))},[c==null?void 0:c.theme]),w.useEffect(()=>{var P;if(((P=c==null?void 0:c.theme)==null?void 0:P.mode)!=="system")return;const k=window.matchMedia("(prefers-color-scheme: light)"),j=()=>{c!=null&&c.theme&&(ts(c.theme),ui(c.theme))};return k.addEventListener("change",j),()=>k.removeEventListener("change",j)},[c==null?void 0:c.theme]),w.useEffect(()=>{const k=()=>{y(P=>P+1),E().catch(()=>{})},j=()=>{document.visibilityState==="visible"&&k()};return window.addEventListener("online",k),window.addEventListener("pageshow",k),document.addEventListener("visibilitychange",j),()=>{window.removeEventListener("online",k),window.removeEventListener("pageshow",k),document.removeEventListener("visibilitychange",j)}},[E]),w.useEffect(()=>{const k=new Vm,j=k.on(P=>{if(P.type==="snapshot"&&"data"in P&&P.data)d(B=>({...B??{},...P.data}));else if(P.type==="change")E().catch(()=>{});else if(P.type==="tasks:change"){const B=P.task;d(O=>{if(!O)return O;const W=(O.tasks||[]).map(ee=>ee.id===B.id?B:ee),de=W.some(ee=>ee.id===B.id);return{...O,tasks:de?W:[B,...W]}})}else P.type==="tasks:delete"?d(B=>B&&{...B,tasks:(B.tasks||[]).filter(O=>O.id!==P.id)}):P.type==="settings:change"?P.settings&&f(P.settings):P.type==="project:change"||P.type==="agents:change"||P.type==="schedules:change"||P.type==="artifact:change"?E().catch(()=>{}):(P.type==="agent:status"||P.type==="agent:restarted")&&d(B=>{if(!B)return B;const O=(B.agents||[]).map(W=>W.name===P.agent.name?P.agent:W);return{...B,agents:O}})});return()=>{j(),k.close()}},[E,b]);const A=w.useCallback(k=>{(k==="activity"||k==="chat"||k==="tasks"||k==="settings"||k==="more")&&z(k)},[z]),L=w.useCallback((k,j,P)=>{if(k==="notification"){const B=OC({link:j||null,meta:P??null});B&&v(B);return}if(k==="task"&&j){v({id:"task-detail",taskId:j});return}if(k==="artifacts?"&&j){v({id:"artifacts?-detail",slug:j});return}if(k==="agent"&&j){v({id:"agent-detail",name:j});return}if(k==="project"){z("activity");return}k==="setting"&&z("settings")},[z,v]),I=()=>{if(!u||!c)return null;if(n.length>0){const k=n[n.length-1];switch(k.id){case"artifacts?":return a.jsx(fC,{snapshot:u,onBack:C,onOpenArtifact:j=>v({id:"artifacts?-detail",slug:j})});case"agents":return a.jsx(yf,{snapshot:u,onBack:C,onOpenAgent:j=>v({id:"agent-detail",name:j}),onRefresh:E});case"skills":return a.jsx(PC,{snapshot:u,onBack:C});case"mods":return a.jsx(sC,{snapshot:u,onBack:C});case"schedules":return a.jsx(yC,{snapshot:u,onBack:C});case"history":return a.jsx(lC,{onBack:C});case"config":return a.jsx(iC,{onBack:C});case"artifacts?-detail":return a.jsx(uC,{slug:k.slug,onBack:C});case"agent-detail":return a.jsx(yf,{snapshot:u,onBack:C,onOpenAgent:()=>{},onRefresh:E,selectedAgent:k.name});case"task-detail":return a.jsx(Sf,{snapshot:u,onRefresh:E,selectedTaskId:k.taskId,onCloseDetail:C,onOpenChat:j=>{o(j),z("chat")}});default:return null}}switch(e){case"activity":return a.jsx(X2,{snapshot:u,onRefresh:E});case"chat":return a.jsx(rC,{snapshot:u,settings:c,initialTaskId:s,onClearTaskId:()=>o(null)});case"tasks":return a.jsx(Sf,{snapshot:u,onRefresh:E,onOpenChat:k=>{o(k),z("chat")}});case"settings":return a.jsx(IC,{settings:c,snapshot:u,onRefresh:E});case"more":return a.jsx(oC,{snapshot:u,onNavigate:k=>{(k==="artifacts?"||k==="agents"||k==="skills"||k==="mods"||k==="schedules"||k==="history"||k==="config")&&v({id:k})}});default:return null}};return p?a.jsxs("div",{className:"mobile-loading",children:[a.jsx(Wm,{size:"lg"}),a.jsx("p",{children:"Loading Bizar…"})]}):m||!u||!c?a.jsxs("div",{className:"mobile-loading",children:[a.jsx("h2",{children:"Dashboard unavailable"}),a.jsx("p",{children:m||"Dashboard server unreachable."}),a.jsx("p",{className:"muted",children:"Make sure the Bizar dashboard server is running."})]}):a.jsxs("div",{className:"mobile-app",children:[a.jsx(K2,{activeTab:g.id,snapshot:u,onSearch:()=>l(!0),onNavigate:L}),a.jsx("main",{className:"mobile-content",children:I()}),n.length===0&&a.jsx(V2,{tabs:_C,activeTab:e,onChange:A}),n.length>0&&a.jsx("button",{type:"button",className:"mobile-back-btn",onClick:C,"aria-label":"Go back",children:"← Back"}),a.jsx(jC,{open:i,onClose:()=>l(!1),onNavigate:L})]})}export{_e as $,xa as A,Dr as B,q1 as C,cx as D,Z1 as E,Pu as F,hx as G,ka as H,tx as I,Au as J,A2 as K,L2 as L,On as M,Tx as N,j2 as O,xt as P,Fm as Q,_t as R,es as S,mx as T,$C as U,Zl as V,ux as W,Zn as X,md as Y,cb as Z,S2 as _,q as a,V1 as a0,xx as a1,gx as a2,lx as a3,P2 as a4,ui as a5,ax as a6,ix as a7,fx as a8,rx as a9,X1 as aa,ts as ab,Vm as ac,dx as ad,ag as ae,ox as af,W1 as ag,Bm as ah,UC as ai,BC as aj,wa as ak,$1 as al,WC as am,Ss as b,J as c,dd as d,Jl as e,va as f,Pr as g,hd as h,Mu as i,a as j,pr as k,bx as l,cd as m,Y1 as n,Sr as o,qn as p,px as q,w as r,Wm as s,$m as t,kx as u,_r as v,Om as w,Dm as x,Ix as y,T2 as z};
|
|
352
|
+
//# sourceMappingURL=mobile-O6ANdD4W.js.map
|