fourth-spark 0.11.0 → 0.11.2
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/drizzle/{0007_mighty_vector.sql → 0007_chief_spitfire.sql} +4 -1
- package/drizzle/meta/0007_snapshot.json +35 -1
- package/drizzle/meta/_journal.json +2 -2
- package/package.json +1 -1
- package/public/assets/{index-SJA3BfFF.css → index-7mg_EgFV.css} +1 -1
- package/public/assets/index-Dctd_Gv0.js +621 -0
- package/public/assets/{web-BF1keYK_.js → web-DTaIVS90.js} +1 -1
- package/public/index.html +2 -2
- package/public/assets/index-CjuyEcrF.js +0 -525
|
@@ -1,525 +0,0 @@
|
|
|
1
|
-
var L2=Object.defineProperty;var D2=(e,t,a)=>t in e?L2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var ln=(e,t,a)=>D2(e,typeof t!="symbol"?t+"":t,a);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function a(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(o){if(o.ep)return;o.ep=!0;const u=a(o);fetch(o.href,u)}})();function qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mm={exports:{}},Zl={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ax;function j2(){if(ax)return Zl;ax=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(r,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:e,type:r,key:c,ref:o!==void 0?o:null,props:u}}return Zl.Fragment=t,Zl.jsx=a,Zl.jsxs=a,Zl}var sx;function B2(){return sx||(sx=1,mm.exports=j2()),mm.exports}var i=B2(),hm={exports:{}},Qe={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var rx;function P2(){if(rx)return Qe;rx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function N(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,w={};function _(I,W,C){this.props=I,this.context=W,this.refs=w,this.updater=C||S}_.prototype.isReactComponent={},_.prototype.setState=function(I,W){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,W,"setState")},_.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function M(){}M.prototype=_.prototype;function k(I,W,C){this.props=I,this.context=W,this.refs=w,this.updater=C||S}var L=k.prototype=new M;L.constructor=k,A(L,_.prototype),L.isPureReactComponent=!0;var O=Array.isArray;function P(){}var z={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function V(I,W,C){var de=C.ref;return{$$typeof:e,type:I,key:W,ref:de!==void 0?de:null,props:C}}function j(I,W){return V(I.type,W,I.props)}function ee(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function se(I){var W={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(C){return W[C]})}var he=/\/+/g;function te(I,W){return typeof I=="object"&&I!==null&&I.key!=null?se(""+I.key):W.toString(36)}function K(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(P,P):(I.status="pending",I.then(function(W){I.status==="pending"&&(I.status="fulfilled",I.value=W)},function(W){I.status==="pending"&&(I.status="rejected",I.reason=W)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function G(I,W,C,de,_e){var B=typeof I;(B==="undefined"||B==="boolean")&&(I=null);var pe=!1;if(I===null)pe=!0;else switch(B){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(I.$$typeof){case e:case t:pe=!0;break;case b:return pe=I._init,G(pe(I._payload),W,C,de,_e)}}if(pe)return _e=_e(I),pe=de===""?"."+te(I,0):de,O(_e)?(C="",pe!=null&&(C=pe.replace(he,"$&/")+"/"),G(_e,W,C,"",function(lt){return lt})):_e!=null&&(ee(_e)&&(_e=j(_e,C+(_e.key==null||I&&I.key===_e.key?"":(""+_e.key).replace(he,"$&/")+"/")+pe)),W.push(_e)),1;pe=0;var Re=de===""?".":de+":";if(O(I))for(var De=0;De<I.length;De++)de=I[De],B=Re+te(de,De),pe+=G(de,W,C,B,_e);else if(De=N(I),typeof De=="function")for(I=De.call(I),De=0;!(de=I.next()).done;)de=de.value,B=Re+te(de,De++),pe+=G(de,W,C,B,_e);else if(B==="object"){if(typeof I.then=="function")return G(K(I),W,C,de,_e);throw W=String(I),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return pe}function F(I,W,C){if(I==null)return I;var de=[],_e=0;return G(I,de,"","",function(B){return W.call(C,B,_e++)}),de}function $(I){if(I._status===-1){var W=I._result;W=W(),W.then(function(C){(I._status===0||I._status===-1)&&(I._status=1,I._result=C)},function(C){(I._status===0||I._status===-1)&&(I._status=2,I._result=C)}),I._status===-1&&(I._status=0,I._result=W)}if(I._status===1)return I._result.default;throw I._result}var q=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},D={map:F,forEach:function(I,W,C){F(I,function(){W.apply(this,arguments)},C)},count:function(I){var W=0;return F(I,function(){W++}),W},toArray:function(I){return F(I,function(W){return W})||[]},only:function(I){if(!ee(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Qe.Activity=g,Qe.Children=D,Qe.Component=_,Qe.Fragment=a,Qe.Profiler=o,Qe.PureComponent=k,Qe.StrictMode=r,Qe.Suspense=m,Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Qe.__COMPILER_RUNTIME={__proto__:null,c:function(I){return z.H.useMemoCache(I)}},Qe.cache=function(I){return function(){return I.apply(null,arguments)}},Qe.cacheSignal=function(){return null},Qe.cloneElement=function(I,W,C){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var de=A({},I.props),_e=I.key;if(W!=null)for(B in W.key!==void 0&&(_e=""+W.key),W)!J.call(W,B)||B==="key"||B==="__self"||B==="__source"||B==="ref"&&W.ref===void 0||(de[B]=W[B]);var B=arguments.length-2;if(B===1)de.children=C;else if(1<B){for(var pe=Array(B),Re=0;Re<B;Re++)pe[Re]=arguments[Re+2];de.children=pe}return V(I.type,_e,de)},Qe.createContext=function(I){return I={$$typeof:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:u,_context:I},I},Qe.createElement=function(I,W,C){var de,_e={},B=null;if(W!=null)for(de in W.key!==void 0&&(B=""+W.key),W)J.call(W,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(_e[de]=W[de]);var pe=arguments.length-2;if(pe===1)_e.children=C;else if(1<pe){for(var Re=Array(pe),De=0;De<pe;De++)Re[De]=arguments[De+2];_e.children=Re}if(I&&I.defaultProps)for(de in pe=I.defaultProps,pe)_e[de]===void 0&&(_e[de]=pe[de]);return V(I,B,_e)},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(I){return{$$typeof:f,render:I}},Qe.isValidElement=ee,Qe.lazy=function(I){return{$$typeof:b,_payload:{_status:-1,_result:I},_init:$}},Qe.memo=function(I,W){return{$$typeof:h,type:I,compare:W===void 0?null:W}},Qe.startTransition=function(I){var W=z.T,C={};z.T=C;try{var de=I(),_e=z.S;_e!==null&&_e(C,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(P,q)}catch(B){q(B)}finally{W!==null&&C.types!==null&&(W.types=C.types),z.T=W}},Qe.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Qe.use=function(I){return z.H.use(I)},Qe.useActionState=function(I,W,C){return z.H.useActionState(I,W,C)},Qe.useCallback=function(I,W){return z.H.useCallback(I,W)},Qe.useContext=function(I){return z.H.useContext(I)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(I,W){return z.H.useDeferredValue(I,W)},Qe.useEffect=function(I,W){return z.H.useEffect(I,W)},Qe.useEffectEvent=function(I){return z.H.useEffectEvent(I)},Qe.useId=function(){return z.H.useId()},Qe.useImperativeHandle=function(I,W,C){return z.H.useImperativeHandle(I,W,C)},Qe.useInsertionEffect=function(I,W){return z.H.useInsertionEffect(I,W)},Qe.useLayoutEffect=function(I,W){return z.H.useLayoutEffect(I,W)},Qe.useMemo=function(I,W){return z.H.useMemo(I,W)},Qe.useOptimistic=function(I,W){return z.H.useOptimistic(I,W)},Qe.useReducer=function(I,W,C){return z.H.useReducer(I,W,C)},Qe.useRef=function(I){return z.H.useRef(I)},Qe.useState=function(I){return z.H.useState(I)},Qe.useSyncExternalStore=function(I,W,C){return z.H.useSyncExternalStore(I,W,C)},Qe.useTransition=function(){return z.H.useTransition()},Qe.version="19.2.8",Qe}var ix;function Ih(){return ix||(ix=1,hm.exports=P2()),hm.exports}var T=Ih();const rc=qc(T);var pm={exports:{}},Jl={},gm={exports:{}},bm={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var lx;function U2(){return lx||(lx=1,(function(e){function t(G,F){var $=G.length;G.push(F);e:for(;0<$;){var q=$-1>>>1,D=G[q];if(0<o(D,F))G[q]=F,G[$]=D,$=q;else break e}}function a(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var F=G[0],$=G.pop();if($!==F){G[0]=$;e:for(var q=0,D=G.length,I=D>>>1;q<I;){var W=2*(q+1)-1,C=G[W],de=W+1,_e=G[de];if(0>o(C,$))de<D&&0>o(_e,C)?(G[q]=_e,G[de]=$,q=de):(G[q]=C,G[W]=$,q=W);else if(de<D&&0>o(_e,$))G[q]=_e,G[de]=$,q=de;else break e}}return F}function o(G,F){var $=G.sortIndex-F.sortIndex;return $!==0?$:G.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var m=[],h=[],b=1,g=null,y=3,N=!1,S=!1,A=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function L(G){for(var F=a(h);F!==null;){if(F.callback===null)r(h);else if(F.startTime<=G)r(h),F.sortIndex=F.expirationTime,t(m,F);else break;F=a(h)}}function O(G){if(A=!1,L(G),!S)if(a(m)!==null)S=!0,P||(P=!0,se());else{var F=a(h);F!==null&&K(O,F.startTime-G)}}var P=!1,z=-1,J=5,V=-1;function j(){return w?!0:!(e.unstable_now()-V<J)}function ee(){if(w=!1,P){var G=e.unstable_now();V=G;var F=!0;try{e:{S=!1,A&&(A=!1,M(z),z=-1),N=!0;var $=y;try{t:{for(L(G),g=a(m);g!==null&&!(g.expirationTime>G&&j());){var q=g.callback;if(typeof q=="function"){g.callback=null,y=g.priorityLevel;var D=q(g.expirationTime<=G);if(G=e.unstable_now(),typeof D=="function"){g.callback=D,L(G),F=!0;break t}g===a(m)&&r(m),L(G)}else r(m);g=a(m)}if(g!==null)F=!0;else{var I=a(h);I!==null&&K(O,I.startTime-G),F=!1}}break e}finally{g=null,y=$,N=!1}F=void 0}}finally{F?se():P=!1}}}var se;if(typeof k=="function")se=function(){k(ee)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,te=he.port2;he.port1.onmessage=ee,se=function(){te.postMessage(null)}}else se=function(){_(ee,0)};function K(G,F){z=_(function(){G(e.unstable_now())},F)}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(G){G.callback=null},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(G){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var $=y;y=F;try{return G()}finally{y=$}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(G,F){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var $=y;y=G;try{return F()}finally{y=$}},e.unstable_scheduleCallback=function(G,F,$){var q=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?q+$:q):$=q,G){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=$+D,G={id:b++,callback:F,priorityLevel:G,startTime:$,expirationTime:D,sortIndex:-1},$>q?(G.sortIndex=$,t(h,G),a(m)===null&&G===a(h)&&(A?(M(z),z=-1):A=!0,K(O,$-q))):(G.sortIndex=D,t(m,G),S||N||(S=!0,P||(P=!0,se()))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var F=y;return function(){var $=y;y=F;try{return G.apply(this,arguments)}finally{y=$}}}})(bm)),bm}var ox;function H2(){return ox||(ox=1,gm.exports=U2()),gm.exports}var xm={exports:{}},kn={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var ux;function F2(){if(ux)return kn;ux=1;var e=Ih();function t(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(m,h,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:m,containerInfo:h,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return kn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,kn.createPortal=function(m,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return u(m,h,null,b)},kn.flushSync=function(m){var h=c.T,b=r.p;try{if(c.T=null,r.p=2,m)return m()}finally{c.T=h,r.p=b,r.d.f()}},kn.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(m,h))},kn.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},kn.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var b=h.as,g=f(b,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,N=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?r.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:N}):b==="script"&&r.d.X(m,{crossOrigin:g,integrity:y,fetchPriority:N,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},kn.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=f(h.as,h.crossOrigin);r.d.M(m,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(m)},kn.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,g=f(b,h.crossOrigin);r.d.L(m,b,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},kn.preloadModule=function(m,h){if(typeof m=="string")if(h){var b=f(h.as,h.crossOrigin);r.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(m)},kn.requestFormReset=function(m){r.d.r(m)},kn.unstable_batchedUpdates=function(m,h){return m(h)},kn.useFormState=function(m,h,b){return c.H.useFormState(m,h,b)},kn.useFormStatus=function(){return c.H.useHostTransitionStatus()},kn.version="19.2.8",kn}var cx;function z2(){if(cx)return xm.exports;cx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),xm.exports=F2(),xm.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var dx;function $2(){if(dx)return Jl;dx=1;var e=H2(),t=Ih(),a=z2();function r(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var s=n,l=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(l=s.return),n=s.return;while(n)}return s.tag===3?l:null}function c(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function f(n){if(n.tag===31){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function m(n){if(u(n)!==n)throw Error(r(188))}function h(n){var s=n.alternate;if(!s){if(s=u(n),s===null)throw Error(r(188));return s!==n?null:n}for(var l=n,d=s;;){var p=l.return;if(p===null)break;var x=p.alternate;if(x===null){if(d=p.return,d!==null){l=d;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===l)return m(p),n;if(x===d)return m(p),s;x=x.sibling}throw Error(r(188))}if(l.return!==d.return)l=p,d=x;else{for(var v=!1,R=p.child;R;){if(R===l){v=!0,l=p,d=x;break}if(R===d){v=!0,d=p,l=x;break}R=R.sibling}if(!v){for(R=x.child;R;){if(R===l){v=!0,l=x,d=p;break}if(R===d){v=!0,d=x,l=p;break}R=R.sibling}if(!v)throw Error(r(189))}}if(l.alternate!==d)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?n:s}function b(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=b(n),s!==null)return s;n=n.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),k=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function se(n){return n===null||typeof n!="object"?null:(n=ee&&n[ee]||n["@@iterator"],typeof n=="function"?n:null)}var he=Symbol.for("react.client.reference");function te(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===he?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case A:return"Fragment";case _:return"Profiler";case w:return"StrictMode";case O:return"Suspense";case P:return"SuspenseList";case V:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case k:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case L:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case z:return s=n.displayName||null,s!==null?s:te(n.type)||"Memo";case J:s=n._payload,n=n._init;try{return te(n(s))}catch{}}return null}var K=Array.isArray,G=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},q=[],D=-1;function I(n){return{current:n}}function W(n){0>D||(n.current=q[D],q[D]=null,D--)}function C(n,s){D++,q[D]=n.current,n.current=s}var de=I(null),_e=I(null),B=I(null),pe=I(null);function Re(n,s){switch(C(B,s),C(_e,n),C(de,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?Ab(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=Ab(s),n=wb(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}W(de),C(de,n)}function De(){W(de),W(_e),W(B)}function lt(n){n.memoizedState!==null&&C(pe,n);var s=de.current,l=wb(s,n.type);s!==l&&(C(_e,n),C(de,l))}function Bt(n){_e.current===n&&(W(de),W(_e)),pe.current===n&&(W(pe),Vl._currentValue=$)}var Jt,ya;function dn(n){if(Jt===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);Jt=s&&s[1]||"",ya=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Jt+n+ya}var $n=!1;function et(n,s){if(!n||$n)return"";$n=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(s){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(ue){var oe=ue}Reflect.construct(n,[],xe)}else{try{xe.call()}catch(ue){oe=ue}n.call(xe.prototype)}}else{try{throw Error()}catch(ue){oe=ue}(xe=n())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(ue){if(ue&&oe&&typeof ue.stack=="string")return[ue.stack,oe.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=d.DetermineComponentFrameRoot(),v=x[0],R=x[1];if(v&&R){var X=v.split(`
|
|
44
|
-
`),le=R.split(`
|
|
45
|
-
`);for(p=d=0;d<X.length&&!X[d].includes("DetermineComponentFrameRoot");)d++;for(;p<le.length&&!le[p].includes("DetermineComponentFrameRoot");)p++;if(d===X.length||p===le.length)for(d=X.length-1,p=le.length-1;1<=d&&0<=p&&X[d]!==le[p];)p--;for(;1<=d&&0<=p;d--,p--)if(X[d]!==le[p]){if(d!==1||p!==1)do if(d--,p--,0>p||X[d]!==le[p]){var me=`
|
|
46
|
-
`+X[d].replace(" at new "," at ");return n.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",n.displayName)),me}while(1<=d&&0<=p);break}}}finally{$n=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?dn(l):""}function qn(n,s){switch(n.tag){case 26:case 27:case 5:return dn(n.type);case 16:return dn("Lazy");case 13:return n.child!==s&&s!==null?dn("Suspense Fallback"):dn("Suspense");case 19:return dn("SuspenseList");case 0:case 15:return et(n.type,!1);case 11:return et(n.type.render,!1);case 1:return et(n.type,!0);case 31:return dn("Activity");default:return""}}function Dn(n){try{var s="",l=null;do s+=qn(n,l),l=n,n=n.return;while(n);return s}catch(d){return`
|
|
47
|
-
Error generating stack: `+d.message+`
|
|
48
|
-
`+d.stack}}var Yn=Object.prototype.hasOwnProperty,Da=e.unstable_scheduleCallback,Ee=e.unstable_cancelCallback,ft=e.unstable_shouldYield,la=e.unstable_requestPaint,It=e.unstable_now,Jr=e.unstable_getCurrentPriorityLevel,fe=e.unstable_ImmediatePriority,Ae=e.unstable_UserBlockingPriority,ze=e.unstable_NormalPriority,tt=e.unstable_LowPriority,pt=e.unstable_IdlePriority,jn=e.log,ja=e.unstable_setDisableYieldValue,bn=null,$t=null;function An(n){if(typeof jn=="function"&&ja(n),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(bn,n)}catch{}}var Et=Math.clz32?Math.clz32:$o,$a=Math.log,Bn=Math.LN2;function $o(n){return n>>>=0,n===0?32:31-($a(n)/Bn|0)|0}var fr=256,ei=262144,mr=4194304;function Gn(n){var s=n&42;if(s!==0)return s;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Q(n,s,l){var d=n.pendingLanes;if(d===0)return 0;var p=0,x=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var R=d&134217727;return R!==0?(d=R&~x,d!==0?p=Gn(d):(v&=R,v!==0?p=Gn(v):l||(l=R&~n,l!==0&&(p=Gn(l))))):(R=d&~x,R!==0?p=Gn(R):v!==0?p=Gn(v):l||(l=d&~n,l!==0&&(p=Gn(l)))),p===0?0:s!==0&&s!==p&&(s&x)===0&&(x=p&-p,l=s&-s,x>=l||x===32&&(l&4194048)!==0)?s:p}function ge(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function Ce(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ke(){var n=mr;return mr<<=1,(mr&62914560)===0&&(mr=4194304),n}function Lt(n){for(var s=[],l=0;31>l;l++)s.push(n);return s}function Ct(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function je(n,s,l,d,p,x){var v=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var R=n.entanglements,X=n.expirationTimes,le=n.hiddenUpdates;for(l=v&~l;0<l;){var me=31-Et(l),xe=1<<me;R[me]=0,X[me]=-1;var oe=le[me];if(oe!==null)for(le[me]=null,me=0;me<oe.length;me++){var ue=oe[me];ue!==null&&(ue.lane&=-536870913)}l&=~xe}d!==0&&Ie(n,d,0),x!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=x&~(v&~s))}function Ie(n,s,l){n.pendingLanes|=s,n.suspendedLanes&=~s;var d=31-Et(s);n.entangledLanes|=s,n.entanglements[d]=n.entanglements[d]|1073741824|l&261930}function Ge(n,s){var l=n.entangledLanes|=s;for(n=n.entanglements;l;){var d=31-Et(l),p=1<<d;p&s|n[d]&s&&(n[d]|=s),l&=~p}}function Kt(n,s){var l=s&-s;return l=(l&42)!==0?1:Pt(l),(l&(n.suspendedLanes|s))!==0?0:l}function Pt(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function as(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ti(){var n=F.p;return n!==0?n:(n=window.event,n===void 0?32:Qb(n.type))}function ni(n,s){var l=F.p;try{return F.p=n,s()}finally{F.p=l}}var qa=Math.random().toString(36).slice(2),Vt="__reactFiber$"+qa,wn="__reactProps$"+qa,ks="__reactContainer$"+qa,rl="__reactEvents$"+qa,qo="__reactListeners$"+qa,ai="__reactHandles$"+qa,Yo="__reactResources$"+qa,hr="__reactMarker$"+qa;function il(n){delete n[Vt],delete n[wn],delete n[rl],delete n[qo],delete n[ai]}function Pn(n){var s=n[Vt];if(s)return s;for(var l=n.parentNode;l;){if(s=l[ks]||l[Vt]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(n=Lb(n);n!==null;){if(l=n[Vt])return l;n=Lb(n)}return s}n=l,l=n.parentNode}return null}function ss(n){if(n=n[Vt]||n[ks]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function Rs(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(r(33))}function Os(n){var s=n[Yo];return s||(s=n[Yo]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function en(n){n[hr]=!0}var Go=new Set,pr={};function rs(n,s){Te(n,s),Te(n+"Capture",s)}function Te(n,s){for(pr[n]=s,n=0;n<s.length;n++)Go.add(s[n])}var Ue=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),nt={},yt={};function Xt(n){return Yn.call(yt,n)?!0:Yn.call(nt,n)?!1:Ue.test(n)?yt[n]=!0:(nt[n]=!0,!1)}function Cn(n,s,l){if(Xt(s))if(l===null)n.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var d=s.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+l)}}function oa(n,s,l){if(l===null)n.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+l)}}function Kn(n,s,l,d){if(d===null)n.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(s,l,""+d)}}function Mt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function ua(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Ko(n,s,l){var d=Object.getOwnPropertyDescriptor(n.constructor.prototype,s);if(!n.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var p=d.get,x=d.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return p.call(this)},set:function(v){l=""+v,x.call(this,v)}}),Object.defineProperty(n,s,{enumerable:d.enumerable}),{getValue:function(){return l},setValue:function(v){l=""+v},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function si(n){if(!n._valueTracker){var s=ua(n)?"checked":"value";n._valueTracker=Ko(n,s,""+n[s])}}function ll(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var l=s.getValue(),d="";return n&&(d=ua(n)?n.checked?"true":"false":n.value),n=d,n!==l?(s.setValue(n),!0):!1}function ri(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var dd=/[\n"\\]/g;function Vn(n){return n.replace(dd,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function ol(n,s,l,d,p,x,v,R){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),s!=null?v==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+Mt(s)):n.value!==""+Mt(s)&&(n.value=""+Mt(s)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),s!=null?ii(n,v,Mt(s)):l!=null?ii(n,v,Mt(l)):d!=null&&n.removeAttribute("value"),p==null&&x!=null&&(n.defaultChecked=!!x),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?n.name=""+Mt(R):n.removeAttribute("name")}function gr(n,s,l,d,p,x,v,R){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(n.type=x),s!=null||l!=null){if(!(x!=="submit"&&x!=="reset"||s!=null)){si(n);return}l=l!=null?""+Mt(l):"",s=s!=null?""+Mt(s):l,R||s===n.value||(n.value=s),n.defaultValue=s}d=d??p,d=typeof d!="function"&&typeof d!="symbol"&&!!d,n.checked=R?n.checked:!!d,n.defaultChecked=!!d,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),si(n)}function ii(n,s,l){s==="number"&&ri(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function xn(n,s,l,d){if(n=n.options,s){s={};for(var p=0;p<l.length;p++)s["$"+l[p]]=!0;for(l=0;l<n.length;l++)p=s.hasOwnProperty("$"+n[l].value),n[l].selected!==p&&(n[l].selected=p),p&&d&&(n[l].defaultSelected=!0)}else{for(l=""+Mt(l),s=null,p=0;p<n.length;p++){if(n[p].value===l){n[p].selected=!0,d&&(n[p].defaultSelected=!0);return}s!==null||n[p].disabled||(s=n[p])}s!==null&&(s.selected=!0)}}function Vo(n,s,l){if(s!=null&&(s=""+Mt(s),s!==n.value&&(n.value=s),l==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=l!=null?""+Mt(l):""}function li(n,s,l,d){if(s==null){if(d!=null){if(l!=null)throw Error(r(92));if(K(d)){if(1<d.length)throw Error(r(93));d=d[0]}l=d}l==null&&(l=""),s=l}l=Mt(s),n.defaultValue=l,d=n.textContent,d===l&&d!==""&&d!==null&&(n.value=d),si(n)}function qe(n,s){if(s){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=s;return}}n.textContent=s}var Xo=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tn(n,s,l){var d=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?d?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":d?n.setProperty(s,l):typeof l!="number"||l===0||Xo.has(s)?s==="float"?n.cssFloat=l:n[s]=(""+l).trim():n[s]=l+"px"}function Nt(n,s,l){if(s!=null&&typeof s!="object")throw Error(r(62));if(n=n.style,l!=null){for(var d in l)!l.hasOwnProperty(d)||s!=null&&s.hasOwnProperty(d)||(d.indexOf("--")===0?n.setProperty(d,""):d==="float"?n.cssFloat="":n[d]="");for(var p in s)d=s[p],s.hasOwnProperty(p)&&l[p]!==d&&tn(n,p,d)}else for(var x in s)s.hasOwnProperty(x)&&tn(n,x,s[x])}function Is(n){if(n.indexOf("-")===-1)return!1;switch(n){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 is=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ul=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ms(n){return ul.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function we(){}var Be=null;function We(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ot=null,zt=null;function Na(n){var s=ss(n);if(s&&(n=s.stateNode)){var l=n[wn]||null;e:switch(n=s.stateNode,s.type){case"input":if(ol(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Vn(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var d=l[s];if(d!==n&&d.form===n.form){var p=d[wn]||null;if(!p)throw Error(r(90));ol(d,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(s=0;s<l.length;s++)d=l[s],d.form===n.form&&ll(d)}break e;case"textarea":Vo(n,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&xn(n,!!l.multiple,s,!1)}}}var cl=!1;function Qo(n,s,l){if(cl)return n(s,l);cl=!0;try{var d=n(s);return d}finally{if(cl=!1,(ot!==null||zt!==null)&&(Bu(),ot&&(s=ot,n=zt,zt=ot=null,Na(s),n)))for(s=0;s<n.length;s++)Na(n[s])}}function dl(n,s){var l=n.stateNode;if(l===null)return null;var d=l[wn]||null;if(d===null)return null;l=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(n=n.type,d=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!d;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(r(231,s,typeof l));return l}var ls=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fd=!1;if(ls)try{var fl={};Object.defineProperty(fl,"passive",{get:function(){fd=!0}}),window.addEventListener("test",fl,fl),window.removeEventListener("test",fl,fl)}catch{fd=!1}var Ls=null,md=null,Wo=null;function wp(){if(Wo)return Wo;var n,s=md,l=s.length,d,p="value"in Ls?Ls.value:Ls.textContent,x=p.length;for(n=0;n<l&&s[n]===p[n];n++);var v=l-n;for(d=1;d<=v&&s[l-d]===p[x-d];d++);return Wo=p.slice(n,1<d?1-d:void 0)}function Zo(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function Jo(){return!0}function Cp(){return!1}function Xn(n){function s(l,d,p,x,v){this._reactName=l,this._targetInst=p,this.type=d,this.nativeEvent=x,this.target=v,this.currentTarget=null;for(var R in n)n.hasOwnProperty(R)&&(l=n[R],this[R]=l?l(x):x[R]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Jo:Cp,this.isPropagationStopped=Cp,this}return g(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Jo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Jo)},persist:function(){},isPersistent:Jo}),s}var br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eu=Xn(br),ml=g({},br,{view:0,detail:0}),I_=Xn(ml),hd,pd,hl,tu=g({},ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bd,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==hl&&(hl&&n.type==="mousemove"?(hd=n.screenX-hl.screenX,pd=n.screenY-hl.screenY):pd=hd=0,hl=n),hd)},movementY:function(n){return"movementY"in n?n.movementY:pd}}),kp=Xn(tu),M_=g({},tu,{dataTransfer:0}),L_=Xn(M_),D_=g({},ml,{relatedTarget:0}),gd=Xn(D_),j_=g({},br,{animationName:0,elapsedTime:0,pseudoElement:0}),B_=Xn(j_),P_=g({},br,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),U_=Xn(P_),H_=g({},br,{data:0}),Rp=Xn(H_),F_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},z_={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"},$_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function q_(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=$_[n])?!!s[n]:!1}function bd(){return q_}var Y_=g({},ml,{key:function(n){if(n.key){var s=F_[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=Zo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?z_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bd,charCode:function(n){return n.type==="keypress"?Zo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Zo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),G_=Xn(Y_),K_=g({},tu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Op=Xn(K_),V_=g({},ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bd}),X_=Xn(V_),Q_=g({},br,{propertyName:0,elapsedTime:0,pseudoElement:0}),W_=Xn(Q_),Z_=g({},tu,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),J_=Xn(Z_),ev=g({},br,{newState:0,oldState:0}),tv=Xn(ev),nv=[9,13,27,32],xd=ls&&"CompositionEvent"in window,pl=null;ls&&"documentMode"in document&&(pl=document.documentMode);var av=ls&&"TextEvent"in window&&!pl,Ip=ls&&(!xd||pl&&8<pl&&11>=pl),Mp=" ",Lp=!1;function Dp(n,s){switch(n){case"keyup":return nv.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var oi=!1;function sv(n,s){switch(n){case"compositionend":return jp(s);case"keypress":return s.which!==32?null:(Lp=!0,Mp);case"textInput":return n=s.data,n===Mp&&Lp?null:n;default:return null}}function rv(n,s){if(oi)return n==="compositionend"||!xd&&Dp(n,s)?(n=wp(),Wo=md=Ls=null,oi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Ip&&s.locale!=="ko"?null:s.data;default:return null}}var iv={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 Bp(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!iv[n.type]:s==="textarea"}function Pp(n,s,l,d){ot?zt?zt.push(d):zt=[d]:ot=d,s=qu(s,"onChange"),0<s.length&&(l=new eu("onChange","change",null,l,d),n.push({event:l,listeners:s}))}var gl=null,bl=null;function lv(n){yb(n,0)}function nu(n){var s=Rs(n);if(ll(s))return n}function Up(n,s){if(n==="change")return s}var Hp=!1;if(ls){var Ed;if(ls){var yd="oninput"in document;if(!yd){var Fp=document.createElement("div");Fp.setAttribute("oninput","return;"),yd=typeof Fp.oninput=="function"}Ed=yd}else Ed=!1;Hp=Ed&&(!document.documentMode||9<document.documentMode)}function zp(){gl&&(gl.detachEvent("onpropertychange",$p),bl=gl=null)}function $p(n){if(n.propertyName==="value"&&nu(bl)){var s=[];Pp(s,bl,n,We(n)),Qo(lv,s)}}function ov(n,s,l){n==="focusin"?(zp(),gl=s,bl=l,gl.attachEvent("onpropertychange",$p)):n==="focusout"&&zp()}function uv(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return nu(bl)}function cv(n,s){if(n==="click")return nu(s)}function dv(n,s){if(n==="input"||n==="change")return nu(s)}function fv(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var ca=typeof Object.is=="function"?Object.is:fv;function xl(n,s){if(ca(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var l=Object.keys(n),d=Object.keys(s);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var p=l[d];if(!Yn.call(s,p)||!ca(n[p],s[p]))return!1}return!0}function qp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Yp(n,s){var l=qp(n);n=0;for(var d;l;){if(l.nodeType===3){if(d=n+l.textContent.length,n<=s&&d>=s)return{node:l,offset:s-n};n=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=qp(l)}}function Gp(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?Gp(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function Kp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=ri(n.document);s instanceof n.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)n=s.contentWindow;else break;s=ri(n.document)}return s}function Nd(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var mv=ls&&"documentMode"in document&&11>=document.documentMode,ui=null,Td=null,El=null,_d=!1;function Vp(n,s,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;_d||ui==null||ui!==ri(d)||(d=ui,"selectionStart"in d&&Nd(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),El&&xl(El,d)||(El=d,d=qu(Td,"onSelect"),0<d.length&&(s=new eu("onSelect","select",null,s,l),n.push({event:s,listeners:d}),s.target=ui)))}function xr(n,s){var l={};return l[n.toLowerCase()]=s.toLowerCase(),l["Webkit"+n]="webkit"+s,l["Moz"+n]="moz"+s,l}var ci={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionrun:xr("Transition","TransitionRun"),transitionstart:xr("Transition","TransitionStart"),transitioncancel:xr("Transition","TransitionCancel"),transitionend:xr("Transition","TransitionEnd")},vd={},Xp={};ls&&(Xp=document.createElement("div").style,"AnimationEvent"in window||(delete ci.animationend.animation,delete ci.animationiteration.animation,delete ci.animationstart.animation),"TransitionEvent"in window||delete ci.transitionend.transition);function Er(n){if(vd[n])return vd[n];if(!ci[n])return n;var s=ci[n],l;for(l in s)if(s.hasOwnProperty(l)&&l in Xp)return vd[n]=s[l];return n}var Qp=Er("animationend"),Wp=Er("animationiteration"),Zp=Er("animationstart"),hv=Er("transitionrun"),pv=Er("transitionstart"),gv=Er("transitioncancel"),Jp=Er("transitionend"),e0=new Map,Sd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Sd.push("scrollEnd");function Ba(n,s){e0.set(n,s),rs(s,[n])}var au=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Ta=[],di=0,Ad=0;function su(){for(var n=di,s=Ad=di=0;s<n;){var l=Ta[s];Ta[s++]=null;var d=Ta[s];Ta[s++]=null;var p=Ta[s];Ta[s++]=null;var x=Ta[s];if(Ta[s++]=null,d!==null&&p!==null){var v=d.pending;v===null?p.next=p:(p.next=v.next,v.next=p),d.pending=p}x!==0&&t0(l,p,x)}}function ru(n,s,l,d){Ta[di++]=n,Ta[di++]=s,Ta[di++]=l,Ta[di++]=d,Ad|=d,n.lanes|=d,n=n.alternate,n!==null&&(n.lanes|=d)}function wd(n,s,l,d){return ru(n,s,l,d),iu(n)}function yr(n,s){return ru(n,null,null,s),iu(n)}function t0(n,s,l){n.lanes|=l;var d=n.alternate;d!==null&&(d.lanes|=l);for(var p=!1,x=n.return;x!==null;)x.childLanes|=l,d=x.alternate,d!==null&&(d.childLanes|=l),x.tag===22&&(n=x.stateNode,n===null||n._visibility&1||(p=!0)),n=x,x=x.return;return n.tag===3?(x=n.stateNode,p&&s!==null&&(p=31-Et(l),n=x.hiddenUpdates,d=n[p],d===null?n[p]=[s]:d.push(s),s.lane=l|536870912),x):null}function iu(n){if(50<Fl)throw Fl=0,Bf=null,Error(r(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var fi={};function bv(n,s,l,d){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function da(n,s,l,d){return new bv(n,s,l,d)}function Cd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function os(n,s){var l=n.alternate;return l===null?(l=da(n.tag,s,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=s,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,s=n.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function n0(n,s){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,s=l.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function lu(n,s,l,d,p,x){var v=0;if(d=n,typeof n=="function")Cd(n)&&(v=1);else if(typeof n=="string")v=T2(n,l,de.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case V:return n=da(31,l,s,p),n.elementType=V,n.lanes=x,n;case A:return Nr(l.children,p,x,s);case w:v=8,p|=24;break;case _:return n=da(12,l,s,p|2),n.elementType=_,n.lanes=x,n;case O:return n=da(13,l,s,p),n.elementType=O,n.lanes=x,n;case P:return n=da(19,l,s,p),n.elementType=P,n.lanes=x,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case k:v=10;break e;case M:v=9;break e;case L:v=11;break e;case z:v=14;break e;case J:v=16,d=null;break e}v=29,l=Error(r(130,n===null?"null":typeof n,"")),d=null}return s=da(v,l,s,p),s.elementType=n,s.type=d,s.lanes=x,s}function Nr(n,s,l,d){return n=da(7,n,d,s),n.lanes=l,n}function kd(n,s,l){return n=da(6,n,null,s),n.lanes=l,n}function a0(n){var s=da(18,null,null,0);return s.stateNode=n,s}function Rd(n,s,l){return s=da(4,n.children!==null?n.children:[],n.key,s),s.lanes=l,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var s0=new WeakMap;function _a(n,s){if(typeof n=="object"&&n!==null){var l=s0.get(n);return l!==void 0?l:(s={value:n,source:s,stack:Dn(s)},s0.set(n,s),s)}return{value:n,source:s,stack:Dn(s)}}var mi=[],hi=0,ou=null,yl=0,va=[],Sa=0,Ds=null,Ya=1,Ga="";function us(n,s){mi[hi++]=yl,mi[hi++]=ou,ou=n,yl=s}function r0(n,s,l){va[Sa++]=Ya,va[Sa++]=Ga,va[Sa++]=Ds,Ds=n;var d=Ya;n=Ga;var p=32-Et(d)-1;d&=~(1<<p),l+=1;var x=32-Et(s)+p;if(30<x){var v=p-p%5;x=(d&(1<<v)-1).toString(32),d>>=v,p-=v,Ya=1<<32-Et(s)+p|l<<p|d,Ga=x+n}else Ya=1<<x|l<<p|d,Ga=n}function Od(n){n.return!==null&&(us(n,1),r0(n,1,0))}function Id(n){for(;n===ou;)ou=mi[--hi],mi[hi]=null,yl=mi[--hi],mi[hi]=null;for(;n===Ds;)Ds=va[--Sa],va[Sa]=null,Ga=va[--Sa],va[Sa]=null,Ya=va[--Sa],va[Sa]=null}function i0(n,s){va[Sa++]=Ya,va[Sa++]=Ga,va[Sa++]=Ds,Ya=s.id,Ga=s.overflow,Ds=n}var En=null,Dt=null,mt=!1,js=null,Aa=!1,Md=Error(r(519));function Bs(n){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Nl(_a(s,n)),Md}function l0(n){var s=n.stateNode,l=n.type,d=n.memoizedProps;switch(s[Vt]=n,s[wn]=d,l){case"dialog":rt("cancel",s),rt("close",s);break;case"iframe":case"object":case"embed":rt("load",s);break;case"video":case"audio":for(l=0;l<$l.length;l++)rt($l[l],s);break;case"source":rt("error",s);break;case"img":case"image":case"link":rt("error",s),rt("load",s);break;case"details":rt("toggle",s);break;case"input":rt("invalid",s),gr(s,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":rt("invalid",s);break;case"textarea":rt("invalid",s),li(s,d.value,d.defaultValue,d.children)}l=d.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||s.textContent===""+l||d.suppressHydrationWarning===!0||vb(s.textContent,l)?(d.popover!=null&&(rt("beforetoggle",s),rt("toggle",s)),d.onScroll!=null&&rt("scroll",s),d.onScrollEnd!=null&&rt("scrollend",s),d.onClick!=null&&(s.onclick=we),s=!0):s=!1,s||Bs(n,!0)}function o0(n){for(En=n.return;En;)switch(En.tag){case 5:case 31:case 13:Aa=!1;return;case 27:case 3:Aa=!0;return;default:En=En.return}}function pi(n){if(n!==En)return!1;if(!mt)return o0(n),mt=!0,!1;var s=n.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||Zf(n.type,n.memoizedProps)),l=!l),l&&Dt&&Bs(n),o0(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));Dt=Mb(n)}else if(s===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));Dt=Mb(n)}else s===27?(s=Dt,Ws(n.type)?(n=am,am=null,Dt=n):Dt=s):Dt=En?Ca(n.stateNode.nextSibling):null;return!0}function Tr(){Dt=En=null,mt=!1}function Ld(){var n=js;return n!==null&&(Jn===null?Jn=n:Jn.push.apply(Jn,n),js=null),n}function Nl(n){js===null?js=[n]:js.push(n)}var Dd=I(null),_r=null,cs=null;function Ps(n,s,l){C(Dd,s._currentValue),s._currentValue=l}function ds(n){n._currentValue=Dd.current,W(Dd)}function jd(n,s,l){for(;n!==null;){var d=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),n===l)break;n=n.return}}function Bd(n,s,l,d){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var x=p.dependencies;if(x!==null){var v=p.child;x=x.firstContext;e:for(;x!==null;){var R=x;x=p;for(var X=0;X<s.length;X++)if(R.context===s[X]){x.lanes|=l,R=x.alternate,R!==null&&(R.lanes|=l),jd(x.return,l,n),d||(v=null);break e}x=R.next}}else if(p.tag===18){if(v=p.return,v===null)throw Error(r(341));v.lanes|=l,x=v.alternate,x!==null&&(x.lanes|=l),jd(v,l,n),v=null}else v=p.child;if(v!==null)v.return=p;else for(v=p;v!==null;){if(v===n){v=null;break}if(p=v.sibling,p!==null){p.return=v.return,v=p;break}v=v.return}p=v}}function gi(n,s,l,d){n=null;for(var p=s,x=!1;p!==null;){if(!x){if((p.flags&524288)!==0)x=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var v=p.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var R=p.type;ca(p.pendingProps.value,v.value)||(n!==null?n.push(R):n=[R])}}else if(p===pe.current){if(v=p.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Vl):n=[Vl])}p=p.return}n!==null&&Bd(s,n,l,d),s.flags|=262144}function uu(n){for(n=n.firstContext;n!==null;){if(!ca(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function vr(n){_r=n,cs=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function yn(n){return u0(_r,n)}function cu(n,s){return _r===null&&vr(n),u0(n,s)}function u0(n,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},cs===null){if(n===null)throw Error(r(308));cs=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else cs=cs.next=s;return l}var xv=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(l,d){n.push(d)}};this.abort=function(){s.aborted=!0,n.forEach(function(l){return l()})}},Ev=e.unstable_scheduleCallback,yv=e.unstable_NormalPriority,nn={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pd(){return{controller:new xv,data:new Map,refCount:0}}function Tl(n){n.refCount--,n.refCount===0&&Ev(yv,function(){n.controller.abort()})}var _l=null,Ud=0,bi=0,xi=null;function Nv(n,s){if(_l===null){var l=_l=[];Ud=0,bi=$f(),xi={status:"pending",value:void 0,then:function(d){l.push(d)}}}return Ud++,s.then(c0,c0),s}function c0(){if(--Ud===0&&_l!==null){xi!==null&&(xi.status="fulfilled");var n=_l;_l=null,bi=0,xi=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function Tv(n,s){var l=[],d={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return n.then(function(){d.status="fulfilled",d.value=s;for(var p=0;p<l.length;p++)(0,l[p])(s)},function(p){for(d.status="rejected",d.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),d}var d0=G.S;G.S=function(n,s){Vg=It(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Nv(n,s),d0!==null&&d0(n,s)};var Sr=I(null);function Hd(){var n=Sr.current;return n!==null?n:kt.pooledCache}function du(n,s){s===null?C(Sr,Sr.current):C(Sr,s.pool)}function f0(){var n=Hd();return n===null?null:{parent:nn._currentValue,pool:n}}var Ei=Error(r(460)),Fd=Error(r(474)),fu=Error(r(542)),mu={then:function(){}};function m0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function h0(n,s,l){switch(l=n[l],l===void 0?n.push(s):l!==s&&(s.then(we,we),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,g0(n),n;default:if(typeof s.status=="string")s.then(we,we);else{if(n=kt,n!==null&&100<n.shellSuspendCounter)throw Error(r(482));n=s,n.status="pending",n.then(function(d){if(s.status==="pending"){var p=s;p.status="fulfilled",p.value=d}},function(d){if(s.status==="pending"){var p=s;p.status="rejected",p.reason=d}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,g0(n),n}throw wr=s,Ei}}function Ar(n){try{var s=n._init;return s(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(wr=l,Ei):l}}var wr=null;function p0(){if(wr===null)throw Error(r(459));var n=wr;return wr=null,n}function g0(n){if(n===Ei||n===fu)throw Error(r(483))}var yi=null,vl=0;function hu(n){var s=vl;return vl+=1,yi===null&&(yi=[]),h0(yi,n,s)}function Sl(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function pu(n,s){throw s.$$typeof===y?Error(r(525)):(n=Object.prototype.toString.call(s),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function b0(n){function s(ne,Z){if(n){var ie=ne.deletions;ie===null?(ne.deletions=[Z],ne.flags|=16):ie.push(Z)}}function l(ne,Z){if(!n)return null;for(;Z!==null;)s(ne,Z),Z=Z.sibling;return null}function d(ne){for(var Z=new Map;ne!==null;)ne.key!==null?Z.set(ne.key,ne):Z.set(ne.index,ne),ne=ne.sibling;return Z}function p(ne,Z){return ne=os(ne,Z),ne.index=0,ne.sibling=null,ne}function x(ne,Z,ie){return ne.index=ie,n?(ie=ne.alternate,ie!==null?(ie=ie.index,ie<Z?(ne.flags|=67108866,Z):ie):(ne.flags|=67108866,Z)):(ne.flags|=1048576,Z)}function v(ne){return n&&ne.alternate===null&&(ne.flags|=67108866),ne}function R(ne,Z,ie,be){return Z===null||Z.tag!==6?(Z=kd(ie,ne.mode,be),Z.return=ne,Z):(Z=p(Z,ie),Z.return=ne,Z)}function X(ne,Z,ie,be){var He=ie.type;return He===A?me(ne,Z,ie.props.children,be,ie.key):Z!==null&&(Z.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===J&&Ar(He)===Z.type)?(Z=p(Z,ie.props),Sl(Z,ie),Z.return=ne,Z):(Z=lu(ie.type,ie.key,ie.props,null,ne.mode,be),Sl(Z,ie),Z.return=ne,Z)}function le(ne,Z,ie,be){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==ie.containerInfo||Z.stateNode.implementation!==ie.implementation?(Z=Rd(ie,ne.mode,be),Z.return=ne,Z):(Z=p(Z,ie.children||[]),Z.return=ne,Z)}function me(ne,Z,ie,be,He){return Z===null||Z.tag!==7?(Z=Nr(ie,ne.mode,be,He),Z.return=ne,Z):(Z=p(Z,ie),Z.return=ne,Z)}function xe(ne,Z,ie){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=kd(""+Z,ne.mode,ie),Z.return=ne,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case N:return ie=lu(Z.type,Z.key,Z.props,null,ne.mode,ie),Sl(ie,Z),ie.return=ne,ie;case S:return Z=Rd(Z,ne.mode,ie),Z.return=ne,Z;case J:return Z=Ar(Z),xe(ne,Z,ie)}if(K(Z)||se(Z))return Z=Nr(Z,ne.mode,ie,null),Z.return=ne,Z;if(typeof Z.then=="function")return xe(ne,hu(Z),ie);if(Z.$$typeof===k)return xe(ne,cu(ne,Z),ie);pu(ne,Z)}return null}function oe(ne,Z,ie,be){var He=Z!==null?Z.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return He!==null?null:R(ne,Z,""+ie,be);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case N:return ie.key===He?X(ne,Z,ie,be):null;case S:return ie.key===He?le(ne,Z,ie,be):null;case J:return ie=Ar(ie),oe(ne,Z,ie,be)}if(K(ie)||se(ie))return He!==null?null:me(ne,Z,ie,be,null);if(typeof ie.then=="function")return oe(ne,Z,hu(ie),be);if(ie.$$typeof===k)return oe(ne,Z,cu(ne,ie),be);pu(ne,ie)}return null}function ue(ne,Z,ie,be,He){if(typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint")return ne=ne.get(ie)||null,R(Z,ne,""+be,He);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case N:return ne=ne.get(be.key===null?ie:be.key)||null,X(Z,ne,be,He);case S:return ne=ne.get(be.key===null?ie:be.key)||null,le(Z,ne,be,He);case J:return be=Ar(be),ue(ne,Z,ie,be,He)}if(K(be)||se(be))return ne=ne.get(ie)||null,me(Z,ne,be,He,null);if(typeof be.then=="function")return ue(ne,Z,ie,hu(be),He);if(be.$$typeof===k)return ue(ne,Z,ie,cu(Z,be),He);pu(Z,be)}return null}function Me(ne,Z,ie,be){for(var He=null,gt=null,Pe=Z,Je=Z=0,ct=null;Pe!==null&&Je<ie.length;Je++){Pe.index>Je?(ct=Pe,Pe=null):ct=Pe.sibling;var bt=oe(ne,Pe,ie[Je],be);if(bt===null){Pe===null&&(Pe=ct);break}n&&Pe&&bt.alternate===null&&s(ne,Pe),Z=x(bt,Z,Je),gt===null?He=bt:gt.sibling=bt,gt=bt,Pe=ct}if(Je===ie.length)return l(ne,Pe),mt&&us(ne,Je),He;if(Pe===null){for(;Je<ie.length;Je++)Pe=xe(ne,ie[Je],be),Pe!==null&&(Z=x(Pe,Z,Je),gt===null?He=Pe:gt.sibling=Pe,gt=Pe);return mt&&us(ne,Je),He}for(Pe=d(Pe);Je<ie.length;Je++)ct=ue(Pe,ne,Je,ie[Je],be),ct!==null&&(n&&ct.alternate!==null&&Pe.delete(ct.key===null?Je:ct.key),Z=x(ct,Z,Je),gt===null?He=ct:gt.sibling=ct,gt=ct);return n&&Pe.forEach(function(nr){return s(ne,nr)}),mt&&us(ne,Je),He}function $e(ne,Z,ie,be){if(ie==null)throw Error(r(151));for(var He=null,gt=null,Pe=Z,Je=Z=0,ct=null,bt=ie.next();Pe!==null&&!bt.done;Je++,bt=ie.next()){Pe.index>Je?(ct=Pe,Pe=null):ct=Pe.sibling;var nr=oe(ne,Pe,bt.value,be);if(nr===null){Pe===null&&(Pe=ct);break}n&&Pe&&nr.alternate===null&&s(ne,Pe),Z=x(nr,Z,Je),gt===null?He=nr:gt.sibling=nr,gt=nr,Pe=ct}if(bt.done)return l(ne,Pe),mt&&us(ne,Je),He;if(Pe===null){for(;!bt.done;Je++,bt=ie.next())bt=xe(ne,bt.value,be),bt!==null&&(Z=x(bt,Z,Je),gt===null?He=bt:gt.sibling=bt,gt=bt);return mt&&us(ne,Je),He}for(Pe=d(Pe);!bt.done;Je++,bt=ie.next())bt=ue(Pe,ne,Je,bt.value,be),bt!==null&&(n&&bt.alternate!==null&&Pe.delete(bt.key===null?Je:bt.key),Z=x(bt,Z,Je),gt===null?He=bt:gt.sibling=bt,gt=bt);return n&&Pe.forEach(function(M2){return s(ne,M2)}),mt&&us(ne,Je),He}function At(ne,Z,ie,be){if(typeof ie=="object"&&ie!==null&&ie.type===A&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case N:e:{for(var He=ie.key;Z!==null;){if(Z.key===He){if(He=ie.type,He===A){if(Z.tag===7){l(ne,Z.sibling),be=p(Z,ie.props.children),be.return=ne,ne=be;break e}}else if(Z.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===J&&Ar(He)===Z.type){l(ne,Z.sibling),be=p(Z,ie.props),Sl(be,ie),be.return=ne,ne=be;break e}l(ne,Z);break}else s(ne,Z);Z=Z.sibling}ie.type===A?(be=Nr(ie.props.children,ne.mode,be,ie.key),be.return=ne,ne=be):(be=lu(ie.type,ie.key,ie.props,null,ne.mode,be),Sl(be,ie),be.return=ne,ne=be)}return v(ne);case S:e:{for(He=ie.key;Z!==null;){if(Z.key===He)if(Z.tag===4&&Z.stateNode.containerInfo===ie.containerInfo&&Z.stateNode.implementation===ie.implementation){l(ne,Z.sibling),be=p(Z,ie.children||[]),be.return=ne,ne=be;break e}else{l(ne,Z);break}else s(ne,Z);Z=Z.sibling}be=Rd(ie,ne.mode,be),be.return=ne,ne=be}return v(ne);case J:return ie=Ar(ie),At(ne,Z,ie,be)}if(K(ie))return Me(ne,Z,ie,be);if(se(ie)){if(He=se(ie),typeof He!="function")throw Error(r(150));return ie=He.call(ie),$e(ne,Z,ie,be)}if(typeof ie.then=="function")return At(ne,Z,hu(ie),be);if(ie.$$typeof===k)return At(ne,Z,cu(ne,ie),be);pu(ne,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Z!==null&&Z.tag===6?(l(ne,Z.sibling),be=p(Z,ie),be.return=ne,ne=be):(l(ne,Z),be=kd(ie,ne.mode,be),be.return=ne,ne=be),v(ne)):l(ne,Z)}return function(ne,Z,ie,be){try{vl=0;var He=At(ne,Z,ie,be);return yi=null,He}catch(Pe){if(Pe===Ei||Pe===fu)throw Pe;var gt=da(29,Pe,null,ne.mode);return gt.lanes=be,gt.return=ne,gt}finally{}}}var Cr=b0(!0),x0=b0(!1),Us=!1;function zd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $d(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Hs(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Fs(n,s,l){var d=n.updateQueue;if(d===null)return null;if(d=d.shared,(xt&2)!==0){var p=d.pending;return p===null?s.next=s:(s.next=p.next,p.next=s),d.pending=s,s=iu(n),t0(n,null,l),s}return ru(n,d,s,l),iu(n)}function Al(n,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var d=s.lanes;d&=n.pendingLanes,l|=d,s.lanes=l,Ge(n,l)}}function qd(n,s){var l=n.updateQueue,d=n.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var p=null,x=null;if(l=l.firstBaseUpdate,l!==null){do{var v={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};x===null?p=x=v:x=x.next=v,l=l.next}while(l!==null);x===null?p=x=s:x=x.next=s}else p=x=s;l={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:d.shared,callbacks:d.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=s:n.next=s,l.lastBaseUpdate=s}var Yd=!1;function wl(){if(Yd){var n=xi;if(n!==null)throw n}}function Cl(n,s,l,d){Yd=!1;var p=n.updateQueue;Us=!1;var x=p.firstBaseUpdate,v=p.lastBaseUpdate,R=p.shared.pending;if(R!==null){p.shared.pending=null;var X=R,le=X.next;X.next=null,v===null?x=le:v.next=le,v=X;var me=n.alternate;me!==null&&(me=me.updateQueue,R=me.lastBaseUpdate,R!==v&&(R===null?me.firstBaseUpdate=le:R.next=le,me.lastBaseUpdate=X))}if(x!==null){var xe=p.baseState;v=0,me=le=X=null,R=x;do{var oe=R.lane&-536870913,ue=oe!==R.lane;if(ue?(ut&oe)===oe:(d&oe)===oe){oe!==0&&oe===bi&&(Yd=!0),me!==null&&(me=me.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var Me=n,$e=R;oe=s;var At=l;switch($e.tag){case 1:if(Me=$e.payload,typeof Me=="function"){xe=Me.call(At,xe,oe);break e}xe=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=$e.payload,oe=typeof Me=="function"?Me.call(At,xe,oe):Me,oe==null)break e;xe=g({},xe,oe);break e;case 2:Us=!0}}oe=R.callback,oe!==null&&(n.flags|=64,ue&&(n.flags|=8192),ue=p.callbacks,ue===null?p.callbacks=[oe]:ue.push(oe))}else ue={lane:oe,tag:R.tag,payload:R.payload,callback:R.callback,next:null},me===null?(le=me=ue,X=xe):me=me.next=ue,v|=oe;if(R=R.next,R===null){if(R=p.shared.pending,R===null)break;ue=R,R=ue.next,ue.next=null,p.lastBaseUpdate=ue,p.shared.pending=null}}while(!0);me===null&&(X=xe),p.baseState=X,p.firstBaseUpdate=le,p.lastBaseUpdate=me,x===null&&(p.shared.lanes=0),Gs|=v,n.lanes=v,n.memoizedState=xe}}function E0(n,s){if(typeof n!="function")throw Error(r(191,n));n.call(s)}function y0(n,s){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)E0(l[n],s)}var Ni=I(null),gu=I(0);function N0(n,s){n=ys,C(gu,n),C(Ni,s),ys=n|s.baseLanes}function Gd(){C(gu,ys),C(Ni,Ni.current)}function Kd(){ys=gu.current,W(Ni),W(gu)}var fa=I(null),wa=null;function zs(n){var s=n.alternate;C(Qt,Qt.current&1),C(fa,n),wa===null&&(s===null||Ni.current!==null||s.memoizedState!==null)&&(wa=n)}function Vd(n){C(Qt,Qt.current),C(fa,n),wa===null&&(wa=n)}function T0(n){n.tag===22?(C(Qt,Qt.current),C(fa,n),wa===null&&(wa=n)):$s()}function $s(){C(Qt,Qt.current),C(fa,fa.current)}function ma(n){W(fa),wa===n&&(wa=null),W(Qt)}var Qt=I(0);function bu(n){for(var s=n;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||tm(l)||nm(l)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var fs=0,Ze=null,vt=null,an=null,xu=!1,Ti=!1,kr=!1,Eu=0,kl=0,_i=null,_v=0;function qt(){throw Error(r(321))}function Xd(n,s){if(s===null)return!1;for(var l=0;l<s.length&&l<n.length;l++)if(!ca(n[l],s[l]))return!1;return!0}function Qd(n,s,l,d,p,x){return fs=x,Ze=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,G.H=n===null||n.memoizedState===null?rg:ff,kr=!1,x=l(d,p),kr=!1,Ti&&(x=v0(s,l,d,p)),_0(n),x}function _0(n){G.H=Il;var s=vt!==null&&vt.next!==null;if(fs=0,an=vt=Ze=null,xu=!1,kl=0,_i=null,s)throw Error(r(300));n===null||sn||(n=n.dependencies,n!==null&&uu(n)&&(sn=!0))}function v0(n,s,l,d){Ze=n;var p=0;do{if(Ti&&(_i=null),kl=0,Ti=!1,25<=p)throw Error(r(301));if(p+=1,an=vt=null,n.updateQueue!=null){var x=n.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}G.H=ig,x=s(l,d)}while(Ti);return x}function vv(){var n=G.H,s=n.useState()[0];return s=typeof s.then=="function"?Rl(s):s,n=n.useState()[0],(vt!==null?vt.memoizedState:null)!==n&&(Ze.flags|=1024),s}function Wd(){var n=Eu!==0;return Eu=0,n}function Zd(n,s,l){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~l}function Jd(n){if(xu){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}xu=!1}fs=0,an=vt=Ze=null,Ti=!1,kl=Eu=0,_i=null}function Un(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return an===null?Ze.memoizedState=an=n:an=an.next=n,an}function Wt(){if(vt===null){var n=Ze.alternate;n=n!==null?n.memoizedState:null}else n=vt.next;var s=an===null?Ze.memoizedState:an.next;if(s!==null)an=s,vt=n;else{if(n===null)throw Ze.alternate===null?Error(r(467)):Error(r(310));vt=n,n={memoizedState:vt.memoizedState,baseState:vt.baseState,baseQueue:vt.baseQueue,queue:vt.queue,next:null},an===null?Ze.memoizedState=an=n:an=an.next=n}return an}function yu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rl(n){var s=kl;return kl+=1,_i===null&&(_i=[]),n=h0(_i,n,s),s=Ze,(an===null?s.memoizedState:an.next)===null&&(s=s.alternate,G.H=s===null||s.memoizedState===null?rg:ff),n}function Nu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Rl(n);if(n.$$typeof===k)return yn(n)}throw Error(r(438,String(n)))}function ef(n){var s=null,l=Ze.updateQueue;if(l!==null&&(s=l.memoCache),s==null){var d=Ze.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(s={data:d.data.map(function(p){return p.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),l===null&&(l=yu(),Ze.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(n),d=0;d<n;d++)l[d]=j;return s.index++,l}function ms(n,s){return typeof s=="function"?s(n):s}function Tu(n){var s=Wt();return tf(s,vt,n)}function tf(n,s,l){var d=n.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=l;var p=n.baseQueue,x=d.pending;if(x!==null){if(p!==null){var v=p.next;p.next=x.next,x.next=v}s.baseQueue=p=x,d.pending=null}if(x=n.baseState,p===null)n.memoizedState=x;else{s=p.next;var R=v=null,X=null,le=s,me=!1;do{var xe=le.lane&-536870913;if(xe!==le.lane?(ut&xe)===xe:(fs&xe)===xe){var oe=le.revertLane;if(oe===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),xe===bi&&(me=!0);else if((fs&oe)===oe){le=le.next,oe===bi&&(me=!0);continue}else xe={lane:0,revertLane:le.revertLane,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},X===null?(R=X=xe,v=x):X=X.next=xe,Ze.lanes|=oe,Gs|=oe;xe=le.action,kr&&l(x,xe),x=le.hasEagerState?le.eagerState:l(x,xe)}else oe={lane:xe,revertLane:le.revertLane,gesture:le.gesture,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},X===null?(R=X=oe,v=x):X=X.next=oe,Ze.lanes|=xe,Gs|=xe;le=le.next}while(le!==null&&le!==s);if(X===null?v=x:X.next=R,!ca(x,n.memoizedState)&&(sn=!0,me&&(l=xi,l!==null)))throw l;n.memoizedState=x,n.baseState=v,n.baseQueue=X,d.lastRenderedState=x}return p===null&&(d.lanes=0),[n.memoizedState,d.dispatch]}function nf(n){var s=Wt(),l=s.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var d=l.dispatch,p=l.pending,x=s.memoizedState;if(p!==null){l.pending=null;var v=p=p.next;do x=n(x,v.action),v=v.next;while(v!==p);ca(x,s.memoizedState)||(sn=!0),s.memoizedState=x,s.baseQueue===null&&(s.baseState=x),l.lastRenderedState=x}return[x,d]}function S0(n,s,l){var d=Ze,p=Wt(),x=mt;if(x){if(l===void 0)throw Error(r(407));l=l()}else l=s();var v=!ca((vt||p).memoizedState,l);if(v&&(p.memoizedState=l,sn=!0),p=p.queue,rf(C0.bind(null,d,p,n),[n]),p.getSnapshot!==s||v||an!==null&&an.memoizedState.tag&1){if(d.flags|=2048,vi(9,{destroy:void 0},w0.bind(null,d,p,l,s),null),kt===null)throw Error(r(349));x||(fs&127)!==0||A0(d,s,l)}return l}function A0(n,s,l){n.flags|=16384,n={getSnapshot:s,value:l},s=Ze.updateQueue,s===null?(s=yu(),Ze.updateQueue=s,s.stores=[n]):(l=s.stores,l===null?s.stores=[n]:l.push(n))}function w0(n,s,l,d){s.value=l,s.getSnapshot=d,k0(s)&&R0(n)}function C0(n,s,l){return l(function(){k0(s)&&R0(n)})}function k0(n){var s=n.getSnapshot;n=n.value;try{var l=s();return!ca(n,l)}catch{return!0}}function R0(n){var s=yr(n,2);s!==null&&ea(s,n,2)}function af(n){var s=Un();if(typeof n=="function"){var l=n;if(n=l(),kr){An(!0);try{l()}finally{An(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:n},s}function O0(n,s,l,d){return n.baseState=l,tf(n,vt,typeof d=="function"?d:ms)}function Sv(n,s,l,d,p){if(Su(n))throw Error(r(485));if(n=s.action,n!==null){var x={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){x.listeners.push(v)}};G.T!==null?l(!0):x.isTransition=!1,d(x),l=s.pending,l===null?(x.next=s.pending=x,I0(s,x)):(x.next=l.next,s.pending=l.next=x)}}function I0(n,s){var l=s.action,d=s.payload,p=n.state;if(s.isTransition){var x=G.T,v={};G.T=v;try{var R=l(p,d),X=G.S;X!==null&&X(v,R),M0(n,s,R)}catch(le){sf(n,s,le)}finally{x!==null&&v.types!==null&&(x.types=v.types),G.T=x}}else try{x=l(p,d),M0(n,s,x)}catch(le){sf(n,s,le)}}function M0(n,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(d){L0(n,s,d)},function(d){return sf(n,s,d)}):L0(n,s,l)}function L0(n,s,l){s.status="fulfilled",s.value=l,D0(s),n.state=l,s=n.pending,s!==null&&(l=s.next,l===s?n.pending=null:(l=l.next,s.next=l,I0(n,l)))}function sf(n,s,l){var d=n.pending;if(n.pending=null,d!==null){d=d.next;do s.status="rejected",s.reason=l,D0(s),s=s.next;while(s!==d)}n.action=null}function D0(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function j0(n,s){return s}function B0(n,s){if(mt){var l=kt.formState;if(l!==null){e:{var d=Ze;if(mt){if(Dt){t:{for(var p=Dt,x=Aa;p.nodeType!==8;){if(!x){p=null;break t}if(p=Ca(p.nextSibling),p===null){p=null;break t}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){Dt=Ca(p.nextSibling),d=p.data==="F!";break e}}Bs(d)}d=!1}d&&(s=l[0])}}return l=Un(),l.memoizedState=l.baseState=s,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:j0,lastRenderedState:s},l.queue=d,l=ng.bind(null,Ze,d),d.dispatch=l,d=af(!1),x=df.bind(null,Ze,!1,d.queue),d=Un(),p={state:s,dispatch:null,action:n,pending:null},d.queue=p,l=Sv.bind(null,Ze,p,x,l),p.dispatch=l,d.memoizedState=n,[s,l,!1]}function P0(n){var s=Wt();return U0(s,vt,n)}function U0(n,s,l){if(s=tf(n,s,j0)[0],n=Tu(ms)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var d=Rl(s)}catch(v){throw v===Ei?fu:v}else d=s;s=Wt();var p=s.queue,x=p.dispatch;return l!==s.memoizedState&&(Ze.flags|=2048,vi(9,{destroy:void 0},Av.bind(null,p,l),null)),[d,x,n]}function Av(n,s){n.action=s}function H0(n){var s=Wt(),l=vt;if(l!==null)return U0(s,l,n);Wt(),s=s.memoizedState,l=Wt();var d=l.queue.dispatch;return l.memoizedState=n,[s,d,!1]}function vi(n,s,l,d){return n={tag:n,create:l,deps:d,inst:s,next:null},s=Ze.updateQueue,s===null&&(s=yu(),Ze.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=n.next=n:(d=l.next,l.next=n,n.next=d,s.lastEffect=n),n}function F0(){return Wt().memoizedState}function _u(n,s,l,d){var p=Un();Ze.flags|=n,p.memoizedState=vi(1|s,{destroy:void 0},l,d===void 0?null:d)}function vu(n,s,l,d){var p=Wt();d=d===void 0?null:d;var x=p.memoizedState.inst;vt!==null&&d!==null&&Xd(d,vt.memoizedState.deps)?p.memoizedState=vi(s,x,l,d):(Ze.flags|=n,p.memoizedState=vi(1|s,x,l,d))}function z0(n,s){_u(8390656,8,n,s)}function rf(n,s){vu(2048,8,n,s)}function wv(n){Ze.flags|=4;var s=Ze.updateQueue;if(s===null)s=yu(),Ze.updateQueue=s,s.events=[n];else{var l=s.events;l===null?s.events=[n]:l.push(n)}}function $0(n){var s=Wt().memoizedState;return wv({ref:s,nextImpl:n}),function(){if((xt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function q0(n,s){return vu(4,2,n,s)}function Y0(n,s){return vu(4,4,n,s)}function G0(n,s){if(typeof s=="function"){n=n();var l=s(n);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function K0(n,s,l){l=l!=null?l.concat([n]):null,vu(4,4,G0.bind(null,s,n),l)}function lf(){}function V0(n,s){var l=Wt();s=s===void 0?null:s;var d=l.memoizedState;return s!==null&&Xd(s,d[1])?d[0]:(l.memoizedState=[n,s],n)}function X0(n,s){var l=Wt();s=s===void 0?null:s;var d=l.memoizedState;if(s!==null&&Xd(s,d[1]))return d[0];if(d=n(),kr){An(!0);try{n()}finally{An(!1)}}return l.memoizedState=[d,s],d}function of(n,s,l){return l===void 0||(fs&1073741824)!==0&&(ut&261930)===0?n.memoizedState=s:(n.memoizedState=l,n=Qg(),Ze.lanes|=n,Gs|=n,l)}function Q0(n,s,l,d){return ca(l,s)?l:Ni.current!==null?(n=of(n,l,d),ca(n,s)||(sn=!0),n):(fs&42)===0||(fs&1073741824)!==0&&(ut&261930)===0?(sn=!0,n.memoizedState=l):(n=Qg(),Ze.lanes|=n,Gs|=n,s)}function W0(n,s,l,d,p){var x=F.p;F.p=x!==0&&8>x?x:8;var v=G.T,R={};G.T=R,df(n,!1,s,l);try{var X=p(),le=G.S;if(le!==null&&le(R,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var me=Tv(X,d);Ol(n,s,me,ga(n))}else Ol(n,s,d,ga(n))}catch(xe){Ol(n,s,{then:function(){},status:"rejected",reason:xe},ga())}finally{F.p=x,v!==null&&R.types!==null&&(v.types=R.types),G.T=v}}function Cv(){}function uf(n,s,l,d){if(n.tag!==5)throw Error(r(476));var p=Z0(n).queue;W0(n,p,s,$,l===null?Cv:function(){return J0(n),l(d)})}function Z0(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:$},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:l},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function J0(n){var s=Z0(n);s.next===null&&(s=n.alternate.memoizedState),Ol(n,s.next.queue,{},ga())}function cf(){return yn(Vl)}function eg(){return Wt().memoizedState}function tg(){return Wt().memoizedState}function kv(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var l=ga();n=Hs(l);var d=Fs(s,n,l);d!==null&&(ea(d,s,l),Al(d,s,l)),s={cache:Pd()},n.payload=s;return}s=s.return}}function Rv(n,s,l){var d=ga();l={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Su(n)?ag(s,l):(l=wd(n,s,l,d),l!==null&&(ea(l,n,d),sg(l,s,d)))}function ng(n,s,l){var d=ga();Ol(n,s,l,d)}function Ol(n,s,l,d){var p={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Su(n))ag(s,p);else{var x=n.alternate;if(n.lanes===0&&(x===null||x.lanes===0)&&(x=s.lastRenderedReducer,x!==null))try{var v=s.lastRenderedState,R=x(v,l);if(p.hasEagerState=!0,p.eagerState=R,ca(R,v))return ru(n,s,p,0),kt===null&&su(),!1}catch{}finally{}if(l=wd(n,s,p,d),l!==null)return ea(l,n,d),sg(l,s,d),!0}return!1}function df(n,s,l,d){if(d={lane:2,revertLane:$f(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Su(n)){if(s)throw Error(r(479))}else s=wd(n,l,d,2),s!==null&&ea(s,n,2)}function Su(n){var s=n.alternate;return n===Ze||s!==null&&s===Ze}function ag(n,s){Ti=xu=!0;var l=n.pending;l===null?s.next=s:(s.next=l.next,l.next=s),n.pending=s}function sg(n,s,l){if((l&4194048)!==0){var d=s.lanes;d&=n.pendingLanes,l|=d,s.lanes=l,Ge(n,l)}}var Il={readContext:yn,use:Nu,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};Il.useEffectEvent=qt;var rg={readContext:yn,use:Nu,useCallback:function(n,s){return Un().memoizedState=[n,s===void 0?null:s],n},useContext:yn,useEffect:z0,useImperativeHandle:function(n,s,l){l=l!=null?l.concat([n]):null,_u(4194308,4,G0.bind(null,s,n),l)},useLayoutEffect:function(n,s){return _u(4194308,4,n,s)},useInsertionEffect:function(n,s){_u(4,2,n,s)},useMemo:function(n,s){var l=Un();s=s===void 0?null:s;var d=n();if(kr){An(!0);try{n()}finally{An(!1)}}return l.memoizedState=[d,s],d},useReducer:function(n,s,l){var d=Un();if(l!==void 0){var p=l(s);if(kr){An(!0);try{l(s)}finally{An(!1)}}}else p=s;return d.memoizedState=d.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},d.queue=n,n=n.dispatch=Rv.bind(null,Ze,n),[d.memoizedState,n]},useRef:function(n){var s=Un();return n={current:n},s.memoizedState=n},useState:function(n){n=af(n);var s=n.queue,l=ng.bind(null,Ze,s);return s.dispatch=l,[n.memoizedState,l]},useDebugValue:lf,useDeferredValue:function(n,s){var l=Un();return of(l,n,s)},useTransition:function(){var n=af(!1);return n=W0.bind(null,Ze,n.queue,!0,!1),Un().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,l){var d=Ze,p=Un();if(mt){if(l===void 0)throw Error(r(407));l=l()}else{if(l=s(),kt===null)throw Error(r(349));(ut&127)!==0||A0(d,s,l)}p.memoizedState=l;var x={value:l,getSnapshot:s};return p.queue=x,z0(C0.bind(null,d,x,n),[n]),d.flags|=2048,vi(9,{destroy:void 0},w0.bind(null,d,x,l,s),null),l},useId:function(){var n=Un(),s=kt.identifierPrefix;if(mt){var l=Ga,d=Ya;l=(d&~(1<<32-Et(d)-1)).toString(32)+l,s="_"+s+"R_"+l,l=Eu++,0<l&&(s+="H"+l.toString(32)),s+="_"}else l=_v++,s="_"+s+"r_"+l.toString(32)+"_";return n.memoizedState=s},useHostTransitionStatus:cf,useFormState:B0,useActionState:B0,useOptimistic:function(n){var s=Un();s.memoizedState=s.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=df.bind(null,Ze,!0,l),l.dispatch=s,[n,s]},useMemoCache:ef,useCacheRefresh:function(){return Un().memoizedState=kv.bind(null,Ze)},useEffectEvent:function(n){var s=Un(),l={impl:n};return s.memoizedState=l,function(){if((xt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},ff={readContext:yn,use:Nu,useCallback:V0,useContext:yn,useEffect:rf,useImperativeHandle:K0,useInsertionEffect:q0,useLayoutEffect:Y0,useMemo:X0,useReducer:Tu,useRef:F0,useState:function(){return Tu(ms)},useDebugValue:lf,useDeferredValue:function(n,s){var l=Wt();return Q0(l,vt.memoizedState,n,s)},useTransition:function(){var n=Tu(ms)[0],s=Wt().memoizedState;return[typeof n=="boolean"?n:Rl(n),s]},useSyncExternalStore:S0,useId:eg,useHostTransitionStatus:cf,useFormState:P0,useActionState:P0,useOptimistic:function(n,s){var l=Wt();return O0(l,vt,n,s)},useMemoCache:ef,useCacheRefresh:tg};ff.useEffectEvent=$0;var ig={readContext:yn,use:Nu,useCallback:V0,useContext:yn,useEffect:rf,useImperativeHandle:K0,useInsertionEffect:q0,useLayoutEffect:Y0,useMemo:X0,useReducer:nf,useRef:F0,useState:function(){return nf(ms)},useDebugValue:lf,useDeferredValue:function(n,s){var l=Wt();return vt===null?of(l,n,s):Q0(l,vt.memoizedState,n,s)},useTransition:function(){var n=nf(ms)[0],s=Wt().memoizedState;return[typeof n=="boolean"?n:Rl(n),s]},useSyncExternalStore:S0,useId:eg,useHostTransitionStatus:cf,useFormState:H0,useActionState:H0,useOptimistic:function(n,s){var l=Wt();return vt!==null?O0(l,vt,n,s):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:ef,useCacheRefresh:tg};ig.useEffectEvent=$0;function mf(n,s,l,d){s=n.memoizedState,l=l(d,s),l=l==null?s:g({},s,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var hf={enqueueSetState:function(n,s,l){n=n._reactInternals;var d=ga(),p=Hs(d);p.payload=s,l!=null&&(p.callback=l),s=Fs(n,p,d),s!==null&&(ea(s,n,d),Al(s,n,d))},enqueueReplaceState:function(n,s,l){n=n._reactInternals;var d=ga(),p=Hs(d);p.tag=1,p.payload=s,l!=null&&(p.callback=l),s=Fs(n,p,d),s!==null&&(ea(s,n,d),Al(s,n,d))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var l=ga(),d=Hs(l);d.tag=2,s!=null&&(d.callback=s),s=Fs(n,d,l),s!==null&&(ea(s,n,l),Al(s,n,l))}};function lg(n,s,l,d,p,x,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(d,x,v):s.prototype&&s.prototype.isPureReactComponent?!xl(l,d)||!xl(p,x):!0}function og(n,s,l,d){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,d),s.state!==n&&hf.enqueueReplaceState(s,s.state,null)}function Rr(n,s){var l=s;if("ref"in s){l={};for(var d in s)d!=="ref"&&(l[d]=s[d])}if(n=n.defaultProps){l===s&&(l=g({},l));for(var p in n)l[p]===void 0&&(l[p]=n[p])}return l}function ug(n){au(n)}function cg(n){console.error(n)}function dg(n){au(n)}function Au(n,s){try{var l=n.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(d){setTimeout(function(){throw d})}}function fg(n,s,l){try{var d=n.onCaughtError;d(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function pf(n,s,l){return l=Hs(l),l.tag=3,l.payload={element:null},l.callback=function(){Au(n,s)},l}function mg(n){return n=Hs(n),n.tag=3,n}function hg(n,s,l,d){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var x=d.value;n.payload=function(){return p(x)},n.callback=function(){fg(s,l,d)}}var v=l.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){fg(s,l,d),typeof p!="function"&&(Ks===null?Ks=new Set([this]):Ks.add(this));var R=d.stack;this.componentDidCatch(d.value,{componentStack:R!==null?R:""})})}function Ov(n,s,l,d,p){if(l.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(s=l.alternate,s!==null&&gi(s,l,p,!0),l=fa.current,l!==null){switch(l.tag){case 31:case 13:return wa===null?Pu():l.alternate===null&&Yt===0&&(Yt=3),l.flags&=-257,l.flags|=65536,l.lanes=p,d===mu?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([d]):s.add(d),Hf(n,d,p)),!1;case 22:return l.flags|=65536,d===mu?l.flags|=16384:(s=l.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([d])},l.updateQueue=s):(l=s.retryQueue,l===null?s.retryQueue=new Set([d]):l.add(d)),Hf(n,d,p)),!1}throw Error(r(435,l.tag))}return Hf(n,d,p),Pu(),!1}if(mt)return s=fa.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=p,d!==Md&&(n=Error(r(422),{cause:d}),Nl(_a(n,l)))):(d!==Md&&(s=Error(r(423),{cause:d}),Nl(_a(s,l))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,d=_a(d,l),p=pf(n.stateNode,d,p),qd(n,p),Yt!==4&&(Yt=2)),!1;var x=Error(r(520),{cause:d});if(x=_a(x,l),Hl===null?Hl=[x]:Hl.push(x),Yt!==4&&(Yt=2),s===null)return!0;d=_a(d,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,n=p&-p,l.lanes|=n,n=pf(l.stateNode,d,n),qd(l,n),!1;case 1:if(s=l.type,x=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Ks===null||!Ks.has(x))))return l.flags|=65536,p&=-p,l.lanes|=p,p=mg(p),hg(p,n,l,d),qd(l,p),!1}l=l.return}while(l!==null);return!1}var gf=Error(r(461)),sn=!1;function Nn(n,s,l,d){s.child=n===null?x0(s,null,l,d):Cr(s,n.child,l,d)}function pg(n,s,l,d,p){l=l.render;var x=s.ref;if("ref"in d){var v={};for(var R in d)R!=="ref"&&(v[R]=d[R])}else v=d;return vr(s),d=Qd(n,s,l,v,x,p),R=Wd(),n!==null&&!sn?(Zd(n,s,p),hs(n,s,p)):(mt&&R&&Od(s),s.flags|=1,Nn(n,s,d,p),s.child)}function gg(n,s,l,d,p){if(n===null){var x=l.type;return typeof x=="function"&&!Cd(x)&&x.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=x,bg(n,s,x,d,p)):(n=lu(l.type,null,d,s,s.mode,p),n.ref=s.ref,n.return=s,s.child=n)}if(x=n.child,!vf(n,p)){var v=x.memoizedProps;if(l=l.compare,l=l!==null?l:xl,l(v,d)&&n.ref===s.ref)return hs(n,s,p)}return s.flags|=1,n=os(x,d),n.ref=s.ref,n.return=s,s.child=n}function bg(n,s,l,d,p){if(n!==null){var x=n.memoizedProps;if(xl(x,d)&&n.ref===s.ref)if(sn=!1,s.pendingProps=d=x,vf(n,p))(n.flags&131072)!==0&&(sn=!0);else return s.lanes=n.lanes,hs(n,s,p)}return bf(n,s,l,d,p)}function xg(n,s,l,d){var p=d.children,x=n!==null?n.memoizedState:null;if(n===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((s.flags&128)!==0){if(x=x!==null?x.baseLanes|l:l,n!==null){for(d=s.child=n.child,p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;d=p&~x}else d=0,s.child=null;return Eg(n,s,x,l,d)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&du(s,x!==null?x.cachePool:null),x!==null?N0(s,x):Gd(),T0(s);else return d=s.lanes=536870912,Eg(n,s,x!==null?x.baseLanes|l:l,l,d)}else x!==null?(du(s,x.cachePool),N0(s,x),$s(),s.memoizedState=null):(n!==null&&du(s,null),Gd(),$s());return Nn(n,s,p,l),s.child}function Ml(n,s){return n!==null&&n.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Eg(n,s,l,d,p){var x=Hd();return x=x===null?null:{parent:nn._currentValue,pool:x},s.memoizedState={baseLanes:l,cachePool:x},n!==null&&du(s,null),Gd(),T0(s),n!==null&&gi(n,s,d,!0),s.childLanes=p,null}function wu(n,s){return s=ku({mode:s.mode,children:s.children},n.mode),s.ref=n.ref,n.child=s,s.return=n,s}function yg(n,s,l){return Cr(s,n.child,null,l),n=wu(s,s.pendingProps),n.flags|=2,ma(s),s.memoizedState=null,n}function Iv(n,s,l){var d=s.pendingProps,p=(s.flags&128)!==0;if(s.flags&=-129,n===null){if(mt){if(d.mode==="hidden")return n=wu(s,d),s.lanes=536870912,Ml(null,n);if(Vd(s),(n=Dt)?(n=Ib(n,Aa),n=n!==null&&n.data==="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:Ds!==null?{id:Ya,overflow:Ga}:null,retryLane:536870912,hydrationErrors:null},l=a0(n),l.return=s,s.child=l,En=s,Dt=null)):n=null,n===null)throw Bs(s);return s.lanes=536870912,null}return wu(s,d)}var x=n.memoizedState;if(x!==null){var v=x.dehydrated;if(Vd(s),p)if(s.flags&256)s.flags&=-257,s=yg(n,s,l);else if(s.memoizedState!==null)s.child=n.child,s.flags|=128,s=null;else throw Error(r(558));else if(sn||gi(n,s,l,!1),p=(l&n.childLanes)!==0,sn||p){if(d=kt,d!==null&&(v=Kt(d,l),v!==0&&v!==x.retryLane))throw x.retryLane=v,yr(n,v),ea(d,n,v),gf;Pu(),s=yg(n,s,l)}else n=x.treeContext,Dt=Ca(v.nextSibling),En=s,mt=!0,js=null,Aa=!1,n!==null&&i0(s,n),s=wu(s,d),s.flags|=4096;return s}return n=os(n.child,{mode:d.mode,children:d.children}),n.ref=s.ref,s.child=n,n.return=s,n}function Cu(n,s){var l=s.ref;if(l===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(n===null||n.ref!==l)&&(s.flags|=4194816)}}function bf(n,s,l,d,p){return vr(s),l=Qd(n,s,l,d,void 0,p),d=Wd(),n!==null&&!sn?(Zd(n,s,p),hs(n,s,p)):(mt&&d&&Od(s),s.flags|=1,Nn(n,s,l,p),s.child)}function Ng(n,s,l,d,p,x){return vr(s),s.updateQueue=null,l=v0(s,d,l,p),_0(n),d=Wd(),n!==null&&!sn?(Zd(n,s,x),hs(n,s,x)):(mt&&d&&Od(s),s.flags|=1,Nn(n,s,l,x),s.child)}function Tg(n,s,l,d,p){if(vr(s),s.stateNode===null){var x=fi,v=l.contextType;typeof v=="object"&&v!==null&&(x=yn(v)),x=new l(d,x),s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=hf,s.stateNode=x,x._reactInternals=s,x=s.stateNode,x.props=d,x.state=s.memoizedState,x.refs={},zd(s),v=l.contextType,x.context=typeof v=="object"&&v!==null?yn(v):fi,x.state=s.memoizedState,v=l.getDerivedStateFromProps,typeof v=="function"&&(mf(s,l,v,d),x.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(v=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),v!==x.state&&hf.enqueueReplaceState(x,x.state,null),Cl(s,d,x,p),wl(),x.state=s.memoizedState),typeof x.componentDidMount=="function"&&(s.flags|=4194308),d=!0}else if(n===null){x=s.stateNode;var R=s.memoizedProps,X=Rr(l,R);x.props=X;var le=x.context,me=l.contextType;v=fi,typeof me=="object"&&me!==null&&(v=yn(me));var xe=l.getDerivedStateFromProps;me=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function",R=s.pendingProps!==R,me||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R||le!==v)&&og(s,x,d,v),Us=!1;var oe=s.memoizedState;x.state=oe,Cl(s,d,x,p),wl(),le=s.memoizedState,R||oe!==le||Us?(typeof xe=="function"&&(mf(s,l,xe,d),le=s.memoizedState),(X=Us||lg(s,l,X,d,oe,le,v))?(me||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=le),x.props=d,x.state=le,x.context=v,d=X):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{x=s.stateNode,$d(n,s),v=s.memoizedProps,me=Rr(l,v),x.props=me,xe=s.pendingProps,oe=x.context,le=l.contextType,X=fi,typeof le=="object"&&le!==null&&(X=yn(le)),R=l.getDerivedStateFromProps,(le=typeof R=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(v!==xe||oe!==X)&&og(s,x,d,X),Us=!1,oe=s.memoizedState,x.state=oe,Cl(s,d,x,p),wl();var ue=s.memoizedState;v!==xe||oe!==ue||Us||n!==null&&n.dependencies!==null&&uu(n.dependencies)?(typeof R=="function"&&(mf(s,l,R,d),ue=s.memoizedState),(me=Us||lg(s,l,me,d,oe,ue,X)||n!==null&&n.dependencies!==null&&uu(n.dependencies))?(le||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,ue,X),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,ue,X)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||v===n.memoizedProps&&oe===n.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&oe===n.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=ue),x.props=d,x.state=ue,x.context=X,d=me):(typeof x.componentDidUpdate!="function"||v===n.memoizedProps&&oe===n.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&oe===n.memoizedState||(s.flags|=1024),d=!1)}return x=d,Cu(n,s),d=(s.flags&128)!==0,x||d?(x=s.stateNode,l=d&&typeof l.getDerivedStateFromError!="function"?null:x.render(),s.flags|=1,n!==null&&d?(s.child=Cr(s,n.child,null,p),s.child=Cr(s,null,l,p)):Nn(n,s,l,p),s.memoizedState=x.state,n=s.child):n=hs(n,s,p),n}function _g(n,s,l,d){return Tr(),s.flags|=256,Nn(n,s,l,d),s.child}var xf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ef(n){return{baseLanes:n,cachePool:f0()}}function yf(n,s,l){return n=n!==null?n.childLanes&~l:0,s&&(n|=pa),n}function vg(n,s,l){var d=s.pendingProps,p=!1,x=(s.flags&128)!==0,v;if((v=x)||(v=n!==null&&n.memoizedState===null?!1:(Qt.current&2)!==0),v&&(p=!0,s.flags&=-129),v=(s.flags&32)!==0,s.flags&=-33,n===null){if(mt){if(p?zs(s):$s(),(n=Dt)?(n=Ib(n,Aa),n=n!==null&&n.data!=="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:Ds!==null?{id:Ya,overflow:Ga}:null,retryLane:536870912,hydrationErrors:null},l=a0(n),l.return=s,s.child=l,En=s,Dt=null)):n=null,n===null)throw Bs(s);return nm(n)?s.lanes=32:s.lanes=536870912,null}var R=d.children;return d=d.fallback,p?($s(),p=s.mode,R=ku({mode:"hidden",children:R},p),d=Nr(d,p,l,null),R.return=s,d.return=s,R.sibling=d,s.child=R,d=s.child,d.memoizedState=Ef(l),d.childLanes=yf(n,v,l),s.memoizedState=xf,Ml(null,d)):(zs(s),Nf(s,R))}var X=n.memoizedState;if(X!==null&&(R=X.dehydrated,R!==null)){if(x)s.flags&256?(zs(s),s.flags&=-257,s=Tf(n,s,l)):s.memoizedState!==null?($s(),s.child=n.child,s.flags|=128,s=null):($s(),R=d.fallback,p=s.mode,d=ku({mode:"visible",children:d.children},p),R=Nr(R,p,l,null),R.flags|=2,d.return=s,R.return=s,d.sibling=R,s.child=d,Cr(s,n.child,null,l),d=s.child,d.memoizedState=Ef(l),d.childLanes=yf(n,v,l),s.memoizedState=xf,s=Ml(null,d));else if(zs(s),nm(R)){if(v=R.nextSibling&&R.nextSibling.dataset,v)var le=v.dgst;v=le,d=Error(r(419)),d.stack="",d.digest=v,Nl({value:d,source:null,stack:null}),s=Tf(n,s,l)}else if(sn||gi(n,s,l,!1),v=(l&n.childLanes)!==0,sn||v){if(v=kt,v!==null&&(d=Kt(v,l),d!==0&&d!==X.retryLane))throw X.retryLane=d,yr(n,d),ea(v,n,d),gf;tm(R)||Pu(),s=Tf(n,s,l)}else tm(R)?(s.flags|=192,s.child=n.child,s=null):(n=X.treeContext,Dt=Ca(R.nextSibling),En=s,mt=!0,js=null,Aa=!1,n!==null&&i0(s,n),s=Nf(s,d.children),s.flags|=4096);return s}return p?($s(),R=d.fallback,p=s.mode,X=n.child,le=X.sibling,d=os(X,{mode:"hidden",children:d.children}),d.subtreeFlags=X.subtreeFlags&65011712,le!==null?R=os(le,R):(R=Nr(R,p,l,null),R.flags|=2),R.return=s,d.return=s,d.sibling=R,s.child=d,Ml(null,d),d=s.child,R=n.child.memoizedState,R===null?R=Ef(l):(p=R.cachePool,p!==null?(X=nn._currentValue,p=p.parent!==X?{parent:X,pool:X}:p):p=f0(),R={baseLanes:R.baseLanes|l,cachePool:p}),d.memoizedState=R,d.childLanes=yf(n,v,l),s.memoizedState=xf,Ml(n.child,d)):(zs(s),l=n.child,n=l.sibling,l=os(l,{mode:"visible",children:d.children}),l.return=s,l.sibling=null,n!==null&&(v=s.deletions,v===null?(s.deletions=[n],s.flags|=16):v.push(n)),s.child=l,s.memoizedState=null,l)}function Nf(n,s){return s=ku({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function ku(n,s){return n=da(22,n,null,s),n.lanes=0,n}function Tf(n,s,l){return Cr(s,n.child,null,l),n=Nf(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function Sg(n,s,l){n.lanes|=s;var d=n.alternate;d!==null&&(d.lanes|=s),jd(n.return,s,l)}function _f(n,s,l,d,p,x){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:p,treeForkCount:x}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=d,v.tail=l,v.tailMode=p,v.treeForkCount=x)}function Ag(n,s,l){var d=s.pendingProps,p=d.revealOrder,x=d.tail;d=d.children;var v=Qt.current,R=(v&2)!==0;if(R?(v=v&1|2,s.flags|=128):v&=1,C(Qt,v),Nn(n,s,d,l),d=mt?yl:0,!R&&n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Sg(n,l,s);else if(n.tag===19)Sg(n,l,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(l=s.child,p=null;l!==null;)n=l.alternate,n!==null&&bu(n)===null&&(p=l),l=l.sibling;l=p,l===null?(p=s.child,s.child=null):(p=l.sibling,l.sibling=null),_f(s,!1,p,l,x,d);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=s.child,s.child=null;p!==null;){if(n=p.alternate,n!==null&&bu(n)===null){s.child=p;break}n=p.sibling,p.sibling=l,l=p,p=n}_f(s,!0,l,null,x,d);break;case"together":_f(s,!1,null,null,void 0,d);break;default:s.memoizedState=null}return s.child}function hs(n,s,l){if(n!==null&&(s.dependencies=n.dependencies),Gs|=s.lanes,(l&s.childLanes)===0)if(n!==null){if(gi(n,s,l,!1),(l&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(r(153));if(s.child!==null){for(n=s.child,l=os(n,n.pendingProps),s.child=l,l.return=s;n.sibling!==null;)n=n.sibling,l=l.sibling=os(n,n.pendingProps),l.return=s;l.sibling=null}return s.child}function vf(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&uu(n)))}function Mv(n,s,l){switch(s.tag){case 3:Re(s,s.stateNode.containerInfo),Ps(s,nn,n.memoizedState.cache),Tr();break;case 27:case 5:lt(s);break;case 4:Re(s,s.stateNode.containerInfo);break;case 10:Ps(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Vd(s),null;break;case 13:var d=s.memoizedState;if(d!==null)return d.dehydrated!==null?(zs(s),s.flags|=128,null):(l&s.child.childLanes)!==0?vg(n,s,l):(zs(s),n=hs(n,s,l),n!==null?n.sibling:null);zs(s);break;case 19:var p=(n.flags&128)!==0;if(d=(l&s.childLanes)!==0,d||(gi(n,s,l,!1),d=(l&s.childLanes)!==0),p){if(d)return Ag(n,s,l);s.flags|=128}if(p=s.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),C(Qt,Qt.current),d)break;return null;case 22:return s.lanes=0,xg(n,s,l,s.pendingProps);case 24:Ps(s,nn,n.memoizedState.cache)}return hs(n,s,l)}function wg(n,s,l){if(n!==null)if(n.memoizedProps!==s.pendingProps)sn=!0;else{if(!vf(n,l)&&(s.flags&128)===0)return sn=!1,Mv(n,s,l);sn=(n.flags&131072)!==0}else sn=!1,mt&&(s.flags&1048576)!==0&&r0(s,yl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var d=s.pendingProps;if(n=Ar(s.elementType),s.type=n,typeof n=="function")Cd(n)?(d=Rr(n,d),s.tag=1,s=Tg(null,s,n,d,l)):(s.tag=0,s=bf(null,s,n,d,l));else{if(n!=null){var p=n.$$typeof;if(p===L){s.tag=11,s=pg(null,s,n,d,l);break e}else if(p===z){s.tag=14,s=gg(null,s,n,d,l);break e}}throw s=te(n)||n,Error(r(306,s,""))}}return s;case 0:return bf(n,s,s.type,s.pendingProps,l);case 1:return d=s.type,p=Rr(d,s.pendingProps),Tg(n,s,d,p,l);case 3:e:{if(Re(s,s.stateNode.containerInfo),n===null)throw Error(r(387));d=s.pendingProps;var x=s.memoizedState;p=x.element,$d(n,s),Cl(s,d,null,l);var v=s.memoizedState;if(d=v.cache,Ps(s,nn,d),d!==x.cache&&Bd(s,[nn],l,!0),wl(),d=v.element,x.isDehydrated)if(x={element:d,isDehydrated:!1,cache:v.cache},s.updateQueue.baseState=x,s.memoizedState=x,s.flags&256){s=_g(n,s,d,l);break e}else if(d!==p){p=_a(Error(r(424)),s),Nl(p),s=_g(n,s,d,l);break e}else{switch(n=s.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(Dt=Ca(n.firstChild),En=s,mt=!0,js=null,Aa=!0,l=x0(s,null,d,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Tr(),d===p){s=hs(n,s,l);break e}Nn(n,s,d,l)}s=s.child}return s;case 26:return Cu(n,s),n===null?(l=Pb(s.type,null,s.pendingProps,null))?s.memoizedState=l:mt||(l=s.type,n=s.pendingProps,d=Yu(B.current).createElement(l),d[Vt]=s,d[wn]=n,Tn(d,l,n),en(d),s.stateNode=d):s.memoizedState=Pb(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return lt(s),n===null&&mt&&(d=s.stateNode=Db(s.type,s.pendingProps,B.current),En=s,Aa=!0,p=Dt,Ws(s.type)?(am=p,Dt=Ca(d.firstChild)):Dt=p),Nn(n,s,s.pendingProps.children,l),Cu(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&mt&&((p=d=Dt)&&(d=u2(d,s.type,s.pendingProps,Aa),d!==null?(s.stateNode=d,En=s,Dt=Ca(d.firstChild),Aa=!1,p=!0):p=!1),p||Bs(s)),lt(s),p=s.type,x=s.pendingProps,v=n!==null?n.memoizedProps:null,d=x.children,Zf(p,x)?d=null:v!==null&&Zf(p,v)&&(s.flags|=32),s.memoizedState!==null&&(p=Qd(n,s,vv,null,null,l),Vl._currentValue=p),Cu(n,s),Nn(n,s,d,l),s.child;case 6:return n===null&&mt&&((n=l=Dt)&&(l=c2(l,s.pendingProps,Aa),l!==null?(s.stateNode=l,En=s,Dt=null,n=!0):n=!1),n||Bs(s)),null;case 13:return vg(n,s,l);case 4:return Re(s,s.stateNode.containerInfo),d=s.pendingProps,n===null?s.child=Cr(s,null,d,l):Nn(n,s,d,l),s.child;case 11:return pg(n,s,s.type,s.pendingProps,l);case 7:return Nn(n,s,s.pendingProps,l),s.child;case 8:return Nn(n,s,s.pendingProps.children,l),s.child;case 12:return Nn(n,s,s.pendingProps.children,l),s.child;case 10:return d=s.pendingProps,Ps(s,s.type,d.value),Nn(n,s,d.children,l),s.child;case 9:return p=s.type._context,d=s.pendingProps.children,vr(s),p=yn(p),d=d(p),s.flags|=1,Nn(n,s,d,l),s.child;case 14:return gg(n,s,s.type,s.pendingProps,l);case 15:return bg(n,s,s.type,s.pendingProps,l);case 19:return Ag(n,s,l);case 31:return Iv(n,s,l);case 22:return xg(n,s,l,s.pendingProps);case 24:return vr(s),d=yn(nn),n===null?(p=Hd(),p===null&&(p=kt,x=Pd(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=l),p=x),s.memoizedState={parent:d,cache:p},zd(s),Ps(s,nn,p)):((n.lanes&l)!==0&&($d(n,s),Cl(s,null,null,l),wl()),p=n.memoizedState,x=s.memoizedState,p.parent!==d?(p={parent:d,cache:d},s.memoizedState=p,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=p),Ps(s,nn,d)):(d=x.cache,Ps(s,nn,d),d!==p.cache&&Bd(s,[nn],l,!0))),Nn(n,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function ps(n){n.flags|=4}function Sf(n,s,l,d,p){if((s=(n.mode&32)!==0)&&(s=!1),s){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(eb())n.flags|=8192;else throw wr=mu,Fd}else n.flags&=-16777217}function Cg(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!$b(s))if(eb())n.flags|=8192;else throw wr=mu,Fd}function Ru(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?Ke():536870912,n.lanes|=s,Ci|=s)}function Ll(n,s){if(!mt)switch(n.tailMode){case"hidden":s=n.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:d.sibling=null}}function jt(n){var s=n.alternate!==null&&n.alternate.child===n.child,l=0,d=0;if(s)for(var p=n.child;p!==null;)l|=p.lanes|p.childLanes,d|=p.subtreeFlags&65011712,d|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)l|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=d,n.childLanes=l,s}function Lv(n,s,l){var d=s.pendingProps;switch(Id(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jt(s),null;case 1:return jt(s),null;case 3:return l=s.stateNode,d=null,n!==null&&(d=n.memoizedState.cache),s.memoizedState.cache!==d&&(s.flags|=2048),ds(nn),De(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(pi(s)?ps(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Ld())),jt(s),null;case 26:var p=s.type,x=s.memoizedState;return n===null?(ps(s),x!==null?(jt(s),Cg(s,x)):(jt(s),Sf(s,p,null,d,l))):x?x!==n.memoizedState?(ps(s),jt(s),Cg(s,x)):(jt(s),s.flags&=-16777217):(n=n.memoizedProps,n!==d&&ps(s),jt(s),Sf(s,p,n,d,l)),null;case 27:if(Bt(s),l=B.current,p=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==d&&ps(s);else{if(!d){if(s.stateNode===null)throw Error(r(166));return jt(s),null}n=de.current,pi(s)?l0(s):(n=Db(p,d,l),s.stateNode=n,ps(s))}return jt(s),null;case 5:if(Bt(s),p=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==d&&ps(s);else{if(!d){if(s.stateNode===null)throw Error(r(166));return jt(s),null}if(x=de.current,pi(s))l0(s);else{var v=Yu(B.current);switch(x){case 1:x=v.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:x=v.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":x=v.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":x=v.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":x=v.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof d.is=="string"?v.createElement("select",{is:d.is}):v.createElement("select"),d.multiple?x.multiple=!0:d.size&&(x.size=d.size);break;default:x=typeof d.is=="string"?v.createElement(p,{is:d.is}):v.createElement(p)}}x[Vt]=s,x[wn]=d;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)x.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=x;e:switch(Tn(x,p,d),p){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&ps(s)}}return jt(s),Sf(s,s.type,n===null?null:n.memoizedProps,s.pendingProps,l),null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==d&&ps(s);else{if(typeof d!="string"&&s.stateNode===null)throw Error(r(166));if(n=B.current,pi(s)){if(n=s.stateNode,l=s.memoizedProps,d=null,p=En,p!==null)switch(p.tag){case 27:case 5:d=p.memoizedProps}n[Vt]=s,n=!!(n.nodeValue===l||d!==null&&d.suppressHydrationWarning===!0||vb(n.nodeValue,l)),n||Bs(s,!0)}else n=Yu(n).createTextNode(d),n[Vt]=s,s.stateNode=n}return jt(s),null;case 31:if(l=s.memoizedState,n===null||n.memoizedState!==null){if(d=pi(s),l!==null){if(n===null){if(!d)throw Error(r(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(557));n[Vt]=s}else Tr(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;jt(s),n=!1}else l=Ld(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return s.flags&256?(ma(s),s):(ma(s),null);if((s.flags&128)!==0)throw Error(r(558))}return jt(s),null;case 13:if(d=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=pi(s),d!==null&&d.dehydrated!==null){if(n===null){if(!p)throw Error(r(318));if(p=s.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[Vt]=s}else Tr(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;jt(s),p=!1}else p=Ld(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return s.flags&256?(ma(s),s):(ma(s),null)}return ma(s),(s.flags&128)!==0?(s.lanes=l,s):(l=d!==null,n=n!==null&&n.memoizedState!==null,l&&(d=s.child,p=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(p=d.alternate.memoizedState.cachePool.pool),x=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(x=d.memoizedState.cachePool.pool),x!==p&&(d.flags|=2048)),l!==n&&l&&(s.child.flags|=8192),Ru(s,s.updateQueue),jt(s),null);case 4:return De(),n===null&&Kf(s.stateNode.containerInfo),jt(s),null;case 10:return ds(s.type),jt(s),null;case 19:if(W(Qt),d=s.memoizedState,d===null)return jt(s),null;if(p=(s.flags&128)!==0,x=d.rendering,x===null)if(p)Ll(d,!1);else{if(Yt!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(x=bu(n),x!==null){for(s.flags|=128,Ll(d,!1),n=x.updateQueue,s.updateQueue=n,Ru(s,n),s.subtreeFlags=0,n=l,l=s.child;l!==null;)n0(l,n),l=l.sibling;return C(Qt,Qt.current&1|2),mt&&us(s,d.treeForkCount),s.child}n=n.sibling}d.tail!==null&&It()>Du&&(s.flags|=128,p=!0,Ll(d,!1),s.lanes=4194304)}else{if(!p)if(n=bu(x),n!==null){if(s.flags|=128,p=!0,n=n.updateQueue,s.updateQueue=n,Ru(s,n),Ll(d,!0),d.tail===null&&d.tailMode==="hidden"&&!x.alternate&&!mt)return jt(s),null}else 2*It()-d.renderingStartTime>Du&&l!==536870912&&(s.flags|=128,p=!0,Ll(d,!1),s.lanes=4194304);d.isBackwards?(x.sibling=s.child,s.child=x):(n=d.last,n!==null?n.sibling=x:s.child=x,d.last=x)}return d.tail!==null?(n=d.tail,d.rendering=n,d.tail=n.sibling,d.renderingStartTime=It(),n.sibling=null,l=Qt.current,C(Qt,p?l&1|2:l&1),mt&&us(s,d.treeForkCount),n):(jt(s),null);case 22:case 23:return ma(s),Kd(),d=s.memoizedState!==null,n!==null?n.memoizedState!==null!==d&&(s.flags|=8192):d&&(s.flags|=8192),d?(l&536870912)!==0&&(s.flags&128)===0&&(jt(s),s.subtreeFlags&6&&(s.flags|=8192)):jt(s),l=s.updateQueue,l!==null&&Ru(s,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==l&&(s.flags|=2048),n!==null&&W(Sr),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),ds(nn),jt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function Dv(n,s){switch(Id(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return ds(nn),De(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return Bt(s),null;case 31:if(s.memoizedState!==null){if(ma(s),s.alternate===null)throw Error(r(340));Tr()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 13:if(ma(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Tr()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return W(Qt),null;case 4:return De(),null;case 10:return ds(s.type),null;case 22:case 23:return ma(s),Kd(),n!==null&&W(Sr),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return ds(nn),null;case 25:return null;default:return null}}function kg(n,s){switch(Id(s),s.tag){case 3:ds(nn),De();break;case 26:case 27:case 5:Bt(s);break;case 4:De();break;case 31:s.memoizedState!==null&&ma(s);break;case 13:ma(s);break;case 19:W(Qt);break;case 10:ds(s.type);break;case 22:case 23:ma(s),Kd(),n!==null&&W(Sr);break;case 24:ds(nn)}}function Dl(n,s){try{var l=s.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var p=d.next;l=p;do{if((l.tag&n)===n){d=void 0;var x=l.create,v=l.inst;d=x(),v.destroy=d}l=l.next}while(l!==p)}}catch(R){_t(s,s.return,R)}}function qs(n,s,l){try{var d=s.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var x=p.next;d=x;do{if((d.tag&n)===n){var v=d.inst,R=v.destroy;if(R!==void 0){v.destroy=void 0,p=s;var X=l,le=R;try{le()}catch(me){_t(p,X,me)}}}d=d.next}while(d!==x)}}catch(me){_t(s,s.return,me)}}function Rg(n){var s=n.updateQueue;if(s!==null){var l=n.stateNode;try{y0(s,l)}catch(d){_t(n,n.return,d)}}}function Og(n,s,l){l.props=Rr(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(d){_t(n,s,d)}}function jl(n,s){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var d=n.stateNode;break;case 30:d=n.stateNode;break;default:d=n.stateNode}typeof l=="function"?n.refCleanup=l(d):l.current=d}}catch(p){_t(n,s,p)}}function Ka(n,s){var l=n.ref,d=n.refCleanup;if(l!==null)if(typeof d=="function")try{d()}catch(p){_t(n,s,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){_t(n,s,p)}else l.current=null}function Ig(n){var s=n.type,l=n.memoizedProps,d=n.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":l.autoFocus&&d.focus();break e;case"img":l.src?d.src=l.src:l.srcSet&&(d.srcset=l.srcSet)}}catch(p){_t(n,n.return,p)}}function Af(n,s,l){try{var d=n.stateNode;a2(d,n.type,l,s),d[wn]=s}catch(p){_t(n,n.return,p)}}function Mg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ws(n.type)||n.tag===4}function wf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Mg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ws(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Cf(n,s,l){var d=n.tag;if(d===5||d===6)n=n.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(n),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=we));else if(d!==4&&(d===27&&Ws(n.type)&&(l=n.stateNode,s=null),n=n.child,n!==null))for(Cf(n,s,l),n=n.sibling;n!==null;)Cf(n,s,l),n=n.sibling}function Ou(n,s,l){var d=n.tag;if(d===5||d===6)n=n.stateNode,s?l.insertBefore(n,s):l.appendChild(n);else if(d!==4&&(d===27&&Ws(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(Ou(n,s,l),n=n.sibling;n!==null;)Ou(n,s,l),n=n.sibling}function Lg(n){var s=n.stateNode,l=n.memoizedProps;try{for(var d=n.type,p=s.attributes;p.length;)s.removeAttributeNode(p[0]);Tn(s,d,l),s[Vt]=n,s[wn]=l}catch(x){_t(n,n.return,x)}}var gs=!1,rn=!1,kf=!1,Dg=typeof WeakSet=="function"?WeakSet:Set,fn=null;function jv(n,s){if(n=n.containerInfo,Qf=Zu,n=Kp(n),Nd(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var p=d.anchorOffset,x=d.focusNode;d=d.focusOffset;try{l.nodeType,x.nodeType}catch{l=null;break e}var v=0,R=-1,X=-1,le=0,me=0,xe=n,oe=null;t:for(;;){for(var ue;xe!==l||p!==0&&xe.nodeType!==3||(R=v+p),xe!==x||d!==0&&xe.nodeType!==3||(X=v+d),xe.nodeType===3&&(v+=xe.nodeValue.length),(ue=xe.firstChild)!==null;)oe=xe,xe=ue;for(;;){if(xe===n)break t;if(oe===l&&++le===p&&(R=v),oe===x&&++me===d&&(X=v),(ue=xe.nextSibling)!==null)break;xe=oe,oe=xe.parentNode}xe=ue}l=R===-1||X===-1?null:{start:R,end:X}}else l=null}l=l||{start:0,end:0}}else l=null;for(Wf={focusedElem:n,selectionRange:l},Zu=!1,fn=s;fn!==null;)if(s=fn,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,fn=n;else for(;fn!==null;){switch(s=fn,x=s.alternate,n=s.flags,s.tag){case 0:if((n&4)!==0&&(n=s.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l<n.length;l++)p=n[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&x!==null){n=void 0,l=s,p=x.memoizedProps,x=x.memoizedState,d=l.stateNode;try{var Me=Rr(l.type,p);n=d.getSnapshotBeforeUpdate(Me,x),d.__reactInternalSnapshotBeforeUpdate=n}catch($e){_t(l,l.return,$e)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,l=n.nodeType,l===9)em(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":em(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(r(163))}if(n=s.sibling,n!==null){n.return=s.return,fn=n;break}fn=s.return}}function jg(n,s,l){var d=l.flags;switch(l.tag){case 0:case 11:case 15:xs(n,l),d&4&&Dl(5,l);break;case 1:if(xs(n,l),d&4)if(n=l.stateNode,s===null)try{n.componentDidMount()}catch(v){_t(l,l.return,v)}else{var p=Rr(l.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(p,s,n.__reactInternalSnapshotBeforeUpdate)}catch(v){_t(l,l.return,v)}}d&64&&Rg(l),d&512&&jl(l,l.return);break;case 3:if(xs(n,l),d&64&&(n=l.updateQueue,n!==null)){if(s=null,l.child!==null)switch(l.child.tag){case 27:case 5:s=l.child.stateNode;break;case 1:s=l.child.stateNode}try{y0(n,s)}catch(v){_t(l,l.return,v)}}break;case 27:s===null&&d&4&&Lg(l);case 26:case 5:xs(n,l),s===null&&d&4&&Ig(l),d&512&&jl(l,l.return);break;case 12:xs(n,l);break;case 31:xs(n,l),d&4&&Ug(n,l);break;case 13:xs(n,l),d&4&&Hg(n,l),d&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=Yv.bind(null,l),d2(n,l))));break;case 22:if(d=l.memoizedState!==null||gs,!d){s=s!==null&&s.memoizedState!==null||rn,p=gs;var x=rn;gs=d,(rn=s)&&!x?Es(n,l,(l.subtreeFlags&8772)!==0):xs(n,l),gs=p,rn=x}break;case 30:break;default:xs(n,l)}}function Bg(n){var s=n.alternate;s!==null&&(n.alternate=null,Bg(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&il(s)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Ut=null,Qn=!1;function bs(n,s,l){for(l=l.child;l!==null;)Pg(n,s,l),l=l.sibling}function Pg(n,s,l){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(bn,l)}catch{}switch(l.tag){case 26:rn||Ka(l,s),bs(n,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:rn||Ka(l,s);var d=Ut,p=Qn;Ws(l.type)&&(Ut=l.stateNode,Qn=!1),bs(n,s,l),Yl(l.stateNode),Ut=d,Qn=p;break;case 5:rn||Ka(l,s);case 6:if(d=Ut,p=Qn,Ut=null,bs(n,s,l),Ut=d,Qn=p,Ut!==null)if(Qn)try{(Ut.nodeType===9?Ut.body:Ut.nodeName==="HTML"?Ut.ownerDocument.body:Ut).removeChild(l.stateNode)}catch(x){_t(l,s,x)}else try{Ut.removeChild(l.stateNode)}catch(x){_t(l,s,x)}break;case 18:Ut!==null&&(Qn?(n=Ut,Rb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),ji(n)):Rb(Ut,l.stateNode));break;case 4:d=Ut,p=Qn,Ut=l.stateNode.containerInfo,Qn=!0,bs(n,s,l),Ut=d,Qn=p;break;case 0:case 11:case 14:case 15:qs(2,l,s),rn||qs(4,l,s),bs(n,s,l);break;case 1:rn||(Ka(l,s),d=l.stateNode,typeof d.componentWillUnmount=="function"&&Og(l,s,d)),bs(n,s,l);break;case 21:bs(n,s,l);break;case 22:rn=(d=rn)||l.memoizedState!==null,bs(n,s,l),rn=d;break;default:bs(n,s,l)}}function Ug(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ji(n)}catch(l){_t(s,s.return,l)}}}function Hg(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ji(n)}catch(l){_t(s,s.return,l)}}function Bv(n){switch(n.tag){case 31:case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new Dg),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new Dg),s;default:throw Error(r(435,n.tag))}}function Iu(n,s){var l=Bv(n);s.forEach(function(d){if(!l.has(d)){l.add(d);var p=Gv.bind(null,n,d);d.then(p,p)}})}function Wn(n,s){var l=s.deletions;if(l!==null)for(var d=0;d<l.length;d++){var p=l[d],x=n,v=s,R=v;e:for(;R!==null;){switch(R.tag){case 27:if(Ws(R.type)){Ut=R.stateNode,Qn=!1;break e}break;case 5:Ut=R.stateNode,Qn=!1;break e;case 3:case 4:Ut=R.stateNode.containerInfo,Qn=!0;break e}R=R.return}if(Ut===null)throw Error(r(160));Pg(x,v,p),Ut=null,Qn=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Fg(s,n),s=s.sibling}var Pa=null;function Fg(n,s){var l=n.alternate,d=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Wn(s,n),Zn(n),d&4&&(qs(3,n,n.return),Dl(3,n),qs(5,n,n.return));break;case 1:Wn(s,n),Zn(n),d&512&&(rn||l===null||Ka(l,l.return)),d&64&&gs&&(n=n.updateQueue,n!==null&&(d=n.callbacks,d!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?d:l.concat(d))));break;case 26:var p=Pa;if(Wn(s,n),Zn(n),d&512&&(rn||l===null||Ka(l,l.return)),d&4){var x=l!==null?l.memoizedState:null;if(d=n.memoizedState,l===null)if(d===null)if(n.stateNode===null){e:{d=n.type,l=n.memoizedProps,p=p.ownerDocument||p;t:switch(d){case"title":x=p.getElementsByTagName("title")[0],(!x||x[hr]||x[Vt]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(d),p.head.insertBefore(x,p.querySelector("head > title"))),Tn(x,d,l),x[Vt]=n,en(x),d=x;break e;case"link":var v=Fb("link","href",p).get(d+(l.href||""));if(v){for(var R=0;R<v.length;R++)if(x=v[R],x.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&x.getAttribute("rel")===(l.rel==null?null:l.rel)&&x.getAttribute("title")===(l.title==null?null:l.title)&&x.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){v.splice(R,1);break t}}x=p.createElement(d),Tn(x,d,l),p.head.appendChild(x);break;case"meta":if(v=Fb("meta","content",p).get(d+(l.content||""))){for(R=0;R<v.length;R++)if(x=v[R],x.getAttribute("content")===(l.content==null?null:""+l.content)&&x.getAttribute("name")===(l.name==null?null:l.name)&&x.getAttribute("property")===(l.property==null?null:l.property)&&x.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&x.getAttribute("charset")===(l.charSet==null?null:l.charSet)){v.splice(R,1);break t}}x=p.createElement(d),Tn(x,d,l),p.head.appendChild(x);break;default:throw Error(r(468,d))}x[Vt]=n,en(x),d=x}n.stateNode=d}else zb(p,n.type,n.stateNode);else n.stateNode=Hb(p,d,n.memoizedProps);else x!==d?(x===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):x.count--,d===null?zb(p,n.type,n.stateNode):Hb(p,d,n.memoizedProps)):d===null&&n.stateNode!==null&&Af(n,n.memoizedProps,l.memoizedProps)}break;case 27:Wn(s,n),Zn(n),d&512&&(rn||l===null||Ka(l,l.return)),l!==null&&d&4&&Af(n,n.memoizedProps,l.memoizedProps);break;case 5:if(Wn(s,n),Zn(n),d&512&&(rn||l===null||Ka(l,l.return)),n.flags&32){p=n.stateNode;try{qe(p,"")}catch(Me){_t(n,n.return,Me)}}d&4&&n.stateNode!=null&&(p=n.memoizedProps,Af(n,p,l!==null?l.memoizedProps:p)),d&1024&&(kf=!0);break;case 6:if(Wn(s,n),Zn(n),d&4){if(n.stateNode===null)throw Error(r(162));d=n.memoizedProps,l=n.stateNode;try{l.nodeValue=d}catch(Me){_t(n,n.return,Me)}}break;case 3:if(Vu=null,p=Pa,Pa=Gu(s.containerInfo),Wn(s,n),Pa=p,Zn(n),d&4&&l!==null&&l.memoizedState.isDehydrated)try{ji(s.containerInfo)}catch(Me){_t(n,n.return,Me)}kf&&(kf=!1,zg(n));break;case 4:d=Pa,Pa=Gu(n.stateNode.containerInfo),Wn(s,n),Zn(n),Pa=d;break;case 12:Wn(s,n),Zn(n);break;case 31:Wn(s,n),Zn(n),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,Iu(n,d)));break;case 13:Wn(s,n),Zn(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Lu=It()),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,Iu(n,d)));break;case 22:p=n.memoizedState!==null;var X=l!==null&&l.memoizedState!==null,le=gs,me=rn;if(gs=le||p,rn=me||X,Wn(s,n),rn=me,gs=le,Zn(n),d&8192)e:for(s=n.stateNode,s._visibility=p?s._visibility&-2:s._visibility|1,p&&(l===null||X||gs||rn||Or(n)),l=null,s=n;;){if(s.tag===5||s.tag===26){if(l===null){X=l=s;try{if(x=X.stateNode,p)v=x.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{R=X.stateNode;var xe=X.memoizedProps.style,oe=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;R.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(Me){_t(X,X.return,Me)}}}else if(s.tag===6){if(l===null){X=s;try{X.stateNode.nodeValue=p?"":X.memoizedProps}catch(Me){_t(X,X.return,Me)}}}else if(s.tag===18){if(l===null){X=s;try{var ue=X.stateNode;p?Ob(ue,!0):Ob(X.stateNode,!1)}catch(Me){_t(X,X.return,Me)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}d&4&&(d=n.updateQueue,d!==null&&(l=d.retryQueue,l!==null&&(d.retryQueue=null,Iu(n,l))));break;case 19:Wn(s,n),Zn(n),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,Iu(n,d)));break;case 30:break;case 21:break;default:Wn(s,n),Zn(n)}}function Zn(n){var s=n.flags;if(s&2){try{for(var l,d=n.return;d!==null;){if(Mg(d)){l=d;break}d=d.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var p=l.stateNode,x=wf(n);Ou(n,x,p);break;case 5:var v=l.stateNode;l.flags&32&&(qe(v,""),l.flags&=-33);var R=wf(n);Ou(n,R,v);break;case 3:case 4:var X=l.stateNode.containerInfo,le=wf(n);Cf(n,le,X);break;default:throw Error(r(161))}}catch(me){_t(n,n.return,me)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function zg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;zg(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function xs(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)jg(n,s.alternate,s),s=s.sibling}function Or(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:qs(4,s,s.return),Or(s);break;case 1:Ka(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&Og(s,s.return,l),Or(s);break;case 27:Yl(s.stateNode);case 26:case 5:Ka(s,s.return),Or(s);break;case 22:s.memoizedState===null&&Or(s);break;case 30:Or(s);break;default:Or(s)}n=n.sibling}}function Es(n,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var d=s.alternate,p=n,x=s,v=x.flags;switch(x.tag){case 0:case 11:case 15:Es(p,x,l),Dl(4,x);break;case 1:if(Es(p,x,l),d=x,p=d.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(le){_t(d,d.return,le)}if(d=x,p=d.updateQueue,p!==null){var R=d.stateNode;try{var X=p.shared.hiddenCallbacks;if(X!==null)for(p.shared.hiddenCallbacks=null,p=0;p<X.length;p++)E0(X[p],R)}catch(le){_t(d,d.return,le)}}l&&v&64&&Rg(x),jl(x,x.return);break;case 27:Lg(x);case 26:case 5:Es(p,x,l),l&&d===null&&v&4&&Ig(x),jl(x,x.return);break;case 12:Es(p,x,l);break;case 31:Es(p,x,l),l&&v&4&&Ug(p,x);break;case 13:Es(p,x,l),l&&v&4&&Hg(p,x);break;case 22:x.memoizedState===null&&Es(p,x,l),jl(x,x.return);break;case 30:break;default:Es(p,x,l)}s=s.sibling}}function Rf(n,s){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&Tl(l))}function Of(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Tl(n))}function Ua(n,s,l,d){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)$g(n,s,l,d),s=s.sibling}function $g(n,s,l,d){var p=s.flags;switch(s.tag){case 0:case 11:case 15:Ua(n,s,l,d),p&2048&&Dl(9,s);break;case 1:Ua(n,s,l,d);break;case 3:Ua(n,s,l,d),p&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Tl(n)));break;case 12:if(p&2048){Ua(n,s,l,d),n=s.stateNode;try{var x=s.memoizedProps,v=x.id,R=x.onPostCommit;typeof R=="function"&&R(v,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(X){_t(s,s.return,X)}}else Ua(n,s,l,d);break;case 31:Ua(n,s,l,d);break;case 13:Ua(n,s,l,d);break;case 23:break;case 22:x=s.stateNode,v=s.alternate,s.memoizedState!==null?x._visibility&2?Ua(n,s,l,d):Bl(n,s):x._visibility&2?Ua(n,s,l,d):(x._visibility|=2,Si(n,s,l,d,(s.subtreeFlags&10256)!==0||!1)),p&2048&&Rf(v,s);break;case 24:Ua(n,s,l,d),p&2048&&Of(s.alternate,s);break;default:Ua(n,s,l,d)}}function Si(n,s,l,d,p){for(p=p&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var x=n,v=s,R=l,X=d,le=v.flags;switch(v.tag){case 0:case 11:case 15:Si(x,v,R,X,p),Dl(8,v);break;case 23:break;case 22:var me=v.stateNode;v.memoizedState!==null?me._visibility&2?Si(x,v,R,X,p):Bl(x,v):(me._visibility|=2,Si(x,v,R,X,p)),p&&le&2048&&Rf(v.alternate,v);break;case 24:Si(x,v,R,X,p),p&&le&2048&&Of(v.alternate,v);break;default:Si(x,v,R,X,p)}s=s.sibling}}function Bl(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=n,d=s,p=d.flags;switch(d.tag){case 22:Bl(l,d),p&2048&&Rf(d.alternate,d);break;case 24:Bl(l,d),p&2048&&Of(d.alternate,d);break;default:Bl(l,d)}s=s.sibling}}var Pl=8192;function Ai(n,s,l){if(n.subtreeFlags&Pl)for(n=n.child;n!==null;)qg(n,s,l),n=n.sibling}function qg(n,s,l){switch(n.tag){case 26:Ai(n,s,l),n.flags&Pl&&n.memoizedState!==null&&_2(l,Pa,n.memoizedState,n.memoizedProps);break;case 5:Ai(n,s,l);break;case 3:case 4:var d=Pa;Pa=Gu(n.stateNode.containerInfo),Ai(n,s,l),Pa=d;break;case 22:n.memoizedState===null&&(d=n.alternate,d!==null&&d.memoizedState!==null?(d=Pl,Pl=16777216,Ai(n,s,l),Pl=d):Ai(n,s,l));break;default:Ai(n,s,l)}}function Yg(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function Ul(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var d=s[l];fn=d,Kg(d,n)}Yg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Gg(n),n=n.sibling}function Gg(n){switch(n.tag){case 0:case 11:case 15:Ul(n),n.flags&2048&&qs(9,n,n.return);break;case 3:Ul(n);break;case 12:Ul(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,Mu(n)):Ul(n);break;default:Ul(n)}}function Mu(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var d=s[l];fn=d,Kg(d,n)}Yg(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:qs(8,s,s.return),Mu(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,Mu(s));break;default:Mu(s)}n=n.sibling}}function Kg(n,s){for(;fn!==null;){var l=fn;switch(l.tag){case 0:case 11:case 15:qs(8,l,s);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var d=l.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Tl(l.memoizedState.cache)}if(d=l.child,d!==null)d.return=l,fn=d;else e:for(l=n;fn!==null;){d=fn;var p=d.sibling,x=d.return;if(Bg(d),d===l){fn=null;break e}if(p!==null){p.return=x,fn=p;break e}fn=x}}}var Pv={getCacheForType:function(n){var s=yn(nn),l=s.data.get(n);return l===void 0&&(l=n(),s.data.set(n,l)),l},cacheSignal:function(){return yn(nn).controller.signal}},Uv=typeof WeakMap=="function"?WeakMap:Map,xt=0,kt=null,st=null,ut=0,Tt=0,ha=null,Ys=!1,wi=!1,If=!1,ys=0,Yt=0,Gs=0,Ir=0,Mf=0,pa=0,Ci=0,Hl=null,Jn=null,Lf=!1,Lu=0,Vg=0,Du=1/0,ju=null,Ks=null,cn=0,Vs=null,ki=null,Ns=0,Df=0,jf=null,Xg=null,Fl=0,Bf=null;function ga(){return(xt&2)!==0&&ut!==0?ut&-ut:G.T!==null?$f():ti()}function Qg(){if(pa===0)if((ut&536870912)===0||mt){var n=ei;ei<<=1,(ei&3932160)===0&&(ei=262144),pa=n}else pa=536870912;return n=fa.current,n!==null&&(n.flags|=32),pa}function ea(n,s,l){(n===kt&&(Tt===2||Tt===9)||n.cancelPendingCommit!==null)&&(Ri(n,0),Xs(n,ut,pa,!1)),Ct(n,l),((xt&2)===0||n!==kt)&&(n===kt&&((xt&2)===0&&(Ir|=l),Yt===4&&Xs(n,ut,pa,!1)),Va(n))}function Wg(n,s,l){if((xt&6)!==0)throw Error(r(327));var d=!l&&(s&127)===0&&(s&n.expiredLanes)===0||ge(n,s),p=d?zv(n,s):Uf(n,s,!0),x=d;do{if(p===0){wi&&!d&&Xs(n,s,0,!1);break}else{if(l=n.current.alternate,x&&!Hv(l)){p=Uf(n,s,!1),x=!1;continue}if(p===2){if(x=s,n.errorRecoveryDisabledLanes&x)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){s=v;e:{var R=n;p=Hl;var X=R.current.memoizedState.isDehydrated;if(X&&(Ri(R,v).flags|=256),v=Uf(R,v,!1),v!==2){if(If&&!X){R.errorRecoveryDisabledLanes|=x,Ir|=x,p=4;break e}x=Jn,Jn=p,x!==null&&(Jn===null?Jn=x:Jn.push.apply(Jn,x))}p=v}if(x=!1,p!==2)continue}}if(p===1){Ri(n,0),Xs(n,s,0,!0);break}e:{switch(d=n,x=p,x){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Xs(d,s,pa,!Ys);break e;case 2:Jn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(p=Lu+300-It(),10<p)){if(Xs(d,s,pa,!Ys),Q(d,0,!0)!==0)break e;Ns=s,d.timeoutHandle=Cb(Zg.bind(null,d,l,Jn,ju,Lf,s,pa,Ir,Ci,Ys,x,"Throttled",-0,0),p);break e}Zg(d,l,Jn,ju,Lf,s,pa,Ir,Ci,Ys,x,null,-0,0)}}break}while(!0);Va(n)}function Zg(n,s,l,d,p,x,v,R,X,le,me,xe,oe,ue){if(n.timeoutHandle=-1,xe=s.subtreeFlags,xe&8192||(xe&16785408)===16785408){xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:we},qg(s,x,xe);var Me=(x&62914560)===x?Lu-It():(x&4194048)===x?Vg-It():0;if(Me=v2(xe,Me),Me!==null){Ns=x,n.cancelPendingCommit=Me(ib.bind(null,n,s,x,l,d,p,v,R,X,me,xe,null,oe,ue)),Xs(n,x,v,!le);return}}ib(n,s,x,l,d,p,v,R,X)}function Hv(n){for(var s=n;;){var l=s.tag;if((l===0||l===11||l===15)&&s.flags&16384&&(l=s.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var d=0;d<l.length;d++){var p=l[d],x=p.getSnapshot;p=p.value;try{if(!ca(x(),p))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Xs(n,s,l,d){s&=~Mf,s&=~Ir,n.suspendedLanes|=s,n.pingedLanes&=~s,d&&(n.warmLanes|=s),d=n.expirationTimes;for(var p=s;0<p;){var x=31-Et(p),v=1<<x;d[x]=-1,p&=~v}l!==0&&Ie(n,l,s)}function Bu(){return(xt&6)===0?(zl(0),!1):!0}function Pf(){if(st!==null){if(Tt===0)var n=st.return;else n=st,cs=_r=null,Jd(n),yi=null,vl=0,n=st;for(;n!==null;)kg(n.alternate,n),n=n.return;st=null}}function Ri(n,s){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,i2(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),Ns=0,Pf(),kt=n,st=l=os(n.current,null),ut=s,Tt=0,ha=null,Ys=!1,wi=ge(n,s),If=!1,Ci=pa=Mf=Ir=Gs=Yt=0,Jn=Hl=null,Lf=!1,(s&8)!==0&&(s|=s&32);var d=n.entangledLanes;if(d!==0)for(n=n.entanglements,d&=s;0<d;){var p=31-Et(d),x=1<<p;s|=n[p],d&=~x}return ys=s,su(),l}function Jg(n,s){Ze=null,G.H=Il,s===Ei||s===fu?(s=p0(),Tt=3):s===Fd?(s=p0(),Tt=4):Tt=s===gf?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,ha=s,st===null&&(Yt=1,Au(n,_a(s,n.current)))}function eb(){var n=fa.current;return n===null?!0:(ut&4194048)===ut?wa===null:(ut&62914560)===ut||(ut&536870912)!==0?n===wa:!1}function tb(){var n=G.H;return G.H=Il,n===null?Il:n}function nb(){var n=G.A;return G.A=Pv,n}function Pu(){Yt=4,Ys||(ut&4194048)!==ut&&fa.current!==null||(wi=!0),(Gs&134217727)===0&&(Ir&134217727)===0||kt===null||Xs(kt,ut,pa,!1)}function Uf(n,s,l){var d=xt;xt|=2;var p=tb(),x=nb();(kt!==n||ut!==s)&&(ju=null,Ri(n,s)),s=!1;var v=Yt;e:do try{if(Tt!==0&&st!==null){var R=st,X=ha;switch(Tt){case 8:Pf(),v=6;break e;case 3:case 2:case 9:case 6:fa.current===null&&(s=!0);var le=Tt;if(Tt=0,ha=null,Oi(n,R,X,le),l&&wi){v=0;break e}break;default:le=Tt,Tt=0,ha=null,Oi(n,R,X,le)}}Fv(),v=Yt;break}catch(me){Jg(n,me)}while(!0);return s&&n.shellSuspendCounter++,cs=_r=null,xt=d,G.H=p,G.A=x,st===null&&(kt=null,ut=0,su()),v}function Fv(){for(;st!==null;)ab(st)}function zv(n,s){var l=xt;xt|=2;var d=tb(),p=nb();kt!==n||ut!==s?(ju=null,Du=It()+500,Ri(n,s)):wi=ge(n,s);e:do try{if(Tt!==0&&st!==null){s=st;var x=ha;t:switch(Tt){case 1:Tt=0,ha=null,Oi(n,s,x,1);break;case 2:case 9:if(m0(x)){Tt=0,ha=null,sb(s);break}s=function(){Tt!==2&&Tt!==9||kt!==n||(Tt=7),Va(n)},x.then(s,s);break e;case 3:Tt=7;break e;case 4:Tt=5;break e;case 7:m0(x)?(Tt=0,ha=null,sb(s)):(Tt=0,ha=null,Oi(n,s,x,7));break;case 5:var v=null;switch(st.tag){case 26:v=st.memoizedState;case 5:case 27:var R=st;if(v?$b(v):R.stateNode.complete){Tt=0,ha=null;var X=R.sibling;if(X!==null)st=X;else{var le=R.return;le!==null?(st=le,Uu(le)):st=null}break t}}Tt=0,ha=null,Oi(n,s,x,5);break;case 6:Tt=0,ha=null,Oi(n,s,x,6);break;case 8:Pf(),Yt=6;break e;default:throw Error(r(462))}}$v();break}catch(me){Jg(n,me)}while(!0);return cs=_r=null,G.H=d,G.A=p,xt=l,st!==null?0:(kt=null,ut=0,su(),Yt)}function $v(){for(;st!==null&&!ft();)ab(st)}function ab(n){var s=wg(n.alternate,n,ys);n.memoizedProps=n.pendingProps,s===null?Uu(n):st=s}function sb(n){var s=n,l=s.alternate;switch(s.tag){case 15:case 0:s=Ng(l,s,s.pendingProps,s.type,void 0,ut);break;case 11:s=Ng(l,s,s.pendingProps,s.type.render,s.ref,ut);break;case 5:Jd(s);default:kg(l,s),s=st=n0(s,ys),s=wg(l,s,ys)}n.memoizedProps=n.pendingProps,s===null?Uu(n):st=s}function Oi(n,s,l,d){cs=_r=null,Jd(s),yi=null,vl=0;var p=s.return;try{if(Ov(n,p,s,l,ut)){Yt=1,Au(n,_a(l,n.current)),st=null;return}}catch(x){if(p!==null)throw st=p,x;Yt=1,Au(n,_a(l,n.current)),st=null;return}s.flags&32768?(mt||d===1?n=!0:wi||(ut&536870912)!==0?n=!1:(Ys=n=!0,(d===2||d===9||d===3||d===6)&&(d=fa.current,d!==null&&d.tag===13&&(d.flags|=16384))),rb(s,n)):Uu(s)}function Uu(n){var s=n;do{if((s.flags&32768)!==0){rb(s,Ys);return}n=s.return;var l=Lv(s.alternate,s,ys);if(l!==null){st=l;return}if(s=s.sibling,s!==null){st=s;return}st=s=n}while(s!==null);Yt===0&&(Yt=5)}function rb(n,s){do{var l=Dv(n.alternate,n);if(l!==null){l.flags&=32767,st=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(n=n.sibling,n!==null)){st=n;return}st=n=l}while(n!==null);Yt=6,st=null}function ib(n,s,l,d,p,x,v,R,X){n.cancelPendingCommit=null;do Hu();while(cn!==0);if((xt&6)!==0)throw Error(r(327));if(s!==null){if(s===n.current)throw Error(r(177));if(x=s.lanes|s.childLanes,x|=Ad,je(n,l,x,v,R,X),n===kt&&(st=kt=null,ut=0),ki=s,Vs=n,Ns=l,Df=x,jf=p,Xg=d,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,Kv(ze,function(){return db(),null})):(n.callbackNode=null,n.callbackPriority=0),d=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||d){d=G.T,G.T=null,p=F.p,F.p=2,v=xt,xt|=4;try{jv(n,s,l)}finally{xt=v,F.p=p,G.T=d}}cn=1,lb(),ob(),ub()}}function lb(){if(cn===1){cn=0;var n=Vs,s=ki,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=G.T,G.T=null;var d=F.p;F.p=2;var p=xt;xt|=4;try{Fg(s,n);var x=Wf,v=Kp(n.containerInfo),R=x.focusedElem,X=x.selectionRange;if(v!==R&&R&&R.ownerDocument&&Gp(R.ownerDocument.documentElement,R)){if(X!==null&&Nd(R)){var le=X.start,me=X.end;if(me===void 0&&(me=le),"selectionStart"in R)R.selectionStart=le,R.selectionEnd=Math.min(me,R.value.length);else{var xe=R.ownerDocument||document,oe=xe&&xe.defaultView||window;if(oe.getSelection){var ue=oe.getSelection(),Me=R.textContent.length,$e=Math.min(X.start,Me),At=X.end===void 0?$e:Math.min(X.end,Me);!ue.extend&&$e>At&&(v=At,At=$e,$e=v);var ne=Yp(R,$e),Z=Yp(R,At);if(ne&&Z&&(ue.rangeCount!==1||ue.anchorNode!==ne.node||ue.anchorOffset!==ne.offset||ue.focusNode!==Z.node||ue.focusOffset!==Z.offset)){var ie=xe.createRange();ie.setStart(ne.node,ne.offset),ue.removeAllRanges(),$e>At?(ue.addRange(ie),ue.extend(Z.node,Z.offset)):(ie.setEnd(Z.node,Z.offset),ue.addRange(ie))}}}}for(xe=[],ue=R;ue=ue.parentNode;)ue.nodeType===1&&xe.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<xe.length;R++){var be=xe[R];be.element.scrollLeft=be.left,be.element.scrollTop=be.top}}Zu=!!Qf,Wf=Qf=null}finally{xt=p,F.p=d,G.T=l}}n.current=s,cn=2}}function ob(){if(cn===2){cn=0;var n=Vs,s=ki,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=G.T,G.T=null;var d=F.p;F.p=2;var p=xt;xt|=4;try{jg(n,s.alternate,s)}finally{xt=p,F.p=d,G.T=l}}cn=3}}function ub(){if(cn===4||cn===3){cn=0,la();var n=Vs,s=ki,l=Ns,d=Xg;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?cn=5:(cn=0,ki=Vs=null,cb(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Ks=null),as(l),s=s.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(bn,s,void 0,(s.current.flags&128)===128)}catch{}if(d!==null){s=G.T,p=F.p,F.p=2,G.T=null;try{for(var x=n.onRecoverableError,v=0;v<d.length;v++){var R=d[v];x(R.value,{componentStack:R.stack})}}finally{G.T=s,F.p=p}}(Ns&3)!==0&&Hu(),Va(n),p=n.pendingLanes,(l&261930)!==0&&(p&42)!==0?n===Bf?Fl++:(Fl=0,Bf=n):Fl=0,zl(0)}}function cb(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,Tl(s)))}function Hu(){return lb(),ob(),ub(),db()}function db(){if(cn!==5)return!1;var n=Vs,s=Df;Df=0;var l=as(Ns),d=G.T,p=F.p;try{F.p=32>l?32:l,G.T=null,l=jf,jf=null;var x=Vs,v=Ns;if(cn=0,ki=Vs=null,Ns=0,(xt&6)!==0)throw Error(r(331));var R=xt;if(xt|=4,Gg(x.current),$g(x,x.current,v,l),xt=R,zl(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(bn,x)}catch{}return!0}finally{F.p=p,G.T=d,cb(n,s)}}function fb(n,s,l){s=_a(l,s),s=pf(n.stateNode,s,2),n=Fs(n,s,2),n!==null&&(Ct(n,2),Va(n))}function _t(n,s,l){if(n.tag===3)fb(n,n,l);else for(;s!==null;){if(s.tag===3){fb(s,n,l);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Ks===null||!Ks.has(d))){n=_a(l,n),l=mg(2),d=Fs(s,l,2),d!==null&&(hg(l,d,s,n),Ct(d,2),Va(d));break}}s=s.return}}function Hf(n,s,l){var d=n.pingCache;if(d===null){d=n.pingCache=new Uv;var p=new Set;d.set(s,p)}else p=d.get(s),p===void 0&&(p=new Set,d.set(s,p));p.has(l)||(If=!0,p.add(l),n=qv.bind(null,n,s,l),s.then(n,n))}function qv(n,s,l){var d=n.pingCache;d!==null&&d.delete(s),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,kt===n&&(ut&l)===l&&(Yt===4||Yt===3&&(ut&62914560)===ut&&300>It()-Lu?(xt&2)===0&&Ri(n,0):Mf|=l,Ci===ut&&(Ci=0)),Va(n)}function mb(n,s){s===0&&(s=Ke()),n=yr(n,s),n!==null&&(Ct(n,s),Va(n))}function Yv(n){var s=n.memoizedState,l=0;s!==null&&(l=s.retryLane),mb(n,l)}function Gv(n,s){var l=0;switch(n.tag){case 31:case 13:var d=n.stateNode,p=n.memoizedState;p!==null&&(l=p.retryLane);break;case 19:d=n.stateNode;break;case 22:d=n.stateNode._retryCache;break;default:throw Error(r(314))}d!==null&&d.delete(s),mb(n,l)}function Kv(n,s){return Da(n,s)}var Fu=null,Ii=null,Ff=!1,zu=!1,zf=!1,Qs=0;function Va(n){n!==Ii&&n.next===null&&(Ii===null?Fu=Ii=n:Ii=Ii.next=n),zu=!0,Ff||(Ff=!0,Xv())}function zl(n,s){if(!zf&&zu){zf=!0;do for(var l=!1,d=Fu;d!==null;){if(n!==0){var p=d.pendingLanes;if(p===0)var x=0;else{var v=d.suspendedLanes,R=d.pingedLanes;x=(1<<31-Et(42|n)+1)-1,x&=p&~(v&~R),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(l=!0,bb(d,x))}else x=ut,x=Q(d,d===kt?x:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(x&3)===0||ge(d,x)||(l=!0,bb(d,x));d=d.next}while(l);zf=!1}}function Vv(){hb()}function hb(){zu=Ff=!1;var n=0;Qs!==0&&r2()&&(n=Qs);for(var s=It(),l=null,d=Fu;d!==null;){var p=d.next,x=pb(d,s);x===0?(d.next=null,l===null?Fu=p:l.next=p,p===null&&(Ii=l)):(l=d,(n!==0||(x&3)!==0)&&(zu=!0)),d=p}cn!==0&&cn!==5||zl(n),Qs!==0&&(Qs=0)}function pb(n,s){for(var l=n.suspendedLanes,d=n.pingedLanes,p=n.expirationTimes,x=n.pendingLanes&-62914561;0<x;){var v=31-Et(x),R=1<<v,X=p[v];X===-1?((R&l)===0||(R&d)!==0)&&(p[v]=Ce(R,s)):X<=s&&(n.expiredLanes|=R),x&=~R}if(s=kt,l=ut,l=Q(n,n===s?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),d=n.callbackNode,l===0||n===s&&(Tt===2||Tt===9)||n.cancelPendingCommit!==null)return d!==null&&d!==null&&Ee(d),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||ge(n,l)){if(s=l&-l,s===n.callbackPriority)return s;switch(d!==null&&Ee(d),as(l)){case 2:case 8:l=Ae;break;case 32:l=ze;break;case 268435456:l=pt;break;default:l=ze}return d=gb.bind(null,n),l=Da(l,d),n.callbackPriority=s,n.callbackNode=l,s}return d!==null&&d!==null&&Ee(d),n.callbackPriority=2,n.callbackNode=null,2}function gb(n,s){if(cn!==0&&cn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(Hu()&&n.callbackNode!==l)return null;var d=ut;return d=Q(n,n===kt?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),d===0?null:(Wg(n,d,s),pb(n,It()),n.callbackNode!=null&&n.callbackNode===l?gb.bind(null,n):null)}function bb(n,s){if(Hu())return null;Wg(n,s,!0)}function Xv(){l2(function(){(xt&6)!==0?Da(fe,Vv):hb()})}function $f(){if(Qs===0){var n=bi;n===0&&(n=fr,fr<<=1,(fr&261888)===0&&(fr=256)),Qs=n}return Qs}function xb(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ms(""+n)}function Eb(n,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,n.id&&l.setAttribute("form",n.id),s.parentNode.insertBefore(l,s),n=new FormData(n),l.parentNode.removeChild(l),n}function Qv(n,s,l,d,p){if(s==="submit"&&l&&l.stateNode===p){var x=xb((p[wn]||null).action),v=d.submitter;v&&(s=(s=v[wn]||null)?xb(s.formAction):v.getAttribute("formAction"),s!==null&&(x=s,v=null));var R=new eu("action","action",null,d,p);n.push({event:R,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Qs!==0){var X=v?Eb(p,v):new FormData(p);uf(l,{pending:!0,data:X,method:p.method,action:x},null,X)}}else typeof x=="function"&&(R.preventDefault(),X=v?Eb(p,v):new FormData(p),uf(l,{pending:!0,data:X,method:p.method,action:x},x,X))},currentTarget:p}]})}}for(var qf=0;qf<Sd.length;qf++){var Yf=Sd[qf],Wv=Yf.toLowerCase(),Zv=Yf[0].toUpperCase()+Yf.slice(1);Ba(Wv,"on"+Zv)}Ba(Qp,"onAnimationEnd"),Ba(Wp,"onAnimationIteration"),Ba(Zp,"onAnimationStart"),Ba("dblclick","onDoubleClick"),Ba("focusin","onFocus"),Ba("focusout","onBlur"),Ba(hv,"onTransitionRun"),Ba(pv,"onTransitionStart"),Ba(gv,"onTransitionCancel"),Ba(Jp,"onTransitionEnd"),Te("onMouseEnter",["mouseout","mouseover"]),Te("onMouseLeave",["mouseout","mouseover"]),Te("onPointerEnter",["pointerout","pointerover"]),Te("onPointerLeave",["pointerout","pointerover"]),rs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rs("onBeforeInput",["compositionend","keypress","textInput","paste"]),rs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $l="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(" "),Jv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($l));function yb(n,s){s=(s&4)!==0;for(var l=0;l<n.length;l++){var d=n[l],p=d.event;d=d.listeners;e:{var x=void 0;if(s)for(var v=d.length-1;0<=v;v--){var R=d[v],X=R.instance,le=R.currentTarget;if(R=R.listener,X!==x&&p.isPropagationStopped())break e;x=R,p.currentTarget=le;try{x(p)}catch(me){au(me)}p.currentTarget=null,x=X}else for(v=0;v<d.length;v++){if(R=d[v],X=R.instance,le=R.currentTarget,R=R.listener,X!==x&&p.isPropagationStopped())break e;x=R,p.currentTarget=le;try{x(p)}catch(me){au(me)}p.currentTarget=null,x=X}}}}function rt(n,s){var l=s[rl];l===void 0&&(l=s[rl]=new Set);var d=n+"__bubble";l.has(d)||(Nb(s,n,2,!1),l.add(d))}function Gf(n,s,l){var d=0;s&&(d|=4),Nb(l,n,d,s)}var $u="_reactListening"+Math.random().toString(36).slice(2);function Kf(n){if(!n[$u]){n[$u]=!0,Go.forEach(function(l){l!=="selectionchange"&&(Jv.has(l)||Gf(l,!1,n),Gf(l,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[$u]||(s[$u]=!0,Gf("selectionchange",!1,s))}}function Nb(n,s,l,d){switch(Qb(s)){case 2:var p=w2;break;case 8:p=C2;break;default:p=om}l=p.bind(null,s,l,n),p=void 0,!fd||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(p=!0),d?p!==void 0?n.addEventListener(s,l,{capture:!0,passive:p}):n.addEventListener(s,l,!0):p!==void 0?n.addEventListener(s,l,{passive:p}):n.addEventListener(s,l,!1)}function Vf(n,s,l,d,p){var x=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var v=d.tag;if(v===3||v===4){var R=d.stateNode.containerInfo;if(R===p)break;if(v===4)for(v=d.return;v!==null;){var X=v.tag;if((X===3||X===4)&&v.stateNode.containerInfo===p)return;v=v.return}for(;R!==null;){if(v=Pn(R),v===null)return;if(X=v.tag,X===5||X===6||X===26||X===27){d=x=v;continue e}R=R.parentNode}}d=d.return}Qo(function(){var le=x,me=We(l),xe=[];e:{var oe=e0.get(n);if(oe!==void 0){var ue=eu,Me=n;switch(n){case"keypress":if(Zo(l)===0)break e;case"keydown":case"keyup":ue=G_;break;case"focusin":Me="focus",ue=gd;break;case"focusout":Me="blur",ue=gd;break;case"beforeblur":case"afterblur":ue=gd;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=kp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=L_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=X_;break;case Qp:case Wp:case Zp:ue=B_;break;case Jp:ue=W_;break;case"scroll":case"scrollend":ue=I_;break;case"wheel":ue=J_;break;case"copy":case"cut":case"paste":ue=U_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=Op;break;case"toggle":case"beforetoggle":ue=tv}var $e=(s&4)!==0,At=!$e&&(n==="scroll"||n==="scrollend"),ne=$e?oe!==null?oe+"Capture":null:oe;$e=[];for(var Z=le,ie;Z!==null;){var be=Z;if(ie=be.stateNode,be=be.tag,be!==5&&be!==26&&be!==27||ie===null||ne===null||(be=dl(Z,ne),be!=null&&$e.push(ql(Z,be,ie))),At)break;Z=Z.return}0<$e.length&&(oe=new ue(oe,Me,null,l,me),xe.push({event:oe,listeners:$e}))}}if((s&7)===0){e:{if(oe=n==="mouseover"||n==="pointerover",ue=n==="mouseout"||n==="pointerout",oe&&l!==Be&&(Me=l.relatedTarget||l.fromElement)&&(Pn(Me)||Me[ks]))break e;if((ue||oe)&&(oe=me.window===me?me:(oe=me.ownerDocument)?oe.defaultView||oe.parentWindow:window,ue?(Me=l.relatedTarget||l.toElement,ue=le,Me=Me?Pn(Me):null,Me!==null&&(At=u(Me),$e=Me.tag,Me!==At||$e!==5&&$e!==27&&$e!==6)&&(Me=null)):(ue=null,Me=le),ue!==Me)){if($e=kp,be="onMouseLeave",ne="onMouseEnter",Z="mouse",(n==="pointerout"||n==="pointerover")&&($e=Op,be="onPointerLeave",ne="onPointerEnter",Z="pointer"),At=ue==null?oe:Rs(ue),ie=Me==null?oe:Rs(Me),oe=new $e(be,Z+"leave",ue,l,me),oe.target=At,oe.relatedTarget=ie,be=null,Pn(me)===le&&($e=new $e(ne,Z+"enter",Me,l,me),$e.target=ie,$e.relatedTarget=At,be=$e),At=be,ue&&Me)t:{for($e=e2,ne=ue,Z=Me,ie=0,be=ne;be;be=$e(be))ie++;be=0;for(var He=Z;He;He=$e(He))be++;for(;0<ie-be;)ne=$e(ne),ie--;for(;0<be-ie;)Z=$e(Z),be--;for(;ie--;){if(ne===Z||Z!==null&&ne===Z.alternate){$e=ne;break t}ne=$e(ne),Z=$e(Z)}$e=null}else $e=null;ue!==null&&Tb(xe,oe,ue,$e,!1),Me!==null&&At!==null&&Tb(xe,At,Me,$e,!0)}}e:{if(oe=le?Rs(le):window,ue=oe.nodeName&&oe.nodeName.toLowerCase(),ue==="select"||ue==="input"&&oe.type==="file")var gt=Up;else if(Bp(oe))if(Hp)gt=dv;else{gt=uv;var Pe=ov}else ue=oe.nodeName,!ue||ue.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?le&&Is(le.elementType)&&(gt=Up):gt=cv;if(gt&&(gt=gt(n,le))){Pp(xe,gt,l,me);break e}Pe&&Pe(n,oe,le),n==="focusout"&&le&&oe.type==="number"&&le.memoizedProps.value!=null&&ii(oe,"number",oe.value)}switch(Pe=le?Rs(le):window,n){case"focusin":(Bp(Pe)||Pe.contentEditable==="true")&&(ui=Pe,Td=le,El=null);break;case"focusout":El=Td=ui=null;break;case"mousedown":_d=!0;break;case"contextmenu":case"mouseup":case"dragend":_d=!1,Vp(xe,l,me);break;case"selectionchange":if(mv)break;case"keydown":case"keyup":Vp(xe,l,me)}var Je;if(xd)e:{switch(n){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else oi?Dp(n,l)&&(ct="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(ct="onCompositionStart");ct&&(Ip&&l.locale!=="ko"&&(oi||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&oi&&(Je=wp()):(Ls=me,md="value"in Ls?Ls.value:Ls.textContent,oi=!0)),Pe=qu(le,ct),0<Pe.length&&(ct=new Rp(ct,n,null,l,me),xe.push({event:ct,listeners:Pe}),Je?ct.data=Je:(Je=jp(l),Je!==null&&(ct.data=Je)))),(Je=av?sv(n,l):rv(n,l))&&(ct=qu(le,"onBeforeInput"),0<ct.length&&(Pe=new Rp("onBeforeInput","beforeinput",null,l,me),xe.push({event:Pe,listeners:ct}),Pe.data=Je)),Qv(xe,n,le,l,me)}yb(xe,s)})}function ql(n,s,l){return{instance:n,listener:s,currentTarget:l}}function qu(n,s){for(var l=s+"Capture",d=[];n!==null;){var p=n,x=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=dl(n,l),p!=null&&d.unshift(ql(n,p,x)),p=dl(n,s),p!=null&&d.push(ql(n,p,x))),n.tag===3)return d;n=n.return}return[]}function e2(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Tb(n,s,l,d,p){for(var x=s._reactName,v=[];l!==null&&l!==d;){var R=l,X=R.alternate,le=R.stateNode;if(R=R.tag,X!==null&&X===d)break;R!==5&&R!==26&&R!==27||le===null||(X=le,p?(le=dl(l,x),le!=null&&v.unshift(ql(l,le,X))):p||(le=dl(l,x),le!=null&&v.push(ql(l,le,X)))),l=l.return}v.length!==0&&n.push({event:s,listeners:v})}var t2=/\r\n?/g,n2=/\u0000|\uFFFD/g;function _b(n){return(typeof n=="string"?n:""+n).replace(t2,`
|
|
49
|
-
`).replace(n2,"")}function vb(n,s){return s=_b(s),_b(n)===s}function St(n,s,l,d,p,x){switch(l){case"children":typeof d=="string"?s==="body"||s==="textarea"&&d===""||qe(n,d):(typeof d=="number"||typeof d=="bigint")&&s!=="body"&&qe(n,""+d);break;case"className":oa(n,"class",d);break;case"tabIndex":oa(n,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":oa(n,l,d);break;case"style":Nt(n,d,x);break;case"data":if(s!=="object"){oa(n,"data",d);break}case"src":case"href":if(d===""&&(s!=="a"||l!=="href")){n.removeAttribute(l);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){n.removeAttribute(l);break}d=Ms(""+d),n.setAttribute(l,d);break;case"action":case"formAction":if(typeof d=="function"){n.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(l==="formAction"?(s!=="input"&&St(n,s,"name",p.name,p,null),St(n,s,"formEncType",p.formEncType,p,null),St(n,s,"formMethod",p.formMethod,p,null),St(n,s,"formTarget",p.formTarget,p,null)):(St(n,s,"encType",p.encType,p,null),St(n,s,"method",p.method,p,null),St(n,s,"target",p.target,p,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){n.removeAttribute(l);break}d=Ms(""+d),n.setAttribute(l,d);break;case"onClick":d!=null&&(n.onclick=we);break;case"onScroll":d!=null&&rt("scroll",n);break;case"onScrollEnd":d!=null&&rt("scrollend",n);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(l=d.__html,l!=null){if(p.children!=null)throw Error(r(60));n.innerHTML=l}}break;case"multiple":n.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":n.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){n.removeAttribute("xlink:href");break}l=Ms(""+d),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(l,""+d):n.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":d===!0?n.setAttribute(l,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(l,d):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?n.setAttribute(l,d):n.removeAttribute(l);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?n.removeAttribute(l):n.setAttribute(l,d);break;case"popover":rt("beforetoggle",n),rt("toggle",n),Cn(n,"popover",d);break;case"xlinkActuate":Kn(n,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Kn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Kn(n,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Kn(n,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Kn(n,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Kn(n,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Kn(n,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Kn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Kn(n,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Cn(n,"is",d);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=is.get(l)||l,Cn(n,l,d))}}function Xf(n,s,l,d,p,x){switch(l){case"style":Nt(n,d,x);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(l=d.__html,l!=null){if(p.children!=null)throw Error(r(60));n.innerHTML=l}}break;case"children":typeof d=="string"?qe(n,d):(typeof d=="number"||typeof d=="bigint")&&qe(n,""+d);break;case"onScroll":d!=null&&rt("scroll",n);break;case"onScrollEnd":d!=null&&rt("scrollend",n);break;case"onClick":d!=null&&(n.onclick=we);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!pr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),s=l.slice(2,p?l.length-7:void 0),x=n[wn]||null,x=x!=null?x[l]:null,typeof x=="function"&&n.removeEventListener(s,x,p),typeof d=="function")){typeof x!="function"&&x!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(s,d,p);break e}l in n?n[l]=d:d===!0?n.setAttribute(l,""):Cn(n,l,d)}}}function Tn(n,s,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",n),rt("load",n);var d=!1,p=!1,x;for(x in l)if(l.hasOwnProperty(x)){var v=l[x];if(v!=null)switch(x){case"src":d=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:St(n,s,x,v,l,null)}}p&&St(n,s,"srcSet",l.srcSet,l,null),d&&St(n,s,"src",l.src,l,null);return;case"input":rt("invalid",n);var R=x=v=p=null,X=null,le=null;for(d in l)if(l.hasOwnProperty(d)){var me=l[d];if(me!=null)switch(d){case"name":p=me;break;case"type":v=me;break;case"checked":X=me;break;case"defaultChecked":le=me;break;case"value":x=me;break;case"defaultValue":R=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,s));break;default:St(n,s,d,me,l,null)}}gr(n,x,R,X,le,v,p,!1);return;case"select":rt("invalid",n),d=v=x=null;for(p in l)if(l.hasOwnProperty(p)&&(R=l[p],R!=null))switch(p){case"value":x=R;break;case"defaultValue":v=R;break;case"multiple":d=R;default:St(n,s,p,R,l,null)}s=x,l=v,n.multiple=!!d,s!=null?xn(n,!!d,s,!1):l!=null&&xn(n,!!d,l,!0);return;case"textarea":rt("invalid",n),x=p=d=null;for(v in l)if(l.hasOwnProperty(v)&&(R=l[v],R!=null))switch(v){case"value":d=R;break;case"defaultValue":p=R;break;case"children":x=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:St(n,s,v,R,l,null)}li(n,d,p,x);return;case"option":for(X in l)if(l.hasOwnProperty(X)&&(d=l[X],d!=null))switch(X){case"selected":n.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:St(n,s,X,d,l,null)}return;case"dialog":rt("beforetoggle",n),rt("toggle",n),rt("cancel",n),rt("close",n);break;case"iframe":case"object":rt("load",n);break;case"video":case"audio":for(d=0;d<$l.length;d++)rt($l[d],n);break;case"image":rt("error",n),rt("load",n);break;case"details":rt("toggle",n);break;case"embed":case"source":case"link":rt("error",n),rt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(le in l)if(l.hasOwnProperty(le)&&(d=l[le],d!=null))switch(le){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:St(n,s,le,d,l,null)}return;default:if(Is(s)){for(me in l)l.hasOwnProperty(me)&&(d=l[me],d!==void 0&&Xf(n,s,me,d,l,void 0));return}}for(R in l)l.hasOwnProperty(R)&&(d=l[R],d!=null&&St(n,s,R,d,l,null))}function a2(n,s,l,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,v=null,R=null,X=null,le=null,me=null;for(ue in l){var xe=l[ue];if(l.hasOwnProperty(ue)&&xe!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":X=xe;default:d.hasOwnProperty(ue)||St(n,s,ue,null,d,xe)}}for(var oe in d){var ue=d[oe];if(xe=l[oe],d.hasOwnProperty(oe)&&(ue!=null||xe!=null))switch(oe){case"type":x=ue;break;case"name":p=ue;break;case"checked":le=ue;break;case"defaultChecked":me=ue;break;case"value":v=ue;break;case"defaultValue":R=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,s));break;default:ue!==xe&&St(n,s,oe,ue,d,xe)}}ol(n,v,R,X,le,me,x,p);return;case"select":ue=v=R=oe=null;for(x in l)if(X=l[x],l.hasOwnProperty(x)&&X!=null)switch(x){case"value":break;case"multiple":ue=X;default:d.hasOwnProperty(x)||St(n,s,x,null,d,X)}for(p in d)if(x=d[p],X=l[p],d.hasOwnProperty(p)&&(x!=null||X!=null))switch(p){case"value":oe=x;break;case"defaultValue":R=x;break;case"multiple":v=x;default:x!==X&&St(n,s,p,x,d,X)}s=R,l=v,d=ue,oe!=null?xn(n,!!l,oe,!1):!!d!=!!l&&(s!=null?xn(n,!!l,s,!0):xn(n,!!l,l?[]:"",!1));return;case"textarea":ue=oe=null;for(R in l)if(p=l[R],l.hasOwnProperty(R)&&p!=null&&!d.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:St(n,s,R,null,d,p)}for(v in d)if(p=d[v],x=l[v],d.hasOwnProperty(v)&&(p!=null||x!=null))switch(v){case"value":oe=p;break;case"defaultValue":ue=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==x&&St(n,s,v,p,d,x)}Vo(n,oe,ue);return;case"option":for(var Me in l)if(oe=l[Me],l.hasOwnProperty(Me)&&oe!=null&&!d.hasOwnProperty(Me))switch(Me){case"selected":n.selected=!1;break;default:St(n,s,Me,null,d,oe)}for(X in d)if(oe=d[X],ue=l[X],d.hasOwnProperty(X)&&oe!==ue&&(oe!=null||ue!=null))switch(X){case"selected":n.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:St(n,s,X,oe,d,ue)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var $e in l)oe=l[$e],l.hasOwnProperty($e)&&oe!=null&&!d.hasOwnProperty($e)&&St(n,s,$e,null,d,oe);for(le in d)if(oe=d[le],ue=l[le],d.hasOwnProperty(le)&&oe!==ue&&(oe!=null||ue!=null))switch(le){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,s));break;default:St(n,s,le,oe,d,ue)}return;default:if(Is(s)){for(var At in l)oe=l[At],l.hasOwnProperty(At)&&oe!==void 0&&!d.hasOwnProperty(At)&&Xf(n,s,At,void 0,d,oe);for(me in d)oe=d[me],ue=l[me],!d.hasOwnProperty(me)||oe===ue||oe===void 0&&ue===void 0||Xf(n,s,me,oe,d,ue);return}}for(var ne in l)oe=l[ne],l.hasOwnProperty(ne)&&oe!=null&&!d.hasOwnProperty(ne)&&St(n,s,ne,null,d,oe);for(xe in d)oe=d[xe],ue=l[xe],!d.hasOwnProperty(xe)||oe===ue||oe==null&&ue==null||St(n,s,xe,oe,d,ue)}function Sb(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function s2(){if(typeof performance.getEntriesByType=="function"){for(var n=0,s=0,l=performance.getEntriesByType("resource"),d=0;d<l.length;d++){var p=l[d],x=p.transferSize,v=p.initiatorType,R=p.duration;if(x&&R&&Sb(v)){for(v=0,R=p.responseEnd,d+=1;d<l.length;d++){var X=l[d],le=X.startTime;if(le>R)break;var me=X.transferSize,xe=X.initiatorType;me&&Sb(xe)&&(X=X.responseEnd,v+=me*(X<R?1:(R-le)/(X-le)))}if(--d,s+=8*(x+v)/(p.duration/1e3),n++,10<n)break}}if(0<n)return s/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Qf=null,Wf=null;function Yu(n){return n.nodeType===9?n:n.ownerDocument}function Ab(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function wb(n,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function Zf(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Jf=null;function r2(){var n=window.event;return n&&n.type==="popstate"?n===Jf?!1:(Jf=n,!0):(Jf=null,!1)}var Cb=typeof setTimeout=="function"?setTimeout:void 0,i2=typeof clearTimeout=="function"?clearTimeout:void 0,kb=typeof Promise=="function"?Promise:void 0,l2=typeof queueMicrotask=="function"?queueMicrotask:typeof kb<"u"?function(n){return kb.resolve(null).then(n).catch(o2)}:Cb;function o2(n){setTimeout(function(){throw n})}function Ws(n){return n==="head"}function Rb(n,s){var l=s,d=0;do{var p=l.nextSibling;if(n.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(d===0){n.removeChild(p),ji(s);return}d--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")d++;else if(l==="html")Yl(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,Yl(l);for(var x=l.firstChild;x;){var v=x.nextSibling,R=x.nodeName;x[hr]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&x.rel.toLowerCase()==="stylesheet"||l.removeChild(x),x=v}}else l==="body"&&Yl(n.ownerDocument.body);l=p}while(l);ji(s)}function Ob(n,s){var l=n;n=0;do{var d=l.nextSibling;if(l.nodeType===1?s?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(s?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(n===0)break;n--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||n++;l=d}while(l)}function em(n){var s=n.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var l=s;switch(s=s.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":em(l),il(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function u2(n,s,l,d){for(;n.nodeType===1;){var p=l;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!d&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(d){if(!n[hr])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(x=n.getAttribute("rel"),x==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(x!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(x=n.getAttribute("src"),(x!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&x&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var x=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===x)return n}else return n;if(n=Ca(n.nextSibling),n===null)break}return null}function c2(n,s,l){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=Ca(n.nextSibling),n===null))return null;return n}function Ib(n,s){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Ca(n.nextSibling),n===null))return null;return n}function tm(n){return n.data==="$?"||n.data==="$~"}function nm(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function d2(n,s){var l=n.ownerDocument;if(n.data==="$~")n._reactRetry=s;else if(n.data!=="$?"||l.readyState!=="loading")s();else{var d=function(){s(),l.removeEventListener("DOMContentLoaded",d)};l.addEventListener("DOMContentLoaded",d),n._reactRetry=d}}function Ca(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return n}var am=null;function Mb(n){n=n.nextSibling;for(var s=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(s===0)return Ca(n.nextSibling);s--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||s++}n=n.nextSibling}return null}function Lb(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(s===0)return n;s--}else l!=="/$"&&l!=="/&"||s++}n=n.previousSibling}return null}function Db(n,s,l){switch(s=Yu(l),n){case"html":if(n=s.documentElement,!n)throw Error(r(452));return n;case"head":if(n=s.head,!n)throw Error(r(453));return n;case"body":if(n=s.body,!n)throw Error(r(454));return n;default:throw Error(r(451))}}function Yl(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);il(n)}var ka=new Map,jb=new Set;function Gu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Ts=F.d;F.d={f:f2,r:m2,D:h2,C:p2,L:g2,m:b2,X:E2,S:x2,M:y2};function f2(){var n=Ts.f(),s=Bu();return n||s}function m2(n){var s=ss(n);s!==null&&s.tag===5&&s.type==="form"?J0(s):Ts.r(n)}var Mi=typeof document>"u"?null:document;function Bb(n,s,l){var d=Mi;if(d&&typeof s=="string"&&s){var p=Vn(s);p='link[rel="'+n+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),jb.has(p)||(jb.add(p),n={rel:n,crossOrigin:l,href:s},d.querySelector(p)===null&&(s=d.createElement("link"),Tn(s,"link",n),en(s),d.head.appendChild(s)))}}function h2(n){Ts.D(n),Bb("dns-prefetch",n,null)}function p2(n,s){Ts.C(n,s),Bb("preconnect",n,s)}function g2(n,s,l){Ts.L(n,s,l);var d=Mi;if(d&&n&&s){var p='link[rel="preload"][as="'+Vn(s)+'"]';s==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+Vn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+Vn(l.imageSizes)+'"]')):p+='[href="'+Vn(n)+'"]';var x=p;switch(s){case"style":x=Li(n);break;case"script":x=Di(n)}ka.has(x)||(n=g({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:n,as:s},l),ka.set(x,n),d.querySelector(p)!==null||s==="style"&&d.querySelector(Gl(x))||s==="script"&&d.querySelector(Kl(x))||(s=d.createElement("link"),Tn(s,"link",n),en(s),d.head.appendChild(s)))}}function b2(n,s){Ts.m(n,s);var l=Mi;if(l&&n){var d=s&&typeof s.as=="string"?s.as:"script",p='link[rel="modulepreload"][as="'+Vn(d)+'"][href="'+Vn(n)+'"]',x=p;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Di(n)}if(!ka.has(x)&&(n=g({rel:"modulepreload",href:n},s),ka.set(x,n),l.querySelector(p)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Kl(x)))return}d=l.createElement("link"),Tn(d,"link",n),en(d),l.head.appendChild(d)}}}function x2(n,s,l){Ts.S(n,s,l);var d=Mi;if(d&&n){var p=Os(d).hoistableStyles,x=Li(n);s=s||"default";var v=p.get(x);if(!v){var R={loading:0,preload:null};if(v=d.querySelector(Gl(x)))R.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":s},l),(l=ka.get(x))&&sm(n,l);var X=v=d.createElement("link");en(X),Tn(X,"link",n),X._p=new Promise(function(le,me){X.onload=le,X.onerror=me}),X.addEventListener("load",function(){R.loading|=1}),X.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Ku(v,s,d)}v={type:"stylesheet",instance:v,count:1,state:R},p.set(x,v)}}}function E2(n,s){Ts.X(n,s);var l=Mi;if(l&&n){var d=Os(l).hoistableScripts,p=Di(n),x=d.get(p);x||(x=l.querySelector(Kl(p)),x||(n=g({src:n,async:!0},s),(s=ka.get(p))&&rm(n,s),x=l.createElement("script"),en(x),Tn(x,"link",n),l.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},d.set(p,x))}}function y2(n,s){Ts.M(n,s);var l=Mi;if(l&&n){var d=Os(l).hoistableScripts,p=Di(n),x=d.get(p);x||(x=l.querySelector(Kl(p)),x||(n=g({src:n,async:!0,type:"module"},s),(s=ka.get(p))&&rm(n,s),x=l.createElement("script"),en(x),Tn(x,"link",n),l.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},d.set(p,x))}}function Pb(n,s,l,d){var p=(p=B.current)?Gu(p):null;if(!p)throw Error(r(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=Li(l.href),l=Os(p).hoistableStyles,d=l.get(s),d||(d={type:"style",instance:null,count:0,state:null},l.set(s,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=Li(l.href);var x=Os(p).hoistableStyles,v=x.get(n);if(v||(p=p.ownerDocument||p,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(n,v),(x=p.querySelector(Gl(n)))&&!x._p&&(v.instance=x,v.state.loading=5),ka.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},ka.set(n,l),x||N2(p,n,l,v.state))),s&&d===null)throw Error(r(528,""));return v}if(s&&d!==null)throw Error(r(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Di(l),l=Os(p).hoistableScripts,d=l.get(s),d||(d={type:"script",instance:null,count:0,state:null},l.set(s,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,n))}}function Li(n){return'href="'+Vn(n)+'"'}function Gl(n){return'link[rel="stylesheet"]['+n+"]"}function Ub(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function N2(n,s,l,d){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?d.loading=1:(s=n.createElement("link"),d.preload=s,s.addEventListener("load",function(){return d.loading|=1}),s.addEventListener("error",function(){return d.loading|=2}),Tn(s,"link",l),en(s),n.head.appendChild(s))}function Di(n){return'[src="'+Vn(n)+'"]'}function Kl(n){return"script[async]"+n}function Hb(n,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var d=n.querySelector('style[data-href~="'+Vn(l.href)+'"]');if(d)return s.instance=d,en(d),d;var p=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return d=(n.ownerDocument||n).createElement("style"),en(d),Tn(d,"style",p),Ku(d,l.precedence,n),s.instance=d;case"stylesheet":p=Li(l.href);var x=n.querySelector(Gl(p));if(x)return s.state.loading|=4,s.instance=x,en(x),x;d=Ub(l),(p=ka.get(p))&&sm(d,p),x=(n.ownerDocument||n).createElement("link"),en(x);var v=x;return v._p=new Promise(function(R,X){v.onload=R,v.onerror=X}),Tn(x,"link",d),s.state.loading|=4,Ku(x,l.precedence,n),s.instance=x;case"script":return x=Di(l.src),(p=n.querySelector(Kl(x)))?(s.instance=p,en(p),p):(d=l,(p=ka.get(x))&&(d=g({},l),rm(d,p)),n=n.ownerDocument||n,p=n.createElement("script"),en(p),Tn(p,"link",d),n.head.appendChild(p),s.instance=p);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(d=s.instance,s.state.loading|=4,Ku(d,l.precedence,n));return s.instance}function Ku(n,s,l){for(var d=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=d.length?d[d.length-1]:null,x=p,v=0;v<d.length;v++){var R=d[v];if(R.dataset.precedence===s)x=R;else if(x!==p)break}x?x.parentNode.insertBefore(n,x.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(n,s.firstChild))}function sm(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function rm(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var Vu=null;function Fb(n,s,l){if(Vu===null){var d=new Map,p=Vu=new Map;p.set(l,d)}else p=Vu,d=p.get(l),d||(d=new Map,p.set(l,d));if(d.has(n))return d;for(d.set(n,null),l=l.getElementsByTagName(n),p=0;p<l.length;p++){var x=l[p];if(!(x[hr]||x[Vt]||n==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var v=x.getAttribute(s)||"";v=n+v;var R=d.get(v);R?R.push(x):d.set(v,[x])}}return d}function zb(n,s,l){n=n.ownerDocument||n,n.head.insertBefore(l,s==="title"?n.querySelector("head > title"):null)}function T2(n,s,l){if(l===1||s.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return n=s.disabled,typeof s.precedence=="string"&&n==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function $b(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function _2(n,s,l,d){if(l.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=Li(d.href),x=s.querySelector(Gl(p));if(x){s=x._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(n.count++,n=Xu.bind(n),s.then(n,n)),l.state.loading|=4,l.instance=x,en(x);return}x=s.ownerDocument||s,d=Ub(d),(p=ka.get(p))&&sm(d,p),x=x.createElement("link"),en(x);var v=x;v._p=new Promise(function(R,X){v.onload=R,v.onerror=X}),Tn(x,"link",d),l.instance=x}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=Xu.bind(n),s.addEventListener("load",l),s.addEventListener("error",l))}}var im=0;function v2(n,s){return n.stylesheets&&n.count===0&&Wu(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var d=setTimeout(function(){if(n.stylesheets&&Wu(n,n.stylesheets),n.unsuspend){var x=n.unsuspend;n.unsuspend=null,x()}},6e4+s);0<n.imgBytes&&im===0&&(im=62500*s2());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Wu(n,n.stylesheets),n.unsuspend)){var x=n.unsuspend;n.unsuspend=null,x()}},(n.imgBytes>im?50:800)+s);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(d),clearTimeout(p)}}:null}function Xu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Qu=null;function Wu(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Qu=new Map,s.forEach(S2,n),Qu=null,Xu.call(n))}function S2(n,s){if(!(s.state.loading&4)){var l=Qu.get(n);if(l)var d=l.get(null);else{l=new Map,Qu.set(n,l);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var v=p[x];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(l.set(v.dataset.precedence,v),d=v)}d&&l.set(null,d)}p=s.instance,v=p.getAttribute("data-precedence"),x=l.get(v)||d,x===d&&l.set(null,p),l.set(v,p),this.count++,d=Xu.bind(this),p.addEventListener("load",d),p.addEventListener("error",d),x?x.parentNode.insertBefore(p,x.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),s.state.loading|=4}}var Vl={$$typeof:k,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function A2(n,s,l,d,p,x,v,R,X){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lt(0),this.hiddenUpdates=Lt(null),this.identifierPrefix=d,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function qb(n,s,l,d,p,x,v,R,X,le,me,xe){return n=new A2(n,s,l,v,X,le,me,xe,R),s=1,x===!0&&(s|=24),x=da(3,null,null,s),n.current=x,x.stateNode=n,s=Pd(),s.refCount++,n.pooledCache=s,s.refCount++,x.memoizedState={element:d,isDehydrated:l,cache:s},zd(x),n}function Yb(n){return n?(n=fi,n):fi}function Gb(n,s,l,d,p,x){p=Yb(p),d.context===null?d.context=p:d.pendingContext=p,d=Hs(s),d.payload={element:l},x=x===void 0?null:x,x!==null&&(d.callback=x),l=Fs(n,d,s),l!==null&&(ea(l,n,s),Al(l,n,s))}function Kb(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<s?l:s}}function lm(n,s){Kb(n,s),(n=n.alternate)&&Kb(n,s)}function Vb(n){if(n.tag===13||n.tag===31){var s=yr(n,67108864);s!==null&&ea(s,n,67108864),lm(n,67108864)}}function Xb(n){if(n.tag===13||n.tag===31){var s=ga();s=Pt(s);var l=yr(n,s);l!==null&&ea(l,n,s),lm(n,s)}}var Zu=!0;function w2(n,s,l,d){var p=G.T;G.T=null;var x=F.p;try{F.p=2,om(n,s,l,d)}finally{F.p=x,G.T=p}}function C2(n,s,l,d){var p=G.T;G.T=null;var x=F.p;try{F.p=8,om(n,s,l,d)}finally{F.p=x,G.T=p}}function om(n,s,l,d){if(Zu){var p=um(d);if(p===null)Vf(n,s,d,Ju,l),Wb(n,d);else if(R2(p,n,s,l,d))d.stopPropagation();else if(Wb(n,d),s&4&&-1<k2.indexOf(n)){for(;p!==null;){var x=ss(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var v=Gn(x.pendingLanes);if(v!==0){var R=x;for(R.pendingLanes|=2,R.entangledLanes|=2;v;){var X=1<<31-Et(v);R.entanglements[1]|=X,v&=~X}Va(x),(xt&6)===0&&(Du=It()+500,zl(0))}}break;case 31:case 13:R=yr(x,2),R!==null&&ea(R,x,2),Bu(),lm(x,2)}if(x=um(d),x===null&&Vf(n,s,d,Ju,l),x===p)break;p=x}p!==null&&d.stopPropagation()}else Vf(n,s,d,null,l)}}function um(n){return n=We(n),cm(n)}var Ju=null;function cm(n){if(Ju=null,n=Pn(n),n!==null){var s=u(n);if(s===null)n=null;else{var l=s.tag;if(l===13){if(n=c(s),n!==null)return n;n=null}else if(l===31){if(n=f(s),n!==null)return n;n=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return Ju=n,null}function Qb(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Jr()){case fe:return 2;case Ae:return 8;case ze:case tt:return 32;case pt:return 268435456;default:return 32}default:return 32}}var dm=!1,Zs=null,Js=null,er=null,Xl=new Map,Ql=new Map,tr=[],k2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Wb(n,s){switch(n){case"focusin":case"focusout":Zs=null;break;case"dragenter":case"dragleave":Js=null;break;case"mouseover":case"mouseout":er=null;break;case"pointerover":case"pointerout":Xl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ql.delete(s.pointerId)}}function Wl(n,s,l,d,p,x){return n===null||n.nativeEvent!==x?(n={blockedOn:s,domEventName:l,eventSystemFlags:d,nativeEvent:x,targetContainers:[p]},s!==null&&(s=ss(s),s!==null&&Vb(s)),n):(n.eventSystemFlags|=d,s=n.targetContainers,p!==null&&s.indexOf(p)===-1&&s.push(p),n)}function R2(n,s,l,d,p){switch(s){case"focusin":return Zs=Wl(Zs,n,s,l,d,p),!0;case"dragenter":return Js=Wl(Js,n,s,l,d,p),!0;case"mouseover":return er=Wl(er,n,s,l,d,p),!0;case"pointerover":var x=p.pointerId;return Xl.set(x,Wl(Xl.get(x)||null,n,s,l,d,p)),!0;case"gotpointercapture":return x=p.pointerId,Ql.set(x,Wl(Ql.get(x)||null,n,s,l,d,p)),!0}return!1}function Zb(n){var s=Pn(n.target);if(s!==null){var l=u(s);if(l!==null){if(s=l.tag,s===13){if(s=c(l),s!==null){n.blockedOn=s,ni(n.priority,function(){Xb(l)});return}}else if(s===31){if(s=f(l),s!==null){n.blockedOn=s,ni(n.priority,function(){Xb(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function ec(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var l=um(n.nativeEvent);if(l===null){l=n.nativeEvent;var d=new l.constructor(l.type,l);Be=d,l.target.dispatchEvent(d),Be=null}else return s=ss(l),s!==null&&Vb(s),n.blockedOn=l,!1;s.shift()}return!0}function Jb(n,s,l){ec(n)&&l.delete(s)}function O2(){dm=!1,Zs!==null&&ec(Zs)&&(Zs=null),Js!==null&&ec(Js)&&(Js=null),er!==null&&ec(er)&&(er=null),Xl.forEach(Jb),Ql.forEach(Jb)}function tc(n,s){n.blockedOn===s&&(n.blockedOn=null,dm||(dm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,O2)))}var nc=null;function ex(n){nc!==n&&(nc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){nc===n&&(nc=null);for(var s=0;s<n.length;s+=3){var l=n[s],d=n[s+1],p=n[s+2];if(typeof d!="function"){if(cm(d||l)===null)continue;break}var x=ss(l);x!==null&&(n.splice(s,3),s-=3,uf(x,{pending:!0,data:p,method:l.method,action:d},d,p))}}))}function ji(n){function s(X){return tc(X,n)}Zs!==null&&tc(Zs,n),Js!==null&&tc(Js,n),er!==null&&tc(er,n),Xl.forEach(s),Ql.forEach(s);for(var l=0;l<tr.length;l++){var d=tr[l];d.blockedOn===n&&(d.blockedOn=null)}for(;0<tr.length&&(l=tr[0],l.blockedOn===null);)Zb(l),l.blockedOn===null&&tr.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(d=0;d<l.length;d+=3){var p=l[d],x=l[d+1],v=p[wn]||null;if(typeof x=="function")v||ex(l);else if(v){var R=null;if(x&&x.hasAttribute("formAction")){if(p=x,v=x[wn]||null)R=v.formAction;else if(cm(p)!==null)continue}else R=v.action;typeof R=="function"?l[d+1]=R:(l.splice(d,3),d-=3),ex(l)}}}function tx(){function n(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(v){return p=v})},focusReset:"manual",scroll:"manual"})}function s(){p!==null&&(p(),p=null),d||setTimeout(l,20)}function l(){if(!d&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(l,100),function(){d=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),p!==null&&(p(),p=null)}}}function fm(n){this._internalRoot=n}ac.prototype.render=fm.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(r(409));var l=s.current,d=ga();Gb(l,d,n,s,null,null)},ac.prototype.unmount=fm.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;Gb(n.current,2,null,n,null,null),Bu(),s[ks]=null}};function ac(n){this._internalRoot=n}ac.prototype.unstable_scheduleHydration=function(n){if(n){var s=ti();n={blockedOn:null,target:n,priority:s};for(var l=0;l<tr.length&&s!==0&&s<tr[l].priority;l++);tr.splice(l,0,n),l===0&&Zb(n)}};var nx=t.version;if(nx!=="19.2.8")throw Error(r(527,nx,"19.2.8"));F.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=h(s),n=n!==null?b(n):null,n=n===null?null:n.stateNode,n};var I2={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sc.isDisabled&&sc.supportsFiber)try{bn=sc.inject(I2),$t=sc}catch{}}return Jl.createRoot=function(n,s){if(!o(n))throw Error(r(299));var l=!1,d="",p=ug,x=cg,v=dg;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(p=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=qb(n,1,!1,null,null,l,d,null,p,x,v,tx),n[ks]=s.current,Kf(n),new fm(s)},Jl.hydrateRoot=function(n,s,l){if(!o(n))throw Error(r(299));var d=!1,p="",x=ug,v=cg,R=dg,X=null;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(x=l.onUncaughtError),l.onCaughtError!==void 0&&(v=l.onCaughtError),l.onRecoverableError!==void 0&&(R=l.onRecoverableError),l.formState!==void 0&&(X=l.formState)),s=qb(n,1,!0,s,l??null,d,p,X,x,v,R,tx),s.context=Yb(null),l=s.current,d=ga(),d=Pt(d),p=Hs(d),p.callback=null,Fs(l,p,d),l=d,s.current.lanes=l,Ct(s,l),Va(s),n[ks]=s.current,Kf(n),new ac(s)},Jl.version="19.2.8",Jl}var fx;function q2(){if(fx)return pm.exports;fx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),pm.exports=$2(),pm.exports}var Y2=q2();/**
|
|
50
|
-
* react-router v7.18.1
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/var Mh=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ty=/^[\\/]{2}/;function G2(e,t){return t+e.replace(/\\/g,"/")}var mx="popstate";function hx(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function K2(e={}){function t(r,o){var h;let u=(h=o.state)==null?void 0:h.masked,{pathname:c,search:f,hash:m}=u||r.location;return nh("",{pathname:c,search:f,hash:m},o.state&&o.state.usr||null,o.state&&o.state.key||"default",u?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function a(r,o){return typeof o=="string"?o:Eo(o)}return X2(t,a,null,e)}function Ft(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ia(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function V2(){return Math.random().toString(36).substring(2,10)}function px(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function nh(e,t,a=null,r,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Wi(t):t,state:a,key:t&&t.key||r||V2(),mask:o}}function Eo({pathname:e="/",search:t="",hash:a=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function Wi(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function X2(e,t,a,r={}){let{window:o=document.defaultView,v5Compat:u=!1}=r,c=o.history,f="POP",m=null,h=b();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function b(){return(c.state||{idx:null}).idx}function g(){f="POP";let w=b(),_=w==null?null:w-h;h=w,m&&m({action:f,location:A.location,delta:_})}function y(w,_){f="PUSH";let M=hx(w)?w:nh(A.location,w,_);h=b()+1;let k=px(M,h),L=A.createHref(M.mask||M);try{c.pushState(k,"",L)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;o.location.assign(L)}u&&m&&m({action:f,location:A.location,delta:1})}function N(w,_){f="REPLACE";let M=hx(w)?w:nh(A.location,w,_);h=b();let k=px(M,h),L=A.createHref(M.mask||M);c.replaceState(k,"",L),u&&m&&m({action:f,location:A.location,delta:0})}function S(w){return Q2(o,w)}let A={get action(){return f},get location(){return e(o,c)},listen(w){if(m)throw new Error("A history only accepts one active listener");return o.addEventListener(mx,g),m=w,()=>{o.removeEventListener(mx,g),m=null}},createHref(w){return t(o,w)},createURL:S,encodeLocation(w){let _=S(w);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:y,replace:N,go(w){return c.go(w)}};return A}function Q2(e,t,a=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),Ft(r,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Eo(t);return o=o.replace(/ $/,"%20"),!a&&ty.test(o)&&(o=r+o),new URL(o,r)}function ny(e,t,a="/"){return W2(e,t,a,!1)}function W2(e,t,a,r,o){let u=typeof t=="string"?Wi(t):t,c=As(u.pathname||"/",a);if(c==null)return null;let f=Z2(e),m=null,h=uS(c);for(let b=0;m==null&&b<f.length;++b)m=oS(f[b],h,r);return m}function Z2(e){let t=ay(e);return J2(t),t}function ay(e,t=[],a=[],r="",o=!1){let u=(c,f,m=o,h)=>{let b={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(r)&&m)return;Ft(b.relativePath.startsWith(r),`Absolute route path "${b.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(r.length)}let g=Ha([r,b.relativePath]),y=a.concat(b);c.children&&c.children.length>0&&(Ft(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),ay(c.children,t,y,g,m)),!(c.path==null&&!c.index)&&t.push({path:g,score:iS(g,c.index),routesMeta:y.map((N,S)=>{let[A,w]=iy(N.relativePath,N.caseSensitive,S===y.length-1);return{...N,matcher:A,compiledParams:w}})})};return e.forEach((c,f)=>{var m;if(c.path===""||!((m=c.path)!=null&&m.includes("?")))u(c,f);else for(let h of sy(c.path))u(c,f,!0,h)}),t}function sy(e){let t=e.split("/");if(t.length===0)return[];let[a,...r]=t,o=a.endsWith("?"),u=a.replace(/\?$/,"");if(r.length===0)return o?[u,""]:[u];let c=sy(r.join("/")),f=[];return f.push(...c.map(m=>m===""?u:[u,m].join("/"))),o&&f.push(...c),f.map(m=>e.startsWith("/")&&m===""?"/":m)}function J2(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:lS(t.routesMeta.map(r=>r.childrenIndex),a.routesMeta.map(r=>r.childrenIndex)))}var eS=/^:[\w-]+$/,tS=3,nS=2,aS=1,sS=10,rS=-2,gx=e=>e==="*";function iS(e,t){let a=e.split("/"),r=a.length;return a.some(gx)&&(r+=rS),t&&(r+=nS),a.filter(o=>!gx(o)).reduce((o,u)=>o+(eS.test(u)?tS:u===""?aS:sS),r)}function lS(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function oS(e,t,a=!1){let{routesMeta:r}=e,o={},u="/",c=[];for(let f=0;f<r.length;++f){let m=r[f],h=f===r.length-1,b=u==="/"?t:t.slice(u.length)||"/",g={path:m.relativePath,caseSensitive:m.caseSensitive,end:h},y=m.matcher&&m.compiledParams?ry(g,b,m.matcher,m.compiledParams):vc(g,b),N=m.route;if(!y&&h&&a&&!r[r.length-1].route.index&&(y=vc({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},b)),!y)return null;Object.assign(o,y.params),c.push({params:o,pathname:Ha([u,y.pathname]),pathnameBase:fS(Ha([u,y.pathnameBase])),route:N}),y.pathnameBase!=="/"&&(u=Ha([u,y.pathnameBase]))}return c}function vc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,r]=iy(e.path,e.caseSensitive,e.end);return ry(e,t,a,r)}function ry(e,t,a,r){let o=t.match(a);if(!o)return null;let u=o[0],c=u.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:r.reduce((h,{paramName:b,isOptional:g},y)=>{if(b==="*"){let S=f[y]||"";c=u.slice(0,u.length-S.length).replace(/(.)\/+$/,"$1")}const N=f[y];return g&&!N?h[b]=void 0:h[b]=(N||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:c,pattern:e}}function iy(e,t=!1,a=!0){Ia(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,m,h,b)=>{if(r.push({paramName:f,isOptional:m!=null}),m){let g=b.charAt(h+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function uS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ia(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function As(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,r=e.charAt(a);return r&&r!=="/"?null:e.slice(a)||"/"}function cS(e,t="/"){let{pathname:a,search:r="",hash:o=""}=typeof e=="string"?Wi(e):e,u;return a?(a=ly(a),a.startsWith("/")?u=bx(a.substring(1),"/"):u=bx(a,t)):u=t,{pathname:u,search:mS(r),hash:hS(o)}}function bx(e,t){let a=Sc(t).split("/");return e.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function Em(e,t,a,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function dS(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function Lh(e){let t=dS(e);return t.map((a,r)=>r===t.length-1?a.pathname:a.pathnameBase)}function Yc(e,t,a,r=!1){let o;typeof e=="string"?o=Wi(e):(o={...e},Ft(!o.pathname||!o.pathname.includes("?"),Em("?","pathname","search",o)),Ft(!o.pathname||!o.pathname.includes("#"),Em("#","pathname","hash",o)),Ft(!o.search||!o.search.includes("#"),Em("#","search","hash",o)));let u=e===""||o.pathname==="",c=u?"/":o.pathname,f;if(c==null)f=a;else{let g=t.length-1;if(!r&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),g-=1;o.pathname=y.join("/")}f=g>=0?t[g]:"/"}let m=cS(o,f),h=c&&c!=="/"&&c.endsWith("/"),b=(u||c===".")&&a.endsWith("/");return!m.pathname.endsWith("/")&&(h||b)&&(m.pathname+="/"),m}var ly=e=>e.replace(/[\\/]{2,}/g,"/"),Ha=e=>ly(e.join("/")),Sc=e=>e.replace(/\/+$/,""),fS=e=>Sc(e).replace(/^\/*/,"/"),mS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,pS=class{constructor(e,t,a,r=!1){this.status=e,this.statusText=t||"",this.internal=r,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function gS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bS(e){let t=e.map(a=>a.route.path).filter(Boolean);return Ha(t)||"/"}var oy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function uy(e,t){let a=e;if(typeof a!="string"||!Mh.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let r=a,o=!1;if(oy)try{let u=new URL(window.location.href),c=ty.test(a)?new URL(G2(a,u.protocol)):new URL(a),f=As(c.pathname,t);c.origin===u.origin&&f!=null?a=f+c.search+c.hash:o=!0}catch{Ia(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var cy=["POST","PUT","PATCH","DELETE"];new Set(cy);var xS=["GET",...cy];new Set(xS);var ES=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function yS(e){try{return ES.includes(new URL(e).protocol)}catch{return!1}}var Zi=T.createContext(null);Zi.displayName="DataRouter";var Gc=T.createContext(null);Gc.displayName="DataRouterState";var dy=T.createContext(!1);function NS(){return T.useContext(dy)}var fy=T.createContext({isTransitioning:!1});fy.displayName="ViewTransition";var TS=T.createContext(new Map);TS.displayName="Fetchers";var _S=T.createContext(null);_S.displayName="Await";var Ea=T.createContext(null);Ea.displayName="Navigation";var ko=T.createContext(null);ko.displayName="Location";var La=T.createContext({outlet:null,matches:[],isDataRoute:!1});La.displayName="Route";var Dh=T.createContext(null);Dh.displayName="RouteError";var my="REACT_ROUTER_ERROR",vS="REDIRECT",SS="ROUTE_ERROR_RESPONSE";function AS(e){if(e.startsWith(`${my}:${vS}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function wS(e){if(e.startsWith(`${my}:${SS}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new pS(t.status,t.statusText,t.data)}catch{}}function CS(e,{relative:t}={}){Ft(Ji(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:r}=T.useContext(Ea),{hash:o,pathname:u,search:c}=Ro(e,{relative:t}),f=u;return a!=="/"&&(f=u==="/"?a:Ha([a,u])),r.createHref({pathname:f,search:c,hash:o})}function Ji(){return T.useContext(ko)!=null}function vn(){return Ft(Ji(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(ko).location}var hy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function py(e){T.useContext(Ea).static||T.useLayoutEffect(e)}function Sn(){let{isDataRoute:e}=T.useContext(La);return e?$S():kS()}function kS(){Ft(Ji(),"useNavigate() may be used only in the context of a <Router> component.");let e=T.useContext(Zi),{basename:t,navigator:a}=T.useContext(Ea),{matches:r}=T.useContext(La),{pathname:o}=vn(),u=JSON.stringify(Lh(r)),c=T.useRef(!1);return py(()=>{c.current=!0}),T.useCallback((m,h={})=>{if(Ia(c.current,hy),!c.current)return;if(typeof m=="number"){a.go(m);return}let b=Yc(m,JSON.parse(u),o,h.relative==="path");e==null&&t!=="/"&&(b.pathname=b.pathname==="/"?t:Ha([t,b.pathname])),(h.replace?a.replace:a.push)(b,h.state,h)},[t,a,u,o,e])}var RS=T.createContext(null);function OS(e){let t=T.useContext(La).outlet;return T.useMemo(()=>t&&T.createElement(RS.Provider,{value:e},t),[t,e])}function gy(){let{matches:e}=T.useContext(La),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Ro(e,{relative:t}={}){let{matches:a}=T.useContext(La),{pathname:r}=vn(),o=JSON.stringify(Lh(a));return T.useMemo(()=>Yc(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function IS(e,t){return by(e,t)}function by(e,t,a){var w;Ft(Ji(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=T.useContext(Ea),{matches:o}=T.useContext(La),u=o[o.length-1],c=u?u.params:{},f=u?u.pathname:"/",m=u?u.pathnameBase:"/",h=u&&u.route;{let _=h&&h.path||"";Ey(f,!h||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
-
|
|
60
|
-
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let b=vn(),g;if(t){let _=typeof t=="string"?Wi(t):t;Ft(m==="/"||((w=_.pathname)==null?void 0:w.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${_.pathname}" was given in the \`location\` prop.`),g=_}else g=b;let y=g.pathname||"/",N=y;if(m!=="/"){let _=m.replace(/^\//,"").split("/");N="/"+y.replace(/^\//,"").split("/").slice(_.length).join("/")}let S=a&&a.state.matches.length?a.state.matches.map(_=>Object.assign(_,{route:a.manifest[_.route.id]||_.route})):ny(e,{pathname:N});Ia(h||S!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ia(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=BS(S&&S.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Ha([m,r.encodeLocation?r.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?m:Ha([m,r.encodeLocation?r.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),o,a);return t&&A?T.createElement(ko.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},A):A}function MS(){let e=zS(),t=gS(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},u={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:u},"ErrorBoundary")," or"," ",T.createElement("code",{style:u},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),a?T.createElement("pre",{style:o},a):null,c)}var LS=T.createElement(MS,null),xy=class extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=wS(e.digest);a&&(e=a)}let t=e!==void 0?T.createElement(La.Provider,{value:this.props.routeContext},T.createElement(Dh.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?T.createElement(DS,{error:e},t):t}};xy.contextType=dy;var ym=new WeakMap;function DS({children:e,error:t}){let{basename:a}=T.useContext(Ea);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=AS(t.digest);if(r){let o=ym.get(t);if(o)throw o;let u=uy(r.location,a),c=u.absoluteURL||u.to;if(yS(c))throw new Error("Invalid redirect location");if(oy&&!ym.get(t))if(u.isExternal||r.reloadDocument)window.location.href=c;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:r.replace}));throw ym.set(t,f),f}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c}`})}}return e}function jS({routeContext:e,match:t,children:a}){let r=T.useContext(Zi);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),T.createElement(La.Provider,{value:e},a)}function BS(e,t=[],a){let r=a==null?void 0:a.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,u=r==null?void 0:r.errors;if(u!=null){let b=o.findIndex(g=>g.route.id&&(u==null?void 0:u[g.route.id])!==void 0);Ft(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),o=o.slice(0,Math.min(o.length,b+1))}let c=!1,f=-1;if(a&&r){c=r.renderFallback;for(let b=0;b<o.length;b++){let g=o[b];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=b),g.route.id){let{loaderData:y,errors:N}=r,S=g.route.loader&&!y.hasOwnProperty(g.route.id)&&(!N||N[g.route.id]===void 0);if(g.route.lazy||S){a.isStatic&&(c=!0),f>=0?o=o.slice(0,f+1):o=[o[0]];break}}}}let m=a==null?void 0:a.onError,h=r&&m?(b,g)=>{var y,N;m(b,{location:r.location,params:((N=(y=r.matches)==null?void 0:y[0])==null?void 0:N.params)??{},pattern:bS(r.matches),errorInfo:g})}:void 0;return o.reduceRight((b,g,y)=>{let N,S=!1,A=null,w=null;r&&(N=u&&g.route.id?u[g.route.id]:void 0,A=g.route.errorElement||LS,c&&(f<0&&y===0?(Ey("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,w=null):f===y&&(S=!0,w=g.route.hydrateFallbackElement||null)));let _=t.concat(o.slice(0,y+1)),M=()=>{let k;return N?k=A:S?k=w:g.route.Component?k=T.createElement(g.route.Component,null):g.route.element?k=g.route.element:k=b,T.createElement(jS,{match:g,routeContext:{outlet:b,matches:_,isDataRoute:r!=null},children:k})};return r&&(g.route.ErrorBoundary||g.route.errorElement||y===0)?T.createElement(xy,{location:r.location,revalidation:r.revalidation,component:A,error:N,children:M(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:h}):M()},null)}function jh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function PS(e){let t=T.useContext(Zi);return Ft(t,jh(e)),t}function US(e){let t=T.useContext(Gc);return Ft(t,jh(e)),t}function HS(e){let t=T.useContext(La);return Ft(t,jh(e)),t}function Bh(e){let t=HS(e),a=t.matches[t.matches.length-1];return Ft(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function FS(){return Bh("useRouteId")}function zS(){var r;let e=T.useContext(Dh),t=US("useRouteError"),a=Bh("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[a]}function $S(){let{router:e}=PS("useNavigate"),t=Bh("useNavigate"),a=T.useRef(!1);return py(()=>{a.current=!0}),T.useCallback(async(o,u={})=>{Ia(a.current,hy),a.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...u}))},[e,t])}var xx={};function Ey(e,t,a){!t&&!xx[e]&&(xx[e]=!0,Ia(!1,a))}T.memo(qS);function qS({routes:e,manifest:t,future:a,state:r,isStatic:o,onError:u}){return by(e,void 0,{manifest:t,state:r,isStatic:o,onError:u})}function qi({to:e,replace:t,state:a,relative:r}){Ft(Ji(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=T.useContext(Ea);Ia(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=T.useContext(La),{pathname:c}=vn(),f=Sn(),m=Yc(e,Lh(u),c,r==="path"),h=JSON.stringify(m);return T.useEffect(()=>{f(JSON.parse(h),{replace:t,state:a,relative:r})},[f,h,r,t,a]),null}function YS(e){return OS(e.context)}function na(e){Ft(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function GS({basename:e="/",children:t=null,location:a,navigationType:r="POP",navigator:o,static:u=!1,useTransitions:c}){Ft(!Ji(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),m=T.useMemo(()=>({basename:f,navigator:o,static:u,useTransitions:c,future:{}}),[f,o,u,c]);typeof a=="string"&&(a=Wi(a));let{pathname:h="/",search:b="",hash:g="",state:y=null,key:N="default",mask:S}=a,A=T.useMemo(()=>{let w=As(h,f);return w==null?null:{location:{pathname:w,search:b,hash:g,state:y,key:N,mask:S},navigationType:r}},[f,h,b,g,y,N,r,S]);return Ia(A!=null,`<Router basename="${f}"> is not able to match the URL "${h}${b}${g}" because it does not start with the basename, so the <Router> won't render anything.`),A==null?null:T.createElement(Ea.Provider,{value:m},T.createElement(ko.Provider,{children:t,value:A}))}function KS({children:e,location:t}){return IS(ah(e),t)}function ah(e,t=[]){let a=[];return T.Children.forEach(e,(r,o)=>{if(!T.isValidElement(r))return;let u=[...t,o];if(r.type===T.Fragment){a.push.apply(a,ah(r.props.children,u));return}Ft(r.type===na,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ft(!r.props.index||!r.props.children,"An index route cannot have child routes.");let c={id:r.props.id||u.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(c.children=ah(r.props.children,u)),a.push(c)}),a}var bc="get",xc="application/x-www-form-urlencoded";function Kc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function VS(e){return Kc(e)&&e.tagName.toLowerCase()==="button"}function XS(e){return Kc(e)&&e.tagName.toLowerCase()==="form"}function QS(e){return Kc(e)&&e.tagName.toLowerCase()==="input"}function WS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ZS(e,t){return e.button===0&&(!t||t==="_self")&&!WS(e)}function sh(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,a)=>{let r=e[a];return t.concat(Array.isArray(r)?r.map(o=>[a,o]):[[a,r]])},[]))}function JS(e,t){let a=sh(e);return t&&t.forEach((r,o)=>{a.has(o)||t.getAll(o).forEach(u=>{a.append(o,u)})}),a}var ic=null;function e3(){if(ic===null)try{new FormData(document.createElement("form"),0),ic=!1}catch{ic=!0}return ic}var t3=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Nm(e){return e!=null&&!t3.has(e)?(Ia(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xc}"`),null):e}function n3(e,t){let a,r,o,u,c;if(XS(e)){let f=e.getAttribute("action");r=f?As(f,t):null,a=e.getAttribute("method")||bc,o=Nm(e.getAttribute("enctype"))||xc,u=new FormData(e)}else if(VS(e)||QS(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=e.getAttribute("formaction")||f.getAttribute("action");if(r=m?As(m,t):null,a=e.getAttribute("formmethod")||f.getAttribute("method")||bc,o=Nm(e.getAttribute("formenctype"))||Nm(f.getAttribute("enctype"))||xc,u=new FormData(f,e),!e3()){let{name:h,type:b,value:g}=e;if(b==="image"){let y=h?`${h}.`:"";u.append(`${y}x`,"0"),u.append(`${y}y`,"0")}else h&&u.append(h,g)}}else{if(Kc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=bc,r=null,o=xc,c=e}return u&&o==="text/plain"&&(c=u,u=void 0),{action:r,method:a.toLowerCase(),encType:o,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ph(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yy(e,t,a,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&As(o.pathname,t)==="/"?o.pathname=`${Sc(t)}/_root.${r}`:o.pathname=`${Sc(o.pathname)}.${r}`,o}async function a3(e,t){if(e.id in t)return t[e.id];try{let a=await import(e.module);return t[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function s3(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function r3(e,t,a){let r=await Promise.all(e.map(async o=>{let u=t.routes[o.route.id];if(u){let c=await a3(u,a);return c.links?c.links():[]}return[]}));return u3(r.flat(1).filter(s3).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Ex(e,t,a,r,o,u){let c=(m,h)=>a[h]?m.route.id!==a[h].route.id:!0,f=(m,h)=>{var b;return a[h].pathname!==m.pathname||((b=a[h].route.path)==null?void 0:b.endsWith("*"))&&a[h].params["*"]!==m.params["*"]};return u==="assets"?t.filter((m,h)=>c(m,h)||f(m,h)):u==="data"?t.filter((m,h)=>{var g;let b=r.routes[m.route.id];if(!b||!b.hasLoader)return!1;if(c(m,h)||f(m,h))return!0;if(m.route.shouldRevalidate){let y=m.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((g=a[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function i3(e,t,{includeHydrateFallback:a}={}){return l3(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),a&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function l3(e){return[...new Set(e)]}function o3(e){let t={},a=Object.keys(e).sort();for(let r of a)t[r]=e[r];return t}function u3(e,t){let a=new Set;return new Set(t),e.reduce((r,o)=>{let u=JSON.stringify(o3(o));return a.has(u)||(a.add(u),r.push({key:u,link:o})),r},[])}function Uh(){let e=T.useContext(Zi);return Ph(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function c3(){let e=T.useContext(Gc);return Ph(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Hh=T.createContext(void 0);Hh.displayName="FrameworkContext";function Vc(){let e=T.useContext(Hh);return Ph(e,"You must render this element inside a <HydratedRouter> element"),e}function d3(e,t){let a=T.useContext(Hh),[r,o]=T.useState(!1),[u,c]=T.useState(!1),{onFocus:f,onBlur:m,onMouseEnter:h,onMouseLeave:b,onTouchStart:g}=t,y=T.useRef(null);T.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let A=_=>{_.forEach(M=>{c(M.isIntersecting)})},w=new IntersectionObserver(A,{threshold:.5});return y.current&&w.observe(y.current),()=>{w.disconnect()}}},[e]),T.useEffect(()=>{if(r){let A=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(A)}}},[r]);let N=()=>{o(!0)},S=()=>{o(!1),c(!1)};return a?e!=="intent"?[u,y,{}]:[u,y,{onFocus:eo(f,N),onBlur:eo(m,S),onMouseEnter:eo(h,N),onMouseLeave:eo(b,S),onTouchStart:eo(g,N)}]:[!1,y,{}]}function eo(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function f3({page:e,...t}){let a=NS(),{nonce:r}=Vc(),{router:o}=Uh(),u=T.useMemo(()=>ny(o.routes,e,o.basename),[o.routes,e,o.basename]);return u?(t.nonce==null&&r&&(t={...t,nonce:r}),a?T.createElement(h3,{page:e,matches:u,...t}):T.createElement(p3,{page:e,matches:u,...t})):null}function m3(e){let{manifest:t,routeModules:a}=Vc(),[r,o]=T.useState([]);return T.useEffect(()=>{let u=!1;return r3(e,t,a).then(c=>{u||o(c)}),()=>{u=!0}},[e,t,a]),r}function h3({page:e,matches:t,...a}){let r=vn(),{future:o}=Vc(),{basename:u}=Uh(),c=T.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let f=yy(e,u,o.v8_trailingSlashAwareDataRequests,"rsc"),m=!1,h=[];for(let b of t)typeof b.route.shouldRevalidate=="function"?m=!0:h.push(b.route.id);return m&&h.length>0&&f.searchParams.set("_routes",h.join(",")),[f.pathname+f.search]},[u,o.v8_trailingSlashAwareDataRequests,e,r,t]);return T.createElement(T.Fragment,null,c.map(f=>T.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...a})))}function p3({page:e,matches:t,...a}){let r=vn(),{future:o,manifest:u,routeModules:c}=Vc(),{basename:f}=Uh(),{loaderData:m,matches:h}=c3(),b=T.useMemo(()=>Ex(e,t,h,u,r,"data"),[e,t,h,u,r]),g=T.useMemo(()=>Ex(e,t,h,u,r,"assets"),[e,t,h,u,r]),y=T.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let A=new Set,w=!1;if(t.forEach(M=>{var L;let k=u.routes[M.route.id];!k||!k.hasLoader||(!b.some(O=>O.route.id===M.route.id)&&M.route.id in m&&((L=c[M.route.id])!=null&&L.shouldRevalidate)||k.hasClientLoader?w=!0:A.add(M.route.id))}),A.size===0)return[];let _=yy(e,f,o.v8_trailingSlashAwareDataRequests,"data");return w&&A.size>0&&_.searchParams.set("_routes",t.filter(M=>A.has(M.route.id)).map(M=>M.route.id).join(",")),[_.pathname+_.search]},[f,o.v8_trailingSlashAwareDataRequests,m,r,u,b,t,e,c]),N=T.useMemo(()=>i3(g,u),[g,u]),S=m3(g);return T.createElement(T.Fragment,null,y.map(A=>T.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...a})),N.map(A=>T.createElement("link",{key:A,rel:"modulepreload",href:A,...a})),S.map(({key:A,link:w})=>T.createElement("link",{key:A,nonce:a.nonce,...w,crossOrigin:w.crossOrigin??a.crossOrigin})))}function g3(...e){return t=>{e.forEach(a=>{typeof a=="function"?a(t):a!=null&&(a.current=t)})}}var b3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{b3&&(window.__reactRouterVersion="7.18.1")}catch{}function x3({basename:e,children:t,useTransitions:a,window:r}){let o=T.useRef();o.current==null&&(o.current=K2({window:r,v5Compat:!0}));let u=o.current,[c,f]=T.useState({action:u.action,location:u.location}),m=T.useCallback(h=>{a===!1?f(h):T.startTransition(()=>f(h))},[a]);return T.useLayoutEffect(()=>u.listen(m),[u,m]),T.createElement(GS,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:u,useTransitions:a})}var Ny=T.forwardRef(function({onClick:t,discover:a="render",prefetch:r="none",relative:o,reloadDocument:u,replace:c,mask:f,state:m,target:h,to:b,preventScrollReset:g,viewTransition:y,defaultShouldRevalidate:N,...S},A){let{basename:w,navigator:_,useTransitions:M}=T.useContext(Ea),k=typeof b=="string"&&Mh.test(b),L=uy(b,w);b=L.to;let O=CS(b,{relative:o}),P=vn(),z=null;if(f){let K=Yc(f,[],P.mask?P.mask.pathname:"/",!0);w!=="/"&&(K.pathname=K.pathname==="/"?w:Ha([w,K.pathname])),z=_.createHref(K)}let[J,V,j]=d3(r,S),ee=N3(b,{replace:c,mask:f,state:m,target:h,preventScrollReset:g,relative:o,viewTransition:y,defaultShouldRevalidate:N,useTransitions:M});function se(K){t&&t(K),K.defaultPrevented||ee(K)}let he=!(L.isExternal||u),te=T.createElement("a",{...S,...j,href:(he?z:void 0)||L.absoluteURL||O,onClick:he?se:t,ref:g3(A,V),target:h,"data-discover":!k&&a==="render"?"true":void 0});return J&&!k?T.createElement(T.Fragment,null,te,T.createElement(f3,{page:O})):te});Ny.displayName="Link";var Ac=T.forwardRef(function({"aria-current":t="page",caseSensitive:a=!1,className:r="",end:o=!1,style:u,to:c,viewTransition:f,children:m,...h},b){let g=Ro(c,{relative:h.relative}),y=vn(),N=T.useContext(Gc),{navigator:S,basename:A}=T.useContext(Ea),w=N!=null&&A3(g)&&f===!0,_=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,M=y.pathname,k=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;a||(M=M.toLowerCase(),k=k?k.toLowerCase():null,_=_.toLowerCase()),k&&A&&(k=As(k,A)||k);const L=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let O=M===_||!o&&M.startsWith(_)&&M.charAt(L)==="/",P=k!=null&&(k===_||!o&&k.startsWith(_)&&k.charAt(_.length)==="/"),z={isActive:O,isPending:P,isTransitioning:w},J=O?t:void 0,V;typeof r=="function"?V=r(z):V=[r,O?"active":null,P?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let j=typeof u=="function"?u(z):u;return T.createElement(Ny,{...h,"aria-current":J,className:V,ref:b,style:j,to:c,viewTransition:f},typeof m=="function"?m(z):m)});Ac.displayName="NavLink";var E3=T.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:r,replace:o,state:u,method:c=bc,action:f,onSubmit:m,relative:h,preventScrollReset:b,viewTransition:g,defaultShouldRevalidate:y,...N},S)=>{let{useTransitions:A}=T.useContext(Ea),w=v3(),_=S3(f,{relative:h}),M=c.toLowerCase()==="get"?"get":"post",k=typeof f=="string"&&Mh.test(f),L=O=>{if(m&&m(O),O.defaultPrevented)return;O.preventDefault();let P=O.nativeEvent.submitter,z=(P==null?void 0:P.getAttribute("formmethod"))||c,J=()=>w(P||O.currentTarget,{fetcherKey:t,method:z,navigate:a,replace:o,state:u,relative:h,preventScrollReset:b,viewTransition:g,defaultShouldRevalidate:y});A&&a!==!1?T.startTransition(()=>J()):J()};return T.createElement("form",{ref:S,method:M,action:_,onSubmit:r?m:L,...N,"data-discover":!k&&e==="render"?"true":void 0})});E3.displayName="Form";function y3(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ty(e){let t=T.useContext(Zi);return Ft(t,y3(e)),t}function N3(e,{target:t,replace:a,mask:r,state:o,preventScrollReset:u,relative:c,viewTransition:f,defaultShouldRevalidate:m,useTransitions:h}={}){let b=Sn(),g=vn(),y=Ro(e,{relative:c});return T.useCallback(N=>{if(ZS(N,t)){N.preventDefault();let S=a!==void 0?a:Eo(g)===Eo(y),A=()=>b(e,{replace:S,mask:r,state:o,preventScrollReset:u,relative:c,viewTransition:f,defaultShouldRevalidate:m});h?T.startTransition(()=>A()):A()}},[g,b,y,a,r,o,t,e,u,c,f,m,h])}function Fh(e){Ia(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=T.useRef(sh(e)),a=T.useRef(!1),r=vn(),o=T.useMemo(()=>JS(r.search,a.current?null:t.current),[r.search]),u=Sn(),c=T.useCallback((f,m)=>{const h=sh(typeof f=="function"?f(new URLSearchParams(o)):f);a.current=!0,u("?"+h,m)},[u,o]);return[o,c]}var T3=0,_3=()=>`__${String(++T3)}__`;function v3(){let{router:e}=Ty("useSubmit"),{basename:t}=T.useContext(Ea),a=FS(),r=e.fetch,o=e.navigate;return T.useCallback(async(u,c={})=>{let{action:f,method:m,encType:h,formData:b,body:g}=n3(u,t);if(c.navigate===!1){let y=c.fetcherKey||_3();await r(y,a,c.action||f,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||m,formEncType:c.encType||h,flushSync:c.flushSync})}else await o(c.action||f,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||m,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,o,t,a])}function S3(e,{relative:t}={}){let{basename:a}=T.useContext(Ea),r=T.useContext(La);Ft(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),u={...Ro(e||".",{relative:t})},c=vn();if(e==null){u.search=c.search;let f=new URLSearchParams(u.search),m=f.getAll("index");if(m.some(b=>b==="")){f.delete("index"),m.filter(g=>g).forEach(g=>f.append("index",g));let b=f.toString();u.search=b?`?${b}`:""}}return(!e||e===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(u.pathname=u.pathname==="/"?a:Ha([a,u.pathname])),Eo(u)}function A3(e,{relative:t}={}){let a=T.useContext(fy);Ft(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ty("useViewTransitionState"),o=Ro(e,{relative:t});if(!a.isTransitioning)return!1;let u=As(a.currentLocation.pathname,r)||a.currentLocation.pathname,c=As(a.nextLocation.pathname,r)||a.nextLocation.pathname;return vc(o.pathname,c)!=null||vc(o.pathname,u)!=null}/**
|
|
61
|
-
* @license lucide-react v0.513.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 w3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),C3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,r)=>r?r.toUpperCase():a.toLowerCase()),yx=e=>{const t=C3(e);return t.charAt(0).toUpperCase()+t.slice(1)},_y=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim(),k3=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
66
|
-
* @license lucide-react v0.513.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
|
-
*/var R3={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"};/**
|
|
71
|
-
* @license lucide-react v0.513.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 O3=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:o="",children:u,iconNode:c,...f},m)=>T.createElement("svg",{ref:m,...R3,width:t,height:t,stroke:e,strokeWidth:r?Number(a)*24/Number(t):a,className:_y("lucide",o),...!u&&!k3(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,b])=>T.createElement(h,b)),...Array.isArray(u)?u:[u]]));/**
|
|
76
|
-
* @license lucide-react v0.513.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 ke=(e,t)=>{const a=T.forwardRef(({className:r,...o},u)=>T.createElement(O3,{ref:u,iconNode:t,className:_y(`lucide-${w3(yx(e))}`,`lucide-${e}`,r),...o}));return a.displayName=yx(e),a};/**
|
|
81
|
-
* @license lucide-react v0.513.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 I3=[["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"}]],M3=ke("activity",I3);/**
|
|
86
|
-
* @license lucide-react v0.513.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 L3=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],D3=ke("arrow-down-to-line",L3);/**
|
|
91
|
-
* @license lucide-react v0.513.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 j3=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],yo=ke("arrow-left",j3);/**
|
|
96
|
-
* @license lucide-react v0.513.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 B3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],P3=ke("arrow-right",B3);/**
|
|
101
|
-
* @license lucide-react v0.513.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 U3=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],vy=ke("arrow-up",U3);/**
|
|
106
|
-
* @license lucide-react v0.513.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 H3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],F3=ke("ban",H3);/**
|
|
111
|
-
* @license lucide-react v0.513.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 z3=[["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"}]],$3=ke("bot",z3);/**
|
|
116
|
-
* @license lucide-react v0.513.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 q3=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Sy=ke("box",q3);/**
|
|
121
|
-
* @license lucide-react v0.513.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 Y3=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],Yi=ke("brain",Y3);/**
|
|
126
|
-
* @license lucide-react v0.513.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 G3=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],In=ke("check",G3);/**
|
|
131
|
-
* @license lucide-react v0.513.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 K3=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sa=ke("chevron-down",K3);/**
|
|
136
|
-
* @license lucide-react v0.513.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 V3=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],zh=ke("chevron-left",V3);/**
|
|
141
|
-
* @license lucide-react v0.513.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 X3=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xc=ke("chevron-right",X3);/**
|
|
146
|
-
* @license lucide-react v0.513.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 Q3=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ay=ke("chevron-up",Q3);/**
|
|
151
|
-
* @license lucide-react v0.513.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 W3=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Z3=ke("chevrons-left",W3);/**
|
|
156
|
-
* @license lucide-react v0.513.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 J3=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],eA=ke("chevrons-right",J3);/**
|
|
161
|
-
* @license lucide-react v0.513.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 tA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Tm=ke("circle-check",tA);/**
|
|
166
|
-
* @license lucide-react v0.513.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 nA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Vr=ke("circle-dot",nA);/**
|
|
171
|
-
* @license lucide-react v0.513.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 aA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],wy=ke("circle-x",aA);/**
|
|
176
|
-
* @license lucide-react v0.513.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 sA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],rA=ke("circle",sA);/**
|
|
181
|
-
* @license lucide-react v0.513.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 iA=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],lA=ke("clipboard",iA);/**
|
|
186
|
-
* @license lucide-react v0.513.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 oA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Qc=ke("clock",oA);/**
|
|
191
|
-
* @license lucide-react v0.513.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 uA=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Cy=ke("cloud",uA);/**
|
|
196
|
-
* @license lucide-react v0.513.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 cA=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],dA=ke("code-xml",cA);/**
|
|
201
|
-
* @license lucide-react v0.513.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 fA=[["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"}]],wc=ke("copy",fA);/**
|
|
206
|
-
* @license lucide-react v0.513.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 mA=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Ec=ke("cpu",mA);/**
|
|
211
|
-
* @license lucide-react v0.513.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 hA=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],pA=ke("download",hA);/**
|
|
216
|
-
* @license lucide-react v0.513.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 gA=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],$h=ke("ellipsis",gA);/**
|
|
221
|
-
* @license lucide-react v0.513.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 bA=[["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"}]],ky=ke("external-link",bA);/**
|
|
226
|
-
* @license lucide-react v0.513.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 xA=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],EA=ke("eye-off",xA);/**
|
|
231
|
-
* @license lucide-react v0.513.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 yA=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],NA=ke("eye",yA);/**
|
|
236
|
-
* @license lucide-react v0.513.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 TA=[["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"}]],ur=ke("file-text",TA);/**
|
|
241
|
-
* @license lucide-react v0.513.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 _A=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],qh=ke("flag",_A);/**
|
|
246
|
-
* @license lucide-react v0.513.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 vA=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],SA=ke("gauge",vA);/**
|
|
251
|
-
* @license lucide-react v0.513.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 AA=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Oo=ke("git-branch",AA);/**
|
|
256
|
-
* @license lucide-react v0.513.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 wA=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],CA=ke("git-commit-horizontal",wA);/**
|
|
261
|
-
* @license lucide-react v0.513.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 kA=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Nx=ke("git-merge",kA);/**
|
|
266
|
-
* @license lucide-react v0.513.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 RA=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],zr=ke("git-pull-request",RA);/**
|
|
271
|
-
* @license lucide-react v0.513.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 OA=[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]],IA=ke("grip-horizontal",OA);/**
|
|
276
|
-
* @license lucide-react v0.513.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 MA=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],LA=ke("hard-drive",MA);/**
|
|
281
|
-
* @license lucide-react v0.513.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 DA=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],jA=ke("image-plus",DA);/**
|
|
286
|
-
* @license lucide-react v0.513.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 BA=[["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"}]],PA=ke("image",BA);/**
|
|
291
|
-
* @license lucide-react v0.513.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 UA=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Yh=ke("link-2",UA);/**
|
|
296
|
-
* @license lucide-react v0.513.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 HA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],un=ke("loader-circle",HA);/**
|
|
301
|
-
* @license lucide-react v0.513.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 FA=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],zA=ke("maximize-2",FA);/**
|
|
306
|
-
* @license lucide-react v0.513.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 $A=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Gh=ke("menu",$A);/**
|
|
311
|
-
* @license lucide-react v0.513.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 qA=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["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"}]],YA=ke("message-circle-question",qA);/**
|
|
316
|
-
* @license lucide-react v0.513.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/const GA=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],KA=ke("message-circle",GA);/**
|
|
321
|
-
* @license lucide-react v0.513.0 - ISC
|
|
322
|
-
*
|
|
323
|
-
* This source code is licensed under the ISC license.
|
|
324
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
-
*/const VA=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]],XA=ke("mic",VA);/**
|
|
326
|
-
* @license lucide-react v0.513.0 - ISC
|
|
327
|
-
*
|
|
328
|
-
* This source code is licensed under the ISC license.
|
|
329
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
-
*/const QA=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],WA=ke("minimize-2",QA);/**
|
|
331
|
-
* @license lucide-react v0.513.0 - ISC
|
|
332
|
-
*
|
|
333
|
-
* This source code is licensed under the ISC license.
|
|
334
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
-
*/const ZA=[["path",{d:"M5 12h14",key:"1ays0h"}]],JA=ke("minus",ZA);/**
|
|
336
|
-
* @license lucide-react v0.513.0 - ISC
|
|
337
|
-
*
|
|
338
|
-
* This source code is licensed under the ISC license.
|
|
339
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/const ew=[["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"}]],tw=ke("monitor",ew);/**
|
|
341
|
-
* @license lucide-react v0.513.0 - ISC
|
|
342
|
-
*
|
|
343
|
-
* This source code is licensed under the ISC license.
|
|
344
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
-
*/const nw=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],aw=ke("moon",nw);/**
|
|
346
|
-
* @license lucide-react v0.513.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/const sw=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],rw=ke("network",sw);/**
|
|
351
|
-
* @license lucide-react v0.513.0 - ISC
|
|
352
|
-
*
|
|
353
|
-
* This source code is licensed under the ISC license.
|
|
354
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
-
*/const iw=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Ry=ke("panel-right",iw);/**
|
|
356
|
-
* @license lucide-react v0.513.0 - ISC
|
|
357
|
-
*
|
|
358
|
-
* This source code is licensed under the ISC license.
|
|
359
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
-
*/const lw=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],ow=ke("paperclip",lw);/**
|
|
361
|
-
* @license lucide-react v0.513.0 - ISC
|
|
362
|
-
*
|
|
363
|
-
* This source code is licensed under the ISC license.
|
|
364
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
-
*/const uw=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],Kh=ke("pen-line",uw);/**
|
|
366
|
-
* @license lucide-react v0.513.0 - ISC
|
|
367
|
-
*
|
|
368
|
-
* This source code is licensed under the ISC license.
|
|
369
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
-
*/const cw=[["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"}]],Tx=ke("pencil",cw);/**
|
|
371
|
-
* @license lucide-react v0.513.0 - ISC
|
|
372
|
-
*
|
|
373
|
-
* This source code is licensed under the ISC license.
|
|
374
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
-
*/const dw=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Vh=ke("play",dw);/**
|
|
376
|
-
* @license lucide-react v0.513.0 - ISC
|
|
377
|
-
*
|
|
378
|
-
* This source code is licensed under the ISC license.
|
|
379
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
-
*/const fw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ma=ke("plus",fw);/**
|
|
381
|
-
* @license lucide-react v0.513.0 - ISC
|
|
382
|
-
*
|
|
383
|
-
* This source code is licensed under the ISC license.
|
|
384
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
-
*/const mw=[["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"}]],$r=ke("refresh-cw",mw);/**
|
|
386
|
-
* @license lucide-react v0.513.0 - ISC
|
|
387
|
-
*
|
|
388
|
-
* This source code is licensed under the ISC license.
|
|
389
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
-
*/const hw=[["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"}]],pw=ke("rotate-ccw",hw);/**
|
|
391
|
-
* @license lucide-react v0.513.0 - ISC
|
|
392
|
-
*
|
|
393
|
-
* This source code is licensed under the ISC license.
|
|
394
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
-
*/const gw=[["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"}]],Wc=ke("save",gw);/**
|
|
396
|
-
* @license lucide-react v0.513.0 - ISC
|
|
397
|
-
*
|
|
398
|
-
* This source code is licensed under the ISC license.
|
|
399
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
-
*/const bw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ur=ke("search",bw);/**
|
|
401
|
-
* @license lucide-react v0.513.0 - ISC
|
|
402
|
-
*
|
|
403
|
-
* This source code is licensed under the ISC license.
|
|
404
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
-
*/const xw=[["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"}]],No=ke("send",xw);/**
|
|
406
|
-
* @license lucide-react v0.513.0 - ISC
|
|
407
|
-
*
|
|
408
|
-
* This source code is licensed under the ISC license.
|
|
409
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
410
|
-
*/const Ew=[["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"}]],Xh=ke("settings",Ew);/**
|
|
411
|
-
* @license lucide-react v0.513.0 - ISC
|
|
412
|
-
*
|
|
413
|
-
* This source code is licensed under the ISC license.
|
|
414
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
415
|
-
*/const yw=[["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"}]],$i=ke("sparkles",yw);/**
|
|
416
|
-
* @license lucide-react v0.513.0 - ISC
|
|
417
|
-
*
|
|
418
|
-
* This source code is licensed under the ISC license.
|
|
419
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
420
|
-
*/const Nw=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],rh=ke("square",Nw);/**
|
|
421
|
-
* @license lucide-react v0.513.0 - ISC
|
|
422
|
-
*
|
|
423
|
-
* This source code is licensed under the ISC license.
|
|
424
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
425
|
-
*/const Tw=[["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"}]],_w=ke("sun",Tw);/**
|
|
426
|
-
* @license lucide-react v0.513.0 - ISC
|
|
427
|
-
*
|
|
428
|
-
* This source code is licensed under the ISC license.
|
|
429
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
430
|
-
*/const vw=[["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"}]],ws=ke("trash-2",vw);/**
|
|
431
|
-
* @license lucide-react v0.513.0 - ISC
|
|
432
|
-
*
|
|
433
|
-
* This source code is licensed under the ISC license.
|
|
434
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
435
|
-
*/const Sw=[["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"}]],_n=ke("triangle-alert",Sw);/**
|
|
436
|
-
* @license lucide-react v0.513.0 - ISC
|
|
437
|
-
*
|
|
438
|
-
* This source code is licensed under the ISC license.
|
|
439
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
440
|
-
*/const Aw=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Oy=ke("upload",Aw);/**
|
|
441
|
-
* @license lucide-react v0.513.0 - ISC
|
|
442
|
-
*
|
|
443
|
-
* This source code is licensed under the ISC license.
|
|
444
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
445
|
-
*/const ww=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Iy=ke("user",ww);/**
|
|
446
|
-
* @license lucide-react v0.513.0 - ISC
|
|
447
|
-
*
|
|
448
|
-
* This source code is licensed under the ISC license.
|
|
449
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
450
|
-
*/const Cw=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],My=ke("users",Cw);/**
|
|
451
|
-
* @license lucide-react v0.513.0 - ISC
|
|
452
|
-
*
|
|
453
|
-
* This source code is licensed under the ISC license.
|
|
454
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
455
|
-
*/const kw=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Ly=ke("wifi",kw);/**
|
|
456
|
-
* @license lucide-react v0.513.0 - ISC
|
|
457
|
-
*
|
|
458
|
-
* This source code is licensed under the ISC license.
|
|
459
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
460
|
-
*/const Rw=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],Ow=ke("wrench",Rw);/**
|
|
461
|
-
* @license lucide-react v0.513.0 - ISC
|
|
462
|
-
*
|
|
463
|
-
* This source code is licensed under the ISC license.
|
|
464
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
465
|
-
*/const Iw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dt=ke("x",Iw);/**
|
|
466
|
-
* @license lucide-react v0.513.0 - ISC
|
|
467
|
-
*
|
|
468
|
-
* This source code is licensed under the ISC license.
|
|
469
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
470
|
-
*/const Mw=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Zc=ke("zap",Mw);function Dy(e){var t,a,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(a=Dy(e[t]))&&(r&&(r+=" "),r+=a)}else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}function ae(){for(var e,t,a=0,r="",o=arguments.length;a<o;a++)(e=arguments[a])&&(t=Dy(e))&&(r&&(r+=" "),r+=t);return r}const _x=e=>{let t;const a=new Set,r=(h,b)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const y=t;t=b??(typeof g!="object"||g===null)?g:Object.assign({},t,g),a.forEach(N=>N(t,y))}},o=()=>t,f={setState:r,getState:o,getInitialState:()=>m,subscribe:h=>(a.add(h),()=>a.delete(h))},m=t=e(r,o,f);return f},Lw=(e=>e?_x(e):_x),Dw=e=>e;function jw(e,t=Dw){const a=rc.useSyncExternalStore(e.subscribe,rc.useCallback(()=>t(e.getState()),[e,t]),rc.useCallback(()=>t(e.getInitialState()),[e,t]));return rc.useDebugValue(a),a}const vx=e=>{const t=Lw(e),a=r=>jw(t,r);return Object.assign(a,t),a},es=(e=>e?vx(e):vx),_m="fs-theme";function jy(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Sx(e){return e==="system"?jy():e}function Ax(e){e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}const ih=es((e,t)=>({preference:localStorage.getItem(_m)??"system",resolved:Sx(localStorage.getItem(_m)??"system"),cycle(){const a=["system","light","dark"],r=a[(a.indexOf(t().preference)+1)%a.length],o=Sx(r);localStorage.setItem(_m,r),Ax(r),e({preference:r,resolved:o})},init(){Ax(t().preference);const a=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{const{preference:o}=t();if(o==="system"){const u=jy();e({resolved:u})}};return a.addEventListener("change",r),()=>a.removeEventListener("change",r)}})),Cc="fourth-spark-server-url";function By(){if(typeof window>"u")return!1;const t=window.Capacitor;return typeof(t==null?void 0:t.isNativePlatform)=="function"&&t.isNativePlatform()}function Qh(){return localStorage.getItem(Cc)??""}function Bw(e){const t=e.replace(/\/+$/,"");t?localStorage.setItem(Cc,t):localStorage.removeItem(Cc)}function lh(){return localStorage.getItem(Cc)??""}class Ss extends Error{constructor(a,r){super(a);ln(this,"status");this.name="ApiError",this.status=r}}async function Se(e,t){let a;try{a=await fetch(Qh()+e,{...t,headers:{Accept:"application/json",...t!=null&&t.body?{"Content-Type":"application/json"}:{},...t==null?void 0:t.headers}})}catch(o){throw new Ss(o instanceof Error?o.message:"Network request failed",0)}if(!a.ok){const o=await a.text().catch(()=>"");throw new Ss(o.trim()||`${a.status} ${a.statusText}`,a.status)}if(a.status===204)return;const r=await a.text();if(r)return JSON.parse(r)}function ra(e,...t){if(Array.isArray(e))return e;if(e&&typeof e=="object"){const a=e;for(const r of[...t,"data","items"])if(Array.isArray(a[r]))return a[r]}return[]}async function Pw(){return ra(await Se("/api/repos"),"repos")}async function Uw(e,t,a,r){return Se("/api/repos",{method:"POST",body:JSON.stringify({name:e,gitUrl:t,localPath:a,runtimeType:r})})}async function Hw(e){return Se("/api/repos/resolve",{method:"POST",body:JSON.stringify({localPath:e})})}async function Fw(e){await Se(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}async function zw(e){await Se(`/api/repos/${encodeURIComponent(e)}/start`,{method:"POST"})}async function $w(e){await Se(`/api/repos/${encodeURIComponent(e)}/stop`,{method:"POST"})}async function qw(e){return Se(`/api/repos/${encodeURIComponent(e)}/branches`)}async function Yw(e,t){return Se(`/api/repos/${encodeURIComponent(e)}/checkout`,{method:"POST",body:JSON.stringify({branch:t})})}async function Gw(e){return Se(`/api/repos/${encodeURIComponent(e)}/pull`,{method:"POST"})}function Ye(e){return`/api/repos/${encodeURIComponent(e)}`}async function Kw(e){return ra(await Se(`${Ye(e)}/workspaces`),"workspaces")}async function Vw(e,t){await Se(`${Ye(e)}/workspaces/${encodeURIComponent(t)}`,{method:"DELETE"})}async function Xw(e){return Se(`${Ye(e)}/workspaces/cleanup`,{method:"POST"})}async function Qw(e,t){await Se(`/api/repos/${e}/worktree`,{method:"PATCH",body:JSON.stringify({enabled:t})})}async function Ww(e,t){await Se(`/api/repos/${e}/runtime`,{method:"PATCH",body:JSON.stringify({runtimeType:t})})}async function Zw(e){return ra(await Se(`${Ye(e)}/sessions`),"sessions")}async function Jw(e,t,a,r,o,u,c,f){return Se(`${Ye(e)}/sessions`,{method:"POST",body:JSON.stringify({message:t,agent:a,model:r,variant:o,issueId:u,customAgentId:c,files:f})})}async function e5(e,t){await Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}`,{method:"DELETE"})}async function t5(e,t,a,r,o,u,c){await Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}/prompt`,{method:"POST",body:JSON.stringify({content:a,agent:r,model:o,variant:u,files:c})})}async function n5(e,t){await Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"})}async function a5(e,t,a){await Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}/questions/reply`,{method:"POST",body:JSON.stringify({answers:a})})}async function s5(e,t){await Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}/questions/reject`,{method:"POST"})}async function r5(e,t,a){return Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}/revert`,{method:"POST",body:JSON.stringify({messageID:a})})}function wx(e){const t=e,a=t.info;if(a&&typeof a.id=="string"){const r=Array.isArray(t.parts)?t.parts:void 0;return{...a,...r?{parts:r}:{}}}return t}async function Cx(e,t,a){const r=new URLSearchParams;a!=null&&a.limit&&r.set("limit",String(a.limit)),a!=null&&a.before&&r.set("before",a.before);const o=r.toString(),u=`${Ye(e)}/sessions/${encodeURIComponent(t)}/messages${o?`?${o}`:""}`,c=await Se(u);if(Array.isArray(c)){const h=c.map(wx);return{messages:h,total:h.length,hasMore:!1}}const f=c,m=Array.isArray(f.messages)?f.messages:[];return{messages:m.map(wx),total:f.total??m.length,hasMore:f.hasMore??!1}}async function i5(e,t){return Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}/status`)}async function l5(e,t){return Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}/links`)}async function o5(e,t){return Se(`${Ye(e)}/sessions/snapshot/${encodeURIComponent(t)}`)}async function Py(e){return Se(`${Ye(e)}/sessions/all-links`)}async function u5(e,t,a,r){await Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}/links`,{method:"POST",body:JSON.stringify({type:a,targetId:r})})}async function c5(e,t,a,r){await Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}/links`,{method:"DELETE",body:JSON.stringify({type:a,targetId:r})})}async function Uy(){return ra(await Se("/api/custom-agents"))}async function d5(e){return Se("/api/custom-agents",{method:"POST",body:JSON.stringify(e)})}async function f5(e,t){return Se(`/api/custom-agents/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})}async function Hy(e){await Se(`/api/custom-agents/${encodeURIComponent(e)}`,{method:"DELETE"})}async function kx(e){return Se(`/api/custom-agents/${encodeURIComponent(e)}/export`)}async function m5(e){return Se("/api/custom-agents/import",{method:"POST",body:JSON.stringify(e)})}async function Fy(e,t){const a=new URLSearchParams;t!=null&&t.category&&a.set("category",t.category),t!=null&&t.includeSuperseded&&a.set("includeSuperseded","true");const r=a.toString();return Se(`/api/custom-agents/${encodeURIComponent(e)}/memories${r?`?${r}`:""}`)}async function h5(e,t,a){return Se(`/api/custom-agents/${encodeURIComponent(e)}/memories/${encodeURIComponent(t)}`,{method:"PUT",body:JSON.stringify(a)})}async function p5(e,t){await Se(`/api/custom-agents/${encodeURIComponent(e)}/memories/${encodeURIComponent(t)}`,{method:"DELETE"})}async function g5(e,t){return Se(`/api/custom-agents/${encodeURIComponent(e)}/memories/extract`,{method:"POST",body:JSON.stringify({sessionIds:t})})}async function Rx(e){return Se(`/api/custom-agents/${encodeURIComponent(e)}/memories/stats`)}async function b5(e){return Se(`/api/custom-agents/${encodeURIComponent(e)}/memories/consolidate`,{method:"POST"})}async function Wh(e){return Se(`/api/custom-agents/${encodeURIComponent(e)}/sessions`)}async function zy(e){return ra(await Se(`${Ye(e)}/custom-agents`))}async function x5(e,t){return Se(`${Ye(e)}/custom-agents`,{method:"POST",body:JSON.stringify(t)})}async function Io(e){return ra(await Se(`${Ye(e)}/models`))}async function $y(){return ra(await Se("/api/prompt-fragments"))}async function E5(e){return Se("/api/prompt-fragments",{method:"POST",body:JSON.stringify(e)})}async function y5(e,t){return Se(`/api/prompt-fragments/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})}async function N5(e){await Se(`/api/prompt-fragments/${encodeURIComponent(e)}`,{method:"DELETE"})}async function Ox(e){return ra(await Se(`${Ye(e)}/tags`))}async function Ix(e,t){return ra(await Se(`${Ye(e)}/milestones`))}async function Mx(e,t="open"){return ra(await Se(`${Ye(e)}/issues?state=${encodeURIComponent(t)}`),"issues")}async function T5(e,t="all"){return Se(`${Ye(e)}/issues/sync`,{method:"POST",body:JSON.stringify({state:t})})}async function _5(e,t,a){return Se(`${Ye(e)}/issues`,{method:"POST",body:JSON.stringify({title:t,body:a})})}async function v5(e,t,a){await Se(`${Ye(e)}/issues/${t}/children`,{method:"POST",body:JSON.stringify({childNumber:a})})}async function qy(e,t,a){return Se(`${Ye(e)}/issues/${t}`,{method:"PATCH",body:JSON.stringify(a)})}async function S5(e,t){return ra(await Se(`${Ye(e)}/issues/${t}/pulls`))}async function Lx(e,t="open"){return ra(await Se(`${Ye(e)}/pulls?state=${encodeURIComponent(t)}`))}async function A5(e,t="all"){return Se(`${Ye(e)}/pulls/sync`,{method:"POST",body:JSON.stringify({state:t})})}async function w5(e,t){return Se(`${Ye(e)}/pulls/${t}`)}async function C5(e,t){await Se(`${Ye(e)}/pulls/${t}/merge`,{method:"POST"})}async function Zh(e,t){return ra(await Se(`${Ye(e)}/pulls/${t}/issues`))}async function k5(e,t,a){await Se(`${Ye(e)}/pulls/${t}/issues`,{method:"POST",body:JSON.stringify({issueNumber:a})})}async function R5(e,t,a){await Se(`${Ye(e)}/pulls/${t}/issues/${a}`,{method:"DELETE"})}async function O5(e,t){return Se(`${Ye(e)}/pulls/${t}/comments`)}async function I5(e,t){return Se(`${Ye(e)}/issues/${t}/comments`)}async function Dx(e,t,a){return Se(`${Ye(e)}/issues/${t}/comments`,{method:"POST",body:JSON.stringify({body:a})})}async function M5(e,t,a){return Se(`${Ye(e)}/issues/${t}/polish`,{method:"POST",body:JSON.stringify({draft:a})})}async function jx(e,t){return Se(`${Ye(e)}/issues/${t}/draft`)}async function L5(e,t,a){return Se(`${Ye(e)}/issues/polish-create`,{method:"POST",body:JSON.stringify({title:t,body:a})})}async function Bx(e){return Se(`${Ye(e)}/issues/draft-create`)}async function D5(e){await Se(`${Ye(e)}/issues/draft-create`,{method:"DELETE"})}async function j5(e,t,a){await Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({title:a})})}async function B5(e,t,a){await Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({completedAt:a})})}async function P5(){return Se("/api/agents-md")}async function U5(e){await Se("/api/agents-md",{method:"PUT",body:JSON.stringify({content:e})})}async function H5(e){return Se(`/api/repos/${encodeURIComponent(e)}/agents-md`)}async function F5(e,t){await Se(`/api/repos/${encodeURIComponent(e)}/agents-md`,{method:"PUT",body:JSON.stringify({content:t})})}function z5(e){return`${Qh()}${Ye(e)}/events`}async function $5(e){return Se(`${Ye(e)}/sessions/status`)}async function Mo(){return Se("/api/settings")}async function oh(e,t){await Se(`/api/settings/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({value:t})})}async function uh(){return Se("/api/cloud/status")}async function q5(){return Se("/api/cloud/reload",{method:"POST"})}async function Y5(e){try{return(await Se("/api/cloud/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})})).connected}catch{return!1}}async function G5(){return ra(await Se("/api/git-hosts"),"gitHosts")}async function K5(e,t,a,r="gitea"){return Se("/api/git-hosts",{method:"POST",body:JSON.stringify({host:e,name:t,token:a,platform:r})})}async function V5(e){await Se(`/api/git-hosts/${encodeURIComponent(e)}`,{method:"DELETE"})}async function Yy(){return Se("/api/usage")}async function Gy(e){return Se("/api/usage/switch",{method:"POST",body:JSON.stringify({accountId:e})})}async function X5(e,t="ios"){await Se("/api/push/register",{method:"POST",body:JSON.stringify({token:e,platform:t})})}async function Q5(e,t){return Se(`${Ye(e)}/sessions/${encodeURIComponent(t)}/files`)}function W5(e,t,a){return`${Qh()}${Ye(e)}/sessions/${encodeURIComponent(t)}/files/${a}`}const ar="fs-active-repo",Le=es((e,t)=>({repos:[],activeRepoId:localStorage.getItem(ar),loading:!1,loadError:null,loadRepos:async()=>{e({loading:!0,loadError:null});try{const a=await Pw(),r=t().activeRepoId,o=r&&a.some(c=>c.id===r);e({repos:a,loading:!1,activeRepoId:o?r:a.length>0?a[0].id:null});const u=t().activeRepoId;u?localStorage.setItem(ar,u):localStorage.removeItem(ar)}catch(a){e({loading:!1,loadError:a instanceof Error?a.message:"Failed to load repos"})}},setActiveRepo:a=>{e({activeRepoId:a}),a?localStorage.setItem(ar,a):localStorage.removeItem(ar)},addRepo:async(a,r,o,u)=>{try{const c=await Uw(a,r,o,u);return e(f=>({repos:[...f.repos,c],activeRepoId:c.id})),localStorage.setItem(ar,c.id),c}catch(c){return e({loadError:c instanceof Error?c.message:"Failed to add repo"}),null}},removeRepo:async a=>{try{await Fw(a)}catch{}e(r=>{const o=r.repos.filter(c=>c.id!==a),u=r.activeRepoId===a?o.length>0?o[0].id:null:r.activeRepoId;return u?localStorage.setItem(ar,u):localStorage.removeItem(ar),{repos:o,activeRepoId:u}})},updateRepoBranch:(a,r)=>{e(o=>({repos:o.repos.map(u=>u.id===a?{...u,branch:r}:u)}))}})),zn=e=>{var t;return((t=e.repos.find(a=>a.id===e.activeRepoId))==null?void 0:t.name)??null},Px="fs-nav-collapsed",Ux="fs-session-panel-collapsed",kc=es(e=>({navCollapsed:localStorage.getItem(Px)==="true",sessionPanelCollapsed:localStorage.getItem(Ux)==="true",toggleNav(){e(t=>{const a=!t.navCollapsed;return localStorage.setItem(Px,String(a)),{navCollapsed:a}})},toggleSessionPanel(){e(t=>{const a=!t.sessionPanelCollapsed;return localStorage.setItem(Ux,String(a)),{sessionPanelCollapsed:a}})}})),Ky=[{segment:"run",icon:Vh,label:"运行面板",global:!1},{segment:"dev/issues",icon:dA,label:"研发",global:!1,matchPrefix:"dev"},{segment:"agents",icon:$3,label:"Agents",global:!1}];function Vy(e,t,a){return t?`/${e}`:a?`/${encodeURIComponent(a)}/${e}`:`/${e}`}function Xy(e,t,a){if(!e.matchPrefix)return!1;const r=e.global?`/${e.matchPrefix}`:a?`/${encodeURIComponent(a)}/${e.matchPrefix}`:null;return r?t===r||t.startsWith(`${r}/`):!1}function Z5(e){const t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}function J5({repos:e,activeRepoId:t,onRepoChange:a}){const r=Sn(),[o,u]=T.useState(!1),c=T.useRef(null),f=e.find(h=>h.id===t),m=T.useCallback(()=>u(!1),[]);return T.useEffect(()=>{if(!o)return;const h=b=>{c.current&&!c.current.contains(b.target)&&m()};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[o,m]),i.jsxs("div",{ref:c,className:"relative",children:[i.jsxs("button",{type:"button",onClick:()=>u(h=>!h),className:"flex max-w-[140px] items-center gap-1 rounded-md border border-line bg-base px-2 py-1 text-xs text-fg-2 transition-colors hover:border-blue-500 sm:max-w-[200px]",children:[i.jsx(Sy,{className:"h-3 w-3 shrink-0 text-fg-4"}),i.jsxs("span",{className:"truncate",children:[i.jsx("span",{className:"sm:hidden",children:f?Z5(f.name):""}),i.jsx("span",{className:"hidden sm:inline",children:(f==null?void 0:f.name)??""})]}),i.jsx(sa,{className:ae("h-3 w-3 shrink-0 text-fg-4 transition-transform",o&&"rotate-180")})]}),o&&i.jsxs("div",{className:"absolute left-0 top-full z-50 mt-1 w-64 overflow-hidden rounded-lg border border-line bg-surface shadow-lg",children:[i.jsx("div",{className:"max-h-64 overflow-y-auto py-1",children:e.map(h=>i.jsxs("button",{type:"button",onClick:()=>{a(h.id),m()},className:ae("flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors",h.id===t?"font-medium text-blue-600":"text-fg-2 hover:bg-elevated"),children:[h.id===t?i.jsx(In,{className:"h-3 w-3 shrink-0"}):i.jsx("span",{className:"h-3 w-3 shrink-0"}),i.jsx("span",{className:"truncate",children:h.name})]},h.id))}),i.jsx("div",{className:"border-t border-line",children:i.jsxs("button",{type:"button",onClick:()=>{r("/repos"),m()},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:[i.jsx(Xh,{className:"h-3 w-3 shrink-0"}),i.jsx("span",{children:"管理仓库"})]})})]})]})}function eC({repoId:e,currentBranch:t}){const a=Le(_=>_.updateRepoBranch),[r,o]=T.useState(!1),[u,c]=T.useState(null),[f,m]=T.useState(!1),[h,b]=T.useState(null),[g,y]=T.useState(null),N=T.useRef(null),S=T.useCallback(()=>{o(!1),y(null)},[]);T.useEffect(()=>{if(!r)return;const _=M=>{N.current&&!N.current.contains(M.target)&&S()};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[r,S]);const A=async()=>{if(r){S();return}o(!0),m(!0),y(null);try{c(await qw(e))}catch{y("加载分支失败")}finally{m(!1)}},w=async _=>{if(!(_===t||h)){b(_),y(null);try{const M=await Yw(e,_);a(e,M.branch),S()}catch(M){y(M instanceof Error?M.message:"切换失败")}finally{b(null)}}};return t?i.jsxs("div",{ref:N,className:"relative",children:[i.jsxs("button",{type:"button",onClick:A,className:"flex items-center gap-1 rounded-md bg-elevated px-2 py-1 text-xs text-fg-3 transition-colors hover:bg-blue-500/10 hover:text-blue-600",children:[i.jsx(Oo,{className:"h-3 w-3"}),t,i.jsx(sa,{className:ae("h-3 w-3 transition-transform",r&&"rotate-180")})]}),r&&i.jsxs("div",{className:"absolute right-0 top-full z-50 mt-1 w-56 overflow-hidden rounded-lg border border-line bg-surface shadow-lg",children:[f?i.jsx("div",{className:"flex items-center justify-center py-4",children:i.jsx(un,{className:"h-4 w-4 animate-spin text-fg-4"})}):u?i.jsxs("div",{className:"max-h-64 overflow-y-auto py-1",children:[u.local.map(_=>i.jsxs("button",{type:"button",disabled:h!==null,onClick:()=>w(_),className:ae("flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors",_===t?"font-medium text-blue-600":"text-fg-2 hover:bg-elevated"),children:[_===t?i.jsx(In,{className:"h-3 w-3 shrink-0"}):h===_?i.jsx(un,{className:"h-3 w-3 shrink-0 animate-spin"}):i.jsx("span",{className:"h-3 w-3 shrink-0"}),i.jsx("span",{className:"truncate",children:_})]},_)),u.remote.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mx-3 my-1 border-t border-line"}),i.jsx("div",{className:"px-3 py-1 text-[10px] font-medium uppercase tracking-wider text-fg-4",children:"Remote"}),u.remote.map(_=>i.jsxs("button",{type:"button",disabled:h!==null,onClick:()=>w(_),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-fg-2 transition-colors hover:bg-elevated",children:[h===_?i.jsx(un,{className:"h-3 w-3 shrink-0 animate-spin"}):i.jsx("span",{className:"h-3 w-3 shrink-0"}),i.jsx("span",{className:"truncate",children:_})]},`remote-${_}`))]})]}):null,g&&i.jsx("div",{className:"border-t border-line px-3 py-2 text-xs text-red-500",children:g})]})]}):null}function tC(){const[e,t]=T.useState(null);return T.useEffect(()=>{const a=()=>fetch("/api/health").then(u=>u.json()).then(u=>{u.latestVersion&&u.latestVersion!=="0.11.0"&&t(u.latestVersion)}).catch(()=>{});a();const r=setInterval(a,30*6e4),o=()=>a();return window.addEventListener("focus",o),()=>{clearInterval(r),window.removeEventListener("focus",o)}},[]),e}function nC(){const e=Sn(),t=vn(),a=Le(g=>g.repos),r=Le(g=>g.activeRepoId),o=Le(g=>g.setActiveRepo),u=ih(g=>g.preference),c=ih(g=>g.cycle),f=u==="light"?_w:u==="dark"?aw:tw,m=a.find(g=>g.id===r),h=tC(),b=g=>{var A;if(!g)return;o(g);const y=a.find(w=>w.id===g);if(!y)return;const N=t.pathname.match(/\/dev\/(issues|pulls)/);if(N){e(`/${encodeURIComponent(y.name)}/dev/${N[1]}`);return}const S=((A=t.pathname.match(/\/(run|agents|issues|pulls)/))==null?void 0:A[1])??"run";e(`/${encodeURIComponent(y.name)}/${S}`)};return i.jsxs("header",{className:"shrink-0 border-b border-line bg-surface pt-[var(--safe-top)]",children:[i.jsxs("div",{className:"flex h-12 items-center justify-between px-4",children:[i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx(Zc,{className:"h-5 w-5 text-blue-500"}),i.jsx("span",{className:"hidden text-sm font-bold tracking-tight text-fg sm:inline",children:"Fourth Spark"}),i.jsxs("span",{className:"hidden rounded bg-elevated px-1.5 py-0.5 text-[10px] font-medium tabular-nums text-fg-4 sm:inline",children:["v","0.11.0"]}),h&&i.jsxs("span",{className:"hidden text-[10px] text-amber-500 sm:inline",children:["→ v",h," 可用,运行 ",i.jsx("code",{className:"rounded bg-amber-500/10 px-1 font-mono",children:"fourth-spark upgrade"})," 更新"]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[a.length>0&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(J5,{repos:a,activeRepoId:r,onRepoChange:b}),m&&r&&i.jsx(eC,{repoId:r,currentBranch:m.branch})]}),i.jsx("button",{type:"button",onClick:()=>e("/settings"),"aria-label":"设置",className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:i.jsx(Xh,{className:"h-4 w-4"})}),i.jsx("a",{href:"https://github.com/kinminghao/fourth-spark",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:i.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}),i.jsx("button",{type:"button",onClick:c,"aria-label":`主题: ${u}`,className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:i.jsx(f,{className:"h-4 w-4"})})]})]}),h&&i.jsx("div",{className:"border-t border-line px-4 py-1.5 sm:hidden",children:i.jsxs("span",{className:"text-[10px] text-amber-500",children:["→ v",h," 可用,运行 ",i.jsx("code",{className:"rounded bg-amber-500/10 px-1 font-mono",children:"fourth-spark upgrade"})," 更新"]})})]})}function aC(){const e=Le(zn),t=kc(o=>o.navCollapsed),a=kc(o=>o.toggleNav),r=vn();return i.jsxs("nav",{className:ae("hidden shrink-0 flex-col border-r border-line bg-surface py-2 transition-[width] duration-200 ease-in-out md:flex",t?"w-14":"w-48"),children:[i.jsx("div",{className:"flex flex-1 flex-col",children:Ky.map(o=>{const u=Xy(o,r.pathname,e);return i.jsxs(Ac,{to:Vy(o.segment,o.global,e),title:t?o.label:void 0,className:({isActive:c})=>ae("mx-2 flex items-center rounded-md py-2 text-sm transition-colors",t?"justify-center px-2":"gap-2.5 px-3",c||u?"bg-blue-500/10 font-medium text-blue-600":"text-fg-3 hover:bg-elevated hover:text-fg"),children:[i.jsx(o.icon,{className:"h-4 w-4 shrink-0"}),i.jsx("span",{className:ae("truncate transition-[opacity,max-width] duration-200 ease-in-out",t?"max-w-0 opacity-0":"max-w-[8rem] opacity-100"),children:o.label})]},o.segment)})}),i.jsxs(Ac,{to:"/settings",title:t?"设置":void 0,className:({isActive:o})=>ae("mx-2 flex items-center rounded-md py-2 text-sm transition-colors",t?"justify-center px-2":"gap-2.5 px-3",o?"bg-blue-500/10 font-medium text-blue-600":"text-fg-4 hover:bg-elevated hover:text-fg-2"),children:[i.jsx(Xh,{className:"h-4 w-4 shrink-0"}),i.jsx("span",{className:ae("truncate transition-[opacity,max-width] duration-200 ease-in-out",t?"max-w-0 opacity-0":"max-w-[8rem] opacity-100"),children:"设置"})]}),i.jsx("button",{type:"button",onClick:a,title:t?"展开导航":"收起导航",className:"mx-2 flex items-center justify-center rounded-md py-2 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:t?i.jsx(eA,{className:"h-4 w-4"}):i.jsx(Z3,{className:"h-4 w-4"})})]})}function sC(){const e=Le(zn),t=vn();return i.jsx("nav",{className:"fixed bottom-0 left-0 right-0 z-30 border-t border-line bg-surface pb-[var(--safe-bottom)] md:hidden",children:i.jsx("div",{className:"flex h-14 items-center justify-around",children:Ky.map(a=>{const r=Xy(a,t.pathname,e);return i.jsx(Ac,{to:Vy(a.segment,a.global,e),"aria-label":a.label,className:({isActive:o})=>ae("flex h-10 w-10 items-center justify-center rounded-md transition-colors",o||r?"bg-blue-500/10 text-blue-600":"text-fg-3 hover:bg-elevated hover:text-fg"),children:i.jsx(a.icon,{className:"h-5 w-5 shrink-0"})},a.segment)})})})}function rC(){return i.jsxs("div",{className:"flex h-full flex-col overflow-hidden bg-base text-fg",children:[i.jsx(nC,{}),i.jsxs("div",{className:"flex min-h-0 flex-1",children:[i.jsx(aC,{}),i.jsx("main",{className:"flex min-w-0 flex-1 flex-col overflow-hidden pb-[calc(3.5rem_+_var(--safe-bottom))] md:pb-0",children:i.jsx(YS,{})})]}),i.jsx(sC,{})]})}let iC=0;const Gt=es(e=>({toasts:[],addToast:(t,a="info",r,o)=>{const u=(o==null?void 0:o.id)??`toast-${++iC}-${Date.now()}`;e(c=>c.toasts.some(f=>f.id===u)?c:{toasts:[...c.toasts,{id:u,message:t,variant:a,sessionId:r,persistent:o==null?void 0:o.persistent}]}),o!=null&&o.persistent||setTimeout(()=>{e(c=>({toasts:c.toasts.filter(f=>f.id!==u)}))},4e3)},removeToast:t=>{e(a=>({toasts:a.toasts.filter(r=>r.id!==t)}))}}));function lC({onClose:e}){const[t,a]=T.useState(""),[r,o]=T.useState(""),[u,c]=T.useState(""),[f,m]=T.useState("opencode"),[h,b]=T.useState(!1),[g,y]=T.useState(""),N=Le(M=>M.addRepo),S=r.trim()!==""&&u.trim()!==""&&t.trim()!==""&&!h,A=async M=>{const k=M.trim();if(k){b(!0),y("");try{const L=await Hw(k);L.name&&!r.trim()&&o(L.name),L.gitUrl&&!u.trim()&&c(L.gitUrl)}catch(L){const O=L instanceof Error?L.message:"无法解析路径";try{const P=JSON.parse(O);y(P.error??O)}catch{y(O)}}b(!1)}},w=T.useRef(A);w.current=A,T.useEffect(()=>{const M=t.trim();if(!M)return;const k=setTimeout(()=>{w.current(M)},500);return()=>clearTimeout(k)},[t]);const _=async()=>{if(!S)return;y(""),await N(r.trim(),u.trim(),t.trim(),f)&&e()};return i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:e,children:i.jsxs("div",{className:"w-full max-w-md rounded-xl border border-line bg-surface p-6 shadow-2xl",onClick:M=>M.stopPropagation(),children:[i.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[i.jsx("h2",{className:"text-base font-semibold text-fg",children:"添加仓库"}),i.jsx("button",{type:"button",onClick:e,className:"rounded-md p-1 text-fg-4 hover:bg-elevated hover:text-fg-2",children:i.jsx(dt,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"flex flex-col gap-4",children:[i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx("label",{htmlFor:"m-path",className:"text-xs font-medium text-fg-3",children:"本地路径"}),i.jsx("input",{id:"m-path",value:t,onChange:M=>a(M.target.value),onBlur:M=>void A(M.target.value),placeholder:"/Users/you/code/repo",autoFocus:!0,className:"w-full rounded-lg border border-line bg-base px-3 py-2 font-mono text-sm text-fg placeholder:text-fg-5 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"}),i.jsx("span",{className:"text-[11px] text-fg-5",children:h?"正在读取 Git 信息…":"输入路径后自动读取仓库信息"})]}),i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx("label",{htmlFor:"m-name",className:"text-xs font-medium text-fg-3",children:"名称"}),i.jsx("input",{id:"m-name",value:r,onChange:M=>o(M.target.value),placeholder:"my-project",className:"w-full rounded-lg border border-line bg-base px-3 py-2 text-sm text-fg placeholder:text-fg-5 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"})]}),i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx("label",{htmlFor:"m-git",className:"text-xs font-medium text-fg-3",children:"Git 远程地址"}),i.jsx("input",{id:"m-git",value:u,onChange:M=>c(M.target.value),placeholder:"https://github.com/org/repo.git",className:"w-full rounded-lg border border-line bg-base px-3 py-2 font-mono text-xs text-fg placeholder:text-fg-5 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"})]}),i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx("label",{className:"text-xs font-medium text-fg-3",children:"运行时"}),i.jsx("div",{className:"flex gap-2",children:[{value:"opencode",label:"OpenCode"},{value:"claude-code",label:"Claude Code"}].map(M=>i.jsx("button",{type:"button",onClick:()=>m(M.value),className:`flex-1 rounded-lg border px-3 py-2 text-sm font-medium transition-colors ${f===M.value?"border-blue-500 bg-blue-500/10 text-blue-600":"border-line bg-base text-fg-4 hover:bg-elevated hover:text-fg-2"}`,children:M.label},M.value))}),i.jsx("span",{className:"text-[11px] text-fg-5",children:f==="claude-code"?"需要本地安装 Claude Code CLI":"需要本地安装 OpenCode CLI"})]}),g&&i.jsx("p",{className:"rounded-md bg-red-500/10 px-3 py-2 text-xs text-red-500",children:g}),i.jsxs("div",{className:"mt-1 flex items-center justify-end gap-2",children:[i.jsx("button",{type:"button",onClick:e,className:"rounded-lg border border-line px-4 py-2 text-sm text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"取消"}),i.jsx("button",{type:"button",onClick:_,disabled:!S,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 disabled:cursor-not-allowed disabled:bg-fg-6 disabled:text-fg-4",children:"添加仓库"})]})]})]})})}function oC({repoId:e,repoName:t,onClose:a}){const[r,o]=T.useState(""),[u,c]=T.useState(""),[f,m]=T.useState(!0),[h,b]=T.useState(!1),[g,y]=T.useState(null);T.useEffect(()=>{H5(e).then(A=>{o(A.content),c(A.content),m(!1)}).catch(A=>{y(A instanceof Error?A.message:String(A)),m(!1)})},[e]);const N=async()=>{b(!0),y(null);try{await F5(e,r),c(r)}catch(A){y(A instanceof Error?A.message:String(A))}b(!1)},S=r!==u;return i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:a,children:i.jsxs("div",{className:"flex w-full max-w-2xl flex-col rounded-xl border border-line bg-surface p-6 shadow-2xl",onClick:A=>A.stopPropagation(),children:[i.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsxs("h2",{className:"text-base font-semibold text-fg",children:[t," — AGENTS.md"]}),i.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"仅对此仓库生效,修改后 opencode 热加载即时生效。"})]}),i.jsx("button",{type:"button",onClick:a,className:"shrink-0 rounded-md p-1 text-fg-4 hover:bg-elevated hover:text-fg-2",children:i.jsx(dt,{className:"h-4 w-4"})})]}),g&&i.jsxs("div",{className:"mb-3 flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[i.jsx(_n,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),i.jsx("span",{className:"min-w-0 break-words",children:g})]}),f?i.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-16 text-fg-5",children:[i.jsx(un,{className:"h-5 w-5 fs-spin"}),i.jsx("p",{className:"text-xs",children:"加载中…"})]}):i.jsx("textarea",{value:r,onChange:A=>o(A.target.value),spellCheck:!1,className:"h-96 w-full resize-y rounded-lg border border-line bg-base px-4 py-3 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20",placeholder:`# AGENTS.md
|
|
471
|
-
|
|
472
|
-
在此编写该仓库的 Agent 指令…`}),i.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2",children:[i.jsx("button",{type:"button",onClick:a,className:"rounded-lg border border-line px-4 py-2 text-sm text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"关闭"}),i.jsxs("button",{type:"button",onClick:()=>void N(),disabled:h||!S,className:"flex items-center gap-1.5 rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[i.jsx(Wc,{className:"h-3.5 w-3.5"}),h?"保存中…":"保存"]})]})]})})}const ch=1024,dh=ch*1024,Hx=dh*1024;function Fx(e){return!e||e<=0?"0 B":e<ch?`${e} B`:e<dh?`${(e/ch).toFixed(1)} KB`:e<Hx?`${(e/dh).toFixed(1)} MB`:`${(e/Hx).toFixed(2)} GB`}const vm="ws/";function uC({repoId:e}){const[t,a]=T.useState(!1),[r,o]=T.useState(null),[u,c]=T.useState(!1),[f,m]=T.useState(null),[h,b]=T.useState(null),[g,y]=T.useState(!1),N=async()=>{c(!0),m(null);try{const M=await Kw(e);o(M)}catch(M){m(M instanceof Ss?M.message:"加载失败")}c(!1)};T.useEffect(()=>{t&&r===null&&N()},[t]);const S=async M=>{b(M);try{await Vw(e,M),await N()}catch(k){m(k instanceof Ss?k.message:"删除失败")}b(null)},A=async()=>{y(!0);try{await Xw(e),await N()}catch(M){m(M instanceof Ss?M.message:"清理失败")}y(!1)},w=(r==null?void 0:r.length)??0,_=(r==null?void 0:r.reduce((M,k)=>M+(k.diskUsage||0),0))??0;return i.jsxs("div",{className:"mt-3 border-t border-line pt-3",children:[i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>a(M=>!M),className:"flex min-w-0 flex-1 items-center gap-1.5 text-left text-xs font-medium text-fg-3 transition-colors hover:text-fg-2",children:[t?i.jsx(Ay,{className:"h-3 w-3 shrink-0"}):i.jsx(sa,{className:"h-3 w-3 shrink-0"}),i.jsx(Oo,{className:"h-3 w-3 shrink-0 text-fg-5"}),i.jsx("span",{children:"工作空间"}),r!==null&&i.jsxs("span",{className:"text-fg-5",children:["(",w,") · ",Fx(_)]})]}),t&&w>0&&i.jsxs("button",{type:"button",onClick:()=>void A(),disabled:g,className:"flex h-6 shrink-0 items-center gap-1 rounded border border-line px-2 text-xs text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-50",children:[g?i.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):null,"清理已合并"]})]}),t&&i.jsxs("div",{className:"mt-2",children:[f&&i.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2 rounded border border-red-500/30 bg-red-500/5 px-2 py-1 text-xs text-red-600",children:[i.jsx("span",{className:"truncate",children:f}),i.jsx("button",{type:"button",onClick:()=>m(null),className:"shrink-0 rounded p-0.5 transition-colors hover:bg-red-500/10",children:i.jsx(dt,{className:"h-3 w-3"})})]}),u&&r===null?i.jsx("div",{className:"flex justify-center py-3",children:i.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-fg-5 border-t-transparent"})}):w===0?i.jsx("p",{className:"py-2 text-center text-xs text-fg-5",children:"暂无工作空间"}):i.jsx("ul",{className:"space-y-1",children:r==null?void 0:r.map(M=>{const k=M.branch.startsWith(vm),L=k?M.branch.slice(vm.length):M.branch,O=M.status==="active"?"bg-emerald-500/10 text-emerald-600":M.status==="idle"?"bg-amber-500/10 text-amber-600":"bg-fg-6/30 text-fg-4",P=M.status==="active"?"活跃":M.status==="idle"?"空闲":M.status==="merged"?"已合并":M.status==="stale"?"陈旧":M.status,z=M.status!=="active";return i.jsxs("li",{className:"flex items-center gap-2 rounded-md border border-line bg-elevated/40 px-2 py-1.5 text-xs",children:[i.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[M.running&&M.port&&i.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-emerald-500",title:`运行中 :${M.port}`}),i.jsxs("span",{className:"min-w-0 truncate font-mono",children:[k&&i.jsx("span",{className:"text-fg-5",children:vm}),i.jsx("span",{className:"text-fg-2",children:L})]})]}),i.jsx("span",{className:ae("shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-medium",O),children:P}),i.jsxs("span",{className:"flex shrink-0 items-center gap-0.5 text-fg-5",children:[i.jsx(LA,{className:"h-2.5 w-2.5"}),Fx(M.diskUsage)]}),i.jsx("button",{type:"button",onClick:()=>void S(M.id),disabled:!z||h===M.id,title:z?"删除工作空间":"活跃工作空间无法删除",className:"flex h-5 w-5 shrink-0 items-center justify-center rounded text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-500 disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-fg-5",children:h===M.id?i.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):i.jsx(ws,{className:"h-3 w-3"})})]},M.id)})})]})]})}function Qy(){const e=Le(O=>O.repos),t=Le(O=>O.activeRepoId),a=Le(O=>O.setActiveRepo),r=Le(O=>O.removeRepo),o=Le(O=>O.loadRepos),[u,c]=T.useState(!1),[f,m]=T.useState(null),[h,b]=T.useState(null),[g,y]=T.useState(null),N=Gt(O=>O.addToast),[S,A]=T.useState(null),[w,_]=T.useState(null),M=T.useRef(null);T.useEffect(()=>{if(!w)return;const O=P=>{M.current&&!M.current.contains(P.target)&&_(null)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[w]);const k=async(O,P)=>{b(O);try{P?await $w(O):await zw(O),await o()}catch{}b(null)},L=async O=>{y(O);try{const P=await Gw(O);await o();const z=P.alreadyUpToDate?"info":"success";N(P.summary,z,void 0,{persistent:!0})}catch(P){let z="拉取失败";if(P instanceof Ss)try{z=JSON.parse(P.message).error??P.message}catch{z=P.message}N(z,"error",void 0,{persistent:!0})}y(null)};return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-6 flex items-center justify-between gap-3",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("h1",{className:"text-lg font-semibold text-fg",children:"仓库管理"}),i.jsx("p",{className:"mt-0.5 text-sm text-fg-4",children:"管理代码仓库,每个仓库对应一个独立的 Agent 运行环境"})]}),i.jsxs("button",{type:"button",onClick:()=>c(!0),className:"flex shrink-0 items-center gap-1.5 rounded-lg bg-blue-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 md:px-4",children:[i.jsx(Ma,{className:"h-4 w-4"}),i.jsx("span",{className:"hidden md:inline",children:"添加仓库"})]})]}),e.length===0?i.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-dashed border-line-hard py-16 text-center",children:[i.jsx("div",{className:"rounded-full bg-elevated p-3",children:i.jsx(Ma,{className:"h-6 w-6 text-fg-4"})}),i.jsx("p",{className:"text-sm font-medium text-fg-3",children:"暂无代码仓库"}),i.jsx("p",{className:"text-xs text-fg-5",children:"添加一个本地仓库开始使用"}),i.jsx("button",{type:"button",onClick:()=>c(!0),className:"mt-2 rounded-lg border border-line px-4 py-2 text-sm text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"添加仓库"})]}):i.jsx(i.Fragment,{children:i.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:e.map(O=>{const P=O.id===t;return i.jsxs("div",{className:ae("rounded-xl border p-4 transition-colors",P?"border-blue-500/40 bg-blue-500/5":"border-line"),children:[i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>a(O.id),className:"flex min-w-0 items-center gap-2 text-left",children:[P?i.jsx(Vr,{className:"h-4 w-4 shrink-0 text-blue-500"}):i.jsx(rA,{className:"h-4 w-4 shrink-0 text-fg-5"}),i.jsx("span",{className:ae("truncate font-medium",P?"text-fg":"text-fg-2"),children:O.name})]}),i.jsxs("span",{className:ae("inline-flex shrink-0 items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium",O.running?"bg-emerald-500/10 text-emerald-600":"bg-fg-6/30 text-fg-4"),children:[i.jsx("span",{className:ae("h-1.5 w-1.5 rounded-full",O.running?"bg-emerald-500":"bg-fg-5")}),O.running?"运行中":"已停止"]})]}),i.jsxs("dl",{className:"mt-3 space-y-1 font-mono text-xs text-fg-4",children:[i.jsxs("div",{className:"flex gap-2",children:[i.jsx("dt",{className:"shrink-0 text-fg-5",children:"Git"}),i.jsx("dd",{className:"min-w-0 truncate",children:O.gitUrl})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("dt",{className:"shrink-0 text-fg-5",children:"路径"}),i.jsxs("dd",{className:"flex min-w-0 items-center gap-1.5",children:[i.jsx("span",{className:"truncate",children:O.localPath}),i.jsx("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(O.localPath),title:"复制路径",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:text-fg-3",children:i.jsx(wc,{className:"h-3 w-3"})})]})]}),O.running&&O.port&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("dt",{className:"shrink-0 text-fg-5",children:"直连"}),i.jsxs("dd",{className:"flex min-w-0 items-center gap-1.5",children:[i.jsxs("a",{href:`http://127.0.0.1:${O.port}`,target:"_blank",rel:"noopener noreferrer",className:"truncate text-blue-500 hover:underline",children:["127.0.0.1:",O.port]}),i.jsx("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(`http://127.0.0.1:${O.port}`),title:"复制链接",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:text-fg-3",children:i.jsx(wc,{className:"h-3 w-3"})})]})]})]}),i.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[i.jsx("button",{type:"button",onClick:()=>void L(O.id),disabled:g===O.id,className:"flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-md border border-blue-500/30 px-2.5 text-xs font-medium text-blue-600 transition-colors hover:bg-blue-500/10 disabled:opacity-50",children:g===O.id?i.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):i.jsxs(i.Fragment,{children:[i.jsx(D3,{className:"h-3 w-3"}),"拉取"]})}),i.jsx("button",{type:"button",onClick:()=>void k(O.id,O.running),disabled:h===O.id,className:ae("flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md border text-xs font-medium transition-colors disabled:opacity-50",O.running?"border-amber-500/30 text-amber-600 hover:bg-amber-500/10":"border-emerald-500/30 text-emerald-600 hover:bg-emerald-500/10"),children:h===O.id?i.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):O.running?i.jsxs(i.Fragment,{children:[i.jsx(rh,{className:"h-3 w-3 fill-current"}),"停止"]}):i.jsxs(i.Fragment,{children:[i.jsx(Vh,{className:"h-3 w-3 fill-current"}),"启动"]})}),i.jsxs("div",{className:"relative",ref:w===O.id?M:void 0,children:[i.jsx("button",{type:"button",onClick:()=>_(w===O.id?null:O.id),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:i.jsx($h,{className:"h-4 w-4"})}),w===O.id&&i.jsxs("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[160px] overflow-hidden rounded-lg border border-line bg-elevated shadow-lg",children:[i.jsx("button",{type:"button",className:ae("flex w-full items-center gap-2 px-3 py-2 text-left text-xs transition-colors hover:bg-base/60",O.runtimeType==="claude-code"?"text-orange-500":"text-sky-500"),onClick:async()=>{_(null);const z=O.runtimeType==="claude-code"?"opencode":"claude-code";await Ww(O.id,z),o()},children:O.runtimeType==="claude-code"?"Claude → OpenCode":"OpenCode → Claude"}),i.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",onClick:async()=>{_(null),await Qw(O.id,!O.worktreeEnabled),o()},children:[i.jsx(Oo,{className:"h-3 w-3"}),i.jsx("span",{children:"Worktree"}),i.jsx("span",{className:ae("ml-auto text-[10px]",O.worktreeEnabled?"text-violet-500":"text-fg-5"),children:O.worktreeEnabled?"已开启":"已关闭"})]}),i.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",onClick:()=>{_(null),A({id:O.id,name:O.name})},children:[i.jsx(ur,{className:"h-3 w-3"}),"配置"]}),i.jsx("div",{className:"my-0.5 border-t border-line"}),i.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-red-500 transition-colors hover:bg-red-500/10",onClick:()=>{_(null),m(O.id)},children:[i.jsx(ws,{className:"h-3 w-3"}),"删除仓库"]})]})]})]}),f===O.id&&i.jsxs("div",{className:"mt-2 flex items-center justify-between rounded-md border border-red-500/20 bg-red-500/5 px-3 py-2",children:[i.jsx("span",{className:"text-xs text-red-500",children:"确认删除此仓库?"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>{r(O.id),m(null)},className:"flex h-6 items-center gap-1 rounded border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10",children:[i.jsx(In,{className:"h-3 w-3"}),"确认"]}),i.jsx("button",{type:"button",onClick:()=>m(null),className:"flex h-6 items-center gap-1 rounded border border-line px-2 text-xs text-fg-4 transition-colors hover:bg-elevated",children:"取消"})]})]}),O.worktreeEnabled&&i.jsx(uC,{repoId:O.id})]},O.id)})})}),i.jsxs("p",{className:"mt-3 text-xs text-fg-5",children:[e.length," 个仓库"]}),u&&i.jsx(lC,{onClose:()=>c(!1)}),S&&i.jsx(oC,{repoId:S.id,repoName:S.name,onClose:()=>A(null)})]})}function cC(){return i.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:i.jsx("div",{className:"mx-auto max-w-4xl",children:i.jsx(Qy,{})})})}function zx(e){const t=[],a=String(e||"");let r=a.indexOf(","),o=0,u=!1;for(;!u;){r===-1&&(r=a.length,u=!0);const c=a.slice(o,r).trim();(c||!u)&&t.push(c),o=r+1,r=a.indexOf(",",o)}return t}function Wy(e,t){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const dC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mC={};function $x(e,t){return(mC.jsx?fC:dC).test(e)}const hC=/[ \t\n\f\r]/g;function pC(e){return typeof e=="object"?e.type==="text"?qx(e.value):!1:qx(e)}function qx(e){return e.replace(hC,"")===""}class Lo{constructor(t,a,r){this.normal=a,this.property=t,r&&(this.space=r)}}Lo.prototype.normal={};Lo.prototype.property={};Lo.prototype.space=void 0;function Zy(e,t){const a={},r={};for(const o of e)Object.assign(a,o.property),Object.assign(r,o.normal);return new Lo(a,r,t)}function To(e){return e.toLowerCase()}class ia{constructor(t,a){this.attribute=a,this.property=t}}ia.prototype.attribute="";ia.prototype.booleanish=!1;ia.prototype.boolean=!1;ia.prototype.commaOrSpaceSeparated=!1;ia.prototype.commaSeparated=!1;ia.prototype.defined=!1;ia.prototype.mustUseProperty=!1;ia.prototype.number=!1;ia.prototype.overloadedBoolean=!1;ia.prototype.property="";ia.prototype.spaceSeparated=!1;ia.prototype.space=void 0;let gC=0;const Xe=Xr(),on=Xr(),fh=Xr(),ve=Xr(),Rt=Xr(),Hr=Xr(),ba=Xr();function Xr(){return 2**++gC}const mh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:on,commaOrSpaceSeparated:ba,commaSeparated:Hr,number:ve,overloadedBoolean:fh,spaceSeparated:Rt},Symbol.toStringTag,{value:"Module"})),Sm=Object.keys(mh);class Jh extends ia{constructor(t,a,r,o){let u=-1;if(super(t,a),Yx(this,"space",o),typeof r=="number")for(;++u<Sm.length;){const c=Sm[u];Yx(this,Sm[u],(r&mh[c])===mh[c])}}}Jh.prototype.defined=!0;function Yx(e,t,a){a&&(e[t]=a)}function el(e){const t={},a={};for(const[r,o]of Object.entries(e.properties)){const u=new Jh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,a[To(r)]=r,a[To(u.attribute)]=r}return new Lo(t,a,e.space)}const Jy=el({properties:{ariaActiveDescendant:null,ariaAtomic:on,ariaAutoComplete:null,ariaBusy:on,ariaChecked:on,ariaColCount:ve,ariaColIndex:ve,ariaColSpan:ve,ariaControls:Rt,ariaCurrent:null,ariaDescribedBy:Rt,ariaDetails:null,ariaDisabled:on,ariaDropEffect:Rt,ariaErrorMessage:null,ariaExpanded:on,ariaFlowTo:Rt,ariaGrabbed:on,ariaHasPopup:null,ariaHidden:on,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Rt,ariaLevel:ve,ariaLive:null,ariaModal:on,ariaMultiLine:on,ariaMultiSelectable:on,ariaOrientation:null,ariaOwns:Rt,ariaPlaceholder:null,ariaPosInSet:ve,ariaPressed:on,ariaReadOnly:on,ariaRelevant:null,ariaRequired:on,ariaRoleDescription:Rt,ariaRowCount:ve,ariaRowIndex:ve,ariaRowSpan:ve,ariaSelected:on,ariaSetSize:ve,ariaSort:null,ariaValueMax:ve,ariaValueMin:ve,ariaValueNow:ve,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function eN(e,t){return t in e?e[t]:t}function tN(e,t){return eN(e,t.toLowerCase())}const bC=el({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Hr,acceptCharset:Rt,accessKey:Rt,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alpha:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:Rt,autoFocus:Xe,autoPlay:Xe,blocking:Rt,capture:null,charSet:null,checked:Xe,cite:null,className:Rt,closedBy:null,colorSpace:null,cols:ve,colSpan:ve,command:null,commandFor:null,content:null,contentEditable:on,controls:Xe,controlsList:Rt,coords:ve|Hr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:fh,draggable:on,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:Rt,height:ve,hidden:fh,high:ve,href:null,hrefLang:null,htmlFor:Rt,httpEquiv:Rt,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:Rt,itemRef:Rt,itemScope:Xe,itemType:Rt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:ve,manifest:null,max:null,maxLength:ve,media:null,method:null,min:null,minLength:ve,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,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:Xe,optimum:ve,pattern:null,ping:Rt,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:Rt,required:Xe,reversed:Xe,rows:ve,rowSpan:ve,sandbox:Rt,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootCustomElementRegistry:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shadowRootSerializable:Xe,shape:null,size:ve,sizes:null,slot:null,span:ve,spellCheck:on,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ve,step:null,style:null,tabIndex:ve,target:null,title:null,translate:null,type:null,typeMustMatch:Xe,useMap:null,value:on,width:ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Rt,axis:null,background:null,bgColor:null,border:ve,borderColor:null,bottomMargin:ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:ve,leftMargin:ve,link:null,longDesc:null,lowSrc:null,marginHeight:ve,marginWidth:ve,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:ve,rules:null,scheme:null,scrolling:on,standby:null,summary:null,text:null,topMargin:ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ve,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Xe,disablePictureInPicture:Xe,disableRemotePlayback:Xe,exportParts:Hr,part:Rt,prefix:null,property:null,results:ve,security:null,unselectable:null},space:"html",transform:tN}),xC=el({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:ba,accentHeight:ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ve,amplitude:ve,arabicForm:null,ascent:ve,attributeName:null,attributeType:null,azimuth:ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ve,by:null,calcMode:null,capHeight:ve,className:Rt,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:ve,diffuseConstant:ve,direction:null,display:null,dur:null,divisor:ve,dominantBaseline:null,download:Xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ve,enableBackground:null,end:null,event:null,exponent:ve,externalResourcesRequired:null,fill:null,fillOpacity:ve,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:Hr,g2:Hr,glyphName:Hr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ve,horizOriginX:ve,horizOriginY:ve,id:null,ideographic:ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ve,k:ve,k1:ve,k2:ve,k3:ve,k4:ve,kernelMatrix:ba,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ve,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:ve,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:ve,overlineThickness:ve,paintOrder:null,panose1:null,path:null,pathLength:ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Rt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ve,pointsAtY:ve,pointsAtZ:ve,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ba,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ba,rev:ba,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ba,requiredFeatures:ba,requiredFonts:ba,requiredFormats:ba,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:ve,specularExponent:ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ve,strikethroughThickness:ve,string:null,stroke:null,strokeDashArray:ba,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ve,strokeOpacity:ve,strokeWidth:null,style:null,surfaceScale:ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ba,tabIndex:ve,tableValues:null,target:null,targetX:ve,targetY:ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ba,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ve,underlineThickness:ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ve,values:null,vAlphabetic:ve,vMathematical:ve,vectorEffect:null,vHanging:ve,vIdeographic:ve,version:null,vertAdvY:ve,vertOriginX:ve,vertOriginY:ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:eN}),nN=el({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()}}),aN=el({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tN}),sN=el({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),EC={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"},yC=/[A-Z]/g,Gx=/-[a-z]/g,NC=/^data[-\w.:]+$/i;function Jc(e,t){const a=To(t);let r=t,o=ia;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&NC.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(Gx,_C);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!Gx.test(u)){let c=u.replace(yC,TC);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=Jh}return new o(r,t)}function TC(e){return"-"+e.toLowerCase()}function _C(e){return e.charAt(1).toUpperCase()}const Do=Zy([Jy,bC,nN,aN,sN],"html"),cr=Zy([Jy,xC,nN,aN,sN],"svg");function Kx(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function rN(e){return e.join(" ").trim()}var Bi={},Am,Vx;function vC(){if(Vx)return Am;Vx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,a=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
|
|
473
|
-
`,h="/",b="*",g="",y="comment",N="declaration";function S(w,_){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];_=_||{};var M=1,k=1;function L(te){var K=te.match(t);K&&(M+=K.length);var G=te.lastIndexOf(m);k=~G?te.length-G:k+te.length}function O(){var te={line:M,column:k};return function(K){return K.position=new P(te),V(),K}}function P(te){this.start=te,this.end={line:M,column:k},this.source=_.source}P.prototype.content=w;function z(te){var K=new Error(_.source+":"+M+":"+k+": "+te);if(K.reason=te,K.filename=_.source,K.line=M,K.column=k,K.source=w,!_.silent)throw K}function J(te){var K=te.exec(w);if(K){var G=K[0];return L(G),w=w.slice(G.length),K}}function V(){J(a)}function j(te){var K;for(te=te||[];K=ee();)K!==!1&&te.push(K);return te}function ee(){var te=O();if(!(h!=w.charAt(0)||b!=w.charAt(1))){for(var K=2;g!=w.charAt(K)&&(b!=w.charAt(K)||h!=w.charAt(K+1));)++K;if(K+=2,g===w.charAt(K-1))return z("End of comment missing");var G=w.slice(2,K-2);return k+=2,L(G),w=w.slice(K),k+=2,te({type:y,comment:G})}}function se(){var te=O(),K=J(r);if(K){if(ee(),!J(o))return z("property missing ':'");var G=J(u),F=te({type:N,property:A(K[0].replace(e,g)),value:G?A(G[0].replace(e,g)):g});return J(c),F}}function he(){var te=[];j(te);for(var K;K=se();)K!==!1&&(te.push(K),j(te));return te}return V(),he()}function A(w){return w?w.replace(f,g):g}return Am=S,Am}var Xx;function SC(){if(Xx)return Bi;Xx=1;var e=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.default=a;const t=e(vC());function a(r,o){let u=null;if(!r||typeof r!="string")return u;const c=(0,t.default)(r),f=typeof o=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:b}=m;f?o(h,b,m):b&&(u=u||{},u[h]=b)}),u}return Bi}var to={},Qx;function AC(){if(Qx)return to;Qx=1,Object.defineProperty(to,"__esModule",{value:!0}),to.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,a=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(h){return!h||a.test(h)||e.test(h)},c=function(h,b){return b.toUpperCase()},f=function(h,b){return"".concat(b,"-")},m=function(h,b){return b===void 0&&(b={}),u(h)?h:(h=h.toLowerCase(),b.reactCompat?h=h.replace(o,f):h=h.replace(r,f),h.replace(t,c))};return to.camelCase=m,to}var no,Wx;function wC(){if(Wx)return no;Wx=1;var e=no&&no.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(SC()),a=AC();function r(o,u){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(f,m){f&&m&&(c[(0,a.camelCase)(f,u)]=m)}),c}return r.default=r,no=r,no}var CC=wC();const kC=qc(CC),ed=iN("end"),ts=iN("start");function iN(e){return t;function t(a){const r=a&&a.position&&a.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 RC(e){const t=ts(e),a=ed(e);if(t&&a)return{start:t,end:a}}function co(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Zx(e.position):"start"in e||"end"in e?Zx(e):"line"in e||"column"in e?hh(e):""}function hh(e){return Jx(e&&e.line)+":"+Jx(e&&e.column)}function Zx(e){return hh(e&&e.start)+"-"+hh(e&&e.end)}function Jx(e){return e&&typeof e=="number"?e:1}class Mn extends Error{constructor(t,a,r){super(),typeof a=="string"&&(r=a,a=void 0);let o="",u={},c=!1;if(a&&("line"in a&&"column"in a?u={place:a}:"start"in a&&"end"in a?u={place:a}:"type"in a?u={ancestors:[a],place:a.position}:u={...a}),typeof t=="string"?o=t:!u.cause&&t&&(c=!0,o=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof r=="string"){const m=r.indexOf(":");m===-1?u.ruleId=r:(u.source=r.slice(0,m),u.ruleId=r.slice(m+1))}if(!u.place&&u.ancestors&&u.ancestors){const m=u.ancestors[u.ancestors.length-1];m&&(u.place=m.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=co(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Mn.prototype.file="";Mn.prototype.name="";Mn.prototype.reason="";Mn.prototype.message="";Mn.prototype.stack="";Mn.prototype.column=void 0;Mn.prototype.line=void 0;Mn.prototype.ancestors=void 0;Mn.prototype.cause=void 0;Mn.prototype.fatal=void 0;Mn.prototype.place=void 0;Mn.prototype.ruleId=void 0;Mn.prototype.source=void 0;const ep={}.hasOwnProperty,OC=new Map,IC=/[A-Z]/g,MC=new Set(["table","tbody","thead","tfoot","tr"]),LC=new Set(["td","th"]),lN="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=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=$C(a,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=zC(a,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?cr:Do,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=oN(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function oN(e,t,a){if(t.type==="element")return jC(e,t,a);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return BC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return UC(e,t,a);if(t.type==="mdxjsEsm")return PC(e,t);if(t.type==="root")return HC(e,t,a);if(t.type==="text")return FC(e,t)}function jC(e,t,a){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=cr,e.schema=o),e.ancestors.push(t);const u=cN(e,t.tagName,!1),c=qC(e,t);let f=np(e,t);return MC.has(t.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!pC(m):!0})),uN(e,c,u,t),tp(c,f),e.ancestors.pop(),e.schema=r,e.create(t,u,c,a)}function BC(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)}_o(e,t.position)}function PC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);_o(e,t.position)}function UC(e,t,a){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=cr,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:cN(e,t.name,!0),c=YC(e,t),f=np(e,t);return uN(e,c,u,t),tp(c,f),e.ancestors.pop(),e.schema=r,e.create(t,u,c,a)}function HC(e,t,a){const r={};return tp(r,np(e,t)),e.create(t,e.Fragment,r,a)}function FC(e,t){return t.value}function uN(e,t,a,r){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(t.node=r)}function tp(e,t){if(t.length>0){const a=t.length>1?t:t[0];a&&(e.children=a)}}function zC(e,t,a){return r;function r(o,u,c,f){const h=Array.isArray(c.children)?a:t;return f?h(u,c,f):h(u,c)}}function $C(e,t){return a;function a(r,o,u,c){const f=Array.isArray(u.children),m=ts(r);return t(o,u,c,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function qC(e,t){const a={};let r,o;for(o in t.properties)if(o!=="children"&&ep.call(t.properties,o)){const u=GC(e,o,t.properties[o]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&LC.has(t.tagName)?r=f:a[c]=f}}if(r){const u=a.style||(a.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return a}function YC(e,t){const a={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const u=r.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(a,e.evaluater.evaluateExpression(f.argument))}else _o(e,t.position);else{const o=r.name;let u;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const f=r.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else _o(e,t.position);else u=r.value===null?!0:r.value;a[o]=u}return a}function np(e,t){const a=[];let r=-1;const o=e.passKeys?new Map:OC;for(;++r<t.children.length;){const u=t.children[r];let c;if(e.passKeys){const m=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(m){const h=o.get(m)||0;c=m+"-"+h,o.set(m,h+1)}}const f=oN(e,u,c);f!==void 0&&a.push(f)}return a}function GC(e,t,a){const r=Jc(e.schema,t);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=r.commaSeparated?Wy(a):rN(a)),r.property==="style"){let o=typeof a=="object"?a:KC(e,String(a));return e.stylePropertyNameCase==="css"&&(o=VC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?EC[r.property]||r.property:r.attribute,a]}}function KC(e,t){try{return kC(t,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const r=a,o=new Mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=lN+"#cannot-parse-style-attribute",o}}function cN(e,t,a){let r;if(!a)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let u=-1,c;for(;++u<o.length;){const f=$x(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}r=c}else r=$x(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return ep.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);_o(e)}function _o(e,t){const a=new Mn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=lN+"#cannot-handle-mdx-estrees-without-createevaluater",a}function VC(e){const t={};let a;for(a in e)ep.call(e,a)&&(t[XC(a)]=e[a]);return t}function XC(e){let t=e.replace(IC,QC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function QC(e){return"-"+e.toLowerCase()}const wm={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"]},WC={};function ap(e,t){const a=WC,r=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,o=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return dN(e,r,o)}function dN(e,t,a){if(ZC(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return e1(e.children,t,a)}return Array.isArray(e)?e1(e,t,a):""}function e1(e,t,a){const r=[];let o=-1;for(;++o<e.length;)r[o]=dN(e[o],t,a);return r.join("")}function ZC(e){return!!(e&&typeof e=="object")}const t1=document.createElement("i");function sp(e){const t="&"+e+";";t1.innerHTML=t;const a=t1.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===t?!1:a}function xa(e,t,a,r){const o=e.length;let u=0,c;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,a=a>0?a:0,r.length<1e4)c=Array.from(r),c.unshift(t,a),e.splice(...c);else for(a&&e.splice(t,a);u<r.length;)c=r.slice(u,u+1e4),c.unshift(t,0),e.splice(...c),u+=1e4,t+=1e4}function Ra(e,t){return e.length>0?(xa(e,e.length,0,t),e):t}const n1={}.hasOwnProperty;function fN(e){const t={};let a=-1;for(;++a<e.length;)JC(t,e[a]);return t}function JC(e,t){let a;for(a in t){const o=(n1.call(e,a)?e[a]:void 0)||(e[a]={}),u=t[a];let c;if(u)for(c in u){n1.call(o,c)||(o[c]=[]);const f=u[c];ek(o[c],Array.isArray(f)?f:f?[f]:[])}}}function ek(e,t){let a=-1;const r=[];for(;++a<t.length;)(t[a].add==="after"?e:r).push(t[a]);xa(e,0,0,r)}function mN(e,t){const a=Number.parseInt(e,t);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function Fa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Fn=dr(/[A-Za-z]/),On=dr(/[\dA-Za-z]/),tk=dr(/[#-'*+\--9=?A-Z^-~]/);function Rc(e){return e!==null&&(e<32||e===127)}const ph=dr(/\d/),nk=dr(/[\dA-Fa-f]/),ak=dr(/[!-/:-@[-`{-~]/);function Fe(e){return e!==null&&e<-2}function Ot(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const td=dr(new RegExp("\\p{P}|\\p{S}","u")),qr=dr(/\s/);function dr(e){return t;function t(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function tl(e){const t=[];let a=-1,r=0,o=0;for(;++a<e.length;){const u=e.charCodeAt(a);let c="";if(u===37&&On(e.charCodeAt(a+1))&&On(e.charCodeAt(a+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(a+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),o=1):c="�"}else c=String.fromCharCode(u);c&&(t.push(e.slice(r,a),encodeURIComponent(c)),r=a+o+1,c=""),o&&(a+=o,o=0)}return t.join("")+e.slice(r)}function ht(e,t,a,r){const o=r?r-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(m){return it(m)?(e.enter(a),f(m)):t(m)}function f(m){return it(m)&&u++<o?(e.consume(m),f):(e.exit(a),t(m))}}const sk={tokenize:rk};function rk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let a;return t;function r(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ht(e,t,"linePrefix")}function o(f){return e.enter("paragraph"),u(f)}function u(f){const m=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=m),a=m,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Fe(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const ik={tokenize:lk},a1={tokenize:ok};function lk(e){const t=this,a=[];let r=0,o,u,c;return f;function f(k){if(r<a.length){const L=a[r];return t.containerState=L[1],e.attempt(L[0].continuation,m,h)(k)}return h(k)}function m(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&M();const L=t.events.length;let O=L,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){P=t.events[O][1].end;break}_(r);let z=L;for(;z<t.events.length;)t.events[z][1].end={...P},z++;return xa(t.events,O+1,0,t.events.slice(L)),t.events.length=z,h(k)}return f(k)}function h(k){if(r===a.length){if(!o)return y(k);if(o.currentConstruct&&o.currentConstruct.concrete)return S(k);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(a1,b,g)(k)}function b(k){return o&&M(),_(r),y(k)}function g(k){return t.parser.lazy[t.now().line]=r!==a.length,c=t.now().offset,S(k)}function y(k){return t.containerState={},e.attempt(a1,N,S)(k)}function N(k){return r++,a.push([t.currentConstruct,t.containerState]),y(k)}function S(k){if(k===null){o&&M(),_(0),e.consume(k);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),A(k)}function A(k){if(k===null){w(e.exit("chunkFlow"),!0),_(0),e.consume(k);return}return Fe(k)?(e.consume(k),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,f):(e.consume(k),A)}function w(k,L){const O=t.sliceStream(k);if(L&&O.push(null),k.previous=u,u&&(u.next=k),u=k,o.defineSkip(k.start),o.write(O),t.parser.lazy[k.start.line]){let P=o.events.length;for(;P--;)if(o.events[P][1].start.offset<c&&(!o.events[P][1].end||o.events[P][1].end.offset>c))return;const z=t.events.length;let J=z,V,j;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){if(V){j=t.events[J][1].end;break}V=!0}for(_(r),P=z;P<t.events.length;)t.events[P][1].end={...j},P++;xa(t.events,J+1,0,t.events.slice(z)),t.events.length=P}}function _(k){let L=a.length;for(;L-- >k;){const O=a[L];t.containerState=O[1],O[0].exit.call(t,e)}a.length=k}function M(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function ok(e,t,a){return ht(e,e.attempt(this.parser.constructs.document,t,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gi(e){if(e===null||Ot(e)||qr(e))return 1;if(td(e))return 2}function nd(e,t,a){const r=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!r.includes(u)&&(t=u(t,a),r.push(u))}return t}const gh={name:"attention",resolveAll:uk,tokenize:ck};function uk(e,t){let a=-1,r,o,u,c,f,m,h,b;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(r=a;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[a][1]).charCodeAt(0)){if((e[r][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;m=e[r][1].end.offset-e[r][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const g={...e[r][1].end},y={...e[a][1].start};s1(g,-m),s1(y,m),c={type:m>1?"strongSequence":"emphasisSequence",start:g,end:{...e[r][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:y},u={type:m>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[a][1].start}},o={type:m>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[r][1].end={...c.start},e[a][1].start={...f.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Ra(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Ra(h,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",u,t]]),h=Ra(h,nd(t.parser.constructs.insideSpan.null,e.slice(r+1,a),t)),h=Ra(h,[["exit",u,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[a][1].end.offset-e[a][1].start.offset?(b=2,h=Ra(h,[["enter",e[a][1],t],["exit",e[a][1],t]])):b=0,xa(e,r-1,a-r+3,h),a=r+h.length-b-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function ck(e,t){const a=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Gi(r);let u;return c;function c(m){return u=m,e.enter("attentionSequence"),f(m)}function f(m){if(m===u)return e.consume(m),f;const h=e.exit("attentionSequence"),b=Gi(m),g=!b||b===2&&o||a.includes(m),y=!o||o===2&&b||a.includes(r);return h._open=!!(u===42?g:g&&(o||!y)),h._close=!!(u===42?y:y&&(b||!g)),t(m)}}function s1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const dk={name:"autolink",tokenize:fk};function fk(e,t,a){let r=0;return o;function o(N){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(N),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(N){return Fn(N)?(e.consume(N),c):N===64?a(N):h(N)}function c(N){return N===43||N===45||N===46||On(N)?(r=1,f(N)):h(N)}function f(N){return N===58?(e.consume(N),r=0,m):(N===43||N===45||N===46||On(N))&&r++<32?(e.consume(N),f):(r=0,h(N))}function m(N){return N===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(N),e.exit("autolinkMarker"),e.exit("autolink"),t):N===null||N===32||N===60||Rc(N)?a(N):(e.consume(N),m)}function h(N){return N===64?(e.consume(N),b):tk(N)?(e.consume(N),h):a(N)}function b(N){return On(N)?g(N):a(N)}function g(N){return N===46?(e.consume(N),r=0,b):N===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(N),e.exit("autolinkMarker"),e.exit("autolink"),t):y(N)}function y(N){if((N===45||On(N))&&r++<63){const S=N===45?y:g;return e.consume(N),S}return a(N)}}const jo={partial:!0,tokenize:mk};function mk(e,t,a){return r;function r(u){return it(u)?ht(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Fe(u)?t(u):a(u)}}const hN={continuation:{tokenize:pk},exit:gk,name:"blockQuote",tokenize:hk};function hk(e,t,a){const r=this;return o;function o(c){if(c===62){const f=r.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return a(c)}function u(c){return it(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function pk(e,t,a){const r=this;return o;function o(c){return it(c)?ht(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(hN,t,a)(c)}}function gk(e){e.exit("blockQuote")}const pN={name:"characterEscape",tokenize:bk};function bk(e,t,a){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return ak(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):a(u)}}const gN={name:"characterReference",tokenize:xk};function xk(e,t,a){const r=this;let o=0,u,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),m}function m(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,c=On,b(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=nk,b):(e.enter("characterReferenceValue"),u=7,c=ph,b(g))}function b(g){if(g===59&&o){const y=e.exit("characterReferenceValue");return c===On&&!sp(r.sliceSerialize(y))?a(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&o++<u?(e.consume(g),b):a(g)}}const r1={partial:!0,tokenize:yk},i1={concrete:!0,name:"codeFenced",tokenize:Ek};function Ek(e,t,a){const r=this,o={partial:!0,tokenize:O};let u=0,c=0,f;return m;function m(P){return h(P)}function h(P){const z=r.events[r.events.length-1];return u=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,f=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(P)}function b(P){return P===f?(c++,e.consume(P),b):c<3?a(P):(e.exit("codeFencedFenceSequence"),it(P)?ht(e,g,"whitespace")(P):g(P))}function g(P){return P===null||Fe(P)?(e.exit("codeFencedFence"),r.interrupt?t(P):e.check(r1,A,L)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(P))}function y(P){return P===null||Fe(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(P)):it(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ht(e,N,"whitespace")(P)):P===96&&P===f?a(P):(e.consume(P),y)}function N(P){return P===null||Fe(P)?g(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(P))}function S(P){return P===null||Fe(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(P)):P===96&&P===f?a(P):(e.consume(P),S)}function A(P){return e.attempt(o,L,w)(P)}function w(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),_}function _(P){return u>0&&it(P)?ht(e,M,"linePrefix",u+1)(P):M(P)}function M(P){return P===null||Fe(P)?e.check(r1,A,L)(P):(e.enter("codeFlowValue"),k(P))}function k(P){return P===null||Fe(P)?(e.exit("codeFlowValue"),M(P)):(e.consume(P),k)}function L(P){return e.exit("codeFenced"),t(P)}function O(P,z,J){let V=0;return j;function j(K){return P.enter("lineEnding"),P.consume(K),P.exit("lineEnding"),ee}function ee(K){return P.enter("codeFencedFence"),it(K)?ht(P,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):se(K)}function se(K){return K===f?(P.enter("codeFencedFenceSequence"),he(K)):J(K)}function he(K){return K===f?(V++,P.consume(K),he):V>=c?(P.exit("codeFencedFenceSequence"),it(K)?ht(P,te,"whitespace")(K):te(K)):J(K)}function te(K){return K===null||Fe(K)?(P.exit("codeFencedFence"),z(K)):J(K)}}}function yk(e,t,a){const r=this;return o;function o(c){return c===null?a(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return r.parser.lazy[r.now().line]?a(c):t(c)}}const Cm={name:"codeIndented",tokenize:Tk},Nk={partial:!0,tokenize:_k};function Tk(e,t,a){const r=this;return o;function o(h){return e.enter("codeIndented"),ht(e,u,"linePrefix",5)(h)}function u(h){const b=r.events[r.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(h):a(h)}function c(h){return h===null?m(h):Fe(h)?e.attempt(Nk,c,m)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Fe(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function m(h){return e.exit("codeIndented"),t(h)}}function _k(e,t,a){const r=this;return o;function o(c){return r.parser.lazy[r.now().line]?a(c):Fe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):ht(e,u,"linePrefix",5)(c)}function u(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Fe(c)?o(c):a(c)}}const vk={name:"codeText",previous:Ak,resolve:Sk,tokenize:wk};function Sk(e){let t=e.length-4,a=3,r,o;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=a;++r<t;)if(e[r][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[t][1].type="codeTextPadding",a+=2,t-=2;break}}for(r=a-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Ak(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wk(e,t,a){let r=0,o,u;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),r++,f):(e.exit("codeTextSequence"),m(g))}function m(g){return g===null?a(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),m):g===96?(u=e.enter("codeTextSequence"),o=0,b(g)):Fe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Fe(g)?(e.exit("codeTextData"),m(g)):(e.consume(g),h)}function b(g){return g===96?(e.consume(g),o++,b):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(u.type="codeTextData",h(g))}}class Ck{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,a){const r=a??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,a,r){const o=a||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ao(this.left,r),u.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),ao(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ao(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 a=this.left.splice(t,Number.POSITIVE_INFINITY);ao(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ao(this.left,a.reverse())}}}function ao(e,t){let a=0;if(t.length<1e4)e.push(...t);else for(;a<t.length;)e.push(...t.slice(a,a+1e4)),a+=1e4}function bN(e){const t={};let a=-1,r,o,u,c,f,m,h;const b=new Ck(e);for(;++a<b.length;){for(;a in t;)a=t[a];if(r=b.get(a),a&&r[1].type==="chunkFlow"&&b.get(a-1)[1].type==="listItemPrefix"&&(m=r[1]._tokenizer.events,u=0,u<m.length&&m[u][1].type==="lineEndingBlank"&&(u+=2),u<m.length&&m[u][1].type==="content"))for(;++u<m.length&&m[u][1].type!=="content";)m[u][1].type==="chunkText"&&(m[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,kk(b,a)),a=t[a],h=!0);else if(r[1]._container){for(u=a,o=void 0;u--;)if(c=b.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(b.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(r[1].end={...b.get(o)[1].start},f=b.slice(o,a),f.unshift(r),b.splice(o,a-o+1,f))}}return xa(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!h}function kk(e,t){const a=e.get(t)[1],r=e.get(t)[2];let o=t-1;const u=[];let c=a._tokenizer;c||(c=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,m=[],h={};let b,g,y=-1,N=a,S=0,A=0;const w=[A];for(;N;){for(;e.get(++o)[1]!==N;);u.push(o),N._tokenizer||(b=r.sliceStream(N),N.next||b.push(null),g&&c.defineSkip(N.start),N._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(b),N._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=N,N=N.next}for(N=a;++y<f.length;)f[y][0]==="exit"&&f[y-1][0]==="enter"&&f[y][1].type===f[y-1][1].type&&f[y][1].start.line!==f[y][1].end.line&&(A=y+1,w.push(A),N._tokenizer=void 0,N.previous=void 0,N=N.next);for(c.events=[],N?(N._tokenizer=void 0,N.previous=void 0):w.pop(),y=w.length;y--;){const _=f.slice(w[y],w[y+1]),M=u.pop();m.push([M,M+_.length-1]),e.splice(M,2,_)}for(m.reverse(),y=-1;++y<m.length;)h[S+m[y][0]]=S+m[y][1],S+=m[y][1]-m[y][0]-1;return h}const Rk={resolve:Ik,tokenize:Mk},Ok={partial:!0,tokenize:Lk};function Ik(e){return bN(e),e}function Mk(e,t){let a;return r;function r(f){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?u(f):Fe(f)?e.check(Ok,c,u)(f):(e.consume(f),o)}function u(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,o}}function Lk(e,t,a){const r=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),ht(e,u,"linePrefix")}function u(c){if(c===null||Fe(c))return a(c);const f=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(r.parser.constructs.flow,a,t)(c)}}function xN(e,t,a,r,o,u,c,f,m){const h=m||Number.POSITIVE_INFINITY;let b=0;return g;function g(_){return _===60?(e.enter(r),e.enter(o),e.enter(u),e.consume(_),e.exit(u),y):_===null||_===32||_===41||Rc(_)?a(_):(e.enter(r),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),A(_))}function y(_){return _===62?(e.enter(u),e.consume(_),e.exit(u),e.exit(o),e.exit(r),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),N(_))}function N(_){return _===62?(e.exit("chunkString"),e.exit(f),y(_)):_===null||_===60||Fe(_)?a(_):(e.consume(_),_===92?S:N)}function S(_){return _===60||_===62||_===92?(e.consume(_),N):N(_)}function A(_){return!b&&(_===null||_===41||Ot(_))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(r),t(_)):b<h&&_===40?(e.consume(_),b++,A):_===41?(e.consume(_),b--,A):_===null||_===32||_===40||Rc(_)?a(_):(e.consume(_),_===92?w:A)}function w(_){return _===40||_===41||_===92?(e.consume(_),A):A(_)}}function EN(e,t,a,r,o,u){const c=this;let f=0,m;return h;function h(N){return e.enter(r),e.enter(o),e.consume(N),e.exit(o),e.enter(u),b}function b(N){return f>999||N===null||N===91||N===93&&!m||N===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?a(N):N===93?(e.exit(u),e.enter(o),e.consume(N),e.exit(o),e.exit(r),t):Fe(N)?(e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),g(N))}function g(N){return N===null||N===91||N===93||Fe(N)||f++>999?(e.exit("chunkString"),b(N)):(e.consume(N),m||(m=!it(N)),N===92?y:g)}function y(N){return N===91||N===92||N===93?(e.consume(N),f++,g):g(N)}}function yN(e,t,a,r,o,u){let c;return f;function f(y){return y===34||y===39||y===40?(e.enter(r),e.enter(o),e.consume(y),e.exit(o),c=y===40?41:y,m):a(y)}function m(y){return y===c?(e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):(e.enter(u),h(y))}function h(y){return y===c?(e.exit(u),m(c)):y===null?a(y):Fe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),ht(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(y))}function b(y){return y===c||y===null||Fe(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?g:b)}function g(y){return y===c||y===92?(e.consume(y),b):b(y)}}function fo(e,t){let a;return r;function r(o){return Fe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a=!0,r):it(o)?ht(e,r,a?"linePrefix":"lineSuffix")(o):t(o)}}const Dk={name:"definition",tokenize:Bk},jk={partial:!0,tokenize:Pk};function Bk(e,t,a){const r=this;let o;return u;function u(N){return e.enter("definition"),c(N)}function c(N){return EN.call(r,e,f,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(N)}function f(N){return o=Fa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),N===58?(e.enter("definitionMarker"),e.consume(N),e.exit("definitionMarker"),m):a(N)}function m(N){return Ot(N)?fo(e,h)(N):h(N)}function h(N){return xN(e,b,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(N)}function b(N){return e.attempt(jk,g,g)(N)}function g(N){return it(N)?ht(e,y,"whitespace")(N):y(N)}function y(N){return N===null||Fe(N)?(e.exit("definition"),r.parser.defined.push(o),t(N)):a(N)}}function Pk(e,t,a){return r;function r(f){return Ot(f)?fo(e,o)(f):a(f)}function o(f){return yN(e,u,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return it(f)?ht(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Fe(f)?t(f):a(f)}}const Uk={name:"hardBreakEscape",tokenize:Hk};function Hk(e,t,a){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Fe(u)?(e.exit("hardBreakEscape"),t(u)):a(u)}}const Fk={name:"headingAtx",resolve:zk,tokenize:$k};function zk(e,t){let a=e.length-2,r=3,o,u;return e[r][1].type==="whitespace"&&(r+=2),a-2>r&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&e[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[a][1].end},u={type:"chunkText",start:e[r][1].start,end:e[a][1].end,contentType:"text"},xa(e,r,a-r+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function $k(e,t,a){let r=0;return o;function o(b){return e.enter("atxHeading"),u(b)}function u(b){return e.enter("atxHeadingSequence"),c(b)}function c(b){return b===35&&r++<6?(e.consume(b),c):b===null||Ot(b)?(e.exit("atxHeadingSequence"),f(b)):a(b)}function f(b){return b===35?(e.enter("atxHeadingSequence"),m(b)):b===null||Fe(b)?(e.exit("atxHeading"),t(b)):it(b)?ht(e,f,"whitespace")(b):(e.enter("atxHeadingText"),h(b))}function m(b){return b===35?(e.consume(b),m):(e.exit("atxHeadingSequence"),f(b))}function h(b){return b===null||b===35||Ot(b)?(e.exit("atxHeadingText"),f(b)):(e.consume(b),h)}}const qk=["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"],l1=["pre","script","style","textarea"],Yk={concrete:!0,name:"htmlFlow",resolveTo:Vk,tokenize:Xk},Gk={partial:!0,tokenize:Wk},Kk={partial:!0,tokenize:Qk};function Vk(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 Xk(e,t,a){const r=this;let o,u,c,f,m;return h;function h(C){return b(C)}function b(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),g}function g(C){return C===33?(e.consume(C),y):C===47?(e.consume(C),u=!0,A):C===63?(e.consume(C),o=3,r.interrupt?t:D):Fn(C)?(e.consume(C),c=String.fromCharCode(C),w):a(C)}function y(C){return C===45?(e.consume(C),o=2,N):C===91?(e.consume(C),o=5,f=0,S):Fn(C)?(e.consume(C),o=4,r.interrupt?t:D):a(C)}function N(C){return C===45?(e.consume(C),r.interrupt?t:D):a(C)}function S(C){const de="CDATA[";return C===de.charCodeAt(f++)?(e.consume(C),f===de.length?r.interrupt?t:se:S):a(C)}function A(C){return Fn(C)?(e.consume(C),c=String.fromCharCode(C),w):a(C)}function w(C){if(C===null||C===47||C===62||Ot(C)){const de=C===47,_e=c.toLowerCase();return!de&&!u&&l1.includes(_e)?(o=1,r.interrupt?t(C):se(C)):qk.includes(c.toLowerCase())?(o=6,de?(e.consume(C),_):r.interrupt?t(C):se(C)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(C):u?M(C):k(C))}return C===45||On(C)?(e.consume(C),c+=String.fromCharCode(C),w):a(C)}function _(C){return C===62?(e.consume(C),r.interrupt?t:se):a(C)}function M(C){return it(C)?(e.consume(C),M):j(C)}function k(C){return C===47?(e.consume(C),j):C===58||C===95||Fn(C)?(e.consume(C),L):it(C)?(e.consume(C),k):j(C)}function L(C){return C===45||C===46||C===58||C===95||On(C)?(e.consume(C),L):O(C)}function O(C){return C===61?(e.consume(C),P):it(C)?(e.consume(C),O):k(C)}function P(C){return C===null||C===60||C===61||C===62||C===96?a(C):C===34||C===39?(e.consume(C),m=C,z):it(C)?(e.consume(C),P):J(C)}function z(C){return C===m?(e.consume(C),m=null,V):C===null||Fe(C)?a(C):(e.consume(C),z)}function J(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Ot(C)?O(C):(e.consume(C),J)}function V(C){return C===47||C===62||it(C)?k(C):a(C)}function j(C){return C===62?(e.consume(C),ee):a(C)}function ee(C){return C===null||Fe(C)?se(C):it(C)?(e.consume(C),ee):a(C)}function se(C){return C===45&&o===2?(e.consume(C),G):C===60&&o===1?(e.consume(C),F):C===62&&o===4?(e.consume(C),I):C===63&&o===3?(e.consume(C),D):C===93&&o===5?(e.consume(C),q):Fe(C)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Gk,W,he)(C)):C===null||Fe(C)?(e.exit("htmlFlowData"),he(C)):(e.consume(C),se)}function he(C){return e.check(Kk,te,W)(C)}function te(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),K}function K(C){return C===null||Fe(C)?he(C):(e.enter("htmlFlowData"),se(C))}function G(C){return C===45?(e.consume(C),D):se(C)}function F(C){return C===47?(e.consume(C),c="",$):se(C)}function $(C){if(C===62){const de=c.toLowerCase();return l1.includes(de)?(e.consume(C),I):se(C)}return Fn(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),$):se(C)}function q(C){return C===93?(e.consume(C),D):se(C)}function D(C){return C===62?(e.consume(C),I):C===45&&o===2?(e.consume(C),D):se(C)}function I(C){return C===null||Fe(C)?(e.exit("htmlFlowData"),W(C)):(e.consume(C),I)}function W(C){return e.exit("htmlFlow"),t(C)}}function Qk(e,t,a){const r=this;return o;function o(c){return Fe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):a(c)}function u(c){return r.parser.lazy[r.now().line]?a(c):t(c)}}function Wk(e,t,a){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(jo,t,a)}}const Zk={name:"htmlText",tokenize:Jk};function Jk(e,t,a){const r=this;let o,u,c;return f;function f(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),m}function m(D){return D===33?(e.consume(D),h):D===47?(e.consume(D),O):D===63?(e.consume(D),k):Fn(D)?(e.consume(D),J):a(D)}function h(D){return D===45?(e.consume(D),b):D===91?(e.consume(D),u=0,S):Fn(D)?(e.consume(D),M):a(D)}function b(D){return D===45?(e.consume(D),N):a(D)}function g(D){return D===null?a(D):D===45?(e.consume(D),y):Fe(D)?(c=g,F(D)):(e.consume(D),g)}function y(D){return D===45?(e.consume(D),N):g(D)}function N(D){return D===62?G(D):D===45?y(D):g(D)}function S(D){const I="CDATA[";return D===I.charCodeAt(u++)?(e.consume(D),u===I.length?A:S):a(D)}function A(D){return D===null?a(D):D===93?(e.consume(D),w):Fe(D)?(c=A,F(D)):(e.consume(D),A)}function w(D){return D===93?(e.consume(D),_):A(D)}function _(D){return D===62?G(D):D===93?(e.consume(D),_):A(D)}function M(D){return D===null||D===62?G(D):Fe(D)?(c=M,F(D)):(e.consume(D),M)}function k(D){return D===null?a(D):D===63?(e.consume(D),L):Fe(D)?(c=k,F(D)):(e.consume(D),k)}function L(D){return D===62?G(D):k(D)}function O(D){return Fn(D)?(e.consume(D),P):a(D)}function P(D){return D===45||On(D)?(e.consume(D),P):z(D)}function z(D){return Fe(D)?(c=z,F(D)):it(D)?(e.consume(D),z):G(D)}function J(D){return D===45||On(D)?(e.consume(D),J):D===47||D===62||Ot(D)?V(D):a(D)}function V(D){return D===47?(e.consume(D),G):D===58||D===95||Fn(D)?(e.consume(D),j):Fe(D)?(c=V,F(D)):it(D)?(e.consume(D),V):G(D)}function j(D){return D===45||D===46||D===58||D===95||On(D)?(e.consume(D),j):ee(D)}function ee(D){return D===61?(e.consume(D),se):Fe(D)?(c=ee,F(D)):it(D)?(e.consume(D),ee):V(D)}function se(D){return D===null||D===60||D===61||D===62||D===96?a(D):D===34||D===39?(e.consume(D),o=D,he):Fe(D)?(c=se,F(D)):it(D)?(e.consume(D),se):(e.consume(D),te)}function he(D){return D===o?(e.consume(D),o=void 0,K):D===null?a(D):Fe(D)?(c=he,F(D)):(e.consume(D),he)}function te(D){return D===null||D===34||D===39||D===60||D===61||D===96?a(D):D===47||D===62||Ot(D)?V(D):(e.consume(D),te)}function K(D){return D===47||D===62||Ot(D)?V(D):a(D)}function G(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):a(D)}function F(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),$}function $(D){return it(D)?ht(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):q(D)}function q(D){return e.enter("htmlTextData"),c(D)}}const rp={name:"labelEnd",resolveAll:aR,resolveTo:sR,tokenize:rR},eR={tokenize:iR},tR={tokenize:lR},nR={tokenize:oR};function aR(e){let t=-1;const a=[];for(;++t<e.length;){const r=e[t][1];if(a.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==a.length&&xa(e,0,e.length,a),e}function sR(e,t){let a=e.length,r=0,o,u,c,f;for(;a--;)if(o=e[a][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[a][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[a][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=a,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(c=a);const m={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},b={type:"labelText",start:{...e[u+r+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",m,t],["enter",h,t]],f=Ra(f,e.slice(u+1,u+r+3)),f=Ra(f,[["enter",b,t]]),f=Ra(f,nd(t.parser.constructs.insideSpan.null,e.slice(u+r+4,c-3),t)),f=Ra(f,[["exit",b,t],e[c-2],e[c-1],["exit",h,t]]),f=Ra(f,e.slice(c+1)),f=Ra(f,[["exit",m,t]]),xa(e,u,e.length,f),e}function rR(e,t,a){const r=this;let o=r.events.length,u,c;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){u=r.events[o][1];break}return f;function f(y){return u?u._inactive?g(y):(c=r.parser.defined.includes(Fa(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),m):a(y)}function m(y){return y===40?e.attempt(eR,b,c?b:g)(y):y===91?e.attempt(tR,b,c?h:g)(y):c?b(y):g(y)}function h(y){return e.attempt(nR,b,g)(y)}function b(y){return t(y)}function g(y){return u._balanced=!0,a(y)}}function iR(e,t,a){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return Ot(g)?fo(e,u)(g):u(g)}function u(g){return g===41?b(g):xN(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return Ot(g)?fo(e,m)(g):b(g)}function f(g){return a(g)}function m(g){return g===34||g===39||g===40?yN(e,h,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function h(g){return Ot(g)?fo(e,b)(g):b(g)}function b(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):a(g)}}function lR(e,t,a){const r=this;return o;function o(f){return EN.call(r,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return r.parser.defined.includes(Fa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(f):a(f)}function c(f){return a(f)}}function oR(e,t,a){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):a(u)}}const uR={name:"labelStartImage",resolveAll:rp.resolveAll,tokenize:cR};function cR(e,t,a){const r=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):a(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(f):t(f)}}const dR={name:"labelStartLink",resolveAll:rp.resolveAll,tokenize:fR};function fR(e,t,a){const r=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(c):t(c)}}const km={name:"lineEnding",tokenize:mR};function mR(e,t){return a;function a(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ht(e,t,"linePrefix")}}const yc={name:"thematicBreak",tokenize:hR};function hR(e,t,a){let r=0,o;return u;function u(h){return e.enter("thematicBreak"),c(h)}function c(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),m(h)):r>=3&&(h===null||Fe(h))?(e.exit("thematicBreak"),t(h)):a(h)}function m(h){return h===o?(e.consume(h),r++,m):(e.exit("thematicBreakSequence"),it(h)?ht(e,f,"whitespace")(h):f(h))}}const aa={continuation:{tokenize:xR},exit:yR,name:"list",tokenize:bR},pR={partial:!0,tokenize:NR},gR={partial:!0,tokenize:ER};function bR(e,t,a){const r=this,o=r.events[r.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(N){const S=r.containerState.type||(N===42||N===43||N===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||N===r.containerState.marker:ph(N)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),N===42||N===45?e.check(yc,a,h)(N):h(N);if(!r.interrupt||N===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(N)}return a(N)}function m(N){return ph(N)&&++c<10?(e.consume(N),m):(!r.interrupt||c<2)&&(r.containerState.marker?N===r.containerState.marker:N===41||N===46)?(e.exit("listItemValue"),h(N)):a(N)}function h(N){return e.enter("listItemMarker"),e.consume(N),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||N,e.check(jo,r.interrupt?a:b,e.attempt(pR,y,g))}function b(N){return r.containerState.initialBlankLine=!0,u++,y(N)}function g(N){return it(N)?(e.enter("listItemPrefixWhitespace"),e.consume(N),e.exit("listItemPrefixWhitespace"),y):a(N)}function y(N){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(N)}}function xR(e,t,a){const r=this;return r.containerState._closeFlow=void 0,e.check(jo,o,u);function o(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ht(e,t,"listItemIndent",r.containerState.size+1)(f)}function u(f){return r.containerState.furtherBlankLines||!it(f)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(f)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gR,t,c)(f))}function c(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,ht(e,e.attempt(aa,t,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function ER(e,t,a){const r=this;return ht(e,o,"listItemIndent",r.containerState.size+1);function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?t(u):a(u)}}function yR(e){e.exit(this.containerState.type)}function NR(e,t,a){const r=this;return ht(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const c=r.events[r.events.length-1];return!it(u)&&c&&c[1].type==="listItemPrefixWhitespace"?t(u):a(u)}}const o1={name:"setextUnderline",resolveTo:TR,tokenize:_R};function TR(e,t){let a=e.length,r,o,u;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){r=a;break}e[a][1].type==="paragraph"&&(o=a)}else e[a][1].type==="content"&&e.splice(a,1),!u&&e[a][1].type==="definition"&&(u=a);const c={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",c,t]),e.splice(u+1,0,["exit",e[r][1],t]),e[r][1].end={...e[u][1].end}):e[r][1]=c,e.push(["exit",c,t]),e}function _R(e,t,a){const r=this;let o;return u;function u(h){let b=r.events.length,g;for(;b--;)if(r.events[b][1].type!=="lineEnding"&&r.events[b][1].type!=="linePrefix"&&r.events[b][1].type!=="content"){g=r.events[b][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),o=h,c(h)):a(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),it(h)?ht(e,m,"lineSuffix")(h):m(h))}function m(h){return h===null||Fe(h)?(e.exit("setextHeadingLine"),t(h)):a(h)}}const vR={tokenize:SR};function SR(e){const t=this,a=e.attempt(jo,r,e.attempt(this.parser.constructs.flowInitial,o,ht(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Rk,o)),"linePrefix")));return a;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,a}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,a}}const AR={resolveAll:TN()},wR=NN("string"),CR=NN("text");function NN(e){return{resolveAll:TN(e==="text"?kR:void 0),tokenize:t};function t(a){const r=this,o=this.parser.constructs[e],u=a.attempt(o,c,f);return c;function c(b){return h(b)?u(b):f(b)}function f(b){if(b===null){a.consume(b);return}return a.enter("data"),a.consume(b),m}function m(b){return h(b)?(a.exit("data"),u(b)):(a.consume(b),m)}function h(b){if(b===null)return!0;const g=o[b];let y=-1;if(g)for(;++y<g.length;){const N=g[y];if(!N.previous||N.previous.call(r,r.previous))return!0}return!1}}}function TN(e){return t;function t(a,r){let o=-1,u;for(;++o<=a.length;)u===void 0?a[o]&&a[o][1].type==="data"&&(u=o,o++):(!a[o]||a[o][1].type!=="data")&&(o!==u+2&&(a[u][1].end=a[o-1][1].end,a.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(a,r):a}}function kR(e,t){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const r=e[a-1][1],o=t.sliceStream(r);let u=o.length,c=-1,f=0,m;for(;u--;){const h=o[u];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)m=!0,f++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&a===e.length&&(f=0),f){const h={type:a===e.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:r.start._bufferIndex+c,_index:r.start._index+u,line:r.end.line,column:r.end.column-f,offset:r.end.offset-f},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(a,0,["enter",h,t],["exit",h,t]),a+=2)}a++}return e}const RR={42:aa,43:aa,45:aa,48:aa,49:aa,50:aa,51:aa,52:aa,53:aa,54:aa,55:aa,56:aa,57:aa,62:hN},OR={91:Dk},IR={[-2]:Cm,[-1]:Cm,32:Cm},MR={35:Fk,42:yc,45:[o1,yc],60:Yk,61:o1,95:yc,96:i1,126:i1},LR={38:gN,92:pN},DR={[-5]:km,[-4]:km,[-3]:km,33:uR,38:gN,42:gh,60:[dk,Zk],91:dR,92:[Uk,pN],93:rp,95:gh,96:vk},jR={null:[gh,AR]},BR={null:[42,95]},PR={null:[]},UR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:BR,contentInitial:OR,disable:PR,document:RR,flow:MR,flowInitial:IR,insideSpan:jR,string:LR,text:DR},Symbol.toStringTag,{value:"Module"}));function HR(e,t,a){let r={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const o={},u=[];let c=[],f=[];const m={attempt:z(O),check:z(P),consume:M,enter:k,exit:L,interrupt:z(P,{interrupt:!0})},h={code:null,containerState:{},defineSkip:A,events:[],now:S,parser:e,previous:null,sliceSerialize:y,sliceStream:N,write:g};let b=t.tokenize.call(h,m);return t.resolveAll&&u.push(t),h;function g(ee){return c=Ra(c,ee),w(),c[c.length-1]!==null?[]:(J(t,0),h.events=nd(u,h.events,h),h.events)}function y(ee,se){return zR(N(ee),se)}function N(ee){return FR(c,ee)}function S(){const{_bufferIndex:ee,_index:se,line:he,column:te,offset:K}=r;return{_bufferIndex:ee,_index:se,line:he,column:te,offset:K}}function A(ee){o[ee.line]=ee.column,j()}function w(){let ee;for(;r._index<c.length;){const se=c[r._index];if(typeof se=="string")for(ee=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ee&&r._bufferIndex<se.length;)_(se.charCodeAt(r._bufferIndex));else _(se)}}function _(ee){b=b(ee)}function M(ee){Fe(ee)?(r.line++,r.column=1,r.offset+=ee===-3?2:1,j()):ee!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=ee}function k(ee,se){const he=se||{};return he.type=ee,he.start=S(),h.events.push(["enter",he,h]),f.push(he),he}function L(ee){const se=f.pop();return se.end=S(),h.events.push(["exit",se,h]),se}function O(ee,se){J(ee,se.from)}function P(ee,se){se.restore()}function z(ee,se){return he;function he(te,K,G){let F,$,q,D;return Array.isArray(te)?W(te):"tokenize"in te?W([te]):I(te);function I(B){return pe;function pe(Re){const De=Re!==null&&B[Re],lt=Re!==null&&B.null,Bt=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(lt)?lt:lt?[lt]:[]];return W(Bt)(Re)}}function W(B){return F=B,$=0,B.length===0?G:C(B[$])}function C(B){return pe;function pe(Re){return D=V(),q=B,B.partial||(h.currentConstruct=B),B.name&&h.parser.constructs.disable.null.includes(B.name)?_e():B.tokenize.call(se?Object.assign(Object.create(h),se):h,m,de,_e)(Re)}}function de(B){return ee(q,D),K}function _e(B){return D.restore(),++$<F.length?C(F[$]):G}}}function J(ee,se){ee.resolveAll&&!u.includes(ee)&&u.push(ee),ee.resolve&&xa(h.events,se,h.events.length-se,ee.resolve(h.events.slice(se),h)),ee.resolveTo&&(h.events=ee.resolveTo(h.events,h))}function V(){const ee=S(),se=h.previous,he=h.currentConstruct,te=h.events.length,K=Array.from(f);return{from:te,restore:G};function G(){r=ee,h.previous=se,h.currentConstruct=he,h.events.length=te,f=K,j()}}function j(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function FR(e,t){const a=t.start._index,r=t.start._bufferIndex,o=t.end._index,u=t.end._bufferIndex;let c;if(a===o)c=[e[a].slice(r,u)];else{if(c=e.slice(a,o),r>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(r):c.shift()}u>0&&c.push(e[o].slice(0,u))}return c}function zR(e,t){let a=-1;const r=[];let o;for(;++a<e.length;){const u=e[a];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
474
|
-
`;break}case-3:{c=`\r
|
|
475
|
-
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&o)continue;c=" ";break}default:c=String.fromCharCode(u)}o=u===-2,r.push(c)}return r.join("")}function $R(e){const r={constructs:fN([UR,...(e||{}).extensions||[]]),content:o(sk),defined:[],document:o(ik),flow:o(vR),lazy:{},string:o(wR),text:o(CR)};return r;function o(u){return c;function c(f){return HR(r,u,f)}}}function qR(e){for(;!bN(e););return e}const u1=/[\0\t\n\r]/g;function YR(){let e=1,t="",a=!0,r;return o;function o(u,c,f){const m=[];let h,b,g,y,N;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),g=0,t="",a&&(u.charCodeAt(0)===65279&&g++,a=void 0);g<u.length;){if(u1.lastIndex=g,h=u1.exec(u),y=h&&h.index!==void 0?h.index:u.length,N=u.charCodeAt(y),!h){t=u.slice(g);break}if(N===10&&g===y&&r)m.push(-3),r=void 0;else switch(r&&(m.push(-5),r=void 0),g<y&&(m.push(u.slice(g,y)),e+=y-g),N){case 0:{m.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,m.push(-2);e++<b;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:r=!0,e=1}g=y+1}return f&&(r&&m.push(-5),t&&m.push(t),m.push(null)),m}}const GR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function KR(e){return e.replace(GR,VR)}function VR(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){const o=a.charCodeAt(1),u=o===120||o===88;return mN(a.slice(u?2:1),u?16:10)}return sp(a)||e}const _N={}.hasOwnProperty;function XR(e,t,a){return t&&typeof t=="object"&&(a=t,t=void 0),QR(a)(qR($R(a).document().write(YR()(e,t,!0))))}function QR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Yn),autolinkProtocol:V,autolinkEmail:V,atxHeading:u($n),blockQuote:u(lt),characterEscape:V,characterReference:V,codeFenced:u(Bt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Bt,c),codeText:u(Jt,c),codeTextData:V,data:V,codeFlowValue:V,definition:u(ya),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(dn),hardBreakEscape:u(et),hardBreakTrailing:u(et),htmlFlow:u(qn,c),htmlFlowData:V,htmlText:u(qn,c),htmlTextData:V,image:u(Dn),label:c,link:u(Yn),listItem:u(Ee),listItemValue:y,listOrdered:u(Da,g),listUnordered:u(Da),paragraph:u(ft),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u($n),strong:u(la),thematicBreak:u(Jr)},exit:{atxHeading:m(),atxHeadingSequence:O,autolink:m(),autolinkEmail:De,autolinkProtocol:Re,blockQuote:m(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:B,characterReference:pe,codeFenced:m(w),codeFencedFence:A,codeFencedFenceInfo:N,codeFencedFenceMeta:S,codeFlowValue:j,codeIndented:m(_),codeText:m(K),codeTextData:j,data:j,definition:m(),definitionDestinationString:L,definitionLabelString:M,definitionTitleString:k,emphasis:m(),hardBreakEscape:m(se),hardBreakTrailing:m(se),htmlFlow:m(he),htmlFlowData:j,htmlText:m(te),htmlTextData:j,image:m(F),label:q,labelText:$,lineEnding:ee,link:m(G),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:de,resourceDestinationString:D,resourceTitleString:I,resource:W,setextHeading:m(J),setextHeadingLineSequence:z,setextHeadingText:P,strong:m(),thematicBreak:m()}};vN(t,(e||{}).mdastExtensions||[]);const a={};return r;function r(fe){let Ae={type:"root",children:[]};const ze={stack:[Ae],tokenStack:[],config:t,enter:f,exit:h,buffer:c,resume:b,data:a},tt=[];let pt=-1;for(;++pt<fe.length;)if(fe[pt][1].type==="listOrdered"||fe[pt][1].type==="listUnordered")if(fe[pt][0]==="enter")tt.push(pt);else{const jn=tt.pop();pt=o(fe,jn,pt)}for(pt=-1;++pt<fe.length;){const jn=t[fe[pt][0]];_N.call(jn,fe[pt][1].type)&&jn[fe[pt][1].type].call(Object.assign({sliceSerialize:fe[pt][2].sliceSerialize},ze),fe[pt][1])}if(ze.tokenStack.length>0){const jn=ze.tokenStack[ze.tokenStack.length-1];(jn[1]||c1).call(ze,void 0,jn[0])}for(Ae.position={start:sr(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:sr(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},pt=-1;++pt<t.transforms.length;)Ae=t.transforms[pt](Ae)||Ae;return Ae}function o(fe,Ae,ze){let tt=Ae-1,pt=-1,jn=!1,ja,bn,$t,An;for(;++tt<=ze;){const Et=fe[tt];switch(Et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Et[0]==="enter"?pt++:pt--,An=void 0;break}case"lineEndingBlank":{Et[0]==="enter"&&(ja&&!An&&!pt&&!$t&&($t=tt),An=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:An=void 0}if(!pt&&Et[0]==="enter"&&Et[1].type==="listItemPrefix"||pt===-1&&Et[0]==="exit"&&(Et[1].type==="listUnordered"||Et[1].type==="listOrdered")){if(ja){let $a=tt;for(bn=void 0;$a--;){const Bn=fe[$a];if(Bn[1].type==="lineEnding"||Bn[1].type==="lineEndingBlank"){if(Bn[0]==="exit")continue;bn&&(fe[bn][1].type="lineEndingBlank",jn=!0),Bn[1].type="lineEnding",bn=$a}else if(!(Bn[1].type==="linePrefix"||Bn[1].type==="blockQuotePrefix"||Bn[1].type==="blockQuotePrefixWhitespace"||Bn[1].type==="blockQuoteMarker"||Bn[1].type==="listItemIndent"))break}$t&&(!bn||$t<bn)&&(ja._spread=!0),ja.end=Object.assign({},bn?fe[bn][1].start:Et[1].end),fe.splice(bn||tt,0,["exit",ja,Et[2]]),tt++,ze++}if(Et[1].type==="listItemPrefix"){const $a={type:"listItem",_spread:!1,start:Object.assign({},Et[1].start),end:void 0};ja=$a,fe.splice(tt,0,["enter",$a,Et[2]]),tt++,ze++,$t=void 0,An=!0}}}return fe[Ae][1]._spread=jn,ze}function u(fe,Ae){return ze;function ze(tt){f.call(this,fe(tt),tt),Ae&&Ae.call(this,tt)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(fe,Ae,ze){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([Ae,ze||void 0]),fe.position={start:sr(Ae.start),end:void 0}}function m(fe){return Ae;function Ae(ze){fe&&fe.call(this,ze),h.call(this,ze)}}function h(fe,Ae){const ze=this.stack.pop(),tt=this.tokenStack.pop();if(tt)tt[0].type!==fe.type&&(Ae?Ae.call(this,fe,tt[0]):(tt[1]||c1).call(this,fe,tt[0]));else throw new Error("Cannot close `"+fe.type+"` ("+co({start:fe.start,end:fe.end})+"): it’s not open");ze.position.end=sr(fe.end)}function b(){return ap(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function y(fe){if(this.data.expectingFirstListItemValue){const Ae=this.stack[this.stack.length-2];Ae.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function N(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.lang=fe}function S(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.meta=fe}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=fe.replace(/(\r?\n|\r)$/g,"")}function M(fe){const Ae=this.resume(),ze=this.stack[this.stack.length-1];ze.label=Ae,ze.identifier=Fa(this.sliceSerialize(fe)).toLowerCase()}function k(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=fe}function L(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=fe}function O(fe){const Ae=this.stack[this.stack.length-1];if(!Ae.depth){const ze=this.sliceSerialize(fe).length;Ae.depth=ze}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function z(fe){const Ae=this.stack[this.stack.length-1];Ae.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function V(fe){const ze=this.stack[this.stack.length-1].children;let tt=ze[ze.length-1];(!tt||tt.type!=="text")&&(tt=It(),tt.position={start:sr(fe.start),end:void 0},ze.push(tt)),this.stack.push(tt)}function j(fe){const Ae=this.stack.pop();Ae.value+=this.sliceSerialize(fe),Ae.position.end=sr(fe.end)}function ee(fe){const Ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ze=Ae.children[Ae.children.length-1];ze.position.end=sr(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ae.type)&&(V.call(this,fe),j.call(this,fe))}function se(){this.data.atHardBreak=!0}function he(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=fe}function te(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=fe}function K(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=fe}function G(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Ae,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function F(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Ae,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function $(fe){const Ae=this.sliceSerialize(fe),ze=this.stack[this.stack.length-2];ze.label=KR(Ae),ze.identifier=Fa(Ae).toLowerCase()}function q(){const fe=this.stack[this.stack.length-1],Ae=this.resume(),ze=this.stack[this.stack.length-1];if(this.data.inReference=!0,ze.type==="link"){const tt=fe.children;ze.children=tt}else ze.alt=Ae}function D(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=fe}function I(){const fe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=fe}function W(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function de(fe){const Ae=this.resume(),ze=this.stack[this.stack.length-1];ze.label=Ae,ze.identifier=Fa(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function _e(fe){this.data.characterReferenceType=fe.type}function B(fe){const Ae=this.sliceSerialize(fe),ze=this.data.characterReferenceType;let tt;ze?(tt=mN(Ae,ze==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):tt=sp(Ae);const pt=this.stack[this.stack.length-1];pt.value+=tt}function pe(fe){const Ae=this.stack.pop();Ae.position.end=sr(fe.end)}function Re(fe){j.call(this,fe);const Ae=this.stack[this.stack.length-1];Ae.url=this.sliceSerialize(fe)}function De(fe){j.call(this,fe);const Ae=this.stack[this.stack.length-1];Ae.url="mailto:"+this.sliceSerialize(fe)}function lt(){return{type:"blockquote",children:[]}}function Bt(){return{type:"code",lang:null,meta:null,value:""}}function Jt(){return{type:"inlineCode",value:""}}function ya(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function dn(){return{type:"emphasis",children:[]}}function $n(){return{type:"heading",depth:0,children:[]}}function et(){return{type:"break"}}function qn(){return{type:"html",value:""}}function Dn(){return{type:"image",title:null,url:"",alt:null}}function Yn(){return{type:"link",title:null,url:"",children:[]}}function Da(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function Ee(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function ft(){return{type:"paragraph",children:[]}}function la(){return{type:"strong",children:[]}}function It(){return{type:"text",value:""}}function Jr(){return{type:"thematicBreak"}}}function sr(e){return{line:e.line,column:e.column,offset:e.offset}}function vN(e,t){let a=-1;for(;++a<t.length;){const r=t[a];Array.isArray(r)?vN(e,r):WR(e,r)}}function WR(e,t){let a;for(a in t)if(_N.call(t,a))switch(a){case"canContainEols":{const r=t[a];r&&e[a].push(...r);break}case"transforms":{const r=t[a];r&&e[a].push(...r);break}case"enter":case"exit":{const r=t[a];r&&Object.assign(e[a],r);break}}}function c1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+co({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+co({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+co({start:t.start,end:t.end})+") is still open")}function ZR(e){const t=this;t.parser=a;function a(r){return XR(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function JR(e,t){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,a),e.applyData(t,a)}function e4(e,t){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
|
|
476
|
-
`}]}function t4(e,t){const a=t.value?t.value+`
|
|
477
|
-
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:r,children:[{type:"text",value:a}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function n4(e,t){const a={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function a4(e,t){const a={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function s4(e,t){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=tl(r.toLowerCase()),u=e.footnoteOrder.indexOf(r);let c,f=e.footnoteCounts.get(r);f===void 0?(f=0,e.footnoteOrder.push(r),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(r,f);const m={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+o,id:a+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(t,h),e.applyData(t,h)}function r4(e,t){const a={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function i4(e,t){if(e.options.allowDangerousHtml){const a={type:"raw",value:t.value};return e.patch(t,a),e.applyData(t,a)}}function SN(e,t){const a=t.referenceType;let r="]";if(a==="collapsed"?r+="[]":a==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=r:o.push({type:"text",value:r}),o}function l4(e,t){const a=String(t.identifier).toUpperCase(),r=e.definitionById.get(a);if(!r)return SN(e,t);const o={src:tl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,u),e.applyData(t,u)}function o4(e,t){const a={src:tl(t.url)};t.alt!==null&&t.alt!==void 0&&(a.alt=t.alt),t.title!==null&&t.title!==void 0&&(a.title=t.title);const r={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,r),e.applyData(t,r)}function u4(e,t){const a={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,a);const r={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(t,r),e.applyData(t,r)}function c4(e,t){const a=String(t.identifier).toUpperCase(),r=e.definitionById.get(a);if(!r)return SN(e,t);const o={href:tl(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function d4(e,t){const a={href:tl(t.url)};t.title!==null&&t.title!==void 0&&(a.title=t.title);const r={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function f4(e,t,a){const r=e.all(t),o=a?m4(a):AN(t),u={},c=[];if(typeof t.checked=="boolean"){const b=r[0];let g;b&&b.type==="element"&&b.tagName==="p"?g=b:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<r.length;){const b=r[f];(o||f!==0||b.type!=="element"||b.tagName!=="p")&&c.push({type:"text",value:`
|
|
478
|
-
`}),b.type==="element"&&b.tagName==="p"&&!o?c.push(...b.children):c.push(b)}const m=r[r.length-1];m&&(o||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
479
|
-
`});const h={type:"element",tagName:"li",properties:u,children:c};return e.patch(t,h),e.applyData(t,h)}function m4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const a=e.children;let r=-1;for(;!t&&++r<a.length;)t=AN(a[r])}return t}function AN(e){const t=e.spread;return t??e.children.length>1}function h4(e,t){const a={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(a.start=t.start);++o<r.length;){const c=r[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:a,children:e.wrap(r,!0)};return e.patch(t,u),e.applyData(t,u)}function p4(e,t){const a={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function g4(e,t){const a={type:"root",children:e.wrap(e.all(t))};return e.patch(t,a),e.applyData(t,a)}function b4(e,t){const a={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function x4(e,t){const a=e.all(t),r=a.shift(),o=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],c),o.push(c)}if(a.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},f=ts(t.children[1]),m=ed(t.children[t.children.length-1]);f&&m&&(c.position={start:f,end:m}),o.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function E4(e,t,a){const r=a?a.children:void 0,u=(r?r.indexOf(t):1)===0?"th":"td",c=a&&a.type==="table"?a.align:void 0,f=c?c.length:t.children.length;let m=-1;const h=[];for(;++m<f;){const g=t.children[m],y={},N=c?c[m]:void 0;N&&(y.align=N);let S={type:"element",tagName:u,properties:y,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),h.push(S)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,b),e.applyData(t,b)}function y4(e,t){const a={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}const d1=9,f1=32;function N4(e){const t=String(e),a=/\r?\n|\r/g;let r=a.exec(t),o=0;const u=[];for(;r;)u.push(m1(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=a.exec(t);return u.push(m1(t.slice(o),o>0,!1)),u.join("")}function m1(e,t,a){let r=0,o=e.length;if(t){let u=e.codePointAt(r);for(;u===d1||u===f1;)r++,u=e.codePointAt(r)}if(a){let u=e.codePointAt(o-1);for(;u===d1||u===f1;)o--,u=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function T4(e,t){const a={type:"text",value:N4(String(t.value))};return e.patch(t,a),e.applyData(t,a)}function _4(e,t){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,a),e.applyData(t,a)}const v4={blockquote:JR,break:e4,code:t4,delete:n4,emphasis:a4,footnoteReference:s4,heading:r4,html:i4,imageReference:l4,image:o4,inlineCode:u4,linkReference:c4,link:d4,listItem:f4,list:h4,paragraph:p4,root:g4,strong:b4,table:x4,tableCell:y4,tableRow:E4,text:T4,thematicBreak:_4,toml:lc,yaml:lc,definition:lc,footnoteDefinition:lc};function lc(){}const wN=-1,ad=0,mo=1,Oc=2,ip=3,lp=4,op=5,up=6,CN=7,kN=8,RN=typeof self=="object"?self:globalThis,h1=(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 RN[e](t)},S4=(e,t)=>{const a=(o,u)=>(e.set(u,o),o),r=o=>{if(e.has(o))return e.get(o);const[u,c]=t[o];switch(u){case ad:case wN:return a(c,o);case mo:{const f=a([],o);for(const m of c)f.push(r(m));return f}case Oc:{const f=a({},o);for(const[m,h]of c)f[r(m)]=r(h);return f}case ip:return a(new Date(c),o);case lp:{const{source:f,flags:m}=c;return a(new RegExp(f,m),o)}case op:{const f=a(new Map,o);for(const[m,h]of c)f.set(r(m),r(h));return f}case up:{const f=a(new Set,o);for(const m of c)f.add(r(m));return f}case CN:{const{name:f,message:m}=c;return a(typeof RN[f]=="function"?h1(f,m):new Error(m),o)}case kN:return a(BigInt(c),o);case"BigInt":return a(Object(BigInt(c)),o);case"ArrayBuffer":return a(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return a(new DataView(f),c)}}return a(h1(u,c),o)};return r},p1=e=>S4(new Map,e)(0),Br="",{toString:A4}={},{keys:w4}=Object,so=e=>{const t=typeof e;if(t!=="object"||!e)return[ad,t];const a=A4.call(e).slice(8,-1);switch(a){case"Array":return[mo,Br];case"Object":return[Oc,Br];case"Date":return[ip,Br];case"RegExp":return[lp,Br];case"Map":return[op,Br];case"Set":return[up,Br];case"DataView":return[mo,a]}return a.includes("Array")?[mo,a]:e instanceof Error?[CN,e.name||"Error"]:[Oc,a]},oc=([e,t])=>e===ad&&(t==="function"||t==="symbol"),C4=(e,t,a,r)=>{const o=(c,f)=>{const m=r.push(c)-1;return a.set(f,m),m},u=c=>{if(a.has(c))return a.get(c);let[f,m]=so(c);switch(f){case ad:{let b=c;switch(m){case"bigint":f=kN,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);b=null;break;case"undefined":return o([wN],c)}return o([f,b],c)}case mo:{if(m){let y=c;return m==="DataView"?y=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(y=new Uint8Array(c)),o([m,[...y]],c)}const b=[],g=o([f,b],c);for(const y of c)b.push(u(y));return g}case Oc:{if(m)switch(m){case"BigInt":return o([m,c.toString()],c);case"Boolean":case"Number":case"String":return o([m,c.valueOf()],c)}if(t&&"toJSON"in c)return u(c.toJSON());const b=[],g=o([f,b],c);for(const y of w4(c))(e||!oc(so(c[y])))&&b.push([u(y),u(c[y])]);return g}case ip:return o([f,isNaN(c.getTime())?Br:c.toISOString()],c);case lp:{const{source:b,flags:g}=c;return o([f,{source:b,flags:g}],c)}case op:{const b=[],g=o([f,b],c);for(const[y,N]of c)(e||!(oc(so(y))||oc(so(N))))&&b.push([u(y),u(N)]);return g}case up:{const b=[],g=o([f,b],c);for(const y of c)(e||!oc(so(y)))&&b.push(u(y));return g}}const{message:h}=c;return o([f,{name:m,message:h}],c)};return u},g1=(e,{json:t,lossy:a}={})=>{const r=[];return C4(!(t||a),!!t,new Map,r)(e),r},Ki=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?p1(g1(e,t)):structuredClone(e):(e,t)=>p1(g1(e,t));function k4(e,t){const a=[{type:"text",value:"↩"}];return t>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),a}function R4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function O4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||k4,r=e.options.footnoteBackLabel||R4,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[m]);if(!h)continue;const b=e.all(h),g=String(h.identifier).toUpperCase(),y=tl(g.toLowerCase());let N=0;const S=[],A=e.footnoteCounts.get(g);for(;A!==void 0&&++N<=A;){S.length>0&&S.push({type:"text",value:" "});let M=typeof a=="string"?a:a(m,N);typeof M=="string"&&(M={type:"text",value:M}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(N>1?"-"+N:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(m,N),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const w=b[b.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const M=w.children[w.children.length-1];M&&M.type==="text"?M.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...S)}else b.push(...S);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(b,!0)};e.patch(h,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Ki(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
480
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
481
|
-
`}]}}const Bo=(function(e){if(e==null)return D4;if(typeof e=="function")return sd(e);if(typeof e=="object")return Array.isArray(e)?I4(e):M4(e);if(typeof e=="string")return L4(e);throw new Error("Expected function, string, or object as test")});function I4(e){const t=[];let a=-1;for(;++a<e.length;)t[a]=Bo(e[a]);return sd(r);function r(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function M4(e){const t=e;return sd(a);function a(r){const o=r;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function L4(e){return sd(t);function t(a){return a&&a.type===e}}function sd(e){return t;function t(a,r,o){return!!(j4(a)&&e.call(this,a,typeof r=="number"?r:void 0,o||void 0))}}function D4(){return!0}function j4(e){return e!==null&&typeof e=="object"&&"type"in e}const ON=[],B4=!0,bh=!1,P4="skip";function IN(e,t,a,r){let o;typeof t=="function"&&typeof a!="function"?(r=a,a=t):o=t;const u=Bo(o),c=r?-1:1;f(e,void 0,[])();function f(m,h,b){const g=m&&typeof m=="object"?m:{};if(typeof g.type=="string"){const N=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(m.type+(N?"<"+N+">":""))+")"})}return y;function y(){let N=ON,S,A,w;if((!t||u(m,h,b[b.length-1]||void 0))&&(N=U4(a(m,b)),N[0]===bh))return N;if("children"in m&&m.children){const _=m;if(_.children&&N[0]!==P4)for(A=(r?_.children.length:-1)+c,w=b.concat(_);A>-1&&A<_.children.length;){const M=_.children[A];if(S=f(M,A,w)(),S[0]===bh)return S;A=typeof S[1]=="number"?S[1]:A+c}}return N}}}function U4(e){return Array.isArray(e)?e:typeof e=="number"?[B4,e]:e==null?ON:[e]}function Po(e,t,a,r){let o,u,c;typeof t=="function"&&typeof a!="function"?(u=void 0,c=t,o=a):(u=t,c=a,o=r),IN(e,u,f,o);function f(m,h){const b=h[h.length-1],g=b?b.children.indexOf(m):void 0;return c(m,g,b)}}const xh={}.hasOwnProperty,H4={};function F4(e,t){const a=t||H4,r=new Map,o=new Map,u=new Map,c={...v4,...a.handlers},f={all:h,applyData:$4,definitionById:r,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:m,options:a,patch:z4,wrap:Y4};return Po(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const g=b.type==="definition"?r:o,y=String(b.identifier).toUpperCase();g.has(y)||g.set(y,b)}}),f;function m(b,g){const y=b.type,N=f.handlers[y];if(xh.call(f.handlers,y)&&N)return N(f,b,g);if(f.options.passThrough&&f.options.passThrough.includes(y)){if("children"in b){const{children:A,...w}=b,_=Ki(w);return _.children=f.all(b),_}return Ki(b)}return(f.options.unknownHandler||q4)(f,b,g)}function h(b){const g=[];if("children"in b){const y=b.children;let N=-1;for(;++N<y.length;){const S=f.one(y[N],b);if(S){if(N&&y[N-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=b1(S.value)),!Array.isArray(S)&&S.type==="element")){const A=S.children[0];A&&A.type==="text"&&(A.value=b1(A.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function z4(e,t){e.position&&(t.position=RC(e))}function $4(e,t){let a=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof r=="string")if(a.type==="element")a.tagName=r;else{const c="children"in a?a.children:[a];a={type:"element",tagName:r,properties:{},children:c}}a.type==="element"&&u&&Object.assign(a.properties,Ki(u)),"children"in a&&a.children&&o!==null&&o!==void 0&&(a.children=o)}return a}function q4(e,t){const a=t.data||{},r="value"in t&&!(xh.call(a,"hProperties")||xh.call(a,"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 Y4(e,t){const a=[];let r=-1;for(t&&a.push({type:"text",value:`
|
|
482
|
-
`});++r<e.length;)r&&a.push({type:"text",value:`
|
|
483
|
-
`}),a.push(e[r]);return t&&e.length>0&&a.push({type:"text",value:`
|
|
484
|
-
`}),a}function b1(e){let t=0,a=e.charCodeAt(t);for(;a===9||a===32;)t++,a=e.charCodeAt(t);return e.slice(t)}function x1(e,t){const a=F4(e,t),r=a.one(e,void 0),o=O4(a),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
|
|
485
|
-
`},o),u}function G4(e,t){return e&&"run"in e?async function(a,r){const o=x1(a,{file:r,...t});await e.run(o,r)}:function(a,r){return x1(a,{file:r,...e||t})}}function E1(e){if(e)throw e}var Rm,y1;function K4(){if(y1)return Rm;y1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},u=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var b=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!b&&!g)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},c=function(h,b){a&&b.name==="__proto__"?a(h,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):h[b.name]=b.newValue},f=function(h,b){if(b==="__proto__")if(e.call(h,b)){if(r)return r(h,b).value}else return;return h[b]};return Rm=function m(){var h,b,g,y,N,S,A=arguments[0],w=1,_=arguments.length,M=!1;for(typeof A=="boolean"&&(M=A,A=arguments[1]||{},w=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});w<_;++w)if(h=arguments[w],h!=null)for(b in h)g=f(A,b),y=f(h,b),A!==y&&(M&&y&&(u(y)||(N=o(y)))?(N?(N=!1,S=g&&o(g)?g:[]):S=g&&u(g)?g:{},c(A,{name:b,newValue:m(M,S,y)})):typeof y<"u"&&c(A,{name:b,newValue:y}));return A},Rm}var V4=K4();const Om=qc(V4);function Eh(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 X4(){const e=[],t={run:a,use:r};return t;function a(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(m,...h){const b=e[++u];let g=-1;if(m){c(m);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,b?Q4(b,f)(...h):c(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function Q4(e,t){let a;return r;function r(...c){const f=e.length>c.length;let m;f&&c.push(o);try{m=e.apply(this,c)}catch(h){const b=h;if(f&&a)throw b;return o(b)}f||(m&&m.then&&typeof m.then=="function"?m.then(u,o):m instanceof Error?o(m):u(m))}function o(c,...f){a||(a=!0,t(c,...f))}function u(c){o(null,c)}}const Wa={basename:W4,dirname:Z4,extname:J4,join:eO,sep:"/"};function W4(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Uo(e);let a=0,r=-1,o=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){a=o+1;break}}else r<0&&(u=!0,r=o+1);return r<0?"":e.slice(a,r)}if(t===e)return"";let c=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){a=o+1;break}}else c<0&&(u=!0,c=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(r=o):(f=-1,r=c));return a===r?r=c:r<0&&(r=e.length),e.slice(a,r)}function Z4(e){if(Uo(e),e.length===0)return".";let t=-1,a=e.length,r;for(;--a;)if(e.codePointAt(a)===47){if(r){t=a;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function J4(e){Uo(e);let t=e.length,a=-1,r=0,o=-1,u=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){r=t+1;break}continue}a<0&&(c=!0,a=t+1),f===46?o<0?o=t:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||a<0||u===0||u===1&&o===a-1&&o===r+1?"":e.slice(o,a)}function eO(...e){let t=-1,a;for(;++t<e.length;)Uo(e[t]),e[t]&&(a=a===void 0?e[t]:a+"/"+e[t]);return a===void 0?".":tO(a)}function tO(e){Uo(e);const t=e.codePointAt(0)===47;let a=nO(e,!t);return a.length===0&&!t&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),t?"/"+a:a}function nO(e,t){let a="",r=0,o=-1,u=0,c=-1,f,m;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(a.length<2||r!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(m=a.lastIndexOf("/"),m!==a.length-1){m<0?(a="",r=0):(a=a.slice(0,m),r=a.length-1-a.lastIndexOf("/")),o=c,u=0;continue}}else if(a.length>0){a="",r=0,o=c,u=0;continue}}t&&(a=a.length>0?a+"/..":"..",r=2)}else a.length>0?a+="/"+e.slice(o+1,c):a=e.slice(o+1,c),r=c-o-1;o=c,u=0}else f===46&&u>-1?u++:u=-1}return a}function Uo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const aO={cwd:sO};function sO(){return"/"}function yh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rO(e){if(typeof e=="string")e=new URL(e);else if(!yh(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 iO(e)}function iO(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 a=-1;for(;++a<t.length;)if(t.codePointAt(a)===37&&t.codePointAt(a+1)===50){const r=t.codePointAt(a+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Im=["history","path","basename","stem","extname","dirname"];class MN{constructor(t){let a;t?yh(t)?a={path:t}:typeof t=="string"||lO(t)?a={value:t}:a=t:a={},this.cwd="cwd"in a?"":aO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Im.length;){const u=Im[r];u in a&&a[u]!==void 0&&a[u]!==null&&(this[u]=u==="history"?[...a[u]]:a[u])}let o;for(o in a)Im.includes(o)||(this[o]=a[o])}get basename(){return typeof this.path=="string"?Wa.basename(this.path):void 0}set basename(t){Lm(t,"basename"),Mm(t,"basename"),this.path=Wa.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Wa.dirname(this.path):void 0}set dirname(t){N1(this.basename,"dirname"),this.path=Wa.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Wa.extname(this.path):void 0}set extname(t){if(Mm(t,"extname"),N1(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=Wa.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){yh(t)&&(t=rO(t)),Lm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Wa.basename(this.path,this.extname):void 0}set stem(t){Lm(t,"stem"),Mm(t,"stem"),this.path=Wa.join(this.dirname||"",t+(this.extname||""))}fail(t,a,r){const o=this.message(t,a,r);throw o.fatal=!0,o}info(t,a,r){const o=this.message(t,a,r);return o.fatal=void 0,o}message(t,a,r){const o=new Mn(t,a,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Mm(e,t){if(e&&e.includes(Wa.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Wa.sep+"`")}function Lm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function N1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function lO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oO=(function(e){const r=this.constructor.prototype,o=r[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),uO={}.hasOwnProperty;class cp extends oO{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=X4()}copy(){const t=new cp;let a=-1;for(;++a<this.attachers.length;){const r=this.attachers[a];t.use(...r)}return t.data(Om(!0,{},this.namespace)),t}data(t,a){return typeof t=="string"?arguments.length===2?(Bm("data",this.frozen),this.namespace[t]=a,this):uO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Bm("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[a,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=a.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const a=uc(t),r=this.parser||this.Parser;return Dm("parse",r),r(String(a),a)}process(t,a){const r=this;return this.freeze(),Dm("process",this.parser||this.Parser),jm("process",this.compiler||this.Compiler),a?o(void 0,a):new Promise(o);function o(u,c){const f=uc(t),m=r.parse(f);r.run(m,f,function(b,g,y){if(b||!g||!y)return h(b);const N=g,S=r.stringify(N,y);fO(S)?y.value=S:y.result=S,h(b,y)});function h(b,g){b||!g?c(b):u?u(g):a(void 0,g)}}}processSync(t){let a=!1,r;return this.freeze(),Dm("processSync",this.parser||this.Parser),jm("processSync",this.compiler||this.Compiler),this.process(t,o),_1("processSync","process",a),r;function o(u,c){a=!0,E1(u),r=c}}run(t,a,r){T1(t),this.freeze();const o=this.transformers;return!r&&typeof a=="function"&&(r=a,a=void 0),r?u(void 0,r):new Promise(u);function u(c,f){const m=uc(a);o.run(t,m,h);function h(b,g,y){const N=g||t;b?f(b):c?c(N):r(void 0,N,y)}}}runSync(t,a){let r=!1,o;return this.run(t,a,u),_1("runSync","run",r),o;function u(c,f){E1(c),o=f,r=!0}}stringify(t,a){this.freeze();const r=uc(a),o=this.compiler||this.Compiler;return jm("stringify",o),T1(t),o(t,r)}use(t,...a){const r=this.attachers,o=this.namespace;if(Bm("use",this.frozen),t!=null)if(typeof t=="function")m(t,a);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[b,...g]=h;m(b,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))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");f(h.plugins),h.settings&&(o.settings=Om(!0,o.settings,h.settings))}function f(h){let b=-1;if(h!=null)if(Array.isArray(h))for(;++b<h.length;){const g=h[b];u(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,b){let g=-1,y=-1;for(;++g<r.length;)if(r[g][0]===h){y=g;break}if(y===-1)r.push([h,...b]);else if(b.length>0){let[N,...S]=b;const A=r[y][1];Eh(A)&&Eh(N)&&(N=Om(!0,A,N)),r[y]=[h,N,...S]}}}}const cO=new cp().freeze();function Dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Bm(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 T1(e){if(!Eh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _1(e,t,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function uc(e){return dO(e)?e:new MN(e)}function dO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fO(e){return typeof e=="string"||mO(e)}function mO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",v1=[],S1={allowDangerousHtml:!0},pO=/^(https?|ircs?|mailto|xmpp)$/i,gO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Yr(e){const t=bO(e),a=xO(e);return EO(t.runSync(t.parse(a),a),e)}function bO(e){const t=e.rehypePlugins||v1,a=e.remarkPlugins||v1,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...S1}:S1;return cO().use(ZR).use(a).use(G4,r).use(t)}function xO(e){const t=e.children||"",a=new MN;return typeof t=="string"&&(a.value=t),a}function EO(e,t){const a=t.allowedElements,r=t.allowElement,o=t.components,u=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,m=t.urlTransform||yO;for(const b of gO)Object.hasOwn(t,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+hO+b.id,void 0);return Po(e,h),DC(e,{Fragment:i.Fragment,components:o,ignoreInvalidStyle:!0,jsx:i.jsx,jsxs:i.jsxs,passKeys:!0,passNode:!0});function h(b,g,y){if(b.type==="raw"&&y&&typeof g=="number")return c?y.children.splice(g,1):y.children[g]={type:"text",value:b.value},g;if(b.type==="element"){let N;for(N in wm)if(Object.hasOwn(wm,N)&&Object.hasOwn(b.properties,N)){const S=b.properties[N],A=wm[N];(A===null||A.includes(b.tagName))&&(b.properties[N]=m(String(S||""),N,b))}}if(b.type==="element"){let N=a?!a.includes(b.tagName):u?u.includes(b.tagName):!1;if(!N&&r&&typeof g=="number"&&(N=!r(b,g,y)),N&&y&&typeof g=="number")return f&&b.children?y.children.splice(g,1,...b.children):y.children.splice(g,1),g}}}function yO(e){const t=e.indexOf(":"),a=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||a!==-1&&t>a||r!==-1&&t>r||pO.test(e.slice(0,t))?e:""}function A1(e,t){const a=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=a.indexOf(t);for(;o!==-1;)r++,o=a.indexOf(t,o+t.length);return r}function NO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function TO(e,t,a){const o=Bo((a||{}).ignore||[]),u=_O(t);let c=-1;for(;++c<u.length;)IN(e,"text",f);function f(h,b){let g=-1,y;for(;++g<b.length;){const N=b[g],S=y?y.children:void 0;if(o(N,S?S.indexOf(N):void 0,y))return;y=N}if(y)return m(h,b)}function m(h,b){const g=b[b.length-1],y=u[c][0],N=u[c][1];let S=0;const w=g.children.indexOf(h);let _=!1,M=[];y.lastIndex=0;let k=y.exec(h.value);for(;k;){const L=k.index,O={index:k.index,input:k.input,stack:[...b,h]};let P=N(...k,O);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?y.lastIndex=L+1:(S!==L&&M.push({type:"text",value:h.value.slice(S,L)}),Array.isArray(P)?M.push(...P):P&&M.push(P),S=L+k[0].length,_=!0),!y.global)break;k=y.exec(h.value)}return _?(S<h.value.length&&M.push({type:"text",value:h.value.slice(S)}),g.children.splice(w,1,...M)):M=[h],w+M.length}}function _O(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<a.length;){const o=a[r];t.push([vO(o[0]),SO(o[1])])}return t}function vO(e){return typeof e=="string"?new RegExp(NO(e),"g"):e}function SO(e){return typeof e=="function"?e:function(){return e}}const Pm="phrasing",Um=["autolink","link","image","label"];function AO(){return{transforms:[MO],enter:{literalAutolink:CO,literalAutolinkEmail:Hm,literalAutolinkHttp:Hm,literalAutolinkWww:Hm},exit:{literalAutolink:IO,literalAutolinkEmail:OO,literalAutolinkHttp:kO,literalAutolinkWww:RO}}}function wO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Pm,notInConstruct:Um},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Pm,notInConstruct:Um},{character:":",before:"[ps]",after:"\\/",inConstruct:Pm,notInConstruct:Um}]}}function CO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Hm(e){this.config.enter.autolinkProtocol.call(this,e)}function kO(e){this.config.exit.autolinkProtocol.call(this,e)}function RO(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 OO(e){this.config.exit.autolinkEmail.call(this,e)}function IO(e){this.exit(e)}function MO(e){TO(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),DO]],{ignore:["link","linkReference"]})}function LO(e,t,a,r,o){let u="";if(!LN(o)||(/^w/i.test(t)&&(a=t+a,t="",u="http://"),!jO(a)))return!1;const c=BO(a+r);if(!c[0])return!1;const f={type:"link",title:null,url:u+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function DO(e,t,a,r){return!LN(r,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+a,children:[{type:"text",value:t+"@"+a}]}}function jO(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 BO(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let a=t[0],r=a.indexOf(")");const o=A1(e,"(");let u=A1(e,")");for(;r!==-1&&o>u;)e+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),u++;return[e,a]}function LN(e,t){const a=e.input.charCodeAt(e.index-1);return(e.index===0||qr(a)||td(a))&&(!t||a!==47)}DN.peek=GO;function PO(){this.buffer()}function UO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function HO(){this.buffer()}function FO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function zO(e){const t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Fa(this.sliceSerialize(e)).toLowerCase(),a.label=t}function $O(e){this.exit(e)}function qO(e){const t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Fa(this.sliceSerialize(e)).toLowerCase(),a.label=t}function YO(e){this.exit(e)}function GO(){return"["}function DN(e,t,a,r){const o=a.createTracker(r);let u=o.move("[^");const c=a.enter("footnoteReference"),f=a.enter("reference");return u+=o.move(a.safe(a.associationId(e),{after:"]",before:u})),f(),c(),u+=o.move("]"),u}function KO(){return{enter:{gfmFootnoteCallString:PO,gfmFootnoteCall:UO,gfmFootnoteDefinitionLabelString:HO,gfmFootnoteDefinition:FO},exit:{gfmFootnoteCallString:zO,gfmFootnoteCall:$O,gfmFootnoteDefinitionLabelString:qO,gfmFootnoteDefinition:YO}}}function VO(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:a,footnoteReference:DN},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(r,o,u,c){const f=u.createTracker(c);let m=f.move("[^");const h=u.enter("footnoteDefinition"),b=u.enter("label");return m+=f.move(u.safe(u.associationId(r),{before:m,after:"]"})),b(),m+=f.move("]:"),r.children&&r.children.length>0&&(f.shift(4),m+=f.move((t?`
|
|
486
|
-
`:" ")+u.indentLines(u.containerFlow(r,f.current()),t?jN:XO))),h(),m}}function XO(e,t,a){return t===0?e:jN(e,t,a)}function jN(e,t,a){return(a?"":" ")+e}const QO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];BN.peek=tI;function WO(){return{canContainEols:["delete"],enter:{strikethrough:JO},exit:{strikethrough:eI}}}function ZO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:QO}],handlers:{delete:BN}}}function JO(e){this.enter({type:"delete",children:[]},e)}function eI(e){this.exit(e)}function BN(e,t,a,r){const o=a.createTracker(r),u=a.enter("strikethrough");let c=o.move("~~");return c+=a.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),u(),c}function tI(){return"~"}function nI(e){return e.length}function aI(e,t){const a=t||{},r=(a.align||[]).concat(),o=a.stringLength||nI,u=[],c=[],f=[],m=[];let h=0,b=-1;for(;++b<e.length;){const A=[],w=[];let _=-1;for(e[b].length>h&&(h=e[b].length);++_<e[b].length;){const M=sI(e[b][_]);if(a.alignDelimiters!==!1){const k=o(M);w[_]=k,(m[_]===void 0||k>m[_])&&(m[_]=k)}A.push(M)}c[b]=A,f[b]=w}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<h;)u[g]=w1(r[g]);else{const A=w1(r);for(;++g<h;)u[g]=A}g=-1;const y=[],N=[];for(;++g<h;){const A=u[g];let w="",_="";A===99?(w=":",_=":"):A===108?w=":":A===114&&(_=":");let M=a.alignDelimiters===!1?1:Math.max(1,m[g]-w.length-_.length);const k=w+"-".repeat(M)+_;a.alignDelimiters!==!1&&(M=w.length+M+_.length,M>m[g]&&(m[g]=M),N[g]=M),y[g]=k}c.splice(1,0,y),f.splice(1,0,N),b=-1;const S=[];for(;++b<c.length;){const A=c[b],w=f[b];g=-1;const _=[];for(;++g<h;){const M=A[g]||"";let k="",L="";if(a.alignDelimiters!==!1){const O=m[g]-(w[g]||0),P=u[g];P===114?k=" ".repeat(O):P===99?O%2?(k=" ".repeat(O/2+.5),L=" ".repeat(O/2-.5)):(k=" ".repeat(O/2),L=k):L=" ".repeat(O)}a.delimiterStart!==!1&&!g&&_.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&M==="")&&(a.delimiterStart!==!1||g)&&_.push(" "),a.alignDelimiters!==!1&&_.push(k),_.push(M),a.alignDelimiters!==!1&&_.push(L),a.padding!==!1&&_.push(" "),(a.delimiterEnd!==!1||g!==h-1)&&_.push("|")}S.push(a.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return S.join(`
|
|
487
|
-
`)}function sI(e){return e==null?"":String(e)}function w1(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}const C1={}.hasOwnProperty;function PN(e,t){const a=t||{};function r(o,...u){let c=r.invalid;const f=r.handlers;if(o&&C1.call(o,e)){const m=String(o[e]);c=C1.call(f,m)?f[m]:r.unknown}if(c)return c.call(this,o,...u)}return r.handlers=a.handlers||{},r.invalid=a.invalid,r.unknown=a.unknown,r}function rI(e,t,a,r){const o=a.enter("blockquote"),u=a.createTracker(r);u.move("> "),u.shift(2);const c=a.indentLines(a.containerFlow(e,u.current()),iI);return o(),c}function iI(e,t,a){return">"+(a?"":" ")+e}function lI(e,t){return k1(e,t.inConstruct,!0)&&!k1(e,t.notInConstruct,!1)}function k1(e,t,a){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return a;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function R1(e,t,a,r){let o=-1;for(;++o<a.unsafe.length;)if(a.unsafe[o].character===`
|
|
488
|
-
`&&lI(a.stack,a.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
489
|
-
`}function oI(e,t){const a=String(e);let r=a.indexOf(t),o=r,u=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++u>c&&(c=u):u=1,o=r+t.length,r=a.indexOf(t,o);return c}function uI(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 cI(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 dI(e,t,a,r){const o=cI(a),u=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(uI(e,a)){const g=a.enter("codeIndented"),y=a.indentLines(u,fI);return g(),y}const f=a.createTracker(r),m=o.repeat(Math.max(oI(u,o)+1,3)),h=a.enter("codeFenced");let b=f.move(m);if(e.lang){const g=a.enter(`codeFencedLang${c}`);b+=f.move(a.safe(e.lang,{before:b,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=a.enter(`codeFencedMeta${c}`);b+=f.move(" "),b+=f.move(a.safe(e.meta,{before:b,after:`
|
|
490
|
-
`,encode:["`"],...f.current()})),g()}return b+=f.move(`
|
|
491
|
-
`),u&&(b+=f.move(u+`
|
|
492
|
-
`)),b+=f.move(m),h(),b}function fI(e,t,a){return(a?"":" ")+e}function dp(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 mI(e,t,a,r){const o=dp(a),u=o==='"'?"Quote":"Apostrophe",c=a.enter("definition");let f=a.enter("label");const m=a.createTracker(r);let h=m.move("[");return h+=m.move(a.safe(a.associationId(e),{before:h,after:"]",...m.current()})),h+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(a.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(f=a.enter("destinationRaw"),h+=m.move(a.safe(e.url,{before:h,after:e.title?" ":`
|
|
493
|
-
`,...m.current()}))),f(),e.title&&(f=a.enter(`title${u}`),h+=m.move(" "+o),h+=m.move(a.safe(e.title,{before:h,after:o,...m.current()})),h+=m.move(o),f()),c(),h}function hI(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 vo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ic(e,t,a){const r=Gi(e),o=Gi(t);return r===void 0?o===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}UN.peek=pI;function UN(e,t,a,r){const o=hI(a),u=a.enter("emphasis"),c=a.createTracker(r),f=c.move(o);let m=c.move(a.containerPhrasing(e,{after:o,before:f,...c.current()}));const h=m.charCodeAt(0),b=Ic(r.before.charCodeAt(r.before.length-1),h,o);b.inside&&(m=vo(h)+m.slice(1));const g=m.charCodeAt(m.length-1),y=Ic(r.after.charCodeAt(0),g,o);y.inside&&(m=m.slice(0,-1)+vo(g));const N=c.move(o);return u(),a.attentionEncodeSurroundingInfo={after:y.outside,before:b.outside},f+m+N}function pI(e,t,a){return a.options.emphasis||"*"}function gI(e,t){let a=!1;return Po(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return a=!0,bh}),!!((!e.depth||e.depth<3)&&ap(e)&&(t.options.setext||a))}function bI(e,t,a,r){const o=Math.max(Math.min(6,e.depth||1),1),u=a.createTracker(r);if(gI(e,a)){const b=a.enter("headingSetext"),g=a.enter("phrasing"),y=a.containerPhrasing(e,{...u.current(),before:`
|
|
494
|
-
`,after:`
|
|
495
|
-
`});return g(),b(),y+`
|
|
496
|
-
`+(o===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
497
|
-
`))+1))}const c="#".repeat(o),f=a.enter("headingAtx"),m=a.enter("phrasing");u.move(c+" ");let h=a.containerPhrasing(e,{before:"# ",after:`
|
|
498
|
-
`,...u.current()});return/^[\t ]/.test(h)&&(h=vo(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,a.options.closeAtx&&(h+=" "+c),m(),f(),h}HN.peek=xI;function HN(e){return e.value||""}function xI(){return"<"}FN.peek=EI;function FN(e,t,a,r){const o=dp(a),u=o==='"'?"Quote":"Apostrophe",c=a.enter("image");let f=a.enter("label");const m=a.createTracker(r);let h=m.move("![");return h+=m.move(a.safe(e.alt,{before:h,after:"]",...m.current()})),h+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(a.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(f=a.enter("destinationRaw"),h+=m.move(a.safe(e.url,{before:h,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=a.enter(`title${u}`),h+=m.move(" "+o),h+=m.move(a.safe(e.title,{before:h,after:o,...m.current()})),h+=m.move(o),f()),h+=m.move(")"),c(),h}function EI(){return"!"}zN.peek=yI;function zN(e,t,a,r){const o=e.referenceType,u=a.enter("imageReference");let c=a.enter("label");const f=a.createTracker(r);let m=f.move("![");const h=a.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(h+"]["),c();const b=a.stack;a.stack=[],c=a.enter("reference");const g=a.safe(a.associationId(e),{before:m,after:"]",...f.current()});return c(),a.stack=b,u(),o==="full"||!h||h!==g?m+=f.move(g+"]"):o==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function yI(){return"!"}$N.peek=NI;function $N(e,t,a){let r=e.value||"",o="`",u=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u<a.unsafe.length;){const c=a.unsafe[u],f=a.compilePattern(c);let m;if(c.atBreak)for(;m=f.exec(r);){let h=m.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(m.index+1)}}return o+r+o}function NI(){return"`"}function qN(e,t){const a=ap(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(a===e.url||"mailto:"+a===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}YN.peek=TI;function YN(e,t,a,r){const o=dp(a),u=o==='"'?"Quote":"Apostrophe",c=a.createTracker(r);let f,m;if(qN(e,a)){const b=a.stack;a.stack=[],f=a.enter("autolink");let g=c.move("<");return g+=c.move(a.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),a.stack=b,g}f=a.enter("link"),m=a.enter("label");let h=c.move("[");return h+=c.move(a.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=a.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(a.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(m=a.enter("destinationRaw"),h+=c.move(a.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),m(),e.title&&(m=a.enter(`title${u}`),h+=c.move(" "+o),h+=c.move(a.safe(e.title,{before:h,after:o,...c.current()})),h+=c.move(o),m()),h+=c.move(")"),f(),h}function TI(e,t,a){return qN(e,a)?"<":"["}GN.peek=_I;function GN(e,t,a,r){const o=e.referenceType,u=a.enter("linkReference");let c=a.enter("label");const f=a.createTracker(r);let m=f.move("[");const h=a.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(h+"]["),c();const b=a.stack;a.stack=[],c=a.enter("reference");const g=a.safe(a.associationId(e),{before:m,after:"]",...f.current()});return c(),a.stack=b,u(),o==="full"||!h||h!==g?m+=f.move(g+"]"):o==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function _I(){return"["}function fp(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 vI(e){const t=fp(e),a=e.options.bulletOther;if(!a)return t==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+a+"`) to be different");return a}function SI(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 KN(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 AI(e,t,a,r){const o=a.enter("list"),u=a.bulletCurrent;let c=e.ordered?SI(a):fp(a);const f=e.ordered?c==="."?")":".":vI(a);let m=t&&a.bulletLastUsed?c===a.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&b&&(!b.children||!b.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(m=!0),KN(a)===c&&b){let g=-1;for(;++g<e.children.length;){const y=e.children[g];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=f),a.bulletCurrent=c;const h=a.containerFlow(e,r);return a.bulletLastUsed=c,a.bulletCurrent=u,o(),h}function wI(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 CI(e,t,a,r){const o=wI(a);let u=a.bulletCurrent||fp(a);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(a.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let c=u.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=a.createTracker(r);f.move(u+" ".repeat(c-u.length)),f.shift(c);const m=a.enter("listItem"),h=a.indentLines(a.containerFlow(e,f.current()),b);return m(),h;function b(g,y,N){return y?(N?"":" ".repeat(c))+g:(N?u:u+" ".repeat(c-u.length))+g}}function kI(e,t,a,r){const o=a.enter("paragraph"),u=a.enter("phrasing"),c=a.containerPhrasing(e,r);return u(),o(),c}const RI=Bo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function OI(e,t,a,r){return(e.children.some(function(c){return RI(c)})?a.containerPhrasing:a.containerFlow).call(a,e,r)}function II(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}VN.peek=MI;function VN(e,t,a,r){const o=II(a),u=a.enter("strong"),c=a.createTracker(r),f=c.move(o+o);let m=c.move(a.containerPhrasing(e,{after:o,before:f,...c.current()}));const h=m.charCodeAt(0),b=Ic(r.before.charCodeAt(r.before.length-1),h,o);b.inside&&(m=vo(h)+m.slice(1));const g=m.charCodeAt(m.length-1),y=Ic(r.after.charCodeAt(0),g,o);y.inside&&(m=m.slice(0,-1)+vo(g));const N=c.move(o+o);return u(),a.attentionEncodeSurroundingInfo={after:y.outside,before:b.outside},f+m+N}function MI(e,t,a){return a.options.strong||"*"}function LI(e,t,a,r){return a.safe(e.value,r)}function DI(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 jI(e,t,a){const r=(KN(a)+(a.options.ruleSpaces?" ":"")).repeat(DI(a));return a.options.ruleSpaces?r.slice(0,-1):r}const XN={blockquote:rI,break:R1,code:dI,definition:mI,emphasis:UN,hardBreak:R1,heading:bI,html:HN,image:FN,imageReference:zN,inlineCode:$N,link:YN,linkReference:GN,list:AI,listItem:CI,paragraph:kI,root:OI,strong:VN,text:LI,thematicBreak:jI};function BI(){return{enter:{table:PI,tableData:O1,tableHeader:O1,tableRow:HI},exit:{codeText:FI,table:UI,tableData:Fm,tableHeader:Fm,tableRow:Fm}}}function PI(e){const t=e._align;this.enter({type:"table",align:t.map(function(a){return a==="none"?null:a}),children:[]},e),this.data.inTable=!0}function UI(e){this.exit(e),this.data.inTable=void 0}function HI(e){this.enter({type:"tableRow",children:[]},e)}function Fm(e){this.exit(e)}function O1(e){this.enter({type:"tableCell",children:[]},e)}function FI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,zI));const a=this.stack[this.stack.length-1];a.type,a.value=t,this.exit(e)}function zI(e,t){return t==="|"?t:e}function $I(e){const t=e||{},a=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,u=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
499
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:c,tableCell:m,tableRow:f}};function c(N,S,A,w){return h(b(N,A,w),N.align)}function f(N,S,A,w){const _=g(N,A,w),M=h([_]);return M.slice(0,M.indexOf(`
|
|
500
|
-
`))}function m(N,S,A,w){const _=A.enter("tableCell"),M=A.enter("phrasing"),k=A.containerPhrasing(N,{...w,before:u,after:u});return M(),_(),k}function h(N,S){return aI(N,{align:S,alignDelimiters:r,padding:a,stringLength:o})}function b(N,S,A){const w=N.children;let _=-1;const M=[],k=S.enter("table");for(;++_<w.length;)M[_]=g(w[_],S,A);return k(),M}function g(N,S,A){const w=N.children;let _=-1;const M=[],k=S.enter("tableRow");for(;++_<w.length;)M[_]=m(w[_],N,S,A);return k(),M}function y(N,S,A){let w=XN.inlineCode(N,S,A);return A.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function qI(){return{exit:{taskListCheckValueChecked:I1,taskListCheckValueUnchecked:I1,paragraph:GI}}}function YI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:KI}}}function I1(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function GI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const r=a.children[0];if(r&&r.type==="text"){const o=t.children;let u=-1,c;for(;++u<o.length;){const f=o[u];if(f.type==="paragraph"){c=f;break}}c===a&&(r.value=r.value.slice(1),r.value.length===0?a.children.shift():a.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,a.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function KI(e,t,a,r){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=a.createTracker(r);u&&f.move(c);let m=XN.listItem(e,t,a,{...r,...f.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),m;function h(b){return b+c}}function VI(){return[AO(),KO(),WO(),BI(),qI()]}function XI(e){return{extensions:[wO(),VO(e),ZO(),$I(e),YI()]}}const QI={tokenize:n6,partial:!0},QN={tokenize:a6,partial:!0},WN={tokenize:s6,partial:!0},ZN={tokenize:r6,partial:!0},WI={tokenize:i6,partial:!0},JN={name:"wwwAutolink",tokenize:e6,previous:tT},eT={name:"protocolAutolink",tokenize:t6,previous:nT},Cs={name:"emailAutolink",tokenize:JI,previous:aT},ns={};function ZI(){return{text:ns}}let Mr=48;for(;Mr<123;)ns[Mr]=Cs,Mr++,Mr===58?Mr=65:Mr===91&&(Mr=97);ns[43]=Cs;ns[45]=Cs;ns[46]=Cs;ns[95]=Cs;ns[72]=[Cs,eT];ns[104]=[Cs,eT];ns[87]=[Cs,JN];ns[119]=[Cs,JN];function JI(e,t,a){const r=this;let o,u;return c;function c(g){return!Nh(g)||!aT.call(r,r.previous)||mp(r.events)?a(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Nh(g)?(e.consume(g),f):g===64?(e.consume(g),m):a(g)}function m(g){return g===46?e.check(WI,b,h)(g):g===45||g===95||On(g)?(u=!0,e.consume(g),m):b(g)}function h(g){return e.consume(g),o=!0,m}function b(g){return u&&o&&Fn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):a(g)}}function e6(e,t,a){const r=this;return o;function o(c){return c!==87&&c!==119||!tT.call(r,r.previous)||mp(r.events)?a(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(QI,e.attempt(QN,e.attempt(WN,u),a),a)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function t6(e,t,a){const r=this;let o="",u=!1;return c;function c(g){return(g===72||g===104)&&nT.call(r,r.previous)&&!mp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),f):a(g)}function f(g){if(Fn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const y=o.toLowerCase();if(y==="http"||y==="https")return e.consume(g),m}return a(g)}function m(g){return g===47?(e.consume(g),u?h:(u=!0,m)):a(g)}function h(g){return g===null||Rc(g)||Ot(g)||qr(g)||td(g)?a(g):e.attempt(QN,e.attempt(WN,b),a)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function n6(e,t,a){let r=0;return o;function o(c){return(c===87||c===119)&&r<3?(r++,e.consume(c),o):c===46&&r===3?(e.consume(c),u):a(c)}function u(c){return c===null?a(c):t(c)}}function a6(e,t,a){let r,o,u;return c;function c(h){return h===46||h===95?e.check(ZN,m,f)(h):h===null||Ot(h)||qr(h)||h!==45&&td(h)?m(h):(u=!0,e.consume(h),c)}function f(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),c}function m(h){return o||r||!u?a(h):t(h)}}function s6(e,t){let a=0,r=0;return o;function o(c){return c===40?(a++,e.consume(c),o):c===41&&r<a?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(ZN,t,u)(c):c===null||Ot(c)||qr(c)?t(c):(e.consume(c),o)}function u(c){return c===41&&r++,e.consume(c),o}}function r6(e,t,a){return r;function r(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),r):f===38?(e.consume(f),u):f===93?(e.consume(f),o):f===60||f===null||Ot(f)||qr(f)?t(f):a(f)}function o(f){return f===null||f===40||f===91||Ot(f)||qr(f)?t(f):r(f)}function u(f){return Fn(f)?c(f):a(f)}function c(f){return f===59?(e.consume(f),r):Fn(f)?(e.consume(f),c):a(f)}}function i6(e,t,a){return r;function r(u){return e.consume(u),o}function o(u){return On(u)?a(u):t(u)}}function tT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ot(e)}function nT(e){return!Fn(e)}function aT(e){return!(e===47||Nh(e))}function Nh(e){return e===43||e===45||e===46||e===95||On(e)}function mp(e){let t=e.length,a=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const l6={tokenize:p6,partial:!0};function o6(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:f6,continuation:{tokenize:m6},exit:h6}},text:{91:{name:"gfmFootnoteCall",tokenize:d6},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:u6,resolveTo:c6}}}}function u6(e,t,a){const r=this;let o=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;o--;){const m=r.events[o][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return f;function f(m){if(!c||!c._balanced)return a(m);const h=Fa(r.sliceSerialize({start:c.end,end:r.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?a(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),t(m))}}function c6(e,t){let a=e.length;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[a+1],e[a+2],["enter",r,t],e[a+3],e[a+4],["enter",o,t],["exit",o,t],["enter",u,t],["enter",c,t],["exit",c,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(a,e.length-a+1,...f),e}function d6(e,t,a){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),m}function m(g){return g!==94?a(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(u>999||g===93&&!c||g===null||g===91||Ot(g))return a(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return o.includes(Fa(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):a(g)}return Ot(g)||(c=!0),u++,e.consume(g),g===92?b:h}function b(g){return g===91||g===92||g===93?(e.consume(g),u++,h):h(g)}}function f6(e,t,a){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,c=0,f;return m;function m(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):a(S)}function b(S){if(c>999||S===93&&!f||S===null||S===91||Ot(S))return a(S);if(S===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return u=Fa(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Ot(S)||(f=!0),c++,e.consume(S),S===92?g:b}function g(S){return S===91||S===92||S===93?(e.consume(S),c++,b):b(S)}function y(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),o.includes(u)||o.push(u),ht(e,N,"gfmFootnoteDefinitionWhitespace")):a(S)}function N(S){return t(S)}}function m6(e,t,a){return e.check(jo,t,e.attempt(l6,t,a))}function h6(e){e.exit("gfmFootnoteDefinition")}function p6(e,t,a){const r=this;return ht(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(u):a(u)}}function g6(e){let a=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:o};return a==null&&(a=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(c,f){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let h=m;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[m][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[m][1].end)},g={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[m][1].start)},y=[["enter",b,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",g,f]],N=f.parser.constructs.insideSpan.null;N&&xa(y,y.length,0,nd(N,c.slice(h+1,m),f)),xa(y,y.length,0,[["exit",g,f],["enter",c[m][1],f],["exit",c[m][1],f],["exit",b,f]]),xa(c,h-1,m-h+3,y),m=h+y.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function u(c,f,m){const h=this.previous,b=this.events;let g=0;return y;function y(S){return h===126&&b[b.length-1][1].type!=="characterEscape"?m(S):(c.enter("strikethroughSequenceTemporary"),N(S))}function N(S){const A=Gi(h);if(S===126)return g>1?m(S):(c.consume(S),g++,N);if(g<2&&!a)return m(S);const w=c.exit("strikethroughSequenceTemporary"),_=Gi(S);return w._open=!_||_===2&&!!A,w._close=!A||A===2&&!!_,f(S)}}}class b6{constructor(){this.map=[]}add(t,a,r){x6(this,t,a,r)}consume(t){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let a=this.map.length;const r=[];for(;a>0;)a-=1,r.push(t.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),t.length=this.map[a][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const u of o)t.push(u);o=r.pop()}this.map.length=0}}function x6(e,t,a,r){let o=0;if(!(a===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=a,e.map[o][2].push(...r);return}o+=1}e.map.push([t,a,r])}}function E6(e,t){let a=!1;const r=[];for(;t<e.length;){const o=e[t];if(a){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(a=!0);t+=1}return r}function y6(){return{flow:{null:{name:"table",tokenize:N6,resolveAll:T6}}}}function N6(e,t,a){const r=this;let o=0,u=0,c;return f;function f(j){let ee=r.events.length-1;for(;ee>-1;){const te=r.events[ee][1].type;if(te==="lineEnding"||te==="linePrefix")ee--;else break}const se=ee>-1?r.events[ee][1].type:null,he=se==="tableHead"||se==="tableRow"?P:m;return he===P&&r.parser.lazy[r.now().line]?a(j):he(j)}function m(j){return e.enter("tableHead"),e.enter("tableRow"),h(j)}function h(j){return j===124||(c=!0,u+=1),b(j)}function b(j){return j===null?a(j):Fe(j)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),N):a(j):it(j)?ht(e,b,"whitespace")(j):(u+=1,c&&(c=!1,o+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),c=!0,b):(e.enter("data"),g(j)))}function g(j){return j===null||j===124||Ot(j)?(e.exit("data"),b(j)):(e.consume(j),j===92?y:g)}function y(j){return j===92||j===124?(e.consume(j),g):g(j)}function N(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(j):(e.enter("tableDelimiterRow"),c=!1,it(j)?ht(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):S(j))}function S(j){return j===45||j===58?w(j):j===124?(c=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),A):O(j)}function A(j){return it(j)?ht(e,w,"whitespace")(j):w(j)}function w(j){return j===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),_):j===45?(u+=1,_(j)):j===null||Fe(j)?L(j):O(j)}function _(j){return j===45?(e.enter("tableDelimiterFiller"),M(j)):O(j)}function M(j){return j===45?(e.consume(j),M):j===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(j))}function k(j){return it(j)?ht(e,L,"whitespace")(j):L(j)}function L(j){return j===124?S(j):j===null||Fe(j)?!c||o!==u?O(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):O(j)}function O(j){return a(j)}function P(j){return e.enter("tableRow"),z(j)}function z(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),z):j===null||Fe(j)?(e.exit("tableRow"),t(j)):it(j)?ht(e,z,"whitespace")(j):(e.enter("data"),J(j))}function J(j){return j===null||j===124||Ot(j)?(e.exit("data"),z(j)):(e.consume(j),j===92?V:J)}function V(j){return j===92||j===124?(e.consume(j),J):J(j)}}function T6(e,t){let a=-1,r=!0,o=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,m=0,h,b,g;const y=new b6;for(;++a<e.length;){const N=e[a],S=N[1];N[0]==="enter"?S.type==="tableHead"?(f=!1,m!==0&&(M1(y,t,m,h,b),b=void 0,m=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},y.add(a,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,g=void 0,u=[0,0,0,0],c=[0,a+1,0,0],f&&(f=!1,b={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},y.add(a,0,[["enter",b,t]])),o=S.type==="tableDelimiterRow"?2:b?3:1):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],g=cc(y,t,u,o,void 0,g),u=[0,0,0,0]),c[2]=a)):S.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(c[0]=c[1],g=cc(y,t,u,o,void 0,g)),u=c,c=[u[1],a,0,0])):S.type==="tableHead"?(f=!0,m=a):S.type==="tableRow"||S.type==="tableDelimiterRow"?(m=a,u[1]!==0?(c[0]=c[1],g=cc(y,t,u,o,a,g)):c[1]!==0&&(g=cc(y,t,c,o,a,g)),o=0):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=a)}for(m!==0&&M1(y,t,m,h,b),y.consume(t.events),a=-1;++a<t.events.length;){const N=t.events[a];N[0]==="enter"&&N[1].type==="table"&&(N[1]._align=E6(t.events,a))}return e}function cc(e,t,a,r,o,u){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",f="tableContent";a[0]!==0&&(u.end=Object.assign({},Ui(t.events,a[0])),e.add(a[0],0,[["exit",u,t]]));const m=Ui(t.events,a[1]);if(u={type:c,start:Object.assign({},m),end:Object.assign({},m)},e.add(a[1],0,[["enter",u,t]]),a[2]!==0){const h=Ui(t.events,a[2]),b=Ui(t.events,a[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},b)};if(e.add(a[2],0,[["enter",g,t]]),r!==2){const y=t.events[a[2]],N=t.events[a[3]];if(y[1].end=Object.assign({},N[1].end),y[1].type="chunkText",y[1].contentType="text",a[3]>a[2]+1){const S=a[2]+1,A=a[3]-a[2]-1;e.add(S,A,[])}}e.add(a[3]+1,0,[["exit",g,t]])}return o!==void 0&&(u.end=Object.assign({},Ui(t.events,o)),e.add(o,0,[["exit",u,t]]),u=void 0),u}function M1(e,t,a,r,o){const u=[],c=Ui(t.events,a);o&&(o.end=Object.assign({},c),u.push(["exit",o,t])),r.end=Object.assign({},c),u.push(["exit",r,t]),e.add(a+1,0,u)}function Ui(e,t){const a=e[t],r=a[0]==="enter"?"start":"end";return a[1][r]}const _6={name:"tasklistCheck",tokenize:S6};function v6(){return{text:{91:_6}}}function S6(e,t,a){const r=this;return o;function o(m){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),u)}function u(m){return Ot(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),c):a(m)}function c(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):a(m)}function f(m){return Fe(m)?t(m):it(m)?e.check({tokenize:A6},t,a)(m):a(m)}}function A6(e,t,a){return ht(e,r,"whitespace");function r(o){return o===null?a(o):t(o)}}function w6(e){return fN([ZI(),o6(),g6(e),y6(),v6()])}const C6={};function Gr(e){const t=this,a=e||C6,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(w6(a)),u.push(VI()),c.push(XI(a))}const k6=new Set(["tool","tool-use","tool_use","tool-call","tool_call","tool-result","tool_result"]),R6=new Set(["thinking","reasoning","reason"]),O6=new Set(["text","output_text","message"]),I6=new Set(["file","image"]);function Mc(e){var a;const t=((a=e.type)==null?void 0:a.toLowerCase())??"";return k6.has(t)||e.toolName!=null||e.tool!=null?"tool":I6.has(t)?"file":R6.has(t)?"thinking":O6.has(t)||e.content!=null||e.text!=null?"text":"other"}function Lc(e){return e.content??e.text??""}function sT(e){return e.toolName??e.tool??"tool"}function rd(e){var t;return e.input??((t=e.state)==null?void 0:t.input)}function hp(e){var t;return e.output??((t=e.state)==null?void 0:t.output)}function pp(e){var a,r,o;const t=(r=(a=e.state)==null?void 0:a.status)==null?void 0:r.toLowerCase();return t==="completed"||t==="done"||t==="success"?"completed":t==="error"||t==="failed"||((o=e.state)==null?void 0:o.error)!=null?"error":t==="pending"||t==="queued"?"pending":t==="running"||t==="in_progress"?"running":hp(e)!=null?"completed":"running"}function L1(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Kr(e){const t=e==null?void 0:e.toLowerCase();return t==="in_progress"||t==="in-progress"||t==="active"?"in_progress":t==="completed"||t==="done"||t==="complete"?"completed":t==="cancelled"||t==="canceled"?"cancelled":"pending"}function rT(e){return e.filter(t=>Kr(t.status)==="completed").length}function So(e){const t=sT(e).toLowerCase();return t==="question"||t==="mcp_question"}function M6(e){const t=rd(e);if(!t||typeof t!="object")return null;const a=t;return Array.isArray(a.questions)?a.questions:null}function Dc(e){if(!So(e))return!1;const t=pp(e);return t==="pending"||t==="running"}const L6=/\bses_[a-zA-Z0-9]+/;function D6(e){var o;const t=rd(e);if(t&&typeof t=="object"){const u=t;if(typeof u.task_id=="string"&&u.task_id.startsWith("ses_"))return u.task_id}const a=(o=e.state)==null?void 0:o.metadata;if(a){const u=a.session_id??a.sessionId;if(typeof u=="string"&&u.startsWith("ses_"))return u}const r=hp(e);if(typeof r=="string"){const u=L6.exec(r);if(u)return u[0]}if(r&&typeof r=="object"){const u=r,c=u.session_id??u.sessionId??u.task_id;if(typeof c=="string"&&c.startsWith("ses_"))return c}return null}const j6=es(()=>({agents:[],loaded:!1}));function iT(e){return`question-${e}`}function zm(e,t){const a=t.find(o=>o.id===e),r=(a==null?void 0:a.title)||e.slice(-8);Gt.getState().addToast(`${r} — 等待回复`,"warning",e,{id:iT(e),persistent:!0})}function B6(e){var t;for(const a of e)if((t=a.parts)!=null&&t.some(r=>So(r)&&Dc(r)))return!0;return!1}const Ao=[],wo=[],D1=[],Lr={};function j1(e){return e.id??e.callID}function Rn(){return Le.getState().activeRepoId}async function B1(e,t){const a=Rn();if(a)try{const[r,o]=await Promise.all([l5(a,e),Py(a).catch(()=>null)]);t(u=>{const c={sessionLinks:{...u.sessionLinks,[e]:r}};return o&&(c.allSessionLinks=o),c})}catch{}}const P1=20,Oe=es((e,t)=>({sessions:[],activeSessionId:null,messages:{},messagesMeta:{},todos:{},sessionStatuses:{},errorReasons:{},queuedMessageIds:{},sessionLinks:{},allSessionLinks:{},sessionFilter:"active",loadingSessions:!1,loadError:null,sendError:null,setSessionFilter:a=>e({sessionFilter:a}),toggleSessionComplete:async a=>{const r=Rn();if(!r)return;const o=t().sessions.find(c=>c.id===a);if(!o)return;const u=o.completedAt?null:Date.now();e(c=>({sessions:c.sessions.map(f=>f.id===a?{...f,completedAt:u??void 0}:f)}));try{await B5(r,a,u)}catch{await t().loadSessions()}},loadSessions:async()=>{const a=Rn();if(!a){e({sessions:[],loadingSessions:!1});return}e({loadingSessions:!0,loadError:null});try{const[r,o]=await Promise.all([Zw(a),Py(a).catch(()=>null)]),u={sessions:r,loadingSessions:!1};o&&(u.allSessionLinks=o),e(u)}catch(r){e({loadingSessions:!1,loadError:r instanceof Error?r.message:"Failed to load sessions"})}},createSession:async(a,r,o,u,c,f,m)=>{const h=Rn();if(!h)return null;e({sendError:null});try{const b=await Jw(h,a,r,o,u,c,f,m);return e(g=>({sessions:[b,...g.sessions.filter(y=>y.id!==b.id)],activeSessionId:b.id,messages:{...g.messages,[b.id]:[]}})),t().setSessionStatus(b.id,"busy"),c&&Gt.getState().addToast("已自动分配为处理人","success"),b}catch(b){return e({sendError:b instanceof Error?b.message:"Failed to create session"}),null}},setActiveSession:async a=>{Rn()&&(e({activeSessionId:a,sendError:null}),await t().refreshSessionData(a))},refreshSessionData:async a=>{var b,g;const r=Rn();if(!r)return;const u=!t().messages[a]||t().messages[a].length===0?{limit:P1}:void 0,[c,f]=await Promise.allSettled([o5(r,a),Cx(r,a,u)]),m=c.status==="fulfilled"?c.value:null,h=(g=(b=m==null?void 0:m.session)==null?void 0:b.revert)==null?void 0:g.messageID;e(y=>{const N={};if(m&&(m.status&&(N.sessionStatuses={...y.sessionStatuses,[a]:m.status.type}),m.todos&&(N.todos={...y.todos,[a]:m.todos}),m.links&&(N.sessionLinks={...y.sessionLinks,[a]:m.links}),m.session&&(N.sessions=y.sessions.map(S=>S.id===a?{...S,...m.session}:S))),f.status==="fulfilled"){let S=f.value.messages;if(h){const w=S.findIndex(_=>_.id===h);w>=0&&(S=S.slice(0,w+1))}const A=y.messages[a]??[];S.length>=A.length&&(N.messages={...y.messages,[a]:S}),N.messagesMeta={...y.messagesMeta,[a]:{total:Math.max(f.value.total,A.length),hasMore:f.value.hasMore,loading:!1}}}return N}),f.status==="fulfilled"&&B6(f.value.messages)&&zm(a,t().sessions)},loadMoreMessages:async a=>{var f;const r=Rn();if(!r)return;const o=t().messagesMeta[a];if(!(o!=null&&o.hasMore)||o.loading)return;const c=(f=(t().messages[a]??[])[0])==null?void 0:f.id;e(m=>({messagesMeta:{...m.messagesMeta,[a]:{...o,loading:!0}}}));try{const m=await Cx(r,a,{limit:P1,before:c});e(h=>{const b=h.messages[a]??[];return{messages:{...h.messages,[a]:[...m.messages,...b]},messagesMeta:{...h.messagesMeta,[a]:{total:m.total,hasMore:m.hasMore,loading:!1}}}})}catch{e(m=>({messagesMeta:{...m.messagesMeta,[a]:{...o,loading:!1}}}))}},addLink:async(a,r,o)=>{const u=Rn();if(!u)return!1;try{return await u5(u,a,r,o),await B1(a,e),!0}catch{return!1}},removeLink:async(a,r,o)=>{const u=Rn();if(!u)return!1;try{return await c5(u,a,r,o),await B1(a,e),!0}catch{return!1}},deleteSession:async a=>{const r=Rn();if(r)try{await e5(r,a)}catch{}delete Lr[a],e(o=>{const{[a]:u,...c}=o.messages,{[a]:f,...m}=o.messagesMeta,{[a]:h,...b}=o.todos,{[a]:g,...y}=o.sessionStatuses,{[a]:N,...S}=o.errorReasons,{[a]:A,...w}=o.queuedMessageIds,{[a]:_,...M}=o.sessionLinks,{[a]:k,...L}=o.allSessionLinks;return{sessions:o.sessions.filter(O=>O.id!==a),messages:c,messagesMeta:m,todos:b,sessionStatuses:y,errorReasons:S,queuedMessageIds:w,sessionLinks:M,allSessionLinks:L,activeSessionId:o.activeSessionId===a?null:o.activeSessionId}})},sendMessage:async(a,r,o,u)=>{const c=Rn(),f=t().activeSessionId;if(!c||!f)return!1;const m=t().sessions.find(b=>b.id===f),h=t().sessionStatuses[f]==="busy";e({sendError:null}),m!=null&&m.completedAt&&e(b=>({sessions:b.sessions.map(g=>g.id===f?{...g,completedAt:void 0}:g)})),h||t().setSessionStatus(f,"busy");try{const b=j6.getState(),g=m!=null&&m.agent&&b.loaded&&b.agents.some(y=>y.name===m.agent||y.id===m.agent)?m.agent:void 0;return await t5(c,f,a,g,r,o,u),h&&(Lr[f]=(Lr[f]||0)+1),!0}catch(b){return e({sendError:b instanceof Error?b.message:"Failed to send message"}),h||t().setSessionStatus(f,"idle"),!1}},replyQuestion:async a=>{const r=Rn(),o=t().activeSessionId;if(!(!r||!o))try{await a5(r,o,a)}catch(u){e({sendError:u instanceof Error?u.message:"Failed to reply to question"})}},rejectQuestion:async()=>{const a=Rn(),r=t().activeSessionId;if(!(!a||!r))try{await s5(a,r)}catch{}},abortSession:async()=>{const a=Rn(),r=t().activeSessionId;if(!(!a||!r)){try{await n5(a,r)}catch{}t().setSessionStatus(r,"idle")}},clearSessions:()=>{for(const a of Object.keys(Lr))delete Lr[a];e({sessions:[],activeSessionId:null,messages:{},messagesMeta:{},todos:{},sessionStatuses:{},errorReasons:{},queuedMessageIds:{},sessionLinks:{},allSessionLinks:{},loadError:null,sendError:null})},updateMessage:(a,r)=>{var o;e(u=>{const c=u.messages[a]??[],f=c.findIndex(g=>g.id===r.id);let m,h=u.queuedMessageIds,b=u.messagesMeta;if(f>=0){const g={...c[f],...r};(!r.parts||r.parts.length===0)&&c[f].parts&&(g.parts=c[f].parts),m=[...c],m[f]=g}else{m=[...c,r];const g=b[a];g&&(b={...b,[a]:{...g,total:g.total+1}});const y=Lr[a]||0;if(r.role==="user"&&y>0){const N=[...h[a]??[]];N.push(r.id),h={...h,[a]:N},Lr[a]=y-1}else if(r.role==="assistant"){const N=h[a];N&&N.length>0&&(h={...h,[a]:N.slice(1)})}}return{messages:{...u.messages,[a]:m},messagesMeta:b,queuedMessageIds:h}}),(o=r.parts)!=null&&o.some(u=>So(u)&&Dc(u))&&zm(a,t().sessions)},updateMessagePart:(a,r,o)=>{e(u=>{const c=u.messages[a]??[],f=c.findIndex(S=>S.id===r),m=f>=0?c[f]:{id:r,role:"assistant"},h=m.parts?[...m.parts]:[],b=j1(o),g=b!=null?h.findIndex(S=>j1(S)===b):-1;g>=0?h[g]={...h[g],...o}:h.push(o);const y={...m,parts:h},N=f>=0?[...c]:[...c,y];return f>=0&&(N[f]=y),{messages:{...u.messages,[a]:N}}}),So(o)&&Dc(o)&&zm(a,t().sessions)},appendMessagePartDelta:(a,r,o,u)=>{e(c=>{const f=c.messages[a]??[],m=f.findIndex(S=>S.id===r),h=m>=0?f[m]:{id:r,role:"assistant"},b=h.parts?[...h.parts]:[],g=b.findIndex(S=>S.id===o);if(g>=0){const S=b[g],A=Lc(S)+u;b[g]=S.content!=null?{...S,content:A}:{...S,text:A}}else b.push({id:o,type:"text",text:u});const y={...h,parts:b},N=m>=0?[...f]:[...f,y];return m>=0&&(N[m]=y),{messages:{...c.messages,[a]:N}}})},updateTodos:(a,r)=>{e(o=>({todos:{...o.todos,[a]:r}}))},updateSessionInfo:a=>{e(r=>r.sessions.some(u=>u.id===a.id)?{sessions:r.sessions.map(u=>u.id===a.id?{...u,...a}:u)}:{sessions:[a,...r.sessions]})},setSessionStatus:(a,r,o)=>{const u=t().sessionStatuses[a];if(u!==r){const c=t().sessions.find(m=>m.id===a),f=(c==null?void 0:c.title)||a.slice(-8);if(r==="idle"&&u!==void 0&&u!=="idle")Gt.getState().removeToast(iT(a)),Gt.getState().addToast(`${f} — 完成`,"success",a);else if(r==="busy"&&(u===void 0||u==="idle"))Gt.getState().addToast(`${f} — 开始运行`,"info",a);else if(r==="retry")Gt.getState().addToast(`${f} — 进入重试`,"warning",a);else if(r==="error"){const m=o?`${f} — 错误: ${o}`:`${f} — 发生错误`;Gt.getState().addToast(m,"error",a)}}e(c=>{const f=o?{...c.errorReasons,[a]:o}:r!=="error"?(()=>{const{[a]:m,...h}=c.errorReasons;return h})():c.errorReasons;return{sessionStatuses:{...c.sessionStatuses,[a]:r},errorReasons:f}})},bulkSetStatuses:a=>{e({sessionStatuses:{...t().sessionStatuses,...a}})},renameSession:async(a,r)=>{const o=Rn();if(o){e(u=>({sessions:u.sessions.map(c=>c.id===a?{...c,title:r}:c)}));try{await j5(o,a,r)}catch{await t().loadSessions()}}},revertToMessage:async(a,r)=>{const o=Rn();if(!o)return!1;try{return await r5(o,a,r),await t().refreshSessionData(a),!0}catch{return!1}}})),Ve=es((e,t)=>({issues:[],tags:[],tagFilterMode:new Map,milestones:[],selectedMilestoneId:null,loaded:!1,syncing:!1,selectedIssueId:null,viewingIssueId:null,viewingTreeRootId:null,matchingParentId:null,matchingCandidateId:null,clearIssues:()=>e({issues:[],tags:[],tagFilterMode:new Map,milestones:[],selectedMilestoneId:null,loaded:!1,selectedIssueId:null,viewingIssueId:null,viewingTreeRootId:null,matchingParentId:null,matchingCandidateId:null}),setSelectedIssue:a=>e({selectedIssueId:a}),setViewingIssue:(a,r)=>e({viewingIssueId:a,viewingTreeRootId:r??null}),enterMatchMode:a=>e({matchingParentId:a,matchingCandidateId:null}),exitMatchMode:()=>{e({matchingParentId:null,matchingCandidateId:null})},linkChild:async(a,r)=>{var u;const o=Le.getState().activeRepoId;if(!o)return!1;try{await v5(o,a,r);const c=(u=t().issues.find(f=>f.number===a))==null?void 0:u.id;return c&&e(f=>({issues:f.issues.map(m=>m.number===r?{...m,parentId:c}:m),matchingCandidateId:null})),!0}catch{return!1}},updateIssueState:async(a,r)=>{const o=Le.getState().activeRepoId;if(!o)return!1;try{const u=await qy(o,a,{state:r});return e(c=>({issues:c.issues.map(f=>f.number===a?{...f,state:u.state}:f)})),!0}catch{return!1}},loadIssues:async()=>{const a=Le.getState().activeRepoId;if(!a){e({issues:[],loaded:!0});return}try{const r=await Mx(a,"all");e({issues:r,loaded:!0})}catch{e({loaded:!0})}},syncIssues:async()=>{const a=Le.getState().activeRepoId;if(a){e({syncing:!0});try{await T5(a,"open");const[r,o,u]=await Promise.all([Mx(a,"all"),Ox(a),Ix(a)]);e({issues:r,tags:o,milestones:u,syncing:!1})}catch(r){e({syncing:!1});let o="同步 Issue 失败";if(r instanceof Ss)try{const u=JSON.parse(r.message);u.error&&(o=u.error)}catch{r.message&&(o=r.message)}Gt.getState().addToast(o,"error")}}},createIssue:async(a,r)=>{const o=Le.getState().activeRepoId;if(!o)return null;try{const u=await _5(o,a,r);return e(c=>({issues:[u,...c.issues]})),u}catch{return null}},loadTags:async()=>{const a=Le.getState().activeRepoId;if(!a){e({tags:[]});return}try{const r=await Ox(a);e({tags:r})}catch{}},cycleTagFilter:a=>{e(r=>{const o=new Map(r.tagFilterMode),u=o.get(a);return u?u==="include"?o.set(a,"exclude"):o.delete(a):o.set(a,"include"),{tagFilterMode:o}})},clearTagFilter:()=>e({tagFilterMode:new Map}),loadMilestones:async()=>{const a=Le.getState().activeRepoId;if(!a){e({milestones:[]});return}try{const r=await Ix(a);e({milestones:r})}catch{}},setMilestoneFilter:a=>e({selectedMilestoneId:a})})),Nc=es(e=>({drafts:{},setDraft:(t,a)=>e(r=>{if(!a.trim()){const{[t]:o,...u}=r.drafts;return{drafts:u}}return{drafts:{...r.drafts,[t]:a}}}),clearDraft:t=>e(a=>{const{[t]:r,...o}=a.drafts;return{drafts:o}})})),P6=5*1024*1024,U1=10,lT=["image/png","image/jpeg","image/gif","image/webp"],U6=5,H6=500;let H1=0;function oT(e){return e.split(`
|
|
501
|
-
`).length>U6||e.length>H6}function F6(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function z6(e){return new Promise((t,a)=>{const r=new FileReader;r.onload=()=>t(String(r.result)),r.onerror=()=>a(r.error),r.readAsDataURL(e)})}function $6({url:e,label:t,onClose:a}){return T.useEffect(()=>{const r=o=>{o.key==="Escape"&&(o.preventDefault(),a())};return window.addEventListener("keydown",r,!0),()=>window.removeEventListener("keydown",r,!0)},[a]),i.jsx("div",{role:"dialog","aria-modal":"true","aria-label":t,onClick:a,className:"fixed inset-0 z-50 flex cursor-zoom-out items-center justify-center bg-black/80 p-8 backdrop-blur-sm",children:i.jsx("img",{src:e,alt:t,className:"max-h-full max-w-full object-contain"})})}function gp({url:e,label:t,className:a}){const[r,o]=T.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",onClick:()=>o(!0),"aria-label":`预览 ${t}`,className:"block cursor-zoom-in rounded-md transition-opacity duration-150 hover:opacity-80",children:i.jsx("img",{src:e,alt:t,className:ae("rounded-md border border-line",a)})}),r&&i.jsx($6,{url:e,label:t,onClose:()=>o(!1)})]})}function uT(e=!0){const[t,a]=T.useState([]),[r,o]=T.useState([]),[u,c]=T.useState(null);T.useEffect(()=>{c(null),e||a([])},[e]);const f=async A=>{const w=[],_=[],M=t.length;let k=U1-M;for(const L of A){if(k<=0){_.push(`最多 ${U1} 张图片`);break}if(!lT.includes(L.type)){_.push(`${L.name||"文件"}:格式不支持`);continue}if(L.size>P6){_.push(`${L.name}:超过 5MB`);continue}w.push({_id:`att-${++H1}`,mime:L.type,url:await z6(L),filename:L.name}),k--}w.length>0&&a(L=>[...L,...w]),c(_.length>0?_.join(";"):null)},m=A=>{const w=Array.from(A.clipboardData.files);if(w.length!==0){if(A.preventDefault(),!e){c("当前模型不支持图片");return}f(w)}},h=A=>{const w=++H1,_=A.split(`
|
|
502
|
-
`).length,M=new TextEncoder().encode(A).byteLength,k=`[粘贴文本 #${w} · ${_}行]`,L={_id:`fold-${w}`,text:A,lineCount:_,byteSize:M,placeholder:k};return o(O=>[...O,L]),L},b=A=>{let w=A;for(const _ of r)w=w.replace(_.placeholder,_.text);return w},g=A=>a(w=>w.filter(_=>_._id!==A)),y=A=>o(w=>w.filter(_=>_._id!==A)),N=T.useCallback(()=>{a([]),o([]),c(null)},[]),S=t.map(({mime:A,url:w,filename:_})=>({mime:A,url:w,filename:_}));return{attachments:t,foldedTexts:r,promptFiles:S,error:u,setError:c,addFiles:f,onPaste:m,addFoldedText:h,expandFoldedTexts:b,remove:g,removeFoldedText:y,clear:N}}function q6({text:e,label:t,onClose:a}){T.useEffect(()=>{const u=c=>{c.key==="Escape"&&(c.preventDefault(),a())};return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},[a]);const r=e.split(`
|
|
503
|
-
`),o=String(r.length).length;return i.jsx("div",{role:"dialog","aria-modal":"true","aria-label":t,onClick:a,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4 backdrop-blur-sm md:p-8",children:i.jsxs("div",{onClick:u=>u.stopPropagation(),className:"flex max-h-full w-full max-w-4xl flex-col overflow-hidden rounded-lg border border-line bg-term",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2",children:[i.jsx("span",{className:"font-mono text-xs text-fg-3",children:t}),i.jsx("button",{type:"button",onClick:a,className:"text-fg-5 hover:text-fg-2",children:i.jsx(dt,{className:"h-4 w-4"})})]}),i.jsx("pre",{className:"overflow-auto p-4 font-mono text-xs leading-relaxed text-fg-2",children:r.map((u,c)=>i.jsxs("div",{children:[i.jsx("span",{className:"mr-3 inline-block select-none text-right text-fg-6",style:{width:`${o}ch`},children:c+1}),u]},c))})]})})}function Y6({fold:e,index:t,onRemove:a}){const[r,o]=T.useState(!1),u=`粘贴文本 #${t} · ${e.lineCount}行 · ${F6(e.byteSize)}`;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"group relative flex items-center gap-1.5 rounded-md border border-line bg-elevated/50 px-2.5 py-1.5",children:[i.jsxs("button",{type:"button",onClick:()=>o(!0),className:"flex items-center gap-1.5 font-mono text-xs text-fg-3 transition-colors hover:text-fg",children:[i.jsx(ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),i.jsx("span",{children:u})]}),i.jsx("button",{type:"button",onClick:a,"aria-label":"移除粘贴文本",className:"flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-fg-5 transition-colors hover:text-fg-2",children:i.jsx(dt,{className:"h-2.5 w-2.5",strokeWidth:2.5})})]}),r&&i.jsx(q6,{text:e.text,label:u,onClose:()=>o(!1)})]})}function cT({onFiles:e,disabled:t,allowed:a}){const r=T.useRef(null);return i.jsxs(i.Fragment,{children:[i.jsx("input",{ref:r,type:"file",accept:lT.join(","),multiple:!0,hidden:!0,onChange:o=>{e(Array.from(o.target.files??[])),o.target.value=""}}),i.jsx("button",{type:"button",onClick:()=>{var o;return(o=r.current)==null?void 0:o.click()},disabled:t||!a,"aria-label":"Attach image",title:a?"附加图片":"当前模型不支持图片",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-fg-5 transition-colors duration-150 hover:text-fg-3 disabled:cursor-not-allowed disabled:text-fg-6/40",children:i.jsx(jA,{className:"h-4 w-4"})})]})}function dT({attachments:e,foldedTexts:t,error:a,onRemove:r,onRemoveFoldedText:o,className:u}){const c=e.length>0||(t??[]).length>0;return!c&&!a?null:i.jsxs("div",{className:u,children:[c&&i.jsxs("div",{className:"mb-2 flex flex-wrap gap-2",children:[e.map(f=>i.jsxs("div",{className:"group relative",children:[i.jsx(gp,{url:f.url,label:f.filename??"attachment",className:"h-16 w-16 object-cover"}),i.jsx("button",{type:"button",onClick:()=>r(f._id),"aria-label":"Remove attachment",className:"absolute -right-1.5 -top-1.5 flex h-4 w-4 items-center justify-center rounded-full border border-line bg-term text-fg-4 opacity-0 transition-opacity duration-150 hover:text-fg-2 group-hover:opacity-100",children:i.jsx(dt,{className:"h-2.5 w-2.5",strokeWidth:2.5})})]},f._id)),(t??[]).map((f,m)=>i.jsx(Y6,{fold:f,index:m+1,onRemove:()=>o==null?void 0:o(f._id)},f._id))]}),a&&i.jsx("div",{className:"mb-2 font-mono text-[11px] text-red-400",children:a})]})}function fT({isListening:e,disabled:t,onStart:a,onStop:r}){const o=T.useRef(!1),u=f=>{if(t)return;f.preventDefault(),o.current=!0,a();const m=()=>{document.removeEventListener("touchend",m),document.removeEventListener("touchcancel",m),o.current=!1,r()};document.addEventListener("touchend",m,{once:!0}),document.addEventListener("touchcancel",m,{once:!0})},c=()=>{if(t||o.current)return;a();const f=()=>{document.removeEventListener("mouseup",f),r()};document.addEventListener("mouseup",f,{once:!0})};return i.jsx("button",{type:"button",disabled:t,onTouchStart:u,onMouseDown:c,onContextMenu:f=>f.preventDefault(),"aria-label":"按住说话",title:"按住说话",style:{WebkitTouchCallout:"none"},className:ae("flex shrink-0 select-none touch-none items-center justify-center transition-colors duration-150 disabled:cursor-not-allowed disabled:text-fg-6/40","order-first self-stretch w-12 rounded-xl sm:order-none sm:self-auto sm:h-7 sm:w-7 sm:rounded-md",e?"bg-red-500/15 text-red-400 hover:bg-red-500/25":"text-fg-5 hover:text-fg-3"),children:i.jsx(XA,{className:ae("h-6 w-6 sm:h-4 sm:w-4",e&&"animate-pulse")})})}const G6=[.85,1.25,.65,1.4,.75,1.15,.95],$m=4,F1=24;function K6(e){const t=Math.floor(e/60).toString().padStart(2,"0"),a=Math.floor(e%60).toString().padStart(2,"0");return`${t}:${a}`}function V6({volumeLevel:e}){const t=Math.min(Math.max(e,0),1);return i.jsx("div",{className:"flex h-6 items-center gap-1","aria-hidden":"true",children:G6.map((a,r)=>{const o=$m+t*a*(F1-$m),u=Math.max($m,Math.min(F1,o));return i.jsx("span",{className:"w-1 rounded-full bg-red-400 transition-[height] duration-150 ease-out",style:{height:`${u}px`}},r)})})}function mT({phase:e,transcript:t,interimTranscript:a,editText:r,onEditTextChange:o,onTextareaKeyDown:u,textareaRef:c,wrapperClassName:f}){if(e==="idle")return null;const m=t.length>0||a.length>0;return i.jsx("div",{className:f,children:i.jsxs("div",{className:"max-h-[40vh] overflow-y-auto px-4 py-4",children:[e==="recording"&&i.jsx("div",{className:"text-xl leading-relaxed",children:m?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-fg",children:t}),a&&i.jsx("span",{className:"text-fg-4",children:a})]}):i.jsx("span",{className:"italic text-fg-5",children:"正在聆听…"})}),e==="recognizing"&&i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(un,{className:"h-5 w-5 shrink-0 text-emerald-400 fs-spin"}),i.jsx("span",{className:"font-mono text-sm text-emerald-400",children:"识别中…"}),a&&i.jsx("span",{className:"truncate text-base text-fg-4",children:a})]}),e==="done"&&i.jsx("textarea",{ref:c,value:r,onChange:h=>o(h.target.value),onKeyDown:u,rows:2,placeholder:"识别结果(可编辑)",className:"w-full resize-none bg-transparent text-xl leading-relaxed text-fg placeholder:text-fg-5 focus:outline-none"})]})})}function hT({phase:e,volumeLevel:t,elapsed:a,editText:r,error:o,onCancel:u,onConfirm:c,idleHint:f,className:m}){return e==="idle"?i.jsx("div",{className:m,children:o?i.jsx("span",{className:"font-mono text-[10px] text-red-400",children:o}):f?i.jsx("span",{className:"font-mono text-[10px] text-fg-6",children:f}):null}):e==="done"?i.jsxs("div",{className:m,children:[i.jsx("span",{className:"hidden font-mono text-[10px] text-fg-6 sm:inline",children:"⌘/Ctrl+⏎ 发送 · Esc 取消"}),i.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[i.jsx("button",{type:"button",onClick:u,className:"rounded-md border border-line px-3 py-1 text-xs text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"取消"}),i.jsxs("button",{type:"button",onClick:c,disabled:r.trim().length===0,"aria-label":"发送",className:"flex items-center gap-1.5 rounded-md bg-emerald-600 px-3 py-1 text-xs font-medium text-white transition-colors hover:bg-emerald-500 disabled:cursor-not-allowed disabled:bg-fg-6/30 disabled:text-fg-5",children:[i.jsx(No,{className:"h-3.5 w-3.5",strokeWidth:2.5}),i.jsx("span",{children:"发送"})]})]})]}):i.jsx("div",{className:m,children:e==="recording"?i.jsxs(i.Fragment,{children:[i.jsx(V6,{volumeLevel:t}),i.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[11px] font-medium text-red-400",children:[i.jsx("span",{className:"h-1.5 w-1.5 shrink-0 animate-pulse rounded-full bg-red-400"}),"录音中"]}),i.jsx("span",{className:"font-mono text-[11px] tabular-nums text-fg-4",children:K6(a)})]}):i.jsxs(i.Fragment,{children:[i.jsx(un,{className:"h-4 w-4 shrink-0 text-emerald-400 fs-spin"}),i.jsx("span",{className:"font-mono text-[11px] text-emerald-400",children:"识别中…"})]})})}/*! Capacitor: https://capacitorjs.com/ - MIT License */var Vi;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Vi||(Vi={}));class qm extends Error{constructor(t,a,r){super(t),this.message=t,this.code=a,this.data=r}}const X6=e=>{var t,a;return e!=null&&e.androidBridge?"android":!((a=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||a===void 0)&&a.bridge?"ios":"web"},Q6=e=>{const t=e.CapacitorCustomPlatform||null,a=e.Capacitor||{},r=a.Plugins=a.Plugins||{},o=()=>t!==null?t.name:X6(e),u=()=>o()!=="web",c=g=>{const y=h.get(g);return!!(y!=null&&y.platforms.has(o())||f(g))},f=g=>{var y;return(y=a.PluginHeaders)===null||y===void 0?void 0:y.find(N=>N.name===g)},m=g=>e.console.error(g),h=new Map,b=(g,y={})=>{const N=h.get(g);if(N)return console.warn(`Capacitor plugin "${g}" already registered. Cannot register plugins twice.`),N.proxy;const S=o(),A=f(g);let w;const _=async()=>(!w&&S in y?w=typeof y[S]=="function"?w=await y[S]():w=y[S]:t!==null&&!w&&"web"in y&&(w=typeof y.web=="function"?w=await y.web():w=y.web),w),M=(J,V)=>{var j,ee;if(A){const se=A==null?void 0:A.methods.find(he=>V===he.name);if(se)return se.rtype==="promise"?he=>a.nativePromise(g,V.toString(),he):(he,te)=>a.nativeCallback(g,V.toString(),he,te);if(J)return(j=J[V])===null||j===void 0?void 0:j.bind(J)}else{if(J)return(ee=J[V])===null||ee===void 0?void 0:ee.bind(J);throw new qm(`"${g}" plugin is not implemented on ${S}`,Vi.Unimplemented)}},k=J=>{let V;const j=(...ee)=>{const se=_().then(he=>{const te=M(he,J);if(te){const K=te(...ee);return V=K==null?void 0:K.remove,K}else throw new qm(`"${g}.${J}()" is not implemented on ${S}`,Vi.Unimplemented)});return J==="addListener"&&(se.remove=async()=>V()),se};return j.toString=()=>`${J.toString()}() { [capacitor code] }`,Object.defineProperty(j,"name",{value:J,writable:!1,configurable:!1}),j},L=k("addListener"),O=k("removeListener"),P=(J,V)=>{const j=L({eventName:J},V),ee=async()=>{const he=await j;O({eventName:J,callbackId:he},V)},se=new Promise(he=>j.then(()=>he({remove:ee})));return se.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await ee()},se},z=new Proxy({},{get(J,V){switch(V){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return A?P:L;case"removeListener":return O;default:return k(V)}}});return r[g]=z,h.set(g,{name:g,proxy:z,platforms:new Set([...Object.keys(y),...A?[S]:[]])}),z};return a.convertFileSrc||(a.convertFileSrc=g=>g),a.getPlatform=o,a.handleError=m,a.isNativePlatform=u,a.isPluginAvailable=c,a.registerPlugin=b,a.Exception=qm,a.DEBUG=!!a.DEBUG,a.isLoggingEnabled=!!a.isLoggingEnabled,a},W6=e=>e.Capacitor=Q6(e),jc=W6(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Ho=jc.registerPlugin;class bp{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(t,a){let r=!1;this.listeners[t]||(this.listeners[t]=[],r=!0),this.listeners[t].push(a);const u=this.windowListeners[t];u&&!u.registered&&this.addWindowListener(u),r&&this.sendRetainedArgumentsForEvent(t);const c=async()=>this.removeListener(t,a);return Promise.resolve({remove:c})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,a,r){const o=this.listeners[t];if(!o){if(r){let u=this.retainedEventArguments[t];u||(u=[]),u.push(a),this.retainedEventArguments[t]=u}return}o.forEach(u=>u(a))}hasListeners(t){var a;return!!(!((a=this.listeners[t])===null||a===void 0)&&a.length)}registerWindowListener(t,a){this.windowListeners[a]={registered:!1,windowEventName:t,pluginEventName:a,handler:r=>{this.notifyListeners(a,r)}}}unimplemented(t="not implemented"){return new jc.Exception(t,Vi.Unimplemented)}unavailable(t="not available"){return new jc.Exception(t,Vi.Unavailable)}async removeListener(t,a){const r=this.listeners[t];if(!r)return;const o=r.indexOf(a);this.listeners[t].splice(o,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const a=this.retainedEventArguments[t];a&&(delete this.retainedEventArguments[t],a.forEach(r=>{this.notifyListeners(t,r)}))}}const z1=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),$1=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Z6 extends bp{async getCookies(){const t=document.cookie,a={};return t.split(";").forEach(r=>{if(r.length<=0)return;let[o,u]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=$1(o).trim(),u=$1(u).trim(),a[o]=u}),a}async setCookie(t){try{const a=z1(t.key),r=z1(t.value),o=t.expires?`; expires=${t.expires.replace("expires=","")}`:"",u=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${a}=${r||""}${o}; path=${u}; ${c};`}catch(a){return Promise.reject(a)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(a){return Promise.reject(a)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const a of t)document.cookie=a.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}Ho("CapacitorCookies",{web:()=>new Z6});const J6=async e=>new Promise((t,a)=>{const r=new FileReader;r.onload=()=>{const o=r.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},r.onerror=o=>a(o),r.readAsDataURL(e)}),eM=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,u,c)=>(o[u]=e[t[c]],o),{})},tM=(e,t=!0)=>e?Object.entries(e).reduce((r,o)=>{const[u,c]=o;let f,m;return Array.isArray(c)?(m="",c.forEach(h=>{f=t?encodeURIComponent(h):h,m+=`${u}=${f}&`}),m.slice(0,-1)):(f=t?encodeURIComponent(c):c,m=`${u}=${f}`),`${r}&${m}`},"").substr(1):null,nM=(e,t={})=>{const a=Object.assign({method:e.method||"GET",headers:e.headers},t),o=eM(e.headers)["content-type"]||"";if(typeof e.data=="string")a.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const u=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))u.set(c,f);a.body=u.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const u=new FormData;if(e.data instanceof FormData)e.data.forEach((f,m)=>{u.append(m,f)});else for(const f of Object.keys(e.data))u.append(f,e.data[f]);a.body=u;const c=new Headers(a.headers);c.delete("content-type"),a.headers=c}else(o.includes("application/json")||typeof e.data=="object")&&(a.body=JSON.stringify(e.data));return a};class aM extends bp{async request(t){const a=nM(t,t.webFetchExtra),r=tM(t.params,t.shouldEncodeUrlParams),o=r?`${t.url}?${r}`:t.url,u=await fetch(o,a),c=u.headers.get("content-type")||"";let{responseType:f="text"}=u.ok?t:{};c.includes("application/json")&&(f="json");let m,h;switch(f){case"arraybuffer":case"blob":h=await u.blob(),m=await J6(h);break;case"json":m=await u.json();break;case"document":case"text":default:m=await u.text()}const b={};return u.headers.forEach((g,y)=>{b[y]=g}),{data:m,headers:b,status:u.status,url:u.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}Ho("CapacitorHttp",{web:()=>new aM});var q1;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(q1||(q1={}));var Y1;(function(e){e.StatusBar="StatusBar",e.NavigationBar="NavigationBar"})(Y1||(Y1={}));class sM extends bp{async setStyle(){this.unavailable("not available for web")}async setAnimation(){this.unavailable("not available for web")}async show(){this.unavailable("not available for web")}async hide(){this.unavailable("not available for web")}}Ho("SystemBars",{web:()=>new sM});const rM="modulepreload",iM=function(e){return"/"+e},G1={},lM=function(t,a,r){let o=Promise.resolve();if(a&&a.length>0){let c=function(h){return Promise.all(h.map(b=>Promise.resolve(b).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=c(a.map(h=>{if(h=iM(h),h in G1)return;G1[h]=!0;const b=h.endsWith(".css"),g=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const y=document.createElement("link");if(y.rel=b?"stylesheet":rM,b||(y.as="script"),y.crossOrigin="",y.href=h,m&&y.setAttribute("nonce",m),document.head.appendChild(y),b)return new Promise((N,S)=>{y.addEventListener("load",N),y.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return t().catch(u)})},Pi=Ho("SpeechRecognition",{web:()=>lM(()=>import("./web-BF1keYK_.js"),[]).then(e=>new e.SpeechRecognitionWeb)});function oM(e,t){const a=e.length,r=new ArrayBuffer(44+a*2),o=new DataView(r),u=(c,f)=>{for(let m=0;m<f.length;m++)o.setUint8(c+m,f.charCodeAt(m))};u(0,"RIFF"),o.setUint32(4,36+a*2,!0),u(8,"WAVE"),u(12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,1,!0),o.setUint32(24,t,!0),o.setUint32(28,t*2,!0),o.setUint16(32,2,!0),o.setUint16(34,16,!0),u(36,"data"),o.setUint32(40,a*2,!0);for(let c=0;c<a;c++){const f=Math.max(-1,Math.min(1,e[c]));o.setInt16(44+c*2,f<0?f*32768:f*32767,!0)}return new Blob([r],{type:"audio/wav"})}const Th=jc.isNativePlatform(),Ym=!Th&&typeof window<"u"?window.SpeechRecognition??window.webkitSpeechRecognition:void 0,Gm=16e3;function uM(e="zh-CN"){const[t,a]=T.useState(!1),[r,o]=T.useState(""),[u,c]=T.useState(""),[f,m]=T.useState(null),[h,b]=T.useState(0),[g,y]=T.useState("idle"),N=T.useRef(null),S=T.useRef(!1),A=T.useRef([]),w=T.useRef(!1),_=T.useRef(null),M=T.useRef(!1),k=T.useRef(""),L=T.useRef(null),O=T.useRef(null),P=T.useRef(null),z=T.useRef([]),J=T.useRef(!1),V=!0,j=T.useCallback(async()=>{var C,de,_e;(C=P.current)==null||C.disconnect(),(de=O.current)==null||de.getTracks().forEach(B=>B.stop()),await((_e=L.current)==null?void 0:_e.close().catch(()=>{}));const F=z.current;if(z.current=[],P.current=null,O.current=null,L.current=null,F.length===0||J.current){a(!1),y("idle");return}c("识别中…"),y("recognizing");const $=F.reduce((B,pe)=>B+pe.length,0),q=new Float32Array($);let D=0;for(const B of F)q.set(B,D),D+=B.length;const I=oM(q,Gm),W=new FormData;W.append("audio",I,"recording.wav");try{const B=await fetch("/api/transcribe",{method:"POST",body:W});if(J.current)return;if(B.ok){const{text:pe}=await B.json();pe?(o(pe),y("done")):y("idle")}else{const pe=await B.json().catch(()=>({error:`HTTP ${B.status}`}));m(pe.error??`HTTP ${B.status}`),y("idle")}}catch(B){m(`语音识别失败:${B instanceof Error?B.message:String(B)}`),y("idle")}finally{c(""),a(!1)}},[]),ee=T.useCallback(async()=>{if(S.current=!0,_.current&&(clearTimeout(_.current),_.current=null),Th){await Pi.stop().catch(()=>{});for(const F of A.current)await F.remove().catch(()=>{});A.current=[],a(!1),c("")}else N.current?N.current.stop():L.current?await j():(a(!1),y("idle"))},[j]),se=T.useCallback(async()=>{var D;J.current=!1,o(""),c(""),m(null),y("idle");const{available:F}=await Pi.available();if(!F){m("当前设备不支持语音识别");return}if((await Pi.requestPermissions()).speechRecognition!=="granted"){m("请允许语音识别权限");return}const q=[];q.push(await Pi.addListener("partialResults",I=>{c(I.matches[0]??"")})),q.push(await Pi.addListener("listeningState",I=>{const W=I.status==="started";a(W),W&&y("recording"),W||c("")})),A.current=q;try{const I=await Pi.start({language:e,partialResults:!0,maxResults:1});(D=I.matches)!=null&&D.length&&o(W=>W+I.matches.join(""))}catch(I){m(`语音识别错误:${I instanceof Error?I.message:String(I)}`);for(const W of q)await W.remove().catch(()=>{});A.current=[]}},[e]),he=T.useCallback(()=>{if(!Ym)return!1;J.current=!1,o(""),c(""),k.current="",m(null),y("idle"),S.current=!1;const F=new Ym;F.lang=e,F.continuous=!0,F.interimResults=!0,F.maxAlternatives=1,F.onstart=()=>{a(!0),y("recording"),w.current=!1,_.current=setTimeout(()=>{!w.current&&!S.current&&(M.current=!0,S.current=!0,F.stop(),m("语音识别服务不可用(Chrome/Edge 需连接 Google 服务器),下次将使用服务端识别"))},5e3)},F.onresult=$=>{w.current=!0,_.current&&(clearTimeout(_.current),_.current=null);let q="",D="";for(let I=$.resultIndex;I<$.results.length;I++){const W=$.results[I][0].transcript;$.results[I].isFinal?q+=W:D+=W}q&&o(I=>I+q),c(D),k.current=D},F.onerror=$=>{switch($.error!=="no-speech"&&$.error!=="aborted"&&(S.current=!0),$.error){case"not-allowed":m("请允许麦克风权限");break;case"network":m("网络错误,请检查连接");break;case"no-speech":case"aborted":return;default:m(`语音识别错误:${$.error}`)}},F.onend=()=>{if(S.current&&k.current&&o($=>$+k.current),c(""),k.current="",!S.current)try{F.start();return}catch{}a(!1),N.current=null},N.current=F;try{return F.start(),!0}catch{return!1}},[e]),te=T.useCallback(async()=>{J.current=!1,o(""),c(""),m(null),y("idle");try{const I=await fetch("/api/transcribe/status"),{available:W}=await I.json();if(!W){m("语音识别服务未就绪,请稍后重试");return}}catch{m("无法连接语音识别服务");return}let F;try{F=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:Gm,channelCount:1}})}catch{m("请允许麦克风权限");return}const $=new AudioContext({sampleRate:Gm}),q=$.createMediaStreamSource(F),D=$.createScriptProcessor(4096,1,1);z.current=[],D.onaudioprocess=I=>{z.current.push(new Float32Array(I.inputBuffer.getChannelData(0)))},q.connect(D),D.connect($.destination),L.current=$,O.current=F,P.current=D,a(!0),y("recording")},[]),K=T.useCallback(()=>{Th?se():Ym&&!M.current&&he()||te()},[se,he,te]);T.useEffect(()=>{if(!t){b(0);return}if(N.current)return;let F=!1,$=null,q=null,D=0;return(async()=>{try{if($=await navigator.mediaDevices.getUserMedia({audio:!0}),F){$.getTracks().forEach(B=>B.stop());return}q=new AudioContext;const I=q.createMediaStreamSource($),W=q.createAnalyser();W.fftSize=256,I.connect(W);const C=new Uint8Array(W.frequencyBinCount);let de=0;const _e=()=>{if(F)return;W.getByteFrequencyData(C);const B=performance.now();if(B-de>80){let pe=0;for(let Re=0;Re<C.length;Re++)pe+=C[Re];b(pe/(C.length*255)),de=B}D=requestAnimationFrame(_e)};D=requestAnimationFrame(_e)}catch{}})(),()=>{F=!0,cancelAnimationFrame(D),$==null||$.getTracks().forEach(I=>I.stop()),q==null||q.close().catch(()=>{}),b(0)}},[t]),T.useEffect(()=>{!t&&g==="recording"&&y(r?"done":"idle")},[t,g,r]),T.useEffect(()=>()=>{var F,$,q,D;S.current=!0,(F=N.current)==null||F.stop(),($=P.current)==null||$.disconnect(),(q=O.current)==null||q.getTracks().forEach(I=>I.stop()),(D=L.current)==null||D.close().catch(()=>{});for(const I of A.current)I.remove().catch(()=>{})},[]);const G=T.useCallback(()=>{J.current=!0,o(""),c(""),k.current="",y("idle")},[]);return{isSupported:V,isListening:t,phase:g,transcript:r,interimTranscript:u,error:f,volumeLevel:h,start:K,stop:ee,resetTranscript:G}}const cM=240,dM=1e3;function pT(e){const t=uM(),[a,r]=T.useState(""),[o,u]=T.useState(0),c=T.useRef(null),f=T.useRef(null),m=T.useRef(0);T.useEffect(()=>(t.phase==="recording"?(m.current=Date.now(),u(0),f.current=setInterval(()=>{u(Math.floor((Date.now()-m.current)/1e3))},dM)):f.current&&(clearInterval(f.current),f.current=null),()=>{f.current&&(clearInterval(f.current),f.current=null)}),[t.phase]),T.useEffect(()=>{t.phase==="done"&&(r(t.transcript),requestAnimationFrame(()=>{const y=c.current;y&&(y.focus(),y.setSelectionRange(y.value.length,y.value.length))}))},[t.phase,t.transcript]),T.useLayoutEffect(()=>{if(t.phase!=="done")return;const y=c.current;y&&(y.style.height="auto",y.style.height=`${Math.min(y.scrollHeight,cM)}px`)},[t.phase,a]);const h=T.useCallback(()=>{t.stop(),t.resetTranscript(),r("")},[t]),b=T.useCallback(async()=>{const y=a.trim();if(!y){h();return}await e(y)!==!1&&(t.resetTranscript(),r(""))},[a,e,h,t]);T.useEffect(()=>{if(t.phase==="idle")return;const y=N=>{if(N.key==="Escape"&&t.phase!=="recognizing"){N.preventDefault(),h();return}if(t.phase==="done"&&N.key==="Enter"&&(N.metaKey||N.ctrlKey)){if(N.isComposing)return;N.preventDefault(),b()}};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[t.phase,h,b]);const g=T.useCallback(y=>{y.nativeEvent.isComposing||y.keyCode===229||y.key==="Enter"&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),b())},[b]);return{stt:t,editText:a,setEditText:r,elapsed:o,textareaRef:c,cancel:h,confirm:b,handleTextareaKeyDown:g}}const or=es(e=>({agents:[],loaded:!1,loadAgents:async()=>{const t=Le.getState().activeRepoId;try{const a=t?await zy(t):await Uy();e({agents:a,loaded:!0})}catch{e({loaded:!0})}}}));function fM(e){if(typeof e!="string")return e;const t=e.trim();if(t)try{return JSON.parse(t)}catch{return t}}function gn(e){return e&&typeof e=="object"?e:null}function Qr(e){const t=gn(e);return t&&"properties"in t?t.properties:e}function mM(e){const t=gn(e);return typeof(t==null?void 0:t.type)=="string"?t.type:void 0}function hM(e){const t=gn(Qr(e));if(!t)return null;const a=gn(t.info);if(a&&typeof a.id=="string"){const o=Array.isArray(t.parts)?t.parts:void 0;return{...a,...o?{parts:o}:{}}}if(typeof t.id=="string"&&typeof t.role=="string")return t;const r=gn(t.message);return r&&typeof r.id=="string"?r:null}function pM(e){const t=gn(Qr(e));if(!t)return{};const a=gn(t.part)??t;return typeof a.type!="string"?{}:{messageId:typeof a.messageID=="string"&&a.messageID||typeof a.messageId=="string"&&a.messageId||typeof t.messageID=="string"&&t.messageID||typeof t.messageId=="string"&&t.messageId||void 0,part:a}}function gM(e){const t=gn(Qr(e));if(!t||t.field!=="text")return null;const a=typeof t.messageID=="string"?t.messageID:null,r=typeof t.partID=="string"?t.partID:null,o=typeof t.delta=="string"?t.delta:null;return!a||!r||o===null?null:{messageId:a,partId:r,delta:o}}function bM(e){const t=Qr(e);if(Array.isArray(t))return t;const a=gn(t);return a&&Array.isArray(a.todos)?a.todos:[]}function Xa(e){return typeof e=="number"?e:0}function xM(e){const t=gn(Qr(e));if(!t||typeof t.id!="string")return null;const a={id:t.id};typeof t.title=="string"&&(a.title=t.title),typeof t.agent=="string"&&(a.agent=t.agent),typeof t.cost=="number"&&(a.cost=t.cost);const r=typeof t.parentID=="string"?t.parentID:typeof t.parent_id=="string"?t.parent_id:void 0;r&&(a.parentID=r);const o=gn(t.tokens),u=typeof t.tokens_input=="number"||typeof t.tokens_output=="number";if(o||u){const f=o?gn(o.cache):null;a.tokens={input:Xa(o==null?void 0:o.input)||Xa(t.tokens_input),output:Xa(o==null?void 0:o.output)||Xa(t.tokens_output),reasoning:Xa(o==null?void 0:o.reasoning)||Xa(t.tokens_reasoning),cache:{read:Xa(f==null?void 0:f.read)||Xa(t.tokens_cache_read),write:Xa(f==null?void 0:f.write)||Xa(t.tokens_cache_write)}}}const c=gn(t.model);return c&&(a.model={providerID:typeof c.providerID=="string"?c.providerID:void 0,modelID:typeof c.modelID=="string"?c.modelID:void 0,variant:typeof c.variant=="string"?c.variant:void 0}),a}function EM(e){const t=gn(Qr(e));if(!t)return null;if(typeof t.message=="string")return t.message;const a=gn(t.error);if(a){const r=gn(a.data);if(typeof(r==null?void 0:r.message)=="string")return`${a.name??"Error"}: ${r.message}`;if(typeof a.message=="string")return`${a.name??"Error"}: ${a.message}`;if(typeof a.name=="string")return String(a.name)}return typeof t.reason=="string"?t.reason:null}function yM(e){const t=Qr(e);if(typeof t=="string")return t;const a=gn(t);if(typeof(a==null?void 0:a.status)=="string")return a.status;const r=gn(a==null?void 0:a.status);return typeof(r==null?void 0:r.type)=="string"?r.type:typeof(a==null?void 0:a.type)=="string"?a.type:null}function NM(e,t,a,r){switch(e==="message"||e===""?mM(t)??e:e){case"message.updated":{const u=hM(t);u&&r.updateMessage(a,u);break}case"session.updated":{const u=xM(t);u&&r.updateSessionInfo(u);break}case"message.part.updated":{const{messageId:u,part:c}=pM(t);c&&u&&r.updateMessagePart(a,u,c);break}case"message.part.delta":{const u=gM(t);u&&r.appendMessagePartDelta(a,u.messageId,u.partId,u.delta);break}case"todo.updated":{r.updateTodos(a,bM(t));break}case"session.status":{const u=yM(t);u&&r.setSessionStatus(a,u);break}case"session.idle":{r.setSessionStatus(a,"idle");break}case"session.error":{const u=EM(t);r.setSessionStatus(a,"error",u??void 0);break}}}const TM=600*1e3;class _M{constructor(t,a){ln(this,"sessionId");ln(this,"idleTimer",null);ln(this,"active",!1);ln(this,"alive",!0);ln(this,"callbacks");this.sessionId=t,this.callbacks=a,this.resetIdleTimer()}dispatch(t,a){if(!this.alive)return;this.resetIdleTimer();const r=Oe.getState();NM(t,a,this.sessionId,r)}activate(){this.active=!0,this.clearIdleTimer()}deactivate(){this.active=!1,this.resetIdleTimer()}refreshOnIdle(){Oe.getState().refreshSessionData(this.sessionId)}stop(){this.alive=!1,this.clearIdleTimer()}resetIdleTimer(){this.clearIdleTimer(),!this.active&&(this.idleTimer=setTimeout(()=>{this.callbacks.onWorkerIdle(this.sessionId)},TM))}clearIdleTimer(){this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null)}}const vM=1e3,SM=3e4;class AM{constructor(t,a){ln(this,"source",null);ln(this,"reconnectTimer",null);ln(this,"attempts",0);ln(this,"disposed",!1);ln(this,"repoId");ln(this,"onEvent");this.repoId=t,this.onEvent=a}start(){this.connect()}stop(){var t;this.disposed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(t=this.source)==null||t.close(),this.source=null}connect(){if(this.disposed)return;const t=z5(this.repoId),a=new EventSource(t);this.source=a,a.onopen=()=>{this.attempts=0},a.onmessage=o=>{this.handleRaw("message",o)};const r=["message.updated","message.part.updated","message.part.delta","message.removed","todo.updated","session.status","session.idle","session.error","session.updated"];for(const o of r)a.addEventListener(o,u=>{this.handleRaw(o,u)});a.onerror=()=>{if(!(this.disposed||!this.source)&&this.source.readyState===EventSource.CLOSED){this.source.close(),this.source=null;const o=Math.min(vM*2**this.attempts,SM);this.attempts++,this.reconnectTimer=setTimeout(()=>this.connect(),o)}}}handleRaw(t,a){if(!(a instanceof MessageEvent))return;const r=fM(a.data);if(r===void 0)return;const o=this.extractSessionId(r);if(!o)return;let u=t;if(t==="message"||t===""){const c=r&&typeof r=="object"?r:null;typeof(c==null?void 0:c.type)=="string"&&(u=c.type)}this.onEvent(o,u,r)}extractSessionId(t){if(!t||typeof t!="object")return null;const a=t;if(a.properties&&typeof a.properties=="object"){const r=a.properties;if(typeof r.sessionID=="string")return r.sessionID;if(typeof r.id=="string")return r.id}return typeof a.sessionID=="string"?a.sessionID:typeof a.sessionId=="string"?a.sessionId:null}}const wM=6e4;class CM{constructor(t){ln(this,"timer",null);ln(this,"paused",!1);ln(this,"callbacks");this.callbacks=t}start(){this.tick(),this.timer=setInterval(()=>{this.paused||this.tick()},wM)}stop(){this.timer&&(clearInterval(this.timer),this.timer=null)}pause(){this.paused=!0}resume(){this.paused=!1,this.tick()}tick(){const t=Le.getState().activeRepoId;t&&(Oe.getState().loadSessions(),$5(t).then(a=>{const r={};for(const[o,u]of Object.entries(a))r[o]=u.type??"idle";Oe.getState().bulkSetStatuses(r);for(const[o,u]of Object.entries(r))(u==="busy"||u==="retry")&&this.callbacks.ensureWorker(o)}).catch(()=>{}))}}class kM{constructor(){ln(this,"workers",new Map);ln(this,"dispatcher",null);ln(this,"supervisor",null);ln(this,"visibilityHandler",null)}start(t){this.stop();const a={onWorkerIdle:r=>this.removeWorker(r)};this.dispatcher=new AM(t,(r,o,u)=>{const c=this.ensureWorker(r,a);if(o==="session.idle"||o==="session.status"){const f=Oe.getState().sessionStatuses[r];c.dispatch(o,u);const m=Oe.getState().sessionStatuses[r];f&&f!=="idle"&&m==="idle"&&c.refreshOnIdle()}else c.dispatch(o,u)}),this.dispatcher.start(),this.supervisor=new CM({ensureWorker:r=>this.ensureWorker(r,a)}),this.supervisor.start(),this.visibilityHandler=()=>{var r,o;document.hidden?(r=this.supervisor)==null||r.pause():(o=this.supervisor)==null||o.resume()},document.addEventListener("visibilitychange",this.visibilityHandler)}stop(){var t,a;(t=this.dispatcher)==null||t.stop(),this.dispatcher=null,(a=this.supervisor)==null||a.stop(),this.supervisor=null;for(const r of this.workers.values())r.stop();this.workers.clear(),this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null)}activateSession(t){for(const o of this.workers.values())o.sessionId!==t&&o.deactivate();if(!t)return;const a={onWorkerIdle:o=>this.removeWorker(o)};this.ensureWorker(t,a).activate(),Oe.getState().refreshSessionData(t)}deactivateSession(t){var a;(a=this.workers.get(t))==null||a.deactivate()}ensureWorker(t,a){let r=this.workers.get(t);return r||(r=new _M(t,a),this.workers.set(t,r)),r}removeWorker(t){const a=Oe.getState().activeSessionId;if(t===a)return;const r=this.workers.get(t);r&&(r.stop(),this.workers.delete(t))}}const Bc=new kM,K1=(function(e,t,a){const r=Bo(a);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),Wr=(function(e){if(e==null)return IM;if(typeof e=="string")return OM(e);if(typeof e=="object")return RM(e);if(typeof e=="function")return xp(e);throw new Error("Expected function, string, or array as `test`")});function RM(e){const t=[];let a=-1;for(;++a<e.length;)t[a]=Wr(e[a]);return xp(r);function r(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function OM(e){return xp(t);function t(a){return a.tagName===e}}function xp(e){return t;function t(a,r,o){return!!(MM(a)&&e.call(this,a,typeof r=="number"?r:void 0,o||void 0))}}function IM(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function MM(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const V1=/\n/g,X1=/[\t ]+/g,_h=Wr("br"),Q1=Wr(FM),LM=Wr("p"),W1=Wr("tr"),DM=Wr(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",HM,zM]),gT=Wr(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function jM(e,t){const a=t||{},r="children"in e?e.children:[],o=gT(e),u=ET(e,{whitespace:a.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...xT(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<r.length;)c.push(...bT(r[f],e,{whitespace:u,breakBefore:f?void 0:o,breakAfter:f<r.length-1?_h(r[f+1]):o}));const m=[];let h;for(f=-1;++f<c.length;){const b=c[f];typeof b=="number"?h!==void 0&&b>h&&(h=b):b&&(h!==void 0&&h>-1&&m.push(`
|
|
504
|
-
`.repeat(h)||" "),h=-1,m.push(b))}return m.join("")}function bT(e,t,a){return e.type==="element"?BM(e,t,a):e.type==="text"?a.whitespace==="normal"?xT(e,a):PM(e):[]}function BM(e,t,a){const r=ET(e,a),o=e.children||[];let u=-1,c=[];if(DM(e))return c;let f,m;for(_h(e)||W1(e)&&K1(t,e,W1)?m=`
|
|
505
|
-
`:LM(e)?(f=2,m=2):gT(e)&&(f=1,m=1);++u<o.length;)c=c.concat(bT(o[u],e,{whitespace:r,breakBefore:u?void 0:f,breakAfter:u<o.length-1?_h(o[u+1]):m}));return Q1(e)&&K1(t,e,Q1)&&c.push(" "),f&&c.unshift(f),m&&c.push(m),c}function xT(e,t){const a=String(e.value),r=[],o=[];let u=0;for(;u<=a.length;){V1.lastIndex=u;const m=V1.exec(a),h=m&&"index"in m?m.index:a.length;r.push(UM(a.slice(u,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),u===0?t.breakBefore:!0,h===a.length?t.breakAfter:!0)),u=h+1}let c=-1,f;for(;++c<r.length;)r[c].charCodeAt(r[c].length-1)===8203||c<r.length-1&&r[c+1].charCodeAt(0)===8203?(o.push(r[c]),f=void 0):r[c]?(typeof f=="number"&&o.push(f),o.push(r[c]),f=0):(c===0||c===r.length-1)&&o.push(0);return o}function PM(e){return[String(e.value)]}function UM(e,t,a){const r=[];let o=0,u;for(;o<e.length;){X1.lastIndex=o;const c=X1.exec(e);u=c?c.index:e.length,!o&&!u&&c&&!t&&r.push(""),o!==u&&r.push(e.slice(o,u)),o=c?u+c[0].length:u}return o!==u&&!a&&r.push(""),r.join(" ")}function ET(e,t){if(e.type==="element"){const a=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return a.wrap?"pre-wrap":"pre";case"td":case"th":return a.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function HM(e){return!!(e.properties||{}).hidden}function FM(e){return e.tagName==="td"||e.tagName==="th"}function zM(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function $M(e){const t=e.regex,a=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",c="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},a,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},N=t.optional(o)+e.IDENT_RE+"\\s*\\(",S=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],A=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],L={type:A,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},O={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},P=[O,g,f,a,e.C_BLOCK_COMMENT_MODE,b,h],z={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:L,contains:P.concat([{begin:/\(/,end:/\)/,keywords:L,contains:P.concat(["self"]),relevance:0}]),relevance:0},J={className:"function",begin:"("+c+"[\\*&\\s]+)+"+N,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:L,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:L,relevance:0},{begin:N,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:L,relevance:0,contains:[a,e.C_BLOCK_COMMENT_MODE,h,b,f,{begin:/\(/,end:/\)/,keywords:L,relevance:0,contains:["self",a,e.C_BLOCK_COMMENT_MODE,h,b,f]}]},f,a,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:L,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(z,J,O,P,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:L,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:L},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function qM(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},a=$M(e),r=a.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,a.name="Arduino",a.aliases=["ino"],a.supersetOf="cpp",a}function YM(e){const t=e.regex,a={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[a]}]};Object.assign(a,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},u=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,o]};o.contains.push(f);const m={match:/\\"/},h={className:"string",begin:/'/,end:/'/},b={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,a]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],N=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),S={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},A=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],w=["true","false"],_={match:/(\/[a-z._-]+)+/},M=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],k=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],L=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],O=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:A,literal:w,built_in:[...M,...k,"set","shopt",...L,...O]},contains:[N,e.SHEBANG(),S,g,u,c,_,f,m,h,b,a]}}function GM(e){const t=e.regex,a=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",c="("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},a,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},N=t.optional(o)+e.IDENT_RE+"\\s*\\(",w={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},_=[g,f,a,e.C_BLOCK_COMMENT_MODE,b,h],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:_.concat([{begin:/\(/,end:/\)/,keywords:w,contains:_.concat(["self"]),relevance:0}]),relevance:0},k={begin:"("+c+"[\\*&\\s]+)+"+N,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:w,relevance:0},{begin:N,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[a,e.C_BLOCK_COMMENT_MODE,h,b,f,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",a,e.C_BLOCK_COMMENT_MODE,h,b,f]}]},f,a,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:w,disableAutodetect:!0,illegal:"</",contains:[].concat(M,k,_,[g,{begin:e.IDENT_RE+"::",keywords:w},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:h,keywords:w}}}function KM(e){const t=e.regex,a=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",c="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},a,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},N=t.optional(o)+e.IDENT_RE+"\\s*\\(",S=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],A=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],L={type:A,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},O={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},P=[O,g,f,a,e.C_BLOCK_COMMENT_MODE,b,h],z={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:L,contains:P.concat([{begin:/\(/,end:/\)/,keywords:L,contains:P.concat(["self"]),relevance:0}]),relevance:0},J={className:"function",begin:"("+c+"[\\*&\\s]+)+"+N,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:L,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:L,relevance:0},{begin:N,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:L,relevance:0,contains:[a,e.C_BLOCK_COMMENT_MODE,h,b,f,{begin:/\(/,end:/\)/,keywords:L,relevance:0,contains:["self",a,e.C_BLOCK_COMMENT_MODE,h,b,f]}]},f,a,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:L,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(z,J,O,P,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:L,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:L},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function VM(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],a=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],u=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:o.concat(u),built_in:t,literal:r},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),m={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},h={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=e.inherit(b,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:c},N=e.inherit(y,{illegal:/\n/}),S={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,N]},A={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},w=e.inherit(A,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},N]});y.contains=[A,S,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,e.C_BLOCK_COMMENT_MODE],N.contains=[w,S,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[h,A,S,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},M={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},k=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",L={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},_,m,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,M,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,M,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+k+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:a.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,M],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[_,m,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},L]}}const XM=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),QM=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],WM=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],ZM=[...QM,...WM],JM=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),eL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),tL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),nL=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function aL(e){const t=e.regex,a=XM(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",u=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[a.BLOCK_COMMENT,r,a.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},a.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+eL.join("|")+")"},{begin:":(:)?("+tL.join("|")+")"}]},a.CSS_VARIABLE,{className:"attribute",begin:"\\b("+nL.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[a.BLOCK_COMMENT,a.HEXCOLOR,a.IMPORTANT,a.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},a.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:u},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:JM.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,a.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ZM.join("|")+")\\b"}]}}function sL(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function rL(e){const u={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:u,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:u,illegal:/["']/}]}]}}function iL(e){const t=e.regex,a=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(a,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function lL(e){const t=e.regex,a={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const o={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},u={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[r,u,o,c,a,"self"],relevance:0},m=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,b=/'[^']*'/,g=t.either(m,h,b),y=t.concat(g,"(\\s*\\.\\s*",g,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[r,f,u,o,c,a]}}]}}var Hi="[0-9](_*[0-9])*",dc=`\\.(${Hi})`,fc="[0-9a-fA-F](_*[0-9a-fA-F])*",Z1={className:"number",variants:[{begin:`(\\b(${Hi})((${dc})|\\.)?|(${dc}))[eE][+-]?(${Hi})[fFdD]?\\b`},{begin:`\\b(${Hi})((${dc})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${dc})[fFdD]?\\b`},{begin:`\\b(${Hi})[fFdD]\\b`},{begin:`\\b0[xX]((${fc})\\.?|(${fc})?\\.(${fc}))[pP][+-]?(${Hi})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${fc})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function yT(e,t,a){return a===-1?"":e.replace(t,r=>yT(e,t,a-1))}function oL(e){const t=e.regex,a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=a+yT("(?:<"+a+"~~~(?:\\s*,\\s*"+a+"~~~)*>)?",/~~~/g,2),m={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},h={className:"meta",begin:"@"+a,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:m,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,a),/\s+/,a,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,a],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:m,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Z1,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Z1,h]}}const J1="[A-Za-z$_][0-9A-Za-z$_]*",uL=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],cL=["true","false","null","undefined","NaN","Infinity"],NT=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],TT=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_T=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],dL=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],fL=[].concat(_T,NT,TT);function mL(e){const t=e.regex,a=($,{after:q})=>{const D="</"+$[0].slice(1);return $.input.indexOf(D,q)!==-1},r=J1,o={begin:"<>",end:"</>"},u=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:($,q)=>{const D=$[0].length+$.index,I=$.input[D];if(I==="<"||I===","){q.ignoreMatch();return}I===">"&&(a($,{after:D})||q.ignoreMatch());let W;const C=$.input.substring(D);if(W=C.match(/^\s*=/)){q.ignoreMatch();return}if((W=C.match(/^\s+extends\s+/))&&W.index===0){q.ignoreMatch();return}}},f={$pattern:J1,keyword:uL,literal:cL,built_in:fL,"variable.language":dL},m="[0-9](_?[0-9])*",h=`\\.(${m})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${h})|\\.)?|(${h}))[eE][+-]?(${m})\\b`},{begin:`\\b(${b})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},N={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},A={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},M={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},k=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,N,S,A,w,{match:/\$\d+/},g];y.contains=k.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(k)});const L=[].concat(M,y.contains),O=L.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(L)}]),P={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:O},z={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},J={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...NT,...TT]}},V={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[P],illegal:/%/},ee={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function se($){return t.concat("(?!",$.join("|"),")")}const he={match:t.concat(/\b/,se([..._T,"super","import"].map($=>`${$}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},te={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},K={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},P]},G="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(G)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[P]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:J},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),V,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,N,S,A,w,M,{match:/\$\d+/},g,J,{scope:"attr",match:r+t.lookahead(":"),relevance:0},F,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,e.REGEXP_MODE,{className:"function",begin:G,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:u},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},j,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[P,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},te,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[P]},he,ee,z,K,{match:/\$[(.]/}]}}function hL(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},a={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],o={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,a,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Fi="[0-9](_*[0-9])*",mc=`\\.(${Fi})`,hc="[0-9a-fA-F](_*[0-9a-fA-F])*",pL={className:"number",variants:[{begin:`(\\b(${Fi})((${mc})|\\.)?|(${mc}))[eE][+-]?(${Fi})[fFdD]?\\b`},{begin:`\\b(${Fi})((${mc})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${mc})[fFdD]?\\b`},{begin:`\\b(${Fi})[fFdD]\\b`},{begin:`\\b0[xX]((${hc})\\.?|(${hc})?\\.(${hc}))[pP][+-]?(${Fi})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${hc})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function gL(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},u={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[u,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,u,o]}]};o.contains.push(c);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},m={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},h=pL,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),g={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=g;return y.variants[1].contains=[g],g.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,b,a,r,f,m,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[g,e.C_LINE_COMMENT_MODE,b],relevance:0},e.C_LINE_COMMENT_MODE,b,f,m,c,e.C_NUMBER_MODE]},b]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,m]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
506
|
-
`},h]}}const bL=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),xL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],EL=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],yL=[...xL,...EL],NL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),vT=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),ST=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),TL=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),_L=vT.concat(ST).sort().reverse();function vL(e){const t=bL(e),a=_L,r="and or not only",o="[\\w-]+",u="("+o+"|@\\{"+o+"\\})",c=[],f=[],m=function(k){return{className:"string",begin:"~?"+k+".*?"+k}},h=function(k,L,O){return{className:k,begin:L,relevance:O}},b={$pattern:/[a-z-]+/,keyword:r,attribute:NL.join(" ")},g={begin:"\\(",end:"\\)",contains:f,keywords:b,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m("'"),m('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,g,h("variable","@@?"+o,10),h("variable","@\\{"+o+"\\}"),h("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const y=f.concat({begin:/\{/,end:/\}/,contains:c}),N={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},S={begin:u+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+TL.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},A={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:b,returnEnd:!0,contains:f,relevance:0}},w={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:y}},_={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:u,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,N,h("keyword","all\\b"),h("variable","@\\{"+o+"\\}"),{begin:"\\b("+yL.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,h("selector-tag",u,0),h("selector-id","#"+u),h("selector-class","\\."+u,0),h("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+vT.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+ST.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:y},{begin:"!important"},t.FUNCTION_DISPATCH]},M={begin:o+`:(:)?(${a.join("|")})`,returnBegin:!0,contains:[_]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,A,w,M,S,_,N,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function SL(e){const t="\\[=*\\[",a="\\]=*\\]",r={begin:t,end:a,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,a,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:a,contains:[r],relevance:5}])}}function AL(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,a]},o={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},u={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,a,r,o,u,c]}}function wL(e){const t=e.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},u={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,m={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},h={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=e.inherit(h,{contains:[]}),y=e.inherit(b,{contains:[]});h.contains.push(y),b.contains.push(g);let N=[a,m];return[h,b,g,y].forEach(_=>{_.contains=_.contains.concat(N)}),N=N.concat(h,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:N},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:N}]}]},a,u,h,b,{className:"quote",begin:"^>\\s+",contains:N,end:"$"},o,r,m,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function CL(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},a=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:a,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},m={$pattern:a,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+m.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:m,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function kL(e){const t=e.regex,a=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:a.join(" ")},u={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},c={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},m={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},h={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},b=[e.BACKSLASH_ESCAPE,u,m],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(A,w,_="\\1")=>{const M=_==="\\1"?_:t.concat(_,w);return t.concat(t.concat("(?:",A,")"),w,/(?:\\.|[^\\\/])*?/,M,/(?:\\.|[^\\\/])*?/,_,r)},N=(A,w,_)=>t.concat(t.concat("(?:",A,")"),w,/(?:\\.|[^\\\/])*?/,_,r),S=[m,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:b,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},h,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",t.either(...g,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:N("(?:m|qr)?",/\//,/\//)},{begin:N("m|qr",t.either(...g,{capture:!0}),/\1/)},{begin:N("m|qr",/\(/,/\)/)},{begin:N("m|qr",/\[/,/\]/)},{begin:N("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,h]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return u.contains=S,c.contains=S,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:S}}function RL(e){const t=e.regex,a=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,a),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,a),u=t.concat(/[A-Z]+/,a),c={scope:"variable",match:"\\$+"+r},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},m={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=e.inherit(e.APOS_STRING_MODE,{illegal:null}),b=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(m)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(m),"on:begin":(te,K)=>{K.data._beginMatch=te[1]||te[2]},"on:end":(te,K)=>{K.data._beginMatch!==te[1]&&K.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),N=`[
|
|
507
|
-
]`,S={scope:"string",variants:[b,h,g,y]},A={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},w=["false","null","true"],_=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],M=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],L={keyword:_,literal:(te=>{const K=[];return te.forEach(G=>{K.push(G),G.toLowerCase()===G?K.push(G.toUpperCase()):K.push(G.toLowerCase())}),K})(w),built_in:M},O=te=>te.map(K=>K.replace(/\|\d+$/,"")),P={variants:[{match:[/new/,t.concat(N,"+"),t.concat("(?!",O(M).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},z=t.concat(r,"\\b(?!\\()"),J={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),z],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),z],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},V={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},j={relevance:0,begin:/\(/,end:/\)/,keywords:L,contains:[V,c,J,e.C_BLOCK_COMMENT_MODE,S,A,P]},ee={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",O(_).join("\\b|"),"|",O(M).join("\\b|"),"\\b)"),r,t.concat(N,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[j]};j.contains.push(ee);const se=[V,J,e.C_BLOCK_COMMENT_MODE,S,A,P],he={begin:t.concat(/#\[\s*\\?/,t.either(o,u)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:w,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:w,keyword:["new","array"]},contains:["self",...se]},...se,{scope:"meta",variants:[{match:o},{match:u}]}]};return{case_insensitive:!1,keywords:L,contains:[he,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,ee,J,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},P,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:L,contains:["self",he,c,J,e.C_BLOCK_COMMENT_MODE,S,A]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},S,A]}}function OL(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function IL(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function ML(e){const t=e.regex,a=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},m={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},b={begin:/\{\{/,relevance:0},g={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,m],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,m],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,m,b,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,m,b,h]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,b,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,b,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",N=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,S=`\\b|${r.join("|")}`,A={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${N}))[eE][+-]?(${y})[jJ]?(?=${S})`},{begin:`(${N})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${S})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${S})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${S})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${S})`},{begin:`\\b(${y})[jJ](?=${S})`}]},w={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",m,A,g,e.HASH_COMMENT_MODE]}]};return h.contains=[g,A,m],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[m,A,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,w,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[_]},{variants:[{match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[A,_,g]}]}}function LL(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function DL(e){const t=e.regex,a=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,u=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:a,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:a},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[u,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[a,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:u},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function jL(e){const t=e.regex,a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},m={begin:"#<",end:">"},h=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:c},g={className:"string",contains:[e.BACKSLASH_ESCAPE,b],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,b]})]}]},y="[1-9](_?[0-9])*|0",N="[0-9](_?[0-9])*",S={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${N}))?([eE][+-]?(${N})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},A={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},P=[g,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:c},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[A]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:a}],relevance:0},S,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,b],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(m,h),relevance:0}].concat(m,h);b.contains=P,A.contains=P;const j=[{begin:/^\s*=>/,starts:{end:"$",contains:P}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:P}}];return h.unshift(m),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(j).concat(h).concat(P)}}function BL(e){const t=e.regex,a=/(r#)?/,r=t.concat(a,e.UNDERSCORE_IDENT_RE),o=t.concat(a,e.IDENT_RE),u={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],m=["true","false","Some","None","Ok","Err"],h=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],b=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:b,keyword:f,literal:m,built_in:h},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:h,type:b}},{className:"punctuation",begin:"->"},u]}}const PL=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),UL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],HL=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],FL=[...UL,...HL],zL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),$L=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),qL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),YL=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function GL(e){const t=PL(e),a=qL,r=$L,o="@[a-z-]+",u="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+FL.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+a.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+YL.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:u,attribute:zL.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function KL(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function VL(e){const t=e.regex,a=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},u=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],m=["add","asc","collation","desc","final","first","last","view"],h=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],b=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],N=b,S=[...h,...m].filter(O=>!b.includes(O)),A={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},w={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...N),/\s*\(/),relevance:0,keywords:{built_in:N}};function M(O){return t.concat(/\b/,t.either(...O.map(P=>P.replace(/\s+/,"\\s+"))),/\b/)}const k={scope:"keyword",match:M(y),relevance:0};function L(O,{exceptions:P,when:z}={}){const J=z;return P=P||[],O.map(V=>V.match(/\|\d+$/)||P.includes(V)?V:J(V)?`${V}|0`:V)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:L(S,{when:O=>O.length<3}),literal:u,type:f,built_in:g},contains:[{scope:"type",match:M(c)},k,_,A,r,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,a,w]}}function AT(e){return e?typeof e=="string"?e:e.source:null}function ro(e){return wt("(?=",e,")")}function wt(...e){return e.map(a=>AT(a)).join("")}function XL(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Hn(...e){return"("+(XL(e).capture?"":"?:")+e.map(r=>AT(r)).join("|")+")"}const Ep=e=>wt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),QL=["Protocol","Type"].map(Ep),eE=["init","self"].map(Ep),WL=["Any","Self"],Km=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],tE=["false","nil","true"],ZL=["assignment","associativity","higherThan","left","lowerThan","none","right"],JL=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],nE=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],wT=Hn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),CT=Hn(wT,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Vm=wt(wT,CT,"*"),kT=Hn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Pc=Hn(kT,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Qa=wt(kT,Pc,"*"),pc=wt(/[A-Z]/,Pc,"*"),eD=["attached","autoclosure",wt(/convention\(/,Hn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",wt(/objc\(/,Qa,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],tD=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function nD(e){const t={match:/\s+/,relevance:0},a=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,a],o={match:[/\./,Hn(...QL,...eE)],className:{2:"keyword"}},u={match:wt(/\./,Hn(...Km)),relevance:0},c=Km.filter(et=>typeof et=="string").concat(["_|0"]),f=Km.filter(et=>typeof et!="string").concat(WL).map(Ep),m={variants:[{className:"keyword",match:Hn(...f,...eE)}]},h={$pattern:Hn(/\b\w+/,/#\w+/),keyword:c.concat(JL),literal:tE},b=[o,u,m],g={match:wt(/\./,Hn(...nE)),relevance:0},y={className:"built_in",match:wt(/\b/,Hn(...nE),/(?=\()/)},N=[g,y],S={match:/->/,relevance:0},A={className:"operator",relevance:0,variants:[{match:Vm},{match:`\\.(\\.|${CT})+`}]},w=[S,A],_="([0-9]_*)+",M="([0-9a-fA-F]_*)+",k={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${M})(\\.(${M}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},L=(et="")=>({className:"subst",variants:[{match:wt(/\\/,et,/[0\\tnr"']/)},{match:wt(/\\/,et,/u\{[0-9a-fA-F]{1,8}\}/)}]}),O=(et="")=>({className:"subst",match:wt(/\\/,et,/[\t ]*(?:[\r\n]|\r\n)/)}),P=(et="")=>({className:"subst",label:"interpol",begin:wt(/\\/,et,/\(/),end:/\)/}),z=(et="")=>({begin:wt(et,/"""/),end:wt(/"""/,et),contains:[L(et),O(et),P(et)]}),J=(et="")=>({begin:wt(et,/"/),end:wt(/"/,et),contains:[L(et),P(et)]}),V={className:"string",variants:[z(),z("#"),z("##"),z("###"),J(),J("#"),J("##"),J("###")]},j=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],ee={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:j},se=et=>{const qn=wt(et,/\//),Dn=wt(/\//,et);return{begin:qn,end:Dn,contains:[...j,{scope:"comment",begin:`#(?!.*${Dn})`,end:/$/}]}},he={scope:"regexp",variants:[se("###"),se("##"),se("#"),ee]},te={match:wt(/`/,Qa,/`/)},K={className:"variable",match:/\$\d+/},G={className:"variable",match:`\\$${Pc}+`},F=[te,K,G],$={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:tD,contains:[...w,k,V]}]}},q={scope:"keyword",match:wt(/@/,Hn(...eD),ro(Hn(/\(/,/\s+/)))},D={scope:"meta",match:wt(/@/,Qa)},I=[$,q,D],W={match:ro(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:wt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Pc,"+")},{className:"type",match:pc,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:wt(/\s+&\s+/,ro(pc)),relevance:0}]},C={begin:/</,end:/>/,keywords:h,contains:[...r,...b,...I,S,W]};W.contains.push(C);const de={match:wt(Qa,/\s*:/),keywords:"_|0",relevance:0},_e={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",de,...r,he,...b,...N,...w,k,V,...F,...I,W]},B={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,W]},pe={begin:Hn(ro(wt(Qa,/\s*:/)),ro(wt(Qa,/\s+/,Qa,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Qa}]},Re={begin:/\(/,end:/\)/,keywords:h,contains:[pe,...r,...b,...w,k,V,...I,W,_e],endsParent:!0,illegal:/["']/},De={match:[/(func|macro)/,/\s+/,Hn(te.match,Qa,Vm)],className:{1:"keyword",3:"title.function"},contains:[B,Re,t],illegal:[/\[/,/%/]},lt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[B,Re,t],illegal:/\[|%/},Bt={match:[/operator/,/\s+/,Vm],className:{1:"keyword",3:"title"}},Jt={begin:[/precedencegroup/,/\s+/,pc],className:{1:"keyword",3:"title"},contains:[W],keywords:[...ZL,...tE],end:/}/},ya={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},dn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},$n={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Qa,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[B,...b,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:pc},...b],relevance:0}]};for(const et of V.variants){const qn=et.contains.find(Yn=>Yn.label==="interpol");qn.keywords=h;const Dn=[...b,...N,...w,k,V,...F];qn.contains=[...Dn,{begin:/\(/,end:/\)/,contains:["self",...Dn]}]}return{name:"Swift",keywords:h,contains:[...r,De,lt,ya,dn,$n,Bt,Jt,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},he,...b,...N,...w,k,V,...F,...I,W,_e]}}const Uc="[A-Za-z$_][0-9A-Za-z$_]*",RT=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],OT=["true","false","null","undefined","NaN","Infinity"],IT=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],MT=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],LT=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],DT=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],jT=[].concat(LT,IT,MT);function aD(e){const t=e.regex,a=($,{after:q})=>{const D="</"+$[0].slice(1);return $.input.indexOf(D,q)!==-1},r=Uc,o={begin:"<>",end:"</>"},u=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:($,q)=>{const D=$[0].length+$.index,I=$.input[D];if(I==="<"||I===","){q.ignoreMatch();return}I===">"&&(a($,{after:D})||q.ignoreMatch());let W;const C=$.input.substring(D);if(W=C.match(/^\s*=/)){q.ignoreMatch();return}if((W=C.match(/^\s+extends\s+/))&&W.index===0){q.ignoreMatch();return}}},f={$pattern:Uc,keyword:RT,literal:OT,built_in:jT,"variable.language":DT},m="[0-9](_?[0-9])*",h=`\\.(${m})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${h})|\\.)?|(${h}))[eE][+-]?(${m})\\b`},{begin:`\\b(${b})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},N={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},A={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},M={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},k=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,N,S,A,w,{match:/\$\d+/},g];y.contains=k.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(k)});const L=[].concat(M,y.contains),O=L.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(L)}]),P={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:O},z={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},J={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...IT,...MT]}},V={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[P],illegal:/%/},ee={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function se($){return t.concat("(?!",$.join("|"),")")}const he={match:t.concat(/\b/,se([...LT,"super","import"].map($=>`${$}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},te={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},K={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},P]},G="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(G)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[P]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:J},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),V,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,N,S,A,w,M,{match:/\$\d+/},g,J,{scope:"attr",match:r+t.lookahead(":"),relevance:0},F,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,e.REGEXP_MODE,{className:"function",begin:G,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:u},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},j,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[P,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},te,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[P]},he,ee,z,K,{match:/\$[(.]/}]}}function sD(e){const t=e.regex,a=aD(e),r=Uc,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],u={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[a.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},m=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Uc,keyword:RT.concat(m),literal:OT,built_in:jT.concat(o),"variable.language":DT},b={className:"meta",begin:"@"+r},g=(A,w,_)=>{const M=A.contains.findIndex(k=>k.label===w);if(M===-1)throw new Error("can not find mode to replace");A.contains.splice(M,1,_)};Object.assign(a.keywords,h),a.exports.PARAMS_CONTAINS.push(b);const y=a.contains.find(A=>A.scope==="attr"),N=Object.assign({},y,{match:t.concat(r,t.lookahead(/\s*\?:/))});a.exports.PARAMS_CONTAINS.push([a.exports.CLASS_REFERENCE,y,N]),a.contains=a.contains.concat([b,u,c,N]),g(a,"shebang",e.SHEBANG()),g(a,"use_strict",f);const S=a.contains.find(A=>A.label==="func.def");return S.relevance=0,Object.assign(a,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),a}function rD(e){const t=e.regex,a={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,u=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,m={className:"literal",variants:[{begin:t.concat(/# */,t.either(u,o),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(u,o),/ +/,t.either(c,f),/ *#/)}]},h={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},b={className:"label",begin:/^\w+:/},g=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[a,r,m,h,b,g,y,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[y]}]}}function iD(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const a=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},u={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},m={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},h={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[a,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},u,c,o,e.QUOTE_STRING_MODE,m,h,f]}}function lD(e){const t=e.regex,a=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},u={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(u,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),m=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[u,m,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[u,c,m,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[m]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(a,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:a,relevance:0,starts:h}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(a,/>/))),contains:[{className:"name",begin:a,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function oD(e){const t="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},u={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},N={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},S={begin:/\{/,end:/\}/,contains:[N],illegal:"\\n",relevance:0},A={begin:"\\[",end:"\\]",contains:[N],illegal:"\\n",relevance:0},w=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},S,A,u,c],_=[...w];return _.pop(),_.push(f),N.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}const uD={arduino:qM,bash:YM,c:GM,cpp:KM,csharp:VM,css:aL,diff:sL,go:rL,graphql:iL,ini:lL,java:oL,javascript:mL,json:hL,kotlin:gL,less:vL,lua:SL,makefile:AL,markdown:wL,objectivec:CL,perl:kL,php:RL,"php-template":OL,plaintext:IL,python:ML,"python-repl":LL,r:DL,ruby:jL,rust:BL,scss:GL,shell:KL,sql:VL,swift:nD,typescript:sD,vbnet:rD,wasm:iD,xml:lD,yaml:oD};var Xm,aE;function cD(){if(aE)return Xm;aE=1;function e(Q){return Q instanceof Map?Q.clear=Q.delete=Q.set=function(){throw new Error("map is read-only")}:Q instanceof Set&&(Q.add=Q.clear=Q.delete=function(){throw new Error("set is read-only")}),Object.freeze(Q),Object.getOwnPropertyNames(Q).forEach(ge=>{const Ce=Q[ge],Ke=typeof Ce;(Ke==="object"||Ke==="function")&&!Object.isFrozen(Ce)&&e(Ce)}),Q}class t{constructor(ge){ge.data===void 0&&(ge.data={}),this.data=ge.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function a(Q){return Q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(Q,...ge){const Ce=Object.create(null);for(const Ke in Q)Ce[Ke]=Q[Ke];return ge.forEach(function(Ke){for(const Lt in Ke)Ce[Lt]=Ke[Lt]}),Ce}const o="</span>",u=Q=>!!Q.scope,c=(Q,{prefix:ge})=>{if(Q.startsWith("language:"))return Q.replace("language:","language-");if(Q.includes(".")){const Ce=Q.split(".");return[`${ge}${Ce.shift()}`,...Ce.map((Ke,Lt)=>`${Ke}${"_".repeat(Lt+1)}`)].join(" ")}return`${ge}${Q}`};class f{constructor(ge,Ce){this.buffer="",this.classPrefix=Ce.classPrefix,ge.walk(this)}addText(ge){this.buffer+=a(ge)}openNode(ge){if(!u(ge))return;const Ce=c(ge.scope,{prefix:this.classPrefix});this.span(Ce)}closeNode(ge){u(ge)&&(this.buffer+=o)}value(){return this.buffer}span(ge){this.buffer+=`<span class="${ge}">`}}const m=(Q={})=>{const ge={children:[]};return Object.assign(ge,Q),ge};class h{constructor(){this.rootNode=m(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ge){this.top.children.push(ge)}openNode(ge){const Ce=m({scope:ge});this.add(Ce),this.stack.push(Ce)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ge){return this.constructor._walk(ge,this.rootNode)}static _walk(ge,Ce){return typeof Ce=="string"?ge.addText(Ce):Ce.children&&(ge.openNode(Ce),Ce.children.forEach(Ke=>this._walk(ge,Ke)),ge.closeNode(Ce)),ge}static _collapse(ge){typeof ge!="string"&&ge.children&&(ge.children.every(Ce=>typeof Ce=="string")?ge.children=[ge.children.join("")]:ge.children.forEach(Ce=>{h._collapse(Ce)}))}}class b extends h{constructor(ge){super(),this.options=ge}addText(ge){ge!==""&&this.add(ge)}startScope(ge){this.openNode(ge)}endScope(){this.closeNode()}__addSublanguage(ge,Ce){const Ke=ge.root;Ce&&(Ke.scope=`language:${Ce}`),this.add(Ke)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(Q){return Q?typeof Q=="string"?Q:Q.source:null}function y(Q){return A("(?=",Q,")")}function N(Q){return A("(?:",Q,")*")}function S(Q){return A("(?:",Q,")?")}function A(...Q){return Q.map(Ce=>g(Ce)).join("")}function w(Q){const ge=Q[Q.length-1];return typeof ge=="object"&&ge.constructor===Object?(Q.splice(Q.length-1,1),ge):{}}function _(...Q){return"("+(w(Q).capture?"":"?:")+Q.map(Ke=>g(Ke)).join("|")+")"}function M(Q){return new RegExp(Q.toString()+"|").exec("").length-1}function k(Q,ge){const Ce=Q&&Q.exec(ge);return Ce&&Ce.index===0}const L=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function O(Q,{joinWith:ge}){let Ce=0;return Q.map(Ke=>{Ce+=1;const Lt=Ce;let Ct=g(Ke),je="";for(;Ct.length>0;){const Ie=L.exec(Ct);if(!Ie){je+=Ct;break}je+=Ct.substring(0,Ie.index),Ct=Ct.substring(Ie.index+Ie[0].length),Ie[0][0]==="\\"&&Ie[1]?je+="\\"+String(Number(Ie[1])+Lt):(je+=Ie[0],Ie[0]==="("&&Ce++)}return je}).map(Ke=>`(${Ke})`).join(ge)}const P=/\b\B/,z="[a-zA-Z]\\w*",J="[a-zA-Z_]\\w*",V="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ee="\\b(0b[01]+)",se="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",he=(Q={})=>{const ge=/^#![ ]*\//;return Q.binary&&(Q.begin=A(ge,/.*\b/,Q.binary,/\b.*/)),r({scope:"meta",begin:ge,end:/$/,relevance:0,"on:begin":(Ce,Ke)=>{Ce.index!==0&&Ke.ignoreMatch()}},Q)},te={begin:"\\\\[\\s\\S]",relevance:0},K={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[te]},G={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[te]},F={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},$=function(Q,ge,Ce={}){const Ke=r({scope:"comment",begin:Q,end:ge,contains:[]},Ce);Ke.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Lt=_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ke.contains.push({begin:A(/[ ]+/,"(",Lt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ke},q=$("//","$"),D=$("/\\*","\\*/"),I=$("#","$"),W={scope:"number",begin:V,relevance:0},C={scope:"number",begin:j,relevance:0},de={scope:"number",begin:ee,relevance:0},_e={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[te,{begin:/\[/,end:/\]/,relevance:0,contains:[te]}]},B={scope:"title",begin:z,relevance:0},pe={scope:"title",begin:J,relevance:0},Re={begin:"\\.\\s*"+J,relevance:0};var lt=Object.freeze({__proto__:null,APOS_STRING_MODE:K,BACKSLASH_ESCAPE:te,BINARY_NUMBER_MODE:de,BINARY_NUMBER_RE:ee,COMMENT:$,C_BLOCK_COMMENT_MODE:D,C_LINE_COMMENT_MODE:q,C_NUMBER_MODE:C,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(Q){return Object.assign(Q,{"on:begin":(ge,Ce)=>{Ce.data._beginMatch=ge[1]},"on:end":(ge,Ce)=>{Ce.data._beginMatch!==ge[1]&&Ce.ignoreMatch()}})},HASH_COMMENT_MODE:I,IDENT_RE:z,MATCH_NOTHING_RE:P,METHOD_GUARD:Re,NUMBER_MODE:W,NUMBER_RE:V,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:G,REGEXP_MODE:_e,RE_STARTERS_RE:se,SHEBANG:he,TITLE_MODE:B,UNDERSCORE_IDENT_RE:J,UNDERSCORE_TITLE_MODE:pe});function Bt(Q,ge){Q.input[Q.index-1]==="."&&ge.ignoreMatch()}function Jt(Q,ge){Q.className!==void 0&&(Q.scope=Q.className,delete Q.className)}function ya(Q,ge){ge&&Q.beginKeywords&&(Q.begin="\\b("+Q.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Q.__beforeBegin=Bt,Q.keywords=Q.keywords||Q.beginKeywords,delete Q.beginKeywords,Q.relevance===void 0&&(Q.relevance=0))}function dn(Q,ge){Array.isArray(Q.illegal)&&(Q.illegal=_(...Q.illegal))}function $n(Q,ge){if(Q.match){if(Q.begin||Q.end)throw new Error("begin & end are not supported with match");Q.begin=Q.match,delete Q.match}}function et(Q,ge){Q.relevance===void 0&&(Q.relevance=1)}const qn=(Q,ge)=>{if(!Q.beforeMatch)return;if(Q.starts)throw new Error("beforeMatch cannot be used with starts");const Ce=Object.assign({},Q);Object.keys(Q).forEach(Ke=>{delete Q[Ke]}),Q.keywords=Ce.keywords,Q.begin=A(Ce.beforeMatch,y(Ce.begin)),Q.starts={relevance:0,contains:[Object.assign(Ce,{endsParent:!0})]},Q.relevance=0,delete Ce.beforeMatch},Dn=["of","and","for","in","not","or","if","then","parent","list","value"],Yn="keyword";function Da(Q,ge,Ce=Yn){const Ke=Object.create(null);return typeof Q=="string"?Lt(Ce,Q.split(" ")):Array.isArray(Q)?Lt(Ce,Q):Object.keys(Q).forEach(function(Ct){Object.assign(Ke,Da(Q[Ct],ge,Ct))}),Ke;function Lt(Ct,je){ge&&(je=je.map(Ie=>Ie.toLowerCase())),je.forEach(function(Ie){const Ge=Ie.split("|");Ke[Ge[0]]=[Ct,Ee(Ge[0],Ge[1])]})}}function Ee(Q,ge){return ge?Number(ge):ft(Q)?0:1}function ft(Q){return Dn.includes(Q.toLowerCase())}const la={},It=Q=>{console.error(Q)},Jr=(Q,...ge)=>{console.log(`WARN: ${Q}`,...ge)},fe=(Q,ge)=>{la[`${Q}/${ge}`]||(console.log(`Deprecated as of ${Q}. ${ge}`),la[`${Q}/${ge}`]=!0)},Ae=new Error;function ze(Q,ge,{key:Ce}){let Ke=0;const Lt=Q[Ce],Ct={},je={};for(let Ie=1;Ie<=ge.length;Ie++)je[Ie+Ke]=Lt[Ie],Ct[Ie+Ke]=!0,Ke+=M(ge[Ie-1]);Q[Ce]=je,Q[Ce]._emit=Ct,Q[Ce]._multi=!0}function tt(Q){if(Array.isArray(Q.begin)){if(Q.skip||Q.excludeBegin||Q.returnBegin)throw It("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ae;if(typeof Q.beginScope!="object"||Q.beginScope===null)throw It("beginScope must be object"),Ae;ze(Q,Q.begin,{key:"beginScope"}),Q.begin=O(Q.begin,{joinWith:""})}}function pt(Q){if(Array.isArray(Q.end)){if(Q.skip||Q.excludeEnd||Q.returnEnd)throw It("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ae;if(typeof Q.endScope!="object"||Q.endScope===null)throw It("endScope must be object"),Ae;ze(Q,Q.end,{key:"endScope"}),Q.end=O(Q.end,{joinWith:""})}}function jn(Q){Q.scope&&typeof Q.scope=="object"&&Q.scope!==null&&(Q.beginScope=Q.scope,delete Q.scope)}function ja(Q){jn(Q),typeof Q.beginScope=="string"&&(Q.beginScope={_wrap:Q.beginScope}),typeof Q.endScope=="string"&&(Q.endScope={_wrap:Q.endScope}),tt(Q),pt(Q)}function bn(Q){function ge(je,Ie){return new RegExp(g(je),"m"+(Q.case_insensitive?"i":"")+(Q.unicodeRegex?"u":"")+(Ie?"g":""))}class Ce{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ie,Ge){Ge.position=this.position++,this.matchIndexes[this.matchAt]=Ge,this.regexes.push([Ge,Ie]),this.matchAt+=M(Ie)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ie=this.regexes.map(Ge=>Ge[1]);this.matcherRe=ge(O(Ie,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ie){this.matcherRe.lastIndex=this.lastIndex;const Ge=this.matcherRe.exec(Ie);if(!Ge)return null;const Kt=Ge.findIndex((as,ti)=>ti>0&&as!==void 0),Pt=this.matchIndexes[Kt];return Ge.splice(0,Kt),Object.assign(Ge,Pt)}}class Ke{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ie){if(this.multiRegexes[Ie])return this.multiRegexes[Ie];const Ge=new Ce;return this.rules.slice(Ie).forEach(([Kt,Pt])=>Ge.addRule(Kt,Pt)),Ge.compile(),this.multiRegexes[Ie]=Ge,Ge}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ie,Ge){this.rules.push([Ie,Ge]),Ge.type==="begin"&&this.count++}exec(Ie){const Ge=this.getMatcher(this.regexIndex);Ge.lastIndex=this.lastIndex;let Kt=Ge.exec(Ie);if(this.resumingScanAtSamePosition()&&!(Kt&&Kt.index===this.lastIndex)){const Pt=this.getMatcher(0);Pt.lastIndex=this.lastIndex+1,Kt=Pt.exec(Ie)}return Kt&&(this.regexIndex+=Kt.position+1,this.regexIndex===this.count&&this.considerAll()),Kt}}function Lt(je){const Ie=new Ke;return je.contains.forEach(Ge=>Ie.addRule(Ge.begin,{rule:Ge,type:"begin"})),je.terminatorEnd&&Ie.addRule(je.terminatorEnd,{type:"end"}),je.illegal&&Ie.addRule(je.illegal,{type:"illegal"}),Ie}function Ct(je,Ie){const Ge=je;if(je.isCompiled)return Ge;[Jt,$n,ja,qn].forEach(Pt=>Pt(je,Ie)),Q.compilerExtensions.forEach(Pt=>Pt(je,Ie)),je.__beforeBegin=null,[ya,dn,et].forEach(Pt=>Pt(je,Ie)),je.isCompiled=!0;let Kt=null;return typeof je.keywords=="object"&&je.keywords.$pattern&&(je.keywords=Object.assign({},je.keywords),Kt=je.keywords.$pattern,delete je.keywords.$pattern),Kt=Kt||/\w+/,je.keywords&&(je.keywords=Da(je.keywords,Q.case_insensitive)),Ge.keywordPatternRe=ge(Kt,!0),Ie&&(je.begin||(je.begin=/\B|\b/),Ge.beginRe=ge(Ge.begin),!je.end&&!je.endsWithParent&&(je.end=/\B|\b/),je.end&&(Ge.endRe=ge(Ge.end)),Ge.terminatorEnd=g(Ge.end)||"",je.endsWithParent&&Ie.terminatorEnd&&(Ge.terminatorEnd+=(je.end?"|":"")+Ie.terminatorEnd)),je.illegal&&(Ge.illegalRe=ge(je.illegal)),je.contains||(je.contains=[]),je.contains=[].concat(...je.contains.map(function(Pt){return An(Pt==="self"?je:Pt)})),je.contains.forEach(function(Pt){Ct(Pt,Ge)}),je.starts&&Ct(je.starts,Ie),Ge.matcher=Lt(Ge),Ge}if(Q.compilerExtensions||(Q.compilerExtensions=[]),Q.contains&&Q.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Q.classNameAliases=r(Q.classNameAliases||{}),Ct(Q)}function $t(Q){return Q?Q.endsWithParent||$t(Q.starts):!1}function An(Q){return Q.variants&&!Q.cachedVariants&&(Q.cachedVariants=Q.variants.map(function(ge){return r(Q,{variants:null},ge)})),Q.cachedVariants?Q.cachedVariants:$t(Q)?r(Q,{starts:Q.starts?r(Q.starts):null}):Object.isFrozen(Q)?r(Q):Q}var Et="11.11.1";class $a extends Error{constructor(ge,Ce){super(ge),this.name="HTMLInjectionError",this.html=Ce}}const Bn=a,$o=r,fr=Symbol("nomatch"),ei=7,mr=function(Q){const ge=Object.create(null),Ce=Object.create(null),Ke=[];let Lt=!0;const Ct="Could not find the language '{}', did you forget to load/include a language module?",je={disableAutodetect:!0,name:"Plain text",contains:[]};let Ie={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:b};function Ge(Te){return Ie.noHighlightRe.test(Te)}function Kt(Te){let Ue=Te.className+" ";Ue+=Te.parentNode?Te.parentNode.className:"";const nt=Ie.languageDetectRe.exec(Ue);if(nt){const yt=Pn(nt[1]);return yt||(Jr(Ct.replace("{}",nt[1])),Jr("Falling back to no-highlight mode for this block.",Te)),yt?nt[1]:"no-highlight"}return Ue.split(/\s+/).find(yt=>Ge(yt)||Pn(yt))}function Pt(Te,Ue,nt){let yt="",Xt="";typeof Ue=="object"?(yt=Te,nt=Ue.ignoreIllegals,Xt=Ue.language):(fe("10.7.0","highlight(lang, code, ...args) has been deprecated."),fe("10.7.0",`Please use highlight(code, options) instead.
|
|
508
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),Xt=Te,yt=Ue),nt===void 0&&(nt=!0);const Cn={code:yt,language:Xt};pr("before:highlight",Cn);const oa=Cn.result?Cn.result:as(Cn.language,Cn.code,nt);return oa.code=Cn.code,pr("after:highlight",oa),oa}function as(Te,Ue,nt,yt){const Xt=Object.create(null);function Cn(we,Be){return we.keywords[Be]}function oa(){if(!qe.keywords){tn.addText(Nt);return}let we=0;qe.keywordPatternRe.lastIndex=0;let Be=qe.keywordPatternRe.exec(Nt),We="";for(;Be;){We+=Nt.substring(we,Be.index);const ot=xn.case_insensitive?Be[0].toLowerCase():Be[0],zt=Cn(qe,ot);if(zt){const[Na,cl]=zt;if(tn.addText(We),We="",Xt[ot]=(Xt[ot]||0)+1,Xt[ot]<=ei&&(Is+=cl),Na.startsWith("_"))We+=Be[0];else{const Qo=xn.classNameAliases[Na]||Na;ua(Be[0],Qo)}}else We+=Be[0];we=qe.keywordPatternRe.lastIndex,Be=qe.keywordPatternRe.exec(Nt)}We+=Nt.substring(we),tn.addText(We)}function Kn(){if(Nt==="")return;let we=null;if(typeof qe.subLanguage=="string"){if(!ge[qe.subLanguage]){tn.addText(Nt);return}we=as(qe.subLanguage,Nt,!0,Xo[qe.subLanguage]),Xo[qe.subLanguage]=we._top}else we=ni(Nt,qe.subLanguage.length?qe.subLanguage:null);qe.relevance>0&&(Is+=we.relevance),tn.__addSublanguage(we._emitter,we.language)}function Mt(){qe.subLanguage!=null?Kn():oa(),Nt=""}function ua(we,Be){we!==""&&(tn.startScope(Be),tn.addText(we),tn.endScope())}function Ko(we,Be){let We=1;const ot=Be.length-1;for(;We<=ot;){if(!we._emit[We]){We++;continue}const zt=xn.classNameAliases[we[We]]||we[We],Na=Be[We];zt?ua(Na,zt):(Nt=Na,oa(),Nt=""),We++}}function si(we,Be){return we.scope&&typeof we.scope=="string"&&tn.openNode(xn.classNameAliases[we.scope]||we.scope),we.beginScope&&(we.beginScope._wrap?(ua(Nt,xn.classNameAliases[we.beginScope._wrap]||we.beginScope._wrap),Nt=""):we.beginScope._multi&&(Ko(we.beginScope,Be),Nt="")),qe=Object.create(we,{parent:{value:qe}}),qe}function ll(we,Be,We){let ot=k(we.endRe,We);if(ot){if(we["on:end"]){const zt=new t(we);we["on:end"](Be,zt),zt.isMatchIgnored&&(ot=!1)}if(ot){for(;we.endsParent&&we.parent;)we=we.parent;return we}}if(we.endsWithParent)return ll(we.parent,Be,We)}function ri(we){return qe.matcher.regexIndex===0?(Nt+=we[0],1):(Ms=!0,0)}function dd(we){const Be=we[0],We=we.rule,ot=new t(We),zt=[We.__beforeBegin,We["on:begin"]];for(const Na of zt)if(Na&&(Na(we,ot),ot.isMatchIgnored))return ri(Be);return We.skip?Nt+=Be:(We.excludeBegin&&(Nt+=Be),Mt(),!We.returnBegin&&!We.excludeBegin&&(Nt=Be)),si(We,we),We.returnBegin?0:Be.length}function Vn(we){const Be=we[0],We=Ue.substring(we.index),ot=ll(qe,we,We);if(!ot)return fr;const zt=qe;qe.endScope&&qe.endScope._wrap?(Mt(),ua(Be,qe.endScope._wrap)):qe.endScope&&qe.endScope._multi?(Mt(),Ko(qe.endScope,we)):zt.skip?Nt+=Be:(zt.returnEnd||zt.excludeEnd||(Nt+=Be),Mt(),zt.excludeEnd&&(Nt=Be));do qe.scope&&tn.closeNode(),!qe.skip&&!qe.subLanguage&&(Is+=qe.relevance),qe=qe.parent;while(qe!==ot.parent);return ot.starts&&si(ot.starts,we),zt.returnEnd?0:Be.length}function ol(){const we=[];for(let Be=qe;Be!==xn;Be=Be.parent)Be.scope&&we.unshift(Be.scope);we.forEach(Be=>tn.openNode(Be))}let gr={};function ii(we,Be){const We=Be&&Be[0];if(Nt+=we,We==null)return Mt(),0;if(gr.type==="begin"&&Be.type==="end"&&gr.index===Be.index&&We===""){if(Nt+=Ue.slice(Be.index,Be.index+1),!Lt){const ot=new Error(`0 width match regex (${Te})`);throw ot.languageName=Te,ot.badRule=gr.rule,ot}return 1}if(gr=Be,Be.type==="begin")return dd(Be);if(Be.type==="illegal"&&!nt){const ot=new Error('Illegal lexeme "'+We+'" for mode "'+(qe.scope||"<unnamed>")+'"');throw ot.mode=qe,ot}else if(Be.type==="end"){const ot=Vn(Be);if(ot!==fr)return ot}if(Be.type==="illegal"&&We==="")return Nt+=`
|
|
509
|
-
`,1;if(ul>1e5&&ul>Be.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Nt+=We,We.length}const xn=Pn(Te);if(!xn)throw It(Ct.replace("{}",Te)),new Error('Unknown language: "'+Te+'"');const Vo=bn(xn);let li="",qe=yt||Vo;const Xo={},tn=new Ie.__emitter(Ie);ol();let Nt="",Is=0,is=0,ul=0,Ms=!1;try{if(xn.__emitTokens)xn.__emitTokens(Ue,tn);else{for(qe.matcher.considerAll();;){ul++,Ms?Ms=!1:qe.matcher.considerAll(),qe.matcher.lastIndex=is;const we=qe.matcher.exec(Ue);if(!we)break;const Be=Ue.substring(is,we.index),We=ii(Be,we);is=we.index+We}ii(Ue.substring(is))}return tn.finalize(),li=tn.toHTML(),{language:Te,value:li,relevance:Is,illegal:!1,_emitter:tn,_top:qe}}catch(we){if(we.message&&we.message.includes("Illegal"))return{language:Te,value:Bn(Ue),illegal:!0,relevance:0,_illegalBy:{message:we.message,index:is,context:Ue.slice(is-100,is+100),mode:we.mode,resultSoFar:li},_emitter:tn};if(Lt)return{language:Te,value:Bn(Ue),illegal:!1,relevance:0,errorRaised:we,_emitter:tn,_top:qe};throw we}}function ti(Te){const Ue={value:Bn(Te),illegal:!1,relevance:0,_top:je,_emitter:new Ie.__emitter(Ie)};return Ue._emitter.addText(Te),Ue}function ni(Te,Ue){Ue=Ue||Ie.languages||Object.keys(ge);const nt=ti(Te),yt=Ue.filter(Pn).filter(Rs).map(Mt=>as(Mt,Te,!1));yt.unshift(nt);const Xt=yt.sort((Mt,ua)=>{if(Mt.relevance!==ua.relevance)return ua.relevance-Mt.relevance;if(Mt.language&&ua.language){if(Pn(Mt.language).supersetOf===ua.language)return 1;if(Pn(ua.language).supersetOf===Mt.language)return-1}return 0}),[Cn,oa]=Xt,Kn=Cn;return Kn.secondBest=oa,Kn}function qa(Te,Ue,nt){const yt=Ue&&Ce[Ue]||nt;Te.classList.add("hljs"),Te.classList.add(`language-${yt}`)}function Vt(Te){let Ue=null;const nt=Kt(Te);if(Ge(nt))return;if(pr("before:highlightElement",{el:Te,language:nt}),Te.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Te);return}if(Te.children.length>0&&(Ie.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Te)),Ie.throwUnescapedHTML))throw new $a("One of your code blocks includes unescaped HTML.",Te.innerHTML);Ue=Te;const yt=Ue.textContent,Xt=nt?Pt(yt,{language:nt,ignoreIllegals:!0}):ni(yt);Te.innerHTML=Xt.value,Te.dataset.highlighted="yes",qa(Te,nt,Xt.language),Te.result={language:Xt.language,re:Xt.relevance,relevance:Xt.relevance},Xt.secondBest&&(Te.secondBest={language:Xt.secondBest.language,relevance:Xt.secondBest.relevance}),pr("after:highlightElement",{el:Te,result:Xt,text:yt})}function wn(Te){Ie=$o(Ie,Te)}const ks=()=>{ai(),fe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function rl(){ai(),fe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let qo=!1;function ai(){function Te(){ai()}if(document.readyState==="loading"){qo||window.addEventListener("DOMContentLoaded",Te,!1),qo=!0;return}document.querySelectorAll(Ie.cssSelector).forEach(Vt)}function Yo(Te,Ue){let nt=null;try{nt=Ue(Q)}catch(yt){if(It("Language definition for '{}' could not be registered.".replace("{}",Te)),Lt)It(yt);else throw yt;nt=je}nt.name||(nt.name=Te),ge[Te]=nt,nt.rawDefinition=Ue.bind(null,Q),nt.aliases&&ss(nt.aliases,{languageName:Te})}function hr(Te){delete ge[Te];for(const Ue of Object.keys(Ce))Ce[Ue]===Te&&delete Ce[Ue]}function il(){return Object.keys(ge)}function Pn(Te){return Te=(Te||"").toLowerCase(),ge[Te]||ge[Ce[Te]]}function ss(Te,{languageName:Ue}){typeof Te=="string"&&(Te=[Te]),Te.forEach(nt=>{Ce[nt.toLowerCase()]=Ue})}function Rs(Te){const Ue=Pn(Te);return Ue&&!Ue.disableAutodetect}function Os(Te){Te["before:highlightBlock"]&&!Te["before:highlightElement"]&&(Te["before:highlightElement"]=Ue=>{Te["before:highlightBlock"](Object.assign({block:Ue.el},Ue))}),Te["after:highlightBlock"]&&!Te["after:highlightElement"]&&(Te["after:highlightElement"]=Ue=>{Te["after:highlightBlock"](Object.assign({block:Ue.el},Ue))})}function en(Te){Os(Te),Ke.push(Te)}function Go(Te){const Ue=Ke.indexOf(Te);Ue!==-1&&Ke.splice(Ue,1)}function pr(Te,Ue){const nt=Te;Ke.forEach(function(yt){yt[nt]&&yt[nt](Ue)})}function rs(Te){return fe("10.7.0","highlightBlock will be removed entirely in v12.0"),fe("10.7.0","Please use highlightElement now."),Vt(Te)}Object.assign(Q,{highlight:Pt,highlightAuto:ni,highlightAll:ai,highlightElement:Vt,highlightBlock:rs,configure:wn,initHighlighting:ks,initHighlightingOnLoad:rl,registerLanguage:Yo,unregisterLanguage:hr,listLanguages:il,getLanguage:Pn,registerAliases:ss,autoDetection:Rs,inherit:$o,addPlugin:en,removePlugin:Go}),Q.debugMode=function(){Lt=!1},Q.safeMode=function(){Lt=!0},Q.versionString=Et,Q.regex={concat:A,lookahead:y,either:_,optional:S,anyNumberOfTimes:N};for(const Te in lt)typeof lt[Te]=="object"&&e(lt[Te]);return Object.assign(Q,lt),Q},Gn=mr({});return Gn.newInstance=()=>mr({}),Xm=Gn,Gn.HighlightJS=Gn,Gn.default=Gn,Xm}var dD=cD();const fD=qc(dD),sE={},mD="hljs-";function hD(e){const t=fD.newInstance();return e&&u(e),{highlight:a,highlightAuto:r,listLanguages:o,register:u,registerAlias:c,registered:f};function a(m,h,b){const g=b||sE,y=typeof g.prefix=="string"?g.prefix:mD;if(!t.getLanguage(m))throw new Error("Unknown language: `"+m+"` is not registered");t.configure({__emitter:pD,classPrefix:y});const N=t.highlight(h,{ignoreIllegals:!0,language:m});if(N.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:N.errorRaised});const S=N._emitter.root,A=S.data;return A.language=N.language,A.relevance=N.relevance,S}function r(m,h){const g=(h||sE).subset||o();let y=-1,N=0,S;for(;++y<g.length;){const A=g[y];if(!t.getLanguage(A))continue;const w=a(A,m,h);w.data&&w.data.relevance!==void 0&&w.data.relevance>N&&(N=w.data.relevance,S=w)}return S||{type:"root",children:[],data:{language:void 0,relevance:N}}}function o(){return t.listLanguages()}function u(m,h){if(typeof m=="string")t.registerLanguage(m,h);else{let b;for(b in m)Object.hasOwn(m,b)&&t.registerLanguage(b,m[b])}}function c(m,h){if(typeof m=="string")t.registerAliases(typeof h=="string"?h:[...h],{languageName:m});else{let b;for(b in m)if(Object.hasOwn(m,b)){const g=m[b];t.registerAliases(typeof g=="string"?g:[...g],{languageName:b})}}}function f(m){return!!t.getLanguage(m)}}class pD{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const a=this.stack[this.stack.length-1],r=a.children[a.children.length-1];r&&r.type==="text"?r.value+=t:a.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,a){const r=this.stack[this.stack.length-1],o=t.root.children;a?r.children.push({type:"element",tagName:"span",properties:{className:[a]},children:o}):r.children.push(...o)}openNode(t){const a=this,r=t.split(".").map(function(c,f){return f?c+"_".repeat(f):a.options.classPrefix+c}),o=this.stack[this.stack.length-1],u={type:"element",tagName:"span",properties:{className:r},children:[]};o.children.push(u),this.stack.push(u)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const gD={};function bD(e){const t=e||gD,a=t.aliases,r=t.detect||!1,o=t.languages||uD,u=t.plainText,c=t.prefix,f=t.subset;let m="hljs";const h=hD(o);if(a&&h.registerAlias(a),c){const b=c.indexOf("-");m=b===-1?c:c.slice(0,b)}return function(b,g){Po(b,"element",function(y,N,S){if(y.tagName!=="code"||!S||S.type!=="element"||S.tagName!=="pre")return;const A=xD(y);if(A===!1||!A&&!r||A&&u&&u.includes(A))return;Array.isArray(y.properties.className)||(y.properties.className=[]),y.properties.className.includes(m)||y.properties.className.unshift(m);const w=jM(y,{whitespace:"pre"});let _;try{_=A?h.highlight(A,w,{prefix:c}):h.highlightAuto(w,{prefix:c,subset:f})}catch(M){const k=M;if(A&&/Unknown language/.test(k.message)){g.message("Cannot highlight as `"+A+"`, it’s not registered",{ancestors:[S,y],cause:k,place:y.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw k}!A&&_.data&&_.data.language&&y.properties.className.push("language-"+_.data.language),_.children.length>0&&(y.children=_.children)})}}function xD(e){const t=e.properties.className;let a=-1;if(!Array.isArray(t))return;let r;for(;++a<t.length;){const o=String(t[a]);if(o==="no-highlight"||o==="nohighlight")return!1;!r&&o.slice(0,5)==="lang-"&&(r=o.slice(5)),!r&&o.slice(0,9)==="language-"&&(r=o.slice(9))}return r}function ED(e){const[t,a]=T.useState("fit"),r=t==="wide";return i.jsxs("div",{className:`md-table-wrap ${r?"md-table-wide":"md-table-fit"}`,children:[i.jsxs("button",{type:"button",className:"md-table-toggle",title:r?"适应屏幕":"超宽展开",onClick:()=>a(r?"fit":"wide"),children:[r?i.jsx(WA,{className:"h-3 w-3"}):i.jsx(zA,{className:"h-3 w-3"}),i.jsx("span",{children:r?"适应屏幕":"超宽展开"})]}),i.jsx("div",{className:"md-table-scroll",children:i.jsx("table",{...e})})]})}function yD({q:e,pending:t,selected:a,customText:r,onSelect:o,onCustomTextChange:u,onClearSelections:c,onSubmitCustom:f,isSingle:m}){const[h,b]=T.useState(!1),g=h||r.length>0;return i.jsxs("div",{className:"space-y-2",children:[e.header&&i.jsx("div",{className:"text-xs font-semibold text-fg-3",children:e.header}),i.jsx("p",{className:"text-sm text-fg-2",children:e.question}),e.options.length>0&&i.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.options.map(y=>{const N=!g&&((a==null?void 0:a.includes(y.label))??!1);return i.jsxs("button",{type:"button",disabled:!t,onClick:()=>{b(!1),u(""),o(y.label)},className:ae("rounded-md border px-3 py-1.5 text-left text-xs transition-colors",N?"border-emerald-500/60 bg-emerald-500/20 text-emerald-300 ring-1 ring-emerald-500/30":t?"border-blue-500/40 bg-blue-500/10 text-blue-300 hover:bg-blue-500/20":"border-line bg-surface/50 text-fg-5 cursor-default"),children:[N&&i.jsx(In,{className:"mr-1 inline h-3 w-3"}),i.jsx("span",{className:"font-medium",children:y.label}),y.description&&i.jsx("span",{className:"ml-1.5 text-fg-5",children:y.description})]},y.label)}),t&&i.jsxs("button",{type:"button",onClick:()=>{g?(b(!1),u("")):(b(!0),c())},className:ae("rounded-md border px-3 py-1.5 text-left text-xs transition-colors",g?"border-emerald-500/60 bg-emerald-500/20 text-emerald-300 ring-1 ring-emerald-500/30":"border-dashed border-blue-500/40 text-blue-300 hover:bg-blue-500/10"),children:[g&&i.jsx(In,{className:"mr-1 inline h-3 w-3"}),i.jsx("span",{className:"font-medium",children:"其他…"})]})]}),g&&t&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"text",value:r,onChange:y=>{u(y.target.value),y.target.value&&c()},onKeyDown:y=>{y.key==="Enter"&&r.trim()&&m&&f&&f()},placeholder:"输入自定义回复…",autoFocus:!0,className:"flex-1 rounded-md border border-blue-500/40 bg-blue-500/5 px-3 py-1.5 text-xs text-fg-1 placeholder:text-fg-5 outline-none focus:border-blue-500/60 focus:ring-1 focus:ring-blue-500/30"}),m&&i.jsx("button",{type:"button",disabled:!r.trim(),onClick:f,className:ae("flex items-center gap-1 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",r.trim()?"bg-emerald-600 text-white hover:bg-emerald-500":"bg-surface/50 text-fg-5 cursor-not-allowed"),children:i.jsx(No,{className:"h-3 w-3"})})]})]})}function ND({part:e}){const t=M6(e),a=pp(e),r=a==="pending"||a==="running",o=Oe(J=>J.activeSessionId),u=Oe(J=>J.replyQuestion),c=Oe(J=>J.rejectQuestion),[f,m]=T.useState(null),[h,b]=T.useState({}),[g,y]=T.useState({});if(!t||t.length===0)return null;const N=t.length===1,S=()=>{o&&Gt.getState().removeToast(`question-${o}`)},A=(J,V)=>{if(!f){if(y(j=>{const{[J]:ee,...se}=j;return se}),N){m("answered"),S(),u([[V]]);return}b(j=>{const ee=t[J],se=j[J]??[];if(ee.multiple){const he=se.includes(V);return{...j,[J]:he?se.filter(te=>te!==V):[...se,V]}}return{...j,[J]:[V]}})}},w=(J,V)=>{y(j=>{if(V)return{...j,[J]:V};const{[J]:ee,...se}=j;return se})},_=J=>{b(V=>{const{[J]:j,...ee}=V;return ee})},M=J=>{var j;const V=(j=g[J])==null?void 0:j.trim();f||!V||(m("answered"),S(),u([[V]]))},k=t.filter((J,V)=>{var j,ee;return(((j=h[V])==null?void 0:j.length)??0)>0||(((ee=g[V])==null?void 0:ee.trim().length)??0)>0}).length,L=!N&&k===t.length,O=()=>{if(f||!L)return;m("answered"),S();const J=t.map((V,j)=>{var se;const ee=(se=g[j])==null?void 0:se.trim();return ee?[ee]:h[j]??[]});u(J)},P=()=>{f||(m("dismissed"),S(),c())},z=r&&!f;return i.jsxs("div",{className:ae("my-1 overflow-hidden rounded-md border bg-term/70",z?"border-blue-500/40":"border-line"),children:[i.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 font-mono text-xs",children:[i.jsx(YA,{className:ae("h-3.5 w-3.5 shrink-0",z?"text-blue-400":"text-fg-4")}),i.jsx("span",{className:ae("font-medium",z?"text-blue-300":"text-fg-3"),children:f==="answered"?"已回复":f==="dismissed"?"已取消":z?"等待回复":"Question"}),!N&&z&&i.jsxs("span",{className:"text-fg-5",children:["(",k,"/",t.length,")"]}),z&&i.jsxs("button",{type:"button",onClick:P,className:"ml-auto flex items-center gap-1 rounded px-1.5 py-0.5 text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-400",children:[i.jsx(dt,{className:"h-3 w-3"}),i.jsx("span",{children:"取消"})]})]}),i.jsxs("div",{className:"border-t border-line px-4 py-3 space-y-3",children:[t.map((J,V)=>i.jsx(yD,{q:J,pending:z,selected:h[V],customText:g[V]??"",onSelect:j=>A(V,j),onCustomTextChange:j=>w(V,j),onClearSelections:()=>_(V),onSubmitCustom:N?()=>M(V):void 0,isSingle:N},V)),!N&&z&&i.jsx("div",{className:"flex justify-end pt-1",children:i.jsxs("button",{type:"button",disabled:!L,onClick:O,className:ae("flex items-center gap-1.5 rounded-md px-4 py-1.5 text-xs font-medium transition-colors",L?"bg-emerald-600 text-white hover:bg-emerald-500":"bg-surface/50 text-fg-5 cursor-not-allowed"),children:[i.jsx(No,{className:"h-3 w-3"}),i.jsx("span",{children:"提交回答"})]})})]})]})}const Qm=2e3,TD=/^.*\/\.fourth-spark\/worktrees\/[^/]+\//;function _D(e,t){const a=TD.exec(e);if(a)return`{worktree}/${e.slice(a[0].length)}`;if(t){const r=t.endsWith("/")?t:`${t}/`;if(e.startsWith(r))return e.slice(r.length)}return e}const vD={read:"Read",write:"Write",edit:"Edit",patch:"Patch",grep:"Grep",glob:"Glob",bash:"Bash",shell:"Bash",list:"List",ls:"List",webfetch:"Fetch",fetch:"Fetch",task:"Task",agent:"Task",todowrite:"Todo",write_todos:"Todo",question:"Question",mcp_question:"Question"},SD={running:{glyph:"◌",label:"running",color:"text-amber-400",accent:"border-amber-500/40",spin:!0},completed:{glyph:"✓",label:"done",color:"text-emerald-400",accent:"border-emerald-500/40",spin:!1},error:{glyph:"✗",label:"error",color:"text-red-400",accent:"border-red-500/40",spin:!1},pending:{glyph:"○",label:"queued",color:"text-fg-4",accent:"border-fg-6",spin:!1}};function id(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Za(e,t){if(!e)return null;for(const a of t){const r=e[a];if(typeof r=="string"&&r.trim())return r.trim()}return null}function AD(e,t){const a=e.toLowerCase(),r=vD[a]??e.charAt(0).toUpperCase()+e.slice(1),o=id(t);switch(a){case"read":case"write":case"edit":case"patch":return{label:r,arg:Za(o,["filePath","path","file"])};case"grep":{const u=Za(o,["pattern","query"]);return{label:r,arg:u?`"${u}"`:null}}case"glob":return{label:r,arg:Za(o,["pattern","query"])};case"bash":case"shell":{const u=Za(o,["command","cmd","script"]);return{label:r,arg:u?u.split(`
|
|
510
|
-
`)[0]:null}}case"webfetch":case"fetch":return{label:r,arg:Za(o,["url"])};case"task":case"agent":return{label:r,arg:Za(o,["description","prompt","title"])};default:return{label:r,arg:Za(o,["filePath","path","pattern","query","command","url","description"])}}}function wD({oldStr:e,newStr:t}){const a=e.split(`
|
|
511
|
-
`),r=t.split(`
|
|
512
|
-
`);return i.jsxs("div",{className:"grid grid-cols-1 gap-px overflow-x-auto rounded text-xs md:grid-cols-2",children:[i.jsx("pre",{className:"min-w-0 whitespace-pre-wrap break-words p-1.5 fs-diff-del",children:a.map((o,u)=>i.jsxs("div",{children:[i.jsx("span",{className:"select-none text-red-400/70",children:"− "}),i.jsx("span",{className:"text-red-400",children:o})]},u))}),i.jsx("pre",{className:"min-w-0 whitespace-pre-wrap break-words p-1.5 fs-diff-add",children:r.map((o,u)=>i.jsxs("div",{children:[i.jsx("span",{className:"select-none text-emerald-400/70",children:"+ "}),i.jsx("span",{className:"text-emerald-400",children:o})]},u))})]})}const rE={completed:{glyph:"✓",color:"text-emerald-400"},in_progress:{glyph:"◌",color:"text-amber-400"},cancelled:{glyph:"✗",color:"text-fg-5"},pending:{glyph:"○",color:"text-fg-4"}};function BT({todos:e}){return i.jsx("ul",{className:"space-y-0.5 text-xs",children:e.map((t,a)=>{var f;const r=((f=t.status)==null?void 0:f.toLowerCase())??"pending",o=r==="in-progress"||r==="active"?"in_progress":r==="done"||r==="complete"?"completed":r==="canceled"?"cancelled":r,u=rE[o]??rE.pending,c=o==="completed"||o==="cancelled";return i.jsxs("li",{className:"flex items-start gap-1.5",children:[i.jsx("span",{className:ae("shrink-0 leading-5",u.color,o==="in_progress"&&"fs-spin"),children:u.glyph}),i.jsx("span",{className:ae("leading-5",c?"text-fg-5 line-through":"text-fg-2"),children:t.content}),t.priority&&i.jsx("span",{className:"ml-auto shrink-0 text-fg-5",children:t.priority})]},a)})})}const CD={"visual-engineering":"bg-purple-500/15 text-purple-400",quick:"bg-emerald-500/15 text-emerald-400",deep:"bg-blue-500/15 text-blue-400",ultrabrain:"bg-amber-500/15 text-amber-400",artistry:"bg-pink-500/15 text-pink-400",writing:"bg-cyan-500/15 text-cyan-400","unspecified-low":"bg-elevated text-fg-4","unspecified-high":"bg-elevated text-fg-3"},kD={explore:"bg-teal-500/15 text-teal-400",librarian:"bg-indigo-500/15 text-indigo-400",oracle:"bg-amber-500/15 text-amber-400",metis:"bg-rose-500/15 text-rose-400",momus:"bg-orange-500/15 text-orange-400"};function RD({record:e}){const[t,a]=T.useState(!1),r=typeof e.category=="string"?e.category:null,o=typeof e.subagent_type=="string"?e.subagent_type:null,u=Za(e,["description","title"]),c=typeof e.prompt=="string"?e.prompt:null,f=Array.isArray(e.load_skills)?e.load_skills.filter(y=>typeof y=="string"):[],m=typeof e.run_in_background=="boolean"?e.run_in_background:!1,h=typeof e.task_id=="string"?e.task_id:null,b=r??o,g=(r&&CD[r])??(o&&kD[o])??"bg-elevated text-fg-3";return i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[b&&i.jsx("span",{className:ae("rounded px-1.5 py-0.5 text-[10px] font-medium",g),children:b}),f.map(y=>i.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 text-[10px] text-fg-4",children:y},y)),m&&i.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 text-[10px] text-fg-5",children:"bg"}),h&&i.jsxs("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",title:h,children:["↩ ",h.slice(0,16),"…"]})]}),u&&i.jsx("p",{className:"text-xs text-fg-2",children:u}),c&&i.jsxs("div",{children:[i.jsxs("button",{type:"button",onClick:()=>a(y=>!y),className:"flex items-center gap-1 text-[10px] text-fg-4 transition-colors hover:text-fg-2",children:[i.jsx(Xc,{className:ae("h-3 w-3 transition-transform",t&&"rotate-90")}),"Prompt",i.jsxs("span",{className:"text-fg-5",children:["(",c.length," chars)"]})]}),t&&i.jsx("pre",{className:"mt-1 max-h-60 overflow-y-auto whitespace-pre-wrap break-words rounded bg-elevated/50 p-2 text-[11px] leading-relaxed text-fg-3",children:c})]})]})}function OD(e){const t=D6(e),a=Oe(m=>m.activeSessionId),r=Oe(m=>m.sessions);if(t)return t;if(!a)return null;const o=rd(e),u=id(o),c=Za(u,["description","title"]),f=r.filter(m=>m.parentID===a);if(f.length===0)return null;if(f.length===1)return f[0].id;if(c){const m=f.find(h=>h.title===c);if(m)return m.id}return null}function ID({part:e}){const t=OD(e),a=Oe(r=>r.setActiveSession);return t?i.jsxs("button",{type:"button",onClick:r=>{r.stopPropagation(),a(t)},className:"mt-2 flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1 font-mono text-xs text-blue-400 transition-colors hover:border-blue-500/50 hover:bg-blue-500/10",children:[i.jsxs("span",{className:"truncate text-fg-5",children:[t.slice(0,20),"…"]}),i.jsx(P3,{className:"h-3 w-3 shrink-0"}),i.jsx("span",{className:"shrink-0",children:"查看子会话"})]}):null}function MD(e,t){const a=id(t);if(!a)return null;const r=e.toLowerCase();if(r==="edit"||r==="patch"){const o=typeof a.oldString=="string"?a.oldString:"",u=typeof a.newString=="string"?a.newString:"";if(o||u)return i.jsx(wD,{oldStr:o,newStr:u})}if(r==="todowrite"||r==="write_todos"){const o=Array.isArray(a.todos)?a.todos:null;if(o&&o.length>0)return i.jsx(BT,{todos:o})}if(r==="bash"||r==="shell"){const o=Za(a,["command","cmd","script"]);if(o)return i.jsxs("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:[i.jsx("span",{className:"select-none text-emerald-400/70",children:"❯ "}),o]})}if(r==="task"||r==="agent")return i.jsx(RD,{record:a});if(r==="read")return null;if(r==="write"){const o=typeof a.content=="string"?a.content:null;if(o){const u=o.length>500?`${o.slice(0,500)}…`:o;return i.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:u})}}return null}function LD(e,t){const a=e.toLowerCase();if(a==="todowrite"||a==="write_todos"){const r=Array.isArray(t)?t:null;if(r&&r.length>0)return i.jsx(BT,{todos:r})}return null}function DD({part:e}){const t=pp(e),a=t==="running"||t==="pending",[r,o]=T.useState(a),[u,c]=T.useState(!1),f=T.useRef(a);T.useEffect(()=>{f.current!==a&&(o(a),f.current=a)},[a]);const m=Le(ee=>{const se=ee.repos.find(he=>he.id===ee.activeRepoId);return(se==null?void 0:se.localPath)??null}),h=sT(e),b=h.toLowerCase(),g=b==="task"||b==="agent",y=rd(e),{label:N,arg:S}=AD(h,y),A=S&&_D(S,m),w=MD(h,y),_=w?null:L1(y),M=hp(e),k=LD(h,M),L=k?"":L1(M),O=SD[t],P=b==="edit"||b==="patch";let z=0,J=0;if(P){const ee=id(y);if(ee){const se=typeof ee.oldString=="string"?ee.oldString:"",he=typeof ee.newString=="string"?ee.newString:"";se&&(J=se.split(`
|
|
513
|
-
`).length),he&&(z=he.split(`
|
|
514
|
-
`).length)}}const V=L.length>Qm,j=u||!V?L:`${L.slice(0,Qm)}…`;return i.jsxs("div",{className:"my-1 overflow-hidden rounded-md border border-line bg-term/70",children:[i.jsxs("button",{type:"button",onClick:()=>o(ee=>!ee),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors duration-150 hover:bg-surface/70",children:[i.jsx("span",{className:ae("shrink-0 leading-none",O.color),children:r?"▾":"▸"}),i.jsx("span",{className:"shrink-0 font-medium text-fg",children:N}),A&&i.jsx("span",{className:"truncate text-fg-3",children:A}),P&&(z>0||J>0)&&i.jsxs("span",{className:"flex shrink-0 items-center gap-1.5 text-[11px] leading-none",children:[z>0&&i.jsxs("span",{className:"text-emerald-400",children:["+",z]}),J>0&&i.jsxs("span",{className:"text-red-400",children:["-",J]})]}),i.jsxs("span",{className:ae("ml-auto flex shrink-0 items-center gap-1.5 leading-none",O.color),children:[i.jsx("span",{className:ae(O.spin&&"fs-spin"),children:O.glyph}),i.jsx("span",{children:O.label})]})]}),r&&i.jsx("div",{className:"border-t border-line px-3 py-2",children:i.jsxs("div",{className:ae("ml-1 border-l-2 pl-3 font-mono text-xs",O.accent),children:[w&&i.jsx("section",{className:"mb-2",children:w}),_&&i.jsxs("section",{className:"mb-2",children:[i.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wider text-fg-5",children:"input"}),i.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:_})]}),g&&i.jsx(ID,{part:e}),k&&i.jsx("section",{children:k}),L&&i.jsxs("section",{children:[i.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wider text-fg-5",children:"output"}),i.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:j}),V&&i.jsx("button",{type:"button",onClick:()=>c(ee=>!ee),className:"mt-1 text-blue-400 transition-colors hover:text-blue-300",children:u?"show less":`show ${L.length-Qm} more chars`})]}),!w&&!_&&!k&&!L&&i.jsx("div",{className:"text-fg-5",children:"no parameters"})]})})]})}function jD({text:e}){const[t,a]=T.useState(!1);return i.jsxs("div",{className:"my-1",children:[i.jsxs("button",{type:"button",onClick:()=>a(r=>!r),className:"flex items-center gap-1.5 font-mono text-xs text-fg-5 transition-colors hover:text-fg-3",children:[t?i.jsx(sa,{className:"h-3 w-3 shrink-0"}):i.jsx(Xc,{className:"h-3 w-3 shrink-0"}),i.jsx(Yi,{className:"h-3 w-3 shrink-0"}),i.jsx("span",{children:"thinking"})]}),t&&i.jsx("div",{className:"ml-1.5 mt-1 whitespace-pre-wrap border-l border-line pl-3 text-xs italic leading-relaxed text-fg-4",children:e})]})}function BD(){const[e,t]=T.useState(0);return T.useEffect(()=>{const a=Date.now(),r=setInterval(()=>{t(Math.floor((Date.now()-a)/1e3))},1e3);return()=>clearInterval(r)},[]),i.jsxs("div",{className:"my-1 flex items-center gap-1.5 font-mono text-xs text-fg-5",children:[i.jsx(Yi,{className:"h-3 w-3 shrink-0 animate-pulse"}),i.jsx("span",{children:"thinking"}),e>0&&i.jsxs("span",{className:"text-fg-6",children:[e,"s"]})]})}function PT({part:e,className:t}){var a;return e.url?(a=e.mime)!=null&&a.startsWith("image/")?i.jsx(gp,{url:e.url,label:e.filename??"attachment",className:ae("object-contain",t??"max-h-80")}):i.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs text-fg-5",children:[i.jsx(ow,{className:"h-3 w-3 shrink-0"}),i.jsx("span",{children:e.filename??e.mime??"attachment"})]}):null}function PD({part:e,isStreaming:t}){switch(Mc(e)){case"text":{const r=Lc(e);return r.trim()?i.jsx("div",{className:"markdown-body leading-relaxed",children:i.jsx(Yr,{remarkPlugins:[Gr],rehypePlugins:[bD],components:{table:ED},children:r})}):null}case"thinking":{const r=Lc(e);return r.trim()?i.jsx(jD,{text:r}):t?i.jsx(BD,{}):null}case"tool":return So(e)?i.jsx(ND,{part:e}):i.jsx(DD,{part:e});case"file":return i.jsx(PT,{part:e});default:return null}}function UD({message:e,isStreaming:t,queued:a}){var b,g,y,N,S,A;const r=e.role==="user",o=e.parts??[],u=o.filter(w=>Mc(w)!=="other");if(r){const w=o.map(Lc).join("").trim(),_=o.filter(L=>Mc(L)==="file"),M=(b=e.time)==null?void 0:b.created,k=M?new Date(M*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):null;return i.jsxs("div",{className:"fs-fade-in rounded-r-md border-l-2 border-emerald-500/40 bg-emerald-500/[0.04] px-3 py-2 font-mono",children:[i.jsxs("div",{className:"mb-1 flex items-center gap-2 text-[11px]",children:[i.jsx("span",{className:"font-medium text-emerald-400",children:"You"}),k&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-fg-6",children:"·"}),i.jsx("span",{className:"text-fg-5",children:k})]}),a&&i.jsxs("span",{className:"inline-flex items-center gap-1 rounded border border-amber-500/30 px-1.5 py-0.5 text-xs text-amber-400",children:[i.jsx("span",{className:"leading-none",children:"○"}),i.jsx("span",{children:"queued"})]})]}),i.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[i.jsx("span",{className:"shrink-0 select-none text-emerald-400",children:"❯"}),i.jsx("span",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words text-fg",children:w||"…"})]}),_.length>0&&i.jsx("div",{className:"mt-2 flex flex-wrap gap-2 pl-5",children:_.map((L,O)=>i.jsx(PT,{part:L,className:"max-h-40"},L.id??O))})]})}const c=((g=e.info)==null?void 0:g.agent)??e.agent,f=((y=e.info)==null?void 0:y.modelID)??e.modelID,m=(N=e.info)==null?void 0:N.error,h=(S=e.info)==null?void 0:S.finish;return i.jsxs("div",{className:"fs-fade-in font-mono",children:[(c||f)&&i.jsxs("div",{className:"mb-1 flex items-center gap-2 text-xs",children:[c&&i.jsx("span",{className:"text-fg-3",children:c}),c&&f&&i.jsx("span",{className:"text-fg-6",children:"·"}),f&&i.jsx("span",{className:"text-fg-5",children:f})]}),m&&i.jsxs("div",{className:"my-1 flex items-start gap-2 rounded-md border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[i.jsx(_n,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("span",{className:"font-semibold",children:m.name??"Error"}),((A=m.data)==null?void 0:A.message)&&i.jsx("p",{className:"mt-0.5 text-red-400/80",children:m.data.message}),h&&h!=="end"&&i.jsxs("p",{className:"mt-0.5 text-red-400/60",children:["finish: ",h]})]})]}),i.jsx("div",{className:"space-y-2 text-sm text-fg",children:u.length>0?u.map((w,_)=>i.jsx(PD,{part:w,isStreaming:t},w.id??w.callID??_)):!m&&(t?i.jsx("span",{className:"text-fg-5",children:"…"}):i.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-amber-400/80",children:[i.jsx(_n,{className:"h-3 w-3 shrink-0"}),i.jsx("span",{children:"空响应 — Agent 未产出任何内容"})]}))})]})}const HD={completed:{glyph:"■",color:"text-emerald-400"},in_progress:{glyph:"■",color:"text-amber-400"},cancelled:{glyph:"■",color:"text-fg-6"},pending:{glyph:"□",color:"text-fg-5"}};function FD(e){const t=e.find(r=>Kr(r.status)==="in_progress");if(t)return t.content;const a=e.find(r=>Kr(r.status)==="pending");return a?a.content:"all steps complete"}function zD({todos:e,onClick:t}){if(e.length===0)return null;const a=e.length,r=rT(e);return i.jsx("div",{className:"rounded-md border border-line bg-term/60 px-3 py-2",children:i.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center gap-2 text-left font-mono text-xs",children:[i.jsxs("span",{className:"shrink-0 tabular-nums text-fg-4",children:["[",r,"/",a,"]"]}),i.jsx("span",{className:"shrink-0 tracking-tight",children:e.map(o=>{const u=HD[Kr(o.status)];return i.jsx("span",{className:u.color,children:u.glyph},o.id)})}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-fg-2",children:FD(e)}),i.jsx("span",{className:"shrink-0 text-[10px] text-fg-5",children:"详情 →"})]})})}const $D=200;function qD(){return Oe(e=>{const t=e.activeSessionId;if(!t)return!1;const a=e.messages[t]??Ao;for(let r=a.length-1;r>=0;r--){const o=a[r].parts;if(o){for(const u of o)if(Mc(u)==="tool"&&Dc(u))return!0}}return!1})}function YD(){var W;const[e,t]=T.useState(""),[a,r]=T.useState(""),[o,u]=T.useState(""),[c,f]=T.useState([]),m=T.useRef(null),h=Oe(C=>C.activeSessionId),b=Le(C=>C.activeRepoId),g=Oe(C=>{const de=C.activeSessionId;return de?C.sessionStatuses[de]:void 0}),y=Oe(C=>C.sendMessage),N=Nc(C=>C.setDraft),S=Nc(C=>C.clearDraft),A=qD(),w=T.useCallback(async C=>{if(!await y(C,a||void 0,o||void 0))return!1},[y,a,o]),_=pT(w);T.useEffect(()=>{if(!b){f([]);return}let C=!1;return(async()=>{try{const[de,_e]=await Promise.all([Mo(),Io(b)]);if(C)return;const B=de.pinned_models,pe=B?JSON.parse(B):[];f(pe.length>0?_e.filter(Re=>pe.includes(Re.id)):[])}catch{C||f([])}})(),()=>{C=!0}},[b]);const M=g==="busy"&&!A,k=!h;T.useLayoutEffect(()=>{const C=m.current;C&&(C.style.height="auto",C.style.height=`${Math.min(C.scrollHeight,$D)}px`)},[e]);const L=((W=c.find(C=>C.id===a))==null?void 0:W.supportsImage)!==!1,{attachments:O,foldedTexts:P,promptFiles:z,error:J,addFiles:V,onPaste:j,addFoldedText:ee,expandFoldedTexts:se,remove:he,removeFoldedText:te,clear:K}=uT(L);T.useEffect(()=>{t(h?Nc.getState().drafts[h]??"":""),K(),_.stt.stop()},[h,K,_.stt.stop]);const G=C=>{if(Array.from(C.clipboardData.files).length>0){j(C);return}const _e=C.clipboardData.getData("text/plain");if(!_e||!oT(_e))return;C.preventDefault();const B=ee(_e),pe=C.currentTarget,Re=pe.selectionStart??e.length,De=pe.selectionEnd??e.length,lt=e.slice(0,Re)+B.placeholder+e.slice(De);t(lt),h&&N(h,lt),requestAnimationFrame(()=>{const Bt=Re+B.placeholder.length;pe.setSelectionRange(Bt,Bt)})},F=C=>{const de=P.find(_e=>_e._id===C);if(de){const _e=e.replace(de.placeholder,"");t(_e),h&&N(h,_e)}te(C)},$=async()=>{const C=se(e.trim());if(k||!C&&O.length===0)return;await y(C,a||void 0,o||void 0,z.length>0?z:void 0)&&(t(""),K(),h&&S(h))},q=C=>{C.nativeEvent.isComposing||C.keyCode===229||C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),$())},D=h?A?"输入回复,或点击上方选项…":M?"输入消息将排队等待处理…":"enter a command…":"select or start a run",I=h?M?"text-amber-400 fs-blink":A?"text-blue-400":"text-emerald-400":"text-fg-6";return i.jsxs("div",{className:"relative border-t border-line bg-term px-4 py-4",children:[i.jsx(mT,{phase:_.stt.phase,transcript:_.stt.transcript,interimTranscript:_.stt.interimTranscript,editText:_.editText,onEditTextChange:_.setEditText,onTextareaKeyDown:_.handleTextareaKeyDown,textareaRef:_.textareaRef,wrapperClassName:"absolute bottom-full left-0 right-0 z-20 border-t border-line bg-surface/95 backdrop-blur-sm"}),i.jsx(dT,{attachments:O,foldedTexts:P,error:J,onRemove:he,onRemoveFoldedText:F,className:"mx-auto max-w-4xl"}),i.jsxs("div",{className:ae("mx-auto flex max-w-4xl items-start gap-2 rounded-lg border px-3 py-2 transition-colors duration-150",k?"border-line":"border-fg-5 focus-within:border-fg-4"),children:[i.jsx("span",{className:ae("select-none pt-px font-mono text-sm leading-6",I),children:"❯"}),i.jsx("textarea",{ref:m,rows:2,value:e,disabled:k,onChange:C=>{const de=C.target.value;t(de),h&&N(h,de)},onKeyDown:q,onPaste:G,placeholder:D,className:"flex-1 resize-none bg-transparent font-mono text-sm leading-6 text-fg placeholder:text-fg-6 focus:outline-none disabled:cursor-not-allowed"}),i.jsx(cT,{onFiles:C=>void V(C),disabled:k,allowed:L}),i.jsx(fT,{isListening:_.stt.isListening,disabled:k,onStart:_.stt.start,onStop:()=>void _.stt.stop()}),i.jsx("button",{type:"button",onClick:$,disabled:k||e.trim().length===0&&O.length===0&&P.length===0,"aria-label":"Send message",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-600 text-white transition-colors duration-150 hover:bg-emerald-500 disabled:cursor-not-allowed disabled:bg-fg-6/30 disabled:text-fg-5",children:i.jsx(vy,{className:"h-4 w-4",strokeWidth:2.5})})]}),_.stt.phase==="idle"?i.jsxs("div",{className:"mx-auto mt-1.5 flex max-w-4xl items-center gap-3 pl-5",children:[_.stt.error&&i.jsx("span",{className:"font-mono text-[10px] text-red-400",children:_.stt.error}),i.jsx("span",{className:"font-mono text-[10px] text-fg-6",children:"⏎ to run · shift+⏎ for newline"}),i.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[i.jsxs("select",{value:o,onChange:C=>u(C.target.value),className:"max-w-[100px] truncate rounded border border-line bg-surface px-2 py-0.5 font-mono text-[11px] text-fg-4 focus:border-fg-5 focus:outline-none",children:[i.jsx("option",{value:"",children:"默认"}),i.jsx("option",{value:"max",children:"max"}),i.jsx("option",{value:"high",children:"high"})]}),c.length>0&&i.jsxs("select",{value:a,onChange:C=>r(C.target.value),className:"max-w-[200px] truncate rounded border border-line bg-surface px-2 py-0.5 font-mono text-[11px] text-fg-4 focus:border-fg-5 focus:outline-none",children:[i.jsx("option",{value:"",children:"默认模型"}),c.map(C=>i.jsx("option",{value:C.id,children:C.name||C.id},C.id))]})]})]}):i.jsx(hT,{phase:_.stt.phase,volumeLevel:_.stt.volumeLevel,elapsed:_.elapsed,editText:_.editText,error:_.stt.error,onCancel:_.cancel,onConfirm:()=>void _.confirm(),className:"mx-auto mt-1.5 flex max-w-4xl items-center gap-3 pl-5"})]})}const iE={idle:{glyph:"●",label:"ready",color:"text-emerald-400",spin:!1},busy:{glyph:"◌",label:"running",color:"text-amber-400",spin:!0},retry:{glyph:"◌",label:"retrying",color:"text-amber-400",spin:!0},error:{glyph:"✗",label:"error",color:"text-red-400",spin:!1}},lE=[{bg:"bg-blue-500/15",text:"text-blue-500"},{bg:"bg-purple-500/15",text:"text-purple-500"},{bg:"bg-emerald-500/15",text:"text-emerald-500"},{bg:"bg-amber-500/15",text:"text-amber-500"},{bg:"bg-rose-500/15",text:"text-rose-500"},{bg:"bg-cyan-500/15",text:"text-cyan-500"},{bg:"bg-indigo-500/15",text:"text-indigo-500"},{bg:"bg-orange-500/15",text:"text-orange-500"}];function GD(e){const t=e.trim(),a=t.charCodeAt(0)||0;return{...lE[a%lE.length],initial:(t.charAt(0)||"?").toUpperCase()}}function oE({status:e,reason:t}){const a=iE[e??"idle"]??iE.idle;return i.jsxs("span",{className:ae("flex items-center gap-1.5 rounded border border-line px-2 py-0.5 font-mono text-xs",a.color),title:e==="error"&&t?t:void 0,children:[i.jsx("span",{className:ae("leading-none",a.spin&&"fs-spin"),children:a.glyph}),i.jsx("span",{children:a.label})]})}const KD={"claude-opus-4":1e6,"claude-sonnet-4":1e6,"claude-sonnet-5":1e6,"claude-opus-5":1e6,"claude-3-7-sonnet":2e5,"claude-3-5-sonnet":2e5,"claude-3-5-haiku":2e5,"claude-3-opus":2e5,"claude-3-sonnet":2e5,"claude-3-haiku":2e5},uE=1e6;function VD(e){if(!e)return uE;for(const[t,a]of Object.entries(KD))if(e.startsWith(t))return a;return uE}function cE(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function XD(e){return e>=1?`$${e.toFixed(2)}`:e>=.01?`$${e.toFixed(3)}`:e>0?`$${e.toFixed(4)}`:"$0"}function QD(e){for(let t=e.length-1;t>=0;t--){const a=e[t];if(a.role==="assistant"&&a.tokens){const r=a.tokens;if(r.cache&&(r.cache.read>0||r.cache.write>0)||r.input>0||r.output>0)return r}}return null}function dE({session:e,messages:t}){var m,h,b;const a=QD(t),r=(e==null?void 0:e.cost)??0;if(!a&&!r)return null;const o=a?a.input+(((m=a.cache)==null?void 0:m.read)??0)+(((h=a.cache)==null?void 0:h.write)??0):0,u=VD((b=e==null?void 0:e.model)==null?void 0:b.modelID),c=o>0?Math.min(Math.round(o/u*100),999):0,f=c>=80?"text-red-400":c>=50?"text-amber-400":"text-fg-5";return i.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px] text-fg-5",children:[o>0&&i.jsxs(i.Fragment,{children:[i.jsx("span",{title:"当前上下文 = cache_read + cache_write + input (最近一次请求)",children:cE(o)}),i.jsx("span",{className:"text-fg-6",children:"·"}),i.jsxs("span",{className:f,title:`上下文占比 (${cE(u)} 窗口)`,children:[c,"%"]}),i.jsx("span",{className:"text-fg-6",children:"·"})]}),i.jsx("span",{title:"会话累计费用",children:XD(r)})]})}const WD=144,ZD=64;function JD({onToggleSidebar:e}){var _e;const[t,a]=T.useState(""),[r,o]=T.useState(""),[u,c]=T.useState(""),[f,m]=T.useState(""),h=T.useRef(null),[b,g]=T.useState([]),y=Oe(B=>B.createSession),N=Oe(B=>B.sendError),S=Le(B=>B.activeRepoId),w=or(B=>B.agents).filter(B=>B.isSystem<2),_=Ve(B=>B.selectedIssueId),M=Ve(B=>{if(!f)return null;const pe=B.issues.find(Re=>Re.id===f);return pe?`#${pe.number} ${pe.title}`:null}),[k,L]=Fh();T.useEffect(()=>{w.length>0&&!r&&o(w[0].id)},[w,r]),T.useEffect(()=>{if(!S){g([]);return}let B=!1;return Io(S).then(pe=>{B||g(pe)}).catch(()=>{B||g([])}),()=>{B=!0}},[S]);const O=b.length===0||b.some(B=>B.supportsImage!==!1),{attachments:P,foldedTexts:z,promptFiles:J,error:V,addFiles:j,onPaste:ee,addFoldedText:se,expandFoldedTexts:he,remove:te,removeFoldedText:K,clear:G}=uT(O);T.useEffect(()=>{_&&(m(_),Ve.getState().setSelectedIssue(null))},[_]),T.useEffect(()=>{const B=k.get("draft");B&&(a(B),L({},{replace:!0}))},[k,L]),T.useLayoutEffect(()=>{const B=h.current;B&&(B.style.height="auto",B.style.height=`${Math.min(B.scrollHeight,WD)}px`)},[t]);const F=(_e=w.find(B=>B.id===r))==null?void 0:_e.description,$=!!f,q=B=>{if(Array.from(B.clipboardData.files).length>0){ee(B);return}const Re=B.clipboardData.getData("text/plain");if(!Re||!oT(Re))return;B.preventDefault();const De=se(Re),lt=B.currentTarget,Bt=lt.selectionStart??t.length,Jt=lt.selectionEnd??t.length,ya=t.slice(0,Bt)+De.placeholder+t.slice(Jt);a(ya),requestAnimationFrame(()=>{const dn=Bt+De.placeholder.length;lt.setSelectionRange(dn,dn)})},D=B=>{const pe=z.find(Re=>Re._id===B);pe&&a(t.replace(pe.placeholder,"")),K(B)},I=()=>{const B=he(t.trim());!S||!B&&!$&&P.length===0||(a(""),G(),y(B,void 0,void 0,u||void 0,f||void 0,r||void 0,J.length>0?J:void 0))},W=B=>{if(!(B.nativeEvent.isComposing||B.keyCode===229)){if(B.key==="Tab"&&w.length>1){B.preventDefault();const pe=w.findIndex(De=>De.id===r),Re=B.shiftKey?(pe-1+w.length)%w.length:(pe+1)%w.length;o(w[Re].id);return}B.key==="Enter"&&!B.shiftKey&&(B.preventDefault(),I())}},C=T.useCallback(B=>{y(B,void 0,void 0,u||void 0,f||void 0,r||void 0)},[y,f,r,u]),de=pT(C);return i.jsxs("div",{className:"relative flex flex-1 flex-col items-center justify-center bg-term",children:[i.jsx("button",{type:"button",onClick:e,"aria-label":"Open sidebar",className:"absolute left-3 top-3 rounded-lg p-2 text-fg-3 hover:bg-elevated md:hidden",children:i.jsx(Gh,{className:"h-5 w-5"})}),i.jsxs("div",{className:"w-full max-w-2xl px-6",children:[i.jsx("div",{className:"mb-8 text-center",children:i.jsxs("div",{className:"font-mono text-2xl text-fg-6",children:[i.jsx("span",{className:"text-emerald-500/60",children:"❯"}),i.jsx("span",{className:"fs-blink text-fg-4",children:" ▋"})]})}),i.jsx(dT,{attachments:P,foldedTexts:z,error:V,onRemove:te,onRemoveFoldedText:D}),i.jsxs("div",{className:ae("relative rounded-xl border bg-base/80 shadow-sm transition-colors","border-line focus-within:border-fg-5"),children:[i.jsx(mT,{phase:de.stt.phase,transcript:de.stt.transcript,interimTranscript:de.stt.interimTranscript,editText:de.editText,onEditTextChange:de.setEditText,onTextareaKeyDown:de.handleTextareaKeyDown,textareaRef:de.textareaRef,wrapperClassName:"absolute bottom-full left-0 right-0 z-20 mb-2 overflow-hidden rounded-xl border border-line bg-surface/95 backdrop-blur-sm"}),w.length>0&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-1.5 overflow-x-auto px-4 pt-3 pb-1 scrollbar-none",children:[w.map(B=>{const pe=GD(B.name);return i.jsxs("button",{type:"button",onClick:()=>o(B.id),className:ae("flex shrink-0 items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium transition-colors",r===B.id?"bg-blue-500/15 text-blue-400 ring-1 ring-inset ring-blue-500/30":"text-fg-4 hover:bg-elevated hover:text-fg-3"),children:[i.jsx("span",{className:ae("inline-flex h-4 w-4 items-center justify-center rounded-full text-[10px] font-bold",pe.bg,pe.text),children:pe.initial}),B.name]},B.id)}),w.length>1&&i.jsx("span",{className:"hidden shrink-0 ml-auto font-mono text-[10px] text-fg-6 md:inline",children:"Tab 切换"})]}),F&&i.jsx("p",{className:"px-4 pb-1 text-[11px] leading-relaxed text-fg-5",children:F})]}),i.jsxs("div",{className:"flex items-start gap-2 px-4 py-3",children:[i.jsx("span",{className:ae("select-none pt-px font-mono text-sm leading-6","text-emerald-400"),children:"❯"}),i.jsx("textarea",{ref:h,rows:1,value:t,autoFocus:!0,disabled:!S,onChange:B=>a(B.target.value),onKeyDown:W,onPaste:q,placeholder:S?f?"输入补充指令,或直接发送":"让 Agent 做什么?":"请先选择一个仓库",className:"flex-1 resize-none bg-transparent font-mono text-sm leading-6 text-fg placeholder:text-fg-6 focus:outline-none disabled:cursor-not-allowed"}),i.jsx(cT,{onFiles:B=>void j(B),disabled:!S,allowed:!0}),i.jsx(fT,{isListening:de.stt.isListening,disabled:!S,onStart:de.stt.start,onStop:()=>void de.stt.stop()}),i.jsx("button",{type:"button",onClick:I,disabled:!S||!t.trim()&&!$&&P.length===0&&z.length===0,"aria-label":"Start run",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-600 text-white transition-colors duration-150 hover:bg-emerald-500 disabled:cursor-not-allowed disabled:bg-fg-6/30 disabled:text-fg-5",children:i.jsx(vy,{className:"h-4 w-4",strokeWidth:2.5})})]}),i.jsxs("div",{className:"flex items-center gap-2 border-t border-line/60 px-4 py-1.5",children:[M&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"shrink-0 font-mono text-[11px] text-fg-5",children:"关联"}),i.jsx("span",{className:"min-w-0 truncate rounded bg-blue-500/10 px-1.5 py-0.5 font-mono text-[11px] text-blue-400",children:M}),i.jsx("button",{type:"button",onClick:()=>m(""),className:"shrink-0 text-fg-5 hover:text-fg-3","aria-label":"取消关联",children:i.jsx(dt,{className:"h-3 w-3"})})]}),i.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[i.jsx("span",{className:"font-mono text-[11px] text-fg-5",children:"variant"}),i.jsxs("select",{value:u,onChange:B=>c(B.target.value),className:"rounded border border-line bg-surface px-2 py-0.5 font-mono text-[11px] text-fg-4 focus:border-fg-5 focus:outline-none",children:[i.jsx("option",{value:"",children:"默认"}),i.jsx("option",{value:"max",children:"max"}),i.jsx("option",{value:"high",children:"high"})]})]})]})]}),i.jsx(hT,{phase:de.stt.phase,volumeLevel:de.stt.volumeLevel,elapsed:de.elapsed,editText:de.editText,error:de.stt.error,onCancel:de.cancel,onConfirm:()=>void de.confirm(),idleHint:"⌘⏎ / ctrl+⏎ 开始运行",className:"mt-2 flex items-center justify-center gap-2"}),N&&i.jsx("div",{className:"mt-3 rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-2 font-mono text-xs text-red-400",children:N})]})]})}function fE({body:e}){return e?i.jsx("div",{className:"markdown-body leading-relaxed",children:i.jsx(Yr,{remarkPlugins:[Gr],children:e})}):i.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 Issue 没有描述内容"})}function mE({issue:e}){var t;return i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:ae("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",e.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",e.number," ",e.state]}),(t=e.labels)==null?void 0:t.map(a=>i.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${a.color}20`,color:`#${a.color}`},children:a.name},a.id))]}),i.jsx("h2",{className:"mt-0.5 truncate text-sm font-medium text-fg",children:e.title})]})}function ej({onToggleSidebar:e}){const t=Ve(b=>b.matchingParentId),a=Ve(b=>b.matchingCandidateId),r=Ve(b=>b.issues.find(g=>g.id===t)),o=Ve(b=>b.issues.find(g=>g.id===a)),u=Ve(b=>b.exitMatchMode),c=Ve(b=>b.linkChild),[f,m]=T.useState(!1);if(!r)return null;const h=async()=>{o&&(m(!0),await c(r.number,o.number),m(!1))};return i.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden bg-term",children:[i.jsxs("header",{className:"flex items-center gap-3 border-b border-line bg-base px-4 py-2.5",children:[i.jsx("button",{type:"button",onClick:e,"aria-label":"Open sidebar",className:"-ml-1 rounded-lg p-1.5 text-fg-3 hover:bg-elevated md:hidden",children:i.jsx(Gh,{className:"h-5 w-5"})}),i.jsx("span",{className:"text-xs font-medium text-fg-4",children:"匹配子任务"}),i.jsxs("span",{className:"font-mono text-xs text-fg-3",children:["父: #",r.number]}),i.jsx("div",{className:"flex-1"}),i.jsxs("button",{type:"button",onClick:u,className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[i.jsx(dt,{className:"h-3.5 w-3.5"}),"退出匹配"]})]}),i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden border-b border-line md:border-b-0 md:border-r",children:[i.jsx("div",{className:"border-b border-line/60 px-4 py-2.5",children:i.jsx(mE,{issue:r})}),i.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6",children:i.jsx(fE,{body:r.body})})]}),i.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:o?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"border-b border-line/60 px-4 py-2.5",children:i.jsx(mE,{issue:o})}),i.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6",children:i.jsx(fE,{body:o.body})})]}):i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx("p",{className:"font-mono text-xs text-fg-5",children:"← 从左侧列表选择候选 Issue"})})})]}),o&&i.jsx("div",{className:"flex items-center justify-center gap-3 border-t border-line bg-base px-4 py-3",children:i.jsxs("button",{type:"button",onClick:()=>void h(),disabled:f,className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-4 py-2 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-50",children:[i.jsx(In,{className:"h-3.5 w-3.5"}),f?"关联中…":`确认: 将 #${o.number} 设为 #${r.number} 的子任务`]})})]})}function tj({onToggleSidebar:e,onToggleRightPanel:t,rightPanelOpen:a}){var G,F;const r=Sn(),o=Le(zn),u=Oe($=>$.activeSessionId),c=Oe($=>$.sessions.find(q=>q.id===$.activeSessionId)??null),f=Oe($=>{const q=$.activeSessionId;return q?$.messages[q]??Ao:Ao}),m=Oe($=>{const q=$.activeSessionId;return q?$.todos[q]??wo:wo}),h=Oe($=>{const q=$.activeSessionId;return q?$.sessionStatuses[q]:void 0}),b=Oe($=>{const q=$.activeSessionId;return q?$.queuedMessageIds[q]??D1:D1}),g=Oe($=>{const q=$.activeSessionId;return q?$.errorReasons[q]:void 0}),y=Oe($=>{const q=$.activeSessionId;return q?$.messagesMeta[q]:void 0}),N=Oe($=>$.loadMoreMessages),S=Oe($=>$.sendError),A=Oe($=>$.abortSession),w=Oe($=>$.revertToMessage),_=Le($=>$.repos.find(q=>q.id===$.activeRepoId)),M=(_==null?void 0:_.runtimeType)!=="claude-code",[k,L]=T.useState(null),[O,P]=T.useState(!1),z=Ve($=>c!=null&&c.issueId?$.issues.find(q=>q.id===c.issueId):void 0);T.useEffect(()=>{if(u)return Bc.activateSession(u),()=>Bc.deactivateSession(u)},[u]);const J=T.useRef(null),V=T.useRef(!0),[j,ee]=T.useState(!1);T.useEffect(()=>{const $=J.current;$&&V.current&&($.scrollTop=$.scrollHeight)},[f,m]),T.useEffect(()=>{V.current=!0,ee(!1)},[u]),T.useEffect(()=>{if(h!=="busy"&&h!=="retry")return;const $=q=>{if(q.key!=="Escape"||q.defaultPrevented)return;const D=q.target;D instanceof HTMLInputElement||D instanceof HTMLTextAreaElement||D!=null&&D.isContentEditable||A()};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[h,A]);const se=Ve($=>$.matchingParentId);if(!u)return se?i.jsx(ej,{onToggleSidebar:e}):i.jsx(JD,{onToggleSidebar:e});const he=h==="busy",te=h==="retry",K=he||te;return i.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden bg-term",children:[i.jsxs("header",{className:"border-b border-line bg-base md:hidden",children:[i.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",onClick:()=>P($=>!$),children:[i.jsxs("div",{className:"flex items-center gap-1",onClick:$=>$.stopPropagation(),children:[i.jsx("button",{type:"button",onClick:e,"aria-label":"Open sidebar",className:"-ml-1 rounded-lg p-1.5 text-fg-3 hover:bg-elevated",children:i.jsx(Gh,{className:"h-5 w-5"})}),i.jsx("button",{type:"button",onClick:()=>Oe.setState({activeSessionId:null}),"aria-label":"新建运行",title:"新建运行",className:"rounded-lg p-1.5 text-fg-3 hover:bg-elevated",children:i.jsx(Ma,{className:"h-5 w-5"})})]}),i.jsxs("div",{className:"min-w-0 flex-1",children:[(c==null?void 0:c.parentID)&&i.jsxs("button",{type:"button",onClick:$=>{$.stopPropagation(),Oe.getState().setActiveSession(c.parentID)},className:"mb-0.5 flex items-center gap-1 text-[11px] text-fg-4 transition-colors hover:text-blue-400",children:[i.jsx(yo,{className:"h-3 w-3"}),"返回父会话"]}),i.jsx("h2",{className:"text-sm font-medium leading-snug text-fg",children:((G=c==null?void 0:c.title)==null?void 0:G.trim())||"untitled run"})]}),K&&i.jsx("span",{className:ae("h-2 w-2 shrink-0 rounded-full","bg-amber-400 animate-pulse")}),!K&&h==="error"&&i.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-red-400"}),i.jsx(sa,{className:ae("h-4 w-4 shrink-0 text-fg-5 transition-transform duration-200",O&&"rotate-180")})]}),i.jsx("div",{className:ae("grid transition-[grid-template-rows] duration-200 ease-in-out",O?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:i.jsx("div",{className:"overflow-hidden",children:i.jsxs("div",{className:"flex flex-col gap-2.5 border-t border-line/60 px-4 py-3",children:[(c==null?void 0:c.agent)&&i.jsxs("div",{className:"flex items-center gap-2 font-mono text-xs text-fg-4",children:[i.jsx("span",{className:"w-14 shrink-0 text-fg-5",children:"Agent"}),i.jsx("span",{className:"truncate",children:c.agent})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"w-14 shrink-0 font-mono text-xs text-fg-5",children:"Status"}),i.jsx(oE,{status:h,reason:g})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"w-14 shrink-0 font-mono text-xs text-fg-5",children:"Context"}),i.jsx(dE,{session:c,messages:f})]}),z&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"w-14 shrink-0 font-mono text-xs text-fg-5",children:"Issue"}),i.jsxs("button",{type:"button",onClick:()=>r(`/${encodeURIComponent(o)}/dev/issues?id=${z.id}`),className:"flex items-center gap-1.5 truncate font-mono text-xs text-fg-3 transition-colors hover:text-blue-400",children:[i.jsxs("span",{className:ae("shrink-0 rounded px-1 py-0.5 text-[10px] font-semibold",z.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",z.number]}),i.jsx("span",{className:"truncate",children:z.title})]})]}),K&&i.jsxs("button",{type:"button",onClick:()=>void A(),className:"mt-0.5 flex w-full items-center justify-center gap-1.5 rounded-md border border-line px-2.5 py-1.5 font-mono text-xs text-fg-2 transition-colors hover:border-red-500/50 hover:text-red-400",children:[i.jsx(rh,{className:"h-3 w-3 fill-current"}),te?"stop retry":"stop"]})]})})})]}),i.jsxs("header",{className:"hidden items-center gap-3 border-b border-line bg-base px-4 py-2.5 md:flex",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[(c==null?void 0:c.parentID)&&i.jsxs("button",{type:"button",onClick:()=>void Oe.getState().setActiveSession(c.parentID),className:"mb-0.5 flex items-center gap-1 text-[11px] text-fg-4 transition-colors hover:text-blue-400",children:[i.jsx(yo,{className:"h-3 w-3"}),"返回父会话"]}),i.jsx("h2",{className:"truncate text-sm font-medium text-fg",children:((F=c==null?void 0:c.title)==null?void 0:F.trim())||"untitled run"}),(c==null?void 0:c.agent)&&i.jsx("p",{className:"truncate font-mono text-xs text-fg-4",children:c.agent}),i.jsx(dE,{session:c,messages:f})]}),z&&i.jsxs("button",{type:"button",onClick:()=>r(`/${encodeURIComponent(o)}/dev/issues?id=${z.id}`),className:"flex items-center gap-1 rounded-md border border-line px-2 py-1 font-mono text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[i.jsxs("span",{className:ae("rounded px-1 py-0.5 text-[10px] font-semibold",z.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",z.number]}),i.jsx("span",{className:"hidden max-w-[120px] truncate sm:inline",children:z.title})]}),i.jsx(oE,{status:h,reason:g}),t&&i.jsx("button",{type:"button",onClick:t,"aria-label":a?"关闭侧边栏":"打开侧边栏",className:ae("flex items-center justify-center rounded-md border border-line p-1.5 transition-colors",a?"bg-blue-500/10 text-blue-500 hover:bg-blue-500/20":"text-fg-4 hover:bg-elevated hover:text-fg-2"),children:i.jsx(Ry,{className:"h-4 w-4"})}),K&&i.jsxs("button",{type:"button",onClick:()=>void A(),className:"flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1 font-mono text-xs text-fg-2 transition-colors hover:border-red-500/50 hover:text-red-400",children:[i.jsx(rh,{className:"h-3 w-3 fill-current"}),te?"stop retry":"stop"]})]}),i.jsxs("div",{className:"relative min-h-0 flex-1",children:[i.jsx("div",{ref:J,onScroll:()=>{const $=J.current;if(!$)return;const q=$.scrollHeight-$.clientHeight-$.scrollTop<=ZD;if(V.current=q,ee(!q),$.scrollTop<200&&u&&(y!=null&&y.hasMore)&&!y.loading){const D=$.scrollHeight;N(u).then(()=>{requestAnimationFrame(()=>{J.current&&(J.current.scrollTop=J.current.scrollHeight-D)})})}},className:"h-full overflow-y-auto",children:i.jsxs("div",{className:"mx-auto flex max-w-4xl flex-col gap-3 px-4 py-4",children:[(y==null?void 0:y.loading)&&i.jsx("div",{className:"flex justify-center py-2",children:i.jsx("span",{className:"inline-block h-4 w-4 animate-spin rounded-full border-2 border-fg-5 border-t-transparent"})}),y&&!y.loading&&y.hasMore&&i.jsx("button",{type:"button",onClick:()=>u&&N(u),className:"mx-auto rounded-md border border-line px-3 py-1 font-mono text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2",children:"加载更早的消息"}),f.length===0?i.jsxs("p",{className:"py-10 text-center font-mono text-xs text-fg-6",children:[i.jsx("span",{className:"text-emerald-500/60",children:"❯"})," waiting for input",i.jsx("span",{className:"fs-blink",children:" ▋"})]}):f.map(($,q)=>i.jsxs(T.Fragment,{children:[q>0&&$.role==="user"&&i.jsx("div",{className:"group/revert relative border-t border-line py-2",children:M&&!K&&i.jsxs("button",{type:"button",disabled:k!==null,onClick:async()=>{const D=f.length-q;window.confirm(`回退到此处?将移除后续 ${D} 条对话记录(不影响已产生的代码改动)。`)&&(L($.id),await w(u,$.id),L(null))},className:"absolute left-1/2 top-1/2 z-10 flex -translate-x-1/2 -translate-y-1/2 items-center gap-1 rounded-full border border-line bg-base px-2.5 py-1 font-mono text-[11px] text-fg-4 opacity-60 shadow-sm transition-all duration-150 hover:border-amber-500/50 hover:text-amber-400 md:opacity-30 md:group-hover/revert:opacity-100 disabled:opacity-50",children:[k===$.id?i.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-current border-t-transparent"}):i.jsx(pw,{className:"h-3 w-3"}),"回退到此处"]})}),i.jsx("div",{"data-message-id":$.id,children:i.jsx(UD,{message:$,isStreaming:he&&q===f.length-1,queued:b.includes($.id)})})]},$.id)),m.length>0&&i.jsx(zD,{todos:[...m],onClick:t})]})}),i.jsx("button",{type:"button",onClick:()=>{const $=J.current;$&&($.scrollTo({top:$.scrollHeight,behavior:"smooth"}),V.current=!0)},"aria-label":"滚动到底部",className:ae("absolute bottom-4 right-4 z-10 flex h-9 w-9 items-center justify-center rounded-full border border-line bg-surface/90 text-fg-4 shadow-lg backdrop-blur transition-all duration-200","hover:bg-elevated hover:text-fg-2",j?"translate-y-0 opacity-100":"pointer-events-none translate-y-2 opacity-0"),children:i.jsx(sa,{className:"h-4 w-4"})})]}),h==="error"&&g&&i.jsxs("div",{className:"flex items-center gap-2 border-t border-red-500/20 bg-red-500/10 px-4 py-2 font-mono text-xs text-red-400",children:[i.jsx(_n,{className:"h-3.5 w-3.5 shrink-0"}),i.jsx("span",{className:"truncate",children:g})]}),S&&i.jsxs("div",{className:"flex items-center gap-2 border-t border-red-500/20 bg-red-500/10 px-4 py-2 font-mono text-xs text-red-400",children:[i.jsx(_n,{className:"h-3.5 w-3.5 shrink-0"}),i.jsx("span",{className:"truncate",children:S})]}),i.jsx(YD,{})]})}const hn=es((e,t)=>({pulls:[],loaded:!1,syncing:!1,selectedPrId:null,viewingPrId:null,matchingPrId:null,matchingCandidateIssueId:null,clearPulls:()=>e({pulls:[],loaded:!1,selectedPrId:null,viewingPrId:null,matchingPrId:null,matchingCandidateIssueId:null}),setViewingPr:a=>e({viewingPrId:a}),enterMatchMode:a=>e({matchingPrId:a,matchingCandidateIssueId:null}),exitMatchMode:()=>{const a=t().matchingPrId;e({matchingPrId:null,matchingCandidateIssueId:null,selectedPrId:a})},linkIssue:async(a,r)=>{const o=Le.getState().activeRepoId;if(!o)return!1;try{return await k5(o,a,r),!0}catch{return!1}},unlinkIssue:async(a,r)=>{const o=Le.getState().activeRepoId;if(!o)return!1;try{return await R5(o,a,r),!0}catch{return!1}},loadPulls:async()=>{const a=Le.getState().activeRepoId;if(!a){e({pulls:[],loaded:!0});return}try{const r=await Lx(a,"all");e({pulls:r,loaded:!0})}catch{e({loaded:!0})}},syncPulls:async()=>{const a=Le.getState().activeRepoId;if(a){e({syncing:!0});try{await A5(a,"open");const r=await Lx(a,"all");e({pulls:r,syncing:!1})}catch(r){e({syncing:!1});let o="同步 PR 失败";if(r instanceof Ss)try{const u=JSON.parse(r.message);u.error&&(o=u.error)}catch{r.message&&(o=r.message)}Gt.getState().addToast(o,"error")}}}})),nj={completed:{glyph:"✓",color:"text-emerald-400",spin:!1},in_progress:{glyph:"◌",color:"text-amber-400",spin:!0},cancelled:{glyph:"✗",color:"text-fg-5",spin:!1},pending:{glyph:"○",color:"text-fg-4",spin:!1}};function aj(e){var o;const t=(o=e.time)==null?void 0:o.created;if(!t)return"";const a=t<1e12?t*1e3:t;return new Date(a).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function sj(e){if(!e.parts)return"";for(const t of e.parts){const a=t.content??t.text;if(a)return a}return""}function rj({todos:e}){if(e.length===0)return i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无待办项"})});const t=e.filter(a=>{const r=Kr(a.status);return r==="completed"||r==="cancelled"}).length;return i.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[i.jsxs("div",{className:"mb-2 font-mono text-[10px] tabular-nums text-fg-5",children:["进度 ",t,"/",e.length]}),i.jsx("ul",{className:"space-y-1.5",children:e.map(a=>{const r=Kr(a.status),o=nj[r],u=r==="completed"||r==="cancelled";return i.jsxs("li",{className:"flex items-start gap-2 font-mono text-xs",children:[i.jsx("span",{className:ae("shrink-0 leading-5",o.color,o.spin&&"fs-spin"),children:o.glyph}),i.jsx("span",{className:ae("leading-5",u?"text-fg-5 line-through":"text-fg-2"),children:a.content})]},a.id)})})]})}function ij({messages:e,onScrollToMessage:t}){const a=e.filter(r=>r.role==="user");return a.length===0?i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无输入记录"})}):i.jsx("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:i.jsx("ul",{className:"space-y-1",children:a.map((r,o)=>{const u=sj(r),c=aj(r);return i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:()=>t==null?void 0:t(r.id),className:"group w-full rounded-md px-2 py-1.5 text-left transition-colors hover:bg-elevated/60",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"shrink-0 font-mono text-[10px] text-emerald-400/60",children:"❯"}),i.jsxs("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:["#",o+1]}),c&&i.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-fg-6",children:c})]}),u&&i.jsx("p",{className:"mt-0.5 line-clamp-2 pl-5 text-xs leading-relaxed text-fg-3 group-hover:text-fg-2",children:u})]})},r.id)})})})}function lj({linked:e,number:t,title:a,state:r,mergedAt:o,isPr:u,onToggle:c}){const f=u?r==="open"?"bg-emerald-500/15 text-emerald-400":o?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400":r==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400";return i.jsx("li",{children:i.jsx("button",{type:"button",onClick:c,className:ae("flex w-full items-start gap-2 rounded-md px-2 py-2 text-left transition-colors",e?"border-l-2 border-emerald-500 bg-emerald-500/5":"border-l-2 border-transparent hover:bg-elevated/50"),children:i.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[i.jsxs("span",{className:ae("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-semibold",f),children:["#",t]}),i.jsx("span",{className:"min-w-0 truncate text-xs text-fg-2",children:a}),e&&i.jsx(Yh,{className:"ml-auto h-3 w-3 shrink-0 text-emerald-400"})]})})})}function oj({links:e,sessionId:t}){var P,z,J,V;const a=Sn(),r=Le(zn),[o,u]=T.useState(null),[c,f]=T.useState(""),m=T.useRef(null),h=Ve(j=>j.issues),b=hn(j=>j.pulls),g=Oe(j=>j.addLink),y=Oe(j=>j.removeLink),N=new Set(((P=e==null?void 0:e.issues)==null?void 0:P.map(j=>j.id))??[]),S=new Set(((z=e==null?void 0:e.pullRequests)==null?void 0:z.map(j=>j.id))??[]);T.useEffect(()=>{var j;o&&((j=m.current)==null||j.focus())},[o]);const A=()=>{u(null),f("")},w=async(j,ee,se)=>{t&&(se?await y(t,j,ee):await g(t,j,ee))},_=c.trim().toLowerCase(),M=_?h.filter(j=>`#${j.number} ${j.title}`.toLowerCase().includes(_)):h,k=_?b.filter(j=>`#${j.number} ${j.title} ${j.headBranch}`.toLowerCase().includes(_)):b,L=((J=e==null?void 0:e.issues)==null?void 0:J.length)??0,O=((V=e==null?void 0:e.pullRequests)==null?void 0:V.length)??0;if(o){const j=o==="issue",ee=j?M:k,se=j?N:S;return i.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-2",children:[i.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-400",children:j?"关联 Issue":"关联 PR"}),i.jsxs("button",{type:"button",onClick:A,className:"flex h-6 items-center gap-1 rounded-md px-2 text-xs text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:[i.jsx(dt,{className:"h-3.5 w-3.5"}),"完成"]})]}),i.jsx("div",{className:"border-b border-line px-3 py-2",children:i.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[i.jsx(Ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),i.jsx("input",{ref:m,type:"text",value:c,onChange:he=>f(he.target.value),placeholder:j?"搜索 issue...":"搜索 PR...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),c&&i.jsx("button",{type:"button",onClick:()=>f(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:i.jsx(dt,{className:"h-3 w-3"})})]})}),i.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:ee.length===0?i.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:(j?h:b).length===0?j?"暂无 Issue,请先同步":"暂无 PR,请先同步":"无匹配结果"}):i.jsx("ul",{className:"space-y-0.5",children:ee.map(he=>i.jsx(lj,{linked:se.has(he.id),number:he.number,title:he.title,state:he.state,mergedAt:j?void 0:he.mergedAt,isPr:!j,onToggle:()=>w(o,he.id,se.has(he.id))},he.id))})})]})}return i.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[i.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-2",children:[i.jsx("span",{className:"flex-1 font-mono text-[10px] text-fg-5",children:L+O>0?`${L+O} 项关联`:"暂无关联"}),i.jsxs("button",{type:"button",onClick:()=>u("issue"),className:"flex h-6 items-center gap-1 rounded-md border border-line px-1.5 text-fg-4 transition-colors hover:border-emerald-500/50 hover:text-emerald-400",children:[i.jsx(Ma,{className:"h-3 w-3"}),i.jsx("span",{className:"text-[10px] font-medium",children:"Issue"})]}),i.jsxs("button",{type:"button",onClick:()=>u("pr"),className:"flex h-6 items-center gap-1 rounded-md border border-line px-1.5 text-fg-4 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:[i.jsx(Ma,{className:"h-3 w-3"}),i.jsx("span",{className:"text-[10px] font-medium",children:"PR"})]})]}),i.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[L>0&&i.jsxs("div",{className:"mb-3",children:[i.jsxs("div",{className:"mb-1.5 font-mono text-[10px] font-medium uppercase tracking-wider text-fg-5",children:["Issues (",L,")"]}),i.jsx("ul",{className:"space-y-1",children:e.issues.map(j=>i.jsxs("li",{className:"group flex items-start gap-1",children:[i.jsxs("button",{type:"button",onClick:()=>a(`/${encodeURIComponent(r)}/dev/issues?id=${encodeURIComponent(j.id)}`),className:"flex min-w-0 flex-1 items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-elevated/60",children:[i.jsxs("span",{className:ae("mt-0.5 shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-semibold",j.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",j.number]}),i.jsx("span",{className:"line-clamp-2 text-xs leading-5 text-fg-3 group-hover:text-fg-2",children:j.title})]}),i.jsx("button",{type:"button",onClick:()=>void w("issue",j.id,!0),className:"mt-1.5 hidden shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:bg-red-500/15 hover:text-red-400 group-hover:block",children:i.jsx(dt,{className:"h-3 w-3"})})]},j.id))})]}),O>0&&i.jsxs("div",{children:[i.jsxs("div",{className:"mb-1.5 font-mono text-[10px] font-medium uppercase tracking-wider text-fg-5",children:["Pull Requests (",O,")"]}),i.jsx("ul",{className:"space-y-1",children:e.pullRequests.map(j=>i.jsxs("li",{className:"group flex items-start gap-1",children:[i.jsxs("button",{type:"button",onClick:()=>a(`/${encodeURIComponent(r)}/dev/pulls?id=${encodeURIComponent(j.id)}`),className:"flex min-w-0 flex-1 items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-elevated/60",children:[i.jsxs("span",{className:ae("mt-0.5 shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-semibold",j.state==="open"?"bg-emerald-500/15 text-emerald-400":j.mergedAt?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400"),children:["#",j.number]}),i.jsx("span",{className:"line-clamp-2 text-xs leading-5 text-fg-3 group-hover:text-fg-2",children:j.title})]}),i.jsx("button",{type:"button",onClick:()=>void w("pr",j.id,!0),className:"mt-1.5 hidden shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:bg-red-500/15 hover:text-red-400 group-hover:block",children:i.jsx(dt,{className:"h-3 w-3"})})]},j.id))})]}),L===0&&O===0&&i.jsx("div",{className:"flex flex-1 items-center justify-center py-10",children:i.jsx("p",{className:"font-mono text-xs text-fg-5",children:"点击上方按钮添加关联"})})]})]})}const uj={"visual-engineering":"bg-purple-500/15 text-purple-400",quick:"bg-emerald-500/15 text-emerald-400",deep:"bg-blue-500/15 text-blue-400",ultrabrain:"bg-amber-500/15 text-amber-400",artistry:"bg-pink-500/15 text-pink-400",writing:"bg-cyan-500/15 text-cyan-400",explore:"bg-teal-500/15 text-teal-400",librarian:"bg-indigo-500/15 text-indigo-400",oracle:"bg-amber-500/15 text-amber-400",metis:"bg-rose-500/15 text-rose-400",momus:"bg-orange-500/15 text-orange-400"};function cj(e){switch(e){case"idle":return"bg-emerald-500";case"busy":case"retry":return"bg-amber-500 animate-pulse";case"error":return"bg-red-500";default:return"bg-fg-5"}}function Wm(e){var a;const t=(a=e.time)==null?void 0:a.created;if(t)return t<1e12?t*1e3:t;if(e.createdAt){const r=Date.parse(e.createdAt);if(!Number.isNaN(r))return r}return null}function dj(e){const t=Date.now()-e,a=Math.floor(t/1e3);if(a<60)return"just now";const r=Math.floor(a/60);if(r<60)return`${r}m ago`;const o=Math.floor(r/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function fj(){const e=Oe(m=>m.sessions),t=Oe(m=>m.activeSessionId),a=Oe(m=>m.sessionStatuses),r=Oe(m=>m.setActiveSession),o=e.find(m=>m.id===t),u=(o==null?void 0:o.parentID)??t,c=!!(o!=null&&o.parentID),f=e.filter(m=>m.parentID===u).sort((m,h)=>(Wm(h)??0)-(Wm(m)??0));return f.length===0?i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无子任务"})}):i.jsxs("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:[c&&i.jsxs("div",{className:"mb-1.5 px-2 font-mono text-[10px] text-fg-5",children:["同级子任务 (",f.length,")"]}),i.jsx("ul",{className:"space-y-0.5",children:f.map(m=>{const h=m.id===t,b=a[m.id],g=Wm(m),y=(m.agent&&uj[m.agent])??"bg-elevated text-fg-4",N=m.title||`${m.id.slice(0,9)}...`;return i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:()=>{h||r(m.id)},className:ae("group flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors",h?"border-l-2 border-blue-500 bg-blue-500/5":"border-l-2 border-transparent hover:bg-elevated/60"),children:[i.jsx("span",{className:ae("mt-1 h-2 w-2 shrink-0 rounded-full",cj(b))}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[m.agent&&i.jsx("span",{className:ae("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium",y),children:m.agent}),g!=null&&i.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-6",children:dj(g)})]}),i.jsx("p",{className:ae("mt-0.5 line-clamp-2 text-xs leading-5",h?"text-fg-2":"text-fg-3 group-hover:text-fg-2"),children:N})]})]})},m.id)})})]})}const mj=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg"]),hj=new Set([".html",".htm",".md",".txt",".log"]),Zm=80,pj=160,hE=.4;function gj(e){const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t>=0?e.slice(t+1):e}function bj({file:e,repoId:t,sessionId:a,onPreviewFile:r}){const o=gj(e.path),u=W5(t,a,e.path),c=e.ext.toLowerCase();return mj.has(c)?i.jsxs("li",{className:"flex items-center gap-2 rounded-md px-2 py-1 hover:bg-elevated/60",title:e.path,children:[i.jsx(PA,{className:"h-3 w-3 shrink-0 text-fg-5","aria-hidden":!0}),i.jsx(gp,{url:u,label:o,className:"h-8 w-8 shrink-0 object-cover"}),i.jsx("span",{className:"min-w-0 truncate text-xs text-fg-3",children:o})]}):hj.has(c)?i.jsx("li",{children:i.jsxs("button",{type:"button",title:e.path,onClick:()=>r==null?void 0:r({url:u,name:o,ext:c}),className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-left transition-colors hover:bg-elevated/60",children:[i.jsx(ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-4"}),i.jsx("span",{className:"min-w-0 truncate text-xs text-fg-3",children:o})]})}):i.jsxs("li",{className:"flex items-center gap-2 rounded-md px-2 py-1",title:e.path,children:[i.jsx(ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-4"}),i.jsx("span",{className:"min-w-0 truncate text-xs text-fg-3",children:o})]})}function xj({repoId:e,sessionId:t,containerRef:a,onPreviewFile:r}){const[o,u]=T.useState(!1),[c,f]=T.useState(pj),[m,h]=T.useState([]),[b,g]=T.useState(0),y=T.useRef(null),N=T.useRef(null);T.useEffect(()=>{let k=!1;const L=()=>{Q5(e,t).then(P=>{k||h(P)}).catch(()=>{k||h([])})};L();const O=setInterval(L,1e4);return()=>{k=!0,clearInterval(O)}},[e,t]),T.useEffect(()=>{const k=a.current;if(!k)return;const L=()=>g(k.clientHeight);L();const O=new ResizeObserver(L);return O.observe(k),()=>O.disconnect()},[a]);const S=b>0?b*hE:c,A=Math.max(Zm,S),w=Math.min(c,A),_=T.useCallback(k=>{k.preventDefault();const L=a.current,O=Math.max(Zm,L?L.clientHeight*hE:A);N.current={startY:k.clientY,startHeight:w,maxHeight:O};const P=J=>{const V=N.current;if(!V)return;const j=V.startY-J.clientY,ee=Math.max(Zm,Math.min(V.startHeight+j,V.maxHeight));y.current&&(y.current.style.height=`${ee}px`)},z=()=>{const J=y.current;if(J){const V=parseInt(J.style.height,10);Number.isNaN(V)||f(V)}N.current=null,window.removeEventListener("mousemove",P),window.removeEventListener("mouseup",z)};window.addEventListener("mousemove",P),window.addEventListener("mouseup",z)},[a,w,A]),M=m.length;return o?i.jsxs("div",{ref:y,className:"flex shrink-0 flex-col border-t border-line bg-surface",style:{height:`${w}px`},children:[i.jsx("div",{onMouseDown:_,role:"separator","aria-orientation":"horizontal",className:"flex h-1 shrink-0 cursor-row-resize items-center justify-center bg-line transition-colors hover:bg-blue-500/60",children:i.jsx(IA,{className:"h-2 w-8 text-fg-6","aria-hidden":!0})}),i.jsxs("button",{type:"button",onClick:()=>u(!1),className:"flex shrink-0 items-center gap-1.5 border-b border-line px-3 py-2 text-left transition-colors hover:bg-elevated/60",children:[i.jsx(ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-4"}),i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"变更文件"}),i.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:M}),i.jsx(sa,{className:"ml-auto h-3.5 w-3.5 text-fg-5"})]}),i.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-1 py-1",children:M===0?i.jsx("p",{className:"px-2 py-4 text-center font-mono text-xs text-fg-5",children:"暂无变更文件"}):i.jsx("ul",{className:"space-y-0.5",children:m.map(k=>i.jsx(bj,{file:k,repoId:e,sessionId:t,onPreviewFile:r},k.path))})})]}):i.jsxs("button",{type:"button",onClick:()=>u(!0),className:"flex w-full shrink-0 items-center gap-1.5 border-t border-line px-3 py-2 text-left transition-colors hover:bg-elevated/60",children:[i.jsx(ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-4"}),i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"变更文件"}),i.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:M}),i.jsx(Ay,{className:"ml-auto h-3.5 w-3.5 text-fg-5"})]})}function pE({todos:e,messages:t,sessionLinks:a,sessionId:r,onScrollToMessage:o,onPreviewFile:u}){var _,M;const[c,f]=T.useState("todo"),m=T.useRef(null),h=Le(k=>k.activeRepoId),b=Oe(k=>k.sessions),g=Oe(k=>k.activeSessionId),y=t.filter(k=>k.role==="user").length,N=(((_=a==null?void 0:a.issues)==null?void 0:_.length)??0)+(((M=a==null?void 0:a.pullRequests)==null?void 0:M.length)??0),S=b.find(k=>k.id===g),A=(S==null?void 0:S.parentID)??g,w=b.filter(k=>k.parentID===A).length;return i.jsxs("div",{ref:m,className:"flex h-full w-72 shrink-0 flex-col border-l border-line bg-surface",children:[i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[i.jsxs("div",{className:"flex items-center border-b border-line",children:[i.jsxs("button",{type:"button",onClick:()=>f("todo"),className:ae("flex flex-1 items-center justify-center gap-1 border-b-2 px-2 py-2.5 text-xs font-medium transition-colors",c==="todo"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:["待办",e.length>0&&i.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:e.length})]}),i.jsxs("button",{type:"button",onClick:()=>f("prompts"),className:ae("flex flex-1 items-center justify-center gap-1 border-b-2 px-2 py-2.5 text-xs font-medium transition-colors",c==="prompts"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:["输入",y>0&&i.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:y})]}),i.jsxs("button",{type:"button",onClick:()=>f("links"),className:ae("flex flex-1 items-center justify-center gap-1 border-b-2 px-2 py-2.5 text-xs font-medium transition-colors",c==="links"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:["关联",N>0&&i.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:N})]}),i.jsxs("button",{type:"button",onClick:()=>f("subtasks"),className:ae("flex flex-1 items-center justify-center gap-1 border-b-2 px-2 py-2.5 text-xs font-medium transition-colors",c==="subtasks"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:["子任务",w>0&&i.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:w})]})]}),c==="todo"?i.jsx(rj,{todos:e}):c==="prompts"?i.jsx(ij,{messages:t,onScrollToMessage:o}):c==="links"?i.jsx(oj,{links:a,sessionId:r}):i.jsx(fj,{})]}),r&&h&&i.jsx(xj,{repoId:h,sessionId:r,containerRef:m,onPreviewFile:u})]})}const gE=8;function Ej(e,t){let a=e instanceof Element?e:null;for(;a&&a!==t;){if(a.scrollWidth>a.clientWidth){const r=getComputedStyle(a).overflowX;if(r==="auto"||r==="scroll")return!0}a=a.parentElement}return!1}function UT({onSwipeLeft:e,onSwipeRight:t,threshold:a=40,disabled:r=!1}={}){const o=T.useRef({x0:0,y0:0,dir:null,on:!1}),u=T.useRef(0),c=T.useCallback(h=>{if(r||Ej(h.target,h.currentTarget))return;const b=h.touches[0];o.current={x0:b.clientX,y0:b.clientY,dir:null,on:!0},u.current=0},[r]),f=T.useCallback(h=>{const b=o.current;if(!b.on)return;const g=h.touches[0].clientX-b.x0,y=h.touches[0].clientY-b.y0;if(!b.dir){(Math.abs(g)>gE||Math.abs(y)>gE)&&(b.dir=Math.abs(g)>Math.abs(y)?"h":"v");return}if(b.dir==="v"){b.on=!1;return}u.current=g},[]),m=T.useCallback(()=>{const h=o.current;if(!h.on||h.dir!=="h"){h.on=!1;return}h.on=!1;const b=u.current;b>a?t==null||t():b<-a&&(e==null||e())},[a,e,t]);return{onTouchStart:c,onTouchMove:f,onTouchEnd:m}}function vh({side:e,open:t,onClose:a,children:r,width:o="w-80"}){const u=e==="left";return i.jsxs("div",{className:"md:hidden",children:[t&&i.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:a,"aria-hidden":"true"}),i.jsx("div",{className:ae("fixed top-0 bottom-0 z-50 flex flex-col bg-surface pt-[var(--safe-top)] pb-[var(--safe-bottom)] shadow-xl transition-transform duration-200 ease-out",o,u?"left-0 border-r border-line":"right-0 border-l border-line",t?"translate-x-0":u?"-translate-x-full":"translate-x-full"),children:r})]})}function Sh(e){var t,a;if(typeof((t=e.time)==null?void 0:t.updated)=="number")return e.time.updated;if(typeof((a=e.time)==null?void 0:a.created)=="number")return e.time.created;if(e.createdAt){const r=Date.parse(e.createdAt);return Number.isNaN(r)?0:r}return 0}function yj(e){const t=Sh(e);if(!t)return"";const a=t<1e12?t*1e3:t,r=new Date(a);return r.toDateString()===new Date().toDateString()?r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):r.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function bE(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>xE(e)):xE(e)}function xE(e){const t=document.createElement("textarea");t.value=e,t.style.cssText="position:fixed;opacity:0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}function Nj(e){switch(e){case"idle":return"bg-emerald-500";case"busy":case"retry":return"bg-amber-500 animate-pulse";case"error":return"bg-red-500";default:return"bg-fg-5"}}const EE="fs:swipe-hint-shown";function Tj({session:e,isActive:t,isConfirming:a,peekHint:r,onSelect:o,onDelete:u,onConfirm:c,onCancelConfirm:f,onRename:m,onToggleComplete:h,status:b,issue:g,linkedItems:y,todos:N}){var de,_e;const S=Nc(B=>B.drafts[e.id]),A=!!e.completedAt,w=yj(e),[_,M]=T.useState(!1),[k,L]=T.useState(""),O=T.useRef(null),P=()=>{var B;L(((B=e.title)==null?void 0:B.trim())||""),M(!0),requestAnimationFrame(()=>{var pe;return(pe=O.current)==null?void 0:pe.focus()})},z=()=>{var pe;M(!1);const B=k.trim();B&&B!==(((pe=e.title)==null?void 0:pe.trim())||"")&&m(B)},[J,V]=T.useState(null),j=T.useRef(null),ee=T.useRef(!1),se=()=>{j.current&&(clearTimeout(j.current),j.current=null)},he=144,te=T.useRef(null),K=T.useRef(null),G=T.useRef(0),F=T.useRef({x0:0,y0:0,base:0,dir:null,on:!1}),$=B=>{G.current=B;const pe=te.current,Re=K.current;pe&&(pe.style.transform=B!==0?`translateX(${B}px)`:"",pe.style.pointerEvents=B===-he?"none":""),Re&&(Re.style.width=`${Math.abs(B)}px`)},q=B=>{const pe=B.touches[0];F.current={x0:pe.clientX,y0:pe.clientY,base:G.current,dir:null,on:!0},te.current&&(te.current.style.transition="none"),K.current&&(K.current.style.transition="none"),ee.current=!1,se(),j.current=setTimeout(()=>{ee.current=!0,F.current.on=!1,V({x:pe.clientX,y:pe.clientY})},500)},D=B=>{const pe=F.current;if(!pe.on){se();return}const Re=B.touches[0].clientX-pe.x0,De=B.touches[0].clientY-pe.y0;if(!pe.dir){(Math.abs(Re)>5||Math.abs(De)>5)&&(pe.dir=Math.abs(Re)>Math.abs(De)?"h":"v",se());return}pe.dir!=="v"&&$(Math.max(-he,Math.min(0,pe.base+Re)))},I=B=>{const pe=te.current,Re=K.current;pe&&(pe.style.transition="transform 200ms ease-out"),Re&&(Re.style.transition="width 200ms ease-out"),$(B)},W=()=>{if(se(),ee.current){ee.current=!1;return}F.current.on=!1,I(G.current<-he/2?-he:0)},C=()=>I(0);return T.useEffect(()=>{if(!r)return;const B=-60,pe=setTimeout(()=>{const Re=te.current,De=K.current;Re&&(Re.style.transition="transform 400ms cubic-bezier(.25,.8,.25,1)"),De&&(De.style.transition="width 400ms cubic-bezier(.25,.8,.25,1)"),$(B);const lt=setTimeout(()=>{Re&&(Re.style.transition="transform 500ms cubic-bezier(.25,.8,.25,1)"),De&&(De.style.transition="width 500ms cubic-bezier(.25,.8,.25,1)"),$(0)},800);return()=>clearTimeout(lt)},600);return()=>clearTimeout(pe)},[r]),i.jsxs("li",{className:"relative overflow-hidden rounded-md",children:[i.jsx("div",{ref:K,className:"absolute right-0 top-0 bottom-0 z-10 overflow-hidden md:hidden",style:{width:0},children:i.jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:he},children:a?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",onClick:()=>{u(),C()},className:"flex w-12 items-center justify-center bg-red-500 text-white active:bg-red-600",children:i.jsx(In,{className:"h-4 w-4"})}),i.jsx("button",{type:"button",onClick:()=>{f(),C()},className:"flex w-12 items-center justify-center bg-neutral-500 text-white active:bg-neutral-600",children:i.jsx(dt,{className:"h-4 w-4"})})]}):i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button",onClick:()=>{h(),C()},className:ae("flex w-12 flex-col items-center justify-center gap-0.5 text-white",A?"bg-neutral-500 active:bg-neutral-600":"bg-emerald-500 active:bg-emerald-600"),children:[i.jsx(Tm,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"text-[9px] leading-none",children:A?"撤销":"完成"})]}),i.jsxs("button",{type:"button",onClick:()=>{P(),C()},className:"flex w-12 flex-col items-center justify-center gap-0.5 bg-amber-500 text-white active:bg-amber-600",children:[i.jsx(Tx,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"text-[9px] leading-none",children:"重命名"})]}),i.jsxs("button",{type:"button",onClick:()=>c(),className:"flex w-12 flex-col items-center justify-center gap-0.5 bg-red-500 text-white active:bg-red-600",children:[i.jsx(ws,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"text-[9px] leading-none",children:"删除"})]})]})})}),i.jsxs("div",{ref:te,className:ae("group relative rounded-md border-l-2 will-change-transform",t?"border-blue-500 bg-elevated":"border-transparent bg-surface hover:bg-elevated/50"),onTouchStart:q,onTouchMove:D,onTouchEnd:W,onContextMenu:B=>B.preventDefault(),children:[i.jsxs("button",{type:"button",onClick:()=>{_||(o(),C())},className:ae("block w-full px-2.5 py-2 text-left",A&&!t&&"opacity-50"),style:{pointerEvents:"auto"},children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:ae("h-1.5 w-1.5 shrink-0 rounded-full",Nj(b))}),i.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-fg-3",children:((de=e.agent)==null?void 0:de.trim())||"默认"}),A&&i.jsx(Tm,{className:"h-3 w-3 shrink-0 text-emerald-400"}),w&&i.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:w})]}),_?i.jsx("input",{ref:O,type:"text",value:k,onChange:B=>L(B.target.value),onBlur:z,onKeyDown:B=>{B.key==="Enter"&&z(),B.key==="Escape"&&M(!1)},onClick:B=>B.stopPropagation(),className:"mt-0.5 w-full rounded border border-blue-500 bg-base pl-3.5 text-sm text-fg-2 outline-none"}):i.jsxs("div",{className:"mt-0.5 pl-3.5",onDoubleClick:B=>{B.stopPropagation(),P()},children:[(g||y)&&i.jsxs("div",{className:"mb-0.5 flex flex-wrap gap-1",children:[g&&i.jsxs("span",{className:ae("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium leading-none",g.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",g.number]}),y==null?void 0:y.map(B=>i.jsx("span",{className:ae("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium leading-none",B.type==="pr"?B.state==="open"?"bg-blue-500/15 text-blue-400":B.mergedAt?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400":B.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:B.type==="pr"?`PR#${B.number}`:`#${B.number}`},`${B.type}-${B.number}`))]}),i.jsx("span",{className:"block truncate text-sm text-fg-2",children:((_e=e.title)==null?void 0:_e.trim())||"未命名运行"}),S&&i.jsxs("span",{className:"mt-0.5 block truncate text-xs text-amber-400/80",children:["✏️ ",S]}),N.length>0&&(()=>{const B=N.length,pe=rT(N);return i.jsxs("span",{className:"mt-0.5 flex items-center gap-1.5 font-mono text-[10px]",children:[i.jsx("span",{className:"shrink-0 tracking-tight",children:N.map(Re=>{const De=Kr(Re.status);return i.jsx("span",{className:De==="completed"?"text-emerald-400":De==="in_progress"?"text-amber-400":De==="cancelled"?"text-fg-6":"text-fg-5",children:De==="pending"?"□":"■"},Re.id)})}),i.jsxs("span",{className:"tabular-nums text-fg-4",children:[pe,"/",B]})]})})()]})]}),a?i.jsxs("span",{className:"absolute right-1.5 top-1.5 hidden items-center gap-1 rounded bg-surface/90 px-0.5 md:flex",children:[i.jsx("button",{type:"button",onClick:u,className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:i.jsx(In,{className:"h-3.5 w-3.5"})}),i.jsx("button",{type:"button",onClick:f,className:"rounded p-1 text-fg-3 hover:bg-elevated",children:i.jsx(dt,{className:"h-3.5 w-3.5"})})]}):i.jsxs("span",{className:"absolute right-1.5 top-1.5 hidden items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 md:flex",children:[i.jsx("button",{type:"button",onClick:h,title:A?"取消完成":"标记完成",className:ae("rounded p-1",A?"text-emerald-400 hover:text-emerald-300":"text-fg-5 hover:text-emerald-400"),children:i.jsx(Tm,{className:"h-3.5 w-3.5"})}),i.jsx("button",{type:"button",onClick:P,title:"重命名",className:"rounded p-1 text-fg-5 hover:text-fg-2",children:i.jsx(Tx,{className:"h-3.5 w-3.5"})}),i.jsx("button",{type:"button",onClick:()=>{var B;bE(JSON.stringify({id:e.id,name:((B=e.title)==null?void 0:B.trim())||""},null,2))},title:"复制 Session JSON",className:"rounded p-1 text-fg-5 hover:text-fg-2",children:i.jsx(wc,{className:"h-3.5 w-3.5"})}),i.jsx("button",{type:"button",onClick:c,className:"rounded p-1 text-fg-5 hover:text-red-400",children:i.jsx(ws,{className:"h-3.5 w-3.5"})})]})]}),J&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"fixed inset-0 z-50",onClick:()=>V(null),onTouchEnd:()=>V(null)}),i.jsx("div",{className:"fixed z-50 min-w-[160px] rounded-lg border border-line bg-surface py-1 shadow-xl",style:{left:Math.min(J.x,window.innerWidth-176),top:J.y,animation:"ctx-fade-in 150ms ease-out"},children:i.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm text-fg-2 active:bg-elevated",onClick:()=>{var B;bE(JSON.stringify({id:e.id,name:((B=e.title)==null?void 0:B.trim())||""},null,2)),V(null)},children:[i.jsx(wc,{className:"h-3.5 w-3.5 text-fg-5"}),"复制 Session JSON"]})})]})]})}function yE({onClose:e}){const[t,a]=T.useState(null),[r]=T.useState(()=>typeof window>"u"||localStorage.getItem(EE)?!1:(localStorage.setItem(EE,"1"),!0)),o=Oe(L=>L.sessions),u=Oe(L=>L.activeSessionId),c=Oe(L=>L.sessionStatuses),f=Oe(L=>L.sessionFilter),m=Oe(L=>L.setSessionFilter),h=Oe(L=>L.setActiveSession),b=Oe(L=>L.deleteSession),g=Oe(L=>L.renameSession),y=Oe(L=>L.toggleSessionComplete),N=Le(L=>L.activeRepoId),S=Ve(L=>L.issues),A=Oe(L=>L.allSessionLinks),w=Oe(L=>L.todos),_=[...o].filter(L=>L.parentID?!1:f==="active"?!L.completedAt:!0).sort((L,O)=>Sh(O)-Sh(L)),M=new Map(S.map(L=>[L.id,L])),k=L=>i.jsx("ul",{className:"space-y-0.5",children:L.map((O,P)=>{const z=O.issueId?M.get(O.issueId):void 0,J=A[O.id],V=[];if(J){for(const j of J.issues)V.push({number:j.number,state:j.state,type:"issue"});for(const j of J.pullRequests)V.push({number:j.number,state:j.state,type:"pr",mergedAt:j.mergedAt})}return i.jsx(Tj,{session:O,isActive:O.id===u,isConfirming:t===O.id,peekHint:r&&P===0,status:c[O.id],issue:z?{number:z.number,title:z.title,state:z.state}:void 0,linkedItems:V.length>0?V:void 0,onSelect:()=>{h(O.id),e==null||e()},onDelete:()=>{b(O.id),a(null)},onConfirm:()=>a(O.id),onCancelConfirm:()=>a(null),onRename:j=>void g(O.id,j),onToggleComplete:()=>void y(O.id),todos:w[O.id]??wo},O.id)})});return i.jsx("div",{className:"flex h-full w-80 shrink-0 flex-col border-r border-line bg-surface",children:i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[i.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"运行记录"}),N&&i.jsx("button",{type:"button",onClick:()=>{Oe.setState({activeSessionId:null}),e==null||e()},title:"新建运行",className:"flex h-7 w-7 items-center justify-center rounded-md bg-blue-600 text-white transition-colors hover:bg-blue-500",children:i.jsx(Ma,{className:"h-4 w-4"})})]}),N&&i.jsx("div",{className:"flex gap-1 border-b border-line px-3 py-1.5",children:[["active","进行中"],["all","全部"]].map(([L,O])=>i.jsx("button",{type:"button",onClick:()=>m(L),className:ae("rounded-md px-2 py-0.5 font-mono text-[11px] transition-colors",f===L?"bg-elevated text-fg-2":"text-fg-5 hover:text-fg-3"),children:O},L))}),i.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:N?_.length===0?i.jsx("p",{className:"px-2 py-6 text-center font-mono text-xs text-fg-5",children:"暂无运行记录"}):i.jsx("div",{children:k(_)}):i.jsx("p",{className:"px-2 py-6 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]})})}function _j(){const[e,t]=T.useState(()=>typeof window<"u"&&window.matchMedia("(min-width: 1280px)").matches);return T.useEffect(()=>{const a=window.matchMedia("(min-width: 1280px)"),r=o=>t(o.matches);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),e}function NE(e){const t=document.querySelector(`[data-message-id="${e}"]`);t&&(t.scrollIntoView({behavior:"smooth",block:"center"}),t.classList.add("fs-highlight"),setTimeout(()=>t.classList.remove("fs-highlight"),2e3))}const TE=new Set([".html",".htm"]),vj=".md";function Sj({file:e}){const[t,a]=T.useState(null),[r,o]=T.useState(!1);return T.useEffect(()=>{TE.has(e.ext)||(o(!0),a(null),fetch(e.url).then(u=>u.text()).then(u=>a(u)).catch(()=>a("加载失败")).finally(()=>o(!1)))},[e.url,e.ext]),TE.has(e.ext)?i.jsx("iframe",{src:e.url,sandbox:"",title:e.name,className:"h-full w-full border-0 bg-white"}):r?i.jsx("p",{className:"p-8 text-center font-mono text-sm text-fg-5",children:"加载中…"}):e.ext===vj?i.jsx("div",{className:"h-full overflow-y-auto",children:i.jsx("div",{className:"prose prose-invert max-w-none p-6",children:i.jsx(Yr,{remarkPlugins:[Gr],children:t??""})})}):i.jsx("pre",{className:"h-full overflow-auto whitespace-pre-wrap p-6 font-mono text-xs leading-relaxed text-fg-2",children:t})}function Aj(e){const[t,a]=T.useState([]),[r,o]=T.useState(null);return T.useEffect(()=>{a([]),o(null)},[e]),{tabs:t,activeIdx:r,open:m=>{a(h=>{const b=h.findIndex(g=>g.url===m.url);return b>=0?(o(b),h):(o(h.length),[...h,m])})},close:m=>{a(h=>{const b=h.filter((g,y)=>y!==m);return o(g=>g===m?null:g!==null&&g>m?g-1:g),b})},activate:m=>o(m)}}function wj(){const[e,t]=T.useState(!1),[a,r]=T.useState(!1),[o,u]=T.useState(!1),c=_j(),f=Oe(_=>_.activeSessionId),m=Aj(f),h=kc(_=>_.sessionPanelCollapsed),b=kc(_=>_.toggleSessionPanel),g=Oe(_=>{const M=_.activeSessionId;return M?_.todos[M]??wo:wo}),y=Oe(_=>{const M=_.activeSessionId;return M?_.messages[M]??Ao:Ao}),N=Oe(_=>{const M=_.activeSessionId;return M?_.sessionLinks[M]:void 0});T.useEffect(()=>{c&&f?u(!0):c||u(!1)},[c,f]);const S=o&&!!f,A=()=>{window.matchMedia("(max-width: 767px)").matches?r(_=>!_):u(_=>!_)},w=UT({onSwipeRight:()=>t(!0),onSwipeLeft:()=>r(!0),disabled:e||a});return i.jsxs("div",{className:"flex min-h-0 flex-1",...w,children:[i.jsxs("div",{className:"relative hidden shrink-0 md:flex",children:[i.jsx("div",{className:ae("overflow-hidden transition-[width] duration-200 ease-in-out",h?"w-0":"w-80"),children:i.jsx("div",{className:"h-full w-80",children:i.jsx(yE,{})})}),i.jsx("button",{type:"button",onClick:b,title:h?"展开运行记录":"收起运行记录",className:ae("absolute left-full top-1/2 z-20 flex h-14 w-4 -translate-y-1/2 items-center justify-center rounded-r-md border-y border-r border-line text-fg-5 transition-all duration-200 hover:bg-elevated hover:text-fg-3",h?"bg-surface opacity-80 hover:w-5 hover:opacity-100":"bg-surface/80 opacity-40 hover:opacity-100"),children:h?i.jsx(Xc,{className:"h-3 w-3"}):i.jsx(zh,{className:"h-3 w-3"})})]}),i.jsx(vh,{side:"left",open:e,onClose:()=>t(!1),children:i.jsx(yE,{onClose:()=>t(!1)})}),i.jsx(vh,{side:"right",open:a,onClose:()=>r(!1),children:i.jsx(pE,{todos:g,messages:y,sessionLinks:N,sessionId:f,onScrollToMessage:_=>{r(!1),setTimeout(()=>NE(_),300)}})}),i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[m.tabs.length>0&&i.jsxs("div",{className:"flex shrink-0 items-end gap-0 border-b border-line bg-surface",children:[i.jsx("button",{type:"button",onClick:()=>m.activate(null),className:ae("flex items-center gap-1.5 border-r border-line px-3 py-1.5 text-xs font-medium transition-colors",m.activeIdx===null?"border-b-2 border-b-blue-500 bg-base text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:"对话"}),m.tabs.map((_,M)=>i.jsxs("div",{className:ae("group flex items-center gap-1 border-r border-line px-2 py-1.5 text-xs transition-colors",m.activeIdx===M?"border-b-2 border-b-blue-500 bg-base text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:[i.jsx("button",{type:"button",onClick:()=>m.activate(M),className:"min-w-0 max-w-[120px] truncate font-mono",title:_.name,children:_.name}),i.jsx("button",{type:"button",onClick:k=>{k.stopPropagation(),m.close(M)},className:"shrink-0 rounded p-0.5 text-fg-5 opacity-0 transition-opacity hover:bg-elevated hover:text-fg-2 group-hover:opacity-100",children:i.jsx(dt,{className:"h-3 w-3"})})]},_.url))]}),i.jsx("div",{className:ae("min-h-0 flex-1 flex flex-col",m.activeIdx!==null&&"hidden"),children:i.jsx(tj,{onToggleSidebar:()=>t(_=>!_),onToggleRightPanel:A,rightPanelOpen:S})}),m.activeIdx!==null&&m.tabs[m.activeIdx]&&i.jsx("div",{className:"min-h-0 flex-1 bg-base",children:i.jsx(Sj,{file:m.tabs[m.activeIdx]})})]}),S&&i.jsx("div",{className:"hidden shrink-0 md:flex",children:i.jsx(pE,{todos:g,messages:y,sessionLinks:N,sessionId:f,onScrollToMessage:NE,onPreviewFile:m.open})})]})}function Cj({issues:e,tags:t,milestones:a,tagFilterMode:r,stateFilter:o,typeFilter:u,searchQuery:c,selectedMilestoneId:f,selectedAuthor:m,selectedAssignee:h}){const{childIssueIds:b,childrenMap:g}=T.useMemo(()=>{const k=new Set(e.filter(O=>O.parentId).map(O=>O.parentId)),L=new Map;for(const O of e)if(O.parentId){const P=L.get(O.parentId);P?P.push(O):L.set(O.parentId,[O])}return{childIssueIds:k,childrenMap:L}},[e]),y=T.useMemo(()=>k=>k.parentId?"task":b.has(k.id)?"epic":"stray",[b]),N=T.useMemo(()=>new Map(a.map(k=>[k.id,k])),[a]),{afterState:S,finalFiltered:A}=T.useMemo(()=>{const k=o==="all"?e:e.filter(ee=>ee.state===o),L=u==="all"?k:k.filter(ee=>y(ee)===u),O=r.size===0?L:L.filter(ee=>{var he;const se=new Set((ee.labels??[]).map(te=>te.name));for(const[te,K]of r){const G=(he=t.find(F=>F.id===te))==null?void 0:he.name;if(G&&(K==="include"&&!se.has(G)||K==="exclude"&&se.has(G)))return!1}return!0}),P=c.trim().toLowerCase(),z=P?O.filter(ee=>`#${ee.number} ${ee.title}`.toLowerCase().includes(P)):O,J=f?z.filter(ee=>ee.milestoneId===f):z,V=m?J.filter(ee=>ee.authorLogin===m):J,j=h?V.filter(ee=>(ee.assignees??[]).some(se=>se.login===h)):V;return{afterState:k,finalFiltered:j}},[e,o,u,r,t,c,f,m,h,y]),w=T.useMemo(()=>({open:e.filter(k=>k.state==="open").length,closed:e.filter(k=>k.state==="closed").length,epic:S.filter(k=>y(k)==="epic").length,task:S.filter(k=>y(k)==="task").length,stray:S.filter(k=>y(k)==="stray").length,afterState:S.length}),[e,S,y]),_=T.useMemo(()=>{const k=new Map;for(const L of e)L.authorLogin&&!k.has(L.authorLogin)&&k.set(L.authorLogin,{login:L.authorLogin,avatar:L.authorAvatar});return[...k.values()]},[e]),M=T.useMemo(()=>{const k=new Map;for(const L of e)for(const O of L.assignees??[])k.has(O.login)||k.set(O.login,{login:O.login,avatar:O.avatar_url});return[...k.values()]},[e]);return{childrenMap:g,issueType:y,milestoneMap:N,afterState:S,finalFiltered:A,counts:w,uniqueAuthors:_,uniqueAssignees:M}}const _E=/[#.]/g;function kj(e,t){const a=e||"",r={};let o=0,u,c;for(;o<a.length;){_E.lastIndex=o;const f=_E.exec(a),m=a.slice(o,f?f.index:a.length);m&&(u?u==="#"?r.id=m:Array.isArray(r.className)?r.className.push(m):r.className=[m]:c=m,o+=m.length),f&&(u=f[0],o++)}return{type:"element",tagName:c||t||"div",properties:r,children:[]}}function HT(e,t,a){const r=a?Mj(a):void 0;function o(u,c,...f){let m;if(u==null){m={type:"root",children:[]};const h=c;f.unshift(h)}else{m=kj(u,t);const h=m.tagName.toLowerCase(),b=r?r.get(h):void 0;if(m.tagName=b||h,Rj(c))f.unshift(c);else for(const[g,y]of Object.entries(c))Oj(e,m.properties,g,y)}for(const h of f)Ah(m.children,h);return m.type==="element"&&m.tagName==="template"&&(m.content={type:"root",children:m.children},m.children=[]),m}return o}function Rj(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,a=Object.keys(e);for(const r of a){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const u=o;for(const c of u)if(typeof c!="number"&&typeof c!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Oj(e,t,a,r){const o=Jc(e,a);let u;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;u=r}else typeof r=="boolean"?u=r:typeof r=="string"?o.spaceSeparated?u=Kx(r):o.commaSeparated?u=zx(r):o.commaOrSpaceSeparated?u=Kx(zx(r).join(" ")):u=vE(o,o.property,r):Array.isArray(r)?u=[...r]:u=o.property==="style"?Ij(r):String(r);if(Array.isArray(u)){const c=[];for(const f of u)c.push(vE(o,o.property,f));u=c}o.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[o.property]=u}}function Ah(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const a of t)Ah(e,a);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ah(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function vE(e,t,a){if(typeof a=="string"){if(e.number&&a&&!Number.isNaN(Number(a)))return Number(a);if((e.boolean||e.overloadedBoolean)&&(a===""||To(a)===To(t)))return!0}return a}function Ij(e){const t=[];for(const[a,r]of Object.entries(e))t.push([a,r].join(": "));return t.join("; ")}function Mj(e){const t=new Map;for(const a of e)t.set(a.toLowerCase(),a);return t}const Lj=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Dj=HT(Do,"div"),jj=HT(cr,"g",Lj);function Bj(e){const t=String(e),a=[];return{toOffset:o,toPoint:r};function r(u){if(typeof u=="number"&&u>-1&&u<=t.length){let c=0;for(;;){let f=a[c];if(f===void 0){const m=SE(t,a[c-1]);f=m===-1?t.length+1:m+1,a[c]=f}if(f>u)return{line:c+1,column:u-(c>0?a[c-1]:0)+1,offset:u};c++}}}function o(u){if(u&&typeof u.line=="number"&&typeof u.column=="number"&&!Number.isNaN(u.line)&&!Number.isNaN(u.column)){for(;a.length<u.line;){const f=a[a.length-1],m=SE(t,f),h=m===-1?t.length+1:m+1;if(f===h)break;a.push(h)}const c=(u.line>1?a[u.line-2]:0)+u.column-1;if(c<a[u.line-1])return c}}}function SE(e,t){const a=e.indexOf("\r",t),r=e.indexOf(`
|
|
515
|
-
`,t);return r===-1?a:a===-1||a+1===r?r:a<r?a:r}const Pr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},FT={}.hasOwnProperty,Pj=Object.prototype;function Uj(e,t){const a=t||{};return yp({file:a.file||void 0,location:!1,schema:a.space==="svg"?cr:Do,verbose:a.verbose||!1},e)}function yp(e,t){let a;switch(t.nodeName){case"#comment":{const r=t;return a={type:"comment",value:r.data},Tc(e,r,a),a}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(a={type:"root",children:zT(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const u=String(e.file),c=Bj(u),f=c.toPoint(0),m=c.toPoint(u.length);a.position={start:f,end:m}}return a}case"#documentType":{const r=t;return a={type:"doctype"},Tc(e,r,a),a}case"#text":{const r=t;return a={type:"text",value:r.value},Tc(e,r,a),a}default:return a=Hj(e,t),a}}function zT(e,t){let a=-1;const r=[];for(;++a<t.length;){const o=yp(e,t[a]);r.push(o)}return r}function Hj(e,t){const a=e.schema;e.schema=t.namespaceURI===Pr.svg?cr:Do;let r=-1;const o={};for(;++r<t.attrs.length;){const f=t.attrs[r],m=(f.prefix?f.prefix+":":"")+f.name;FT.call(Pj,m)||(o[m]=f.value)}const c=(e.schema.space==="svg"?jj:Dj)(t.tagName,o,zT(e,t.childNodes));if(Tc(e,t,c),c.tagName==="template"){const f=t,m=f.sourceCodeLocation,h=m&&m.startTag&&zi(m.startTag),b=m&&m.endTag&&zi(m.endTag),g=yp(e,f.content);h&&b&&e.file&&(g.position={start:h.end,end:b.start}),c.content=g}return e.schema=a,c}function Tc(e,t,a){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Fj(e,a,t.sourceCodeLocation);r&&(e.location=!0,a.position=r)}}function Fj(e,t,a){const r=zi(a);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!a.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const u={};let c;if(a.attrs)for(c in a.attrs)FT.call(a.attrs,c)&&(u[Jc(e.schema,c).property]=zi(a.attrs[c]));a.startTag;const f=zi(a.startTag),m=a.endTag?zi(a.endTag):void 0,h={opening:f};m&&(h.closing=m),h.properties=u,t.data={position:h}}}return r}function zi(e){const t=AE({line:e.startLine,column:e.startCol,offset:e.startOffset}),a=AE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||a?{start:t,end:a}:void 0}function AE(e){return e.line&&e.column?e:void 0}const zj={},$j={}.hasOwnProperty,$T=PN("type",{handlers:{root:Yj,element:Qj,text:Vj,comment:Xj,doctype:Kj}});function qj(e,t){const r=(t||zj).space;return $T(e,r==="svg"?cr:Do)}function Yj(e,t){const a={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return a.childNodes=Np(e.children,a,t),nl(e,a),a}function Gj(e,t){const a={nodeName:"#document-fragment",childNodes:[]};return a.childNodes=Np(e.children,a,t),nl(e,a),a}function Kj(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return nl(e,t),t}function Vj(e){const t={nodeName:"#text",value:e.value,parentNode:null};return nl(e,t),t}function Xj(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return nl(e,t),t}function Qj(e,t){const a=t;let r=a;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&a.space==="html"&&(r=cr);const o=[];let u;if(e.properties){for(u in e.properties)if(u!=="children"&&$j.call(e.properties,u)){const m=Wj(r,u,e.properties[u]);m&&o.push(m)}}const c=r.space,f={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Pr[c],childNodes:[],parentNode:null};return f.childNodes=Np(e.children,f,r),nl(e,f),e.tagName==="template"&&e.content&&(f.content=Gj(e.content,r)),f}function Wj(e,t,a){const r=Jc(e,t);if(a===!1||a===null||a===void 0||typeof a=="number"&&Number.isNaN(a)||!a&&r.boolean)return;Array.isArray(a)&&(a=r.commaSeparated?Wy(a):rN(a));const o={name:r.attribute,value:a===!0?"":String(a)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const u=o.name.indexOf(":");u<0?o.prefix="":(o.name=o.name.slice(u+1),o.prefix=r.attribute.slice(0,u)),o.namespace=Pr[r.space]}return o}function Np(e,t,a){let r=-1;const o=[];if(e)for(;++r<e.length;){const u=$T(e[r],a);u.parentNode=t,o.push(u)}return o}function nl(e,t){const a=e.position;a&&a.start&&a.end&&(a.start.offset,a.end.offset,t.sourceCodeLocation={startLine:a.start.line,startCol:a.start.column,startOffset:a.start.offset,endLine:a.end.line,endCol:a.end.column,endOffset:a.end.offset})}const Zj=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Jj=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ht="�";var U;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(U||(U={}));const ta={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function qT(e){return e>=55296&&e<=57343}function e8(e){return e>=56320&&e<=57343}function t8(e,t){return(e-55296)*1024+9216+t}function YT(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function GT(e){return e>=64976&&e<=65007||Jj.has(e)}var ce;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ce||(ce={}));const n8=65536;class a8{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=n8,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){const{line:r,col:o,offset:u}=this,c=o+a,f=u+a;return{code:t,startLine:r,endLine:r,startCol:c,endCol:c,startOffset:f,endOffset:f}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const a=this.html.charCodeAt(this.pos+1);if(e8(a))return this.pos++,this._addGap(),t8(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,U.EOF;return this._err(ce.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(a)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,U.EOF;const r=this.html.charCodeAt(a);return r===U.CARRIAGE_RETURN?U.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,U.EOF;let t=this.html.charCodeAt(this.pos);return t===U.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,U.LINE_FEED):t===U.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,qT(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===U.LINE_FEED||t===U.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){YT(t)?this._err(ce.controlCharacterInInputStream):GT(t)&&this._err(ce.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var at;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(at||(at={}));function KT(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}const s8=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),r8=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function i8(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=r8.get(e))!==null&&t!==void 0?t:e}var pn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(pn||(pn={}));const l8=32;var lr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(lr||(lr={}));function wh(e){return e>=pn.ZERO&&e<=pn.NINE}function o8(e){return e>=pn.UPPER_A&&e<=pn.UPPER_F||e>=pn.LOWER_A&&e<=pn.LOWER_F}function u8(e){return e>=pn.UPPER_A&&e<=pn.UPPER_Z||e>=pn.LOWER_A&&e<=pn.LOWER_Z||wh(e)}function c8(e){return e===pn.EQUALS||u8(e)}var mn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(mn||(mn={}));var vs;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(vs||(vs={}));class d8{constructor(t,a,r){this.decodeTree=t,this.emitCodePoint=a,this.errors=r,this.state=mn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=vs.Strict}startEntity(t){this.decodeMode=t,this.state=mn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case mn.EntityStart:return t.charCodeAt(a)===pn.NUM?(this.state=mn.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=mn.NamedEntity,this.stateNamedEntity(t,a));case mn.NumericStart:return this.stateNumericStart(t,a);case mn.NumericDecimal:return this.stateNumericDecimal(t,a);case mn.NumericHex:return this.stateNumericHex(t,a);case mn.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|l8)===pn.LOWER_X?(this.state=mn.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=mn.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,r,o){if(a!==r){const u=r-a;this.result=this.result*Math.pow(o,u)+Number.parseInt(t.substr(a,u),o),this.consumed+=u}}stateNumericHex(t,a){const r=a;for(;a<t.length;){const o=t.charCodeAt(a);if(wh(o)||o8(o))a+=1;else return this.addToNumericResult(t,r,a,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,a,16),-1}stateNumericDecimal(t,a){const r=a;for(;a<t.length;){const o=t.charCodeAt(a);if(wh(o))a+=1;else return this.addToNumericResult(t,r,a,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,a,10),-1}emitNumericEntity(t,a){var r;if(this.consumed<=a)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===pn.SEMI)this.consumed+=1;else if(this.decodeMode===vs.Strict)return 0;return this.emitCodePoint(i8(this.result),this.consumed),this.errors&&(t!==pn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:r}=this;let o=r[this.treeIndex],u=(o&lr.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const c=t.charCodeAt(a);if(this.treeIndex=f8(r,o,this.treeIndex+Math.max(1,u),c),this.treeIndex<0)return this.result===0||this.decodeMode===vs.Attribute&&(u===0||c8(c))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],u=(o&lr.VALUE_LENGTH)>>14,u!==0){if(c===pn.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==vs.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:r}=this,o=(r[a]&lr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,r){const{decodeTree:o}=this;return this.emitCodePoint(a===1?o[t]&~lr.VALUE_LENGTH:o[t+1],r),a===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case mn.NamedEntity:return this.result!==0&&(this.decodeMode!==vs.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case mn.NumericDecimal:return this.emitNumericEntity(0,2);case mn.NumericHex:return this.emitNumericEntity(0,3);case mn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mn.EntityStart:return 0}}}function f8(e,t,a,r){const o=(t&lr.BRANCH_LENGTH)>>7,u=t&lr.JUMP_TABLE;if(o===0)return u!==0&&r===u?a:-1;if(u){const m=r-u;return m<0||m>=o?-1:e[a+m]-1}let c=a,f=c+o-1;for(;c<=f;){const m=c+f>>>1,h=e[m];if(h<r)c=m+1;else if(h>r)f=m-1;else return e[m+o]}return-1}var ye;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(ye||(ye={}));var Fr;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Fr||(Fr={}));var Oa;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Oa||(Oa={}));var re;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(re||(re={}));var E;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(E||(E={}));const m8=new Map([[re.A,E.A],[re.ADDRESS,E.ADDRESS],[re.ANNOTATION_XML,E.ANNOTATION_XML],[re.APPLET,E.APPLET],[re.AREA,E.AREA],[re.ARTICLE,E.ARTICLE],[re.ASIDE,E.ASIDE],[re.B,E.B],[re.BASE,E.BASE],[re.BASEFONT,E.BASEFONT],[re.BGSOUND,E.BGSOUND],[re.BIG,E.BIG],[re.BLOCKQUOTE,E.BLOCKQUOTE],[re.BODY,E.BODY],[re.BR,E.BR],[re.BUTTON,E.BUTTON],[re.CAPTION,E.CAPTION],[re.CENTER,E.CENTER],[re.CODE,E.CODE],[re.COL,E.COL],[re.COLGROUP,E.COLGROUP],[re.DD,E.DD],[re.DESC,E.DESC],[re.DETAILS,E.DETAILS],[re.DIALOG,E.DIALOG],[re.DIR,E.DIR],[re.DIV,E.DIV],[re.DL,E.DL],[re.DT,E.DT],[re.EM,E.EM],[re.EMBED,E.EMBED],[re.FIELDSET,E.FIELDSET],[re.FIGCAPTION,E.FIGCAPTION],[re.FIGURE,E.FIGURE],[re.FONT,E.FONT],[re.FOOTER,E.FOOTER],[re.FOREIGN_OBJECT,E.FOREIGN_OBJECT],[re.FORM,E.FORM],[re.FRAME,E.FRAME],[re.FRAMESET,E.FRAMESET],[re.H1,E.H1],[re.H2,E.H2],[re.H3,E.H3],[re.H4,E.H4],[re.H5,E.H5],[re.H6,E.H6],[re.HEAD,E.HEAD],[re.HEADER,E.HEADER],[re.HGROUP,E.HGROUP],[re.HR,E.HR],[re.HTML,E.HTML],[re.I,E.I],[re.IMG,E.IMG],[re.IMAGE,E.IMAGE],[re.INPUT,E.INPUT],[re.IFRAME,E.IFRAME],[re.KEYGEN,E.KEYGEN],[re.LABEL,E.LABEL],[re.LI,E.LI],[re.LINK,E.LINK],[re.LISTING,E.LISTING],[re.MAIN,E.MAIN],[re.MALIGNMARK,E.MALIGNMARK],[re.MARQUEE,E.MARQUEE],[re.MATH,E.MATH],[re.MENU,E.MENU],[re.META,E.META],[re.MGLYPH,E.MGLYPH],[re.MI,E.MI],[re.MO,E.MO],[re.MN,E.MN],[re.MS,E.MS],[re.MTEXT,E.MTEXT],[re.NAV,E.NAV],[re.NOBR,E.NOBR],[re.NOFRAMES,E.NOFRAMES],[re.NOEMBED,E.NOEMBED],[re.NOSCRIPT,E.NOSCRIPT],[re.OBJECT,E.OBJECT],[re.OL,E.OL],[re.OPTGROUP,E.OPTGROUP],[re.OPTION,E.OPTION],[re.P,E.P],[re.PARAM,E.PARAM],[re.PLAINTEXT,E.PLAINTEXT],[re.PRE,E.PRE],[re.RB,E.RB],[re.RP,E.RP],[re.RT,E.RT],[re.RTC,E.RTC],[re.RUBY,E.RUBY],[re.S,E.S],[re.SCRIPT,E.SCRIPT],[re.SEARCH,E.SEARCH],[re.SECTION,E.SECTION],[re.SELECT,E.SELECT],[re.SOURCE,E.SOURCE],[re.SMALL,E.SMALL],[re.SPAN,E.SPAN],[re.STRIKE,E.STRIKE],[re.STRONG,E.STRONG],[re.STYLE,E.STYLE],[re.SUB,E.SUB],[re.SUMMARY,E.SUMMARY],[re.SUP,E.SUP],[re.TABLE,E.TABLE],[re.TBODY,E.TBODY],[re.TEMPLATE,E.TEMPLATE],[re.TEXTAREA,E.TEXTAREA],[re.TFOOT,E.TFOOT],[re.TD,E.TD],[re.TH,E.TH],[re.THEAD,E.THEAD],[re.TITLE,E.TITLE],[re.TR,E.TR],[re.TRACK,E.TRACK],[re.TT,E.TT],[re.U,E.U],[re.UL,E.UL],[re.SVG,E.SVG],[re.VAR,E.VAR],[re.WBR,E.WBR],[re.XMP,E.XMP]]);function al(e){var t;return(t=m8.get(e))!==null&&t!==void 0?t:E.UNKNOWN}const Ne=E,h8={[ye.HTML]:new Set([Ne.ADDRESS,Ne.APPLET,Ne.AREA,Ne.ARTICLE,Ne.ASIDE,Ne.BASE,Ne.BASEFONT,Ne.BGSOUND,Ne.BLOCKQUOTE,Ne.BODY,Ne.BR,Ne.BUTTON,Ne.CAPTION,Ne.CENTER,Ne.COL,Ne.COLGROUP,Ne.DD,Ne.DETAILS,Ne.DIR,Ne.DIV,Ne.DL,Ne.DT,Ne.EMBED,Ne.FIELDSET,Ne.FIGCAPTION,Ne.FIGURE,Ne.FOOTER,Ne.FORM,Ne.FRAME,Ne.FRAMESET,Ne.H1,Ne.H2,Ne.H3,Ne.H4,Ne.H5,Ne.H6,Ne.HEAD,Ne.HEADER,Ne.HGROUP,Ne.HR,Ne.HTML,Ne.IFRAME,Ne.IMG,Ne.INPUT,Ne.LI,Ne.LINK,Ne.LISTING,Ne.MAIN,Ne.MARQUEE,Ne.MENU,Ne.META,Ne.NAV,Ne.NOEMBED,Ne.NOFRAMES,Ne.NOSCRIPT,Ne.OBJECT,Ne.OL,Ne.P,Ne.PARAM,Ne.PLAINTEXT,Ne.PRE,Ne.SCRIPT,Ne.SECTION,Ne.SELECT,Ne.SOURCE,Ne.STYLE,Ne.SUMMARY,Ne.TABLE,Ne.TBODY,Ne.TD,Ne.TEMPLATE,Ne.TEXTAREA,Ne.TFOOT,Ne.TH,Ne.THEAD,Ne.TITLE,Ne.TR,Ne.TRACK,Ne.UL,Ne.WBR,Ne.XMP]),[ye.MATHML]:new Set([Ne.MI,Ne.MO,Ne.MN,Ne.MS,Ne.MTEXT,Ne.ANNOTATION_XML]),[ye.SVG]:new Set([Ne.TITLE,Ne.FOREIGN_OBJECT,Ne.DESC]),[ye.XLINK]:new Set,[ye.XML]:new Set,[ye.XMLNS]:new Set},Ch=new Set([Ne.H1,Ne.H2,Ne.H3,Ne.H4,Ne.H5,Ne.H6]);re.STYLE,re.SCRIPT,re.XMP,re.IFRAME,re.NOEMBED,re.NOFRAMES,re.PLAINTEXT;var H;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(H||(H={}));const Zt={DATA:H.DATA,RCDATA:H.RCDATA,RAWTEXT:H.RAWTEXT,SCRIPT_DATA:H.SCRIPT_DATA,PLAINTEXT:H.PLAINTEXT,CDATA_SECTION:H.CDATA_SECTION};function p8(e){return e>=U.DIGIT_0&&e<=U.DIGIT_9}function uo(e){return e>=U.LATIN_CAPITAL_A&&e<=U.LATIN_CAPITAL_Z}function g8(e){return e>=U.LATIN_SMALL_A&&e<=U.LATIN_SMALL_Z}function rr(e){return g8(e)||uo(e)}function wE(e){return rr(e)||p8(e)}function gc(e){return e+32}function VT(e){return e===U.SPACE||e===U.LINE_FEED||e===U.TABULATION||e===U.FORM_FEED}function CE(e){return VT(e)||e===U.SOLIDUS||e===U.GREATER_THAN_SIGN}function b8(e){return e===U.NULL?ce.nullCharacterReference:e>1114111?ce.characterReferenceOutsideUnicodeRange:qT(e)?ce.surrogateCharacterReference:GT(e)?ce.noncharacterCharacterReference:YT(e)||e===U.CARRIAGE_RETURN?ce.controlCharacterReference:null}class x8{constructor(t,a){this.options=t,this.handler=a,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=H.DATA,this.returnState=H.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new a8(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new d8(s8,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ce.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ce.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=b8(r);o&&this._err(o,1)}}:void 0)}_err(t,a=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,a,r){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:at.START_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:at.END_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:at.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:at.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;const r=this.currentToken;if(KT(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(a=r.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ce.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=al(t.tagName),t.type===at.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ce.endTagWithAttributes),t.selfClosing&&this._err(ce.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case at.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case at.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case at.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:at.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){const a=VT(t)?at.WHITESPACE_CHARACTER:t===U.NULL?at.NULL_CHARACTER:at.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(at.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=H.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?vs.Attribute:vs.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===H.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===H.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===H.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case H.DATA:{this._stateData(t);break}case H.RCDATA:{this._stateRcdata(t);break}case H.RAWTEXT:{this._stateRawtext(t);break}case H.SCRIPT_DATA:{this._stateScriptData(t);break}case H.PLAINTEXT:{this._statePlaintext(t);break}case H.TAG_OPEN:{this._stateTagOpen(t);break}case H.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case H.TAG_NAME:{this._stateTagName(t);break}case H.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case H.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case H.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case H.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case H.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case H.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case H.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case H.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case H.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case H.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case H.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case H.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case H.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case H.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case H.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case H.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case H.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case H.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case H.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case H.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case H.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case H.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case H.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case H.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case H.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case H.BOGUS_COMMENT:{this._stateBogusComment(t);break}case H.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case H.COMMENT_START:{this._stateCommentStart(t);break}case H.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case H.COMMENT:{this._stateComment(t);break}case H.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case H.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case H.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case H.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case H.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case H.COMMENT_END:{this._stateCommentEnd(t);break}case H.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case H.DOCTYPE:{this._stateDoctype(t);break}case H.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case H.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case H.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case H.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case H.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case H.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case H.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case H.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case H.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case H.CDATA_SECTION:{this._stateCdataSection(t);break}case H.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case H.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case H.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case H.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case U.LESS_THAN_SIGN:{this.state=H.TAG_OPEN;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this._emitCodePoint(t);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case U.AMPERSAND:{this._startCharacterReference();break}case U.LESS_THAN_SIGN:{this.state=H.RCDATA_LESS_THAN_SIGN;break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Ht);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case U.LESS_THAN_SIGN:{this.state=H.RAWTEXT_LESS_THAN_SIGN;break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Ht);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case U.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_LESS_THAN_SIGN;break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Ht);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case U.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Ht);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(rr(t))this._createStartTagToken(),this.state=H.TAG_NAME,this._stateTagName(t);else switch(t){case U.EXCLAMATION_MARK:{this.state=H.MARKUP_DECLARATION_OPEN;break}case U.SOLIDUS:{this.state=H.END_TAG_OPEN;break}case U.QUESTION_MARK:{this._err(ce.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=H.BOGUS_COMMENT,this._stateBogusComment(t);break}case U.EOF:{this._err(ce.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ce.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=H.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(rr(t))this._createEndTagToken(),this.state=H.TAG_NAME,this._stateTagName(t);else switch(t){case U.GREATER_THAN_SIGN:{this._err(ce.missingEndTagName),this.state=H.DATA;break}case U.EOF:{this._err(ce.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ce.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=H.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const a=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=H.BEFORE_ATTRIBUTE_NAME;break}case U.SOLIDUS:{this.state=H.SELF_CLOSING_START_TAG;break}case U.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentTagToken();break}case U.NULL:{this._err(ce.unexpectedNullCharacter),a.tagName+=Ht;break}case U.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(uo(t)?gc(t):t)}}_stateRcdataLessThanSign(t){t===U.SOLIDUS?this.state=H.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=H.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){rr(t)?(this.state=H.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=H.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=H.BEFORE_ATTRIBUTE_NAME,!1;case U.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=H.SELF_CLOSING_START_TAG,!1;case U.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=H.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=H.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===U.SOLIDUS?this.state=H.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=H.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){rr(t)?(this.state=H.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=H.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=H.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case U.SOLIDUS:{this.state=H.SCRIPT_DATA_END_TAG_OPEN;break}case U.EXCLAMATION_MARK:{this.state=H.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=H.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){rr(t)?(this.state=H.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=H.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=H.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===U.HYPHEN_MINUS?(this.state=H.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=H.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===U.HYPHEN_MINUS?(this.state=H.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=H.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case U.HYPHEN_MINUS:{this.state=H.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Ht);break}case U.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case U.HYPHEN_MINUS:{this.state=H.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_ESCAPED,this._emitChars(Ht);break}case U.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=H.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case U.HYPHEN_MINUS:{this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.GREATER_THAN_SIGN:{this.state=H.SCRIPT_DATA,this._emitChars(">");break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_ESCAPED,this._emitChars(Ht);break}case U.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=H.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===U.SOLIDUS?this.state=H.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:rr(t)?(this._emitChars("<"),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){rr(t)?(this.state=H.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(ta.SCRIPT,!1)&&CE(this.preprocessor.peek(ta.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<ta.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case U.HYPHEN_MINUS:{this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Ht);break}case U.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case U.HYPHEN_MINUS:{this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ht);break}case U.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case U.HYPHEN_MINUS:{this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.GREATER_THAN_SIGN:{this.state=H.SCRIPT_DATA,this._emitChars(">");break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ht);break}case U.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===U.SOLIDUS?(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(ta.SCRIPT,!1)&&CE(this.preprocessor.peek(ta.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<ta.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=H.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:{this.state=H.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case U.EQUALS_SIGN:{this._err(ce.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=H.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=H.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:{this._leaveAttrName(),this.state=H.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case U.EQUALS_SIGN:{this._leaveAttrName(),this.state=H.BEFORE_ATTRIBUTE_VALUE;break}case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:{this._err(ce.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.name+=Ht;break}default:this.currentAttr.name+=String.fromCodePoint(uo(t)?gc(t):t)}}_stateAfterAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:{this.state=H.SELF_CLOSING_START_TAG;break}case U.EQUALS_SIGN:{this.state=H.BEFORE_ATTRIBUTE_VALUE;break}case U.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=H.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{this.state=H.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this.state=H.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(ce.missingAttributeValue),this.state=H.DATA,this.emitCurrentTagToken();break}default:this.state=H.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case U.QUOTATION_MARK:{this.state=H.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Ht;break}case U.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case U.APOSTROPHE:{this.state=H.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Ht;break}case U.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this._leaveAttrValue(),this.state=H.BEFORE_ATTRIBUTE_NAME;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=H.DATA,this.emitCurrentTagToken();break}case U.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Ht;break}case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:case U.EQUALS_SIGN:case U.GRAVE_ACCENT:{this._err(ce.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case U.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this._leaveAttrValue(),this.state=H.BEFORE_ATTRIBUTE_NAME;break}case U.SOLIDUS:{this._leaveAttrValue(),this.state=H.SELF_CLOSING_START_TAG;break}case U.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=H.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._err(ce.missingWhitespaceBetweenAttributes),this.state=H.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case U.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=H.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._err(ce.unexpectedSolidusInTag),this.state=H.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentComment(a);break}case U.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case U.NULL:{this._err(ce.unexpectedNullCharacter),a.data+=Ht;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ta.DASH_DASH,!0)?(this._createCommentToken(ta.DASH_DASH.length+1),this.state=H.COMMENT_START):this._consumeSequenceIfMatch(ta.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ta.DOCTYPE.length+1),this.state=H.DOCTYPE):this._consumeSequenceIfMatch(ta.CDATA_START,!0)?this.inForeignNode?this.state=H.CDATA_SECTION:(this._err(ce.cdataInHtmlContent),this._createCommentToken(ta.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=H.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ce.incorrectlyOpenedComment),this._createCommentToken(2),this.state=H.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case U.HYPHEN_MINUS:{this.state=H.COMMENT_START_DASH;break}case U.GREATER_THAN_SIGN:{this._err(ce.abruptClosingOfEmptyComment),this.state=H.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=H.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=H.COMMENT_END;break}case U.GREATER_THAN_SIGN:{this._err(ce.abruptClosingOfEmptyComment),this.state=H.DATA,this.emitCurrentComment(a);break}case U.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=H.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=H.COMMENT_END_DASH;break}case U.LESS_THAN_SIGN:{a.data+="<",this.state=H.COMMENT_LESS_THAN_SIGN;break}case U.NULL:{this._err(ce.unexpectedNullCharacter),a.data+=Ht;break}case U.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const a=this.currentToken;switch(t){case U.EXCLAMATION_MARK:{a.data+="!",this.state=H.COMMENT_LESS_THAN_SIGN_BANG;break}case U.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=H.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===U.HYPHEN_MINUS?this.state=H.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=H.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===U.HYPHEN_MINUS?this.state=H.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=H.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==U.GREATER_THAN_SIGN&&t!==U.EOF&&this._err(ce.nestedComment),this.state=H.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=H.COMMENT_END;break}case U.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=H.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentComment(a);break}case U.EXCLAMATION_MARK:{this.state=H.COMMENT_END_BANG;break}case U.HYPHEN_MINUS:{a.data+="-";break}case U.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=H.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case U.HYPHEN_MINUS:{a.data+="--!",this.state=H.COMMENT_END_DASH;break}case U.GREATER_THAN_SIGN:{this._err(ce.incorrectlyClosedComment),this.state=H.DATA,this.emitCurrentComment(a);break}case U.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=H.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=H.BEFORE_DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this.state=H.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case U.EOF:{this._err(ce.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingWhitespaceBeforeDoctypeName),this.state=H.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(uo(t))this._createDoctypeToken(String.fromCharCode(gc(t))),this.state=H.DOCTYPE_NAME;else switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.NULL:{this._err(ce.unexpectedNullCharacter),this._createDoctypeToken(Ht),this.state=H.DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=H.DATA;break}case U.EOF:{this._err(ce.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=H.DOCTYPE_NAME}}_stateDoctypeName(t){const a=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=H.AFTER_DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentDoctype(a);break}case U.NULL:{this._err(ce.unexpectedNullCharacter),a.name+=Ht;break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(uo(t)?gc(t):t)}}_stateAfterDoctypeName(t){const a=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentDoctype(a);break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ta.PUBLIC,!1)?this.state=H.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ta.SYSTEM,!1)?this.state=H.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ce.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const a=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=H.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.QUOTATION_MARK:{this._err(ce.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(ce.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(ce.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(a);break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{a.publicId="",this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{a.publicId="",this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(ce.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(a);break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case U.QUOTATION_MARK:{this.state=H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.NULL:{this._err(ce.unexpectedNullCharacter),a.publicId+=Ht;break}case U.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=H.DATA;break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case U.APOSTROPHE:{this.state=H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.NULL:{this._err(ce.unexpectedNullCharacter),a.publicId+=Ht;break}case U.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=H.DATA;break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=H.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case U.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentDoctype(a);break}case U.QUOTATION_MARK:{this._err(ce.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(ce.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const a=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=H.DATA;break}case U.QUOTATION_MARK:{a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const a=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=H.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.QUOTATION_MARK:{this._err(ce.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(ce.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(a);break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(a);break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case U.QUOTATION_MARK:{this.state=H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.NULL:{this._err(ce.unexpectedNullCharacter),a.systemId+=Ht;break}case U.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=H.DATA;break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case U.APOSTROPHE:{this.state=H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.NULL:{this._err(ce.unexpectedNullCharacter),a.systemId+=Ht;break}case U.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=H.DATA;break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=H.DATA;break}case U.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=H.DATA;break}case U.NULL:{this._err(ce.unexpectedNullCharacter);break}case U.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case U.RIGHT_SQUARE_BRACKET:{this.state=H.CDATA_SECTION_BRACKET;break}case U.EOF:{this._err(ce.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===U.RIGHT_SQUARE_BRACKET?this.state=H.CDATA_SECTION_END:(this._emitChars("]"),this.state=H.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case U.GREATER_THAN_SIGN:{this.state=H.DATA;break}case U.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=H.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(U.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&wE(this.preprocessor.peek(1))?H.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){wE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===U.SEMICOLON&&this._err(ce.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const XT=new Set([E.DD,E.DT,E.LI,E.OPTGROUP,E.OPTION,E.P,E.RB,E.RP,E.RT,E.RTC]),kE=new Set([...XT,E.CAPTION,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]),Hc=new Set([E.APPLET,E.CAPTION,E.HTML,E.MARQUEE,E.OBJECT,E.TABLE,E.TD,E.TEMPLATE,E.TH]),E8=new Set([...Hc,E.OL,E.UL]),y8=new Set([...Hc,E.BUTTON]),RE=new Set([E.ANNOTATION_XML,E.MI,E.MN,E.MO,E.MS,E.MTEXT]),OE=new Set([E.DESC,E.FOREIGN_OBJECT,E.TITLE]),N8=new Set([E.TR,E.TEMPLATE,E.HTML]),T8=new Set([E.TBODY,E.TFOOT,E.THEAD,E.TEMPLATE,E.HTML]),_8=new Set([E.TABLE,E.TEMPLATE,E.HTML]),v8=new Set([E.TD,E.TH]);class S8{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,r){this.treeAdapter=a,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=E.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===E.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ye.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,a){const r=this._indexOf(t);this.items[r]=a,r===this.stackTop&&(this.current=a)}insertAfter(t,a,r){const o=this._indexOf(t)+1;this.items.splice(o,0,a),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==ye.HTML);this.shortenToLength(Math.max(a,0))}shortenToLength(t){for(;this.stackTop>=t;){const a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){const a=this._indexOf(t);this.shortenToLength(Math.max(a,0))}popUntilPopped(t,a){const r=this._indexOfTagNames(t,a);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ch,ye.HTML)}popUntilTableCellPopped(){this.popUntilPopped(v8,ye.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===a)return r;return-1}clearBackTo(t,a){const r=this._indexOfTagNames(t,a);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(_8,ye.HTML)}clearBackToTableBodyContext(){this.clearBackTo(T8,ye.HTML)}clearBackToTableRowContext(){this.clearBackTo(N8,ye.HTML)}remove(t){const a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===E.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===E.HTML}hasInDynamicScope(t,a){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ye.HTML:{if(o===t)return!0;if(a.has(o))return!1;break}case ye.SVG:{if(OE.has(o))return!1;break}case ye.MATHML:{if(RE.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Hc)}hasInListItemScope(t){return this.hasInDynamicScope(t,E8)}hasInButtonScope(t){return this.hasInDynamicScope(t,y8)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ye.HTML:{if(Ch.has(a))return!0;if(Hc.has(a))return!1;break}case ye.SVG:{if(OE.has(a))return!1;break}case ye.MATHML:{if(RE.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===ye.HTML)switch(this.tagIDs[a]){case t:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ye.HTML)switch(this.tagIDs[t]){case E.TBODY:case E.THEAD:case E.TFOOT:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===ye.HTML)switch(this.tagIDs[a]){case t:return!0;case E.OPTION:case E.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&XT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&kE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&kE.has(this.currentTagId);)this.pop()}}const Jm=3;var Ja;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ja||(Ja={}));const IE={type:Ja.Marker};class A8{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const r=[],o=a.length,u=this.treeAdapter.getTagName(t),c=this.treeAdapter.getNamespaceURI(t);for(let f=0;f<this.entries.length;f++){const m=this.entries[f];if(m.type===Ja.Marker)break;const{element:h}=m;if(this.treeAdapter.getTagName(h)===u&&this.treeAdapter.getNamespaceURI(h)===c){const b=this.treeAdapter.getAttrList(h);b.length===o&&r.push({idx:f,attrs:b})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Jm)return;const a=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,a);if(r.length<Jm)return;const o=new Map(a.map(c=>[c.name,c.value]));let u=0;for(let c=0;c<r.length;c++){const f=r[c];f.attrs.every(m=>o.get(m.name)===m.value)&&(u+=1,u>=Jm&&this.entries.splice(f.idx,1))}}insertMarker(){this.entries.unshift(IE)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ja.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ja.Element,element:t,token:a})}removeEntry(t){const a=this.entries.indexOf(t);a!==-1&&this.entries.splice(a,1)}clearToLastMarker(){const t=this.entries.indexOf(IE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const a=this.entries.find(r=>r.type===Ja.Marker||this.treeAdapter.getTagName(r.element)===t);return a&&a.type===Ja.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===Ja.Element&&a.element===t)}}const ir={createDocument(){return{nodeName:"#document",mode:Oa.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){const r=e.childNodes.indexOf(a);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,r){const o=e.childNodes.find(u=>u.nodeName==="#documentType");if(o)o.name=t,o.publicId=a,o.systemId=r;else{const u={nodeName:"#documentType",name:t,publicId:a,systemId:r,parentNode:null};ir.appendChild(e,u)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const a=e.childNodes[e.childNodes.length-1];if(ir.isTextNode(a)){a.value+=t;return}}ir.appendChild(e,ir.createTextNode(t))},insertTextBefore(e,t,a){const r=e.childNodes[e.childNodes.indexOf(a)-1];r&&ir.isTextNode(r)?r.value+=t:ir.insertBefore(e,ir.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)a.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},QT="html",w8="about:legacy-compat",C8="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",WT=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],k8=[...WT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],R8=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ZT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],O8=[...ZT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ME(e,t){return t.some(a=>e.startsWith(a))}function I8(e){return e.name===QT&&e.publicId===null&&(e.systemId===null||e.systemId===w8)}function M8(e){if(e.name!==QT)return Oa.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===C8)return Oa.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),R8.has(a))return Oa.QUIRKS;let r=t===null?k8:WT;if(ME(a,r))return Oa.QUIRKS;if(r=t===null?ZT:O8,ME(a,r))return Oa.LIMITED_QUIRKS}return Oa.NO_QUIRKS}const LE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},L8="definitionurl",D8="definitionURL",j8=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),B8=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ye.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ye.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ye.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ye.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ye.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ye.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ye.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ye.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ye.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ye.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ye.XMLNS}]]),P8=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),U8=new Set([E.B,E.BIG,E.BLOCKQUOTE,E.BODY,E.BR,E.CENTER,E.CODE,E.DD,E.DIV,E.DL,E.DT,E.EM,E.EMBED,E.H1,E.H2,E.H3,E.H4,E.H5,E.H6,E.HEAD,E.HR,E.I,E.IMG,E.LI,E.LISTING,E.MENU,E.META,E.NOBR,E.OL,E.P,E.PRE,E.RUBY,E.S,E.SMALL,E.SPAN,E.STRONG,E.STRIKE,E.SUB,E.SUP,E.TABLE,E.TT,E.U,E.UL,E.VAR]);function H8(e){const t=e.tagID;return t===E.FONT&&e.attrs.some(({name:r})=>r===Fr.COLOR||r===Fr.SIZE||r===Fr.FACE)||U8.has(t)}function JT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===L8){e.attrs[t].name=D8;break}}function e_(e){for(let t=0;t<e.attrs.length;t++){const a=j8.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function Tp(e){for(let t=0;t<e.attrs.length;t++){const a=B8.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function F8(e){const t=P8.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=al(e.tagName))}function z8(e,t){return t===ye.MATHML&&(e===E.MI||e===E.MO||e===E.MN||e===E.MS||e===E.MTEXT)}function $8(e,t,a){if(t===ye.MATHML&&e===E.ANNOTATION_XML){for(let r=0;r<a.length;r++)if(a[r].name===Fr.ENCODING){const o=a[r].value.toLowerCase();return o===LE.TEXT_HTML||o===LE.APPLICATION_XML}}return t===ye.SVG&&(e===E.FOREIGN_OBJECT||e===E.DESC||e===E.TITLE)}function q8(e,t,a,r){return(!r||r===ye.HTML)&&$8(e,t,a)||(!r||r===ye.MATHML)&&z8(e,t)}const Y8="hidden",G8=8,K8=3;var Y;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(Y||(Y={}));const V8={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},t_=new Set([E.TABLE,E.TBODY,E.TFOOT,E.THEAD,E.TR]),DE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ir,onParseError:null};class jE{constructor(t,a,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=Y.INITIAL,this.originalInsertionMode=Y.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...DE,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new x8(this.options,this),this.activeFormattingElements=new A8(this.treeAdapter),this.fragmentContextID=r?al(this.treeAdapter.getTagName(r)):E.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new S8(this.document,this.treeAdapter,this)}static parse(t,a){const r=new this(a);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,a){const r={...DE,...a};t??(t=r.treeAdapter.createElement(re.TEMPLATE,ye.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ye.HTML,[]),u=new this(r,o,t);return u.fragmentContextID===E.TEMPLATE&&u.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,r){var o;if(!this.onParseError)return;const u=(o=t.location)!==null&&o!==void 0?o:V8,c={code:a,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:r?u.startLine:u.endLine,endCol:r?u.startCol:u.endCol,endOffset:r?u.startOffset:u.endOffset};this.onParseError(c)}onItemPush(t,a,r){var o,u;(u=(o=this.treeAdapter).onItemPush)===null||u===void 0||u.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),a){let u,c;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,c=this.fragmentContextID):{current:u,currentTagId:c}=this.openElements,this._setContextModes(u,c)}}_setContextModes(t,a){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ye.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&a!==void 0&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,ye.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=Y.TEXT}switchToPlaintextParsing(){this.insertionMode=Y.TEXT,this.originalInsertionMode=Y.IN_BODY,this.tokenizer.state=Zt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===re.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ye.HTML))switch(this.fragmentContextID){case E.TITLE:case E.TEXTAREA:{this.tokenizer.state=Zt.RCDATA;break}case E.STYLE:case E.XMP:case E.IFRAME:case E.NOEMBED:case E.NOFRAMES:case E.NOSCRIPT:{this.tokenizer.state=Zt.RAWTEXT;break}case E.SCRIPT:{this.tokenizer.state=Zt.SCRIPT_DATA;break}case E.PLAINTEXT:{this.tokenizer.state=Zt.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,r,o),t.location){const c=this.treeAdapter.getChildNodes(this.document).find(f=>this.treeAdapter.isDocumentTypeNode(f));c&&this.treeAdapter.setNodeSourceCodeLocation(c,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const r=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,a){const r=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,a){const r=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,a){const r=this.treeAdapter.createElement(t,ye.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,ye.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,r),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(re.HTML,ye.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,E.HTML)}_appendCommentNode(t,a){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let a,r;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(a,t.chars,r):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(a),u=r?o.lastIndexOf(r):o.length,c=o[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(c)){const{endLine:m,endCol:h,endOffset:b}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(c,{endLine:m,endCol:h,endOffset:b})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(c,t.location)}_adoptNodes(t,a){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(a,r)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const r=a.location,o=this.treeAdapter.getTagName(t),u=a.type===at.END_TAG&&o===a.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,r;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,r=this.fragmentContextID):{current:a,currentTagId:r}=this.openElements,t.tagID===E.SVG&&this.treeAdapter.getTagName(a)===re.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===ye.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===E.MGLYPH||t.tagID===E.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,a,ye.HTML)}_processToken(t){switch(t.type){case at.CHARACTER:{this.onCharacter(t);break}case at.NULL_CHARACTER:{this.onNullCharacter(t);break}case at.COMMENT:{this.onComment(t);break}case at.DOCTYPE:{this.onDoctype(t);break}case at.START_TAG:{this._processStartTag(t);break}case at.END_TAG:{this.onEndTag(t);break}case at.EOF:{this.onEof(t);break}case at.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,r){const o=this.treeAdapter.getNamespaceURI(a),u=this.treeAdapter.getAttrList(a);return q8(t,o,u,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(o=>o.type===Ja.Marker||this.openElements.contains(o.element)),r=a===-1?t-1:a-1;for(let o=r;o>=0;o--){const u=this.activeFormattingElements.entries[o];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(E.P),this.openElements.popUntilTagNamePopped(E.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case E.TR:{this.insertionMode=Y.IN_ROW;return}case E.TBODY:case E.THEAD:case E.TFOOT:{this.insertionMode=Y.IN_TABLE_BODY;return}case E.CAPTION:{this.insertionMode=Y.IN_CAPTION;return}case E.COLGROUP:{this.insertionMode=Y.IN_COLUMN_GROUP;return}case E.TABLE:{this.insertionMode=Y.IN_TABLE;return}case E.BODY:{this.insertionMode=Y.IN_BODY;return}case E.FRAMESET:{this.insertionMode=Y.IN_FRAMESET;return}case E.SELECT:{this._resetInsertionModeForSelect(t);return}case E.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case E.HTML:{this.insertionMode=this.headElement?Y.AFTER_HEAD:Y.BEFORE_HEAD;return}case E.TD:case E.TH:{if(t>0){this.insertionMode=Y.IN_CELL;return}break}case E.HEAD:{if(t>0){this.insertionMode=Y.IN_HEAD;return}break}}this.insertionMode=Y.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const r=this.openElements.tagIDs[a];if(r===E.TEMPLATE)break;if(r===E.TABLE){this.insertionMode=Y.IN_SELECT_IN_TABLE;return}}this.insertionMode=Y.IN_SELECT}_isElementCausesFosterParenting(t){return t_.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case E.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===ye.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case E.TABLE:{const r=this.treeAdapter.getParentNode(a);return r?{parent:r,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){const r=this.treeAdapter.getNamespaceURI(t);return h8[r].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){vB(this,t);return}switch(this.insertionMode){case Y.INITIAL:{io(this,t);break}case Y.BEFORE_HTML:{ho(this,t);break}case Y.BEFORE_HEAD:{po(this,t);break}case Y.IN_HEAD:{go(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{bo(this,t);break}case Y.AFTER_HEAD:{xo(this,t);break}case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:{a_(this,t);break}case Y.TEXT:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{eh(this,t);break}case Y.IN_TABLE_TEXT:{u_(this,t);break}case Y.IN_COLUMN_GROUP:{Fc(this,t);break}case Y.AFTER_BODY:{zc(this,t);break}case Y.AFTER_AFTER_BODY:{_c(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){_B(this,t);return}switch(this.insertionMode){case Y.INITIAL:{io(this,t);break}case Y.BEFORE_HTML:{ho(this,t);break}case Y.BEFORE_HEAD:{po(this,t);break}case Y.IN_HEAD:{go(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{bo(this,t);break}case Y.AFTER_HEAD:{xo(this,t);break}case Y.TEXT:{this._insertCharacters(t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{eh(this,t);break}case Y.IN_COLUMN_GROUP:{Fc(this,t);break}case Y.AFTER_BODY:{zc(this,t);break}case Y.AFTER_AFTER_BODY:{_c(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){kh(this,t);return}switch(this.insertionMode){case Y.INITIAL:case Y.BEFORE_HTML:case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_TEMPLATE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:{kh(this,t);break}case Y.IN_TABLE_TEXT:{lo(this,t);break}case Y.AFTER_BODY:{t9(this,t);break}case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{n9(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case Y.INITIAL:{a9(this,t);break}case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:{this._err(t,ce.misplacedDoctype);break}case Y.IN_TABLE_TEXT:{lo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ce.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?SB(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case Y.INITIAL:{io(this,t);break}case Y.BEFORE_HTML:{s9(this,t);break}case Y.BEFORE_HEAD:{i9(this,t);break}case Y.IN_HEAD:{za(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{u9(this,t);break}case Y.AFTER_HEAD:{d9(this,t);break}case Y.IN_BODY:{Ln(this,t);break}case Y.IN_TABLE:{Xi(this,t);break}case Y.IN_TABLE_TEXT:{lo(this,t);break}case Y.IN_CAPTION:{lB(this,t);break}case Y.IN_COLUMN_GROUP:{Sp(this,t);break}case Y.IN_TABLE_BODY:{ud(this,t);break}case Y.IN_ROW:{cd(this,t);break}case Y.IN_CELL:{cB(this,t);break}case Y.IN_SELECT:{f_(this,t);break}case Y.IN_SELECT_IN_TABLE:{fB(this,t);break}case Y.IN_TEMPLATE:{hB(this,t);break}case Y.AFTER_BODY:{gB(this,t);break}case Y.IN_FRAMESET:{bB(this,t);break}case Y.AFTER_FRAMESET:{EB(this,t);break}case Y.AFTER_AFTER_BODY:{NB(this,t);break}case Y.AFTER_AFTER_FRAMESET:{TB(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?AB(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case Y.INITIAL:{io(this,t);break}case Y.BEFORE_HTML:{r9(this,t);break}case Y.BEFORE_HEAD:{l9(this,t);break}case Y.IN_HEAD:{o9(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{c9(this,t);break}case Y.AFTER_HEAD:{f9(this,t);break}case Y.IN_BODY:{od(this,t);break}case Y.TEXT:{W9(this,t);break}case Y.IN_TABLE:{Co(this,t);break}case Y.IN_TABLE_TEXT:{lo(this,t);break}case Y.IN_CAPTION:{oB(this,t);break}case Y.IN_COLUMN_GROUP:{uB(this,t);break}case Y.IN_TABLE_BODY:{Rh(this,t);break}case Y.IN_ROW:{d_(this,t);break}case Y.IN_CELL:{dB(this,t);break}case Y.IN_SELECT:{m_(this,t);break}case Y.IN_SELECT_IN_TABLE:{mB(this,t);break}case Y.IN_TEMPLATE:{pB(this,t);break}case Y.AFTER_BODY:{p_(this,t);break}case Y.IN_FRAMESET:{xB(this,t);break}case Y.AFTER_FRAMESET:{yB(this,t);break}case Y.AFTER_AFTER_BODY:{_c(this,t);break}}}onEof(t){switch(this.insertionMode){case Y.INITIAL:{io(this,t);break}case Y.BEFORE_HTML:{ho(this,t);break}case Y.BEFORE_HEAD:{po(this,t);break}case Y.IN_HEAD:{go(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{bo(this,t);break}case Y.AFTER_HEAD:{xo(this,t);break}case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:{l_(this,t);break}case Y.TEXT:{Z9(this,t);break}case Y.IN_TABLE_TEXT:{lo(this,t);break}case Y.IN_TEMPLATE:{h_(this,t);break}case Y.AFTER_BODY:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{vp(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===U.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.TEXT:case Y.IN_COLUMN_GROUP:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:{this._insertCharacters(t);break}case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:case Y.AFTER_BODY:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{n_(this,t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{eh(this,t);break}case Y.IN_TABLE_TEXT:{o_(this,t);break}}}}function X8(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):i_(e,t),a}function Q8(e,t){let a=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(a=o)}return a||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),a}function W8(e,t,a){let r=t,o=e.openElements.getCommonAncestor(t);for(let u=0,c=o;c!==a;u++,c=o){o=e.openElements.getCommonAncestor(c);const f=e.activeFormattingElements.getElementEntry(c),m=f&&u>=K8;!f||m?(m&&e.activeFormattingElements.removeEntry(f),e.openElements.remove(c)):(c=Z8(e,f),r===t&&(e.activeFormattingElements.bookmark=f),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(c,r),r=c)}return r}function Z8(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function J8(e,t,a){const r=e.treeAdapter.getTagName(t),o=al(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(a);else{const u=e.treeAdapter.getNamespaceURI(t);o===E.TEMPLATE&&u===ye.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function e9(e,t,a){const r=e.treeAdapter.getNamespaceURI(a.element),{token:o}=a,u=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,o),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,u,o.tagID)}function _p(e,t){for(let a=0;a<G8;a++){const r=X8(e,t);if(!r)break;const o=Q8(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const u=W8(e,o,r.element),c=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(u),c&&J8(e,c,u),e9(e,o,r)}}function kh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function t9(e,t){e._appendCommentNode(t,e.openElements.items[0])}function n9(e,t){e._appendCommentNode(t,e.document)}function vp(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=a;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],c=e.treeAdapter.getNodeSourceCodeLocation(u);c&&!c.endTag&&e._setEndLocation(u,t)}}}}function a9(e,t){e._setDocumentType(t);const a=t.forceQuirks?Oa.QUIRKS:M8(t);I8(t)||e._err(t,ce.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=Y.BEFORE_HTML}function io(e,t){e._err(t,ce.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Oa.QUIRKS),e.insertionMode=Y.BEFORE_HTML,e._processToken(t)}function s9(e,t){t.tagID===E.HTML?(e._insertElement(t,ye.HTML),e.insertionMode=Y.BEFORE_HEAD):ho(e,t)}function r9(e,t){const a=t.tagID;(a===E.HTML||a===E.HEAD||a===E.BODY||a===E.BR)&&ho(e,t)}function ho(e,t){e._insertFakeRootElement(),e.insertionMode=Y.BEFORE_HEAD,e._processToken(t)}function i9(e,t){switch(t.tagID){case E.HTML:{Ln(e,t);break}case E.HEAD:{e._insertElement(t,ye.HTML),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD;break}default:po(e,t)}}function l9(e,t){const a=t.tagID;a===E.HEAD||a===E.BODY||a===E.HTML||a===E.BR?po(e,t):e._err(t,ce.endTagWithoutMatchingOpenElement)}function po(e,t){e._insertFakeElement(re.HEAD,E.HEAD),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD,e._processToken(t)}function za(e,t){switch(t.tagID){case E.HTML:{Ln(e,t);break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:{e._appendElement(t,ye.HTML),t.ackSelfClosing=!0;break}case E.TITLE:{e._switchToTextParsing(t,Zt.RCDATA);break}case E.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Zt.RAWTEXT):(e._insertElement(t,ye.HTML),e.insertionMode=Y.IN_HEAD_NO_SCRIPT);break}case E.NOFRAMES:case E.STYLE:{e._switchToTextParsing(t,Zt.RAWTEXT);break}case E.SCRIPT:{e._switchToTextParsing(t,Zt.SCRIPT_DATA);break}case E.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Y.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE);break}case E.HEAD:{e._err(t,ce.misplacedStartTagForHeadElement);break}default:go(e,t)}}function o9(e,t){switch(t.tagID){case E.HEAD:{e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD;break}case E.BODY:case E.BR:case E.HTML:{go(e,t);break}case E.TEMPLATE:{Zr(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function Zr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==E.TEMPLATE&&e._err(t,ce.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ce.endTagWithoutMatchingOpenElement)}function go(e,t){e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD,e._processToken(t)}function u9(e,t){switch(t.tagID){case E.HTML:{Ln(e,t);break}case E.BASEFONT:case E.BGSOUND:case E.HEAD:case E.LINK:case E.META:case E.NOFRAMES:case E.STYLE:{za(e,t);break}case E.NOSCRIPT:{e._err(t,ce.nestedNoscriptInHead);break}default:bo(e,t)}}function c9(e,t){switch(t.tagID){case E.NOSCRIPT:{e.openElements.pop(),e.insertionMode=Y.IN_HEAD;break}case E.BR:{bo(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function bo(e,t){const a=t.type===at.EOF?ce.openElementsLeftAfterEof:ce.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=Y.IN_HEAD,e._processToken(t)}function d9(e,t){switch(t.tagID){case E.HTML:{Ln(e,t);break}case E.BODY:{e._insertElement(t,ye.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_BODY;break}case E.FRAMESET:{e._insertElement(t,ye.HTML),e.insertionMode=Y.IN_FRAMESET;break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{e._err(t,ce.abandonedHeadElementChild),e.openElements.push(e.headElement,E.HEAD),za(e,t),e.openElements.remove(e.headElement);break}case E.HEAD:{e._err(t,ce.misplacedStartTagForHeadElement);break}default:xo(e,t)}}function f9(e,t){switch(t.tagID){case E.BODY:case E.HTML:case E.BR:{xo(e,t);break}case E.TEMPLATE:{Zr(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function xo(e,t){e._insertFakeElement(re.BODY,E.BODY),e.insertionMode=Y.IN_BODY,ld(e,t)}function ld(e,t){switch(t.type){case at.CHARACTER:{a_(e,t);break}case at.WHITESPACE_CHARACTER:{n_(e,t);break}case at.COMMENT:{kh(e,t);break}case at.START_TAG:{Ln(e,t);break}case at.END_TAG:{od(e,t);break}case at.EOF:{l_(e,t);break}}}function n_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function a_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function m9(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function h9(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function p9(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ye.HTML),e.insertionMode=Y.IN_FRAMESET)}function g9(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ye.HTML)}function b9(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ch.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ye.HTML)}function x9(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ye.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function E9(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ye.HTML),a||(e.formElement=e.openElements.current))}function y9(e,t){e.framesetOk=!1;const a=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(a===E.LI&&o===E.LI||(a===E.DD||a===E.DT)&&(o===E.DD||o===E.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==E.ADDRESS&&o!==E.DIV&&o!==E.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ye.HTML)}function N9(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ye.HTML),e.tokenizer.state=Zt.PLAINTEXT}function T9(e,t){e.openElements.hasInScope(E.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML),e.framesetOk=!1}function _9(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(re.A);a&&(_p(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function v9(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function S9(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(E.NOBR)&&(_p(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ye.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function A9(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function w9(e,t){e.treeAdapter.getDocumentMode(e.document)!==Oa.QUIRKS&&e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ye.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_TABLE}function s_(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ye.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function r_(e){const t=KT(e,Fr.TYPE);return t!=null&&t.toLowerCase()===Y8}function C9(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ye.HTML),r_(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function k9(e,t){e._appendElement(t,ye.HTML),t.ackSelfClosing=!0}function R9(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._appendElement(t,ye.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function O9(e,t){t.tagName=re.IMG,t.tagID=E.IMG,s_(e,t)}function I9(e,t){e._insertElement(t,ye.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Zt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Y.TEXT}function M9(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Zt.RAWTEXT)}function L9(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Zt.RAWTEXT)}function BE(e,t){e._switchToTextParsing(t,Zt.RAWTEXT)}function D9(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Y.IN_TABLE||e.insertionMode===Y.IN_CAPTION||e.insertionMode===Y.IN_TABLE_BODY||e.insertionMode===Y.IN_ROW||e.insertionMode===Y.IN_CELL?Y.IN_SELECT_IN_TABLE:Y.IN_SELECT}function j9(e,t){e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML)}function B9(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ye.HTML)}function P9(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(E.RTC),e._insertElement(t,ye.HTML)}function U9(e,t){e._reconstructActiveFormattingElements(),JT(t),Tp(t),t.selfClosing?e._appendElement(t,ye.MATHML):e._insertElement(t,ye.MATHML),t.ackSelfClosing=!0}function H9(e,t){e._reconstructActiveFormattingElements(),e_(t),Tp(t),t.selfClosing?e._appendElement(t,ye.SVG):e._insertElement(t,ye.SVG),t.ackSelfClosing=!0}function PE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML)}function Ln(e,t){switch(t.tagID){case E.I:case E.S:case E.B:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.SMALL:case E.STRIKE:case E.STRONG:{v9(e,t);break}case E.A:{_9(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{b9(e,t);break}case E.P:case E.DL:case E.OL:case E.UL:case E.DIV:case E.DIR:case E.NAV:case E.MAIN:case E.MENU:case E.ASIDE:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.DETAILS:case E.ADDRESS:case E.ARTICLE:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{g9(e,t);break}case E.LI:case E.DD:case E.DT:{y9(e,t);break}case E.BR:case E.IMG:case E.WBR:case E.AREA:case E.EMBED:case E.KEYGEN:{s_(e,t);break}case E.HR:{R9(e,t);break}case E.RB:case E.RTC:{B9(e,t);break}case E.RT:case E.RP:{P9(e,t);break}case E.PRE:case E.LISTING:{x9(e,t);break}case E.XMP:{M9(e,t);break}case E.SVG:{H9(e,t);break}case E.HTML:{m9(e,t);break}case E.BASE:case E.LINK:case E.META:case E.STYLE:case E.TITLE:case E.SCRIPT:case E.BGSOUND:case E.BASEFONT:case E.TEMPLATE:{za(e,t);break}case E.BODY:{h9(e,t);break}case E.FORM:{E9(e,t);break}case E.NOBR:{S9(e,t);break}case E.MATH:{U9(e,t);break}case E.TABLE:{w9(e,t);break}case E.INPUT:{C9(e,t);break}case E.PARAM:case E.TRACK:case E.SOURCE:{k9(e,t);break}case E.IMAGE:{O9(e,t);break}case E.BUTTON:{T9(e,t);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{A9(e,t);break}case E.IFRAME:{L9(e,t);break}case E.SELECT:{D9(e,t);break}case E.OPTION:case E.OPTGROUP:{j9(e,t);break}case E.NOEMBED:case E.NOFRAMES:{BE(e,t);break}case E.FRAMESET:{p9(e,t);break}case E.TEXTAREA:{I9(e,t);break}case E.NOSCRIPT:{e.options.scriptingEnabled?BE(e,t):PE(e,t);break}case E.PLAINTEXT:{N9(e,t);break}case E.COL:case E.TH:case E.TD:case E.TR:case E.HEAD:case E.FRAME:case E.TBODY:case E.TFOOT:case E.THEAD:case E.CAPTION:case E.COLGROUP:break;default:PE(e,t)}}function F9(e,t){if(e.openElements.hasInScope(E.BODY)&&(e.insertionMode=Y.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function z9(e,t){e.openElements.hasInScope(E.BODY)&&(e.insertionMode=Y.AFTER_BODY,p_(e,t))}function $9(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function q9(e){const t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(E.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(E.FORM):a&&e.openElements.remove(a))}function Y9(e){e.openElements.hasInButtonScope(E.P)||e._insertFakeElement(re.P,E.P),e._closePElement()}function G9(e){e.openElements.hasInListItemScope(E.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(E.LI),e.openElements.popUntilTagNamePopped(E.LI))}function K9(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function V9(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function X9(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function Q9(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(re.BR,E.BR),e.openElements.pop(),e.framesetOk=!1}function i_(e,t){const a=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const u=e.openElements.items[o],c=e.openElements.tagIDs[o];if(r===c&&(r!==E.UNKNOWN||e.treeAdapter.getTagName(u)===a)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(u,c))break}}function od(e,t){switch(t.tagID){case E.A:case E.B:case E.I:case E.S:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.NOBR:case E.SMALL:case E.STRIKE:case E.STRONG:{_p(e,t);break}case E.P:{Y9(e);break}case E.DL:case E.UL:case E.OL:case E.DIR:case E.DIV:case E.NAV:case E.PRE:case E.MAIN:case E.MENU:case E.ASIDE:case E.BUTTON:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.ADDRESS:case E.ARTICLE:case E.DETAILS:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.LISTING:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{$9(e,t);break}case E.LI:{G9(e);break}case E.DD:case E.DT:{K9(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{V9(e);break}case E.BR:{Q9(e);break}case E.BODY:{F9(e,t);break}case E.HTML:{z9(e,t);break}case E.FORM:{q9(e);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{X9(e,t);break}case E.TEMPLATE:{Zr(e,t);break}default:i_(e,t)}}function l_(e,t){e.tmplInsertionModeStack.length>0?h_(e,t):vp(e,t)}function W9(e,t){var a;t.tagID===E.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Z9(e,t){e._err(t,ce.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function eh(e,t){if(e.openElements.currentTagId!==void 0&&t_.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Y.IN_TABLE_TEXT,t.type){case at.CHARACTER:{u_(e,t);break}case at.WHITESPACE_CHARACTER:{o_(e,t);break}}else Fo(e,t)}function J9(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ye.HTML),e.insertionMode=Y.IN_CAPTION}function eB(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ye.HTML),e.insertionMode=Y.IN_COLUMN_GROUP}function tB(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(re.COLGROUP,E.COLGROUP),e.insertionMode=Y.IN_COLUMN_GROUP,Sp(e,t)}function nB(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ye.HTML),e.insertionMode=Y.IN_TABLE_BODY}function aB(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(re.TBODY,E.TBODY),e.insertionMode=Y.IN_TABLE_BODY,ud(e,t)}function sB(e,t){e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function rB(e,t){r_(t)?e._appendElement(t,ye.HTML):Fo(e,t),t.ackSelfClosing=!0}function iB(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ye.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Xi(e,t){switch(t.tagID){case E.TD:case E.TH:case E.TR:{aB(e,t);break}case E.STYLE:case E.SCRIPT:case E.TEMPLATE:{za(e,t);break}case E.COL:{tB(e,t);break}case E.FORM:{iB(e,t);break}case E.TABLE:{sB(e,t);break}case E.TBODY:case E.TFOOT:case E.THEAD:{nB(e,t);break}case E.INPUT:{rB(e,t);break}case E.CAPTION:{J9(e,t);break}case E.COLGROUP:{eB(e,t);break}default:Fo(e,t)}}function Co(e,t){switch(t.tagID){case E.TABLE:{e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode());break}case E.TEMPLATE:{Zr(e,t);break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:Fo(e,t)}}function Fo(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ld(e,t),e.fosterParentingEnabled=a}function o_(e,t){e.pendingCharacterTokens.push(t)}function u_(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function lo(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Fo(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const c_=new Set([E.CAPTION,E.COL,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]);function lB(e,t){const a=t.tagID;c_.has(a)?e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,Xi(e,t)):Ln(e,t)}function oB(e,t){const a=t.tagID;switch(a){case E.CAPTION:case E.TABLE:{e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,a===E.TABLE&&Co(e,t));break}case E.BODY:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:od(e,t)}}function Sp(e,t){switch(t.tagID){case E.HTML:{Ln(e,t);break}case E.COL:{e._appendElement(t,ye.HTML),t.ackSelfClosing=!0;break}case E.TEMPLATE:{za(e,t);break}default:Fc(e,t)}}function uB(e,t){switch(t.tagID){case E.COLGROUP:{e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break}case E.TEMPLATE:{Zr(e,t);break}case E.COL:break;default:Fc(e,t)}}function Fc(e,t){e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE,e._processToken(t))}function ud(e,t){switch(t.tagID){case E.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ye.HTML),e.insertionMode=Y.IN_ROW;break}case E.TH:case E.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(re.TR,E.TR),e.insertionMode=Y.IN_ROW,cd(e,t);break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,Xi(e,t));break}default:Xi(e,t)}}function Rh(e,t){const a=t.tagID;switch(t.tagID){case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break}case E.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,Co(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:case E.TR:break;default:Co(e,t)}}function cd(e,t){switch(t.tagID){case E.TH:case E.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ye.HTML),e.insertionMode=Y.IN_CELL,e.activeFormattingElements.insertMarker();break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,ud(e,t));break}default:Xi(e,t)}}function d_(e,t){switch(t.tagID){case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY);break}case E.TABLE:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,Rh(e,t));break}case E.TBODY:case E.TFOOT:case E.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(E.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,Rh(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:break;default:Co(e,t)}}function cB(e,t){const a=t.tagID;c_.has(a)?(e.openElements.hasInTableScope(E.TD)||e.openElements.hasInTableScope(E.TH))&&(e._closeTableCell(),cd(e,t)):Ln(e,t)}function dB(e,t){const a=t.tagID;switch(a){case E.TD:case E.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_ROW);break}case E.TABLE:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),d_(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:break;default:od(e,t)}}function f_(e,t){switch(t.tagID){case E.HTML:{Ln(e,t);break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._insertElement(t,ye.HTML);break}case E.OPTGROUP:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ye.HTML);break}case E.HR:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ye.HTML),t.ackSelfClosing=!0;break}case E.INPUT:case E.KEYGEN:case E.TEXTAREA:case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),t.tagID!==E.SELECT&&e._processStartTag(t));break}case E.SCRIPT:case E.TEMPLATE:{za(e,t);break}}}function m_(e,t){switch(t.tagID){case E.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===E.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===E.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop();break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop();break}case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode());break}case E.TEMPLATE:{Zr(e,t);break}}}function fB(e,t){const a=t.tagID;a===E.CAPTION||a===E.TABLE||a===E.TBODY||a===E.TFOOT||a===E.THEAD||a===E.TR||a===E.TD||a===E.TH?(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e._processStartTag(t)):f_(e,t)}function mB(e,t){const a=t.tagID;a===E.CAPTION||a===E.TABLE||a===E.TBODY||a===E.TFOOT||a===E.THEAD||a===E.TR||a===E.TD||a===E.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e.onEndTag(t)):m_(e,t)}function hB(e,t){switch(t.tagID){case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{za(e,t);break}case E.CAPTION:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.tmplInsertionModeStack[0]=Y.IN_TABLE,e.insertionMode=Y.IN_TABLE,Xi(e,t);break}case E.COL:{e.tmplInsertionModeStack[0]=Y.IN_COLUMN_GROUP,e.insertionMode=Y.IN_COLUMN_GROUP,Sp(e,t);break}case E.TR:{e.tmplInsertionModeStack[0]=Y.IN_TABLE_BODY,e.insertionMode=Y.IN_TABLE_BODY,ud(e,t);break}case E.TD:case E.TH:{e.tmplInsertionModeStack[0]=Y.IN_ROW,e.insertionMode=Y.IN_ROW,cd(e,t);break}default:e.tmplInsertionModeStack[0]=Y.IN_BODY,e.insertionMode=Y.IN_BODY,Ln(e,t)}}function pB(e,t){t.tagID===E.TEMPLATE&&Zr(e,t)}function h_(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):vp(e,t)}function gB(e,t){t.tagID===E.HTML?Ln(e,t):zc(e,t)}function p_(e,t){var a;if(t.tagID===E.HTML){if(e.fragmentContext||(e.insertionMode=Y.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===E.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(r))===null||a===void 0)&&a.endTag)&&e._setEndLocation(r,t)}}else zc(e,t)}function zc(e,t){e.insertionMode=Y.IN_BODY,ld(e,t)}function bB(e,t){switch(t.tagID){case E.HTML:{Ln(e,t);break}case E.FRAMESET:{e._insertElement(t,ye.HTML);break}case E.FRAME:{e._appendElement(t,ye.HTML),t.ackSelfClosing=!0;break}case E.NOFRAMES:{za(e,t);break}}}function xB(e,t){t.tagID===E.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==E.FRAMESET&&(e.insertionMode=Y.AFTER_FRAMESET))}function EB(e,t){switch(t.tagID){case E.HTML:{Ln(e,t);break}case E.NOFRAMES:{za(e,t);break}}}function yB(e,t){t.tagID===E.HTML&&(e.insertionMode=Y.AFTER_AFTER_FRAMESET)}function NB(e,t){t.tagID===E.HTML?Ln(e,t):_c(e,t)}function _c(e,t){e.insertionMode=Y.IN_BODY,ld(e,t)}function TB(e,t){switch(t.tagID){case E.HTML:{Ln(e,t);break}case E.NOFRAMES:{za(e,t);break}}}function _B(e,t){t.chars=Ht,e._insertCharacters(t)}function vB(e,t){e._insertCharacters(t),e.framesetOk=!1}function g_(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ye.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function SB(e,t){if(H8(t))g_(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(a);r===ye.MATHML?JT(t):r===ye.SVG&&(F8(t),e_(t)),Tp(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function AB(e,t){if(t.tagID===E.P||t.tagID===E.BR){g_(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const r=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(r)===ye.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(a);break}}}re.AREA,re.BASE,re.BASEFONT,re.BGSOUND,re.BR,re.COL,re.EMBED,re.FRAME,re.HR,re.IMG,re.INPUT,re.KEYGEN,re.LINK,re.META,re.PARAM,re.SOURCE,re.TRACK,re.WBR;const wB=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,CB=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),UE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function b_(e,t){const a=PB(e),r=PN("type",{handlers:{root:kB,element:RB,text:OB,comment:E_,doctype:IB,raw:LB},unknown:DB}),o={parser:a?new jE(UE):jE.getFragmentParser(void 0,UE),handle(f){r(f,o)},stitches:!1,options:t||{}};r(e,o),sl(o,ts());const u=a?o.parser.document:o.parser.getFragment(),c=Uj(u,{file:o.options.file});return o.stitches&&Po(c,"comment",function(f,m,h){const b=f;if(b.value.stitch&&h&&m!==void 0){const g=h.children;return g[m]=b.value.stitch,m}}),c.type==="root"&&c.children.length===1&&c.children[0].type===e.type?c.children[0]:c}function x_(e,t){let a=-1;if(e)for(;++a<e.length;)t.handle(e[a])}function kB(e,t){x_(e.children,t)}function RB(e,t){jB(e,t),x_(e.children,t),BB(e,t)}function OB(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const a={type:at.CHARACTER,chars:e.value,location:zo(e)};sl(t,ts(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function IB(e,t){const a={type:at.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:zo(e)};sl(t,ts(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function MB(e,t){t.stitches=!0;const a=UB(e);if("children"in e&&"children"in a){const r=b_({type:"root",children:e.children},t.options);a.children=r.children}E_({type:"comment",value:{stitch:a}},t)}function E_(e,t){const a=e.value,r={type:at.COMMENT,data:a,location:zo(e)};sl(t,ts(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function LB(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,y_(t,ts(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(wB,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const a=t.parser.tokenizer._consume();t.parser.tokenizer._callState(a)}}function DB(e,t){const a=e;if(t.options.passThrough&&t.options.passThrough.includes(a.type))MB(a,t);else{let r="";throw CB.has(a.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+a.type+"` node"+r)}}function sl(e,t){y_(e,t);const a=e.parser.tokenizer.currentCharacterToken;a&&a.location&&(a.location.endLine=e.parser.tokenizer.preprocessor.line,a.location.endCol=e.parser.tokenizer.preprocessor.col+1,a.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=a,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Zt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function y_(e,t){if(t&&t.offset!==void 0){const a={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=a}}function jB(e,t){const a=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Zt.PLAINTEXT)return;sl(t,ts(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Pr.html;o===Pr.html&&a==="svg"&&(o=Pr.svg);const u=qj({...e,children:[]},{space:o===Pr.svg?"svg":"html"}),c={type:at.START_TAG,tagName:a,tagID:al(a),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in u?u.attrs:[],location:zo(e)};t.parser.currentToken=c,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=a}function BB(e,t){const a=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Zj.includes(a)||t.parser.tokenizer.state===Zt.PLAINTEXT)return;sl(t,ed(e));const r={type:at.END_TAG,tagName:a,tagID:al(a),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:zo(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),a===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Zt.RCDATA||t.parser.tokenizer.state===Zt.RAWTEXT||t.parser.tokenizer.state===Zt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Zt.DATA)}function PB(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function zo(e){const t=ts(e)||{line:void 0,column:void 0,offset:void 0},a=ed(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:a.line,endCol:a.column,endOffset:a.offset}}function UB(e){return"children"in e?Ki({...e,children:[]}):Ki(e)}function $c(e){return function(t,a){return b_(t,{...e,file:a})}}const HB=2e3;function N_({repoId:e,startPolish:t,fetchResult:a,loadExisting:r,cleanup:o}){const u=Sn(),c=Le(zn),[f,m]=T.useState("idle"),[h,b]=T.useState(null),[g,y]=T.useState(null),[N,S]=T.useState(!1),A=T.useRef(null),w=T.useCallback(()=>{A.current&&(clearInterval(A.current),A.current=null)},[]);T.useEffect(()=>()=>w(),[w]),T.useEffect(()=>{if(!e||!r)return;let L=!1;return r().then(O=>{!L&&O&&(b(O),m("preview"))}).catch(()=>{}),()=>{L=!0}},[e]);const _=T.useCallback(async()=>{if(!(!e||f==="polishing")){m("polishing");try{const{sessionId:L}=await t();y(L),A.current=setInterval(async()=>{try{if((await i5(e,L)).type==="idle"){w();const P=await a();b(P),m("preview")}}catch{w(),m("idle"),Gt.getState().addToast("润色状态检查失败","error")}},HB)}catch(L){m("idle"),Gt.getState().addToast(L instanceof Error?L.message:"润色启动失败","error")}}},[e,f,t,a,w]),M=T.useCallback(()=>{w(),o==null||o().catch(()=>{}),b(null),y(null),m("idle")},[w,o]),k=T.useCallback(()=>{!g||!c||(Oe.setState({activeSessionId:g}),u(`/${encodeURIComponent(c)}/run`))},[g,c,u]);return{phase:f,result:h,sessionId:g,busy:N,setBusy:S,polish:_,discard:M,escalate:k,setResult:b,setPhase:m}}function FB({repoId:e,issueNumber:t,onPublished:a}){const[r,o]=T.useState(""),[u,c]=T.useState(!1),f=T.useRef(null),m=T.useCallback(()=>M5(e,t,r.trim()),[e,t,r]),h=T.useCallback(()=>jx(e,t).then(O=>O.body),[e,t]),b=T.useCallback(()=>jx(e,t).then(O=>O.body||null),[e,t]),{phase:g,result:y,busy:N,setBusy:S,polish:A,discard:w,escalate:_,setResult:M}=N_({repoId:e,startPolish:m,fetchResult:h,loadExisting:b});T.useEffect(()=>{if(!u)return;const O=P=>{f.current&&!f.current.contains(P.target)&&c(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[u]);const k=async()=>{if(!(!r.trim()||N)){S(!0);try{const O=await Dx(e,t,r.trim());a(O),o(""),Gt.getState().addToast("评论已发布","success")}catch(O){Gt.getState().addToast(O instanceof Error?O.message:"发布失败","error")}finally{S(!1)}}},L=async()=>{if(!(!(y!=null&&y.trim())||N)){S(!0);try{const O=await Dx(e,t,y.trim());a(O),o(""),w(),Gt.getState().addToast("评论已发布","success")}catch(O){Gt.getState().addToast(O instanceof Error?O.message:"发布失败","error")}finally{S(!1)}}};return g==="preview"?i.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[i.jsxs("h3",{className:"mb-3 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4",children:[i.jsx($i,{className:"h-3.5 w-3.5 text-amber-400"}),"AI 润色结果"]}),i.jsx("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-4 py-3",children:i.jsx("textarea",{value:y??"",onChange:O=>M(O.target.value),rows:6,className:"w-full resize-none bg-transparent text-sm text-fg placeholder:text-fg-6 focus:outline-none"})}),i.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[i.jsxs("button",{type:"button",disabled:N,onClick:()=>void L(),className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[i.jsx(No,{className:"h-3.5 w-3.5"}),"发布评论"]}),i.jsx("button",{type:"button",onClick:w,className:"ml-auto rounded-md px-2.5 py-1.5 text-xs text-fg-5 transition-colors hover:text-fg-3",children:"放弃"}),i.jsxs("div",{className:"relative",ref:f,children:[i.jsx("button",{type:"button",onClick:()=>c(!u),className:"flex h-7 w-7 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:i.jsx($h,{className:"h-3.5 w-3.5"})}),u&&i.jsxs("div",{className:"absolute right-0 bottom-full z-20 mb-1 min-w-[140px] overflow-hidden rounded-lg border border-line bg-elevated shadow-lg",children:[i.jsxs("button",{type:"button",onClick:()=>{c(!1),A()},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",children:[i.jsx($i,{className:"h-3 w-3"}),"重新润色"]}),i.jsx("button",{type:"button",onClick:()=>{c(!1),_()},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",children:"转入深度对话"})]})]})]})]}):i.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[i.jsx("h3",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-fg-4",children:"添加评论"}),i.jsx("textarea",{value:r,onChange:O=>o(O.target.value),placeholder:"写下你的评论...",rows:4,disabled:g==="polishing",className:"w-full resize-none rounded-lg border border-line bg-base px-3 py-2.5 text-sm text-fg placeholder:text-fg-6 focus:border-fg-5 focus:outline-none disabled:opacity-50"}),i.jsxs("div",{className:"mt-2.5 flex items-center gap-2",children:[i.jsxs("button",{type:"button",disabled:!r.trim()||N||g==="polishing",onClick:()=>void k(),className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[i.jsx(No,{className:"h-3.5 w-3.5"}),N?"发送中...":"直接发送"]}),i.jsxs("button",{type:"button",disabled:!r.trim()||g==="polishing",onClick:()=>void A(),className:"flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-1.5 text-xs font-medium text-amber-400 transition-colors hover:bg-amber-500/20 disabled:opacity-40",children:[i.jsx($i,{className:"h-3.5 w-3.5"}),g==="polishing"?"润色中...":"AI 润色"]})]})]})}function Ap(e){const t=e<1e12?e*1e3:e,a=Date.now()-t;return a<6e4?"刚刚":a<36e5?`${Math.floor(a/6e4)}分钟前`:a<864e5?`${Math.floor(a/36e5)}小时前`:a<2592e6?`${Math.floor(a/864e5)}天前`:new Date(t).toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}function T_(e){const t=new Date(e);return t.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})+" "+t.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})}function __(e){return e==="merged"?"bg-purple-500/15 text-purple-400":e==="closed"?"bg-red-500/15 text-red-400":"bg-emerald-500/15 text-emerald-400"}function zB(e){return e==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"}function v_({issue:e,milestone:t,onBack:a,onClose:r,onToggleSidebar:o}){var w;const u=Sn(),c=Le(_=>_.activeRepoId),f=Le(zn),[m,h]=T.useState([]),[b,g]=T.useState(!1),[y,N]=T.useState(!1),S=Ve(_=>_.updateIssueState);T.useEffect(()=>{c&&(g(!0),I5(c,e.number).then(h).catch(()=>h([])).finally(()=>g(!1)))},[c,e.number]);const A=()=>{Ve.getState().setSelectedIssue(e.id),Oe.setState({activeSessionId:null}),u(`/${encodeURIComponent(f)}/run`)};return i.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[i.jsxs("header",{className:"flex flex-col gap-2 border-b border-line px-4 py-3 md:flex-row md:items-center md:gap-3 md:px-6",children:[i.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[i.jsx("button",{type:"button",onClick:a,"aria-label":"返回列表",className:"-ml-1 shrink-0 rounded-md p-1.5 text-fg-3 transition-colors hover:bg-elevated hover:text-fg md:hidden",children:i.jsx(zh,{className:"h-5 w-5"})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[i.jsxs("span",{className:ae("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",e.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",e.number," ",e.state]}),(w=e.labels)==null?void 0:w.map(_=>i.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${_.color}20`,color:`#${_.color}`},children:_.name},_.id)),t&&i.jsxs("span",{className:"flex shrink-0 items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium bg-indigo-500/15 text-indigo-400",children:[i.jsx(qh,{className:"h-2.5 w-2.5"}),t.title]})]}),i.jsx("h2",{className:"mt-1 text-base font-semibold text-fg",children:e.title}),(e.authorLogin||e.assignees&&e.assignees.length>0)&&i.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 text-xs text-fg-4",children:[e.authorLogin&&i.jsxs("span",{className:"flex items-center gap-1.5",children:[e.authorAvatar&&i.jsx("img",{src:e.authorAvatar,alt:"",className:"h-4 w-4 rounded-full"}),e.authorLogin]}),e.assignees&&e.assignees.length>0&&i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx("span",{className:"text-fg-5",children:"→"}),i.jsx("span",{className:"flex items-center -space-x-1",children:e.assignees.map(_=>i.jsx("img",{src:_.avatar_url,alt:_.login,title:_.login,className:"h-4 w-4 rounded-full ring-1 ring-surface"},_.login))}),i.jsx("span",{className:"text-fg-4",children:e.assignees.map(_=>_.login).join(", ")})]})]})]})]}),i.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[e.htmlUrl&&i.jsxs("a",{href:e.htmlUrl,target:"_blank",rel:"noopener noreferrer",className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 font-mono text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[i.jsx(ky,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"hidden sm:inline",children:"源站"})]}),i.jsxs("button",{type:"button",onClick:()=>{Ve.getState().enterMatchMode(e.id),Oe.setState({activeSessionId:null}),u(`/${encodeURIComponent(f)}/run`)},className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 text-xs text-fg-3 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:[i.jsx(Oo,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"hidden sm:inline",children:"匹配子任务"})]}),i.jsx("button",{type:"button",disabled:y,onClick:async()=>{N(!0),await S(e.number,e.state==="open"?"closed":"open"),N(!1)},className:ae("flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-xs font-medium transition-colors disabled:opacity-40",e.state==="open"?"border-red-500/30 text-red-400 hover:border-red-500/60 hover:bg-red-500/10":"border-emerald-500/30 text-emerald-400 hover:border-emerald-500/60 hover:bg-emerald-500/10"),children:e.state==="open"?i.jsxs(i.Fragment,{children:[i.jsx(wy,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"hidden sm:inline",children:"关闭"})]}):i.jsxs(i.Fragment,{children:[i.jsx(Vr,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"hidden sm:inline",children:"重新打开"})]})}),i.jsxs("button",{type:"button",onClick:A,className:"flex h-8 items-center gap-1.5 rounded-md bg-blue-600 px-3 text-xs font-medium text-white transition-colors hover:bg-blue-500",children:[i.jsx(Vh,{className:"h-3.5 w-3.5 fill-current"}),i.jsx("span",{className:"hidden sm:inline",children:"新建任务"})]}),o&&i.jsx("button",{type:"button",onClick:o,title:"面板",className:"flex h-8 w-8 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2",children:i.jsx(Ry,{className:"h-4 w-4"})}),r&&i.jsx("button",{type:"button",onClick:r,title:"关闭详情",className:"hidden h-8 w-8 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2 md:flex",children:i.jsx(dt,{className:"h-4 w-4"})})]})]}),i.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:[e.body?i.jsx("div",{className:"markdown-body leading-relaxed",children:i.jsx(Yr,{remarkPlugins:[Gr],rehypePlugins:[$c],children:e.body})}):i.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 Issue 没有描述内容"}),b?i.jsx("p",{className:"mt-8 text-center font-mono text-xs text-fg-6",children:"加载评论…"}):m.length>0&&i.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[i.jsxs("h3",{className:"mb-4 text-xs font-semibold uppercase tracking-wider text-fg-4",children:["评论 (",m.length,")"]}),i.jsx("div",{className:"space-y-4",children:m.map(_=>i.jsxs("div",{className:"rounded-lg border border-line bg-elevated/40 px-4 py-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("img",{src:_.user.avatar_url,alt:_.user.login,className:"h-5 w-5 rounded-full"}),i.jsx("span",{className:"text-xs font-semibold text-fg-2",children:_.user.login}),i.jsx("span",{className:"text-[10px] text-fg-6",children:T_(_.created_at)})]}),i.jsx("div",{className:"markdown-body mt-2 text-sm leading-relaxed text-fg-3",children:i.jsx(Yr,{remarkPlugins:[Gr],rehypePlugins:[$c],children:_.body})})]},_.id))})]}),c&&i.jsx(FB,{repoId:c,issueNumber:e.number,onPublished:_=>h(M=>[...M,_])},e.id)]})})]})}function S_({pr:e,onBack:t,onClose:a,onEnterMatch:r,onNavigateToIssue:o}){var P;const u=Le(z=>z.activeRepoId),c=Le(zn),[f,m]=T.useState(!1),[h,b]=T.useState([]),[g,y]=T.useState(!1),[N,S]=T.useState([]),[A,w]=T.useState(!1),_=Sn(),M=hn(z=>z.unlinkIssue);T.useEffect(()=>{u&&(y(!0),O5(u,e.number).then(b).catch(()=>b([])).finally(()=>y(!1)))},[u,e.number]),T.useEffect(()=>{u&&Zh(u,e.number).then(S).catch(()=>S([]))},[u,e.number]);const k=async z=>{if(!(f||!u)){m(!0);try{if(await C5(u,e.number),z&&N.length>0){const J=N.filter(V=>V.state==="open");await Promise.all(J.map(V=>qy(u,V.number,{state:"closed"}))),S(V=>V.map(j=>j.state==="open"?{...j,state:"closed"}:j)),Ve.getState().loadIssues(),Gt.getState().addToast(`PR #${e.number} 合入成功,已关闭 ${J.length} 个 Issue`,"success")}else Gt.getState().addToast(`PR #${e.number} 合入成功`,"success");hn.getState().loadPulls()}catch(J){let V="合入失败";if(J instanceof Ss)try{V=JSON.parse(J.message).error??V}catch{V=J.message}Gt.getState().addToast(V,"error")}finally{m(!1)}}},L=async z=>{await M(e.number,z)&&S(V=>V.filter(j=>j.number!==z))},O=()=>{const z=`请解决 PR #${e.number} 的合并冲突: ${e.title}`;Oe.setState({activeSessionId:null}),_(`/${encodeURIComponent(c)}/run?draft=${encodeURIComponent(z)}`)};return i.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[i.jsxs("header",{className:"flex flex-col gap-2 border-b border-line px-4 py-3 md:flex-row md:items-center md:gap-3 md:px-6",children:[i.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[i.jsx("button",{type:"button",onClick:t,"aria-label":"返回列表",className:"-ml-1 shrink-0 rounded-md p-1.5 text-fg-3 transition-colors hover:bg-elevated hover:text-fg md:hidden",children:i.jsx(zh,{className:"h-5 w-5"})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[i.jsxs("span",{className:ae("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",__(e.state)),children:["#",e.number," ",e.state]}),e.draft===1&&i.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold bg-fg-6/15 text-fg-4",children:"DRAFT"}),e.mergeable==="false"&&e.state==="open"&&i.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:"Conflict"}),(P=e.labels)==null?void 0:P.map(z=>i.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${z.color}20`,color:`#${z.color}`},children:z.name},z.id))]}),i.jsx("h2",{className:"mt-1 text-base font-semibold text-fg",children:e.title}),i.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 text-xs text-fg-4",children:[i.jsxs("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-fg-5",children:[i.jsx(zr,{className:"h-3.5 w-3.5 shrink-0"}),i.jsxs("span",{className:"truncate",children:[e.headBranch," → ",e.baseBranch]})]}),e.authorLogin&&i.jsxs("span",{className:"flex items-center gap-1.5",children:[e.authorAvatar&&i.jsx("img",{src:e.authorAvatar,alt:"",className:"h-4 w-4 rounded-full"}),e.authorLogin]}),e.mergedAt&&i.jsxs("span",{className:"text-purple-400",children:["合并于 ",Ap(e.mergedAt)]})]})]})]}),i.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[e.htmlUrl&&i.jsxs("a",{href:e.htmlUrl,target:"_blank",rel:"noopener noreferrer",className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 font-mono text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[i.jsx(ky,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"hidden sm:inline",children:"源站"})]}),i.jsxs("button",{type:"button",onClick:r,className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 text-xs text-fg-3 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:[i.jsx(Yh,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"hidden sm:inline",children:"关联 Issue"})]}),e.state==="open"&&i.jsxs(i.Fragment,{children:[e.mergeable==="false"&&i.jsxs("button",{type:"button",onClick:O,className:"flex h-8 items-center gap-1.5 rounded-md border border-amber-500/30 px-2.5 text-xs font-medium text-amber-400 transition-colors hover:border-amber-500/60 hover:bg-amber-500/10",children:[i.jsx(Ow,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"hidden sm:inline",children:"解冲突"})]}),i.jsxs("button",{type:"button",disabled:f||e.mergeable==="false",onClick:()=>void k(!1),className:"flex h-8 items-center gap-1.5 rounded-md border border-emerald-500/30 px-2.5 text-xs font-medium text-emerald-400 transition-colors hover:border-emerald-500/60 hover:bg-emerald-500/10 disabled:opacity-40",children:[i.jsx(Nx,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"hidden sm:inline",children:"合入"})]}),N.some(z=>z.state==="open")&&i.jsxs("button",{type:"button",disabled:f||e.mergeable==="false",onClick:()=>void k(!0),className:"flex h-8 items-center gap-1.5 rounded-md bg-blue-600 px-3 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[i.jsx(Nx,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"hidden sm:inline",children:"合入并关闭 Issues"})]})]}),a&&i.jsx("button",{type:"button",onClick:a,title:"关闭详情",className:"hidden h-8 w-8 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2 md:flex",children:i.jsx(dt,{className:"h-4 w-4"})})]})]}),i.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:[N.length>0&&i.jsxs("div",{className:"mb-6 rounded-lg border border-line bg-elevated/30 px-4 py-3",children:[i.jsxs("h3",{className:"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4",children:[i.jsx(Vr,{className:"h-3.5 w-3.5"}),"关联 Issues (",N.length,")"]}),i.jsx("div",{className:"space-y-1.5",children:N.map(z=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>o==null?void 0:o(z.id),className:"flex min-w-0 flex-1 items-center gap-2 rounded-md px-1 py-0.5 transition-colors hover:bg-elevated/60",children:[i.jsxs("span",{className:ae("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",z.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",z.number]}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-sm text-fg-2",children:z.title})]}),i.jsx("button",{type:"button",onClick:()=>void L(z.number),title:"取消关联",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-400",children:i.jsx(wy,{className:"h-3.5 w-3.5"})})]},z.id))})]}),(e.commitCount!=null||e.additions!=null)&&i.jsxs("div",{className:"mb-6 rounded-lg border border-line bg-elevated/30 px-4 py-3",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-fg-3",children:[e.commitCount!=null&&i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(CA,{className:"h-3.5 w-3.5 text-fg-5"}),i.jsx("span",{className:"font-medium",children:e.commitCount})," 次提交"]}),e.changedFilesCount!=null&&i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(ur,{className:"h-3.5 w-3.5 text-fg-5"}),i.jsx("span",{className:"font-medium",children:e.changedFilesCount})," 个文件"]}),e.additions!=null&&i.jsxs("span",{className:"flex items-center gap-1 text-emerald-400",children:[i.jsx(Ma,{className:"h-3 w-3"}),i.jsx("span",{className:"font-mono font-medium",children:e.additions})]}),e.deletions!=null&&i.jsxs("span",{className:"flex items-center gap-1 text-red-400",children:[i.jsx(JA,{className:"h-3 w-3"}),i.jsx("span",{className:"font-mono font-medium",children:e.deletions})]})]}),e.diffStats&&e.diffStats.length>0&&i.jsxs("div",{className:"mt-3 border-t border-line pt-3",children:[i.jsxs("button",{type:"button",onClick:()=>w(z=>!z),className:"flex w-full items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4 transition-colors hover:text-fg-2",children:[A?i.jsx(sa,{className:"h-3.5 w-3.5"}):i.jsx(Xc,{className:"h-3.5 w-3.5"}),"变更文件 (",e.diffStats.length,")"]}),A&&i.jsx("div",{className:"mt-2 space-y-0.5",children:e.diffStats.map(z=>i.jsxs("div",{className:"flex items-center gap-2 rounded px-2 py-1 text-xs hover:bg-elevated/50",children:[i.jsx("span",{className:ae("w-14 shrink-0 rounded px-1 py-0.5 text-center font-mono text-[10px] font-medium",z.status==="added"?"bg-emerald-500/15 text-emerald-400":z.status==="removed"?"bg-red-500/15 text-red-400":"bg-blue-500/15 text-blue-400"),children:z.status==="added"?"新增":z.status==="removed"?"删除":z.status==="renamed"?"重命名":"修改"}),i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-fg-3",title:z.filename,children:z.filename}),i.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-emerald-400",children:["+",z.additions]}),i.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-red-400",children:["-",z.deletions]})]},z.filename))})]})]}),e.body?i.jsx("div",{className:"markdown-body leading-relaxed",children:i.jsx(Yr,{remarkPlugins:[Gr],rehypePlugins:[$c],children:e.body})}):i.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 PR 没有描述内容"}),g?i.jsx("p",{className:"mt-8 text-center font-mono text-xs text-fg-6",children:"加载评论…"}):h.length>0&&i.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[i.jsxs("h3",{className:"mb-4 text-xs font-semibold uppercase tracking-wider text-fg-4",children:["评论 (",h.length,")"]}),i.jsx("div",{className:"space-y-4",children:h.map(z=>i.jsxs("div",{className:"rounded-lg border border-line bg-elevated/40 px-4 py-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("img",{src:z.user.avatar_url,alt:z.user.login,className:"h-5 w-5 rounded-full"}),i.jsx("span",{className:"text-xs font-semibold text-fg-2",children:z.user.login}),i.jsx("span",{className:"text-[10px] text-fg-6",children:T_(z.created_at)})]}),i.jsx("div",{className:"markdown-body mt-2 text-sm leading-relaxed text-fg-3",children:i.jsx(Yr,{remarkPlugins:[Gr],rehypePlugins:[$c],children:z.body})})]},z.id))})]})]})})]})}function $B({prs:e,onSelect:t}){return e.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-fg-5",children:[i.jsx(zr,{className:"h-8 w-8"}),i.jsx("p",{className:"font-mono text-xs",children:"该 Issue 没有关联的 PR"})]}):i.jsx("ul",{className:"space-y-2",children:e.map(a=>{var r;return i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:()=>t(a.number),className:"group flex w-full flex-col gap-1.5 rounded-lg border border-line bg-elevated/30 px-4 py-3 text-left transition-colors hover:border-blue-500/40 hover:bg-elevated/60",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:ae("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",__(a.state)),children:["#",a.number," ",a.state]}),a.mergeable===!1&&i.jsxs("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:[i.jsx(_n,{className:"inline h-3 w-3 -mt-px"})," Conflict"]}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:a.title})]}),i.jsx("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-fg-5",children:((r=a.user)==null?void 0:r.login)&&i.jsxs("span",{className:"flex items-center gap-1",children:[a.user.avatar_url&&i.jsx("img",{src:a.user.avatar_url,alt:"",className:"h-3.5 w-3.5 rounded-full"}),a.user.login]})})]})},a.number)})})}function qB({issue:e,milestone:t,tab:a,prNumber:r,onTabChange:o,onSelectPr:u,onBackToPrList:c,onBack:f,onClose:m,onToggleSidebar:h}){const b=Le(k=>k.activeRepoId),g=hn(k=>k.enterMatchMode),[y,N]=T.useState([]),[S,A]=T.useState(null),[w,_]=T.useState(!1);T.useEffect(()=>{if(!b){N([]);return}S5(b,e.number).then(N).catch(()=>N([]))},[b,e.number]),T.useEffect(()=>{if(!b||r==null){A(null);return}let k=!1;return _(!0),w5(b,r).then(L=>{k||A(L)}).catch(()=>{k||A(null)}).finally(()=>{k||_(!1)}),()=>{k=!0}},[b,r]);const M=y.some(k=>k.mergeable===!1);return i.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[y.length>0&&i.jsxs("div",{className:"flex shrink-0 items-center border-b border-line bg-surface",children:[i.jsxs("button",{type:"button",onClick:()=>o("issue"),className:ae("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",a==="issue"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[i.jsx(Vr,{className:"h-3.5 w-3.5"}),"Issue"]}),i.jsxs("button",{type:"button",onClick:()=>o("pr"),className:ae("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",a==="pr"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[i.jsx(zr,{className:"h-3.5 w-3.5"}),"PR",i.jsx("span",{className:ae("rounded-full px-1.5 py-0.5 font-mono text-[10px]",a==="pr"?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:y.length}),M&&i.jsxs("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:[i.jsx(_n,{className:"inline h-3 w-3 -mt-px"})," Conflict"]})]})]}),a==="issue"||y.length===0?i.jsx(v_,{issue:e,milestone:t,onBack:f,onClose:m,onToggleSidebar:h}):r!=null?S?i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[i.jsx("div",{className:"flex shrink-0 items-center border-b border-line bg-elevated/30 px-4 py-2",children:i.jsxs("button",{type:"button",onClick:c,className:"flex items-center gap-1 rounded-md px-2 py-1 text-xs text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:[i.jsx(yo,{className:"h-3.5 w-3.5"}),"返回列表"]})}),i.jsx(S_,{pr:S,onBack:c,onEnterMatch:()=>g(S.id)})]}):i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx("p",{className:"font-mono text-xs text-fg-5",children:w?"加载 PR…":"PR 未找到"})}):i.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i.jsx("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:i.jsx($B,{prs:y,onSelect:u})})})]})}function HE({onDone:e}){const[t,a]=T.useState(""),[r,o]=T.useState(""),[u,c]=T.useState(!1),f=T.useRef(null),m=Ve(V=>V.createIssue),h=Le(V=>V.activeRepoId),b=T.useCallback(()=>L5(h,t.trim(),r.trim()||void 0),[h,t,r]),g=T.useCallback(()=>Bx(h),[h]),y=T.useCallback(()=>Bx(h).then(V=>V.title?V:null),[h]),N=T.useCallback(()=>D5(h),[h]),{phase:S,result:A,busy:w,setBusy:_,polish:M,discard:k,escalate:L,setResult:O}=N_({repoId:h,startPolish:b,fetchResult:g,loadExisting:y,cleanup:N});T.useEffect(()=>{if(!u)return;const V=j=>{f.current&&!f.current.contains(j.target)&&c(!1)};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[u]);const P=async()=>{!t.trim()||w||(_(!0),await m(t.trim(),r.trim()||void 0),_(!1),e())},z=async()=>{!(A!=null&&A.title.trim())||w||(_(!0),await m(A.title.trim(),A.body.trim()||void 0),_(!1),k(),e())},J=V=>{(V.metaKey||V.ctrlKey)&&V.key==="Enter"&&(V.preventDefault(),P())};return S==="preview"&&A?i.jsxs("div",{className:"border-b border-line px-3 py-3",children:[i.jsxs("h4",{className:"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4",children:[i.jsx($i,{className:"h-3.5 w-3.5 text-amber-400"}),"AI 润色结果"]}),i.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2.5",children:[i.jsx("input",{type:"text",value:A.title,onChange:V=>O({...A,title:V.target.value}),className:"w-full bg-transparent text-xs font-medium text-fg placeholder:text-fg-6 focus:outline-none",placeholder:"润色后标题"}),i.jsx("textarea",{value:A.body,onChange:V=>O({...A,body:V.target.value}),rows:5,className:"mt-2 w-full resize-none bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none",placeholder:"润色后描述"})]}),i.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[i.jsxs("button",{type:"button",disabled:!A.title.trim()||w,onClick:()=>void z(),className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[i.jsx(Ma,{className:"h-3.5 w-3.5"}),"创建 Issue"]}),i.jsx("button",{type:"button",onClick:k,className:"ml-auto rounded-md px-2.5 py-1 text-xs text-fg-5 transition-colors hover:text-fg-3",children:"放弃"}),i.jsxs("div",{className:"relative",ref:f,children:[i.jsx("button",{type:"button",onClick:()=>c(!u),className:"flex h-6 w-6 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:i.jsx($h,{className:"h-3.5 w-3.5"})}),u&&i.jsxs("div",{className:"absolute right-0 bottom-full z-20 mb-1 min-w-[140px] overflow-hidden rounded-lg border border-line bg-elevated shadow-lg",children:[i.jsxs("button",{type:"button",onClick:()=>{c(!1),M()},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",children:[i.jsx($i,{className:"h-3 w-3"}),"重新润色"]}),i.jsx("button",{type:"button",onClick:()=>{c(!1),L()},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",children:"转入深度对话"})]})]})]})]}):i.jsxs("div",{className:"border-b border-line px-3 py-3",children:[i.jsx("input",{type:"text",value:t,onChange:V=>a(V.target.value),onKeyDown:J,placeholder:"Issue 标题",autoFocus:!0,disabled:S==="polishing",className:"w-full rounded-md border border-line bg-base px-2.5 py-1.5 text-xs text-fg placeholder:text-fg-6 focus:border-fg-5 focus:outline-none disabled:opacity-50"}),i.jsx("textarea",{value:r,onChange:V=>o(V.target.value),onKeyDown:J,placeholder:"描述(可选) ⌘⏎ 创建",rows:3,disabled:S==="polishing",className:"mt-2 w-full resize-none rounded-md border border-line bg-base px-2.5 py-1.5 text-xs text-fg placeholder:text-fg-6 focus:border-fg-5 focus:outline-none disabled:opacity-50"}),i.jsxs("div",{className:"mt-2 flex items-center justify-end gap-2",children:[i.jsx("button",{type:"button",onClick:e,className:"rounded-md px-2.5 py-1 text-xs text-fg-4 transition-colors hover:text-fg-2",children:"取消"}),i.jsxs("button",{type:"button",disabled:!t.trim()||S==="polishing",onClick:()=>void M(),className:"flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-1 text-xs font-medium text-amber-400 transition-colors hover:bg-amber-500/20 disabled:opacity-40",children:[i.jsx($i,{className:"h-3.5 w-3.5"}),S==="polishing"?"润色中...":"AI 润色"]}),i.jsx("button",{type:"button",onClick:()=>void P(),disabled:!t.trim()||w||S==="polishing",className:"rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:"直接创建"})]})]})}function FE({issue:e,sessionCount:t,isActive:a,isEpic:r,milestone:o,onSelect:u}){return i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:u,className:ae("group flex w-full items-center gap-2.5 rounded-md px-2.5 py-2 text-left transition-colors",a?"border-l-2 border-blue-500 bg-elevated/80":"border-l-2 border-transparent hover:bg-elevated/50"),children:[i.jsx("span",{className:ae("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold",e.state==="open"?"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-1 ring-emerald-500/25":"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-1 ring-purple-500/25"),children:e.number}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[r&&i.jsx("span",{className:"shrink-0 rounded px-1 py-0.5 text-[9px] font-bold tracking-wide bg-amber-400/12 text-amber-400",children:"EPIC"}),i.jsx("span",{className:"min-w-0 text-xs font-medium text-fg-2 group-hover:text-fg",children:e.title})]}),e.labels&&e.labels.length>0&&i.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:e.labels.map(c=>i.jsx("span",{className:"rounded px-1 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${c.color}20`,color:`#${c.color}`},children:c.name},c.id))}),o&&i.jsxs("span",{className:"mt-1 flex items-center gap-1 text-[10px] text-indigo-400/70",children:[i.jsx(qh,{className:"h-2.5 w-2.5"}),o.title]})]}),t>0&&i.jsx("span",{className:"shrink-0 rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:t})]})})}function YB({issue:e,sessionCount:t,isEpic:a,milestone:r,onSelect:o}){return i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:o,className:"group flex w-full items-center gap-3 border-b border-line px-4 py-3 text-left transition-colors hover:bg-elevated/50",children:[i.jsx("span",{className:ae("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold",e.state==="open"?"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-1 ring-emerald-500/25":"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-1 ring-purple-500/25"),children:e.number}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[a&&i.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[9px] font-bold tracking-wide bg-amber-400/12 text-amber-400",children:"EPIC"}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:e.title}),r&&i.jsxs("span",{className:"hidden shrink-0 items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium bg-indigo-500/15 text-indigo-400 sm:flex",children:[i.jsx(qh,{className:"h-2.5 w-2.5"}),r.title]}),t>0&&i.jsxs("span",{className:"shrink-0 rounded-full bg-elevated px-2 py-0.5 font-mono text-[10px] text-fg-5",children:[t," 次运行"]}),e.assignees&&e.assignees.length>0&&i.jsxs("div",{className:"hidden shrink-0 items-center -space-x-1.5 sm:flex",children:[e.assignees.slice(0,3).map(u=>i.jsx("img",{src:u.avatar_url,alt:u.login,title:u.login,className:"h-5 w-5 rounded-full ring-2 ring-surface"},u.login)),e.assignees.length>3&&i.jsxs("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-elevated text-[9px] font-medium text-fg-4 ring-2 ring-surface",children:["+",e.assignees.length-3]})]})]}),i.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[e.authorLogin&&i.jsxs("span",{className:"shrink-0 text-[11px] text-fg-5",title:e.authorLogin,children:[e.authorAvatar&&i.jsx("img",{src:e.authorAvatar,alt:"",className:"mr-1 inline-block h-3.5 w-3.5 rounded-full align-text-bottom"}),e.authorLogin]}),e.authorLogin&&i.jsx("span",{className:"text-fg-6",children:"·"}),i.jsx("span",{className:"shrink-0 text-[11px] text-fg-6",children:Ap(e.createdAt)}),(e.commentCount??0)>0&&i.jsxs("span",{className:"flex shrink-0 items-center gap-0.5 text-[11px] text-fg-6",children:[i.jsx("span",{className:"text-fg-6",children:"·"}),i.jsx(KA,{className:"h-3 w-3"}),e.commentCount]}),(e.labels&&e.labels.length>0||(e.commentCount??0)>0||e.authorLogin)&&e.labels&&e.labels.length>0&&i.jsx("span",{className:"text-fg-6",children:"·"}),e.labels&&e.labels.length>0?e.labels.map(u=>i.jsx("span",{className:"rounded px-1.5 py-0.5 text-[11px] font-medium",style:{backgroundColor:`#${u.color}20`,color:`#${u.color}`},children:u.name},u.id)):e.authorLogin?null:i.jsx("span",{className:"text-[11px] text-fg-6",children:" "})]})]})]})})}function GB(e){var u;const t=typeof((u=e.time)==null?void 0:u.created)=="number"?e.time.created:e.createdAt?Date.parse(e.createdAt):0;if(!t||Number.isNaN(t))return"";const a=t<1e12?t*1e3:t,r=new Date(a);return r.toDateString()===new Date().toDateString()?r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):r.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function zE({session:e,onSelect:t}){var r,o;const a=GB(e);return i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:t,className:"block w-full rounded-md border-l-2 border-transparent px-2.5 py-2 text-left transition-colors hover:bg-elevated/50",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-fg-3",children:((r=e.agent)==null?void 0:r.trim())||"默认"}),a&&i.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:a})]}),i.jsx("div",{className:"mt-0.5 truncate text-sm text-fg-2",children:((o=e.title)==null?void 0:o.trim())||"未命名运行"})]})})}function A_({sessions:e,onSelect:t}){const a=Ve(c=>c.issues),r=new Map(a.map(c=>[c.id,c])),o=new Map,u=[];for(const c of e)if(c.issueId&&r.has(c.issueId)){const f=o.get(c.issueId)??[];f.push(c),o.set(c.issueId,f)}else u.push(c);return i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col border-t border-line",children:[i.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-3",children:[i.jsx(M3,{className:"h-3.5 w-3.5 text-fg-5"}),i.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:"运行记录"}),i.jsx("span",{className:"ml-auto rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:e.length})]}),i.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:e.length===0?i.jsx("p",{className:"px-2 py-4 text-center font-mono text-[10px] text-fg-6",children:"暂无运行记录"}):i.jsxs("div",{className:"space-y-3",children:[[...o.entries()].map(([c,f])=>{const m=r.get(c);return i.jsxs("div",{children:[i.jsxs("div",{className:"mb-1 flex items-center gap-1.5 px-1",children:[i.jsxs("span",{className:ae("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",m.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",m.number]}),i.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg-3",children:m.title})]}),i.jsx("ul",{className:"space-y-0.5",children:f.map(h=>i.jsx(zE,{session:h,onSelect:()=>t(h.id)},h.id))})]},c)}),u.length>0&&i.jsxs("div",{children:[o.size>0&&i.jsx("div",{className:"mb-1 px-1",children:i.jsx("span",{className:"text-xs font-medium text-fg-5",children:"未关联 Issue"})}),i.jsx("ul",{className:"space-y-0.5",children:u.map(c=>i.jsx(zE,{session:c,onSelect:()=>t(c.id)},c.id))})]})]})})]})}function KB({sessions:e,onSessionSelect:t}){return i.jsx("div",{className:"flex w-full flex-col",children:i.jsx(A_,{sessions:e,onSelect:t})})}function w_({issue:e,childrenMap:t,currentId:a,onSelect:r,depth:o}){const u=t.get(e.id)??[],c=e.id===a;return i.jsxs("div",{children:[i.jsxs("button",{type:"button",onClick:()=>r(e.id),className:ae("group flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-xs transition-colors",c?"bg-blue-500/10 text-blue-400":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),style:{paddingLeft:`${o*18+8}px`},children:[i.jsx("span",{className:ae("h-1.5 w-1.5 shrink-0 rounded-full",e.state==="open"?"bg-emerald-400":"bg-purple-400")}),i.jsxs("span",{className:"shrink-0 font-mono text-[10px] text-fg-6",children:["#",e.number]}),i.jsx("span",{className:"min-w-0 truncate",children:e.title})]}),u.length>0&&i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute top-0 bottom-3 w-px bg-line",style:{left:`${o*18+16}px`}}),u.map(f=>i.jsx(w_,{issue:f,childrenMap:t,currentId:a,onSelect:r,depth:o+1},f.id))]})]})}function VB(e,t){let a=0,r=0;const o=[...t.get(e)??[]];for(let u=0;u<o.length;u++){const c=o[u];a++,c.state==="closed"&&r++;const f=t.get(c.id);f&&o.push(...f)}return{total:a,closed:r}}function XB({rootIssue:e,childrenMap:t,currentId:a,onSelect:r,sessions:o,onSessionSelect:u}){const{total:c,closed:f}=VB(e.id,t),m=c===0?0:Math.round(f/c*100);return i.jsxs("div",{className:"flex w-full flex-col",children:[i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[i.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-3",children:[i.jsx(rw,{className:"h-3.5 w-3.5 text-fg-5"}),i.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:"子任务树"})]}),c>0&&i.jsxs("div",{className:"border-b border-line px-3 py-2",children:[i.jsx("div",{className:"h-1 overflow-hidden rounded-full bg-elevated",children:i.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-emerald-400 to-blue-500 transition-all",style:{width:`${m}%`}})}),i.jsxs("p",{className:"mt-1 font-mono text-[10px] text-fg-6",children:[f," / ",c," completed"]})]}),i.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:i.jsx(w_,{issue:e,childrenMap:t,currentId:a,onSelect:r,depth:0})})]}),i.jsx(A_,{sessions:o,onSelect:u})]})}const C_=[{key:"open",label:"开放"},{key:"closed",label:"已关闭"},{key:"all",label:"全部"}];function QB({stateFilter:e,setStateFilter:t,typeFilter:a,setTypeFilter:r,searchQuery:o,setSearchQuery:u,expandedFilter:c,setExpandedFilter:f,selectedAuthor:m,setSelectedAuthor:h,selectedAssignee:b,setSelectedAssignee:g,creating:y,setCreating:N,openCount:S,closedCount:A,totalCount:w,epicCount:_,taskCount:M,strayCount:k,afterStateCount:L,uniqueAuthors:O,uniqueAssignees:P}){const z=Ve(F=>F.syncing),J=Ve(F=>F.syncIssues),V=Ve(F=>F.tags),j=Ve(F=>F.tagFilterMode),ee=Ve(F=>F.cycleTagFilter),se=Ve(F=>F.clearTagFilter),he=Ve(F=>F.milestones),te=Ve(F=>F.selectedMilestoneId),K=Ve(F=>F.setMilestoneFilter),G=Le(F=>F.activeRepoId);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-2 border-b border-line px-4 py-2.5",children:[i.jsx("span",{className:"shrink-0 text-sm font-semibold text-fg md:order-1",children:"Issues"}),G&&i.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1 md:order-last md:ml-0",children:[i.jsx("button",{type:"button",onClick:()=>void J(),disabled:z,title:"同步 Issues",className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:i.jsx($r,{className:ae("h-3.5 w-3.5",z&&"animate-spin")})}),i.jsx("button",{type:"button",onClick:()=>N(!y),title:"新建 Issue",className:ae("flex h-8 w-8 items-center justify-center rounded-md transition-colors",y?"bg-blue-600 text-white":"text-fg-4 hover:bg-elevated hover:text-fg-2"),children:i.jsx(Ma,{className:"h-3.5 w-3.5"})})]}),i.jsx("div",{className:"w-full md:order-2 md:w-auto",children:i.jsx("div",{className:"flex shrink-0 items-center rounded-lg bg-elevated/60 p-0.5",children:C_.map(({key:F,label:$})=>{const q=F==="open"?S:F==="closed"?A:w;return i.jsxs("button",{type:"button",onClick:()=>t(F),className:ae("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",e===F?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[$,i.jsx("span",{className:ae("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===F?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:q})]},F)})})}),i.jsx("div",{className:"w-full md:order-5 md:w-auto md:min-w-0 md:flex-1 md:px-1",children:i.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2.5 py-1.5",children:[i.jsx(Ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),i.jsx("input",{type:"text",value:o,onChange:F=>u(F.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),o&&i.jsx("button",{type:"button",onClick:()=>u(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:i.jsx(dt,{className:"h-3 w-3"})})]})}),i.jsx("div",{className:"hidden md:order-3 md:mx-1 md:block md:h-4 md:w-px md:shrink-0 md:bg-line"}),i.jsxs("div",{className:"flex w-full gap-2 overflow-x-auto scrollbar-none md:order-4 md:w-auto md:overflow-visible",children:[i.jsxs("button",{type:"button",onClick:()=>f(c==="type"?null:"type"),className:ae("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",c==="type"?"bg-elevated text-fg":a!=="all"?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["类型",a!=="all"&&i.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:a==="epic"?"Epic":a==="task"?"任务":"游离"}),i.jsx(sa,{className:ae("h-3 w-3 transition-transform",c==="type"&&"rotate-180")})]}),i.jsxs("button",{type:"button",onClick:()=>f(c==="tag"?null:"tag"),className:ae("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",c==="tag"?"bg-elevated text-fg":j.size>0?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["标签",j.size>0&&i.jsx("span",{className:"rounded-full bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:j.size}),i.jsx(sa,{className:ae("h-3 w-3 transition-transform",c==="tag"&&"rotate-180")})]}),i.jsxs("button",{type:"button",onClick:()=>f(c==="milestone"?null:"milestone"),className:ae("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",c==="milestone"?"bg-elevated text-fg":te?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Milestone",te&&(()=>{const F=he.find($=>$.id===te);return F?i.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:F.title}):null})(),i.jsx(sa,{className:ae("h-3 w-3 transition-transform",c==="milestone"&&"rotate-180")})]}),i.jsxs("button",{type:"button",onClick:()=>f(c==="author"?null:"author"),className:ae("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",c==="author"?"bg-elevated text-fg":m?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Author",m&&i.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:m}),i.jsx(sa,{className:ae("h-3 w-3 transition-transform",c==="author"&&"rotate-180")})]}),i.jsxs("button",{type:"button",onClick:()=>f(c==="assignee"?null:"assignee"),className:ae("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",c==="assignee"?"bg-elevated text-fg":b?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Assignee",b&&i.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:b}),i.jsx(sa,{className:ae("h-3 w-3 transition-transform",c==="assignee"&&"rotate-180")})]})]})]}),c==="type"&&i.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:["epic","stray","task","all"].map(F=>{const $=F==="epic"?"Epic":F==="stray"?"游离":F==="task"?"任务":"全部",q=F==="epic"?_:F==="stray"?k:F==="task"?M:L,D=a===F;return i.jsxs("button",{type:"button",onClick:()=>r(D&&F!=="all"?"all":F),className:ae("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-semibold transition-colors",D?F==="epic"?"bg-amber-400/15 text-amber-400":F==="stray"?"bg-sky-400/15 text-sky-400":F==="task"?"bg-violet-400/15 text-violet-400":"bg-fg-6/20 text-fg-3":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[$,i.jsx("span",{className:ae("rounded-full px-1.5 py-0.5 font-mono text-[10px] font-medium",D?"opacity-70":"text-fg-6"),children:q})]},F)})}),c==="tag"&&i.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:V.length===0?i.jsx("span",{className:"text-xs text-fg-5",children:"暂无标签"}):i.jsxs(i.Fragment,{children:[V.map(F=>{const $=j.get(F.id);return i.jsxs("button",{type:"button",onClick:()=>ee(F.id),className:ae("shrink-0 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",$==="include"?"ring-1 ring-current shadow-sm":$==="exclude"?"opacity-90 line-through decoration-2":"opacity-50 hover:opacity-80"),style:$==="exclude"?{backgroundColor:`#${F.color}10`,color:`#${F.color}`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, #${F.color} 30%, transparent)`}:{backgroundColor:`#${F.color}18`,color:`#${F.color}`,boxShadow:$==="include"?`inset 0 0 0 1px color-mix(in srgb, #${F.color} 50%, transparent)`:void 0},children:[$==="exclude"&&i.jsx("span",{className:"mr-1 text-[10px]",children:"✕"}),F.name]},F.id)}),j.size>0&&i.jsx("button",{type:"button",onClick:se,className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),c==="milestone"&&i.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:he.length===0?i.jsx("span",{className:"text-xs text-fg-5",children:"暂无里程碑"}):i.jsxs(i.Fragment,{children:[he.map(F=>{const $=te===F.id;return i.jsxs("button",{type:"button",onClick:()=>K($?null:F.id),className:ae("shrink-0 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",$?"bg-indigo-500/15 text-indigo-400 ring-1 ring-indigo-400/50 shadow-sm":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[F.title,F.state==="closed"&&i.jsx("span",{className:"ml-1 text-[10px] opacity-60",children:"✓"})]},F.id)}),te&&i.jsx("button",{type:"button",onClick:()=>K(null),className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),c==="author"&&i.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:O.length===0?i.jsx("span",{className:"text-xs text-fg-5",children:"同步后可见作者"}):i.jsxs(i.Fragment,{children:[O.map(F=>i.jsxs("button",{type:"button",onClick:()=>h(m===F.login?null:F.login),className:ae("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",m===F.login?"bg-blue-500/15 text-blue-400 ring-1 ring-blue-500/30 shadow-sm":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[F.avatar&&i.jsx("img",{src:F.avatar,alt:"",className:"h-4 w-4 rounded-full"}),F.login]},F.login)),m&&i.jsx("button",{type:"button",onClick:()=>h(null),className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),c==="assignee"&&i.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:P.length===0?i.jsx("span",{className:"text-xs text-fg-5",children:"同步后可见指派人"}):i.jsxs(i.Fragment,{children:[P.map(F=>i.jsxs("button",{type:"button",onClick:()=>g(b===F.login?null:F.login),className:ae("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",b===F.login?"bg-blue-500/15 text-blue-400 ring-1 ring-blue-500/30 shadow-sm":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[F.avatar&&i.jsx("img",{src:F.avatar,alt:"",className:"h-4 w-4 rounded-full"}),F.login]},F.login)),b&&i.jsx("button",{type:"button",onClick:()=>g(null),className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})})]})}function WB(){const[e,t]=T.useState("open"),[a,r]=T.useState("stray"),[o,u]=T.useState(!1),[c,f]=T.useState(""),m=Ve(Ee=>Ee.viewingTreeRootId),h=Ve(Ee=>Ee.setViewingIssue),[b,g]=T.useState(!1),[y,N]=T.useState(!1),[S,A]=T.useState(null),[w,_]=T.useState(null),[M,k]=T.useState(null),[L,O]=Fh(),P=Ve(Ee=>Ee.issues),z=Ve(Ee=>Ee.syncing),J=Ve(Ee=>Ee.syncIssues),V=Ve(Ee=>Ee.tags),j=Ve(Ee=>Ee.tagFilterMode),ee=Ve(Ee=>Ee.loadTags),se=Ve(Ee=>Ee.milestones),he=Ve(Ee=>Ee.selectedMilestoneId),te=Ve(Ee=>Ee.loadMilestones),K=Le(Ee=>Ee.activeRepoId),G=Le(zn),F=Oe(Ee=>Ee.sessions),$=Sn(),q=L.get("id"),D=L.get("tab")==="pr"?"pr":"issue",I=L.get("prId"),W=I?Number.parseInt(I,10):null;T.useEffect(()=>{const Ee=L.get("issueId");if(!Ee)return;const ft=new URLSearchParams(L);ft.delete("issueId"),ft.set("id",Ee),O(ft,{replace:!0})},[L,O]),T.useEffect(()=>{if(L.get("id"))return;const Ee=Ve.getState().viewingIssueId;Ee&&O({id:Ee},{replace:!0})},[]);const C=T.useCallback(Ee=>{O({id:Ee},{replace:!1})},[O]),de=T.useCallback(()=>{O({},{replace:!1}),h(null)},[O,h]),_e=T.useCallback(Ee=>{if(!q)return;const ft={id:q};Ee==="pr"&&(ft.tab="pr"),O(ft,{replace:!1})},[q,O]),B=T.useCallback(Ee=>{q&&O({id:q,tab:"pr",prId:String(Ee)},{replace:!1})},[q,O]),pe=T.useCallback(()=>{q&&O({id:q,tab:"pr"},{replace:!1})},[q,O]);T.useEffect(()=>{K&&(ee(),te())},[K,ee,te]);const{childrenMap:Re,issueType:De,milestoneMap:lt,finalFiltered:Bt,counts:Jt,uniqueAuthors:ya,uniqueAssignees:dn}=Cj({issues:P,tags:V,milestones:se,tagFilterMode:j,stateFilter:e,typeFilter:a,searchQuery:c,selectedMilestoneId:he,selectedAuthor:w,selectedAssignee:M}),$n=T.useMemo(()=>{const Ee=new Map;for(const ft of F)ft.issueId&&!ft.parentID&&Ee.set(ft.issueId,(Ee.get(ft.issueId)??0)+1);return Ee},[F]),et=P.find(Ee=>Ee.id===q)??null,qn=T.useMemo(()=>{if(!q)return[];const Ee=new Set([q]);if(m){Ee.add(m);const ft=[...Re.get(m)??[]];for(let la=0;la<ft.length;la++){Ee.add(ft[la].id);const It=Re.get(ft[la].id);It&&ft.push(...It)}}return F.filter(ft=>ft.issueId&&Ee.has(ft.issueId)&&!ft.parentID)},[q,m,Re,F]),Dn=T.useCallback(Ee=>{Oe.setState({activeSessionId:Ee}),$(`/${encodeURIComponent(G)}/run`)},[$,G]),Yn=T.useCallback((Ee,ft)=>{C(Ee),h(Ee,ft==="epic"?Ee:null)},[C,h]),Da=UT({onSwipeRight:()=>N(!0),onSwipeLeft:()=>g(!0),disabled:!q||y||b});return i.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 overflow-hidden",...Da,children:[i.jsxs("div",{className:ae("shrink-0 flex-col bg-surface",q?"hidden md:flex md:w-80 border-r border-line":"flex w-full"),children:[q?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[i.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Issues"}),K&&i.jsx("div",{className:"flex items-center gap-1",children:i.jsx("button",{type:"button",onClick:()=>void J(),disabled:z,title:"同步",className:"flex h-7 w-7 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:i.jsx($r,{className:ae("h-3.5 w-3.5",z&&"animate-spin")})})})]}),o&&i.jsx(HE,{onDone:()=>u(!1)}),i.jsx("div",{className:"flex border-b border-line",children:C_.map(({key:Ee,label:ft})=>{const la=Ee==="open"?Jt.open:Ee==="closed"?Jt.closed:P.length;return i.jsxs("button",{type:"button",onClick:()=>t(Ee),className:ae("flex flex-1 items-center justify-center gap-1.5 py-2 text-xs font-medium transition-colors",e===Ee?"border-b-2 border-blue-500 text-blue-500":"text-fg-4 hover:text-fg-2"),children:[ft,i.jsx("span",{className:ae("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===Ee?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:la})]},Ee)})}),i.jsx("div",{className:"border-b border-line px-3 py-2",children:i.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[i.jsx(Ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),i.jsx("input",{type:"text",value:c,onChange:Ee=>f(Ee.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),c&&i.jsx("button",{type:"button",onClick:()=>f(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:i.jsx(dt,{className:"h-3 w-3"})})]})})]}):i.jsxs(i.Fragment,{children:[i.jsx(QB,{stateFilter:e,setStateFilter:t,typeFilter:a,setTypeFilter:r,searchQuery:c,setSearchQuery:f,expandedFilter:S,setExpandedFilter:A,selectedAuthor:w,setSelectedAuthor:_,selectedAssignee:M,setSelectedAssignee:k,creating:o,setCreating:u,openCount:Jt.open,closedCount:Jt.closed,totalCount:P.length,epicCount:Jt.epic,taskCount:Jt.task,strayCount:Jt.stray,afterStateCount:Jt.afterState,uniqueAuthors:ya,uniqueAssignees:dn}),o&&i.jsx(HE,{onDone:()=>u(!1)})]}),i.jsx("div",{className:ae("flex-1 overflow-y-auto",q?"px-2 py-2":"px-3 py-3"),children:K?Bt.length===0?i.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:P.length===0?"点击 ↻ 同步 Issues":"无匹配 Issue"}):i.jsx("ul",{className:ae(q?"space-y-0.5":"space-y-1"),children:Bt.map(Ee=>q?i.jsx(FE,{issue:Ee,sessionCount:$n.get(Ee.id)??0,isActive:q===Ee.id,isEpic:De(Ee)==="epic",milestone:Ee.milestoneId?lt.get(Ee.milestoneId):void 0,onSelect:()=>Yn(Ee.id,De(Ee))},Ee.id):i.jsx(YB,{issue:Ee,sessionCount:$n.get(Ee.id)??0,isEpic:De(Ee)==="epic",milestone:Ee.milestoneId?lt.get(Ee.milestoneId):void 0,onSelect:()=>Yn(Ee.id,De(Ee))},Ee.id))}):i.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]}),q&&i.jsx(vh,{side:"left",open:y,onClose:()=>N(!1),children:i.jsxs("div",{className:"flex h-full flex-col",children:[i.jsx("div",{className:"border-b border-line px-3 py-3",children:i.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Issues"})}),i.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:Bt.length===0?i.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"无匹配 Issue"}):i.jsx("ul",{className:"space-y-0.5",children:Bt.map(Ee=>i.jsx(FE,{issue:Ee,sessionCount:$n.get(Ee.id)??0,isActive:q===Ee.id,isEpic:De(Ee)==="epic",milestone:Ee.milestoneId?lt.get(Ee.milestoneId):void 0,onSelect:()=>{Yn(Ee.id,De(Ee)),N(!1)}},Ee.id))})})]})}),q&&i.jsx("div",{className:"relative flex min-w-0 flex-1 flex-col bg-term",children:et?i.jsxs(i.Fragment,{children:[i.jsx(qB,{issue:et,milestone:et.milestoneId?lt.get(et.milestoneId):void 0,tab:D,prNumber:W,onTabChange:_e,onSelectPr:B,onBackToPrList:pe,onBack:()=>{de(),g(!1)},onClose:()=>{de(),g(!1)},onToggleSidebar:()=>g(Ee=>!Ee)}),b&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"absolute inset-0 z-10 bg-black/30",onClick:()=>g(!1)}),i.jsxs("div",{className:"absolute right-0 top-0 bottom-0 z-20 flex w-[280px] flex-col border-l border-line bg-surface shadow-xl",children:[i.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-line px-3 py-2.5",children:[i.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:m?"子任务树 & 运行记录":"运行记录"}),i.jsx("button",{type:"button",onClick:()=>g(!1),className:"flex h-6 w-6 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:i.jsx(dt,{className:"h-4 w-4"})})]}),i.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:m?(()=>{const Ee=P.find(ft=>ft.id===m);return Ee?i.jsx(XB,{rootIssue:Ee,childrenMap:Re,currentId:q,onSelect:ft=>{C(ft),h(ft,m),g(!1)},sessions:qn,onSessionSelect:Dn}):null})():i.jsx(KB,{sessions:qn,onSessionSelect:Dn})})]})]})]}):i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx("p",{className:"font-mono text-xs text-fg-5",children:"Issue 未找到"})})})]})}function ZB({issues:e,onSelect:t}){const a=Oe(o=>o.sessions),r=new Map;for(const o of a)o.issueId&&!o.parentID&&r.set(o.issueId,(r.get(o.issueId)??0)+1);return e.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-fg-5",children:[i.jsx(Vr,{className:"h-8 w-8"}),i.jsx("p",{className:"font-mono text-xs",children:"该 PR 没有关联的 Issue"})]}):i.jsx("ul",{className:"space-y-2",children:e.map(o=>{const u=r.get(o.id)??0;return i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:()=>t(o.id),className:"group flex w-full flex-col gap-1.5 rounded-lg border border-line bg-elevated/30 px-4 py-3 text-left transition-colors hover:border-blue-500/40 hover:bg-elevated/60",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:ae("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",zB(o.state)),children:["#",o.number," ",o.state]}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:o.title}),u>0&&i.jsxs("span",{className:"shrink-0 rounded-full bg-elevated px-2 py-0.5 font-mono text-[10px] text-fg-5",children:[u," 次运行"]})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-fg-5",children:[o.authorLogin&&i.jsxs("span",{className:"flex items-center gap-1",children:[o.authorAvatar&&i.jsx("img",{src:o.authorAvatar,alt:"",className:"h-3.5 w-3.5 rounded-full"}),o.authorLogin]}),o.labels&&o.labels.length>0&&o.labels.map(c=>i.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${c.color}20`,color:`#${c.color}`},children:c.name},c.id))]})]})},o.id)})})}function JB({pr:e,isActive:t,onSelect:a}){return i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:a,className:ae("group flex w-full items-center gap-2.5 rounded-md px-2.5 py-2 text-left transition-colors",t?"border-l-2 border-blue-500 bg-elevated/80":"border-l-2 border-transparent hover:bg-elevated/50"),children:[i.jsx("span",{className:ae("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold ring-1",e.state==="merged"?"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-purple-500/25":e.state==="closed"?"bg-gradient-to-br from-red-500/20 to-red-500/5 text-red-400 ring-red-500/25":"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-emerald-500/25"),children:e.number}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[e.draft===1&&i.jsx("span",{className:"shrink-0 rounded px-1 py-0.5 text-[9px] font-bold bg-fg-6/15 text-fg-4",children:"DRAFT"}),i.jsx("span",{className:"min-w-0 text-xs font-medium text-fg-2 group-hover:text-fg",children:e.title})]}),i.jsxs("div",{className:"mt-0.5 truncate font-mono text-[10px] text-fg-6",children:[e.headBranch," → ",e.baseBranch]}),e.labels&&e.labels.length>0&&i.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:e.labels.map(r=>i.jsx("span",{className:"rounded px-1 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${r.color}20`,color:`#${r.color}`},children:r.name},r.id))})]})]})})}function eP({pr:e,onSelect:t}){return i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:t,className:"group flex w-full items-center gap-3 border-b border-line px-4 py-3 text-left transition-colors hover:bg-elevated/50",children:[i.jsx("span",{className:ae("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold ring-1",e.state==="merged"?"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-purple-500/25":e.state==="closed"?"bg-gradient-to-br from-red-500/20 to-red-500/5 text-red-400 ring-red-500/25":"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-emerald-500/25"),children:e.number}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[e.draft===1&&i.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[9px] font-bold tracking-wide bg-fg-6/15 text-fg-4",children:"DRAFT"}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:e.title}),e.mergeable==="false"&&e.state==="open"&&i.jsxs("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:[i.jsx(_n,{className:"inline h-3 w-3 -mt-px"})," Conflict"]}),e.assignees&&e.assignees.length>0&&i.jsx("div",{className:"hidden shrink-0 items-center -space-x-1.5 sm:flex",children:e.assignees.slice(0,3).map(a=>i.jsx("img",{src:a.avatar_url,alt:a.login,title:a.login,className:"h-5 w-5 rounded-full ring-2 ring-surface"},a.login))})]}),i.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[i.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-fg-5",children:[e.headBranch," → ",e.baseBranch]}),i.jsx("span",{className:"text-fg-6",children:"·"}),e.authorLogin&&i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"shrink-0 text-[11px] text-fg-5",title:e.authorLogin,children:[e.authorAvatar&&i.jsx("img",{src:e.authorAvatar,alt:"",className:"mr-1 inline-block h-3.5 w-3.5 rounded-full align-text-bottom"}),e.authorLogin]}),i.jsx("span",{className:"text-fg-6",children:"·"})]}),i.jsx("span",{className:"shrink-0 text-[11px] text-fg-6",children:Ap(e.createdAt)}),e.labels&&e.labels.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-fg-6",children:"·"}),e.labels.map(a=>i.jsx("span",{className:"rounded px-1.5 py-0.5 text-[11px] font-medium",style:{backgroundColor:`#${a.color}20`,color:`#${a.color}`},children:a.name},a.id))]})]})]})]})})}const $E=[{key:"open",label:"开放"},{key:"merged",label:"已合并"},{key:"closed",label:"已关闭"},{key:"all",label:"全部"}];function tP({issue:e,linked:t,onToggle:a}){return i.jsx("li",{children:i.jsx("button",{type:"button",onClick:a,className:ae("group flex w-full items-start gap-2 rounded-md px-3 py-2.5 text-left transition-colors",t?"border-l-2 border-emerald-500 bg-emerald-500/5":"border-l-2 border-transparent hover:bg-elevated/50"),children:i.jsx("div",{className:"min-w-0 flex-1",children:i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsxs("span",{className:ae("shrink-0 rounded px-1.5 py-0.5 font-mono text-xs font-medium",e.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",e.number]}),i.jsx("span",{className:"min-w-0 truncate text-sm font-medium text-fg-2",children:e.title}),t&&i.jsx(Yh,{className:"ml-auto h-3.5 w-3.5 shrink-0 text-emerald-400"})]})})})})}function nP({pr:e,tab:t,issueId:a,onTabChange:r,onSelectIssue:o,onBackToIssueList:u,onBack:c,onClose:f,onEnterMatch:m,onNavigateToIssue:h}){const b=Le(A=>A.activeRepoId),g=Ve(A=>A.issues),[y,N]=T.useState([]);T.useEffect(()=>{if(!b){N([]);return}Zh(b,e.number).then(N).catch(()=>N([]))},[b,e.number]);const S=a?g.find(A=>A.id===a)??y.find(A=>A.id===a)??null:null;return i.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[y.length>0&&i.jsxs("div",{className:"flex shrink-0 items-center border-b border-line bg-surface",children:[i.jsxs("button",{type:"button",onClick:()=>r("pr"),className:ae("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",t==="pr"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[i.jsx(zr,{className:"h-3.5 w-3.5"}),"PR"]}),i.jsxs("button",{type:"button",onClick:()=>r("issue"),className:ae("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",t==="issue"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[i.jsx(Vr,{className:"h-3.5 w-3.5"}),"Issue",i.jsx("span",{className:ae("rounded-full px-1.5 py-0.5 font-mono text-[10px]",t==="issue"?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:y.length})]})]}),t==="pr"||y.length===0?i.jsx(S_,{pr:e,onBack:c,onClose:f,onEnterMatch:m,onNavigateToIssue:h}):S?i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[i.jsx("div",{className:"flex shrink-0 items-center border-b border-line bg-elevated/30 px-4 py-2",children:i.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-1 rounded-md px-2 py-1 text-xs text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:[i.jsx(yo,{className:"h-3.5 w-3.5"}),"返回列表"]})}),i.jsx(v_,{issue:S,onBack:u})]}):i.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i.jsx("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:i.jsx(ZB,{issues:y,onSelect:o})})})]})}function aP(){const[e,t]=T.useState("open"),[a,r]=T.useState(""),o=hn(B=>B.setViewingPr),[u,c]=T.useState(""),[f,m]=Fh(),h=Sn(),b=Le(zn),g=hn(B=>B.pulls),y=hn(B=>B.syncing),N=hn(B=>B.syncPulls),S=hn(B=>B.matchingPrId),A=hn(B=>B.enterMatchMode),w=hn(B=>B.exitMatchMode),_=hn(B=>B.linkIssue),M=Le(B=>B.activeRepoId),k=Ve(B=>B.issues),L=f.get("id"),O=f.get("tab")==="issue"?"issue":"pr",P=f.get("issueId");T.useEffect(()=>{const B=f.get("prId");if(!B)return;const pe=new URLSearchParams(f);pe.delete("prId"),pe.set("id",B),m(pe,{replace:!0})},[f,m]),T.useEffect(()=>{if(f.get("id"))return;const B=hn.getState().viewingPrId;B&&m({id:B},{replace:!0})},[]);const z=T.useCallback(B=>{m({id:B},{replace:!1}),o(B)},[m,o]),J=T.useCallback(()=>{m({},{replace:!1}),o(null)},[m,o]),V=T.useCallback(B=>{if(!L)return;const pe={id:L};B==="issue"&&(pe.tab="issue"),m(pe,{replace:!1})},[L,m]),j=T.useCallback(B=>{L&&m({id:L,tab:"issue",issueId:B},{replace:!1})},[L,m]),ee=T.useCallback(()=>{L&&m({id:L,tab:"issue"},{replace:!1})},[L,m]),se=S?g.find(B=>B.id===S)??null:null,[he,te]=T.useState(new Set);T.useEffect(()=>{if(!M||!se){te(new Set);return}Zh(M,se.number).then(B=>te(new Set(B.map(pe=>pe.id)))).catch(()=>te(new Set))},[M,se]);const K=async B=>{if(!se)return;he.has(B.id)?await hn.getState().unlinkIssue(se.number,B.number)&&te(De=>{const lt=new Set(De);return lt.delete(B.id),lt}):await _(se.number,B.number)&&te(De=>new Set(De).add(B.id))},G=g.filter(B=>B.state==="open").length,F=g.filter(B=>B.state==="merged").length,$=g.filter(B=>B.state==="closed").length,q=e==="all"?g:g.filter(B=>B.state===e),D=a.trim().toLowerCase(),I=D?q.filter(B=>`#${B.number} ${B.title} ${B.headBranch} ${B.baseBranch}`.toLowerCase().includes(D)):q,W=u.trim().toLowerCase(),C=W?k.filter(B=>`#${B.number} ${B.title}`.toLowerCase().includes(W)):k,de=g.find(B=>B.id===L)??null,_e=se??de;return i.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 overflow-hidden",children:[i.jsxs("div",{className:ae("shrink-0 flex-col bg-surface",_e?"hidden md:flex md:w-80 border-r border-line":"flex w-full"),children:[S?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[i.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-400",children:"选择 Issue 关联"}),i.jsxs("button",{type:"button",onClick:w,className:"flex h-7 items-center gap-1 rounded-md px-2 text-xs text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:[i.jsx(dt,{className:"h-3.5 w-3.5"}),"完成"]})]}),i.jsx("div",{className:"border-b border-line px-3 py-2",children:i.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[i.jsx(Ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),i.jsx("input",{type:"text",value:u,onChange:B=>c(B.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),u&&i.jsx("button",{type:"button",onClick:()=>c(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:i.jsx(dt,{className:"h-3 w-3"})})]})}),i.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:C.length===0?i.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:k.length===0?"暂无 Issue,请先同步":"无匹配 Issue"}):i.jsx("ul",{className:"space-y-0.5",children:C.map(B=>i.jsx(tP,{issue:B,linked:he.has(B.id),onToggle:()=>void K(B)},B.id))})})]}):_e?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[i.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Pull Requests"}),M&&i.jsx("button",{type:"button",onClick:()=>void N(),disabled:y,title:"同步",className:"flex h-7 w-7 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:i.jsx($r,{className:ae("h-3.5 w-3.5",y&&"animate-spin")})})]}),i.jsx("div",{className:"flex border-b border-line",children:$E.map(({key:B,label:pe})=>{const Re=B==="open"?G:B==="merged"?F:B==="closed"?$:g.length;return i.jsxs("button",{type:"button",onClick:()=>t(B),className:ae("flex flex-1 items-center justify-center gap-1.5 py-2 text-xs font-medium transition-colors",e===B?"border-b-2 border-blue-500 text-blue-500":"text-fg-4 hover:text-fg-2"),children:[pe,i.jsx("span",{className:ae("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===B?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:Re})]},B)})}),i.jsx("div",{className:"border-b border-line px-3 py-2",children:i.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[i.jsx(Ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),i.jsx("input",{type:"text",value:a,onChange:B=>r(B.target.value),placeholder:"搜索 PR...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),a&&i.jsx("button",{type:"button",onClick:()=>r(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:i.jsx(dt,{className:"h-3 w-3"})})]})})]}):i.jsx(i.Fragment,{children:i.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-2 border-b border-line px-4 py-2.5",children:[i.jsx("span",{className:"shrink-0 text-sm font-semibold text-fg md:order-1",children:"Pull Requests"}),i.jsx("button",{type:"button",onClick:()=>void N(),disabled:y||!M,title:"同步 PR",className:"ml-auto flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2 disabled:opacity-40 md:order-last md:ml-0",children:i.jsx($r,{className:ae("h-4 w-4",y&&"animate-spin")})}),i.jsx("div",{className:"w-full md:order-2 md:w-auto",children:i.jsx("div",{className:"flex shrink-0 items-center rounded-lg bg-elevated/60 p-0.5",children:$E.map(({key:B,label:pe})=>{const Re=B==="open"?G:B==="merged"?F:B==="closed"?$:g.length;return i.jsxs("button",{type:"button",onClick:()=>t(B),className:ae("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",e===B?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[pe,i.jsx("span",{className:ae("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===B?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:Re})]},B)})})}),i.jsx("div",{className:"w-full md:order-3 md:w-auto md:min-w-0 md:flex-1 md:px-1",children:i.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2.5 py-1.5",children:[i.jsx(Ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),i.jsx("input",{type:"text",value:a,onChange:B=>r(B.target.value),placeholder:"搜索 PR...",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),a&&i.jsx("button",{type:"button",onClick:()=>r(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:i.jsx(dt,{className:"h-3 w-3"})})]})})]})}),!S&&i.jsx("div",{className:ae("flex-1 overflow-y-auto",_e?"px-2 py-2":"px-3 py-3"),children:M?I.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-fg-5",children:[i.jsx(zr,{className:"h-8 w-8"}),i.jsx("p",{className:"font-mono text-xs",children:g.length===0?"点击 ↻ 同步 PR":"没有匹配的 PR"})]}):i.jsx("ul",{className:ae(_e?"space-y-0.5":"space-y-1"),children:I.map(B=>_e?i.jsx(JB,{pr:B,isActive:B.id===(L??S),onSelect:()=>z(B.id)},B.id):i.jsx(eP,{pr:B,onSelect:()=>z(B.id)},B.id))}):i.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]}),_e?i.jsx(nP,{pr:_e,tab:O,issueId:P,onTabChange:V,onSelectIssue:j,onBackToIssueList:ee,onBack:()=>{J(),S&&w()},onClose:()=>{J(),S&&w()},onEnterMatch:()=>A(_e.id),onNavigateToIssue:B=>{b&&h(`/${encodeURIComponent(b)}/dev/issues?id=${encodeURIComponent(B)}`)}},`${_e.id}-${S??"view"}`):i.jsx("div",{className:"hidden flex-1 items-center justify-center md:flex",children:i.jsxs("div",{className:"text-center text-fg-5",children:[i.jsx(zr,{className:"mx-auto h-12 w-12 opacity-20"}),i.jsx("p",{className:"mt-3 font-mono text-xs",children:"选择一个 PR 查看详情"})]})})]})}function qE(e,t){return e?`/${encodeURIComponent(e)}/dev/${t}`:`/dev/${t}`}function YE(){const e=Sn(),t=vn(),a=Le(zn),r=Ve(m=>m.issues),o=hn(m=>m.pulls),u=t.pathname.endsWith("/pulls")?"pulls":"issues",c=r.filter(m=>m.state==="open").length,f=o.filter(m=>m.state==="open").length;return i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[i.jsx("div",{className:"flex shrink-0 items-center gap-1 border-b border-line bg-surface px-3 py-2",children:i.jsxs("div",{className:"flex items-center rounded-lg bg-elevated/60 p-0.5",children:[i.jsxs("button",{type:"button",onClick:()=>e(qE(a,"issues")),className:ae("flex items-center gap-1.5 rounded-md px-3 py-1 text-xs font-medium transition-colors",u==="issues"?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[i.jsx(Vr,{className:"h-3.5 w-3.5"}),"Issues",i.jsx("span",{className:ae("rounded-full px-1.5 py-0.5 font-mono text-[10px]",u==="issues"?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:c})]}),i.jsxs("button",{type:"button",onClick:()=>e(qE(a,"pulls")),className:ae("flex items-center gap-1.5 rounded-md px-3 py-1 text-xs font-medium transition-colors",u==="pulls"?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[i.jsx(zr,{className:"h-3.5 w-3.5"}),"PRs",i.jsx("span",{className:ae("rounded-full px-1.5 py-0.5 font-mono text-[10px]",u==="pulls"?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:f})]})]})}),i.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 overflow-hidden",children:u==="issues"?i.jsx(WB,{}):i.jsx(aP,{})})]})}const sP=["Sisyphus - ultraworker","Prometheus - Plan Builder","Atlas - Plan Executor"],rP="pinned_models",Dr="__system_prompt__",GE=[{bg:"bg-blue-500/15",text:"text-blue-500"},{bg:"bg-purple-500/15",text:"text-purple-500"},{bg:"bg-emerald-500/15",text:"text-emerald-500"},{bg:"bg-amber-500/15",text:"text-amber-500"},{bg:"bg-rose-500/15",text:"text-rose-500"},{bg:"bg-cyan-500/15",text:"text-cyan-500"},{bg:"bg-indigo-500/15",text:"text-indigo-500"},{bg:"bg-orange-500/15",text:"text-orange-500"}];function iP(e){const t=e.trim(),a=t.charCodeAt(0)||0;return{...GE[a%GE.length],initial:(t.charAt(0)||"?").toUpperCase()}}function lP({agent:e,memoryCount:t,sessionCount:a,onClick:r,onDelete:o}){const[u,c]=T.useState(!1),f=e.isSystem===1,m=iP(e.name);return i.jsxs("div",{className:"flex cursor-pointer flex-col rounded-xl border border-line bg-surface transition-colors hover:border-fg-6/60",onClick:r,children:[i.jsxs("div",{className:"flex items-start gap-3 p-4 pb-3",children:[i.jsx("div",{className:ae("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-sm font-semibold",m.bg,m.text),children:m.initial}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"truncate text-sm font-semibold text-fg",children:e.name}),f&&i.jsx("span",{className:"shrink-0 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-400",children:"系统"}),e.repoId&&i.jsx("span",{className:"shrink-0 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-medium text-blue-400",children:"repo"})]}),i.jsxs("p",{className:"mt-0.5 text-[11px] text-fg-4",children:[i.jsx("span",{className:"font-mono",children:e.baseAgent}),e.model&&i.jsxs("span",{className:"ml-1.5 text-fg-5",children:["· ",e.model]})]}),e.description&&i.jsx("p",{className:"mt-1 text-xs text-fg-5 line-clamp-2",children:e.description})]})]}),i.jsxs("div",{className:"flex items-center gap-4 border-t border-line/60 px-4 py-2.5",children:[i.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-fg-5",children:[i.jsx(Yi,{className:"h-3 w-3"}),i.jsxs("span",{children:["记忆 ",t]})]}),i.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-fg-5",children:[i.jsx(Qc,{className:"h-3 w-3"}),i.jsxs("span",{children:["会话 ",a]})]}),i.jsx("div",{className:"flex-1"}),!f&&!u&&i.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),c(!0)},title:"删除",className:"rounded p-1 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100 [.group:hover_&]:opacity-100",children:i.jsx(ws,{className:"h-3.5 w-3.5"})}),u&&i.jsxs("div",{className:"flex items-center gap-0.5",onClick:h=>h.stopPropagation(),children:[i.jsx("button",{type:"button",onClick:o,className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:i.jsx(In,{className:"h-3.5 w-3.5"})}),i.jsx("button",{type:"button",onClick:()=>c(!1),className:"rounded p-1 text-fg-4 hover:bg-elevated",children:i.jsx(dt,{className:"h-3.5 w-3.5"})})]})]})]})}function oP({initial:e,availableFragments:t,onSave:a,onCancel:r}){const o=Le(K=>K.activeRepoId),[u,c]=T.useState((e==null?void 0:e.name)??""),[f,m]=T.useState((e==null?void 0:e.description)??""),[h,b]=T.useState((e==null?void 0:e.baseAgent)??"Sisyphus - ultraworker"),[g,y]=T.useState((e==null?void 0:e.model)??""),[N,S]=T.useState((e==null?void 0:e.variant)??""),[A,w]=T.useState((e==null?void 0:e.systemPrompt)??""),[_,M]=T.useState(!1),[k,L]=T.useState(!1),[O,P]=T.useState([]);T.useEffect(()=>{if(!o){P([]);return}let K=!1;return(async()=>{try{const[G,F]=await Promise.all([Mo(),Io(o)]);if(K)return;const $=G[rP],q=$?JSON.parse($):[];P(q.length>0?F.filter(D=>q.includes(D.id)):[])}catch{K||P([])}})(),()=>{K=!0}},[o]);const[z,J]=T.useState(()=>{const K=(e==null?void 0:e.fragments.map(q=>q.id))??[],G=(e==null?void 0:e.systemPromptPosition)??-1,F=G>=0&&G<=K.length?G:K.length,$=[...K];return $.splice(F,0,Dr),$}),V=K=>{J(G=>{if(G.includes(K))return G.filter(q=>q!==K);const F=G.indexOf(Dr),$=[...G];return $.splice(F>=0?F:$.length,0,K),$})},j=(K,G)=>{const F=K+G;F<0||F>=z.length||J($=>{const q=[...$];return[q[K],q[F]]=[q[F],q[K]],q})},ee=z.filter(K=>K!==Dr),se=(()=>{const K=z.indexOf(Dr);return K<0?-1:z.slice(0,K).filter(G=>G!==Dr).length})(),he=z.map(K=>{var G;return K===Dr?A:(G=t.find(F=>F.id===K))==null?void 0:G.content}).filter(Boolean).join(`
|
|
516
|
-
|
|
517
|
-
---
|
|
518
|
-
|
|
519
|
-
`),te=async()=>{if(!(!u.trim()||!h)){L(!0);try{await a({name:u.trim(),description:f.trim()||void 0,baseAgent:h,model:g.trim()||void 0,variant:N.trim()||void 0,systemPrompt:A,systemPromptPosition:se,fragmentIds:ee})}finally{L(!1)}}};return i.jsxs("div",{className:"space-y-3 rounded-xl border border-line bg-surface p-5",children:[i.jsxs("div",{className:"flex gap-3",children:[i.jsxs("label",{className:"flex-1",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"名称"}),i.jsx("input",{type:"text",value:u,onChange:K=>c(K.target.value),placeholder:"代码审查员",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),i.jsxs("label",{className:"w-36",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Base Agent"}),i.jsx("select",{value:h,onChange:K=>b(K.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg focus:border-blue-500 focus:outline-none",children:sP.map(K=>i.jsx("option",{value:K,children:K},K))})]})]}),i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"描述(可选)"}),i.jsx("input",{type:"text",value:f,onChange:K=>m(K.target.value),placeholder:"一句话描述这个 Agent 的用途",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),i.jsxs("div",{className:"flex gap-3",children:[i.jsxs("div",{className:"flex-1",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"模型(可选)"}),i.jsxs("select",{value:g,onChange:K=>y(K.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[i.jsx("option",{value:"",children:"默认模型"}),O.map(K=>i.jsx("option",{value:K.id,children:K.name||K.id},K.id))]}),O.length===0&&i.jsx("p",{className:"mt-1 text-[11px] text-fg-5",children:"在设置的「模型」中勾选常用模型后可选择。"})]}),i.jsxs("div",{className:"w-28",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Variant"}),i.jsxs("select",{value:N,onChange:K=>S(K.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[i.jsx("option",{value:"",children:"默认"}),i.jsx("option",{value:"max",children:"max"}),i.jsx("option",{value:"high",children:"high"})]})]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"提示词组合"}),i.jsx("p",{className:"mt-0.5 text-[11px] text-fg-5",children:"排序片段与补充指令的拼接顺序。"}),i.jsxs("div",{className:"mt-1.5 space-y-1",children:[z.map((K,G)=>{if(K===Dr)return i.jsxs("div",{className:"flex items-center gap-2 rounded border border-amber-500/30 bg-amber-500/5 px-2 py-1",children:[i.jsxs("div",{className:"flex flex-col",children:[i.jsx("button",{type:"button",onClick:()=>j(G,-1),disabled:G===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),i.jsx("button",{type:"button",onClick:()=>j(G,1),disabled:G===z.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),i.jsx("span",{className:"flex-1 truncate text-xs font-medium text-amber-400",children:"✎ 补充指令"})]},K);const F=t.find($=>$.id===K);return F?i.jsxs("div",{className:"flex items-center gap-2 rounded border border-blue-500/30 bg-blue-500/5 px-2 py-1",children:[i.jsxs("div",{className:"flex flex-col",children:[i.jsx("button",{type:"button",onClick:()=>j(G,-1),disabled:G===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),i.jsx("button",{type:"button",onClick:()=>j(G,1),disabled:G===z.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),i.jsx("span",{className:"flex-1 truncate text-xs text-fg",children:F.name}),i.jsx("button",{type:"button",onClick:()=>V(K),className:"text-fg-5 hover:text-red-400",children:i.jsx(dt,{className:"h-3 w-3"})})]},K):null}),t.filter(K=>!ee.includes(K.id)).length>0&&i.jsxs("select",{value:"",onChange:K=>{K.target.value&&V(K.target.value)},className:"w-full rounded border border-dashed border-line bg-base px-2 py-1 text-xs text-fg-4 focus:border-blue-500 focus:outline-none",children:[i.jsx("option",{value:"",children:"+ 添加片段…"}),t.filter(K=>!ee.includes(K.id)).map(K=>i.jsx("option",{value:K.id,children:K.name},K.id))]})]})]}),i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"补充指令内容"}),i.jsx("textarea",{value:A,onChange:K=>w(K.target.value),rows:3,placeholder:"agent 级别的补充指令…",className:"mt-1 w-full resize-y rounded-md border border-line bg-base px-3 py-2 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),(ee.length>0||A)&&i.jsxs("div",{children:[i.jsxs("button",{type:"button",onClick:()=>M(!_),className:"flex items-center gap-1 text-xs font-medium text-fg-4 hover:text-fg-3",children:[i.jsx("span",{children:_?"▾":"▸"})," 预览最终提示词"]}),_&&i.jsx("pre",{className:"mt-1 max-h-48 overflow-auto rounded border border-line bg-elevated px-3 py-2 font-mono text-xs leading-relaxed text-fg-4",children:he||"(空)"})]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[i.jsx("button",{type:"button",onClick:r,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),i.jsx("button",{type:"button",onClick:()=>void te(),disabled:k||!u.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:k?"保存中…":e?"更新":"创建"})]})]})}function uP({fragment:e,onEdit:t,onDelete:a}){const[r,o]=T.useState(!1);return i.jsxs("div",{className:"group flex items-center gap-3 rounded-lg border border-line bg-base px-3 py-2",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("span",{className:"text-xs font-medium text-fg",children:e.name}),e.content&&i.jsx("p",{className:"mt-0.5 truncate font-mono text-[11px] text-fg-5",children:e.content})]}),i.jsx("div",{className:"flex items-center gap-1",children:r?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",onClick:a,className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:i.jsx(In,{className:"h-3.5 w-3.5"})}),i.jsx("button",{type:"button",onClick:()=>o(!1),className:"rounded p-1 text-fg-4 hover:bg-elevated",children:i.jsx(dt,{className:"h-3.5 w-3.5"})})]}):i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-fg-5 opacity-0 transition-opacity hover:text-fg-3 group-hover:opacity-100",children:i.jsx(Kh,{className:"h-3.5 w-3.5"})}),i.jsx("button",{type:"button",onClick:()=>o(!0),className:"rounded p-1 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100",children:i.jsx(ws,{className:"h-3.5 w-3.5"})})]})})]})}function KE({initial:e,onSave:t,onCancel:a}){const[r,o]=T.useState((e==null?void 0:e.name)??""),[u,c]=T.useState((e==null?void 0:e.content)??""),[f,m]=T.useState(!1),h=async()=>{if(r.trim()){m(!0);try{await t({name:r.trim(),content:u})}finally{m(!1)}}};return i.jsxs("div",{className:"space-y-2 rounded-lg border border-line bg-base p-3",children:[i.jsx("input",{type:"text",value:r,onChange:b=>o(b.target.value),placeholder:"片段名称",className:"w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),i.jsx("textarea",{value:u,onChange:b=>c(b.target.value),rows:3,placeholder:"提示词内容…",className:"w-full resize-y rounded-md border border-line bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx("button",{type:"button",onClick:a,className:"rounded-md px-3 py-1 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),i.jsx("button",{type:"button",onClick:()=>void h(),disabled:f||!r.trim(),className:"rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white hover:bg-blue-500 disabled:opacity-40",children:f?"保存中…":e?"更新":"创建"})]})]})}function cP({onImported:e,onCancel:t}){const[a,r]=T.useState(""),[o,u]=T.useState(!1),[c,f]=T.useState(null),m=T.useRef(null),h=async g=>{f(null);let y;try{y=JSON.parse(g)}catch{f("JSON 格式无效");return}if(y.type!=="fourth-spark-custom-agent"||!y.agent){f("不是有效的 Custom Agent 导出文件");return}u(!0);try{await m5(y),e()}catch(N){f(N instanceof Error?N.message:String(N))}finally{u(!1)}},b=g=>{var S;const y=(S=g.target.files)==null?void 0:S[0];if(!y)return;const N=new FileReader;N.onload=()=>{const A=N.result;r(A),h(A)},N.readAsText(y)};return i.jsxs("div",{className:"space-y-3 rounded-xl border border-line bg-surface p-5",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"导入 Custom Agent"}),i.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-fg-5 hover:text-fg-3",children:i.jsx(dt,{className:"h-3.5 w-3.5"})})]}),i.jsx("input",{ref:m,type:"file",accept:".json",onChange:b,className:"hidden"}),i.jsxs("button",{type:"button",onClick:()=>{var g;return(g=m.current)==null?void 0:g.click()},className:"flex w-full items-center justify-center gap-1.5 rounded-md border border-dashed border-line py-2.5 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[i.jsx(Oy,{className:"h-3.5 w-3.5"})," 上传 JSON 文件"]}),i.jsx("textarea",{value:a,onChange:g=>r(g.target.value),rows:4,placeholder:"或粘贴 JSON 内容…",className:"w-full resize-y rounded-md border border-line bg-base px-3 py-2 font-mono text-xs leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),c&&i.jsxs("div",{className:"flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[i.jsx(_n,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),i.jsx("span",{children:c})]}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx("button",{type:"button",onClick:t,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),i.jsx("button",{type:"button",onClick:()=>void h(a),disabled:o||!a.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:o?"导入中…":"导入"})]})]})}function dP(){const e=Sn(),t=Le(zn),a=Le(te=>te.activeRepoId),[r,o]=T.useState([]),[u,c]=T.useState([]),[f,m]=T.useState(!0),[h,b]=T.useState(!1),[g,y]=T.useState(!1),[N,S]=T.useState(null),[A,w]=T.useState(!1),[_,M]=T.useState(!1),[k,L]=T.useState({}),[O,P]=T.useState({}),z=T.useCallback(()=>{const te=a?zy(a):Uy();Promise.all([te,$y()]).then(([K,G])=>{o(K),c(G),m(!1)}).catch(()=>m(!1))},[a]);T.useEffect(()=>{m(!0),z()},[z]),T.useEffect(()=>{if(r.length===0)return;const te=r.filter(K=>K.isSystem<2);for(const K of te)Fy(K.id).then(G=>{L(F=>({...F,[K.id]:G.filter($=>!$.supersededBy).length}))}).catch(()=>{}),Wh(K.id).then(G=>{P(F=>({...F,[K.id]:G.length}))}).catch(()=>{})},[r]);const J=r.filter(te=>te.isSystem<2),V=async te=>{a?await x5(a,te):await d5(te),b(!1),z(),or.getState().loadAgents()},j=async te=>{await Hy(te),o(K=>K.filter(G=>G.id!==te)),or.getState().loadAgents()},ee=async te=>{await E5(te),y(!1),z()},se=async te=>{N&&(await y5(N.id,te),S(null),z())},he=async te=>{await N5(te),c(K=>K.filter(G=>G.id!==te))};return a?i.jsx("div",{className:"flex-1 overflow-y-auto",children:i.jsxs("div",{className:"mx-auto max-w-4xl space-y-6 p-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-lg font-bold text-fg",children:"Agents"}),i.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"组合 base agent + 模型 + 提示词片段,创建 Session 时选择。"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>{w(!0),b(!1)},className:"flex items-center gap-1.5 rounded-md border border-line px-3 py-1.5 text-xs font-medium text-fg-3 transition-colors hover:bg-elevated",children:[i.jsx(Oy,{className:"h-3.5 w-3.5"})," 导入"]}),i.jsxs("button",{type:"button",onClick:()=>{b(!0),w(!1)},className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500",children:[i.jsx(Ma,{className:"h-3.5 w-3.5"})," 创建"]})]})]}),h&&i.jsx(oP,{availableFragments:u,onSave:V,onCancel:()=>b(!1)}),A&&i.jsx(cP,{onImported:()=>{w(!1),z(),or.getState().loadAgents()},onCancel:()=>w(!1)}),f?i.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-16 text-fg-5",children:[i.jsx(un,{className:"h-5 w-5 fs-spin"}),i.jsx("p",{className:"text-xs",children:"加载中…"})]}):J.length===0&&!h?i.jsxs("div",{className:"flex flex-col items-center gap-3 py-16 text-fg-5",children:[i.jsx(Yi,{className:"h-8 w-8 text-fg-6"}),i.jsx("p",{className:"text-sm",children:"还没有 Agent"}),i.jsx("p",{className:"text-xs text-fg-5",children:"点击上方「创建」开始。"})]}):i.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:J.map(te=>i.jsx("div",{className:"group",children:i.jsx(lP,{agent:te,memoryCount:k[te.id]??0,sessionCount:O[te.id]??0,onClick:()=>e(`/${encodeURIComponent(t??"")}/agents/${te.id}`),onDelete:()=>void j(te.id)})},te.id))}),i.jsxs("section",{className:"rounded-xl border border-line bg-surface",children:[i.jsxs("button",{type:"button",onClick:()=>M(!_),className:"flex w-full items-center justify-between px-5 py-4 text-left",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"提示词片段"}),i.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"可复用的提示词模块,可在多个 Agent 间共享。"})]}),i.jsx(sa,{className:ae("h-4 w-4 shrink-0 text-fg-4 transition-transform",_&&"rotate-180")})]}),_&&i.jsx("div",{className:"border-t border-line px-5 pb-5 pt-3",children:i.jsxs("div",{className:"space-y-1.5",children:[u.map(te=>(N==null?void 0:N.id)===te.id?i.jsx(KE,{initial:te,onSave:se,onCancel:()=>S(null)},te.id):i.jsx(uP,{fragment:te,onEdit:()=>S(te),onDelete:()=>void he(te.id)},te.id)),g?i.jsx(KE,{onSave:ee,onCancel:()=>y(!1)}):i.jsxs("button",{type:"button",onClick:()=>y(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-line py-2 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[i.jsx(Ma,{className:"h-3.5 w-3.5"})," 添加片段"]})]})})]})]})}):i.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:i.jsx("p",{className:"text-sm text-fg-4",children:"请先在顶部选择一个仓库。"})})}const fP=["Sisyphus - ultraworker","Prometheus - Plan Builder","Atlas - Plan Executor"],mP="pinned_models",jr="__system_prompt__",VE=[{bg:"bg-blue-500/15",text:"text-blue-500"},{bg:"bg-purple-500/15",text:"text-purple-500"},{bg:"bg-emerald-500/15",text:"text-emerald-500"},{bg:"bg-amber-500/15",text:"text-amber-500"},{bg:"bg-rose-500/15",text:"text-rose-500"},{bg:"bg-cyan-500/15",text:"text-cyan-500"},{bg:"bg-indigo-500/15",text:"text-indigo-500"},{bg:"bg-orange-500/15",text:"text-orange-500"}];function hP(e){const t=e.trim(),a=t.charCodeAt(0)||0;return{...VE[a%VE.length],initial:(t.charAt(0)||"?").toUpperCase()}}const XE=[{bg:"bg-blue-500/10",text:"text-blue-400"},{bg:"bg-amber-500/10",text:"text-amber-400"},{bg:"bg-green-500/10",text:"text-green-400"},{bg:"bg-purple-500/10",text:"text-purple-400"},{bg:"bg-cyan-500/10",text:"text-cyan-400"},{bg:"bg-rose-500/10",text:"text-rose-400"},{bg:"bg-indigo-500/10",text:"text-indigo-400"},{bg:"bg-orange-500/10",text:"text-orange-400"}],pP={bg:"bg-elevated",text:"text-fg-4"};function k_(e){if(e==="general")return pP;let t=0;for(let a=0;a<e.length;a++)t=(t<<5)-t+e.charCodeAt(a)|0;return XE[Math.abs(t)%XE.length]}function Qi(e){const t=Date.now()-e,a=Math.floor(t/6e4);if(a<1)return"刚刚";if(a<60)return`${a} 分钟前`;const r=Math.floor(a/60);if(r<24)return`${r} 小时前`;const o=Math.floor(r/24);return o<30?`${o} 天前`:`${Math.floor(o/30)} 个月前`}const R_={create:{label:"首次提取",color:"text-green-400"},update:{label:"重写",color:"text-blue-400"},merge:{label:"合并",color:"text-purple-400"},decay:{label:"衰减",color:"text-amber-400"},reinforce:{label:"强化",color:"text-emerald-400"},manual:{label:"手动编辑",color:"text-fg-3"}};function gP({memory:e,onClose:t}){const a=[...e.history??[]].reverse();return i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:i.jsxs("div",{className:"mx-4 max-h-[80vh] w-full max-w-lg overflow-y-auto rounded-xl border border-line bg-surface p-5 shadow-xl",onClick:r=>r.stopPropagation(),children:[i.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[i.jsxs("h3",{className:"text-sm font-semibold text-fg",children:["版本历史 (",a.length+1," 个版本)"]}),i.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-fg-4 hover:text-fg-3",children:i.jsx(dt,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"rounded-lg border border-blue-500/20 bg-blue-500/5 p-3",children:[i.jsxs("div",{className:"mb-1 flex items-center gap-2 text-[10px]",children:[i.jsx("span",{className:"font-medium text-blue-400",children:"当前版本"}),i.jsx("span",{className:"text-fg-5",children:Qi(e.updatedAt)}),i.jsxs("span",{className:"text-fg-6",children:["⚡ ",e.importance.toFixed(2)]})]}),i.jsx("p",{className:"text-xs leading-relaxed text-fg",children:e.content})]}),a.map((r,o)=>{const u=R_[r.action]??{label:r.action,color:"text-fg-4"};return i.jsxs("div",{className:"rounded-lg border border-line bg-base p-3",children:[i.jsxs("div",{className:"mb-1 flex items-center gap-2 text-[10px]",children:[i.jsx("span",{className:ae("font-medium",u.color),children:u.label}),i.jsx("span",{className:"text-fg-5",children:Qi(r.ts)}),i.jsxs("span",{className:"text-fg-6",children:["⚡ ",r.importance.toFixed(2)]}),r.source&&i.jsxs("span",{className:"text-fg-6",children:["· ",r.source]})]}),i.jsx("p",{className:"text-xs leading-relaxed text-fg-4",children:r.content})]},o)}),a.length===0&&i.jsx("div",{className:"py-4 text-center text-xs text-fg-5",children:"暂无历史版本"})]})]})})}function QE({memory:e,categories:t,onUpdate:a,onDelete:r}){var O;const[o,u]=T.useState(!1),[c,f]=T.useState(e.content),[m,h]=T.useState(e.category),[b,g]=T.useState(!1),[y,N]=T.useState(!1),[S,A]=T.useState(!1),w=k_(e.category),_=(O=e.history)==null?void 0:O[e.history.length-1],M=_&&Math.abs(_.importance-e.importance)>.001,k=async()=>{g(!0);try{await a(e.id,{content:c,category:m}),u(!1)}finally{g(!1)}},L=async()=>{N(!1),await r(e.id)};return o?i.jsxs("div",{className:"rounded-lg border border-blue-500/30 bg-blue-500/5 p-3 space-y-2",children:[i.jsx("textarea",{value:c,onChange:P=>f(P.target.value),rows:3,className:"w-full resize-y rounded-md border border-line bg-surface px-3 py-2 font-mono text-xs leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("select",{value:m,onChange:P=>h(P.target.value),className:"rounded-md border border-line bg-surface px-2 py-1 text-xs text-fg focus:border-blue-500 focus:outline-none",children:t.map(P=>i.jsx("option",{value:P,children:P},P))}),i.jsx("div",{className:"flex-1"}),i.jsx("button",{type:"button",onClick:()=>{u(!1),f(e.content),h(e.category)},className:"rounded-md px-3 py-1 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),i.jsx("button",{type:"button",onClick:()=>void k(),disabled:b||!c.trim(),className:"rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white hover:bg-blue-500 disabled:opacity-40",children:b?"保存中…":"保存"})]})]}):i.jsxs("div",{className:"group/mem rounded-lg border border-line bg-base px-3 py-2.5",children:[i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("span",{className:ae("mt-0.5 shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",w.bg,w.text),children:e.category}),i.jsx("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-fg",children:e.content})]}),i.jsxs("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-fg-5",children:[i.jsxs("span",{className:"flex items-center gap-0.5",children:[i.jsx(Zc,{className:"h-3 w-3"}),M&&_?`${_.importance.toFixed(2)}→${e.importance.toFixed(2)}`:e.importance.toFixed(2)]}),i.jsx("span",{children:"·"}),i.jsx("span",{children:Qi(e.updatedAt)}),e.supersededBy&&i.jsxs(i.Fragment,{children:[i.jsx("span",{children:"·"}),i.jsx("span",{className:"text-amber-400",children:e.supersededBy==="user-deleted"?"已删除":e.supersededBy==="consolidated-out"?"已整理":"已合并"})]}),e.history&&e.history.length>0&&(()=>{const P=e.history[e.history.length-1],z=R_[P.action];return i.jsxs("button",{type:"button",onClick:()=>A(!0),className:ae("rounded px-1.5 py-0.5 text-[10px] font-medium transition-opacity hover:opacity-80",P.action==="update"?"bg-blue-500/10 text-blue-400":P.action==="merge"?"bg-purple-500/10 text-purple-400":P.action==="decay"?"bg-amber-500/10 text-amber-400":P.action==="reinforce"?"bg-emerald-500/10 text-emerald-400":P.action==="manual"?"bg-fg/10 text-fg-3":"bg-green-500/10 text-green-400"),children:[(z==null?void 0:z.label)??P.action," · ",e.history.length,"版"]})})(),i.jsx("div",{className:"flex-1"}),!e.supersededBy&&i.jsx("div",{className:"flex items-center gap-0.5 opacity-0 transition-opacity group-hover/mem:opacity-100",children:y?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",onClick:()=>void L(),className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:i.jsx(In,{className:"h-3.5 w-3.5"})}),i.jsx("button",{type:"button",onClick:()=>N(!1),className:"rounded p-1 text-fg-4 hover:bg-elevated",children:i.jsx(dt,{className:"h-3.5 w-3.5"})})]}):i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",onClick:()=>u(!0),className:"rounded p-1 text-fg-5 hover:text-fg-3",children:i.jsx(Kh,{className:"h-3.5 w-3.5"})}),i.jsx("button",{type:"button",onClick:()=>N(!0),className:"rounded p-1 text-fg-5 hover:text-red-400",children:i.jsx(ws,{className:"h-3.5 w-3.5"})})]})})]}),S&&i.jsx(gP,{memory:e,onClose:()=>A(!1)})]})}const bP=14400*1e3;function xP(e){if(!e)return"下次:待定";const t=e+bP,a=Date.now();if(t<=a)return"下次:即将运行";const r=t-a,o=Math.floor(r/6e4);if(o<60)return`下次:约 ${o} 分钟后`;const u=Math.floor(o/60);return u<24?`下次:约 ${u} 小时后`:`下次:约 ${Math.floor(u/24)} 天后`}function EP({stats:e,running:t,onTrigger:a}){if(!e)return null;const r=e.lastActions;return i.jsxs("div",{className:"rounded-lg bg-elevated px-3 py-2 text-[11px] tabular-nums text-fg-5",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[i.jsx("span",{children:e.lastConsolidatedAt?`上次整理:${Qi(e.lastConsolidatedAt)}`:"尚未整理"}),i.jsx("span",{className:"text-fg-6",children:"·"}),i.jsx("span",{children:xP(e.lastConsolidatedAt)}),i.jsx("div",{className:"flex-1"}),i.jsx("button",{type:"button",onClick:a,disabled:t,className:"rounded px-2 py-0.5 text-[10px] font-medium text-fg-4 transition-colors hover:bg-surface hover:text-fg-3 disabled:opacity-40",children:t?"整理中…":"立即整理"})]}),i.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1",children:[r&&i.jsxs(i.Fragment,{children:[i.jsxs("span",{children:[r.update," 更新 ",r.merge," 合并 ",r.delete," 清理 ",r.decayed," 降权"]}),i.jsx("span",{className:"text-fg-6",children:"·"})]}),i.jsxs("span",{children:["活跃 ",e.totalActive," 条"]}),i.jsx("span",{className:"text-fg-6",children:"·"}),i.jsxs("span",{children:["衰减中 ",e.stale]})]})]})}function yP({agentId:e}){const[t,a]=T.useState([]),[r,o]=T.useState(!0),[u,c]=T.useState(null),[f,m]=T.useState(!1),[h,b]=T.useState([]),[g,y]=T.useState(!0),[N,S]=T.useState(!1),[A,w]=T.useState(new Set),[_,M]=T.useState(!1),[k,L]=T.useState(null),[O,P]=T.useState(null),[z,J]=T.useState(!1),V=T.useCallback(async()=>{o(!0);try{const I=await Fy(e,{includeSuperseded:f});a(I)}catch{a([])}o(!1)},[e,f]),j=T.useCallback(()=>{Rx(e).then(P).catch(()=>P(null))},[e]);T.useEffect(()=>{V()},[V]),T.useEffect(()=>{j()},[j]);const ee=async()=>{J(!0);try{await b5(e)}catch{J(!1);return}const I=setInterval(()=>{Rx(e).then(W=>{P(W),W.lastConsolidatedAt&&(!(O!=null&&O.lastConsolidatedAt)||W.lastConsolidatedAt>O.lastConsolidatedAt)&&(clearInterval(I),J(!1),V())}).catch(()=>{})},5e3);setTimeout(()=>{clearInterval(I),J(!1)},3e5)};T.useEffect(()=>{if(!N)return;let I=!1;return y(!0),Wh(e).then(W=>{I||b(W)}).catch(()=>{I||b([])}).finally(()=>{I||y(!1)}),()=>{I=!0}},[e,N]);const se=t.filter(I=>!I.supersededBy),he=u?se.filter(I=>I.category===u):se,te=t.filter(I=>I.supersededBy),K=T.useMemo(()=>new Set(t.map(I=>I.sessionId).filter(Boolean)),[t]),G=async(I,W)=>{await h5(e,I,W),await V()},F=async I=>{await p5(e,I),await V()},$=I=>{w(W=>{const C=new Set(W);return C.has(I)?C.delete(I):C.add(I),C})},q=async()=>{if(A.size!==0){M(!0),L(null);try{const C=(await g5(e,[...A])).results;if(C){const de=C.filter(B=>B.status==="ok"),_e=C.filter(B=>B.status!=="ok");de.length>0&&L(`提取成功 ${de.reduce((B,pe)=>B+(pe.actions??0),0)} 条记忆`),_e.length>0&&L(B=>(B?B+";":"")+_e.map(pe=>pe.error??pe.status).join(";")),de.length>0&&await V()}w(new Set)}catch(I){L(`请求失败: ${I instanceof Error?I.message:String(I)}`)}M(!1)}},D=T.useMemo(()=>[...new Set(se.map(W=>W.category))].sort(),[se]);return i.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5 space-y-4",children:[i.jsx("div",{className:"flex items-center justify-between",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Yi,{className:"h-4 w-4 text-purple-400"}),i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"记忆"}),!r&&i.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 text-[10px] tabular-nums text-fg-4",children:he.length})]})}),i.jsx(EP,{stats:O,running:z,onTrigger:()=>void ee()}),i.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[i.jsx("button",{type:"button",onClick:()=>c(null),className:ae("rounded-full px-2.5 py-0.5 text-[11px] font-medium transition-colors",u===null?"bg-fg/10 text-fg":"text-fg-4 hover:text-fg-3"),children:"全部"}),D.map(I=>{const W=k_(I);return i.jsx("button",{type:"button",onClick:()=>c(u===I?null:I),className:ae("rounded-full px-2.5 py-0.5 text-[11px] font-medium transition-colors",u===I?ae(W.bg,W.text):"text-fg-4 hover:text-fg-3"),children:I},I)})]}),r?i.jsx("div",{className:"flex items-center justify-center py-8",children:i.jsx(un,{className:"h-4 w-4 fs-spin text-fg-5"})}):he.length===0&&te.length===0?i.jsx("div",{className:"py-8 text-center text-xs text-fg-5",children:"暂无记忆。使用此 Agent 完成 Session 后将自动提取。"}):i.jsxs("div",{className:"space-y-1.5",children:[he.map(I=>i.jsx(QE,{memory:I,categories:D,onUpdate:G,onDelete:F},I.id)),te.length>0&&i.jsxs("div",{className:"pt-1",children:[i.jsxs("button",{type:"button",onClick:()=>m(!f),className:"flex items-center gap-1 text-[11px] text-fg-5 hover:text-fg-3",children:[i.jsx("span",{children:f?"▾":"▸"}),"已合并/已删除 (",te.length,")"]}),f&&i.jsx("div",{className:"mt-1.5 space-y-1.5 opacity-60",children:te.map(I=>i.jsx(QE,{memory:I,categories:D,onUpdate:G,onDelete:F},I.id))})]})]}),i.jsxs("div",{className:"border-t border-line pt-3",children:[i.jsxs("button",{type:"button",onClick:()=>S(!N),className:"flex items-center gap-1.5 text-xs font-medium text-fg-4 hover:text-fg-3",children:[i.jsx(Qc,{className:"h-3.5 w-3.5"}),i.jsxs("span",{children:[N?"▾":"▸"," 从 Session 提取记忆"]})]}),N&&i.jsx("div",{className:"mt-2 space-y-1.5",children:g?i.jsx("div",{className:"flex items-center justify-center py-4",children:i.jsx(un,{className:"h-4 w-4 fs-spin text-fg-5"})}):h.length===0?i.jsx("p",{className:"py-4 text-center text-xs text-fg-5",children:"暂无 Session 记录。"}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"max-h-64 space-y-1 overflow-y-auto",children:h.map(I=>{const W=K.has(I.id);return i.jsxs("label",{className:ae("flex cursor-pointer items-center gap-2.5 rounded-md border px-3 py-2 transition-colors",A.has(I.id)?"border-purple-500/30 bg-purple-500/5":"border-line bg-base hover:bg-elevated/60"),children:[i.jsx("input",{type:"checkbox",checked:A.has(I.id),onChange:()=>$(I.id),className:"h-3.5 w-3.5 shrink-0 cursor-pointer rounded border-line accent-purple-500"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("span",{className:"block truncate text-xs text-fg",children:I.title||I.id.slice(-8)}),i.jsx("span",{className:"text-[11px] text-fg-5",children:Qi(I.timeCreated)})]}),i.jsx("span",{className:ae("shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium",W?"bg-green-500/10 text-green-400":"bg-elevated text-fg-5"),children:W?"已提取":"未提取"})]},I.id)})}),A.size>0&&i.jsxs("button",{type:"button",onClick:()=>void q(),disabled:_,className:"flex w-full items-center justify-center gap-1.5 rounded-lg bg-purple-600 py-2 text-xs font-medium text-white transition-colors hover:bg-purple-500 disabled:opacity-40",children:[_?i.jsx(un,{className:"h-3.5 w-3.5 fs-spin"}):i.jsx(Yi,{className:"h-3.5 w-3.5"}),_?"提取中…":`提取选中 Session 的记忆 (${A.size})`]}),k&&i.jsx("p",{className:ae("mt-1.5 rounded-md px-3 py-1.5 text-xs",k.includes("成功")?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"),children:k})]})})]})]})}function NP({agentId:e}){const[t,a]=T.useState([]),[r,o]=T.useState(!0);return T.useEffect(()=>{let u=!1;return Wh(e).then(c=>{u||a(c)}).catch(()=>{u||a([])}).finally(()=>{u||o(!1)}),()=>{u=!0}},[e]),i.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Qc,{className:"h-4 w-4 text-fg-4"}),i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Session 历史"}),!r&&i.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 text-[10px] tabular-nums text-fg-4",children:t.length})]}),i.jsx("div",{className:"mt-3",children:r?i.jsx("div",{className:"flex items-center justify-center py-8",children:i.jsx(un,{className:"h-4 w-4 fs-spin text-fg-5"})}):t.length===0?i.jsx("p",{className:"py-8 text-center text-xs text-fg-5",children:"暂无 Session 记录。"}):i.jsx("div",{className:"space-y-1",children:t.map(u=>i.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-line bg-base px-4 py-2.5",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("span",{className:"block truncate text-xs font-medium text-fg",children:u.title||u.id.slice(-8)}),i.jsxs("div",{className:"mt-0.5 flex items-center gap-2 text-[11px] text-fg-5",children:[i.jsx("span",{children:Qi(u.timeCreated)}),u.cost>0&&i.jsxs(i.Fragment,{children:[i.jsx("span",{children:"·"}),i.jsxs("span",{children:["$",u.cost.toFixed(4)]})]}),(u.tokensInput>0||u.tokensOutput>0)&&i.jsxs(i.Fragment,{children:[i.jsx("span",{children:"·"}),i.jsxs("span",{children:[Math.round((u.tokensInput+u.tokensOutput)/1e3),"K tokens"]})]})]})]}),u.completedAt?i.jsx("span",{className:"shrink-0 rounded-full bg-green-500/10 px-2 py-0.5 text-[10px] font-medium text-green-400",children:"完成"}):i.jsx("span",{className:"shrink-0 rounded-full bg-elevated px-2 py-0.5 text-[10px] font-medium text-fg-5",children:"进行中"})]},u.id))})})]})}function TP({agent:e,fragments:t,onSave:a}){const r=Le(q=>q.activeRepoId),[o,u]=T.useState(!1),[c,f]=T.useState(e.name),[m,h]=T.useState(e.description??""),[b,g]=T.useState(e.baseAgent),[y,N]=T.useState(e.model??""),[S,A]=T.useState(e.variant??""),[w,_]=T.useState(e.memoryModel??""),[M,k]=T.useState(e.systemPrompt),[L,O]=T.useState(!1),[P,z]=T.useState(!1),[J,V]=T.useState([]);T.useEffect(()=>{if(!r){V([]);return}let q=!1;return(async()=>{try{const[D,I]=await Promise.all([Mo(),Io(r)]);if(q)return;const W=D[mP],C=W?JSON.parse(W):[];V(C.length>0?I.filter(de=>C.includes(de.id)):[])}catch{q||V([])}})(),()=>{q=!0}},[r]);const[j,ee]=T.useState(()=>{const q=e.fragments.map(C=>C.id),D=e.systemPromptPosition??-1,I=D>=0&&D<=q.length?D:q.length,W=[...q];return W.splice(I,0,jr),W}),se=q=>{ee(D=>{if(D.includes(q))return D.filter(C=>C!==q);const I=D.indexOf(jr),W=[...D];return W.splice(I>=0?I:W.length,0,q),W})},he=(q,D)=>{const I=q+D;I<0||I>=j.length||ee(W=>{const C=[...W];return[C[q],C[I]]=[C[I],C[q]],C})},te=j.filter(q=>q!==jr),K=(()=>{const q=j.indexOf(jr);return q<0?-1:j.slice(0,q).filter(D=>D!==jr).length})(),G=j.map(q=>{var D;return q===jr?M:(D=t.find(I=>I.id===q))==null?void 0:D.content}).filter(Boolean).join(`
|
|
520
|
-
|
|
521
|
-
---
|
|
522
|
-
|
|
523
|
-
`),F=async()=>{if(!(!c.trim()||!b)){z(!0);try{await a({name:c.trim(),description:m.trim()||void 0,baseAgent:b,model:y.trim()||void 0,variant:S.trim()||void 0,memoryModel:w.trim()||null,systemPrompt:M,systemPromptPosition:K,fragmentIds:te}),u(!1)}finally{z(!1)}}},$=e.isSystem>=1;return o?i.jsxs("section",{className:"rounded-xl border border-blue-500/30 bg-surface p-5 space-y-3",children:[i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"编辑配置"}),!$&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex gap-3",children:[i.jsxs("label",{className:"flex-1",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"名称"}),i.jsx("input",{type:"text",value:c,onChange:q=>f(q.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg focus:border-blue-500 focus:outline-none"})]}),i.jsxs("label",{className:"w-36",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Base Agent"}),i.jsx("select",{value:b,onChange:q=>g(q.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg focus:border-blue-500 focus:outline-none",children:fP.map(q=>i.jsx("option",{value:q,children:q},q))})]})]}),i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"描述(可选)"}),i.jsx("input",{type:"text",value:m,onChange:q=>h(q.target.value),placeholder:"一句话描述这个 Agent 的用途",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]})]}),i.jsxs("div",{className:"flex gap-3",children:[i.jsxs("div",{className:"flex-1",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"模型(可选)"}),i.jsxs("select",{value:y,onChange:q=>N(q.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[i.jsx("option",{value:"",children:"默认模型"}),J.map(q=>i.jsx("option",{value:q.id,children:q.name||q.id},q.id))]})]}),i.jsxs("div",{className:"w-28",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Variant"}),i.jsxs("select",{value:S,onChange:q=>A(q.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[i.jsx("option",{value:"",children:"默认"}),i.jsx("option",{value:"max",children:"max"}),i.jsx("option",{value:"high",children:"high"})]})]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"记忆提取/整理模型"}),i.jsxs("select",{value:w,onChange:q=>_(q.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[i.jsx("option",{value:"",children:"跟随主模型"}),J.map(q=>i.jsx("option",{value:q.id,children:q.name||q.id},q.id))]})]}),!$&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"提示词组合"}),i.jsxs("div",{className:"mt-1.5 space-y-1",children:[j.map((q,D)=>{if(q===jr)return i.jsxs("div",{className:"flex items-center gap-2 rounded border border-amber-500/30 bg-amber-500/5 px-2 py-1",children:[i.jsxs("div",{className:"flex flex-col",children:[i.jsx("button",{type:"button",onClick:()=>he(D,-1),disabled:D===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),i.jsx("button",{type:"button",onClick:()=>he(D,1),disabled:D===j.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),i.jsx("span",{className:"flex-1 truncate text-xs font-medium text-amber-400",children:"✎ 补充指令"})]},q);const I=t.find(W=>W.id===q);return I?i.jsxs("div",{className:"flex items-center gap-2 rounded border border-blue-500/30 bg-blue-500/5 px-2 py-1",children:[i.jsxs("div",{className:"flex flex-col",children:[i.jsx("button",{type:"button",onClick:()=>he(D,-1),disabled:D===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),i.jsx("button",{type:"button",onClick:()=>he(D,1),disabled:D===j.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),i.jsx("span",{className:"flex-1 truncate text-xs text-fg",children:I.name}),i.jsx("button",{type:"button",onClick:()=>se(q),className:"text-fg-5 hover:text-red-400",children:i.jsx(dt,{className:"h-3 w-3"})})]},q):null}),t.filter(q=>!te.includes(q.id)).length>0&&i.jsxs("select",{value:"",onChange:q=>{q.target.value&&se(q.target.value)},className:"w-full rounded border border-dashed border-line bg-base px-2 py-1 text-xs text-fg-4 focus:border-blue-500 focus:outline-none",children:[i.jsx("option",{value:"",children:"+ 添加片段…"}),t.filter(q=>!te.includes(q.id)).map(q=>i.jsx("option",{value:q.id,children:q.name},q.id))]})]})]}),i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"补充指令内容"}),i.jsx("textarea",{value:M,onChange:q=>k(q.target.value),rows:4,className:"mt-1 w-full resize-y rounded-md border border-line bg-base px-3 py-2 font-mono text-sm leading-relaxed text-fg focus:border-blue-500 focus:outline-none"})]}),(te.length>0||M)&&i.jsxs("div",{children:[i.jsxs("button",{type:"button",onClick:()=>O(!L),className:"flex items-center gap-1 text-xs font-medium text-fg-4 hover:text-fg-3",children:[i.jsx("span",{children:L?"▾":"▸"})," 预览最终提示词"]}),L&&i.jsx("pre",{className:"mt-1 max-h-48 overflow-auto rounded border border-line bg-elevated px-3 py-2 font-mono text-xs leading-relaxed text-fg-4",children:G||"(空)"})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[i.jsx("button",{type:"button",onClick:()=>u(!1),className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),i.jsx("button",{type:"button",onClick:()=>void F(),disabled:P||!c.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white hover:bg-blue-500 disabled:opacity-40",children:P?"保存中…":"保存"})]})]}):i.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"配置"}),i.jsxs("button",{type:"button",onClick:()=>u(!0),className:"flex items-center gap-1 rounded-md border border-line px-2.5 py-1 text-xs text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:[i.jsx(Kh,{className:"h-3 w-3"})," 编辑"]})]}),i.jsxs("div",{className:"mt-3 space-y-2.5",children:[i.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[i.jsx("span",{className:"w-20 shrink-0 text-fg-5",children:"Base Agent"}),i.jsx("span",{className:"font-mono text-fg",children:e.baseAgent})]}),i.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[i.jsx("span",{className:"w-20 shrink-0 text-fg-5",children:"模型"}),i.jsx("span",{className:"font-mono text-fg",children:e.model||"默认"})]}),i.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[i.jsx("span",{className:"w-20 shrink-0 text-fg-5",children:"Variant"}),i.jsx("span",{className:"font-mono text-fg",children:e.variant||"默认"})]}),i.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[i.jsx("span",{className:"w-20 shrink-0 text-fg-5",children:"记忆模型"}),i.jsx("span",{className:"font-mono text-fg",children:e.memoryModel||"跟随主模型"})]}),e.fragments.length>0&&i.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[i.jsx("span",{className:"w-20 shrink-0 pt-0.5 text-fg-5",children:"片段"}),i.jsx("div",{className:"flex flex-wrap gap-1",children:e.fragments.map(q=>i.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-medium text-blue-400",children:q.name},q.id))})]}),e.systemPrompt&&i.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[i.jsx("span",{className:"w-20 shrink-0 pt-0.5 text-fg-5",children:"补充指令"}),i.jsx("p",{className:"min-w-0 truncate font-mono text-fg-4",children:e.systemPrompt})]})]})]})}function _P(){const{agentId:e}=gy(),t=Sn(),a=Le(zn),r=or(_=>_.agents),o=r.find(_=>_.id===e),[u,c]=T.useState([]),[f,m]=T.useState(!1),[h,b]=T.useState(!1);T.useEffect(()=>{$y().then(c).catch(()=>c([]))},[]),T.useEffect(()=>{r.length>0&&!o&&t(a?`/${encodeURIComponent(a)}/agents`:"/repos",{replace:!0})},[r,o,t,a]);const g=async _=>{e&&(await f5(e,_),or.getState().loadAgents())},y=async()=>{e&&(await Hy(e),or.getState().loadAgents(),t(a?`/${encodeURIComponent(a)}/agents`:"/repos",{replace:!0}))},N=async()=>{if(!e||!o)return;const _=await kx(e),M=new Blob([JSON.stringify(_,null,2)],{type:"application/json"}),k=URL.createObjectURL(M),L=document.createElement("a");L.href=k,L.download=`${o.name.replace(/[^a-zA-Z0-9\u4e00-\u9fff_-]/g,"_")}.json`,L.click(),URL.revokeObjectURL(k)},S=async()=>{if(!e)return;const _=await kx(e);await navigator.clipboard.writeText(JSON.stringify(_,null,2)),m(!0),setTimeout(()=>m(!1),2e3)};if(!o||!e)return i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx(un,{className:"h-5 w-5 fs-spin text-fg-5"})});const A=o.isSystem>=1,w=hP(o.name);return i.jsx("div",{className:"flex-1 overflow-y-auto",children:i.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 p-6",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("button",{type:"button",onClick:()=>t(a?`/${encodeURIComponent(a)}/agents`:"/repos"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-line text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:i.jsx(yo,{className:"h-4 w-4"})}),i.jsx("div",{className:ae("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-sm font-semibold",w.bg,w.text),children:w.initial}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("h1",{className:"truncate text-lg font-bold text-fg",children:o.name}),A&&i.jsx("span",{className:"shrink-0 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-400",children:"系统"}),o.repoId&&i.jsx("span",{className:"shrink-0 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-medium text-blue-400",children:"repo"})]}),i.jsxs("p",{className:"mt-0.5 text-xs text-fg-4",children:[i.jsx("span",{className:"font-mono",children:o.baseAgent}),o.model&&i.jsxs("span",{className:"ml-1.5 text-fg-5",children:["· ",o.model]})]}),o.description&&i.jsx("p",{className:"mt-1 text-xs text-fg-4",children:o.description})]}),i.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[i.jsx("button",{type:"button",onClick:()=>void N(),title:"导出 JSON",className:"rounded-md border border-line p-1.5 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:i.jsx(pA,{className:"h-4 w-4"})}),i.jsx("button",{type:"button",onClick:()=>void S(),title:"复制 JSON",className:"rounded-md border border-line p-1.5 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:f?i.jsx(In,{className:"h-4 w-4 text-green-500"}):i.jsx(lA,{className:"h-4 w-4"})}),!A&&(h?i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("button",{type:"button",onClick:()=>void y(),className:"rounded-md border border-red-500/30 p-1.5 text-red-400 hover:bg-red-500/10",children:i.jsx(In,{className:"h-4 w-4"})}),i.jsx("button",{type:"button",onClick:()=>b(!1),className:"rounded-md border border-line p-1.5 text-fg-4 hover:bg-elevated",children:i.jsx(dt,{className:"h-4 w-4"})})]}):i.jsx("button",{type:"button",onClick:()=>b(!0),title:"删除",className:"rounded-md border border-line p-1.5 text-fg-4 transition-colors hover:border-red-500/30 hover:text-red-400",children:i.jsx(ws,{className:"h-4 w-4"})}))]})]}),i.jsx(TP,{agent:o,fragments:u,onSave:g}),i.jsx(yP,{agentId:e}),i.jsx(NP,{agentId:e})]})})}let _s=null;function vP(e){const t=Date.now()-e,a=Math.floor(t/6e4);return a<1?"刚刚":a<60?`${a} 分钟前`:`${Math.floor(a/60)} 小时前`}const WE=[{id:"repos",label:"仓库",icon:Sy},{id:"usage",label:"Claude 账号",icon:Zc},{id:"git",label:"Git 源站",icon:Oo},{id:"models",label:"模型",icon:Ec},{id:"agents",label:"AGENTS.md",icon:ur}],SP={id:"server",label:"服务器",icon:Ly};function Oh(e){if(!e)return null;const t=new Date(e).getTime()-Date.now();if(t<=0)return"已重置";const a=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4);return a>0?`${a}h ${r}m 后重置`:`${r}m 后重置`}function AP(e){return e>=90?"bg-red-500":e>=70?"bg-amber-500":"bg-blue-500"}function th({label:e,window:t}){if(!t)return null;const a=Math.round(t.utilization),r=Oh(t.resets_at),o=a>=90,u=a>=70;return i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg-3",children:e}),i.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[r&&i.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-elevated px-1.5 py-0.5 text-[10px] font-medium text-fg-4 tabular-nums",children:[i.jsx(Qc,{className:"h-2.5 w-2.5"}),r]}),i.jsxs("span",{className:ae("text-sm font-bold leading-none tabular-nums",o?"text-red-400":u?"text-amber-400":"text-fg"),children:[a,"%"]})]})]}),i.jsx("div",{className:"h-2.5 overflow-hidden rounded-full bg-elevated ring-1 ring-inset ring-line/60",children:i.jsx("div",{className:ae("h-full rounded-full transition-all duration-500 ease-out",AP(a),o?"shadow-sm shadow-red-500/50":u?"shadow-sm shadow-amber-500/40":null),style:{width:`${Math.min(a,100)}%`}})})]})}function wP({account:e,onSwitch:t,switching:a}){var o;const r=e.active;return i.jsxs("div",{className:ae("relative overflow-hidden rounded-xl border bg-base p-4 shadow-sm transition-colors",r?"border-blue-500/30 ring-1 ring-inset ring-blue-500/20":"border-line"),children:[r&&i.jsx("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-1 bg-blue-500"}),i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx("div",{className:ae("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg",r?"bg-blue-500/15 text-blue-500":"bg-elevated text-fg-4"),children:i.jsx(Iy,{className:"h-3.5 w-3.5"})}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-fg",children:e.label}),r&&i.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full bg-blue-500/15 px-2 py-0.5 text-[10px] font-semibold text-blue-500",children:[i.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500 shadow-sm shadow-blue-500/60"}),"当前"]}),!r&&t&&i.jsxs("button",{type:"button",onClick:()=>t(e.id),disabled:a,className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-line px-2 py-0.5 text-[10px] font-medium text-fg-4 transition-colors hover:border-blue-500/50 hover:text-blue-500 disabled:opacity-40",children:[a&&i.jsx(un,{className:"h-2.5 w-2.5 fs-spin"}),"切换"]}),e.excluded&&i.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-elevated px-2 py-0.5 text-[10px] font-medium text-fg-5",children:[i.jsx(F3,{className:"h-2.5 w-2.5"}),"不自动切"]}),e.needsReauth&&i.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-red-500/15 px-2 py-0.5 text-[10px] font-medium text-red-400",children:[i.jsx(_n,{className:"h-2.5 w-2.5"}),"需重新登录"]})]}),e.holders&&e.holders.length>0&&i.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-fg-5",children:[i.jsx(My,{className:"h-3 w-3 shrink-0"}),i.jsx("span",{className:"truncate",children:e.holders.join(", ")})]}),e.error&&!e.usage?i.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[i.jsx(_n,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),i.jsx("span",{className:"min-w-0 break-words",children:e.error})]}):e.usage?i.jsxs("div",{className:"mt-4 space-y-3",children:[i.jsx(th,{label:"5 小时窗口",window:e.usage.five_hour}),i.jsx(th,{label:"7 天窗口",window:e.usage.seven_day}),(o=e.usage.scoped)==null?void 0:o.map(u=>i.jsx(th,{label:u.label,window:u},u.label))]}):null]})}function CP(){const[e,t]=T.useState((_s==null?void 0:_s.data)??null),[a,r]=T.useState(!_s),[o,u]=T.useState(null),[c,f]=T.useState(null),[m,h]=T.useState((_s==null?void 0:_s.fetchedAt)??null),[,b]=T.useState(0),g=T.useCallback(A=>{const w=Date.now();_s={data:A,fetchedAt:w},t(A),h(w)},[]),y=T.useCallback(()=>{r(!0),u(null),Yy().then(A=>{g(A),r(!1)}).catch(A=>{u(A instanceof Error?A.message:String(A)),r(!1)})},[g]);T.useEffect(()=>{_s||y()},[y]),T.useEffect(()=>{const A=setInterval(()=>b(w=>w+1),3e4);return()=>clearInterval(A)},[]);const N=T.useRef(!1),S=T.useCallback(A=>{N.current||(N.current=!0,f(A),Gy(A).then(w=>{g(w),f(null)}).catch(w=>{u(w instanceof Error?w.message:String(w)),f(null)}).finally(()=>{N.current=!1}))},[g]);return i.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[i.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:i.jsx(SA,{className:"h-4 w-4"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Claude 订阅额度"}),i.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"各账号的 Pro/Max 订阅窗口用量。"})]})]}),i.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[m&&i.jsx("span",{className:"text-[10px] tabular-nums text-fg-5",children:vP(m)}),i.jsx("button",{type:"button",onClick:y,disabled:a,className:"rounded-md p-1.5 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:i.jsx($r,{className:ae("h-4 w-4",a&&"fs-spin")})})]})]}),i.jsx("div",{className:"mt-4 space-y-2.5",children:a&&!e?i.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[i.jsx(un,{className:"h-5 w-5 fs-spin"}),i.jsx("p",{className:"text-xs",children:"加载中…"})]}):o&&!e?i.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-red-400",children:[i.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-red-500/10",children:i.jsx(_n,{className:"h-5 w-5"})}),i.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:o})]}):e&&e.accounts.length===0?i.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[i.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-elevated text-fg-4",children:i.jsx(My,{className:"h-5 w-5"})}),i.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:"未找到账号。请在 OpenCode TUI 中通过 claude-accounts-usage 插件登录。"})]}):e?e.accounts.map(A=>i.jsx(wP,{account:A,onSwitch:S,switching:c===A.id},A.id)):null})]})}function kP({host:e,onDelete:t}){const[a,r]=T.useState(!1);return i.jsxs("div",{className:"group flex items-center gap-3 rounded-lg border border-line bg-base px-4 py-3",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm font-medium text-fg",children:e.name}),i.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-4",children:e.platform})]}),i.jsxs("div",{className:"mt-0.5 flex items-center gap-2 font-mono text-xs text-fg-4",children:[i.jsx("span",{children:e.host}),i.jsx("span",{className:"text-fg-6",children:"·"}),i.jsx("span",{className:"text-fg-5",children:e.token})]})]}),a?i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("button",{type:"button",onClick:t,className:"rounded p-1.5 text-red-400 hover:bg-red-500/10",children:i.jsx(In,{className:"h-4 w-4"})}),i.jsx("button",{type:"button",onClick:()=>r(!1),className:"rounded p-1.5 text-fg-4 hover:bg-elevated",children:i.jsx(dt,{className:"h-4 w-4"})})]}):i.jsx("button",{type:"button",onClick:()=>r(!0),className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100",children:i.jsx(ws,{className:"h-4 w-4"})})]})}function RP({onAdded:e}){const[t,a]=T.useState(!1),[r,o]=T.useState(""),[u,c]=T.useState(""),[f,m]=T.useState(""),[h,b]=T.useState("gitea"),[g,y]=T.useState(!1),[N,S]=T.useState(!1),A=()=>{o(""),c(""),m(""),b("gitea"),a(!1)},w=async()=>{if(!(!r.trim()||!u.trim()||!f.trim())){y(!0);try{await K5(r.trim(),u.trim(),f.trim(),h),A(),e()}finally{y(!1)}}};return t?i.jsxs("div",{className:"space-y-3 rounded-lg border border-line bg-base p-4",children:[i.jsxs("div",{className:"flex gap-3",children:[i.jsxs("label",{className:"flex-1",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"名称"}),i.jsx("input",{type:"text",value:u,onChange:_=>c(_.target.value),placeholder:"公司 Gitea",className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),i.jsxs("label",{className:"w-28",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"平台"}),i.jsxs("select",{value:h,onChange:_=>b(_.target.value),className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg focus:border-blue-500 focus:outline-none",children:[i.jsx("option",{value:"gitea",children:"Gitea"}),i.jsx("option",{value:"github",children:"GitHub"}),i.jsx("option",{value:"gitlab",children:"GitLab"})]})]})]}),i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Host"}),i.jsx("input",{type:"text",value:r,onChange:_=>o(_.target.value),placeholder:"git.btsai.work",className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Token"}),i.jsxs("div",{className:"relative mt-1",children:[i.jsx("input",{type:N?"text":"password",value:f,onChange:_=>m(_.target.value),placeholder:"Personal Access Token",className:"w-full rounded-md border border-line bg-surface px-3 py-1.5 pr-9 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),i.jsx("button",{type:"button",onClick:()=>S(!N),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-fg-5 hover:text-fg-3",children:N?i.jsx(EA,{className:"h-3.5 w-3.5"}):i.jsx(NA,{className:"h-3.5 w-3.5"})})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[i.jsx("button",{type:"button",onClick:A,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),i.jsx("button",{type:"button",onClick:()=>void w(),disabled:g||!r.trim()||!u.trim()||!f.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:g?"保存中…":"保存"})]})]}):i.jsxs("button",{type:"button",onClick:()=>a(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-line py-2.5 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[i.jsx(Ma,{className:"h-3.5 w-3.5"})," 添加 Git 源站"]})}function OP(){const[e,t]=T.useState(""),[a,r]=T.useState(""),[o,u]=T.useState(!0),[c,f]=T.useState(!1),[m,h]=T.useState(null);T.useEffect(()=>{P5().then(y=>{t(y.content),r(y.content),u(!1)}).catch(y=>{h(y instanceof Error?y.message:String(y)),u(!1)})},[]);const b=async()=>{f(!0),h(null);try{await U5(e),r(e)}catch(y){h(y instanceof Error?y.message:String(y))}f(!1)},g=e!==a;return i.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"全局 AGENTS.md"}),i.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"此内容会注入到所有仓库的 Agent 系统指令中。修改后 opencode 热加载,即时生效。"})]}),i.jsxs("button",{type:"button",onClick:()=>void b(),disabled:c||!g,className:"flex shrink-0 items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[i.jsx(Wc,{className:"h-3.5 w-3.5"}),c?"保存中…":"保存"]})]}),m&&i.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[i.jsx(_n,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),i.jsx("span",{className:"min-w-0 break-words",children:m})]}),i.jsx("div",{className:"mt-4",children:o?i.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[i.jsx(un,{className:"h-5 w-5 fs-spin"}),i.jsx("p",{className:"text-xs",children:"加载中…"})]}):i.jsx("textarea",{value:e,onChange:y=>t(y.target.value),spellCheck:!1,className:"h-96 w-full resize-y rounded-lg border border-line bg-base px-4 py-3 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20",placeholder:`# AGENTS.md
|
|
524
|
-
|
|
525
|
-
在此编写全局 Agent 指令…`})}),i.jsx("p",{className:"mt-3 text-[11px] text-fg-5",children:"文件路径:~/.config/opencode/AGENTS.md"})]})}function IP(){const[e,t]=T.useState([]),[a,r]=T.useState(!0),o=()=>{G5().then(c=>{t(c),r(!1)}).catch(()=>r(!1))};T.useEffect(o,[]);const u=async c=>{await V5(c),t(f=>f.filter(m=>m.id!==c))};return i.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Git 源站管理"}),i.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"为不同的 Git 托管平台配置访问凭证,用于同步 Issues。系统会根据仓库的 git URL 自动匹配对应的源站。"}),i.jsx("div",{className:"mt-4 space-y-2",children:a?i.jsx("p",{className:"py-4 text-center font-mono text-xs text-fg-5",children:"加载中…"}):i.jsxs(i.Fragment,{children:[e.map(c=>i.jsx(kP,{host:c,onDelete:()=>void u(c.id)},c.id)),i.jsx(RP,{onAdded:o})]})}),i.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"Token 存储在数据库中。也可通过环境变量 GITEA_TOKEN 设置全局 fallback。"})]})}const ZE="pinned_models";function MP(e){const t=new Map;for(const a of e){const r=a.providerName||a.providerID,o=t.get(r);o?o.push(a):t.set(r,[a])}return Array.from(t,([a,r])=>({provider:a,models:r})).sort((a,r)=>{const o=a.models.some(c=>c.configured),u=r.models.some(c=>c.configured);return o!==u?o?-1:1:a.provider.localeCompare(r.provider)})}function LP(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e):""}function DP(e){if(!e)return"";const t=[];return e.input!=null&&t.push(`$${e.input}/Mi`),e.output!=null&&t.push(`$${e.output}/Mo`),t.join(" ")}function jP(){const e=Le(k=>k.activeRepoId),[t,a]=T.useState([]),[r,o]=T.useState(new Set),[u,c]=T.useState(!0),[f,m]=T.useState(null),[h,b]=T.useState(null),[g,y]=T.useState("");T.useEffect(()=>{let k=!1;async function L(){c(!0),m(null);try{const[O,P]=await Promise.all([Mo(),e?Io(e):Promise.resolve([])]);if(k)return;const z=O[ZE],J=z?JSON.parse(z):[];o(new Set(J)),a(P),b(null),y("")}catch(O){k||m(O instanceof Error?O.message:String(O))}k||c(!1)}return L(),()=>{k=!0}},[e]);const N=async k=>{const L=new Set(r);L.has(k)?L.delete(k):L.add(k),o(L);try{await oh(ZE,JSON.stringify([...L]))}catch{o(r)}},S=T.useMemo(()=>MP(t),[t]),A=t.filter(k=>r.has(k.id)).length,w=h?S.find(k=>k.provider===h):S[0],_=g.trim().toLowerCase(),M=w?_?w.models.filter(k=>(k.name||k.id).toLowerCase().includes(_)||k.id.toLowerCase().includes(_)):w.models:[];return i.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[i.jsx("div",{className:"flex items-center justify-between gap-3",children:i.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[i.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:i.jsx(Ec,{className:"h-4 w-4"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"常用模型"}),i.jsxs("p",{className:"mt-0.5 text-xs text-fg-4",children:["勾选常用模型,在新建对话时快速选择。",A>0&&i.jsxs("span",{className:"ml-1 text-blue-400",children:["已选 ",A," 个"]})]})]})]})}),i.jsx("div",{className:"mt-4",children:e?u?i.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[i.jsx(un,{className:"h-5 w-5 fs-spin"}),i.jsx("p",{className:"text-xs",children:"加载模型列表…"})]}):f?i.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-red-400",children:[i.jsx(_n,{className:"h-5 w-5"}),i.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:f})]}):t.length===0?i.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[i.jsx(Ec,{className:"h-5 w-5"}),i.jsx("p",{className:"text-xs",children:"当前仓库没有可用模型。"})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex gap-1 overflow-x-auto rounded-lg border border-line bg-base p-1",children:S.map(k=>{var P;const L=k.provider===(h??((P=S[0])==null?void 0:P.provider)),O=k.models.filter(z=>r.has(z.id)).length;return i.jsxs("button",{type:"button",onClick:()=>{b(k.provider),y("")},className:ae("flex shrink-0 items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",L?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-3"),children:[k.provider,O>0&&i.jsx("span",{className:"rounded-full bg-blue-500/15 px-1.5 py-0.5 text-[10px] font-semibold tabular-nums text-blue-500",children:O})]},k.provider)})}),i.jsxs("div",{className:"mt-3 flex items-center gap-2 rounded-md border border-line bg-base px-3 py-1.5",children:[i.jsx(Ur,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),i.jsx("input",{type:"text",value:g,onChange:k=>y(k.target.value),placeholder:"搜索模型…",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),g&&i.jsx("button",{type:"button",onClick:()=>y(""),className:"text-fg-5 hover:text-fg-3",children:i.jsx(dt,{className:"h-3 w-3"})})]}),i.jsx("div",{className:"mt-3 rounded-lg border border-line bg-base",children:M.length===0?i.jsx("div",{className:"px-3 py-6 text-center text-xs text-fg-5",children:"无匹配模型"}):i.jsx("div",{className:"divide-y divide-line/40",children:M.map(k=>{const L=r.has(k.id),O=LP(k.contextLimit),P=DP(k.cost);return i.jsxs("label",{className:ae("flex cursor-pointer items-center gap-3 px-3 py-2 transition-colors hover:bg-elevated/60",L&&"bg-blue-500/5"),children:[i.jsx("input",{type:"checkbox",checked:L,onChange:()=>void N(k.id),className:"h-3.5 w-3.5 shrink-0 cursor-pointer rounded border-line accent-blue-500"}),i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-fg",children:k.name||k.id}),i.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[O&&i.jsx("span",{className:"rounded bg-surface px-1.5 py-0.5 text-[10px] text-fg-5",children:O}),P&&i.jsx("span",{className:"text-[10px] text-fg-6",children:P})]})]},k.id)})})})]}):i.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[i.jsx(Ec,{className:"h-5 w-5"}),i.jsx("p",{className:"text-xs",children:"请先在左侧选择一个仓库以加载可用模型。"})]})})]})}function BP(){const[e,t]=T.useState(lh),[a,r]=T.useState(!1),[o,u]=T.useState(null),[c,f]=T.useState(lh),m=e!==c,h=async()=>{const g=e.replace(/\/+$/,"");if(g){r(!0),u(null);try{const y=await fetch(`${g}/api/health`,{signal:AbortSignal.timeout(5e3)});u(y.ok?"ok":"fail")}catch{u("fail")}r(!1)}},b=()=>{const g=e.replace(/\/+$/,"");Bw(g),f(g),t(g)};return i.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[i.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[i.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:i.jsx(Ly,{className:"h-4 w-4"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"服务器连接"}),i.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"配置远程 Fourth Spark Server 地址。"})]})]}),i.jsxs("div",{className:"mt-4 space-y-3",children:[i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"服务器地址"}),i.jsx("input",{type:"url",value:e,onChange:g=>{t(g.target.value),u(null)},placeholder:"http://192.168.1.100:3000",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-2 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>void h(),disabled:a||!e.trim(),className:"flex items-center gap-1.5 rounded-md border border-line px-3 py-1.5 text-xs font-medium text-fg-3 transition-colors hover:bg-elevated disabled:opacity-40",children:[a?i.jsx(un,{className:"h-3.5 w-3.5 fs-spin"}):i.jsx($r,{className:"h-3.5 w-3.5"}),"测试连接"]}),i.jsxs("button",{type:"button",onClick:b,disabled:!m,className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[i.jsx(Wc,{className:"h-3.5 w-3.5"}),"保存"]}),o==="ok"&&i.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-green-500",children:[i.jsx(In,{className:"h-3.5 w-3.5"})," 连接成功"]}),o==="fail"&&i.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-red-400",children:[i.jsx(_n,{className:"h-3.5 w-3.5"})," 连接失败"]})]})]}),i.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"保存后需重新打开 App 生效。确保手机与开发机在同一局域网。"})]})}function PP(){const[e,t]=T.useState("local"),[a,r]=T.useState(!1),[o,u]=T.useState(!1);T.useEffect(()=>{uh().then(f=>{const m=f.mode==="worker";r(m),t(m?"cloud":"local")}).catch(()=>{}).finally(()=>u(!0))},[]);const c=T.useCallback(f=>{const m=f.mode==="worker";r(m),m&&t("cloud")},[]);return i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex gap-1 rounded-lg border border-line bg-base p-1",children:[i.jsxs("button",{type:"button",onClick:()=>{a||t("local")},disabled:a,className:ae("flex flex-1 items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",e==="local"?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-3",a&&e!=="local"&&"cursor-not-allowed opacity-40"),title:a?"需先断开账号池连接":void 0,children:[i.jsx(Zc,{className:"h-3.5 w-3.5"}),"本地模式"]}),i.jsxs("button",{type:"button",onClick:()=>t("cloud"),className:ae("flex flex-1 items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",e==="cloud"?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-3"),children:[i.jsx(Cy,{className:"h-3.5 w-3.5"}),"账号池"]})]}),o&&e==="local"&&i.jsx(CP,{}),o&&e==="cloud"&&i.jsx(HP,{onStatusChange:c})]})}function UP({onClose:e,onSwitched:t}){const[a,r]=T.useState([]),[o,u]=T.useState(!0),[c,f]=T.useState(null),[m,h]=T.useState(null);T.useEffect(()=>{Yy().then(N=>r(N.accounts)).catch(()=>{}).finally(()=>u(!1))},[]);const b=async N=>{f(N),h(null);try{await Gy(N),t(),e()}catch(S){const A=S instanceof Error?S.message:String(S);h(A||"切换失败"),f(null)}},g=N=>{var S;return(S=N.usage)==null?void 0:S.five_hour},y=N=>{var S;return(S=N.usage)==null?void 0:S.seven_day};return i.jsx("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/50 backdrop-blur-sm sm:items-center",onClick:e,children:i.jsxs("div",{className:"flex max-h-[85vh] w-full flex-col rounded-t-2xl border border-line bg-surface p-4 shadow-2xl sm:mx-4 sm:max-w-lg sm:rounded-xl sm:p-5",onClick:N=>N.stopPropagation(),children:[i.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"切换账号"}),i.jsx("button",{type:"button",onClick:e,className:"rounded-md p-1 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:i.jsx(dt,{className:"h-4 w-4"})})]}),o?i.jsx("div",{className:"flex items-center justify-center py-10",children:i.jsx(un,{className:"h-5 w-5 fs-spin text-fg-4"})}):a.length===0?i.jsx("p",{className:"py-10 text-center text-xs text-fg-4",children:"暂无可用账号"}):i.jsx("div",{className:"mt-3 min-h-0 flex-1 space-y-1.5 overflow-y-auto pb-[var(--safe-bottom)]",children:a.map(N=>i.jsxs("button",{type:"button",disabled:c!==null,onClick:()=>{N.active||b(N.id)},className:ae("flex w-full items-center gap-2 rounded-lg border px-3 py-2.5 text-left transition-colors sm:gap-3",N.active?"border-blue-500/40 bg-blue-500/5":"border-line hover:bg-elevated",c===N.id&&"opacity-60"),children:[i.jsx("div",{className:"min-w-0 flex-1",children:i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{className:"truncate text-xs font-medium text-fg",children:N.label}),N.active&&i.jsx("span",{className:"rounded bg-blue-500/15 px-1.5 py-0.5 text-[9px] font-semibold text-blue-500",children:"当前"}),c===N.id&&i.jsx(un,{className:"h-3 w-3 fs-spin text-blue-500"})]})}),i.jsxs("div",{className:"flex shrink-0 gap-2 text-right sm:gap-4",children:[i.jsxs("div",{className:"w-14 sm:w-20",children:[i.jsx("div",{className:"text-[10px] text-fg-5",children:"5h"}),g(N)?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:ae("text-xs font-medium",g(N).utilization>80?"text-red-400":"text-fg-3"),children:[Math.round(g(N).utilization),"%"]}),i.jsx("div",{className:"hidden text-[9px] text-fg-5 sm:block",children:g(N).resets_at?Oh(g(N).resets_at):""})]}):i.jsx("div",{className:"text-[10px] text-fg-5",children:"—"})]}),i.jsxs("div",{className:"w-14 sm:w-20",children:[i.jsx("div",{className:"text-[10px] text-fg-5",children:"7d"}),y(N)?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:ae("text-xs font-medium",y(N).utilization>80?"text-red-400":"text-fg-3"),children:[Math.round(y(N).utilization),"%"]}),i.jsx("div",{className:"hidden text-[9px] text-fg-5 sm:block",children:y(N).resets_at?Oh(y(N).resets_at):""})]}):i.jsx("div",{className:"text-[10px] text-fg-5",children:"—"})]})]})]},N.id))}),m&&i.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-1.5 rounded-md border border-red-400/30 bg-red-400/5 px-3 py-2",children:[i.jsx(_n,{className:"h-3.5 w-3.5 shrink-0 text-red-400"}),i.jsx("span",{className:"text-xs text-red-400",children:m})]})]})})}function HP({onStatusChange:e}){const[t,a]=T.useState(""),[r,o]=T.useState(""),[u,c]=T.useState(""),[f,m]=T.useState(""),[h,b]=T.useState(!1),[g,y]=T.useState(null),[N,S]=T.useState(!1),[A,w]=T.useState(null),[_,M]=T.useState(!1);T.useEffect(()=>{let V=!1;return(async()=>{const[j,ee]=await Promise.all([Mo().catch(()=>({})),uh().catch(()=>null)]);if(V)return;const se=j.cloud_master_url??"",he=j.cloud_worker_id||(ee==null?void 0:ee.defaultWorkerId)||"";a(se),c(se),o(he),m(j.cloud_worker_id??""),w(ee)})(),()=>{V=!0}},[]);const L=((A==null?void 0:A.mode)??(u?"worker":"local"))==="worker",O=!L&&!!t.trim()&&!!r.trim(),P=t!==u||r!==f||O,z=async()=>{const V=t.replace(/\/+$/,"");if(!V)return;b(!0),y(null);const j=await Y5(V);y(j?"ok":"fail"),b(!1)},J=async()=>{const V=t.replace(/\/+$/,""),j=r.trim();S(!0);try{await oh("cloud_master_url",V),await oh("cloud_worker_id",j),c(V),m(j),a(V),o(j);const ee=await q5().catch(()=>null);ee&&(w(ee),e==null||e(ee))}finally{S(!1)}};return i.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[i.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[i.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:i.jsx(Cy,{className:"h-4 w-4"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("h2",{className:"text-sm font-semibold text-fg",children:"账号池配置"}),i.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"连接 claude-accounts-pool Master,共享多账号池。"})]})]}),i.jsxs("div",{className:"mt-4 space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-line bg-base px-3 py-2",children:[i.jsx("span",{className:ae("h-2 w-2 shrink-0 rounded-full",L?"bg-blue-500 shadow-sm shadow-blue-500/60":"bg-green-500 shadow-sm shadow-green-500/60")}),i.jsx("span",{className:"text-xs font-medium text-fg-3",children:L?"Worker 模式":"本地模式"}),L&&(A==null?void 0:A.workerId)&&i.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-4",children:A.workerId}),L&&(A==null?void 0:A.connected)!=null&&i.jsx("span",{className:ae("ml-auto text-[10px] font-medium",A.connected?"text-green-500":"text-red-400"),children:A.connected?"已连接":"未连接"})]}),L&&(A==null?void 0:A.heldAccount)&&i.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-line bg-base px-3 py-2",children:[i.jsx(Iy,{className:"h-3.5 w-3.5 shrink-0 text-blue-500"}),i.jsx("span",{className:"text-xs text-fg-4",children:"当前账号"}),i.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg",children:A.heldAccount.label}),i.jsx("button",{type:"button",onClick:()=>M(!0),className:"ml-auto rounded-md border border-line px-2 py-0.5 text-[10px] font-medium text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:"切换账号"})]})]}),i.jsxs("div",{className:"mt-4 space-y-3",children:[i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Master URL"}),i.jsx("input",{type:"url",value:t,onChange:V=>{a(V.target.value),y(null)},placeholder:"http://100.64.0.36:8787",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-2 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Worker ID"}),i.jsx("input",{type:"text",value:r,onChange:V=>o(V.target.value),placeholder:"fourth-spark-1",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-2 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),i.jsx("span",{className:"mt-1 block text-[11px] text-fg-5",children:"此 Worker 在账号池中的唯一标识,建议用小写字母、数字和连字符。"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>void z(),disabled:h||!t.trim(),className:"flex items-center gap-1.5 rounded-md border border-line px-3 py-1.5 text-xs font-medium text-fg-3 transition-colors hover:bg-elevated disabled:opacity-40",children:[h?i.jsx(un,{className:"h-3.5 w-3.5 fs-spin"}):i.jsx($r,{className:"h-3.5 w-3.5"}),"测试连接"]}),i.jsxs("button",{type:"button",onClick:()=>void J(),disabled:!P||N,className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[i.jsx(Wc,{className:"h-3.5 w-3.5"}),N?"保存中…":"保存"]}),g==="ok"&&i.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-green-500",children:[i.jsx(In,{className:"h-3.5 w-3.5"})," 连接成功"]}),g==="fail"&&i.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-red-400",children:[i.jsx(_n,{className:"h-3.5 w-3.5"})," 连接失败"]})]})]}),i.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"清空 Master URL 可切回本地模式。"}),_&&i.jsx(UP,{onClose:()=>M(!1),onSwitched:async()=>{const V=await uh().catch(()=>null);V&&(w(V),e==null||e(V))}})]})}function FP(){const[e,t]=T.useState("usage"),a=T.useMemo(()=>By()||lh()?[...WE,SP]:WE,[]);return i.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:i.jsxs("div",{className:ae("mx-auto",e==="repos"?"max-w-4xl":"max-w-2xl"),children:[i.jsx("h1",{className:"text-lg font-semibold text-fg",children:"设置"}),i.jsx("p",{className:"mt-0.5 text-sm text-fg-4",children:"全局配置"}),i.jsx("div",{className:"mt-6 flex gap-1 overflow-x-auto rounded-lg border border-line bg-surface p-1 scrollbar-none",children:a.map(r=>i.jsxs("button",{type:"button",onClick:()=>t(r.id),className:ae("flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 py-1.5 text-xs font-medium transition-colors",e===r.id?"bg-base text-fg shadow-sm":"text-fg-4 hover:text-fg-3"),children:[i.jsx(r.icon,{className:"h-3.5 w-3.5"}),r.label]},r.id))}),i.jsxs("div",{className:"mt-4",children:[e==="repos"&&i.jsx(Qy,{}),e==="usage"&&i.jsx(PP,{}),e==="git"&&i.jsx(IP,{}),e==="models"&&i.jsx(jP,{}),e==="agents"&&i.jsx(OP,{}),e==="server"&&i.jsx(BP,{})]})]})})}const zP=300,$P=4e3,qP={info:{icon:"ℹ",badge:"bg-fg/10 text-fg-2",bar:"bg-fg-4"},success:{icon:"✓",badge:"bg-emerald-500/10 text-emerald-500",bar:"bg-emerald-500"},warning:{icon:"⚠",badge:"bg-amber-500/10 text-amber-500",bar:"bg-amber-500"},error:{icon:"✕",badge:"bg-red-500/10 text-red-500",bar:"bg-red-500"}};function YP(){const e=Gt(h=>h.toasts),t=Gt(h=>h.removeToast),a=Oe(h=>h.setActiveSession),r=Le(zn),o=Sn(),u=h=>{t(h.id),h.sessionId&&(a(h.sessionId),o(`/${encodeURIComponent(r)}/run`))},[c,f]=T.useState([]),m=T.useRef(new Map);return T.useEffect(()=>{const h=new Set(e.map(b=>b.id));f(b=>{let g=b.map(y=>h.has(y.id)||y.exiting?y:{...y,exiting:!0});for(const y of e)g.some(N=>N.id===y.id)||(g=[...g,{...y}]);return g})},[e]),T.useEffect(()=>{const h=m.current;for(const b of c)b.exiting&&!h.has(b.id)&&h.set(b.id,setTimeout(()=>{h.delete(b.id),f(g=>g.filter(y=>y.id!==b.id))},zP))},[c]),T.useEffect(()=>{const h=m.current;return()=>h.forEach(clearTimeout)},[]),c.length===0?null:i.jsx("div",{className:"pointer-events-none fixed top-4 right-4 z-50 flex w-[calc(100%-2rem)] max-w-sm flex-col","aria-live":"polite","aria-atomic":"false",children:c.map(h=>{const b=qP[h.variant];return i.jsx("div",{className:"grid w-full transition-[grid-template-rows] duration-300 ease-out",style:{gridTemplateRows:h.exiting?"0fr":"1fr"},children:i.jsx("div",{className:"min-h-0 overflow-hidden",children:i.jsxs("div",{role:"status",onClick:()=>u(h),style:{animation:`${h.exiting?"toast-out":"toast-in"} 0.3s ease-out forwards`},className:"pointer-events-auto relative mb-2 flex cursor-pointer items-start gap-3 overflow-hidden rounded-xl border border-line bg-surface/80 px-3.5 py-3 shadow-lg shadow-black/5 backdrop-blur-md transition-colors hover:border-line-hard hover:bg-surface/90",children:[i.jsx("span",{"aria-hidden":!0,className:`mt-px flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-xs font-semibold ${b.badge}`,children:b.icon}),i.jsx("p",{className:"min-w-0 flex-1 text-sm leading-snug break-words text-fg",children:h.message}),h.persistent&&!h.exiting&&i.jsx("button",{type:"button","aria-label":"关闭",onClick:g=>{g.stopPropagation(),t(h.id)},className:"mt-px flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-fg-4 transition-colors hover:bg-fg/10 hover:text-fg",children:"✕"}),!h.exiting&&!h.persistent&&i.jsx("span",{"aria-hidden":!0,className:`absolute bottom-0 left-0 h-0.5 w-full origin-left ${b.bar}`,style:{animation:`toast-progress ${$P}ms linear forwards`}})]})})},h.id)})})}const oo=Ho("PushNotifications",{});let JE=!1;async function GP(e){!By()||JE||(JE=!0,(await oo.requestPermissions()).receive!=="granted")||(oo.addListener("registration",async a=>{try{await X5(a.value,"ios")}catch{}}),oo.addListener("registrationError",()=>{}),oo.addListener("pushNotificationActionPerformed",a=>{const r=a.notification.data,o=r==null?void 0:r.sessionId;if(o){const u=zn(Le.getState());u&&e(`/${encodeURIComponent(u)}/run?session=${o}`)}}),await oo.register())}function KP(e){const t=e.match(/^\/([^/]+)\/(run|agents|issues|pulls|dev)/);return t?decodeURIComponent(t[1]):null}function VP(){const e=Le(r=>r.repos),a=Le(zn)??(e.length>0?e[0].name:null);return a?i.jsx(qi,{to:`/${encodeURIComponent(a)}/run`,replace:!0}):i.jsx(qi,{to:"/repos",replace:!0})}function ey({segment:e}){const{repoId:t}=gy(),{search:a}=vn();return t?i.jsx(qi,{to:`/${encodeURIComponent(t)}/dev/${e}${a}`,replace:!0}):i.jsx(qi,{to:"/repos",replace:!0})}function XP(){const e=Sn(),t=vn(),a=Le(f=>f.activeRepoId),r=Le(f=>f.repos),o=Le(f=>f.setActiveRepo),u=Oe(f=>f.loadSessions),c=Oe(f=>f.clearSessions);return T.useEffect(()=>(Le.getState().loadRepos(),GP(e),ih.getState().init()),[e]),T.useEffect(()=>{if(r.length===0)return;const f=KP(t.pathname);if(!f)return;const m=r.find(h=>h.name===f);m&&m.id!==Le.getState().activeRepoId&&o(m.id)},[t.pathname,r,o]),T.useEffect(()=>(a?(c(),Ve.getState().clearIssues(),hn.getState().clearPulls(),u(),or.getState().loadAgents(),Ve.getState().loadIssues(),hn.getState().loadPulls(),Bc.start(a)):(c(),Ve.getState().clearIssues(),hn.getState().clearPulls()),()=>Bc.stop()),[a,u,c]),i.jsxs(i.Fragment,{children:[i.jsx(KS,{children:i.jsxs(na,{element:i.jsx(rC,{}),children:[i.jsx(na,{path:"/repos",element:i.jsx(cC,{})}),i.jsx(na,{path:"/settings",element:i.jsx(FP,{})}),i.jsx(na,{path:"/:repoId/run",element:i.jsx(wj,{})}),i.jsx(na,{path:"/:repoId/agents",element:i.jsx(dP,{})}),i.jsx(na,{path:"/:repoId/agents/:agentId",element:i.jsx(_P,{})}),i.jsx(na,{path:"/:repoId/dev",element:i.jsx(qi,{to:"issues",replace:!0})}),i.jsx(na,{path:"/:repoId/dev/issues",element:i.jsx(YE,{})}),i.jsx(na,{path:"/:repoId/dev/pulls",element:i.jsx(YE,{})}),i.jsx(na,{path:"/:repoId/issues",element:i.jsx(ey,{segment:"issues"})}),i.jsx(na,{path:"/:repoId/pulls",element:i.jsx(ey,{segment:"pulls"})}),i.jsx(na,{path:"/:repoId",element:i.jsx(qi,{to:"run",replace:!0})}),i.jsx(na,{path:"*",element:i.jsx(VP,{})})]})}),i.jsx(YP,{})]})}function QP(){return i.jsx(x3,{children:i.jsx(XP,{})})}const O_=document.getElementById("root");if(!O_)throw new Error("Root element #root not found in index.html");Y2.createRoot(O_).render(i.jsx(T.StrictMode,{children:i.jsx(QP,{})}));export{bp as W};
|