fourth-spark 0.9.4 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,496 @@
1
+ var Y2=Object.defineProperty;var $2=(e,t,a)=>t in e?Y2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var rn=(e,t,a)=>$2(e,typeof t!="symbol"?t+"":t,a);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function a(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(l){if(l.ep)return;l.ep=!0;const u=a(l);fetch(l.href,u)}})();function Mc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rm={exports:{}},Yl={};/**
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 qb;function G2(){if(qb)return Yl;qb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(s,l,u){var d=null;if(u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),"key"in l){u={};for(var f in l)f!=="key"&&(u[f]=l[f])}else u=l;return l=u.ref,{$$typeof:e,type:s,key:d,ref:l!==void 0?l:null,props:u}}return Yl.Fragment=t,Yl.jsx=a,Yl.jsxs=a,Yl}var Yb;function K2(){return Yb||(Yb=1,rm.exports=G2()),rm.exports}var o=K2(),sm={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 $b;function V2(){if($b)return Qe;$b=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function T(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,A={};function w(I,ie,D){this.props=I,this.context=ie,this.refs=A,this.updater=D||N}w.prototype.isReactComponent={},w.prototype.setState=function(I,ie){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,ie,"setState")},w.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function C(){}C.prototype=w.prototype;function R(I,ie,D){this.props=I,this.context=ie,this.refs=A,this.updater=D||N}var U=R.prototype=new C;U.constructor=R,v(U,w.prototype),U.isPureReactComponent=!0;var V=Array.isArray;function L(){}var z={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function W(I,ie,D){var Te=D.ref;return{$$typeof:e,type:I,key:ie,ref:Te!==void 0?Te:null,props:D}}function j(I,ie){return W(I.type,ie,I.props)}function K(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function Z(I){var ie={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(D){return ie[D]})}var se=/\/+/g;function le(I,ie){return typeof I=="object"&&I!==null&&I.key!=null?Z(""+I.key):ie.toString(36)}function ae(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(L,L):(I.status="pending",I.then(function(ie){I.status==="pending"&&(I.status="fulfilled",I.value=ie)},function(ie){I.status==="pending"&&(I.status="rejected",I.reason=ie)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function F(I,ie,D,Te,ke){var Re=typeof I;(Re==="undefined"||Re==="boolean")&&(I=null);var Ye=!1;if(I===null)Ye=!0;else switch(Re){case"bigint":case"string":case"number":Ye=!0;break;case"object":switch(I.$$typeof){case e:case t:Ye=!0;break;case x:return Ye=I._init,F(Ye(I._payload),ie,D,Te,ke)}}if(Ye)return ke=ke(I),Ye=Te===""?"."+le(I,0):Te,V(ke)?(D="",Ye!=null&&(D=Ye.replace(se,"$&/")+"/"),F(ke,ie,D,"",function(zt){return zt})):ke!=null&&(K(ke)&&(ke=j(ke,D+(ke.key==null||I&&I.key===ke.key?"":(""+ke.key).replace(se,"$&/")+"/")+Ye)),ie.push(ke)),1;Ye=0;var dt=Te===""?".":Te+":";if(V(I))for(var ut=0;ut<I.length;ut++)Te=I[ut],Re=dt+le(Te,ut),Ye+=F(Te,ie,D,Re,ke);else if(ut=T(I),typeof ut=="function")for(I=ut.call(I),ut=0;!(Te=I.next()).done;)Te=Te.value,Re=dt+le(Te,ut++),Ye+=F(Te,ie,D,Re,ke);else if(Re==="object"){if(typeof I.then=="function")return F(ae(I),ie,D,Te,ke);throw ie=String(I),Error("Objects are not valid as a React child (found: "+(ie==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":ie)+"). If you meant to render a collection of children, use an array instead.")}return Ye}function O(I,ie,D){if(I==null)return I;var Te=[],ke=0;return F(I,Te,"","",function(Re){return ie.call(D,Re,ke++)}),Te}function ee(I){if(I._status===-1){var ie=I._result;ie=ie(),ie.then(function(D){(I._status===0||I._status===-1)&&(I._status=1,I._result=D)},function(D){(I._status===0||I._status===-1)&&(I._status=2,I._result=D)}),I._status===-1&&(I._status=0,I._result=ie)}if(I._status===1)return I._result.default;throw I._result}var _e=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ie=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(ie))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},P={map:O,forEach:function(I,ie,D){O(I,function(){ie.apply(this,arguments)},D)},count:function(I){var ie=0;return O(I,function(){ie++}),ie},toArray:function(I){return O(I,function(ie){return ie})||[]},only:function(I){if(!K(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Qe.Activity=g,Qe.Children=P,Qe.Component=w,Qe.Fragment=a,Qe.Profiler=l,Qe.PureComponent=R,Qe.StrictMode=s,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,ie,D){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var Te=v({},I.props),ke=I.key;if(ie!=null)for(Re in ie.key!==void 0&&(ke=""+ie.key),ie)!X.call(ie,Re)||Re==="key"||Re==="__self"||Re==="__source"||Re==="ref"&&ie.ref===void 0||(Te[Re]=ie[Re]);var Re=arguments.length-2;if(Re===1)Te.children=D;else if(1<Re){for(var Ye=Array(Re),dt=0;dt<Re;dt++)Ye[dt]=arguments[dt+2];Te.children=Ye}return W(I.type,ke,Te)},Qe.createContext=function(I){return I={$$typeof:d,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:u,_context:I},I},Qe.createElement=function(I,ie,D){var Te,ke={},Re=null;if(ie!=null)for(Te in ie.key!==void 0&&(Re=""+ie.key),ie)X.call(ie,Te)&&Te!=="key"&&Te!=="__self"&&Te!=="__source"&&(ke[Te]=ie[Te]);var Ye=arguments.length-2;if(Ye===1)ke.children=D;else if(1<Ye){for(var dt=Array(Ye),ut=0;ut<Ye;ut++)dt[ut]=arguments[ut+2];ke.children=dt}if(I&&I.defaultProps)for(Te in Ye=I.defaultProps,Ye)ke[Te]===void 0&&(ke[Te]=Ye[Te]);return W(I,Re,ke)},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(I){return{$$typeof:f,render:I}},Qe.isValidElement=K,Qe.lazy=function(I){return{$$typeof:x,_payload:{_status:-1,_result:I},_init:ee}},Qe.memo=function(I,ie){return{$$typeof:h,type:I,compare:ie===void 0?null:ie}},Qe.startTransition=function(I){var ie=z.T,D={};z.T=D;try{var Te=I(),ke=z.S;ke!==null&&ke(D,Te),typeof Te=="object"&&Te!==null&&typeof Te.then=="function"&&Te.then(L,_e)}catch(Re){_e(Re)}finally{ie!==null&&D.types!==null&&(ie.types=D.types),z.T=ie}},Qe.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Qe.use=function(I){return z.H.use(I)},Qe.useActionState=function(I,ie,D){return z.H.useActionState(I,ie,D)},Qe.useCallback=function(I,ie){return z.H.useCallback(I,ie)},Qe.useContext=function(I){return z.H.useContext(I)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(I,ie){return z.H.useDeferredValue(I,ie)},Qe.useEffect=function(I,ie){return z.H.useEffect(I,ie)},Qe.useEffectEvent=function(I){return z.H.useEffectEvent(I)},Qe.useId=function(){return z.H.useId()},Qe.useImperativeHandle=function(I,ie,D){return z.H.useImperativeHandle(I,ie,D)},Qe.useInsertionEffect=function(I,ie){return z.H.useInsertionEffect(I,ie)},Qe.useLayoutEffect=function(I,ie){return z.H.useLayoutEffect(I,ie)},Qe.useMemo=function(I,ie){return z.H.useMemo(I,ie)},Qe.useOptimistic=function(I,ie){return z.H.useOptimistic(I,ie)},Qe.useReducer=function(I,ie,D){return z.H.useReducer(I,ie,D)},Qe.useRef=function(I){return z.H.useRef(I)},Qe.useState=function(I){return z.H.useState(I)},Qe.useSyncExternalStore=function(I,ie,D){return z.H.useSyncExternalStore(I,ie,D)},Qe.useTransition=function(){return z.H.useTransition()},Qe.version="19.2.8",Qe}var Gb;function Sh(){return Gb||(Gb=1,sm.exports=V2()),sm.exports}var S=Sh();const Ku=Mc(S);var im={exports:{}},$l={},lm={exports:{}},om={};/**
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 Kb;function Q2(){return Kb||(Kb=1,(function(e){function t(F,O){var ee=F.length;F.push(O);e:for(;0<ee;){var _e=ee-1>>>1,P=F[_e];if(0<l(P,O))F[_e]=O,F[ee]=P,ee=_e;else break e}}function a(F){return F.length===0?null:F[0]}function s(F){if(F.length===0)return null;var O=F[0],ee=F.pop();if(ee!==O){F[0]=ee;e:for(var _e=0,P=F.length,I=P>>>1;_e<I;){var ie=2*(_e+1)-1,D=F[ie],Te=ie+1,ke=F[Te];if(0>l(D,ee))Te<P&&0>l(ke,D)?(F[_e]=ke,F[Te]=ee,_e=Te):(F[_e]=D,F[ie]=ee,_e=ie);else if(Te<P&&0>l(ke,ee))F[_e]=ke,F[Te]=ee,_e=Te;else break e}}return O}function l(F,O){var ee=F.sortIndex-O.sortIndex;return ee!==0?ee:F.id-O.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 d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var m=[],h=[],x=1,g=null,y=3,T=!1,N=!1,v=!1,A=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function U(F){for(var O=a(h);O!==null;){if(O.callback===null)s(h);else if(O.startTime<=F)s(h),O.sortIndex=O.expirationTime,t(m,O);else break;O=a(h)}}function V(F){if(v=!1,U(F),!N)if(a(m)!==null)N=!0,L||(L=!0,Z());else{var O=a(h);O!==null&&ae(V,O.startTime-F)}}var L=!1,z=-1,X=5,W=-1;function j(){return A?!0:!(e.unstable_now()-W<X)}function K(){if(A=!1,L){var F=e.unstable_now();W=F;var O=!0;try{e:{N=!1,v&&(v=!1,C(z),z=-1),T=!0;var ee=y;try{t:{for(U(F),g=a(m);g!==null&&!(g.expirationTime>F&&j());){var _e=g.callback;if(typeof _e=="function"){g.callback=null,y=g.priorityLevel;var P=_e(g.expirationTime<=F);if(F=e.unstable_now(),typeof P=="function"){g.callback=P,U(F),O=!0;break t}g===a(m)&&s(m),U(F)}else s(m);g=a(m)}if(g!==null)O=!0;else{var I=a(h);I!==null&&ae(V,I.startTime-F),O=!1}}break e}finally{g=null,y=ee,T=!1}O=void 0}}finally{O?Z():L=!1}}}var Z;if(typeof R=="function")Z=function(){R(K)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,le=se.port2;se.port1.onmessage=K,Z=function(){le.postMessage(null)}}else Z=function(){w(K,0)};function ae(F,O){z=w(function(){F(e.unstable_now())},O)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(F){switch(y){case 1:case 2:case 3:var O=3;break;default:O=y}var ee=y;y=O;try{return F()}finally{y=ee}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(F,O){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var ee=y;y=F;try{return O()}finally{y=ee}},e.unstable_scheduleCallback=function(F,O,ee){var _e=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?_e+ee:_e):ee=_e,F){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=ee+P,F={id:x++,callback:O,priorityLevel:F,startTime:ee,expirationTime:P,sortIndex:-1},ee>_e?(F.sortIndex=ee,t(h,F),a(m)===null&&F===a(h)&&(v?(C(z),z=-1):v=!0,ae(V,ee-_e))):(F.sortIndex=P,t(m,F),N||T||(N=!0,L||(L=!0,Z()))),F},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(F){var O=y;return function(){var ee=y;y=O;try{return F.apply(this,arguments)}finally{y=ee}}}})(om)),om}var Vb;function X2(){return Vb||(Vb=1,lm.exports=Q2()),lm.exports}var um={exports:{}},vn={};/**
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 Qb;function W2(){if(Qb)return vn;Qb=1;var e=Sh();function t(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)h+="&args[]="+encodeURIComponent(arguments[x])}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 s={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},l=Symbol.for("react.portal");function u(m,h,x){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:g==null?null:""+g,children:m,containerInfo:h,implementation:x}}var d=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 vn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,vn.createPortal=function(m,h){var x=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,x)},vn.flushSync=function(m){var h=d.T,x=s.p;try{if(d.T=null,s.p=2,m)return m()}finally{d.T=h,s.p=x,s.d.f()}},vn.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,s.d.C(m,h))},vn.prefetchDNS=function(m){typeof m=="string"&&s.d.D(m)},vn.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var x=h.as,g=f(x,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,T=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;x==="style"?s.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:T}):x==="script"&&s.d.X(m,{crossOrigin:g,integrity:y,fetchPriority:T,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},vn.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var x=f(h.as,h.crossOrigin);s.d.M(m,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&s.d.M(m)},vn.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var x=h.as,g=f(x,h.crossOrigin);s.d.L(m,x,{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})}},vn.preloadModule=function(m,h){if(typeof m=="string")if(h){var x=f(h.as,h.crossOrigin);s.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else s.d.m(m)},vn.requestFormReset=function(m){s.d.r(m)},vn.unstable_batchedUpdates=function(m,h){return m(h)},vn.useFormState=function(m,h,x){return d.H.useFormState(m,h,x)},vn.useFormStatus=function(){return d.H.useHostTransitionStatus()},vn.version="19.2.8",vn}var Xb;function Z2(){if(Xb)return um.exports;Xb=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(),um.exports=W2(),um.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 Wb;function J2(){if(Wb)return $l;Wb=1;var e=X2(),t=Sh(),a=Z2();function s(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var r=n,i=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(i=r.return),n=r.return;while(n)}return r.tag===3?i:null}function d(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function m(n){if(u(n)!==n)throw Error(s(188))}function h(n){var r=n.alternate;if(!r){if(r=u(n),r===null)throw Error(s(188));return r!==n?null:n}for(var i=n,c=r;;){var p=i.return;if(p===null)break;var b=p.alternate;if(b===null){if(c=p.return,c!==null){i=c;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===i)return m(p),n;if(b===c)return m(p),r;b=b.sibling}throw Error(s(188))}if(i.return!==c.return)i=p,c=b;else{for(var _=!1,k=p.child;k;){if(k===i){_=!0,i=p,c=b;break}if(k===c){_=!0,c=p,i=b;break}k=k.sibling}if(!_){for(k=b.child;k;){if(k===i){_=!0,i=b,c=p;break}if(k===c){_=!0,c=b,i=p;break}k=k.sibling}if(!_)throw Error(s(189))}}if(i.alternate!==c)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?n:r}function x(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=x(n),r!==null)return r;n=n.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),R=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function Z(n){return n===null||typeof n!="object"?null:(n=K&&n[K]||n["@@iterator"],typeof n=="function"?n:null)}var se=Symbol.for("react.client.reference");function le(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===se?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case v:return"Fragment";case w:return"Profiler";case A:return"StrictMode";case V:return"Suspense";case L:return"SuspenseList";case W:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case N:return"Portal";case R:return n.displayName||"Context";case C:return(n._context.displayName||"Context")+".Consumer";case U:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case z:return r=n.displayName||null,r!==null?r:le(n.type)||"Memo";case X:r=n._payload,n=n._init;try{return le(n(r))}catch{}}return null}var ae=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},_e=[],P=-1;function I(n){return{current:n}}function ie(n){0>P||(n.current=_e[P],_e[P]=null,P--)}function D(n,r){P++,_e[P]=n.current,n.current=r}var Te=I(null),ke=I(null),Re=I(null),Ye=I(null);function dt(n,r){switch(D(Re,r),D(ke,n),D(Te,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?fb(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=fb(r),n=mb(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}ie(Te),D(Te,n)}function ut(){ie(Te),ie(ke),ie(Re)}function zt(n){n.memoizedState!==null&&D(Ye,n);var r=Te.current,i=mb(r,n.type);r!==i&&(D(ke,n),D(Te,i))}function Tn(n){ke.current===n&&(ie(Te),ie(ke)),Ye.current===n&&(ie(Ye),Hl._currentValue=ee)}var da,Ca;function un(n){if(da===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);da=r&&r[1]||"",Ca=-1<i.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+da+n+Ca}var Xn=!1;function Je(n,r){if(!n||Xn)return"";Xn=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(ue){var re=ue}Reflect.construct(n,[],pe)}else{try{pe.call()}catch(ue){re=ue}n.call(pe.prototype)}}else{try{throw Error()}catch(ue){re=ue}(pe=n())&&typeof pe.catch=="function"&&pe.catch(function(){})}}catch(ue){if(ue&&re&&typeof ue.stack=="string")return[ue.stack,re.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=c.DetermineComponentFrameRoot(),_=b[0],k=b[1];if(_&&k){var Y=_.split(`
44
+ `),ne=k.split(`
45
+ `);for(p=c=0;c<Y.length&&!Y[c].includes("DetermineComponentFrameRoot");)c++;for(;p<ne.length&&!ne[p].includes("DetermineComponentFrameRoot");)p++;if(c===Y.length||p===ne.length)for(c=Y.length-1,p=ne.length-1;1<=c&&0<=p&&Y[c]!==ne[p];)p--;for(;1<=c&&0<=p;c--,p--)if(Y[c]!==ne[p]){if(c!==1||p!==1)do if(c--,p--,0>p||Y[c]!==ne[p]){var fe=`
46
+ `+Y[c].replace(" at new "," at ");return n.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",n.displayName)),fe}while(1<=c&&0<=p);break}}}finally{Xn=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?un(i):""}function jn(n,r){switch(n.tag){case 26:case 27:case 5:return un(n.type);case 16:return un("Lazy");case 13:return n.child!==r&&r!==null?un("Suspense Fallback"):un("Suspense");case 19:return un("SuspenseList");case 0:case 15:return Je(n.type,!1);case 11:return Je(n.type.render,!1);case 1:return Je(n.type,!0);case 31:return un("Activity");default:return""}}function kn(n){try{var r="",i=null;do r+=jn(n,i),i=n,n=n.return;while(n);return r}catch(c){return`
47
+ Error generating stack: `+c.message+`
48
+ `+c.stack}}var fa=Object.prototype.hasOwnProperty,wa=e.unstable_scheduleCallback,tr=e.unstable_cancelCallback,Pa=e.unstable_shouldYield,wr=e.unstable_requestPaint,_t=e.unstable_now,nr=e.unstable_getCurrentPriorityLevel,de=e.unstable_ImmediatePriority,ye=e.unstable_UserBlockingPriority,Pe=e.unstable_NormalPriority,H=e.unstable_LowPriority,Ae=e.unstable_IdlePriority,ft=e.log,ln=e.unstable_setDisableYieldValue,Wt=null,Ot=null;function cn(n){if(typeof ft=="function"&&ln(n),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(Wt,n)}catch{}}var bt=Math.clz32?Math.clz32:Oo,Ua=Math.log,Rn=Math.LN2;function Oo(n){return n>>>=0,n===0?32:31-(Ua(n)/Rn|0)|0}var ms=256,Qs=262144,hs=4194304;function Bn(n){var r=n&42;if(r!==0)return r;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 $(n,r,i){var c=n.pendingLanes;if(c===0)return 0;var p=0,b=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var k=c&134217727;return k!==0?(c=k&~b,c!==0?p=Bn(c):(_&=k,_!==0?p=Bn(_):i||(i=k&~n,i!==0&&(p=Bn(i))))):(k=c&~b,k!==0?p=Bn(k):_!==0?p=Bn(_):i||(i=c&~n,i!==0&&(p=Bn(i)))),p===0?0:r!==0&&r!==p&&(r&b)===0&&(b=p&-p,i=r&-r,b>=i||b===32&&(i&4194048)!==0)?r:p}function me(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function Se(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 $e(){var n=hs;return hs<<=1,(hs&62914560)===0&&(hs=4194304),n}function Mt(n){for(var r=[],i=0;31>i;i++)r.push(n);return r}function Ct(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Me(n,r,i,c,p,b){var _=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var k=n.entanglements,Y=n.expirationTimes,ne=n.hiddenUpdates;for(i=_&~i;0<i;){var fe=31-bt(i),pe=1<<fe;k[fe]=0,Y[fe]=-1;var re=ne[fe];if(re!==null)for(ne[fe]=null,fe=0;fe<re.length;fe++){var ue=re[fe];ue!==null&&(ue.lane&=-536870913)}i&=~pe}c!==0&&we(n,c,0),b!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=b&~(_&~r))}function we(n,r,i){n.pendingLanes|=r,n.suspendedLanes&=~r;var c=31-bt(r);n.entangledLanes|=r,n.entanglements[c]=n.entanglements[c]|1073741824|i&261930}function qe(n,r){var i=n.entangledLanes|=r;for(n=n.entanglements;i;){var c=31-bt(i),p=1<<c;p&r|n[c]&r&&(n[c]|=r),i&=~p}}function $t(n,r){var i=r&-r;return i=(i&42)!==0?1:jt(i),(i&(n.suspendedLanes|r))!==0?0:i}function jt(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 ar(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Xs(){var n=O.p;return n!==0?n:(n=window.event,n===void 0?32:jb(n.type))}function Ws(n,r){var i=O.p;try{return O.p=n,r()}finally{O.p=i}}var Ha=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Ha,_n="__reactProps$"+Ha,kr="__reactContainer$"+Ha,Wi="__reactEvents$"+Ha,Io="__reactListeners$"+Ha,Zs="__reactHandles$"+Ha,Mo="__reactResources$"+Ha,ps="__reactMarker$"+Ha;function Zi(n){delete n[Gt],delete n[_n],delete n[Wi],delete n[Io],delete n[Zs]}function On(n){var r=n[Gt];if(r)return r;for(var i=n.parentNode;i;){if(r=i[kr]||i[Gt]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(n=yb(n);n!==null;){if(i=n[Gt])return i;n=yb(n)}return r}n=i,i=n.parentNode}return null}function rr(n){if(n=n[Gt]||n[kr]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Rr(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(s(33))}function Or(n){var r=n[Mo];return r||(r=n[Mo]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Zt(n){n[ps]=!0}var Do=new Set,gs={};function sr(n,r){xe(n,r),xe(n+"Capture",r)}function xe(n,r){for(gs[n]=r,n=0;n<r.length;n++)Do.add(r[n])}var je=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]*$"),et={},xt={};function Kt(n){return fa.call(xt,n)?!0:fa.call(et,n)?!1:je.test(n)?xt[n]=!0:(et[n]=!0,!1)}function Nn(n,r,i){if(Kt(r))if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+i)}}function Wn(n,r,i){if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+i)}}function Pn(n,r,i,c){if(c===null)n.removeAttribute(i);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(r,i,""+c)}}function It(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Zn(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Lo(n,r,i){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,b=c.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return p.call(this)},set:function(_){i=""+_,b.call(this,_)}}),Object.defineProperty(n,r,{enumerable:c.enumerable}),{getValue:function(){return i},setValue:function(_){i=""+_},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Js(n){if(!n._valueTracker){var r=Zn(n)?"checked":"value";n._valueTracker=Lo(n,r,""+n[r])}}function Ji(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var i=r.getValue(),c="";return n&&(c=Zn(n)?n.checked?"true":"false":n.value),n=c,n!==i?(r.setValue(n),!0):!1}function ei(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 nd=/[\n"\\]/g;function Un(n){return n.replace(nd,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function el(n,r,i,c,p,b,_,k){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),r!=null?_==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+It(r)):n.value!==""+It(r)&&(n.value=""+It(r)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),r!=null?ti(n,_,It(r)):i!=null?ti(n,_,It(i)):c!=null&&n.removeAttribute("value"),p==null&&b!=null&&(n.defaultChecked=!!b),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?n.name=""+It(k):n.removeAttribute("name")}function bs(n,r,i,c,p,b,_,k){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.type=b),r!=null||i!=null){if(!(b!=="submit"&&b!=="reset"||r!=null)){Js(n);return}i=i!=null?""+It(i):"",r=r!=null?""+It(r):i,k||r===n.value||(n.value=r),n.defaultValue=r}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=k?n.checked:!!c,n.defaultChecked=!!c,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),Js(n)}function ti(n,r,i){r==="number"&&ei(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function pn(n,r,i,c){if(n=n.options,r){r={};for(var p=0;p<i.length;p++)r["$"+i[p]]=!0;for(i=0;i<n.length;i++)p=r.hasOwnProperty("$"+n[i].value),n[i].selected!==p&&(n[i].selected=p),p&&c&&(n[i].defaultSelected=!0)}else{for(i=""+It(i),r=null,p=0;p<n.length;p++){if(n[p].value===i){n[p].selected=!0,c&&(n[p].defaultSelected=!0);return}r!==null||n[p].disabled||(r=n[p])}r!==null&&(r.selected=!0)}}function jo(n,r,i){if(r!=null&&(r=""+It(r),r!==n.value&&(n.value=r),i==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=i!=null?""+It(i):""}function ni(n,r,i,c){if(r==null){if(c!=null){if(i!=null)throw Error(s(92));if(ae(c)){if(1<c.length)throw Error(s(93));c=c[0]}i=c}i==null&&(i=""),r=i}i=It(r),n.defaultValue=i,c=n.textContent,c===i&&c!==""&&c!==null&&(n.value=c),Js(n)}function ze(n,r){if(r){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=r;return}}n.textContent=r}var Bo=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 Jt(n,r,i){var c=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?c?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":c?n.setProperty(r,i):typeof i!="number"||i===0||Bo.has(r)?r==="float"?n.cssFloat=i:n[r]=(""+i).trim():n[r]=i+"px"}function Et(n,r,i){if(r!=null&&typeof r!="object")throw Error(s(62));if(n=n.style,i!=null){for(var c in i)!i.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var p in r)c=r[p],r.hasOwnProperty(p)&&i[p]!==c&&Jt(n,p,c)}else for(var b in r)r.hasOwnProperty(b)&&Jt(n,b,r[b])}function Ir(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 ir=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"]]),tl=/^[\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 Mr(n){return tl.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Ne(){}var De=null;function Xe(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var st=null,Ht=null;function ma(n){var r=rr(n);if(r&&(n=r.stateNode)){var i=n[_n]||null;e:switch(n=r.stateNode,r.type){case"input":if(el(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Un(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var c=i[r];if(c!==n&&c.form===n.form){var p=c[_n]||null;if(!p)throw Error(s(90));el(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<i.length;r++)c=i[r],c.form===n.form&&Ji(c)}break e;case"textarea":jo(n,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&pn(n,!!i.multiple,r,!1)}}}var nl=!1;function Po(n,r,i){if(nl)return n(r,i);nl=!0;try{var c=n(r);return c}finally{if(nl=!1,(st!==null||Ht!==null)&&(Su(),st&&(r=st,n=Ht,Ht=st=null,ma(r),n)))for(r=0;r<n.length;r++)ma(n[r])}}function al(n,r){var i=n.stateNode;if(i===null)return null;var c=i[_n]||null;if(c===null)return null;i=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(s(231,r,typeof i));return i}var lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ad=!1;if(lr)try{var rl={};Object.defineProperty(rl,"passive",{get:function(){ad=!0}}),window.addEventListener("test",rl,rl),window.removeEventListener("test",rl,rl)}catch{ad=!1}var Dr=null,rd=null,Uo=null;function m0(){if(Uo)return Uo;var n,r=rd,i=r.length,c,p="value"in Dr?Dr.value:Dr.textContent,b=p.length;for(n=0;n<i&&r[n]===p[n];n++);var _=i-n;for(c=1;c<=_&&r[i-c]===p[b-c];c++);return Uo=p.slice(n,1<c?1-c:void 0)}function Ho(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Fo(){return!0}function h0(){return!1}function Hn(n){function r(i,c,p,b,_){this._reactName=i,this._targetInst=p,this.type=c,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var k in n)n.hasOwnProperty(k)&&(i=n[k],this[k]=i?i(b):b[k]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Fo:h0,this.isPropagationStopped=h0,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Fo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Fo)},persist:function(){},isPersistent:Fo}),r}var xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zo=Hn(xs),sl=g({},xs,{view:0,detail:0}),z_=Hn(sl),sd,id,il,qo=g({},sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:od,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!==il&&(il&&n.type==="mousemove"?(sd=n.screenX-il.screenX,id=n.screenY-il.screenY):id=sd=0,il=n),sd)},movementY:function(n){return"movementY"in n?n.movementY:id}}),p0=Hn(qo),q_=g({},qo,{dataTransfer:0}),Y_=Hn(q_),$_=g({},sl,{relatedTarget:0}),ld=Hn($_),G_=g({},xs,{animationName:0,elapsedTime:0,pseudoElement:0}),K_=Hn(G_),V_=g({},xs,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Q_=Hn(V_),X_=g({},xs,{data:0}),g0=Hn(X_),W_={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"},J_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eN(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=J_[n])?!!r[n]:!1}function od(){return eN}var tN=g({},sl,{key:function(n){if(n.key){var r=W_[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Ho(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:od,charCode:function(n){return n.type==="keypress"?Ho(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ho(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),nN=Hn(tN),aN=g({},qo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),b0=Hn(aN),rN=g({},sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:od}),sN=Hn(rN),iN=g({},xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),lN=Hn(iN),oN=g({},qo,{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}),uN=Hn(oN),cN=g({},xs,{newState:0,oldState:0}),dN=Hn(cN),fN=[9,13,27,32],ud=lr&&"CompositionEvent"in window,ll=null;lr&&"documentMode"in document&&(ll=document.documentMode);var mN=lr&&"TextEvent"in window&&!ll,x0=lr&&(!ud||ll&&8<ll&&11>=ll),E0=" ",y0=!1;function T0(n,r){switch(n){case"keyup":return fN.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _0(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ai=!1;function hN(n,r){switch(n){case"compositionend":return _0(r);case"keypress":return r.which!==32?null:(y0=!0,E0);case"textInput":return n=r.data,n===E0&&y0?null:n;default:return null}}function pN(n,r){if(ai)return n==="compositionend"||!ud&&T0(n,r)?(n=m0(),Uo=rd=Dr=null,ai=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return x0&&r.locale!=="ko"?null:r.data;default:return null}}var gN={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 N0(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!gN[n.type]:r==="textarea"}function v0(n,r,i,c){st?Ht?Ht.push(c):Ht=[c]:st=c,r=Iu(r,"onChange"),0<r.length&&(i=new zo("onChange","change",null,i,c),n.push({event:i,listeners:r}))}var ol=null,ul=null;function bN(n){ib(n,0)}function Yo(n){var r=Rr(n);if(Ji(r))return n}function S0(n,r){if(n==="change")return r}var A0=!1;if(lr){var cd;if(lr){var dd="oninput"in document;if(!dd){var C0=document.createElement("div");C0.setAttribute("oninput","return;"),dd=typeof C0.oninput=="function"}cd=dd}else cd=!1;A0=cd&&(!document.documentMode||9<document.documentMode)}function w0(){ol&&(ol.detachEvent("onpropertychange",k0),ul=ol=null)}function k0(n){if(n.propertyName==="value"&&Yo(ul)){var r=[];v0(r,ul,n,Xe(n)),Po(bN,r)}}function xN(n,r,i){n==="focusin"?(w0(),ol=r,ul=i,ol.attachEvent("onpropertychange",k0)):n==="focusout"&&w0()}function EN(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Yo(ul)}function yN(n,r){if(n==="click")return Yo(r)}function TN(n,r){if(n==="input"||n==="change")return Yo(r)}function _N(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Jn=typeof Object.is=="function"?Object.is:_N;function cl(n,r){if(Jn(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),c=Object.keys(r);if(i.length!==c.length)return!1;for(c=0;c<i.length;c++){var p=i[c];if(!fa.call(r,p)||!Jn(n[p],r[p]))return!1}return!0}function R0(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function O0(n,r){var i=R0(n);n=0;for(var c;i;){if(i.nodeType===3){if(c=n+i.textContent.length,n<=r&&c>=r)return{node:i,offset:r-n};n=c}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=R0(i)}}function I0(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?I0(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function M0(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=ei(n.document);r instanceof n.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)n=r.contentWindow;else break;r=ei(n.document)}return r}function fd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var NN=lr&&"documentMode"in document&&11>=document.documentMode,ri=null,md=null,dl=null,hd=!1;function D0(n,r,i){var c=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;hd||ri==null||ri!==ei(c)||(c=ri,"selectionStart"in c&&fd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),dl&&cl(dl,c)||(dl=c,c=Iu(md,"onSelect"),0<c.length&&(r=new zo("onSelect","select",null,r,i),n.push({event:r,listeners:c}),r.target=ri)))}function Es(n,r){var i={};return i[n.toLowerCase()]=r.toLowerCase(),i["Webkit"+n]="webkit"+r,i["Moz"+n]="moz"+r,i}var si={animationend:Es("Animation","AnimationEnd"),animationiteration:Es("Animation","AnimationIteration"),animationstart:Es("Animation","AnimationStart"),transitionrun:Es("Transition","TransitionRun"),transitionstart:Es("Transition","TransitionStart"),transitioncancel:Es("Transition","TransitionCancel"),transitionend:Es("Transition","TransitionEnd")},pd={},L0={};lr&&(L0=document.createElement("div").style,"AnimationEvent"in window||(delete si.animationend.animation,delete si.animationiteration.animation,delete si.animationstart.animation),"TransitionEvent"in window||delete si.transitionend.transition);function ys(n){if(pd[n])return pd[n];if(!si[n])return n;var r=si[n],i;for(i in r)if(r.hasOwnProperty(i)&&i in L0)return pd[n]=r[i];return n}var j0=ys("animationend"),B0=ys("animationiteration"),P0=ys("animationstart"),vN=ys("transitionrun"),SN=ys("transitionstart"),AN=ys("transitioncancel"),U0=ys("transitionend"),H0=new Map,gd="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(" ");gd.push("scrollEnd");function ka(n,r){H0.set(n,r),sr(r,[n])}var $o=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=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(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},ha=[],ii=0,bd=0;function Go(){for(var n=ii,r=bd=ii=0;r<n;){var i=ha[r];ha[r++]=null;var c=ha[r];ha[r++]=null;var p=ha[r];ha[r++]=null;var b=ha[r];if(ha[r++]=null,c!==null&&p!==null){var _=c.pending;_===null?p.next=p:(p.next=_.next,_.next=p),c.pending=p}b!==0&&F0(i,p,b)}}function Ko(n,r,i,c){ha[ii++]=n,ha[ii++]=r,ha[ii++]=i,ha[ii++]=c,bd|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function xd(n,r,i,c){return Ko(n,r,i,c),Vo(n)}function Ts(n,r){return Ko(n,null,null,r),Vo(n)}function F0(n,r,i){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i);for(var p=!1,b=n.return;b!==null;)b.childLanes|=i,c=b.alternate,c!==null&&(c.childLanes|=i),b.tag===22&&(n=b.stateNode,n===null||n._visibility&1||(p=!0)),n=b,b=b.return;return n.tag===3?(b=n.stateNode,p&&r!==null&&(p=31-bt(i),n=b.hiddenUpdates,c=n[p],c===null?n[p]=[r]:c.push(r),r.lane=i|536870912),b):null}function Vo(n){if(50<Ml)throw Ml=0,wf=null,Error(s(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var li={};function CN(n,r,i,c){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ea(n,r,i,c){return new CN(n,r,i,c)}function Ed(n){return n=n.prototype,!(!n||!n.isReactComponent)}function or(n,r){var i=n.alternate;return i===null?(i=ea(n.tag,r,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=r,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,r=n.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function z0(n,r){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,r=i.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Qo(n,r,i,c,p,b){var _=0;if(c=n,typeof n=="function")Ed(n)&&(_=1);else if(typeof n=="string")_=I2(n,i,Te.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case W:return n=ea(31,i,r,p),n.elementType=W,n.lanes=b,n;case v:return _s(i.children,p,b,r);case A:_=8,p|=24;break;case w:return n=ea(12,i,r,p|2),n.elementType=w,n.lanes=b,n;case V:return n=ea(13,i,r,p),n.elementType=V,n.lanes=b,n;case L:return n=ea(19,i,r,p),n.elementType=L,n.lanes=b,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case R:_=10;break e;case C:_=9;break e;case U:_=11;break e;case z:_=14;break e;case X:_=16,c=null;break e}_=29,i=Error(s(130,n===null?"null":typeof n,"")),c=null}return r=ea(_,i,r,p),r.elementType=n,r.type=c,r.lanes=b,r}function _s(n,r,i,c){return n=ea(7,n,c,r),n.lanes=i,n}function yd(n,r,i){return n=ea(6,n,null,r),n.lanes=i,n}function q0(n){var r=ea(18,null,null,0);return r.stateNode=n,r}function Td(n,r,i){return r=ea(4,n.children!==null?n.children:[],n.key,r),r.lanes=i,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Y0=new WeakMap;function pa(n,r){if(typeof n=="object"&&n!==null){var i=Y0.get(n);return i!==void 0?i:(r={value:n,source:r,stack:kn(r)},Y0.set(n,r),r)}return{value:n,source:r,stack:kn(r)}}var oi=[],ui=0,Xo=null,fl=0,ga=[],ba=0,Lr=null,Fa=1,za="";function ur(n,r){oi[ui++]=fl,oi[ui++]=Xo,Xo=n,fl=r}function $0(n,r,i){ga[ba++]=Fa,ga[ba++]=za,ga[ba++]=Lr,Lr=n;var c=Fa;n=za;var p=32-bt(c)-1;c&=~(1<<p),i+=1;var b=32-bt(r)+p;if(30<b){var _=p-p%5;b=(c&(1<<_)-1).toString(32),c>>=_,p-=_,Fa=1<<32-bt(r)+p|i<<p|c,za=b+n}else Fa=1<<b|i<<p|c,za=n}function _d(n){n.return!==null&&(ur(n,1),$0(n,1,0))}function Nd(n){for(;n===Xo;)Xo=oi[--ui],oi[ui]=null,fl=oi[--ui],oi[ui]=null;for(;n===Lr;)Lr=ga[--ba],ga[ba]=null,za=ga[--ba],ga[ba]=null,Fa=ga[--ba],ga[ba]=null}function G0(n,r){ga[ba++]=Fa,ga[ba++]=za,ga[ba++]=Lr,Fa=r.id,za=r.overflow,Lr=n}var gn=null,Dt=null,ot=!1,jr=null,xa=!1,vd=Error(s(519));function Br(n){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ml(pa(r,n)),vd}function K0(n){var r=n.stateNode,i=n.type,c=n.memoizedProps;switch(r[Gt]=n,r[_n]=c,i){case"dialog":at("cancel",r),at("close",r);break;case"iframe":case"object":case"embed":at("load",r);break;case"video":case"audio":for(i=0;i<Ll.length;i++)at(Ll[i],r);break;case"source":at("error",r);break;case"img":case"image":case"link":at("error",r),at("load",r);break;case"details":at("toggle",r);break;case"input":at("invalid",r),bs(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":at("invalid",r);break;case"textarea":at("invalid",r),ni(r,c.value,c.defaultValue,c.children)}i=c.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||c.suppressHydrationWarning===!0||cb(r.textContent,i)?(c.popover!=null&&(at("beforetoggle",r),at("toggle",r)),c.onScroll!=null&&at("scroll",r),c.onScrollEnd!=null&&at("scrollend",r),c.onClick!=null&&(r.onclick=Ne),r=!0):r=!1,r||Br(n,!0)}function V0(n){for(gn=n.return;gn;)switch(gn.tag){case 5:case 31:case 13:xa=!1;return;case 27:case 3:xa=!0;return;default:gn=gn.return}}function ci(n){if(n!==gn)return!1;if(!ot)return V0(n),ot=!0,!1;var r=n.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||qf(n.type,n.memoizedProps)),i=!i),i&&Dt&&Br(n),V0(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Dt=Eb(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Dt=Eb(n)}else r===27?(r=Dt,Wr(n.type)?(n=Vf,Vf=null,Dt=n):Dt=r):Dt=gn?ya(n.stateNode.nextSibling):null;return!0}function Ns(){Dt=gn=null,ot=!1}function Sd(){var n=jr;return n!==null&&(Yn===null?Yn=n:Yn.push.apply(Yn,n),jr=null),n}function ml(n){jr===null?jr=[n]:jr.push(n)}var Ad=I(null),vs=null,cr=null;function Pr(n,r,i){D(Ad,r._currentValue),r._currentValue=i}function dr(n){n._currentValue=Ad.current,ie(Ad)}function Cd(n,r,i){for(;n!==null;){var c=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),n===i)break;n=n.return}}function wd(n,r,i,c){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var b=p.dependencies;if(b!==null){var _=p.child;b=b.firstContext;e:for(;b!==null;){var k=b;b=p;for(var Y=0;Y<r.length;Y++)if(k.context===r[Y]){b.lanes|=i,k=b.alternate,k!==null&&(k.lanes|=i),Cd(b.return,i,n),c||(_=null);break e}b=k.next}}else if(p.tag===18){if(_=p.return,_===null)throw Error(s(341));_.lanes|=i,b=_.alternate,b!==null&&(b.lanes|=i),Cd(_,i,n),_=null}else _=p.child;if(_!==null)_.return=p;else for(_=p;_!==null;){if(_===n){_=null;break}if(p=_.sibling,p!==null){p.return=_.return,_=p;break}_=_.return}p=_}}function di(n,r,i,c){n=null;for(var p=r,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var _=p.alternate;if(_===null)throw Error(s(387));if(_=_.memoizedProps,_!==null){var k=p.type;Jn(p.pendingProps.value,_.value)||(n!==null?n.push(k):n=[k])}}else if(p===Ye.current){if(_=p.alternate,_===null)throw Error(s(387));_.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Hl):n=[Hl])}p=p.return}n!==null&&wd(r,n,i,c),r.flags|=262144}function Wo(n){for(n=n.firstContext;n!==null;){if(!Jn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ss(n){vs=n,cr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function bn(n){return Q0(vs,n)}function Zo(n,r){return vs===null&&Ss(n),Q0(n,r)}function Q0(n,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},cr===null){if(n===null)throw Error(s(308));cr=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else cr=cr.next=r;return i}var wN=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(i,c){n.push(c)}};this.abort=function(){r.aborted=!0,n.forEach(function(i){return i()})}},kN=e.unstable_scheduleCallback,RN=e.unstable_NormalPriority,en={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function kd(){return{controller:new wN,data:new Map,refCount:0}}function hl(n){n.refCount--,n.refCount===0&&kN(RN,function(){n.controller.abort()})}var pl=null,Rd=0,fi=0,mi=null;function ON(n,r){if(pl===null){var i=pl=[];Rd=0,fi=Df(),mi={status:"pending",value:void 0,then:function(c){i.push(c)}}}return Rd++,r.then(X0,X0),r}function X0(){if(--Rd===0&&pl!==null){mi!==null&&(mi.status="fulfilled");var n=pl;pl=null,fi=0,mi=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function IN(n,r){var i=[],c={status:"pending",value:null,reason:null,then:function(p){i.push(p)}};return n.then(function(){c.status="fulfilled",c.value=r;for(var p=0;p<i.length;p++)(0,i[p])(r)},function(p){for(c.status="rejected",c.reason=p,p=0;p<i.length;p++)(0,i[p])(void 0)}),c}var W0=F.S;F.S=function(n,r){Dg=_t(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&ON(n,r),W0!==null&&W0(n,r)};var As=I(null);function Od(){var n=As.current;return n!==null?n:wt.pooledCache}function Jo(n,r){r===null?D(As,As.current):D(As,r.pool)}function Z0(){var n=Od();return n===null?null:{parent:en._currentValue,pool:n}}var hi=Error(s(460)),Id=Error(s(474)),eu=Error(s(542)),tu={then:function(){}};function J0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function ep(n,r,i){switch(i=n[i],i===void 0?n.push(r):i!==r&&(r.then(Ne,Ne),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,np(n),n;default:if(typeof r.status=="string")r.then(Ne,Ne);else{if(n=wt,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=r,n.status="pending",n.then(function(c){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=c}},function(c){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,np(n),n}throw ws=r,hi}}function Cs(n){try{var r=n._init;return r(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ws=i,hi):i}}var ws=null;function tp(){if(ws===null)throw Error(s(459));var n=ws;return ws=null,n}function np(n){if(n===hi||n===eu)throw Error(s(483))}var pi=null,gl=0;function nu(n){var r=gl;return gl+=1,pi===null&&(pi=[]),ep(pi,n,r)}function bl(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function au(n,r){throw r.$$typeof===y?Error(s(525)):(n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function ap(n){function r(Q,G){if(n){var te=Q.deletions;te===null?(Q.deletions=[G],Q.flags|=16):te.push(G)}}function i(Q,G){if(!n)return null;for(;G!==null;)r(Q,G),G=G.sibling;return null}function c(Q){for(var G=new Map;Q!==null;)Q.key!==null?G.set(Q.key,Q):G.set(Q.index,Q),Q=Q.sibling;return G}function p(Q,G){return Q=or(Q,G),Q.index=0,Q.sibling=null,Q}function b(Q,G,te){return Q.index=te,n?(te=Q.alternate,te!==null?(te=te.index,te<G?(Q.flags|=67108866,G):te):(Q.flags|=67108866,G)):(Q.flags|=1048576,G)}function _(Q){return n&&Q.alternate===null&&(Q.flags|=67108866),Q}function k(Q,G,te,he){return G===null||G.tag!==6?(G=yd(te,Q.mode,he),G.return=Q,G):(G=p(G,te),G.return=Q,G)}function Y(Q,G,te,he){var Be=te.type;return Be===v?fe(Q,G,te.props.children,he,te.key):G!==null&&(G.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===X&&Cs(Be)===G.type)?(G=p(G,te.props),bl(G,te),G.return=Q,G):(G=Qo(te.type,te.key,te.props,null,Q.mode,he),bl(G,te),G.return=Q,G)}function ne(Q,G,te,he){return G===null||G.tag!==4||G.stateNode.containerInfo!==te.containerInfo||G.stateNode.implementation!==te.implementation?(G=Td(te,Q.mode,he),G.return=Q,G):(G=p(G,te.children||[]),G.return=Q,G)}function fe(Q,G,te,he,Be){return G===null||G.tag!==7?(G=_s(te,Q.mode,he,Be),G.return=Q,G):(G=p(G,te),G.return=Q,G)}function pe(Q,G,te){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=yd(""+G,Q.mode,te),G.return=Q,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case T:return te=Qo(G.type,G.key,G.props,null,Q.mode,te),bl(te,G),te.return=Q,te;case N:return G=Td(G,Q.mode,te),G.return=Q,G;case X:return G=Cs(G),pe(Q,G,te)}if(ae(G)||Z(G))return G=_s(G,Q.mode,te,null),G.return=Q,G;if(typeof G.then=="function")return pe(Q,nu(G),te);if(G.$$typeof===R)return pe(Q,Zo(Q,G),te);au(Q,G)}return null}function re(Q,G,te,he){var Be=G!==null?G.key:null;if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return Be!==null?null:k(Q,G,""+te,he);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case T:return te.key===Be?Y(Q,G,te,he):null;case N:return te.key===Be?ne(Q,G,te,he):null;case X:return te=Cs(te),re(Q,G,te,he)}if(ae(te)||Z(te))return Be!==null?null:fe(Q,G,te,he,null);if(typeof te.then=="function")return re(Q,G,nu(te),he);if(te.$$typeof===R)return re(Q,G,Zo(Q,te),he);au(Q,te)}return null}function ue(Q,G,te,he,Be){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return Q=Q.get(te)||null,k(G,Q,""+he,Be);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case T:return Q=Q.get(he.key===null?te:he.key)||null,Y(G,Q,he,Be);case N:return Q=Q.get(he.key===null?te:he.key)||null,ne(G,Q,he,Be);case X:return he=Cs(he),ue(Q,G,te,he,Be)}if(ae(he)||Z(he))return Q=Q.get(te)||null,fe(G,Q,he,Be,null);if(typeof he.then=="function")return ue(Q,G,te,nu(he),Be);if(he.$$typeof===R)return ue(Q,G,te,Zo(G,he),Be);au(G,he)}return null}function Oe(Q,G,te,he){for(var Be=null,mt=null,Le=G,Ze=G=0,lt=null;Le!==null&&Ze<te.length;Ze++){Le.index>Ze?(lt=Le,Le=null):lt=Le.sibling;var ht=re(Q,Le,te[Ze],he);if(ht===null){Le===null&&(Le=lt);break}n&&Le&&ht.alternate===null&&r(Q,Le),G=b(ht,G,Ze),mt===null?Be=ht:mt.sibling=ht,mt=ht,Le=lt}if(Ze===te.length)return i(Q,Le),ot&&ur(Q,Ze),Be;if(Le===null){for(;Ze<te.length;Ze++)Le=pe(Q,te[Ze],he),Le!==null&&(G=b(Le,G,Ze),mt===null?Be=Le:mt.sibling=Le,mt=Le);return ot&&ur(Q,Ze),Be}for(Le=c(Le);Ze<te.length;Ze++)lt=ue(Le,Q,Ze,te[Ze],he),lt!==null&&(n&&lt.alternate!==null&&Le.delete(lt.key===null?Ze:lt.key),G=b(lt,G,Ze),mt===null?Be=lt:mt.sibling=lt,mt=lt);return n&&Le.forEach(function(ns){return r(Q,ns)}),ot&&ur(Q,Ze),Be}function Fe(Q,G,te,he){if(te==null)throw Error(s(151));for(var Be=null,mt=null,Le=G,Ze=G=0,lt=null,ht=te.next();Le!==null&&!ht.done;Ze++,ht=te.next()){Le.index>Ze?(lt=Le,Le=null):lt=Le.sibling;var ns=re(Q,Le,ht.value,he);if(ns===null){Le===null&&(Le=lt);break}n&&Le&&ns.alternate===null&&r(Q,Le),G=b(ns,G,Ze),mt===null?Be=ns:mt.sibling=ns,mt=ns,Le=lt}if(ht.done)return i(Q,Le),ot&&ur(Q,Ze),Be;if(Le===null){for(;!ht.done;Ze++,ht=te.next())ht=pe(Q,ht.value,he),ht!==null&&(G=b(ht,G,Ze),mt===null?Be=ht:mt.sibling=ht,mt=ht);return ot&&ur(Q,Ze),Be}for(Le=c(Le);!ht.done;Ze++,ht=te.next())ht=ue(Le,Q,Ze,ht.value,he),ht!==null&&(n&&ht.alternate!==null&&Le.delete(ht.key===null?Ze:ht.key),G=b(ht,G,Ze),mt===null?Be=ht:mt.sibling=ht,mt=ht);return n&&Le.forEach(function(q2){return r(Q,q2)}),ot&&ur(Q,Ze),Be}function St(Q,G,te,he){if(typeof te=="object"&&te!==null&&te.type===v&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case T:e:{for(var Be=te.key;G!==null;){if(G.key===Be){if(Be=te.type,Be===v){if(G.tag===7){i(Q,G.sibling),he=p(G,te.props.children),he.return=Q,Q=he;break e}}else if(G.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===X&&Cs(Be)===G.type){i(Q,G.sibling),he=p(G,te.props),bl(he,te),he.return=Q,Q=he;break e}i(Q,G);break}else r(Q,G);G=G.sibling}te.type===v?(he=_s(te.props.children,Q.mode,he,te.key),he.return=Q,Q=he):(he=Qo(te.type,te.key,te.props,null,Q.mode,he),bl(he,te),he.return=Q,Q=he)}return _(Q);case N:e:{for(Be=te.key;G!==null;){if(G.key===Be)if(G.tag===4&&G.stateNode.containerInfo===te.containerInfo&&G.stateNode.implementation===te.implementation){i(Q,G.sibling),he=p(G,te.children||[]),he.return=Q,Q=he;break e}else{i(Q,G);break}else r(Q,G);G=G.sibling}he=Td(te,Q.mode,he),he.return=Q,Q=he}return _(Q);case X:return te=Cs(te),St(Q,G,te,he)}if(ae(te))return Oe(Q,G,te,he);if(Z(te)){if(Be=Z(te),typeof Be!="function")throw Error(s(150));return te=Be.call(te),Fe(Q,G,te,he)}if(typeof te.then=="function")return St(Q,G,nu(te),he);if(te.$$typeof===R)return St(Q,G,Zo(Q,te),he);au(Q,te)}return typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint"?(te=""+te,G!==null&&G.tag===6?(i(Q,G.sibling),he=p(G,te),he.return=Q,Q=he):(i(Q,G),he=yd(te,Q.mode,he),he.return=Q,Q=he),_(Q)):i(Q,G)}return function(Q,G,te,he){try{gl=0;var Be=St(Q,G,te,he);return pi=null,Be}catch(Le){if(Le===hi||Le===eu)throw Le;var mt=ea(29,Le,null,Q.mode);return mt.lanes=he,mt.return=Q,mt}finally{}}}var ks=ap(!0),rp=ap(!1),Ur=!1;function Md(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dd(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Hr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Fr(n,r,i){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(pt&2)!==0){var p=c.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),c.pending=r,r=Vo(n),F0(n,null,i),r}return Ko(n,c,r,i),Vo(n)}function xl(n,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var c=r.lanes;c&=n.pendingLanes,i|=c,r.lanes=i,qe(n,i)}}function Ld(n,r){var i=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,i===c)){var p=null,b=null;if(i=i.firstBaseUpdate,i!==null){do{var _={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};b===null?p=b=_:b=b.next=_,i=i.next}while(i!==null);b===null?p=b=r:b=b.next=r}else p=b=r;i={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:c.shared,callbacks:c.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=r:n.next=r,i.lastBaseUpdate=r}var jd=!1;function El(){if(jd){var n=mi;if(n!==null)throw n}}function yl(n,r,i,c){jd=!1;var p=n.updateQueue;Ur=!1;var b=p.firstBaseUpdate,_=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var Y=k,ne=Y.next;Y.next=null,_===null?b=ne:_.next=ne,_=Y;var fe=n.alternate;fe!==null&&(fe=fe.updateQueue,k=fe.lastBaseUpdate,k!==_&&(k===null?fe.firstBaseUpdate=ne:k.next=ne,fe.lastBaseUpdate=Y))}if(b!==null){var pe=p.baseState;_=0,fe=ne=Y=null,k=b;do{var re=k.lane&-536870913,ue=re!==k.lane;if(ue?(it&re)===re:(c&re)===re){re!==0&&re===fi&&(jd=!0),fe!==null&&(fe=fe.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Oe=n,Fe=k;re=r;var St=i;switch(Fe.tag){case 1:if(Oe=Fe.payload,typeof Oe=="function"){pe=Oe.call(St,pe,re);break e}pe=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Fe.payload,re=typeof Oe=="function"?Oe.call(St,pe,re):Oe,re==null)break e;pe=g({},pe,re);break e;case 2:Ur=!0}}re=k.callback,re!==null&&(n.flags|=64,ue&&(n.flags|=8192),ue=p.callbacks,ue===null?p.callbacks=[re]:ue.push(re))}else ue={lane:re,tag:k.tag,payload:k.payload,callback:k.callback,next:null},fe===null?(ne=fe=ue,Y=pe):fe=fe.next=ue,_|=re;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;ue=k,k=ue.next,ue.next=null,p.lastBaseUpdate=ue,p.shared.pending=null}}while(!0);fe===null&&(Y=pe),p.baseState=Y,p.firstBaseUpdate=ne,p.lastBaseUpdate=fe,b===null&&(p.shared.lanes=0),Gr|=_,n.lanes=_,n.memoizedState=pe}}function sp(n,r){if(typeof n!="function")throw Error(s(191,n));n.call(r)}function ip(n,r){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)sp(i[n],r)}var gi=I(null),ru=I(0);function lp(n,r){n=yr,D(ru,n),D(gi,r),yr=n|r.baseLanes}function Bd(){D(ru,yr),D(gi,gi.current)}function Pd(){yr=ru.current,ie(gi),ie(ru)}var ta=I(null),Ea=null;function zr(n){var r=n.alternate;D(Vt,Vt.current&1),D(ta,n),Ea===null&&(r===null||gi.current!==null||r.memoizedState!==null)&&(Ea=n)}function Ud(n){D(Vt,Vt.current),D(ta,n),Ea===null&&(Ea=n)}function op(n){n.tag===22?(D(Vt,Vt.current),D(ta,n),Ea===null&&(Ea=n)):qr()}function qr(){D(Vt,Vt.current),D(ta,ta.current)}function na(n){ie(ta),Ea===n&&(Ea=null),ie(Vt)}var Vt=I(0);function su(n){for(var r=n;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Gf(i)||Kf(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var fr=0,We=null,Nt=null,tn=null,iu=!1,bi=!1,Rs=!1,lu=0,Tl=0,xi=null,MN=0;function qt(){throw Error(s(321))}function Hd(n,r){if(r===null)return!1;for(var i=0;i<r.length&&i<n.length;i++)if(!Jn(n[i],r[i]))return!1;return!0}function Fd(n,r,i,c,p,b){return fr=b,We=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,F.H=n===null||n.memoizedState===null?$p:nf,Rs=!1,b=i(c,p),Rs=!1,bi&&(b=cp(r,i,c,p)),up(n),b}function up(n){F.H=vl;var r=Nt!==null&&Nt.next!==null;if(fr=0,tn=Nt=We=null,iu=!1,Tl=0,xi=null,r)throw Error(s(300));n===null||nn||(n=n.dependencies,n!==null&&Wo(n)&&(nn=!0))}function cp(n,r,i,c){We=n;var p=0;do{if(bi&&(xi=null),Tl=0,bi=!1,25<=p)throw Error(s(301));if(p+=1,tn=Nt=null,n.updateQueue!=null){var b=n.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}F.H=Gp,b=r(i,c)}while(bi);return b}function DN(){var n=F.H,r=n.useState()[0];return r=typeof r.then=="function"?_l(r):r,n=n.useState()[0],(Nt!==null?Nt.memoizedState:null)!==n&&(We.flags|=1024),r}function zd(){var n=lu!==0;return lu=0,n}function qd(n,r,i){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~i}function Yd(n){if(iu){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}iu=!1}fr=0,tn=Nt=We=null,bi=!1,Tl=lu=0,xi=null}function In(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tn===null?We.memoizedState=tn=n:tn=tn.next=n,tn}function Qt(){if(Nt===null){var n=We.alternate;n=n!==null?n.memoizedState:null}else n=Nt.next;var r=tn===null?We.memoizedState:tn.next;if(r!==null)tn=r,Nt=n;else{if(n===null)throw We.alternate===null?Error(s(467)):Error(s(310));Nt=n,n={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},tn===null?We.memoizedState=tn=n:tn=tn.next=n}return tn}function ou(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _l(n){var r=Tl;return Tl+=1,xi===null&&(xi=[]),n=ep(xi,n,r),r=We,(tn===null?r.memoizedState:tn.next)===null&&(r=r.alternate,F.H=r===null||r.memoizedState===null?$p:nf),n}function uu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return _l(n);if(n.$$typeof===R)return bn(n)}throw Error(s(438,String(n)))}function $d(n){var r=null,i=We.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var c=We.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=ou(),We.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(n),c=0;c<n;c++)i[c]=j;return r.index++,i}function mr(n,r){return typeof r=="function"?r(n):r}function cu(n){var r=Qt();return Gd(r,Nt,n)}function Gd(n,r,i){var c=n.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=i;var p=n.baseQueue,b=c.pending;if(b!==null){if(p!==null){var _=p.next;p.next=b.next,b.next=_}r.baseQueue=p=b,c.pending=null}if(b=n.baseState,p===null)n.memoizedState=b;else{r=p.next;var k=_=null,Y=null,ne=r,fe=!1;do{var pe=ne.lane&-536870913;if(pe!==ne.lane?(it&pe)===pe:(fr&pe)===pe){var re=ne.revertLane;if(re===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),pe===fi&&(fe=!0);else if((fr&re)===re){ne=ne.next,re===fi&&(fe=!0);continue}else pe={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},Y===null?(k=Y=pe,_=b):Y=Y.next=pe,We.lanes|=re,Gr|=re;pe=ne.action,Rs&&i(b,pe),b=ne.hasEagerState?ne.eagerState:i(b,pe)}else re={lane:pe,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},Y===null?(k=Y=re,_=b):Y=Y.next=re,We.lanes|=pe,Gr|=pe;ne=ne.next}while(ne!==null&&ne!==r);if(Y===null?_=b:Y.next=k,!Jn(b,n.memoizedState)&&(nn=!0,fe&&(i=mi,i!==null)))throw i;n.memoizedState=b,n.baseState=_,n.baseQueue=Y,c.lastRenderedState=b}return p===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Kd(n){var r=Qt(),i=r.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=n;var c=i.dispatch,p=i.pending,b=r.memoizedState;if(p!==null){i.pending=null;var _=p=p.next;do b=n(b,_.action),_=_.next;while(_!==p);Jn(b,r.memoizedState)||(nn=!0),r.memoizedState=b,r.baseQueue===null&&(r.baseState=b),i.lastRenderedState=b}return[b,c]}function dp(n,r,i){var c=We,p=Qt(),b=ot;if(b){if(i===void 0)throw Error(s(407));i=i()}else i=r();var _=!Jn((Nt||p).memoizedState,i);if(_&&(p.memoizedState=i,nn=!0),p=p.queue,Xd(hp.bind(null,c,p,n),[n]),p.getSnapshot!==r||_||tn!==null&&tn.memoizedState.tag&1){if(c.flags|=2048,Ei(9,{destroy:void 0},mp.bind(null,c,p,i,r),null),wt===null)throw Error(s(349));b||(fr&127)!==0||fp(c,r,i)}return i}function fp(n,r,i){n.flags|=16384,n={getSnapshot:r,value:i},r=We.updateQueue,r===null?(r=ou(),We.updateQueue=r,r.stores=[n]):(i=r.stores,i===null?r.stores=[n]:i.push(n))}function mp(n,r,i,c){r.value=i,r.getSnapshot=c,pp(r)&&gp(n)}function hp(n,r,i){return i(function(){pp(r)&&gp(n)})}function pp(n){var r=n.getSnapshot;n=n.value;try{var i=r();return!Jn(n,i)}catch{return!0}}function gp(n){var r=Ts(n,2);r!==null&&$n(r,n,2)}function Vd(n){var r=In();if(typeof n=="function"){var i=n;if(n=i(),Rs){cn(!0);try{i()}finally{cn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mr,lastRenderedState:n},r}function bp(n,r,i,c){return n.baseState=i,Gd(n,Nt,typeof c=="function"?c:mr)}function LN(n,r,i,c,p){if(mu(n))throw Error(s(485));if(n=r.action,n!==null){var b={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){b.listeners.push(_)}};F.T!==null?i(!0):b.isTransition=!1,c(b),i=r.pending,i===null?(b.next=r.pending=b,xp(r,b)):(b.next=i.next,r.pending=i.next=b)}}function xp(n,r){var i=r.action,c=r.payload,p=n.state;if(r.isTransition){var b=F.T,_={};F.T=_;try{var k=i(p,c),Y=F.S;Y!==null&&Y(_,k),Ep(n,r,k)}catch(ne){Qd(n,r,ne)}finally{b!==null&&_.types!==null&&(b.types=_.types),F.T=b}}else try{b=i(p,c),Ep(n,r,b)}catch(ne){Qd(n,r,ne)}}function Ep(n,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(c){yp(n,r,c)},function(c){return Qd(n,r,c)}):yp(n,r,i)}function yp(n,r,i){r.status="fulfilled",r.value=i,Tp(r),n.state=i,r=n.pending,r!==null&&(i=r.next,i===r?n.pending=null:(i=i.next,r.next=i,xp(n,i)))}function Qd(n,r,i){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=i,Tp(r),r=r.next;while(r!==c)}n.action=null}function Tp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function _p(n,r){return r}function Np(n,r){if(ot){var i=wt.formState;if(i!==null){e:{var c=We;if(ot){if(Dt){t:{for(var p=Dt,b=xa;p.nodeType!==8;){if(!b){p=null;break t}if(p=ya(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){Dt=ya(p.nextSibling),c=p.data==="F!";break e}}Br(c)}c=!1}c&&(r=i[0])}}return i=In(),i.memoizedState=i.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_p,lastRenderedState:r},i.queue=c,i=zp.bind(null,We,c),c.dispatch=i,c=Vd(!1),b=tf.bind(null,We,!1,c.queue),c=In(),p={state:r,dispatch:null,action:n,pending:null},c.queue=p,i=LN.bind(null,We,p,b,i),p.dispatch=i,c.memoizedState=n,[r,i,!1]}function vp(n){var r=Qt();return Sp(r,Nt,n)}function Sp(n,r,i){if(r=Gd(n,r,_p)[0],n=cu(mr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=_l(r)}catch(_){throw _===hi?eu:_}else c=r;r=Qt();var p=r.queue,b=p.dispatch;return i!==r.memoizedState&&(We.flags|=2048,Ei(9,{destroy:void 0},jN.bind(null,p,i),null)),[c,b,n]}function jN(n,r){n.action=r}function Ap(n){var r=Qt(),i=Nt;if(i!==null)return Sp(r,i,n);Qt(),r=r.memoizedState,i=Qt();var c=i.queue.dispatch;return i.memoizedState=n,[r,c,!1]}function Ei(n,r,i,c){return n={tag:n,create:i,deps:c,inst:r,next:null},r=We.updateQueue,r===null&&(r=ou(),We.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=n.next=n:(c=i.next,i.next=n,n.next=c,r.lastEffect=n),n}function Cp(){return Qt().memoizedState}function du(n,r,i,c){var p=In();We.flags|=n,p.memoizedState=Ei(1|r,{destroy:void 0},i,c===void 0?null:c)}function fu(n,r,i,c){var p=Qt();c=c===void 0?null:c;var b=p.memoizedState.inst;Nt!==null&&c!==null&&Hd(c,Nt.memoizedState.deps)?p.memoizedState=Ei(r,b,i,c):(We.flags|=n,p.memoizedState=Ei(1|r,b,i,c))}function wp(n,r){du(8390656,8,n,r)}function Xd(n,r){fu(2048,8,n,r)}function BN(n){We.flags|=4;var r=We.updateQueue;if(r===null)r=ou(),We.updateQueue=r,r.events=[n];else{var i=r.events;i===null?r.events=[n]:i.push(n)}}function kp(n){var r=Qt().memoizedState;return BN({ref:r,nextImpl:n}),function(){if((pt&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function Rp(n,r){return fu(4,2,n,r)}function Op(n,r){return fu(4,4,n,r)}function Ip(n,r){if(typeof r=="function"){n=n();var i=r(n);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Mp(n,r,i){i=i!=null?i.concat([n]):null,fu(4,4,Ip.bind(null,r,n),i)}function Wd(){}function Dp(n,r){var i=Qt();r=r===void 0?null:r;var c=i.memoizedState;return r!==null&&Hd(r,c[1])?c[0]:(i.memoizedState=[n,r],n)}function Lp(n,r){var i=Qt();r=r===void 0?null:r;var c=i.memoizedState;if(r!==null&&Hd(r,c[1]))return c[0];if(c=n(),Rs){cn(!0);try{n()}finally{cn(!1)}}return i.memoizedState=[c,r],c}function Zd(n,r,i){return i===void 0||(fr&1073741824)!==0&&(it&261930)===0?n.memoizedState=r:(n.memoizedState=i,n=jg(),We.lanes|=n,Gr|=n,i)}function jp(n,r,i,c){return Jn(i,r)?i:gi.current!==null?(n=Zd(n,i,c),Jn(n,r)||(nn=!0),n):(fr&42)===0||(fr&1073741824)!==0&&(it&261930)===0?(nn=!0,n.memoizedState=i):(n=jg(),We.lanes|=n,Gr|=n,r)}function Bp(n,r,i,c,p){var b=O.p;O.p=b!==0&&8>b?b:8;var _=F.T,k={};F.T=k,tf(n,!1,r,i);try{var Y=p(),ne=F.S;if(ne!==null&&ne(k,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var fe=IN(Y,c);Nl(n,r,fe,sa(n))}else Nl(n,r,c,sa(n))}catch(pe){Nl(n,r,{then:function(){},status:"rejected",reason:pe},sa())}finally{O.p=b,_!==null&&k.types!==null&&(_.types=k.types),F.T=_}}function PN(){}function Jd(n,r,i,c){if(n.tag!==5)throw Error(s(476));var p=Pp(n).queue;Bp(n,p,r,ee,i===null?PN:function(){return Up(n),i(c)})}function Pp(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mr,lastRenderedState:ee},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mr,lastRenderedState:i},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Up(n){var r=Pp(n);r.next===null&&(r=n.alternate.memoizedState),Nl(n,r.next.queue,{},sa())}function ef(){return bn(Hl)}function Hp(){return Qt().memoizedState}function Fp(){return Qt().memoizedState}function UN(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var i=sa();n=Hr(i);var c=Fr(r,n,i);c!==null&&($n(c,r,i),xl(c,r,i)),r={cache:kd()},n.payload=r;return}r=r.return}}function HN(n,r,i){var c=sa();i={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},mu(n)?qp(r,i):(i=xd(n,r,i,c),i!==null&&($n(i,n,c),Yp(i,r,c)))}function zp(n,r,i){var c=sa();Nl(n,r,i,c)}function Nl(n,r,i,c){var p={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(mu(n))qp(r,p);else{var b=n.alternate;if(n.lanes===0&&(b===null||b.lanes===0)&&(b=r.lastRenderedReducer,b!==null))try{var _=r.lastRenderedState,k=b(_,i);if(p.hasEagerState=!0,p.eagerState=k,Jn(k,_))return Ko(n,r,p,0),wt===null&&Go(),!1}catch{}finally{}if(i=xd(n,r,p,c),i!==null)return $n(i,n,c),Yp(i,r,c),!0}return!1}function tf(n,r,i,c){if(c={lane:2,revertLane:Df(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},mu(n)){if(r)throw Error(s(479))}else r=xd(n,i,c,2),r!==null&&$n(r,n,2)}function mu(n){var r=n.alternate;return n===We||r!==null&&r===We}function qp(n,r){bi=iu=!0;var i=n.pending;i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r}function Yp(n,r,i){if((i&4194048)!==0){var c=r.lanes;c&=n.pendingLanes,i|=c,r.lanes=i,qe(n,i)}}var vl={readContext:bn,use:uu,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};vl.useEffectEvent=qt;var $p={readContext:bn,use:uu,useCallback:function(n,r){return In().memoizedState=[n,r===void 0?null:r],n},useContext:bn,useEffect:wp,useImperativeHandle:function(n,r,i){i=i!=null?i.concat([n]):null,du(4194308,4,Ip.bind(null,r,n),i)},useLayoutEffect:function(n,r){return du(4194308,4,n,r)},useInsertionEffect:function(n,r){du(4,2,n,r)},useMemo:function(n,r){var i=In();r=r===void 0?null:r;var c=n();if(Rs){cn(!0);try{n()}finally{cn(!1)}}return i.memoizedState=[c,r],c},useReducer:function(n,r,i){var c=In();if(i!==void 0){var p=i(r);if(Rs){cn(!0);try{i(r)}finally{cn(!1)}}}else p=r;return c.memoizedState=c.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},c.queue=n,n=n.dispatch=HN.bind(null,We,n),[c.memoizedState,n]},useRef:function(n){var r=In();return n={current:n},r.memoizedState=n},useState:function(n){n=Vd(n);var r=n.queue,i=zp.bind(null,We,r);return r.dispatch=i,[n.memoizedState,i]},useDebugValue:Wd,useDeferredValue:function(n,r){var i=In();return Zd(i,n,r)},useTransition:function(){var n=Vd(!1);return n=Bp.bind(null,We,n.queue,!0,!1),In().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,i){var c=We,p=In();if(ot){if(i===void 0)throw Error(s(407));i=i()}else{if(i=r(),wt===null)throw Error(s(349));(it&127)!==0||fp(c,r,i)}p.memoizedState=i;var b={value:i,getSnapshot:r};return p.queue=b,wp(hp.bind(null,c,b,n),[n]),c.flags|=2048,Ei(9,{destroy:void 0},mp.bind(null,c,b,i,r),null),i},useId:function(){var n=In(),r=wt.identifierPrefix;if(ot){var i=za,c=Fa;i=(c&~(1<<32-bt(c)-1)).toString(32)+i,r="_"+r+"R_"+i,i=lu++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=MN++,r="_"+r+"r_"+i.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:ef,useFormState:Np,useActionState:Np,useOptimistic:function(n){var r=In();r.memoizedState=r.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=tf.bind(null,We,!0,i),i.dispatch=r,[n,r]},useMemoCache:$d,useCacheRefresh:function(){return In().memoizedState=UN.bind(null,We)},useEffectEvent:function(n){var r=In(),i={impl:n};return r.memoizedState=i,function(){if((pt&2)!==0)throw Error(s(440));return i.impl.apply(void 0,arguments)}}},nf={readContext:bn,use:uu,useCallback:Dp,useContext:bn,useEffect:Xd,useImperativeHandle:Mp,useInsertionEffect:Rp,useLayoutEffect:Op,useMemo:Lp,useReducer:cu,useRef:Cp,useState:function(){return cu(mr)},useDebugValue:Wd,useDeferredValue:function(n,r){var i=Qt();return jp(i,Nt.memoizedState,n,r)},useTransition:function(){var n=cu(mr)[0],r=Qt().memoizedState;return[typeof n=="boolean"?n:_l(n),r]},useSyncExternalStore:dp,useId:Hp,useHostTransitionStatus:ef,useFormState:vp,useActionState:vp,useOptimistic:function(n,r){var i=Qt();return bp(i,Nt,n,r)},useMemoCache:$d,useCacheRefresh:Fp};nf.useEffectEvent=kp;var Gp={readContext:bn,use:uu,useCallback:Dp,useContext:bn,useEffect:Xd,useImperativeHandle:Mp,useInsertionEffect:Rp,useLayoutEffect:Op,useMemo:Lp,useReducer:Kd,useRef:Cp,useState:function(){return Kd(mr)},useDebugValue:Wd,useDeferredValue:function(n,r){var i=Qt();return Nt===null?Zd(i,n,r):jp(i,Nt.memoizedState,n,r)},useTransition:function(){var n=Kd(mr)[0],r=Qt().memoizedState;return[typeof n=="boolean"?n:_l(n),r]},useSyncExternalStore:dp,useId:Hp,useHostTransitionStatus:ef,useFormState:Ap,useActionState:Ap,useOptimistic:function(n,r){var i=Qt();return Nt!==null?bp(i,Nt,n,r):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:$d,useCacheRefresh:Fp};Gp.useEffectEvent=kp;function af(n,r,i,c){r=n.memoizedState,i=i(c,r),i=i==null?r:g({},r,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var rf={enqueueSetState:function(n,r,i){n=n._reactInternals;var c=sa(),p=Hr(c);p.payload=r,i!=null&&(p.callback=i),r=Fr(n,p,c),r!==null&&($n(r,n,c),xl(r,n,c))},enqueueReplaceState:function(n,r,i){n=n._reactInternals;var c=sa(),p=Hr(c);p.tag=1,p.payload=r,i!=null&&(p.callback=i),r=Fr(n,p,c),r!==null&&($n(r,n,c),xl(r,n,c))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var i=sa(),c=Hr(i);c.tag=2,r!=null&&(c.callback=r),r=Fr(n,c,i),r!==null&&($n(r,n,i),xl(r,n,i))}};function Kp(n,r,i,c,p,b,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,b,_):r.prototype&&r.prototype.isPureReactComponent?!cl(i,c)||!cl(p,b):!0}function Vp(n,r,i,c){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,c),r.state!==n&&rf.enqueueReplaceState(r,r.state,null)}function Os(n,r){var i=r;if("ref"in r){i={};for(var c in r)c!=="ref"&&(i[c]=r[c])}if(n=n.defaultProps){i===r&&(i=g({},i));for(var p in n)i[p]===void 0&&(i[p]=n[p])}return i}function Qp(n){$o(n)}function Xp(n){console.error(n)}function Wp(n){$o(n)}function hu(n,r){try{var i=n.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function Zp(n,r,i){try{var c=n.onCaughtError;c(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function sf(n,r,i){return i=Hr(i),i.tag=3,i.payload={element:null},i.callback=function(){hu(n,r)},i}function Jp(n){return n=Hr(n),n.tag=3,n}function eg(n,r,i,c){var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var b=c.value;n.payload=function(){return p(b)},n.callback=function(){Zp(r,i,c)}}var _=i.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){Zp(r,i,c),typeof p!="function"&&(Kr===null?Kr=new Set([this]):Kr.add(this));var k=c.stack;this.componentDidCatch(c.value,{componentStack:k!==null?k:""})})}function FN(n,r,i,c,p){if(i.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=i.alternate,r!==null&&di(r,i,p,!0),i=ta.current,i!==null){switch(i.tag){case 31:case 13:return Ea===null?Au():i.alternate===null&&Yt===0&&(Yt=3),i.flags&=-257,i.flags|=65536,i.lanes=p,c===tu?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([c]):r.add(c),Of(n,c,p)),!1;case 22:return i.flags|=65536,c===tu?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([c]):i.add(c)),Of(n,c,p)),!1}throw Error(s(435,i.tag))}return Of(n,c,p),Au(),!1}if(ot)return r=ta.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,c!==vd&&(n=Error(s(422),{cause:c}),ml(pa(n,i)))):(c!==vd&&(r=Error(s(423),{cause:c}),ml(pa(r,i))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,c=pa(c,i),p=sf(n.stateNode,c,p),Ld(n,p),Yt!==4&&(Yt=2)),!1;var b=Error(s(520),{cause:c});if(b=pa(b,i),Il===null?Il=[b]:Il.push(b),Yt!==4&&(Yt=2),r===null)return!0;c=pa(c,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,n=p&-p,i.lanes|=n,n=sf(i.stateNode,c,n),Ld(i,n),!1;case 1:if(r=i.type,b=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Kr===null||!Kr.has(b))))return i.flags|=65536,p&=-p,i.lanes|=p,p=Jp(p),eg(p,n,i,c),Ld(i,p),!1}i=i.return}while(i!==null);return!1}var lf=Error(s(461)),nn=!1;function xn(n,r,i,c){r.child=n===null?rp(r,null,i,c):ks(r,n.child,i,c)}function tg(n,r,i,c,p){i=i.render;var b=r.ref;if("ref"in c){var _={};for(var k in c)k!=="ref"&&(_[k]=c[k])}else _=c;return Ss(r),c=Fd(n,r,i,_,b,p),k=zd(),n!==null&&!nn?(qd(n,r,p),hr(n,r,p)):(ot&&k&&_d(r),r.flags|=1,xn(n,r,c,p),r.child)}function ng(n,r,i,c,p){if(n===null){var b=i.type;return typeof b=="function"&&!Ed(b)&&b.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=b,ag(n,r,b,c,p)):(n=Qo(i.type,null,c,r,r.mode,p),n.ref=r.ref,n.return=r,r.child=n)}if(b=n.child,!pf(n,p)){var _=b.memoizedProps;if(i=i.compare,i=i!==null?i:cl,i(_,c)&&n.ref===r.ref)return hr(n,r,p)}return r.flags|=1,n=or(b,c),n.ref=r.ref,n.return=r,r.child=n}function ag(n,r,i,c,p){if(n!==null){var b=n.memoizedProps;if(cl(b,c)&&n.ref===r.ref)if(nn=!1,r.pendingProps=c=b,pf(n,p))(n.flags&131072)!==0&&(nn=!0);else return r.lanes=n.lanes,hr(n,r,p)}return of(n,r,i,c,p)}function rg(n,r,i,c){var p=c.children,b=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((r.flags&128)!==0){if(b=b!==null?b.baseLanes|i:i,n!==null){for(c=r.child=n.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~b}else c=0,r.child=null;return sg(n,r,b,i,c)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Jo(r,b!==null?b.cachePool:null),b!==null?lp(r,b):Bd(),op(r);else return c=r.lanes=536870912,sg(n,r,b!==null?b.baseLanes|i:i,i,c)}else b!==null?(Jo(r,b.cachePool),lp(r,b),qr(),r.memoizedState=null):(n!==null&&Jo(r,null),Bd(),qr());return xn(n,r,p,i),r.child}function Sl(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function sg(n,r,i,c,p){var b=Od();return b=b===null?null:{parent:en._currentValue,pool:b},r.memoizedState={baseLanes:i,cachePool:b},n!==null&&Jo(r,null),Bd(),op(r),n!==null&&di(n,r,c,!0),r.childLanes=p,null}function pu(n,r){return r=bu({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function ig(n,r,i){return ks(r,n.child,null,i),n=pu(r,r.pendingProps),n.flags|=2,na(r),r.memoizedState=null,n}function zN(n,r,i){var c=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(ot){if(c.mode==="hidden")return n=pu(r,c),r.lanes=536870912,Sl(null,n);if(Ud(r),(n=Dt)?(n=xb(n,xa),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Lr!==null?{id:Fa,overflow:za}:null,retryLane:536870912,hydrationErrors:null},i=q0(n),i.return=r,r.child=i,gn=r,Dt=null)):n=null,n===null)throw Br(r);return r.lanes=536870912,null}return pu(r,c)}var b=n.memoizedState;if(b!==null){var _=b.dehydrated;if(Ud(r),p)if(r.flags&256)r.flags&=-257,r=ig(n,r,i);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(s(558));else if(nn||di(n,r,i,!1),p=(i&n.childLanes)!==0,nn||p){if(c=wt,c!==null&&(_=$t(c,i),_!==0&&_!==b.retryLane))throw b.retryLane=_,Ts(n,_),$n(c,n,_),lf;Au(),r=ig(n,r,i)}else n=b.treeContext,Dt=ya(_.nextSibling),gn=r,ot=!0,jr=null,xa=!1,n!==null&&G0(r,n),r=pu(r,c),r.flags|=4096;return r}return n=or(n.child,{mode:c.mode,children:c.children}),n.ref=r.ref,r.child=n,n.return=r,n}function gu(n,r){var i=r.ref;if(i===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(n===null||n.ref!==i)&&(r.flags|=4194816)}}function of(n,r,i,c,p){return Ss(r),i=Fd(n,r,i,c,void 0,p),c=zd(),n!==null&&!nn?(qd(n,r,p),hr(n,r,p)):(ot&&c&&_d(r),r.flags|=1,xn(n,r,i,p),r.child)}function lg(n,r,i,c,p,b){return Ss(r),r.updateQueue=null,i=cp(r,c,i,p),up(n),c=zd(),n!==null&&!nn?(qd(n,r,b),hr(n,r,b)):(ot&&c&&_d(r),r.flags|=1,xn(n,r,i,b),r.child)}function og(n,r,i,c,p){if(Ss(r),r.stateNode===null){var b=li,_=i.contextType;typeof _=="object"&&_!==null&&(b=bn(_)),b=new i(c,b),r.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=rf,r.stateNode=b,b._reactInternals=r,b=r.stateNode,b.props=c,b.state=r.memoizedState,b.refs={},Md(r),_=i.contextType,b.context=typeof _=="object"&&_!==null?bn(_):li,b.state=r.memoizedState,_=i.getDerivedStateFromProps,typeof _=="function"&&(af(r,i,_,c),b.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(_=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),_!==b.state&&rf.enqueueReplaceState(b,b.state,null),yl(r,c,b,p),El(),b.state=r.memoizedState),typeof b.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(n===null){b=r.stateNode;var k=r.memoizedProps,Y=Os(i,k);b.props=Y;var ne=b.context,fe=i.contextType;_=li,typeof fe=="object"&&fe!==null&&(_=bn(fe));var pe=i.getDerivedStateFromProps;fe=typeof pe=="function"||typeof b.getSnapshotBeforeUpdate=="function",k=r.pendingProps!==k,fe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(k||ne!==_)&&Vp(r,b,c,_),Ur=!1;var re=r.memoizedState;b.state=re,yl(r,c,b,p),El(),ne=r.memoizedState,k||re!==ne||Ur?(typeof pe=="function"&&(af(r,i,pe,c),ne=r.memoizedState),(Y=Ur||Kp(r,i,Y,c,re,ne,_))?(fe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(r.flags|=4194308)):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=ne),b.props=c,b.state=ne,b.context=_,c=Y):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{b=r.stateNode,Dd(n,r),_=r.memoizedProps,fe=Os(i,_),b.props=fe,pe=r.pendingProps,re=b.context,ne=i.contextType,Y=li,typeof ne=="object"&&ne!==null&&(Y=bn(ne)),k=i.getDerivedStateFromProps,(ne=typeof k=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(_!==pe||re!==Y)&&Vp(r,b,c,Y),Ur=!1,re=r.memoizedState,b.state=re,yl(r,c,b,p),El();var ue=r.memoizedState;_!==pe||re!==ue||Ur||n!==null&&n.dependencies!==null&&Wo(n.dependencies)?(typeof k=="function"&&(af(r,i,k,c),ue=r.memoizedState),(fe=Ur||Kp(r,i,fe,c,re,ue,Y)||n!==null&&n.dependencies!==null&&Wo(n.dependencies))?(ne||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(c,ue,Y),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(c,ue,Y)),typeof b.componentDidUpdate=="function"&&(r.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof b.componentDidUpdate!="function"||_===n.memoizedProps&&re===n.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&re===n.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=ue),b.props=c,b.state=ue,b.context=Y,c=fe):(typeof b.componentDidUpdate!="function"||_===n.memoizedProps&&re===n.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&re===n.memoizedState||(r.flags|=1024),c=!1)}return b=c,gu(n,r),c=(r.flags&128)!==0,b||c?(b=r.stateNode,i=c&&typeof i.getDerivedStateFromError!="function"?null:b.render(),r.flags|=1,n!==null&&c?(r.child=ks(r,n.child,null,p),r.child=ks(r,null,i,p)):xn(n,r,i,p),r.memoizedState=b.state,n=r.child):n=hr(n,r,p),n}function ug(n,r,i,c){return Ns(),r.flags|=256,xn(n,r,i,c),r.child}var uf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cf(n){return{baseLanes:n,cachePool:Z0()}}function df(n,r,i){return n=n!==null?n.childLanes&~i:0,r&&(n|=ra),n}function cg(n,r,i){var c=r.pendingProps,p=!1,b=(r.flags&128)!==0,_;if((_=b)||(_=n!==null&&n.memoizedState===null?!1:(Vt.current&2)!==0),_&&(p=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,n===null){if(ot){if(p?zr(r):qr(),(n=Dt)?(n=xb(n,xa),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Lr!==null?{id:Fa,overflow:za}:null,retryLane:536870912,hydrationErrors:null},i=q0(n),i.return=r,r.child=i,gn=r,Dt=null)):n=null,n===null)throw Br(r);return Kf(n)?r.lanes=32:r.lanes=536870912,null}var k=c.children;return c=c.fallback,p?(qr(),p=r.mode,k=bu({mode:"hidden",children:k},p),c=_s(c,p,i,null),k.return=r,c.return=r,k.sibling=c,r.child=k,c=r.child,c.memoizedState=cf(i),c.childLanes=df(n,_,i),r.memoizedState=uf,Sl(null,c)):(zr(r),ff(r,k))}var Y=n.memoizedState;if(Y!==null&&(k=Y.dehydrated,k!==null)){if(b)r.flags&256?(zr(r),r.flags&=-257,r=mf(n,r,i)):r.memoizedState!==null?(qr(),r.child=n.child,r.flags|=128,r=null):(qr(),k=c.fallback,p=r.mode,c=bu({mode:"visible",children:c.children},p),k=_s(k,p,i,null),k.flags|=2,c.return=r,k.return=r,c.sibling=k,r.child=c,ks(r,n.child,null,i),c=r.child,c.memoizedState=cf(i),c.childLanes=df(n,_,i),r.memoizedState=uf,r=Sl(null,c));else if(zr(r),Kf(k)){if(_=k.nextSibling&&k.nextSibling.dataset,_)var ne=_.dgst;_=ne,c=Error(s(419)),c.stack="",c.digest=_,ml({value:c,source:null,stack:null}),r=mf(n,r,i)}else if(nn||di(n,r,i,!1),_=(i&n.childLanes)!==0,nn||_){if(_=wt,_!==null&&(c=$t(_,i),c!==0&&c!==Y.retryLane))throw Y.retryLane=c,Ts(n,c),$n(_,n,c),lf;Gf(k)||Au(),r=mf(n,r,i)}else Gf(k)?(r.flags|=192,r.child=n.child,r=null):(n=Y.treeContext,Dt=ya(k.nextSibling),gn=r,ot=!0,jr=null,xa=!1,n!==null&&G0(r,n),r=ff(r,c.children),r.flags|=4096);return r}return p?(qr(),k=c.fallback,p=r.mode,Y=n.child,ne=Y.sibling,c=or(Y,{mode:"hidden",children:c.children}),c.subtreeFlags=Y.subtreeFlags&65011712,ne!==null?k=or(ne,k):(k=_s(k,p,i,null),k.flags|=2),k.return=r,c.return=r,c.sibling=k,r.child=c,Sl(null,c),c=r.child,k=n.child.memoizedState,k===null?k=cf(i):(p=k.cachePool,p!==null?(Y=en._currentValue,p=p.parent!==Y?{parent:Y,pool:Y}:p):p=Z0(),k={baseLanes:k.baseLanes|i,cachePool:p}),c.memoizedState=k,c.childLanes=df(n,_,i),r.memoizedState=uf,Sl(n.child,c)):(zr(r),i=n.child,n=i.sibling,i=or(i,{mode:"visible",children:c.children}),i.return=r,i.sibling=null,n!==null&&(_=r.deletions,_===null?(r.deletions=[n],r.flags|=16):_.push(n)),r.child=i,r.memoizedState=null,i)}function ff(n,r){return r=bu({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function bu(n,r){return n=ea(22,n,null,r),n.lanes=0,n}function mf(n,r,i){return ks(r,n.child,null,i),n=ff(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function dg(n,r,i){n.lanes|=r;var c=n.alternate;c!==null&&(c.lanes|=r),Cd(n.return,r,i)}function hf(n,r,i,c,p,b){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:i,tailMode:p,treeForkCount:b}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=c,_.tail=i,_.tailMode=p,_.treeForkCount=b)}function fg(n,r,i){var c=r.pendingProps,p=c.revealOrder,b=c.tail;c=c.children;var _=Vt.current,k=(_&2)!==0;if(k?(_=_&1|2,r.flags|=128):_&=1,D(Vt,_),xn(n,r,c,i),c=ot?fl:0,!k&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&dg(n,i,r);else if(n.tag===19)dg(n,i,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(i=r.child,p=null;i!==null;)n=i.alternate,n!==null&&su(n)===null&&(p=i),i=i.sibling;i=p,i===null?(p=r.child,r.child=null):(p=i.sibling,i.sibling=null),hf(r,!1,p,i,b,c);break;case"backwards":case"unstable_legacy-backwards":for(i=null,p=r.child,r.child=null;p!==null;){if(n=p.alternate,n!==null&&su(n)===null){r.child=p;break}n=p.sibling,p.sibling=i,i=p,p=n}hf(r,!0,i,null,b,c);break;case"together":hf(r,!1,null,null,void 0,c);break;default:r.memoizedState=null}return r.child}function hr(n,r,i){if(n!==null&&(r.dependencies=n.dependencies),Gr|=r.lanes,(i&r.childLanes)===0)if(n!==null){if(di(n,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(s(153));if(r.child!==null){for(n=r.child,i=or(n,n.pendingProps),r.child=i,i.return=r;n.sibling!==null;)n=n.sibling,i=i.sibling=or(n,n.pendingProps),i.return=r;i.sibling=null}return r.child}function pf(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Wo(n)))}function qN(n,r,i){switch(r.tag){case 3:dt(r,r.stateNode.containerInfo),Pr(r,en,n.memoizedState.cache),Ns();break;case 27:case 5:zt(r);break;case 4:dt(r,r.stateNode.containerInfo);break;case 10:Pr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Ud(r),null;break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(zr(r),r.flags|=128,null):(i&r.child.childLanes)!==0?cg(n,r,i):(zr(r),n=hr(n,r,i),n!==null?n.sibling:null);zr(r);break;case 19:var p=(n.flags&128)!==0;if(c=(i&r.childLanes)!==0,c||(di(n,r,i,!1),c=(i&r.childLanes)!==0),p){if(c)return fg(n,r,i);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),D(Vt,Vt.current),c)break;return null;case 22:return r.lanes=0,rg(n,r,i,r.pendingProps);case 24:Pr(r,en,n.memoizedState.cache)}return hr(n,r,i)}function mg(n,r,i){if(n!==null)if(n.memoizedProps!==r.pendingProps)nn=!0;else{if(!pf(n,i)&&(r.flags&128)===0)return nn=!1,qN(n,r,i);nn=(n.flags&131072)!==0}else nn=!1,ot&&(r.flags&1048576)!==0&&$0(r,fl,r.index);switch(r.lanes=0,r.tag){case 16:e:{var c=r.pendingProps;if(n=Cs(r.elementType),r.type=n,typeof n=="function")Ed(n)?(c=Os(n,c),r.tag=1,r=og(null,r,n,c,i)):(r.tag=0,r=of(null,r,n,c,i));else{if(n!=null){var p=n.$$typeof;if(p===U){r.tag=11,r=tg(null,r,n,c,i);break e}else if(p===z){r.tag=14,r=ng(null,r,n,c,i);break e}}throw r=le(n)||n,Error(s(306,r,""))}}return r;case 0:return of(n,r,r.type,r.pendingProps,i);case 1:return c=r.type,p=Os(c,r.pendingProps),og(n,r,c,p,i);case 3:e:{if(dt(r,r.stateNode.containerInfo),n===null)throw Error(s(387));c=r.pendingProps;var b=r.memoizedState;p=b.element,Dd(n,r),yl(r,c,null,i);var _=r.memoizedState;if(c=_.cache,Pr(r,en,c),c!==b.cache&&wd(r,[en],i,!0),El(),c=_.element,b.isDehydrated)if(b={element:c,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=b,r.memoizedState=b,r.flags&256){r=ug(n,r,c,i);break e}else if(c!==p){p=pa(Error(s(424)),r),ml(p),r=ug(n,r,c,i);break e}else{switch(n=r.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(Dt=ya(n.firstChild),gn=r,ot=!0,jr=null,xa=!0,i=rp(r,null,c,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ns(),c===p){r=hr(n,r,i);break e}xn(n,r,c,i)}r=r.child}return r;case 26:return gu(n,r),n===null?(i=vb(r.type,null,r.pendingProps,null))?r.memoizedState=i:ot||(i=r.type,n=r.pendingProps,c=Mu(Re.current).createElement(i),c[Gt]=r,c[_n]=n,En(c,i,n),Zt(c),r.stateNode=c):r.memoizedState=vb(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return zt(r),n===null&&ot&&(c=r.stateNode=Tb(r.type,r.pendingProps,Re.current),gn=r,xa=!0,p=Dt,Wr(r.type)?(Vf=p,Dt=ya(c.firstChild)):Dt=p),xn(n,r,r.pendingProps.children,i),gu(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&ot&&((p=c=Dt)&&(c=E2(c,r.type,r.pendingProps,xa),c!==null?(r.stateNode=c,gn=r,Dt=ya(c.firstChild),xa=!1,p=!0):p=!1),p||Br(r)),zt(r),p=r.type,b=r.pendingProps,_=n!==null?n.memoizedProps:null,c=b.children,qf(p,b)?c=null:_!==null&&qf(p,_)&&(r.flags|=32),r.memoizedState!==null&&(p=Fd(n,r,DN,null,null,i),Hl._currentValue=p),gu(n,r),xn(n,r,c,i),r.child;case 6:return n===null&&ot&&((n=i=Dt)&&(i=y2(i,r.pendingProps,xa),i!==null?(r.stateNode=i,gn=r,Dt=null,n=!0):n=!1),n||Br(r)),null;case 13:return cg(n,r,i);case 4:return dt(r,r.stateNode.containerInfo),c=r.pendingProps,n===null?r.child=ks(r,null,c,i):xn(n,r,c,i),r.child;case 11:return tg(n,r,r.type,r.pendingProps,i);case 7:return xn(n,r,r.pendingProps,i),r.child;case 8:return xn(n,r,r.pendingProps.children,i),r.child;case 12:return xn(n,r,r.pendingProps.children,i),r.child;case 10:return c=r.pendingProps,Pr(r,r.type,c.value),xn(n,r,c.children,i),r.child;case 9:return p=r.type._context,c=r.pendingProps.children,Ss(r),p=bn(p),c=c(p),r.flags|=1,xn(n,r,c,i),r.child;case 14:return ng(n,r,r.type,r.pendingProps,i);case 15:return ag(n,r,r.type,r.pendingProps,i);case 19:return fg(n,r,i);case 31:return zN(n,r,i);case 22:return rg(n,r,i,r.pendingProps);case 24:return Ss(r),c=bn(en),n===null?(p=Od(),p===null&&(p=wt,b=kd(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=i),p=b),r.memoizedState={parent:c,cache:p},Md(r),Pr(r,en,p)):((n.lanes&i)!==0&&(Dd(n,r),yl(r,null,null,i),El()),p=n.memoizedState,b=r.memoizedState,p.parent!==c?(p={parent:c,cache:c},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),Pr(r,en,c)):(c=b.cache,Pr(r,en,c),c!==p.cache&&wd(r,[en],i,!0))),xn(n,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function pr(n){n.flags|=4}function gf(n,r,i,c,p){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(Hg())n.flags|=8192;else throw ws=tu,Id}else n.flags&=-16777217}function hg(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!kb(r))if(Hg())n.flags|=8192;else throw ws=tu,Id}function xu(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?$e():536870912,n.lanes|=r,Ni|=r)}function Al(n,r){if(!ot)switch(n.tailMode){case"hidden":r=n.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var c=null;i!==null;)i.alternate!==null&&(c=i),i=i.sibling;c===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Lt(n){var r=n.alternate!==null&&n.alternate.child===n.child,i=0,c=0;if(r)for(var p=n.child;p!==null;)i|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)i|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=c,n.childLanes=i,r}function YN(n,r,i){var c=r.pendingProps;switch(Nd(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lt(r),null;case 1:return Lt(r),null;case 3:return i=r.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),dr(en),ut(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(ci(r)?pr(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Sd())),Lt(r),null;case 26:var p=r.type,b=r.memoizedState;return n===null?(pr(r),b!==null?(Lt(r),hg(r,b)):(Lt(r),gf(r,p,null,c,i))):b?b!==n.memoizedState?(pr(r),Lt(r),hg(r,b)):(Lt(r),r.flags&=-16777217):(n=n.memoizedProps,n!==c&&pr(r),Lt(r),gf(r,p,n,c,i)),null;case 27:if(Tn(r),i=Re.current,p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==c&&pr(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Lt(r),null}n=Te.current,ci(r)?K0(r):(n=Tb(p,c,i),r.stateNode=n,pr(r))}return Lt(r),null;case 5:if(Tn(r),p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==c&&pr(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Lt(r),null}if(b=Te.current,ci(r))K0(r);else{var _=Mu(Re.current);switch(b){case 1:b=_.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:b=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":b=_.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":b=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":b=_.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof c.is=="string"?_.createElement("select",{is:c.is}):_.createElement("select"),c.multiple?b.multiple=!0:c.size&&(b.size=c.size);break;default:b=typeof c.is=="string"?_.createElement(p,{is:c.is}):_.createElement(p)}}b[Gt]=r,b[_n]=c;e:for(_=r.child;_!==null;){if(_.tag===5||_.tag===6)b.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===r)break e;for(;_.sibling===null;){if(_.return===null||_.return===r)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}r.stateNode=b;e:switch(En(b,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&pr(r)}}return Lt(r),gf(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,i),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==c&&pr(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(n=Re.current,ci(r)){if(n=r.stateNode,i=r.memoizedProps,c=null,p=gn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}n[Gt]=r,n=!!(n.nodeValue===i||c!==null&&c.suppressHydrationWarning===!0||cb(n.nodeValue,i)),n||Br(r,!0)}else n=Mu(n).createTextNode(c),n[Gt]=r,r.stateNode=n}return Lt(r),null;case 31:if(i=r.memoizedState,n===null||n.memoizedState!==null){if(c=ci(r),i!==null){if(n===null){if(!c)throw Error(s(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[Gt]=r}else Ns(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Lt(r),n=!1}else i=Sd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return r.flags&256?(na(r),r):(na(r),null);if((r.flags&128)!==0)throw Error(s(558))}return Lt(r),null;case 13:if(c=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=ci(r),c!==null&&c.dehydrated!==null){if(n===null){if(!p)throw Error(s(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(s(317));p[Gt]=r}else Ns(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Lt(r),p=!1}else p=Sd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(na(r),r):(na(r),null)}return na(r),(r.flags&128)!==0?(r.lanes=i,r):(i=c!==null,n=n!==null&&n.memoizedState!==null,i&&(c=r.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),b=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(b=c.memoizedState.cachePool.pool),b!==p&&(c.flags|=2048)),i!==n&&i&&(r.child.flags|=8192),xu(r,r.updateQueue),Lt(r),null);case 4:return ut(),n===null&&Pf(r.stateNode.containerInfo),Lt(r),null;case 10:return dr(r.type),Lt(r),null;case 19:if(ie(Vt),c=r.memoizedState,c===null)return Lt(r),null;if(p=(r.flags&128)!==0,b=c.rendering,b===null)if(p)Al(c,!1);else{if(Yt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(b=su(n),b!==null){for(r.flags|=128,Al(c,!1),n=b.updateQueue,r.updateQueue=n,xu(r,n),r.subtreeFlags=0,n=i,i=r.child;i!==null;)z0(i,n),i=i.sibling;return D(Vt,Vt.current&1|2),ot&&ur(r,c.treeForkCount),r.child}n=n.sibling}c.tail!==null&&_t()>Nu&&(r.flags|=128,p=!0,Al(c,!1),r.lanes=4194304)}else{if(!p)if(n=su(b),n!==null){if(r.flags|=128,p=!0,n=n.updateQueue,r.updateQueue=n,xu(r,n),Al(c,!0),c.tail===null&&c.tailMode==="hidden"&&!b.alternate&&!ot)return Lt(r),null}else 2*_t()-c.renderingStartTime>Nu&&i!==536870912&&(r.flags|=128,p=!0,Al(c,!1),r.lanes=4194304);c.isBackwards?(b.sibling=r.child,r.child=b):(n=c.last,n!==null?n.sibling=b:r.child=b,c.last=b)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=_t(),n.sibling=null,i=Vt.current,D(Vt,p?i&1|2:i&1),ot&&ur(r,c.treeForkCount),n):(Lt(r),null);case 22:case 23:return na(r),Pd(),c=r.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(i&536870912)!==0&&(r.flags&128)===0&&(Lt(r),r.subtreeFlags&6&&(r.flags|=8192)):Lt(r),i=r.updateQueue,i!==null&&xu(r,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==i&&(r.flags|=2048),n!==null&&ie(As),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),dr(en),Lt(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function $N(n,r){switch(Nd(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return dr(en),ut(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Tn(r),null;case 31:if(r.memoizedState!==null){if(na(r),r.alternate===null)throw Error(s(340));Ns()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(na(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Ns()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return ie(Vt),null;case 4:return ut(),null;case 10:return dr(r.type),null;case 22:case 23:return na(r),Pd(),n!==null&&ie(As),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return dr(en),null;case 25:return null;default:return null}}function pg(n,r){switch(Nd(r),r.tag){case 3:dr(en),ut();break;case 26:case 27:case 5:Tn(r);break;case 4:ut();break;case 31:r.memoizedState!==null&&na(r);break;case 13:na(r);break;case 19:ie(Vt);break;case 10:dr(r.type);break;case 22:case 23:na(r),Pd(),n!==null&&ie(As);break;case 24:dr(en)}}function Cl(n,r){try{var i=r.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var p=c.next;i=p;do{if((i.tag&n)===n){c=void 0;var b=i.create,_=i.inst;c=b(),_.destroy=c}i=i.next}while(i!==p)}}catch(k){Tt(r,r.return,k)}}function Yr(n,r,i){try{var c=r.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var b=p.next;c=b;do{if((c.tag&n)===n){var _=c.inst,k=_.destroy;if(k!==void 0){_.destroy=void 0,p=r;var Y=i,ne=k;try{ne()}catch(fe){Tt(p,Y,fe)}}}c=c.next}while(c!==b)}}catch(fe){Tt(r,r.return,fe)}}function gg(n){var r=n.updateQueue;if(r!==null){var i=n.stateNode;try{ip(r,i)}catch(c){Tt(n,n.return,c)}}}function bg(n,r,i){i.props=Os(n.type,n.memoizedProps),i.state=n.memoizedState;try{i.componentWillUnmount()}catch(c){Tt(n,r,c)}}function wl(n,r){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof i=="function"?n.refCleanup=i(c):i.current=c}}catch(p){Tt(n,r,p)}}function qa(n,r){var i=n.ref,c=n.refCleanup;if(i!==null)if(typeof c=="function")try{c()}catch(p){Tt(n,r,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(p){Tt(n,r,p)}else i.current=null}function xg(n){var r=n.type,i=n.memoizedProps,c=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&c.focus();break e;case"img":i.src?c.src=i.src:i.srcSet&&(c.srcset=i.srcSet)}}catch(p){Tt(n,n.return,p)}}function bf(n,r,i){try{var c=n.stateNode;m2(c,n.type,i,r),c[_n]=r}catch(p){Tt(n,n.return,p)}}function Eg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Wr(n.type)||n.tag===4}function xf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Eg(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&&Wr(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 Ef(n,r,i){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(n),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Ne));else if(c!==4&&(c===27&&Wr(n.type)&&(i=n.stateNode,r=null),n=n.child,n!==null))for(Ef(n,r,i),n=n.sibling;n!==null;)Ef(n,r,i),n=n.sibling}function Eu(n,r,i){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?i.insertBefore(n,r):i.appendChild(n);else if(c!==4&&(c===27&&Wr(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(Eu(n,r,i),n=n.sibling;n!==null;)Eu(n,r,i),n=n.sibling}function yg(n){var r=n.stateNode,i=n.memoizedProps;try{for(var c=n.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);En(r,c,i),r[Gt]=n,r[_n]=i}catch(b){Tt(n,n.return,b)}}var gr=!1,an=!1,yf=!1,Tg=typeof WeakSet=="function"?WeakSet:Set,dn=null;function GN(n,r){if(n=n.containerInfo,Ff=Hu,n=M0(n),fd(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var c=i.getSelection&&i.getSelection();if(c&&c.rangeCount!==0){i=c.anchorNode;var p=c.anchorOffset,b=c.focusNode;c=c.focusOffset;try{i.nodeType,b.nodeType}catch{i=null;break e}var _=0,k=-1,Y=-1,ne=0,fe=0,pe=n,re=null;t:for(;;){for(var ue;pe!==i||p!==0&&pe.nodeType!==3||(k=_+p),pe!==b||c!==0&&pe.nodeType!==3||(Y=_+c),pe.nodeType===3&&(_+=pe.nodeValue.length),(ue=pe.firstChild)!==null;)re=pe,pe=ue;for(;;){if(pe===n)break t;if(re===i&&++ne===p&&(k=_),re===b&&++fe===c&&(Y=_),(ue=pe.nextSibling)!==null)break;pe=re,re=pe.parentNode}pe=ue}i=k===-1||Y===-1?null:{start:k,end:Y}}else i=null}i=i||{start:0,end:0}}else i=null;for(zf={focusedElem:n,selectionRange:i},Hu=!1,dn=r;dn!==null;)if(r=dn,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,dn=n;else for(;dn!==null;){switch(r=dn,b=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)p=n[i],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&b!==null){n=void 0,i=r,p=b.memoizedProps,b=b.memoizedState,c=i.stateNode;try{var Oe=Os(i.type,p);n=c.getSnapshotBeforeUpdate(Oe,b),c.__reactInternalSnapshotBeforeUpdate=n}catch(Fe){Tt(i,i.return,Fe)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,i=n.nodeType,i===9)$f(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":$f(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(s(163))}if(n=r.sibling,n!==null){n.return=r.return,dn=n;break}dn=r.return}}function _g(n,r,i){var c=i.flags;switch(i.tag){case 0:case 11:case 15:xr(n,i),c&4&&Cl(5,i);break;case 1:if(xr(n,i),c&4)if(n=i.stateNode,r===null)try{n.componentDidMount()}catch(_){Tt(i,i.return,_)}else{var p=Os(i.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(p,r,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Tt(i,i.return,_)}}c&64&&gg(i),c&512&&wl(i,i.return);break;case 3:if(xr(n,i),c&64&&(n=i.updateQueue,n!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{ip(n,r)}catch(_){Tt(i,i.return,_)}}break;case 27:r===null&&c&4&&yg(i);case 26:case 5:xr(n,i),r===null&&c&4&&xg(i),c&512&&wl(i,i.return);break;case 12:xr(n,i);break;case 31:xr(n,i),c&4&&Sg(n,i);break;case 13:xr(n,i),c&4&&Ag(n,i),c&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=t2.bind(null,i),T2(n,i))));break;case 22:if(c=i.memoizedState!==null||gr,!c){r=r!==null&&r.memoizedState!==null||an,p=gr;var b=an;gr=c,(an=r)&&!b?Er(n,i,(i.subtreeFlags&8772)!==0):xr(n,i),gr=p,an=b}break;case 30:break;default:xr(n,i)}}function Ng(n){var r=n.alternate;r!==null&&(n.alternate=null,Ng(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Zi(r)),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 Bt=null,Fn=!1;function br(n,r,i){for(i=i.child;i!==null;)vg(n,r,i),i=i.sibling}function vg(n,r,i){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Wt,i)}catch{}switch(i.tag){case 26:an||qa(i,r),br(n,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:an||qa(i,r);var c=Bt,p=Fn;Wr(i.type)&&(Bt=i.stateNode,Fn=!1),br(n,r,i),Bl(i.stateNode),Bt=c,Fn=p;break;case 5:an||qa(i,r);case 6:if(c=Bt,p=Fn,Bt=null,br(n,r,i),Bt=c,Fn=p,Bt!==null)if(Fn)try{(Bt.nodeType===9?Bt.body:Bt.nodeName==="HTML"?Bt.ownerDocument.body:Bt).removeChild(i.stateNode)}catch(b){Tt(i,r,b)}else try{Bt.removeChild(i.stateNode)}catch(b){Tt(i,r,b)}break;case 18:Bt!==null&&(Fn?(n=Bt,gb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Oi(n)):gb(Bt,i.stateNode));break;case 4:c=Bt,p=Fn,Bt=i.stateNode.containerInfo,Fn=!0,br(n,r,i),Bt=c,Fn=p;break;case 0:case 11:case 14:case 15:Yr(2,i,r),an||Yr(4,i,r),br(n,r,i);break;case 1:an||(qa(i,r),c=i.stateNode,typeof c.componentWillUnmount=="function"&&bg(i,r,c)),br(n,r,i);break;case 21:br(n,r,i);break;case 22:an=(c=an)||i.memoizedState!==null,br(n,r,i),an=c;break;default:br(n,r,i)}}function Sg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Oi(n)}catch(i){Tt(r,r.return,i)}}}function Ag(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Oi(n)}catch(i){Tt(r,r.return,i)}}function KN(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Tg),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Tg),r;default:throw Error(s(435,n.tag))}}function yu(n,r){var i=KN(n);r.forEach(function(c){if(!i.has(c)){i.add(c);var p=n2.bind(null,n,c);c.then(p,p)}})}function zn(n,r){var i=r.deletions;if(i!==null)for(var c=0;c<i.length;c++){var p=i[c],b=n,_=r,k=_;e:for(;k!==null;){switch(k.tag){case 27:if(Wr(k.type)){Bt=k.stateNode,Fn=!1;break e}break;case 5:Bt=k.stateNode,Fn=!1;break e;case 3:case 4:Bt=k.stateNode.containerInfo,Fn=!0;break e}k=k.return}if(Bt===null)throw Error(s(160));vg(b,_,p),Bt=null,Fn=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Cg(r,n),r=r.sibling}var Ra=null;function Cg(n,r){var i=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:zn(r,n),qn(n),c&4&&(Yr(3,n,n.return),Cl(3,n),Yr(5,n,n.return));break;case 1:zn(r,n),qn(n),c&512&&(an||i===null||qa(i,i.return)),c&64&&gr&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?c:i.concat(c))));break;case 26:var p=Ra;if(zn(r,n),qn(n),c&512&&(an||i===null||qa(i,i.return)),c&4){var b=i!==null?i.memoizedState:null;if(c=n.memoizedState,i===null)if(c===null)if(n.stateNode===null){e:{c=n.type,i=n.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":b=p.getElementsByTagName("title")[0],(!b||b[ps]||b[Gt]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(c),p.head.insertBefore(b,p.querySelector("head > title"))),En(b,c,i),b[Gt]=n,Zt(b),c=b;break e;case"link":var _=Cb("link","href",p).get(c+(i.href||""));if(_){for(var k=0;k<_.length;k++)if(b=_[k],b.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&b.getAttribute("rel")===(i.rel==null?null:i.rel)&&b.getAttribute("title")===(i.title==null?null:i.title)&&b.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){_.splice(k,1);break t}}b=p.createElement(c),En(b,c,i),p.head.appendChild(b);break;case"meta":if(_=Cb("meta","content",p).get(c+(i.content||""))){for(k=0;k<_.length;k++)if(b=_[k],b.getAttribute("content")===(i.content==null?null:""+i.content)&&b.getAttribute("name")===(i.name==null?null:i.name)&&b.getAttribute("property")===(i.property==null?null:i.property)&&b.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&b.getAttribute("charset")===(i.charSet==null?null:i.charSet)){_.splice(k,1);break t}}b=p.createElement(c),En(b,c,i),p.head.appendChild(b);break;default:throw Error(s(468,c))}b[Gt]=n,Zt(b),c=b}n.stateNode=c}else wb(p,n.type,n.stateNode);else n.stateNode=Ab(p,c,n.memoizedProps);else b!==c?(b===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):b.count--,c===null?wb(p,n.type,n.stateNode):Ab(p,c,n.memoizedProps)):c===null&&n.stateNode!==null&&bf(n,n.memoizedProps,i.memoizedProps)}break;case 27:zn(r,n),qn(n),c&512&&(an||i===null||qa(i,i.return)),i!==null&&c&4&&bf(n,n.memoizedProps,i.memoizedProps);break;case 5:if(zn(r,n),qn(n),c&512&&(an||i===null||qa(i,i.return)),n.flags&32){p=n.stateNode;try{ze(p,"")}catch(Oe){Tt(n,n.return,Oe)}}c&4&&n.stateNode!=null&&(p=n.memoizedProps,bf(n,p,i!==null?i.memoizedProps:p)),c&1024&&(yf=!0);break;case 6:if(zn(r,n),qn(n),c&4){if(n.stateNode===null)throw Error(s(162));c=n.memoizedProps,i=n.stateNode;try{i.nodeValue=c}catch(Oe){Tt(n,n.return,Oe)}}break;case 3:if(ju=null,p=Ra,Ra=Du(r.containerInfo),zn(r,n),Ra=p,qn(n),c&4&&i!==null&&i.memoizedState.isDehydrated)try{Oi(r.containerInfo)}catch(Oe){Tt(n,n.return,Oe)}yf&&(yf=!1,wg(n));break;case 4:c=Ra,Ra=Du(n.stateNode.containerInfo),zn(r,n),qn(n),Ra=c;break;case 12:zn(r,n),qn(n);break;case 31:zn(r,n),qn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,yu(n,c)));break;case 13:zn(r,n),qn(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(_u=_t()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,yu(n,c)));break;case 22:p=n.memoizedState!==null;var Y=i!==null&&i.memoizedState!==null,ne=gr,fe=an;if(gr=ne||p,an=fe||Y,zn(r,n),an=fe,gr=ne,qn(n),c&8192)e:for(r=n.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(i===null||Y||gr||an||Is(n)),i=null,r=n;;){if(r.tag===5||r.tag===26){if(i===null){Y=i=r;try{if(b=Y.stateNode,p)_=b.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{k=Y.stateNode;var pe=Y.memoizedProps.style,re=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;k.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Oe){Tt(Y,Y.return,Oe)}}}else if(r.tag===6){if(i===null){Y=r;try{Y.stateNode.nodeValue=p?"":Y.memoizedProps}catch(Oe){Tt(Y,Y.return,Oe)}}}else if(r.tag===18){if(i===null){Y=r;try{var ue=Y.stateNode;p?bb(ue,!0):bb(Y.stateNode,!1)}catch(Oe){Tt(Y,Y.return,Oe)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=n.updateQueue,c!==null&&(i=c.retryQueue,i!==null&&(c.retryQueue=null,yu(n,i))));break;case 19:zn(r,n),qn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,yu(n,c)));break;case 30:break;case 21:break;default:zn(r,n),qn(n)}}function qn(n){var r=n.flags;if(r&2){try{for(var i,c=n.return;c!==null;){if(Eg(c)){i=c;break}c=c.return}if(i==null)throw Error(s(160));switch(i.tag){case 27:var p=i.stateNode,b=xf(n);Eu(n,b,p);break;case 5:var _=i.stateNode;i.flags&32&&(ze(_,""),i.flags&=-33);var k=xf(n);Eu(n,k,_);break;case 3:case 4:var Y=i.stateNode.containerInfo,ne=xf(n);Ef(n,ne,Y);break;default:throw Error(s(161))}}catch(fe){Tt(n,n.return,fe)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function wg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;wg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function xr(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)_g(n,r.alternate,r),r=r.sibling}function Is(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Yr(4,r,r.return),Is(r);break;case 1:qa(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&bg(r,r.return,i),Is(r);break;case 27:Bl(r.stateNode);case 26:case 5:qa(r,r.return),Is(r);break;case 22:r.memoizedState===null&&Is(r);break;case 30:Is(r);break;default:Is(r)}n=n.sibling}}function Er(n,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,p=n,b=r,_=b.flags;switch(b.tag){case 0:case 11:case 15:Er(p,b,i),Cl(4,b);break;case 1:if(Er(p,b,i),c=b,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(ne){Tt(c,c.return,ne)}if(c=b,p=c.updateQueue,p!==null){var k=c.stateNode;try{var Y=p.shared.hiddenCallbacks;if(Y!==null)for(p.shared.hiddenCallbacks=null,p=0;p<Y.length;p++)sp(Y[p],k)}catch(ne){Tt(c,c.return,ne)}}i&&_&64&&gg(b),wl(b,b.return);break;case 27:yg(b);case 26:case 5:Er(p,b,i),i&&c===null&&_&4&&xg(b),wl(b,b.return);break;case 12:Er(p,b,i);break;case 31:Er(p,b,i),i&&_&4&&Sg(p,b);break;case 13:Er(p,b,i),i&&_&4&&Ag(p,b);break;case 22:b.memoizedState===null&&Er(p,b,i),wl(b,b.return);break;case 30:break;default:Er(p,b,i)}r=r.sibling}}function Tf(n,r){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&hl(i))}function _f(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&hl(n))}function Oa(n,r,i,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)kg(n,r,i,c),r=r.sibling}function kg(n,r,i,c){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Oa(n,r,i,c),p&2048&&Cl(9,r);break;case 1:Oa(n,r,i,c);break;case 3:Oa(n,r,i,c),p&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&hl(n)));break;case 12:if(p&2048){Oa(n,r,i,c),n=r.stateNode;try{var b=r.memoizedProps,_=b.id,k=b.onPostCommit;typeof k=="function"&&k(_,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(Y){Tt(r,r.return,Y)}}else Oa(n,r,i,c);break;case 31:Oa(n,r,i,c);break;case 13:Oa(n,r,i,c);break;case 23:break;case 22:b=r.stateNode,_=r.alternate,r.memoizedState!==null?b._visibility&2?Oa(n,r,i,c):kl(n,r):b._visibility&2?Oa(n,r,i,c):(b._visibility|=2,yi(n,r,i,c,(r.subtreeFlags&10256)!==0||!1)),p&2048&&Tf(_,r);break;case 24:Oa(n,r,i,c),p&2048&&_f(r.alternate,r);break;default:Oa(n,r,i,c)}}function yi(n,r,i,c,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var b=n,_=r,k=i,Y=c,ne=_.flags;switch(_.tag){case 0:case 11:case 15:yi(b,_,k,Y,p),Cl(8,_);break;case 23:break;case 22:var fe=_.stateNode;_.memoizedState!==null?fe._visibility&2?yi(b,_,k,Y,p):kl(b,_):(fe._visibility|=2,yi(b,_,k,Y,p)),p&&ne&2048&&Tf(_.alternate,_);break;case 24:yi(b,_,k,Y,p),p&&ne&2048&&_f(_.alternate,_);break;default:yi(b,_,k,Y,p)}r=r.sibling}}function kl(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=n,c=r,p=c.flags;switch(c.tag){case 22:kl(i,c),p&2048&&Tf(c.alternate,c);break;case 24:kl(i,c),p&2048&&_f(c.alternate,c);break;default:kl(i,c)}r=r.sibling}}var Rl=8192;function Ti(n,r,i){if(n.subtreeFlags&Rl)for(n=n.child;n!==null;)Rg(n,r,i),n=n.sibling}function Rg(n,r,i){switch(n.tag){case 26:Ti(n,r,i),n.flags&Rl&&n.memoizedState!==null&&M2(i,Ra,n.memoizedState,n.memoizedProps);break;case 5:Ti(n,r,i);break;case 3:case 4:var c=Ra;Ra=Du(n.stateNode.containerInfo),Ti(n,r,i),Ra=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=Rl,Rl=16777216,Ti(n,r,i),Rl=c):Ti(n,r,i));break;default:Ti(n,r,i)}}function Og(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Ol(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var c=r[i];dn=c,Mg(c,n)}Og(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ig(n),n=n.sibling}function Ig(n){switch(n.tag){case 0:case 11:case 15:Ol(n),n.flags&2048&&Yr(9,n,n.return);break;case 3:Ol(n);break;case 12:Ol(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Tu(n)):Ol(n);break;default:Ol(n)}}function Tu(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var c=r[i];dn=c,Mg(c,n)}Og(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Yr(8,r,r.return),Tu(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Tu(r));break;default:Tu(r)}n=n.sibling}}function Mg(n,r){for(;dn!==null;){var i=dn;switch(i.tag){case 0:case 11:case 15:Yr(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var c=i.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:hl(i.memoizedState.cache)}if(c=i.child,c!==null)c.return=i,dn=c;else e:for(i=n;dn!==null;){c=dn;var p=c.sibling,b=c.return;if(Ng(c),c===i){dn=null;break e}if(p!==null){p.return=b,dn=p;break e}dn=b}}}var VN={getCacheForType:function(n){var r=bn(en),i=r.data.get(n);return i===void 0&&(i=n(),r.data.set(n,i)),i},cacheSignal:function(){return bn(en).controller.signal}},QN=typeof WeakMap=="function"?WeakMap:Map,pt=0,wt=null,nt=null,it=0,yt=0,aa=null,$r=!1,_i=!1,Nf=!1,yr=0,Yt=0,Gr=0,Ms=0,vf=0,ra=0,Ni=0,Il=null,Yn=null,Sf=!1,_u=0,Dg=0,Nu=1/0,vu=null,Kr=null,on=0,Vr=null,vi=null,Tr=0,Af=0,Cf=null,Lg=null,Ml=0,wf=null;function sa(){return(pt&2)!==0&&it!==0?it&-it:F.T!==null?Df():Xs()}function jg(){if(ra===0)if((it&536870912)===0||ot){var n=Qs;Qs<<=1,(Qs&3932160)===0&&(Qs=262144),ra=n}else ra=536870912;return n=ta.current,n!==null&&(n.flags|=32),ra}function $n(n,r,i){(n===wt&&(yt===2||yt===9)||n.cancelPendingCommit!==null)&&(Si(n,0),Qr(n,it,ra,!1)),Ct(n,i),((pt&2)===0||n!==wt)&&(n===wt&&((pt&2)===0&&(Ms|=i),Yt===4&&Qr(n,it,ra,!1)),Ya(n))}function Bg(n,r,i){if((pt&6)!==0)throw Error(s(327));var c=!i&&(r&127)===0&&(r&n.expiredLanes)===0||me(n,r),p=c?ZN(n,r):Rf(n,r,!0),b=c;do{if(p===0){_i&&!c&&Qr(n,r,0,!1);break}else{if(i=n.current.alternate,b&&!XN(i)){p=Rf(n,r,!1),b=!1;continue}if(p===2){if(b=r,n.errorRecoveryDisabledLanes&b)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var k=n;p=Il;var Y=k.current.memoizedState.isDehydrated;if(Y&&(Si(k,_).flags|=256),_=Rf(k,_,!1),_!==2){if(Nf&&!Y){k.errorRecoveryDisabledLanes|=b,Ms|=b,p=4;break e}b=Yn,Yn=p,b!==null&&(Yn===null?Yn=b:Yn.push.apply(Yn,b))}p=_}if(b=!1,p!==2)continue}}if(p===1){Si(n,0),Qr(n,r,0,!0);break}e:{switch(c=n,b=p,b){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:Qr(c,r,ra,!$r);break e;case 2:Yn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(p=_u+300-_t(),10<p)){if(Qr(c,r,ra,!$r),$(c,0,!0)!==0)break e;Tr=r,c.timeoutHandle=hb(Pg.bind(null,c,i,Yn,vu,Sf,r,ra,Ms,Ni,$r,b,"Throttled",-0,0),p);break e}Pg(c,i,Yn,vu,Sf,r,ra,Ms,Ni,$r,b,null,-0,0)}}break}while(!0);Ya(n)}function Pg(n,r,i,c,p,b,_,k,Y,ne,fe,pe,re,ue){if(n.timeoutHandle=-1,pe=r.subtreeFlags,pe&8192||(pe&16785408)===16785408){pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ne},Rg(r,b,pe);var Oe=(b&62914560)===b?_u-_t():(b&4194048)===b?Dg-_t():0;if(Oe=D2(pe,Oe),Oe!==null){Tr=b,n.cancelPendingCommit=Oe(Gg.bind(null,n,r,b,i,c,p,_,k,Y,fe,pe,null,re,ue)),Qr(n,b,_,!ne);return}}Gg(n,r,b,i,c,p,_,k,Y)}function XN(n){for(var r=n;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var c=0;c<i.length;c++){var p=i[c],b=p.getSnapshot;p=p.value;try{if(!Jn(b(),p))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Qr(n,r,i,c){r&=~vf,r&=~Ms,n.suspendedLanes|=r,n.pingedLanes&=~r,c&&(n.warmLanes|=r),c=n.expirationTimes;for(var p=r;0<p;){var b=31-bt(p),_=1<<b;c[b]=-1,p&=~_}i!==0&&we(n,i,r)}function Su(){return(pt&6)===0?(Dl(0),!1):!0}function kf(){if(nt!==null){if(yt===0)var n=nt.return;else n=nt,cr=vs=null,Yd(n),pi=null,gl=0,n=nt;for(;n!==null;)pg(n.alternate,n),n=n.return;nt=null}}function Si(n,r){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,g2(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),Tr=0,kf(),wt=n,nt=i=or(n.current,null),it=r,yt=0,aa=null,$r=!1,_i=me(n,r),Nf=!1,Ni=ra=vf=Ms=Gr=Yt=0,Yn=Il=null,Sf=!1,(r&8)!==0&&(r|=r&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=r;0<c;){var p=31-bt(c),b=1<<p;r|=n[p],c&=~b}return yr=r,Go(),i}function Ug(n,r){We=null,F.H=vl,r===hi||r===eu?(r=tp(),yt=3):r===Id?(r=tp(),yt=4):yt=r===lf?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,aa=r,nt===null&&(Yt=1,hu(n,pa(r,n.current)))}function Hg(){var n=ta.current;return n===null?!0:(it&4194048)===it?Ea===null:(it&62914560)===it||(it&536870912)!==0?n===Ea:!1}function Fg(){var n=F.H;return F.H=vl,n===null?vl:n}function zg(){var n=F.A;return F.A=VN,n}function Au(){Yt=4,$r||(it&4194048)!==it&&ta.current!==null||(_i=!0),(Gr&134217727)===0&&(Ms&134217727)===0||wt===null||Qr(wt,it,ra,!1)}function Rf(n,r,i){var c=pt;pt|=2;var p=Fg(),b=zg();(wt!==n||it!==r)&&(vu=null,Si(n,r)),r=!1;var _=Yt;e:do try{if(yt!==0&&nt!==null){var k=nt,Y=aa;switch(yt){case 8:kf(),_=6;break e;case 3:case 2:case 9:case 6:ta.current===null&&(r=!0);var ne=yt;if(yt=0,aa=null,Ai(n,k,Y,ne),i&&_i){_=0;break e}break;default:ne=yt,yt=0,aa=null,Ai(n,k,Y,ne)}}WN(),_=Yt;break}catch(fe){Ug(n,fe)}while(!0);return r&&n.shellSuspendCounter++,cr=vs=null,pt=c,F.H=p,F.A=b,nt===null&&(wt=null,it=0,Go()),_}function WN(){for(;nt!==null;)qg(nt)}function ZN(n,r){var i=pt;pt|=2;var c=Fg(),p=zg();wt!==n||it!==r?(vu=null,Nu=_t()+500,Si(n,r)):_i=me(n,r);e:do try{if(yt!==0&&nt!==null){r=nt;var b=aa;t:switch(yt){case 1:yt=0,aa=null,Ai(n,r,b,1);break;case 2:case 9:if(J0(b)){yt=0,aa=null,Yg(r);break}r=function(){yt!==2&&yt!==9||wt!==n||(yt=7),Ya(n)},b.then(r,r);break e;case 3:yt=7;break e;case 4:yt=5;break e;case 7:J0(b)?(yt=0,aa=null,Yg(r)):(yt=0,aa=null,Ai(n,r,b,7));break;case 5:var _=null;switch(nt.tag){case 26:_=nt.memoizedState;case 5:case 27:var k=nt;if(_?kb(_):k.stateNode.complete){yt=0,aa=null;var Y=k.sibling;if(Y!==null)nt=Y;else{var ne=k.return;ne!==null?(nt=ne,Cu(ne)):nt=null}break t}}yt=0,aa=null,Ai(n,r,b,5);break;case 6:yt=0,aa=null,Ai(n,r,b,6);break;case 8:kf(),Yt=6;break e;default:throw Error(s(462))}}JN();break}catch(fe){Ug(n,fe)}while(!0);return cr=vs=null,F.H=c,F.A=p,pt=i,nt!==null?0:(wt=null,it=0,Go(),Yt)}function JN(){for(;nt!==null&&!Pa();)qg(nt)}function qg(n){var r=mg(n.alternate,n,yr);n.memoizedProps=n.pendingProps,r===null?Cu(n):nt=r}function Yg(n){var r=n,i=r.alternate;switch(r.tag){case 15:case 0:r=lg(i,r,r.pendingProps,r.type,void 0,it);break;case 11:r=lg(i,r,r.pendingProps,r.type.render,r.ref,it);break;case 5:Yd(r);default:pg(i,r),r=nt=z0(r,yr),r=mg(i,r,yr)}n.memoizedProps=n.pendingProps,r===null?Cu(n):nt=r}function Ai(n,r,i,c){cr=vs=null,Yd(r),pi=null,gl=0;var p=r.return;try{if(FN(n,p,r,i,it)){Yt=1,hu(n,pa(i,n.current)),nt=null;return}}catch(b){if(p!==null)throw nt=p,b;Yt=1,hu(n,pa(i,n.current)),nt=null;return}r.flags&32768?(ot||c===1?n=!0:_i||(it&536870912)!==0?n=!1:($r=n=!0,(c===2||c===9||c===3||c===6)&&(c=ta.current,c!==null&&c.tag===13&&(c.flags|=16384))),$g(r,n)):Cu(r)}function Cu(n){var r=n;do{if((r.flags&32768)!==0){$g(r,$r);return}n=r.return;var i=YN(r.alternate,r,yr);if(i!==null){nt=i;return}if(r=r.sibling,r!==null){nt=r;return}nt=r=n}while(r!==null);Yt===0&&(Yt=5)}function $g(n,r){do{var i=$N(n.alternate,n);if(i!==null){i.flags&=32767,nt=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(n=n.sibling,n!==null)){nt=n;return}nt=n=i}while(n!==null);Yt=6,nt=null}function Gg(n,r,i,c,p,b,_,k,Y){n.cancelPendingCommit=null;do wu();while(on!==0);if((pt&6)!==0)throw Error(s(327));if(r!==null){if(r===n.current)throw Error(s(177));if(b=r.lanes|r.childLanes,b|=bd,Me(n,i,b,_,k,Y),n===wt&&(nt=wt=null,it=0),vi=r,Vr=n,Tr=i,Af=b,Cf=p,Lg=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,a2(Pe,function(){return Wg(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=F.T,F.T=null,p=O.p,O.p=2,_=pt,pt|=4;try{GN(n,r,i)}finally{pt=_,O.p=p,F.T=c}}on=1,Kg(),Vg(),Qg()}}function Kg(){if(on===1){on=0;var n=Vr,r=vi,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=F.T,F.T=null;var c=O.p;O.p=2;var p=pt;pt|=4;try{Cg(r,n);var b=zf,_=M0(n.containerInfo),k=b.focusedElem,Y=b.selectionRange;if(_!==k&&k&&k.ownerDocument&&I0(k.ownerDocument.documentElement,k)){if(Y!==null&&fd(k)){var ne=Y.start,fe=Y.end;if(fe===void 0&&(fe=ne),"selectionStart"in k)k.selectionStart=ne,k.selectionEnd=Math.min(fe,k.value.length);else{var pe=k.ownerDocument||document,re=pe&&pe.defaultView||window;if(re.getSelection){var ue=re.getSelection(),Oe=k.textContent.length,Fe=Math.min(Y.start,Oe),St=Y.end===void 0?Fe:Math.min(Y.end,Oe);!ue.extend&&Fe>St&&(_=St,St=Fe,Fe=_);var Q=O0(k,Fe),G=O0(k,St);if(Q&&G&&(ue.rangeCount!==1||ue.anchorNode!==Q.node||ue.anchorOffset!==Q.offset||ue.focusNode!==G.node||ue.focusOffset!==G.offset)){var te=pe.createRange();te.setStart(Q.node,Q.offset),ue.removeAllRanges(),Fe>St?(ue.addRange(te),ue.extend(G.node,G.offset)):(te.setEnd(G.node,G.offset),ue.addRange(te))}}}}for(pe=[],ue=k;ue=ue.parentNode;)ue.nodeType===1&&pe.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<pe.length;k++){var he=pe[k];he.element.scrollLeft=he.left,he.element.scrollTop=he.top}}Hu=!!Ff,zf=Ff=null}finally{pt=p,O.p=c,F.T=i}}n.current=r,on=2}}function Vg(){if(on===2){on=0;var n=Vr,r=vi,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=F.T,F.T=null;var c=O.p;O.p=2;var p=pt;pt|=4;try{_g(n,r.alternate,r)}finally{pt=p,O.p=c,F.T=i}}on=3}}function Qg(){if(on===4||on===3){on=0,wr();var n=Vr,r=vi,i=Tr,c=Lg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?on=5:(on=0,vi=Vr=null,Xg(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Kr=null),ar(i),r=r.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Wt,r,void 0,(r.current.flags&128)===128)}catch{}if(c!==null){r=F.T,p=O.p,O.p=2,F.T=null;try{for(var b=n.onRecoverableError,_=0;_<c.length;_++){var k=c[_];b(k.value,{componentStack:k.stack})}}finally{F.T=r,O.p=p}}(Tr&3)!==0&&wu(),Ya(n),p=n.pendingLanes,(i&261930)!==0&&(p&42)!==0?n===wf?Ml++:(Ml=0,wf=n):Ml=0,Dl(0)}}function Xg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,hl(r)))}function wu(){return Kg(),Vg(),Qg(),Wg()}function Wg(){if(on!==5)return!1;var n=Vr,r=Af;Af=0;var i=ar(Tr),c=F.T,p=O.p;try{O.p=32>i?32:i,F.T=null,i=Cf,Cf=null;var b=Vr,_=Tr;if(on=0,vi=Vr=null,Tr=0,(pt&6)!==0)throw Error(s(331));var k=pt;if(pt|=4,Ig(b.current),kg(b,b.current,_,i),pt=k,Dl(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Wt,b)}catch{}return!0}finally{O.p=p,F.T=c,Xg(n,r)}}function Zg(n,r,i){r=pa(i,r),r=sf(n.stateNode,r,2),n=Fr(n,r,2),n!==null&&(Ct(n,2),Ya(n))}function Tt(n,r,i){if(n.tag===3)Zg(n,n,i);else for(;r!==null;){if(r.tag===3){Zg(r,n,i);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Kr===null||!Kr.has(c))){n=pa(i,n),i=Jp(2),c=Fr(r,i,2),c!==null&&(eg(i,c,r,n),Ct(c,2),Ya(c));break}}r=r.return}}function Of(n,r,i){var c=n.pingCache;if(c===null){c=n.pingCache=new QN;var p=new Set;c.set(r,p)}else p=c.get(r),p===void 0&&(p=new Set,c.set(r,p));p.has(i)||(Nf=!0,p.add(i),n=e2.bind(null,n,r,i),r.then(n,n))}function e2(n,r,i){var c=n.pingCache;c!==null&&c.delete(r),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,wt===n&&(it&i)===i&&(Yt===4||Yt===3&&(it&62914560)===it&&300>_t()-_u?(pt&2)===0&&Si(n,0):vf|=i,Ni===it&&(Ni=0)),Ya(n)}function Jg(n,r){r===0&&(r=$e()),n=Ts(n,r),n!==null&&(Ct(n,r),Ya(n))}function t2(n){var r=n.memoizedState,i=0;r!==null&&(i=r.retryLane),Jg(n,i)}function n2(n,r){var i=0;switch(n.tag){case 31:case 13:var c=n.stateNode,p=n.memoizedState;p!==null&&(i=p.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(r),Jg(n,i)}function a2(n,r){return wa(n,r)}var ku=null,Ci=null,If=!1,Ru=!1,Mf=!1,Xr=0;function Ya(n){n!==Ci&&n.next===null&&(Ci===null?ku=Ci=n:Ci=Ci.next=n),Ru=!0,If||(If=!0,s2())}function Dl(n,r){if(!Mf&&Ru){Mf=!0;do for(var i=!1,c=ku;c!==null;){if(n!==0){var p=c.pendingLanes;if(p===0)var b=0;else{var _=c.suspendedLanes,k=c.pingedLanes;b=(1<<31-bt(42|n)+1)-1,b&=p&~(_&~k),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(i=!0,ab(c,b))}else b=it,b=$(c,c===wt?b:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(b&3)===0||me(c,b)||(i=!0,ab(c,b));c=c.next}while(i);Mf=!1}}function r2(){eb()}function eb(){Ru=If=!1;var n=0;Xr!==0&&p2()&&(n=Xr);for(var r=_t(),i=null,c=ku;c!==null;){var p=c.next,b=tb(c,r);b===0?(c.next=null,i===null?ku=p:i.next=p,p===null&&(Ci=i)):(i=c,(n!==0||(b&3)!==0)&&(Ru=!0)),c=p}on!==0&&on!==5||Dl(n),Xr!==0&&(Xr=0)}function tb(n,r){for(var i=n.suspendedLanes,c=n.pingedLanes,p=n.expirationTimes,b=n.pendingLanes&-62914561;0<b;){var _=31-bt(b),k=1<<_,Y=p[_];Y===-1?((k&i)===0||(k&c)!==0)&&(p[_]=Se(k,r)):Y<=r&&(n.expiredLanes|=k),b&=~k}if(r=wt,i=it,i=$(n,n===r?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,i===0||n===r&&(yt===2||yt===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&tr(c),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||me(n,i)){if(r=i&-i,r===n.callbackPriority)return r;switch(c!==null&&tr(c),ar(i)){case 2:case 8:i=ye;break;case 32:i=Pe;break;case 268435456:i=Ae;break;default:i=Pe}return c=nb.bind(null,n),i=wa(i,c),n.callbackPriority=r,n.callbackNode=i,r}return c!==null&&c!==null&&tr(c),n.callbackPriority=2,n.callbackNode=null,2}function nb(n,r){if(on!==0&&on!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(wu()&&n.callbackNode!==i)return null;var c=it;return c=$(n,n===wt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(Bg(n,c,r),tb(n,_t()),n.callbackNode!=null&&n.callbackNode===i?nb.bind(null,n):null)}function ab(n,r){if(wu())return null;Bg(n,r,!0)}function s2(){b2(function(){(pt&6)!==0?wa(de,r2):eb()})}function Df(){if(Xr===0){var n=fi;n===0&&(n=ms,ms<<=1,(ms&261888)===0&&(ms=256)),Xr=n}return Xr}function rb(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Mr(""+n)}function sb(n,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,n.id&&i.setAttribute("form",n.id),r.parentNode.insertBefore(i,r),n=new FormData(n),i.parentNode.removeChild(i),n}function i2(n,r,i,c,p){if(r==="submit"&&i&&i.stateNode===p){var b=rb((p[_n]||null).action),_=c.submitter;_&&(r=(r=_[_n]||null)?rb(r.formAction):_.getAttribute("formAction"),r!==null&&(b=r,_=null));var k=new zo("action","action",null,c,p);n.push({event:k,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Xr!==0){var Y=_?sb(p,_):new FormData(p);Jd(i,{pending:!0,data:Y,method:p.method,action:b},null,Y)}}else typeof b=="function"&&(k.preventDefault(),Y=_?sb(p,_):new FormData(p),Jd(i,{pending:!0,data:Y,method:p.method,action:b},b,Y))},currentTarget:p}]})}}for(var Lf=0;Lf<gd.length;Lf++){var jf=gd[Lf],l2=jf.toLowerCase(),o2=jf[0].toUpperCase()+jf.slice(1);ka(l2,"on"+o2)}ka(j0,"onAnimationEnd"),ka(B0,"onAnimationIteration"),ka(P0,"onAnimationStart"),ka("dblclick","onDoubleClick"),ka("focusin","onFocus"),ka("focusout","onBlur"),ka(vN,"onTransitionRun"),ka(SN,"onTransitionStart"),ka(AN,"onTransitionCancel"),ka(U0,"onTransitionEnd"),xe("onMouseEnter",["mouseout","mouseover"]),xe("onMouseLeave",["mouseout","mouseover"]),xe("onPointerEnter",["pointerout","pointerover"]),xe("onPointerLeave",["pointerout","pointerover"]),sr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sr("onBeforeInput",["compositionend","keypress","textInput","paste"]),sr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ll="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(" "),u2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ll));function ib(n,r){r=(r&4)!==0;for(var i=0;i<n.length;i++){var c=n[i],p=c.event;c=c.listeners;e:{var b=void 0;if(r)for(var _=c.length-1;0<=_;_--){var k=c[_],Y=k.instance,ne=k.currentTarget;if(k=k.listener,Y!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=ne;try{b(p)}catch(fe){$o(fe)}p.currentTarget=null,b=Y}else for(_=0;_<c.length;_++){if(k=c[_],Y=k.instance,ne=k.currentTarget,k=k.listener,Y!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=ne;try{b(p)}catch(fe){$o(fe)}p.currentTarget=null,b=Y}}}}function at(n,r){var i=r[Wi];i===void 0&&(i=r[Wi]=new Set);var c=n+"__bubble";i.has(c)||(lb(r,n,2,!1),i.add(c))}function Bf(n,r,i){var c=0;r&&(c|=4),lb(i,n,c,r)}var Ou="_reactListening"+Math.random().toString(36).slice(2);function Pf(n){if(!n[Ou]){n[Ou]=!0,Do.forEach(function(i){i!=="selectionchange"&&(u2.has(i)||Bf(i,!1,n),Bf(i,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Ou]||(r[Ou]=!0,Bf("selectionchange",!1,r))}}function lb(n,r,i,c){switch(jb(r)){case 2:var p=B2;break;case 8:p=P2;break;default:p=Jf}i=p.bind(null,r,i,n),p=void 0,!ad||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),c?p!==void 0?n.addEventListener(r,i,{capture:!0,passive:p}):n.addEventListener(r,i,!0):p!==void 0?n.addEventListener(r,i,{passive:p}):n.addEventListener(r,i,!1)}function Uf(n,r,i,c,p){var b=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var _=c.tag;if(_===3||_===4){var k=c.stateNode.containerInfo;if(k===p)break;if(_===4)for(_=c.return;_!==null;){var Y=_.tag;if((Y===3||Y===4)&&_.stateNode.containerInfo===p)return;_=_.return}for(;k!==null;){if(_=On(k),_===null)return;if(Y=_.tag,Y===5||Y===6||Y===26||Y===27){c=b=_;continue e}k=k.parentNode}}c=c.return}Po(function(){var ne=b,fe=Xe(i),pe=[];e:{var re=H0.get(n);if(re!==void 0){var ue=zo,Oe=n;switch(n){case"keypress":if(Ho(i)===0)break e;case"keydown":case"keyup":ue=nN;break;case"focusin":Oe="focus",ue=ld;break;case"focusout":Oe="blur",ue=ld;break;case"beforeblur":case"afterblur":ue=ld;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=p0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=Y_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=sN;break;case j0:case B0:case P0:ue=K_;break;case U0:ue=lN;break;case"scroll":case"scrollend":ue=z_;break;case"wheel":ue=uN;break;case"copy":case"cut":case"paste":ue=Q_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=b0;break;case"toggle":case"beforetoggle":ue=dN}var Fe=(r&4)!==0,St=!Fe&&(n==="scroll"||n==="scrollend"),Q=Fe?re!==null?re+"Capture":null:re;Fe=[];for(var G=ne,te;G!==null;){var he=G;if(te=he.stateNode,he=he.tag,he!==5&&he!==26&&he!==27||te===null||Q===null||(he=al(G,Q),he!=null&&Fe.push(jl(G,he,te))),St)break;G=G.return}0<Fe.length&&(re=new ue(re,Oe,null,i,fe),pe.push({event:re,listeners:Fe}))}}if((r&7)===0){e:{if(re=n==="mouseover"||n==="pointerover",ue=n==="mouseout"||n==="pointerout",re&&i!==De&&(Oe=i.relatedTarget||i.fromElement)&&(On(Oe)||Oe[kr]))break e;if((ue||re)&&(re=fe.window===fe?fe:(re=fe.ownerDocument)?re.defaultView||re.parentWindow:window,ue?(Oe=i.relatedTarget||i.toElement,ue=ne,Oe=Oe?On(Oe):null,Oe!==null&&(St=u(Oe),Fe=Oe.tag,Oe!==St||Fe!==5&&Fe!==27&&Fe!==6)&&(Oe=null)):(ue=null,Oe=ne),ue!==Oe)){if(Fe=p0,he="onMouseLeave",Q="onMouseEnter",G="mouse",(n==="pointerout"||n==="pointerover")&&(Fe=b0,he="onPointerLeave",Q="onPointerEnter",G="pointer"),St=ue==null?re:Rr(ue),te=Oe==null?re:Rr(Oe),re=new Fe(he,G+"leave",ue,i,fe),re.target=St,re.relatedTarget=te,he=null,On(fe)===ne&&(Fe=new Fe(Q,G+"enter",Oe,i,fe),Fe.target=te,Fe.relatedTarget=St,he=Fe),St=he,ue&&Oe)t:{for(Fe=c2,Q=ue,G=Oe,te=0,he=Q;he;he=Fe(he))te++;he=0;for(var Be=G;Be;Be=Fe(Be))he++;for(;0<te-he;)Q=Fe(Q),te--;for(;0<he-te;)G=Fe(G),he--;for(;te--;){if(Q===G||G!==null&&Q===G.alternate){Fe=Q;break t}Q=Fe(Q),G=Fe(G)}Fe=null}else Fe=null;ue!==null&&ob(pe,re,ue,Fe,!1),Oe!==null&&St!==null&&ob(pe,St,Oe,Fe,!0)}}e:{if(re=ne?Rr(ne):window,ue=re.nodeName&&re.nodeName.toLowerCase(),ue==="select"||ue==="input"&&re.type==="file")var mt=S0;else if(N0(re))if(A0)mt=TN;else{mt=EN;var Le=xN}else ue=re.nodeName,!ue||ue.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?ne&&Ir(ne.elementType)&&(mt=S0):mt=yN;if(mt&&(mt=mt(n,ne))){v0(pe,mt,i,fe);break e}Le&&Le(n,re,ne),n==="focusout"&&ne&&re.type==="number"&&ne.memoizedProps.value!=null&&ti(re,"number",re.value)}switch(Le=ne?Rr(ne):window,n){case"focusin":(N0(Le)||Le.contentEditable==="true")&&(ri=Le,md=ne,dl=null);break;case"focusout":dl=md=ri=null;break;case"mousedown":hd=!0;break;case"contextmenu":case"mouseup":case"dragend":hd=!1,D0(pe,i,fe);break;case"selectionchange":if(NN)break;case"keydown":case"keyup":D0(pe,i,fe)}var Ze;if(ud)e:{switch(n){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else ai?T0(n,i)&&(lt="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(lt="onCompositionStart");lt&&(x0&&i.locale!=="ko"&&(ai||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&ai&&(Ze=m0()):(Dr=fe,rd="value"in Dr?Dr.value:Dr.textContent,ai=!0)),Le=Iu(ne,lt),0<Le.length&&(lt=new g0(lt,n,null,i,fe),pe.push({event:lt,listeners:Le}),Ze?lt.data=Ze:(Ze=_0(i),Ze!==null&&(lt.data=Ze)))),(Ze=mN?hN(n,i):pN(n,i))&&(lt=Iu(ne,"onBeforeInput"),0<lt.length&&(Le=new g0("onBeforeInput","beforeinput",null,i,fe),pe.push({event:Le,listeners:lt}),Le.data=Ze)),i2(pe,n,ne,i,fe)}ib(pe,r)})}function jl(n,r,i){return{instance:n,listener:r,currentTarget:i}}function Iu(n,r){for(var i=r+"Capture",c=[];n!==null;){var p=n,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=al(n,i),p!=null&&c.unshift(jl(n,p,b)),p=al(n,r),p!=null&&c.push(jl(n,p,b))),n.tag===3)return c;n=n.return}return[]}function c2(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function ob(n,r,i,c,p){for(var b=r._reactName,_=[];i!==null&&i!==c;){var k=i,Y=k.alternate,ne=k.stateNode;if(k=k.tag,Y!==null&&Y===c)break;k!==5&&k!==26&&k!==27||ne===null||(Y=ne,p?(ne=al(i,b),ne!=null&&_.unshift(jl(i,ne,Y))):p||(ne=al(i,b),ne!=null&&_.push(jl(i,ne,Y)))),i=i.return}_.length!==0&&n.push({event:r,listeners:_})}var d2=/\r\n?/g,f2=/\u0000|\uFFFD/g;function ub(n){return(typeof n=="string"?n:""+n).replace(d2,`
49
+ `).replace(f2,"")}function cb(n,r){return r=ub(r),ub(n)===r}function vt(n,r,i,c,p,b){switch(i){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||ze(n,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&ze(n,""+c);break;case"className":Wn(n,"class",c);break;case"tabIndex":Wn(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Wn(n,i,c);break;case"style":Et(n,c,b);break;case"data":if(r!=="object"){Wn(n,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||i!=="href")){n.removeAttribute(i);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(i);break}c=Mr(""+c),n.setAttribute(i,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(i,"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 b=="function"&&(i==="formAction"?(r!=="input"&&vt(n,r,"name",p.name,p,null),vt(n,r,"formEncType",p.formEncType,p,null),vt(n,r,"formMethod",p.formMethod,p,null),vt(n,r,"formTarget",p.formTarget,p,null)):(vt(n,r,"encType",p.encType,p,null),vt(n,r,"method",p.method,p,null),vt(n,r,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(i);break}c=Mr(""+c),n.setAttribute(i,c);break;case"onClick":c!=null&&(n.onclick=Ne);break;case"onScroll":c!=null&&at("scroll",n);break;case"onScrollEnd":c!=null&&at("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(i=c.__html,i!=null){if(p.children!=null)throw Error(s(60));n.innerHTML=i}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}i=Mr(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(i,""+c):n.removeAttribute(i);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":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":c===!0?n.setAttribute(i,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(i,c):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(i,c):n.removeAttribute(i);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(i):n.setAttribute(i,c);break;case"popover":at("beforetoggle",n),at("toggle",n),Nn(n,"popover",c);break;case"xlinkActuate":Pn(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Pn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Pn(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Pn(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Pn(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Pn(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Pn(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Pn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Pn(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Nn(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=ir.get(i)||i,Nn(n,i,c))}}function Hf(n,r,i,c,p,b){switch(i){case"style":Et(n,c,b);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(i=c.__html,i!=null){if(p.children!=null)throw Error(s(60));n.innerHTML=i}}break;case"children":typeof c=="string"?ze(n,c):(typeof c=="number"||typeof c=="bigint")&&ze(n,""+c);break;case"onScroll":c!=null&&at("scroll",n);break;case"onScrollEnd":c!=null&&at("scrollend",n);break;case"onClick":c!=null&&(n.onclick=Ne);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gs.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(p=i.endsWith("Capture"),r=i.slice(2,p?i.length-7:void 0),b=n[_n]||null,b=b!=null?b[i]:null,typeof b=="function"&&n.removeEventListener(r,b,p),typeof c=="function")){typeof b!="function"&&b!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(r,c,p);break e}i in n?n[i]=c:c===!0?n.setAttribute(i,""):Nn(n,i,c)}}}function En(n,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",n),at("load",n);var c=!1,p=!1,b;for(b in i)if(i.hasOwnProperty(b)){var _=i[b];if(_!=null)switch(b){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:vt(n,r,b,_,i,null)}}p&&vt(n,r,"srcSet",i.srcSet,i,null),c&&vt(n,r,"src",i.src,i,null);return;case"input":at("invalid",n);var k=b=_=p=null,Y=null,ne=null;for(c in i)if(i.hasOwnProperty(c)){var fe=i[c];if(fe!=null)switch(c){case"name":p=fe;break;case"type":_=fe;break;case"checked":Y=fe;break;case"defaultChecked":ne=fe;break;case"value":b=fe;break;case"defaultValue":k=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(s(137,r));break;default:vt(n,r,c,fe,i,null)}}bs(n,b,k,Y,ne,_,p,!1);return;case"select":at("invalid",n),c=_=b=null;for(p in i)if(i.hasOwnProperty(p)&&(k=i[p],k!=null))switch(p){case"value":b=k;break;case"defaultValue":_=k;break;case"multiple":c=k;default:vt(n,r,p,k,i,null)}r=b,i=_,n.multiple=!!c,r!=null?pn(n,!!c,r,!1):i!=null&&pn(n,!!c,i,!0);return;case"textarea":at("invalid",n),b=p=c=null;for(_ in i)if(i.hasOwnProperty(_)&&(k=i[_],k!=null))switch(_){case"value":c=k;break;case"defaultValue":p=k;break;case"children":b=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(s(91));break;default:vt(n,r,_,k,i,null)}ni(n,c,p,b);return;case"option":for(Y in i)if(i.hasOwnProperty(Y)&&(c=i[Y],c!=null))switch(Y){case"selected":n.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:vt(n,r,Y,c,i,null)}return;case"dialog":at("beforetoggle",n),at("toggle",n),at("cancel",n),at("close",n);break;case"iframe":case"object":at("load",n);break;case"video":case"audio":for(c=0;c<Ll.length;c++)at(Ll[c],n);break;case"image":at("error",n),at("load",n);break;case"details":at("toggle",n);break;case"embed":case"source":case"link":at("error",n),at("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(ne in i)if(i.hasOwnProperty(ne)&&(c=i[ne],c!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:vt(n,r,ne,c,i,null)}return;default:if(Ir(r)){for(fe in i)i.hasOwnProperty(fe)&&(c=i[fe],c!==void 0&&Hf(n,r,fe,c,i,void 0));return}}for(k in i)i.hasOwnProperty(k)&&(c=i[k],c!=null&&vt(n,r,k,c,i,null))}function m2(n,r,i,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,_=null,k=null,Y=null,ne=null,fe=null;for(ue in i){var pe=i[ue];if(i.hasOwnProperty(ue)&&pe!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":Y=pe;default:c.hasOwnProperty(ue)||vt(n,r,ue,null,c,pe)}}for(var re in c){var ue=c[re];if(pe=i[re],c.hasOwnProperty(re)&&(ue!=null||pe!=null))switch(re){case"type":b=ue;break;case"name":p=ue;break;case"checked":ne=ue;break;case"defaultChecked":fe=ue;break;case"value":_=ue;break;case"defaultValue":k=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(s(137,r));break;default:ue!==pe&&vt(n,r,re,ue,c,pe)}}el(n,_,k,Y,ne,fe,b,p);return;case"select":ue=_=k=re=null;for(b in i)if(Y=i[b],i.hasOwnProperty(b)&&Y!=null)switch(b){case"value":break;case"multiple":ue=Y;default:c.hasOwnProperty(b)||vt(n,r,b,null,c,Y)}for(p in c)if(b=c[p],Y=i[p],c.hasOwnProperty(p)&&(b!=null||Y!=null))switch(p){case"value":re=b;break;case"defaultValue":k=b;break;case"multiple":_=b;default:b!==Y&&vt(n,r,p,b,c,Y)}r=k,i=_,c=ue,re!=null?pn(n,!!i,re,!1):!!c!=!!i&&(r!=null?pn(n,!!i,r,!0):pn(n,!!i,i?[]:"",!1));return;case"textarea":ue=re=null;for(k in i)if(p=i[k],i.hasOwnProperty(k)&&p!=null&&!c.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:vt(n,r,k,null,c,p)}for(_ in c)if(p=c[_],b=i[_],c.hasOwnProperty(_)&&(p!=null||b!=null))switch(_){case"value":re=p;break;case"defaultValue":ue=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:p!==b&&vt(n,r,_,p,c,b)}jo(n,re,ue);return;case"option":for(var Oe in i)if(re=i[Oe],i.hasOwnProperty(Oe)&&re!=null&&!c.hasOwnProperty(Oe))switch(Oe){case"selected":n.selected=!1;break;default:vt(n,r,Oe,null,c,re)}for(Y in c)if(re=c[Y],ue=i[Y],c.hasOwnProperty(Y)&&re!==ue&&(re!=null||ue!=null))switch(Y){case"selected":n.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:vt(n,r,Y,re,c,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 Fe in i)re=i[Fe],i.hasOwnProperty(Fe)&&re!=null&&!c.hasOwnProperty(Fe)&&vt(n,r,Fe,null,c,re);for(ne in c)if(re=c[ne],ue=i[ne],c.hasOwnProperty(ne)&&re!==ue&&(re!=null||ue!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(s(137,r));break;default:vt(n,r,ne,re,c,ue)}return;default:if(Ir(r)){for(var St in i)re=i[St],i.hasOwnProperty(St)&&re!==void 0&&!c.hasOwnProperty(St)&&Hf(n,r,St,void 0,c,re);for(fe in c)re=c[fe],ue=i[fe],!c.hasOwnProperty(fe)||re===ue||re===void 0&&ue===void 0||Hf(n,r,fe,re,c,ue);return}}for(var Q in i)re=i[Q],i.hasOwnProperty(Q)&&re!=null&&!c.hasOwnProperty(Q)&&vt(n,r,Q,null,c,re);for(pe in c)re=c[pe],ue=i[pe],!c.hasOwnProperty(pe)||re===ue||re==null&&ue==null||vt(n,r,pe,re,c,ue)}function db(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function h2(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,i=performance.getEntriesByType("resource"),c=0;c<i.length;c++){var p=i[c],b=p.transferSize,_=p.initiatorType,k=p.duration;if(b&&k&&db(_)){for(_=0,k=p.responseEnd,c+=1;c<i.length;c++){var Y=i[c],ne=Y.startTime;if(ne>k)break;var fe=Y.transferSize,pe=Y.initiatorType;fe&&db(pe)&&(Y=Y.responseEnd,_+=fe*(Y<k?1:(k-ne)/(Y-ne)))}if(--c,r+=8*(b+_)/(p.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Ff=null,zf=null;function Mu(n){return n.nodeType===9?n:n.ownerDocument}function fb(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 mb(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function qf(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Yf=null;function p2(){var n=window.event;return n&&n.type==="popstate"?n===Yf?!1:(Yf=n,!0):(Yf=null,!1)}var hb=typeof setTimeout=="function"?setTimeout:void 0,g2=typeof clearTimeout=="function"?clearTimeout:void 0,pb=typeof Promise=="function"?Promise:void 0,b2=typeof queueMicrotask=="function"?queueMicrotask:typeof pb<"u"?function(n){return pb.resolve(null).then(n).catch(x2)}:hb;function x2(n){setTimeout(function(){throw n})}function Wr(n){return n==="head"}function gb(n,r){var i=r,c=0;do{var p=i.nextSibling;if(n.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"||i==="/&"){if(c===0){n.removeChild(p),Oi(r);return}c--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")c++;else if(i==="html")Bl(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,Bl(i);for(var b=i.firstChild;b;){var _=b.nextSibling,k=b.nodeName;b[ps]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&b.rel.toLowerCase()==="stylesheet"||i.removeChild(b),b=_}}else i==="body"&&Bl(n.ownerDocument.body);i=p}while(i);Oi(r)}function bb(n,r){var i=n;n=0;do{var c=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),c&&c.nodeType===8)if(i=c.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=c}while(i)}function $f(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":$f(i),Zi(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function E2(n,r,i,c){for(;n.nodeType===1;){var p=i;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[ps])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(b=n.getAttribute("rel"),b==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(b!==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(b=n.getAttribute("src"),(b!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===b)return n}else return n;if(n=ya(n.nextSibling),n===null)break}return null}function y2(n,r,i){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=ya(n.nextSibling),n===null))return null;return n}function xb(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=ya(n.nextSibling),n===null))return null;return n}function Gf(n){return n.data==="$?"||n.data==="$~"}function Kf(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function T2(n,r){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||i.readyState!=="loading")r();else{var c=function(){r(),i.removeEventListener("DOMContentLoaded",c)};i.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function ya(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var Vf=null;function Eb(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(r===0)return ya(n.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}n=n.nextSibling}return null}function yb(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return n;r--}else i!=="/$"&&i!=="/&"||r++}n=n.previousSibling}return null}function Tb(n,r,i){switch(r=Mu(i),n){case"html":if(n=r.documentElement,!n)throw Error(s(452));return n;case"head":if(n=r.head,!n)throw Error(s(453));return n;case"body":if(n=r.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function Bl(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Zi(n)}var Ta=new Map,_b=new Set;function Du(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var _r=O.d;O.d={f:_2,r:N2,D:v2,C:S2,L:A2,m:C2,X:k2,S:w2,M:R2};function _2(){var n=_r.f(),r=Su();return n||r}function N2(n){var r=rr(n);r!==null&&r.tag===5&&r.type==="form"?Up(r):_r.r(n)}var wi=typeof document>"u"?null:document;function Nb(n,r,i){var c=wi;if(c&&typeof r=="string"&&r){var p=Un(r);p='link[rel="'+n+'"][href="'+p+'"]',typeof i=="string"&&(p+='[crossorigin="'+i+'"]'),_b.has(p)||(_b.add(p),n={rel:n,crossOrigin:i,href:r},c.querySelector(p)===null&&(r=c.createElement("link"),En(r,"link",n),Zt(r),c.head.appendChild(r)))}}function v2(n){_r.D(n),Nb("dns-prefetch",n,null)}function S2(n,r){_r.C(n,r),Nb("preconnect",n,r)}function A2(n,r,i){_r.L(n,r,i);var c=wi;if(c&&n&&r){var p='link[rel="preload"][as="'+Un(r)+'"]';r==="image"&&i&&i.imageSrcSet?(p+='[imagesrcset="'+Un(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(p+='[imagesizes="'+Un(i.imageSizes)+'"]')):p+='[href="'+Un(n)+'"]';var b=p;switch(r){case"style":b=ki(n);break;case"script":b=Ri(n)}Ta.has(b)||(n=g({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:n,as:r},i),Ta.set(b,n),c.querySelector(p)!==null||r==="style"&&c.querySelector(Pl(b))||r==="script"&&c.querySelector(Ul(b))||(r=c.createElement("link"),En(r,"link",n),Zt(r),c.head.appendChild(r)))}}function C2(n,r){_r.m(n,r);var i=wi;if(i&&n){var c=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+Un(c)+'"][href="'+Un(n)+'"]',b=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Ri(n)}if(!Ta.has(b)&&(n=g({rel:"modulepreload",href:n},r),Ta.set(b,n),i.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ul(b)))return}c=i.createElement("link"),En(c,"link",n),Zt(c),i.head.appendChild(c)}}}function w2(n,r,i){_r.S(n,r,i);var c=wi;if(c&&n){var p=Or(c).hoistableStyles,b=ki(n);r=r||"default";var _=p.get(b);if(!_){var k={loading:0,preload:null};if(_=c.querySelector(Pl(b)))k.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":r},i),(i=Ta.get(b))&&Qf(n,i);var Y=_=c.createElement("link");Zt(Y),En(Y,"link",n),Y._p=new Promise(function(ne,fe){Y.onload=ne,Y.onerror=fe}),Y.addEventListener("load",function(){k.loading|=1}),Y.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Lu(_,r,c)}_={type:"stylesheet",instance:_,count:1,state:k},p.set(b,_)}}}function k2(n,r){_r.X(n,r);var i=wi;if(i&&n){var c=Or(i).hoistableScripts,p=Ri(n),b=c.get(p);b||(b=i.querySelector(Ul(p)),b||(n=g({src:n,async:!0},r),(r=Ta.get(p))&&Xf(n,r),b=i.createElement("script"),Zt(b),En(b,"link",n),i.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},c.set(p,b))}}function R2(n,r){_r.M(n,r);var i=wi;if(i&&n){var c=Or(i).hoistableScripts,p=Ri(n),b=c.get(p);b||(b=i.querySelector(Ul(p)),b||(n=g({src:n,async:!0,type:"module"},r),(r=Ta.get(p))&&Xf(n,r),b=i.createElement("script"),Zt(b),En(b,"link",n),i.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},c.set(p,b))}}function vb(n,r,i,c){var p=(p=Re.current)?Du(p):null;if(!p)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=ki(i.href),i=Or(p).hoistableStyles,c=i.get(r),c||(c={type:"style",instance:null,count:0,state:null},i.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=ki(i.href);var b=Or(p).hoistableStyles,_=b.get(n);if(_||(p=p.ownerDocument||p,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(n,_),(b=p.querySelector(Pl(n)))&&!b._p&&(_.instance=b,_.state.loading=5),Ta.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Ta.set(n,i),b||O2(p,n,i,_.state))),r&&c===null)throw Error(s(528,""));return _}if(r&&c!==null)throw Error(s(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Ri(i),i=Or(p).hoistableScripts,c=i.get(r),c||(c={type:"script",instance:null,count:0,state:null},i.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function ki(n){return'href="'+Un(n)+'"'}function Pl(n){return'link[rel="stylesheet"]['+n+"]"}function Sb(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function O2(n,r,i,c){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?c.loading=1:(r=n.createElement("link"),c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2}),En(r,"link",i),Zt(r),n.head.appendChild(r))}function Ri(n){return'[src="'+Un(n)+'"]'}function Ul(n){return"script[async]"+n}function Ab(n,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var c=n.querySelector('style[data-href~="'+Un(i.href)+'"]');if(c)return r.instance=c,Zt(c),c;var p=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),Zt(c),En(c,"style",p),Lu(c,i.precedence,n),r.instance=c;case"stylesheet":p=ki(i.href);var b=n.querySelector(Pl(p));if(b)return r.state.loading|=4,r.instance=b,Zt(b),b;c=Sb(i),(p=Ta.get(p))&&Qf(c,p),b=(n.ownerDocument||n).createElement("link"),Zt(b);var _=b;return _._p=new Promise(function(k,Y){_.onload=k,_.onerror=Y}),En(b,"link",c),r.state.loading|=4,Lu(b,i.precedence,n),r.instance=b;case"script":return b=Ri(i.src),(p=n.querySelector(Ul(b)))?(r.instance=p,Zt(p),p):(c=i,(p=Ta.get(b))&&(c=g({},i),Xf(c,p)),n=n.ownerDocument||n,p=n.createElement("script"),Zt(p),En(p,"link",c),n.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,Lu(c,i.precedence,n));return r.instance}function Lu(n,r,i){for(var c=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,b=p,_=0;_<c.length;_++){var k=c[_];if(k.dataset.precedence===r)b=k;else if(b!==p)break}b?b.parentNode.insertBefore(n,b.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(n,r.firstChild))}function Qf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Xf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var ju=null;function Cb(n,r,i){if(ju===null){var c=new Map,p=ju=new Map;p.set(i,c)}else p=ju,c=p.get(i),c||(c=new Map,p.set(i,c));if(c.has(n))return c;for(c.set(n,null),i=i.getElementsByTagName(n),p=0;p<i.length;p++){var b=i[p];if(!(b[ps]||b[Gt]||n==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var _=b.getAttribute(r)||"";_=n+_;var k=c.get(_);k?k.push(b):c.set(_,[b])}}return c}function wb(n,r,i){n=n.ownerDocument||n,n.head.insertBefore(i,r==="title"?n.querySelector("head > title"):null)}function I2(n,r,i){if(i===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return n=r.disabled,typeof r.precedence=="string"&&n==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function kb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function M2(n,r,i,c){if(i.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var p=ki(c.href),b=r.querySelector(Pl(p));if(b){r=b._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Bu.bind(n),r.then(n,n)),i.state.loading|=4,i.instance=b,Zt(b);return}b=r.ownerDocument||r,c=Sb(c),(p=Ta.get(p))&&Qf(c,p),b=b.createElement("link"),Zt(b);var _=b;_._p=new Promise(function(k,Y){_.onload=k,_.onerror=Y}),En(b,"link",c),i.instance=b}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=Bu.bind(n),r.addEventListener("load",i),r.addEventListener("error",i))}}var Wf=0;function D2(n,r){return n.stylesheets&&n.count===0&&Uu(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var c=setTimeout(function(){if(n.stylesheets&&Uu(n,n.stylesheets),n.unsuspend){var b=n.unsuspend;n.unsuspend=null,b()}},6e4+r);0<n.imgBytes&&Wf===0&&(Wf=62500*h2());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Uu(n,n.stylesheets),n.unsuspend)){var b=n.unsuspend;n.unsuspend=null,b()}},(n.imgBytes>Wf?50:800)+r);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function Bu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Pu=null;function Uu(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Pu=new Map,r.forEach(L2,n),Pu=null,Bu.call(n))}function L2(n,r){if(!(r.state.loading&4)){var i=Pu.get(n);if(i)var c=i.get(null);else{i=new Map,Pu.set(n,i);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var _=p[b];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(i.set(_.dataset.precedence,_),c=_)}c&&i.set(null,c)}p=r.instance,_=p.getAttribute("data-precedence"),b=i.get(_)||c,b===c&&i.set(null,p),i.set(_,p),this.count++,c=Bu.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),b?b.parentNode.insertBefore(p,b.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),r.state.loading|=4}}var Hl={$$typeof:R,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function j2(n,r,i,c,p,b,_,k,Y){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=Mt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mt(0),this.hiddenUpdates=Mt(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function Rb(n,r,i,c,p,b,_,k,Y,ne,fe,pe){return n=new j2(n,r,i,_,Y,ne,fe,pe,k),r=1,b===!0&&(r|=24),b=ea(3,null,null,r),n.current=b,b.stateNode=n,r=kd(),r.refCount++,n.pooledCache=r,r.refCount++,b.memoizedState={element:c,isDehydrated:i,cache:r},Md(b),n}function Ob(n){return n?(n=li,n):li}function Ib(n,r,i,c,p,b){p=Ob(p),c.context===null?c.context=p:c.pendingContext=p,c=Hr(r),c.payload={element:i},b=b===void 0?null:b,b!==null&&(c.callback=b),i=Fr(n,c,r),i!==null&&($n(i,n,r),xl(i,n,r))}function Mb(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<r?i:r}}function Zf(n,r){Mb(n,r),(n=n.alternate)&&Mb(n,r)}function Db(n){if(n.tag===13||n.tag===31){var r=Ts(n,67108864);r!==null&&$n(r,n,67108864),Zf(n,67108864)}}function Lb(n){if(n.tag===13||n.tag===31){var r=sa();r=jt(r);var i=Ts(n,r);i!==null&&$n(i,n,r),Zf(n,r)}}var Hu=!0;function B2(n,r,i,c){var p=F.T;F.T=null;var b=O.p;try{O.p=2,Jf(n,r,i,c)}finally{O.p=b,F.T=p}}function P2(n,r,i,c){var p=F.T;F.T=null;var b=O.p;try{O.p=8,Jf(n,r,i,c)}finally{O.p=b,F.T=p}}function Jf(n,r,i,c){if(Hu){var p=em(c);if(p===null)Uf(n,r,c,Fu,i),Bb(n,c);else if(H2(p,n,r,i,c))c.stopPropagation();else if(Bb(n,c),r&4&&-1<U2.indexOf(n)){for(;p!==null;){var b=rr(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var _=Bn(b.pendingLanes);if(_!==0){var k=b;for(k.pendingLanes|=2,k.entangledLanes|=2;_;){var Y=1<<31-bt(_);k.entanglements[1]|=Y,_&=~Y}Ya(b),(pt&6)===0&&(Nu=_t()+500,Dl(0))}}break;case 31:case 13:k=Ts(b,2),k!==null&&$n(k,b,2),Su(),Zf(b,2)}if(b=em(c),b===null&&Uf(n,r,c,Fu,i),b===p)break;p=b}p!==null&&c.stopPropagation()}else Uf(n,r,c,null,i)}}function em(n){return n=Xe(n),tm(n)}var Fu=null;function tm(n){if(Fu=null,n=On(n),n!==null){var r=u(n);if(r===null)n=null;else{var i=r.tag;if(i===13){if(n=d(r),n!==null)return n;n=null}else if(i===31){if(n=f(r),n!==null)return n;n=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Fu=n,null}function jb(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(nr()){case de:return 2;case ye:return 8;case Pe:case H:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var nm=!1,Zr=null,Jr=null,es=null,Fl=new Map,zl=new Map,ts=[],U2="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 Bb(n,r){switch(n){case"focusin":case"focusout":Zr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":es=null;break;case"pointerover":case"pointerout":Fl.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":zl.delete(r.pointerId)}}function ql(n,r,i,c,p,b){return n===null||n.nativeEvent!==b?(n={blockedOn:r,domEventName:i,eventSystemFlags:c,nativeEvent:b,targetContainers:[p]},r!==null&&(r=rr(r),r!==null&&Db(r)),n):(n.eventSystemFlags|=c,r=n.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),n)}function H2(n,r,i,c,p){switch(r){case"focusin":return Zr=ql(Zr,n,r,i,c,p),!0;case"dragenter":return Jr=ql(Jr,n,r,i,c,p),!0;case"mouseover":return es=ql(es,n,r,i,c,p),!0;case"pointerover":var b=p.pointerId;return Fl.set(b,ql(Fl.get(b)||null,n,r,i,c,p)),!0;case"gotpointercapture":return b=p.pointerId,zl.set(b,ql(zl.get(b)||null,n,r,i,c,p)),!0}return!1}function Pb(n){var r=On(n.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=d(i),r!==null){n.blockedOn=r,Ws(n.priority,function(){Lb(i)});return}}else if(r===31){if(r=f(i),r!==null){n.blockedOn=r,Ws(n.priority,function(){Lb(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function zu(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var i=em(n.nativeEvent);if(i===null){i=n.nativeEvent;var c=new i.constructor(i.type,i);De=c,i.target.dispatchEvent(c),De=null}else return r=rr(i),r!==null&&Db(r),n.blockedOn=i,!1;r.shift()}return!0}function Ub(n,r,i){zu(n)&&i.delete(r)}function F2(){nm=!1,Zr!==null&&zu(Zr)&&(Zr=null),Jr!==null&&zu(Jr)&&(Jr=null),es!==null&&zu(es)&&(es=null),Fl.forEach(Ub),zl.forEach(Ub)}function qu(n,r){n.blockedOn===r&&(n.blockedOn=null,nm||(nm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,F2)))}var Yu=null;function Hb(n){Yu!==n&&(Yu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Yu===n&&(Yu=null);for(var r=0;r<n.length;r+=3){var i=n[r],c=n[r+1],p=n[r+2];if(typeof c!="function"){if(tm(c||i)===null)continue;break}var b=rr(i);b!==null&&(n.splice(r,3),r-=3,Jd(b,{pending:!0,data:p,method:i.method,action:c},c,p))}}))}function Oi(n){function r(Y){return qu(Y,n)}Zr!==null&&qu(Zr,n),Jr!==null&&qu(Jr,n),es!==null&&qu(es,n),Fl.forEach(r),zl.forEach(r);for(var i=0;i<ts.length;i++){var c=ts[i];c.blockedOn===n&&(c.blockedOn=null)}for(;0<ts.length&&(i=ts[0],i.blockedOn===null);)Pb(i),i.blockedOn===null&&ts.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(c=0;c<i.length;c+=3){var p=i[c],b=i[c+1],_=p[_n]||null;if(typeof b=="function")_||Hb(i);else if(_){var k=null;if(b&&b.hasAttribute("formAction")){if(p=b,_=b[_n]||null)k=_.formAction;else if(tm(p)!==null)continue}else k=_.action;typeof k=="function"?i[c+1]=k:(i.splice(c,3),c-=3),Hb(i)}}}function Fb(){function n(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(_){return p=_})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),c||setTimeout(i,20)}function i(){if(!c&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function am(n){this._internalRoot=n}$u.prototype.render=am.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));var i=r.current,c=sa();Ib(i,c,n,r,null,null)},$u.prototype.unmount=am.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Ib(n.current,2,null,n,null,null),Su(),r[kr]=null}};function $u(n){this._internalRoot=n}$u.prototype.unstable_scheduleHydration=function(n){if(n){var r=Xs();n={blockedOn:null,target:n,priority:r};for(var i=0;i<ts.length&&r!==0&&r<ts[i].priority;i++);ts.splice(i,0,n),i===0&&Pb(n)}};var zb=t.version;if(zb!=="19.2.8")throw Error(s(527,zb,"19.2.8"));O.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=h(r),n=n!==null?x(n):null,n=n===null?null:n.stateNode,n};var z2={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gu.isDisabled&&Gu.supportsFiber)try{Wt=Gu.inject(z2),Ot=Gu}catch{}}return $l.createRoot=function(n,r){if(!l(n))throw Error(s(299));var i=!1,c="",p=Qp,b=Xp,_=Wp;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=Rb(n,1,!1,null,null,i,c,null,p,b,_,Fb),n[kr]=r.current,Pf(n),new am(r)},$l.hydrateRoot=function(n,r,i){if(!l(n))throw Error(s(299));var c=!1,p="",b=Qp,_=Xp,k=Wp,Y=null;return i!=null&&(i.unstable_strictMode===!0&&(c=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(b=i.onUncaughtError),i.onCaughtError!==void 0&&(_=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError),i.formState!==void 0&&(Y=i.formState)),r=Rb(n,1,!0,r,i??null,c,p,Y,b,_,k,Fb),r.context=Ob(null),i=r.current,c=sa(),c=jt(c),p=Hr(c),p.callback=null,Fr(i,p,c),i=c,r.current.lanes=i,Ct(r,i),Ya(r),n[kr]=r.current,Pf(n),new $u(r)},$l.version="19.2.8",$l}var Zb;function ev(){if(Zb)return im.exports;Zb=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(),im.exports=J2(),im.exports}var tv=ev();/**
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 Ah=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,NE=/^[\\/]{2}/;function nv(e,t){return t+e.replace(/\\/g,"/")}var Jb="popstate";function ex(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function av(e={}){function t(s,l){var h;let u=(h=l.state)==null?void 0:h.masked,{pathname:d,search:f,hash:m}=u||s.location;return Km("",{pathname:d,search:f,hash:m},l.state&&l.state.usr||null,l.state&&l.state.key||"default",u?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function a(s,l){return typeof l=="string"?l:fo(l)}return sv(t,a,null,e)}function Ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Sa(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rv(){return Math.random().toString(36).substring(2,10)}function tx(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 Km(e,t,a=null,s,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?qi(t):t,state:a,key:t&&t.key||s||rv(),mask:l}}function fo({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 qi(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function sv(e,t,a,s={}){let{window:l=document.defaultView,v5Compat:u=!1}=s,d=l.history,f="POP",m=null,h=x();h==null&&(h=0,d.replaceState({...d.state,idx:h},""));function x(){return(d.state||{idx:null}).idx}function g(){f="POP";let A=x(),w=A==null?null:A-h;h=A,m&&m({action:f,location:v.location,delta:w})}function y(A,w){f="PUSH";let C=ex(A)?A:Km(v.location,A,w);h=x()+1;let R=tx(C,h),U=v.createHref(C.mask||C);try{d.pushState(R,"",U)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;l.location.assign(U)}u&&m&&m({action:f,location:v.location,delta:1})}function T(A,w){f="REPLACE";let C=ex(A)?A:Km(v.location,A,w);h=x();let R=tx(C,h),U=v.createHref(C.mask||C);d.replaceState(R,"",U),u&&m&&m({action:f,location:v.location,delta:0})}function N(A){return iv(l,A)}let v={get action(){return f},get location(){return e(l,d)},listen(A){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(Jb,g),m=A,()=>{l.removeEventListener(Jb,g),m=null}},createHref(A){return t(l,A)},createURL:N,encodeLocation(A){let w=N(A);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:y,replace:T,go(A){return d.go(A)}};return v}function iv(e,t,a=!1){let s="http://localhost";e&&(s=e.location.origin!=="null"?e.location.origin:e.location.href),Ut(s,"No window.location.(origin|href) available to create URL");let l=typeof t=="string"?t:fo(t);return l=l.replace(/ $/,"%20"),!a&&NE.test(l)&&(l=s+l),new URL(l,s)}function vE(e,t,a="/"){return lv(e,t,a,!1)}function lv(e,t,a,s,l){let u=typeof t=="string"?qi(t):t,d=Ar(u.pathname||"/",a);if(d==null)return null;let f=ov(e),m=null,h=Ev(d);for(let x=0;m==null&&x<f.length;++x)m=xv(f[x],h,s);return m}function ov(e){let t=SE(e);return uv(t),t}function SE(e,t=[],a=[],s="",l=!1){let u=(d,f,m=l,h)=>{let x={relativePath:h===void 0?d.path||"":h,caseSensitive:d.caseSensitive===!0,childrenIndex:f,route:d};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(s)&&m)return;Ut(x.relativePath.startsWith(s),`Absolute route path "${x.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(s.length)}let g=Ma([s,x.relativePath]),y=a.concat(x);d.children&&d.children.length>0&&(Ut(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),SE(d.children,t,y,g,m)),!(d.path==null&&!d.index)&&t.push({path:g,score:gv(g,d.index),routesMeta:y.map((T,N)=>{let[v,A]=wE(T.relativePath,T.caseSensitive,N===y.length-1);return{...T,matcher:v,compiledParams:A}})})};return e.forEach((d,f)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,f);else for(let h of AE(d.path))u(d,f,!0,h)}),t}function AE(e){let t=e.split("/");if(t.length===0)return[];let[a,...s]=t,l=a.endsWith("?"),u=a.replace(/\?$/,"");if(s.length===0)return l?[u,""]:[u];let d=AE(s.join("/")),f=[];return f.push(...d.map(m=>m===""?u:[u,m].join("/"))),l&&f.push(...d),f.map(m=>e.startsWith("/")&&m===""?"/":m)}function uv(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:bv(t.routesMeta.map(s=>s.childrenIndex),a.routesMeta.map(s=>s.childrenIndex)))}var cv=/^:[\w-]+$/,dv=3,fv=2,mv=1,hv=10,pv=-2,nx=e=>e==="*";function gv(e,t){let a=e.split("/"),s=a.length;return a.some(nx)&&(s+=pv),t&&(s+=fv),a.filter(l=>!nx(l)).reduce((l,u)=>l+(cv.test(u)?dv:u===""?mv:hv),s)}function bv(e,t){return e.length===t.length&&e.slice(0,-1).every((s,l)=>s===t[l])?e[e.length-1]-t[t.length-1]:0}function xv(e,t,a=!1){let{routesMeta:s}=e,l={},u="/",d=[];for(let f=0;f<s.length;++f){let m=s[f],h=f===s.length-1,x=u==="/"?t:t.slice(u.length)||"/",g={path:m.relativePath,caseSensitive:m.caseSensitive,end:h},y=m.matcher&&m.compiledParams?CE(g,x,m.matcher,m.compiledParams):fc(g,x),T=m.route;if(!y&&h&&a&&!s[s.length-1].route.index&&(y=fc({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},x)),!y)return null;Object.assign(l,y.params),d.push({params:l,pathname:Ma([u,y.pathname]),pathnameBase:_v(Ma([u,y.pathnameBase])),route:T}),y.pathnameBase!=="/"&&(u=Ma([u,y.pathnameBase]))}return d}function fc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,s]=wE(e.path,e.caseSensitive,e.end);return CE(e,t,a,s)}function CE(e,t,a,s){let l=t.match(a);if(!l)return null;let u=l[0],d=u.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:s.reduce((h,{paramName:x,isOptional:g},y)=>{if(x==="*"){let N=f[y]||"";d=u.slice(0,u.length-N.length).replace(/(.)\/+$/,"$1")}const T=f[y];return g&&!T?h[x]=void 0:h[x]=(T||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:d,pattern:e}}function wE(e,t=!1,a=!0){Sa(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 s=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,m,h,x)=>{if(s.push({paramName:f,isOptional:m!=null}),m){let g=x.charAt(h+d.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),s]}function Ev(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Sa(!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 Ar(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,s=e.charAt(a);return s&&s!=="/"?null:e.slice(a)||"/"}function yv(e,t="/"){let{pathname:a,search:s="",hash:l=""}=typeof e=="string"?qi(e):e,u;return a?(a=kE(a),a.startsWith("/")?u=ax(a.substring(1),"/"):u=ax(a,t)):u=t,{pathname:u,search:Nv(s),hash:vv(l)}}function ax(e,t){let a=mc(t).split("/");return e.split("/").forEach(l=>{l===".."?a.length>1&&a.pop():l!=="."&&a.push(l)}),a.length>1?a.join("/"):"/"}function cm(e,t,a,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. 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 Tv(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function Ch(e){let t=Tv(e);return t.map((a,s)=>s===t.length-1?a.pathname:a.pathnameBase)}function Dc(e,t,a,s=!1){let l;typeof e=="string"?l=qi(e):(l={...e},Ut(!l.pathname||!l.pathname.includes("?"),cm("?","pathname","search",l)),Ut(!l.pathname||!l.pathname.includes("#"),cm("#","pathname","hash",l)),Ut(!l.search||!l.search.includes("#"),cm("#","search","hash",l)));let u=e===""||l.pathname==="",d=u?"/":l.pathname,f;if(d==null)f=a;else{let g=t.length-1;if(!s&&d.startsWith("..")){let y=d.split("/");for(;y[0]==="..";)y.shift(),g-=1;l.pathname=y.join("/")}f=g>=0?t[g]:"/"}let m=yv(l,f),h=d&&d!=="/"&&d.endsWith("/"),x=(u||d===".")&&a.endsWith("/");return!m.pathname.endsWith("/")&&(h||x)&&(m.pathname+="/"),m}var kE=e=>e.replace(/[\\/]{2,}/g,"/"),Ma=e=>kE(e.join("/")),mc=e=>e.replace(/\/+$/,""),_v=e=>mc(e).replace(/^\/*/,"/"),Nv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Sv=class{constructor(e,t,a,s=!1){this.status=e,this.statusText=t||"",this.internal=s,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function Av(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Cv(e){let t=e.map(a=>a.route.path).filter(Boolean);return Ma(t)||"/"}var RE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function OE(e,t){let a=e;if(typeof a!="string"||!Ah.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let s=a,l=!1;if(RE)try{let u=new URL(window.location.href),d=NE.test(a)?new URL(nv(a,u.protocol)):new URL(a),f=Ar(d.pathname,t);d.origin===u.origin&&f!=null?a=f+d.search+d.hash:l=!0}catch{Sa(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:l,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var IE=["POST","PUT","PATCH","DELETE"];new Set(IE);var wv=["GET",...IE];new Set(wv);var kv=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Rv(e){try{return kv.includes(new URL(e).protocol)}catch{return!1}}var Yi=S.createContext(null);Yi.displayName="DataRouter";var Lc=S.createContext(null);Lc.displayName="DataRouterState";var ME=S.createContext(!1);function Ov(){return S.useContext(ME)}var DE=S.createContext({isTransitioning:!1});DE.displayName="ViewTransition";var Iv=S.createContext(new Map);Iv.displayName="Fetchers";var Mv=S.createContext(null);Mv.displayName="Await";var ua=S.createContext(null);ua.displayName="Navigation";var To=S.createContext(null);To.displayName="Location";var La=S.createContext({outlet:null,matches:[],isDataRoute:!1});La.displayName="Route";var wh=S.createContext(null);wh.displayName="RouteError";var LE="REACT_ROUTER_ERROR",Dv="REDIRECT",Lv="ROUTE_ERROR_RESPONSE";function jv(e){if(e.startsWith(`${LE}:${Dv}:{`))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 Bv(e){if(e.startsWith(`${LE}:${Lv}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Sv(t.status,t.statusText,t.data)}catch{}}function Pv(e,{relative:t}={}){Ut($i(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:s}=S.useContext(ua),{hash:l,pathname:u,search:d}=_o(e,{relative:t}),f=u;return a!=="/"&&(f=u==="/"?a:Ma([a,u])),s.createHref({pathname:f,search:d,hash:l})}function $i(){return S.useContext(To)!=null}function ca(){return Ut($i(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(To).location}var jE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function BE(e){S.useContext(ua).static||S.useLayoutEffect(e)}function Aa(){let{isDataRoute:e}=S.useContext(La);return e?Jv():Uv()}function Uv(){Ut($i(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(Yi),{basename:t,navigator:a}=S.useContext(ua),{matches:s}=S.useContext(La),{pathname:l}=ca(),u=JSON.stringify(Ch(s)),d=S.useRef(!1);return BE(()=>{d.current=!0}),S.useCallback((m,h={})=>{if(Sa(d.current,jE),!d.current)return;if(typeof m=="number"){a.go(m);return}let x=Dc(m,JSON.parse(u),l,h.relative==="path");e==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:Ma([t,x.pathname])),(h.replace?a.replace:a.push)(x,h.state,h)},[t,a,u,l,e])}var Hv=S.createContext(null);function Fv(e){let t=S.useContext(La).outlet;return S.useMemo(()=>t&&S.createElement(Hv.Provider,{value:e},t),[t,e])}function _o(e,{relative:t}={}){let{matches:a}=S.useContext(La),{pathname:s}=ca(),l=JSON.stringify(Ch(a));return S.useMemo(()=>Dc(e,JSON.parse(l),s,t==="path"),[e,l,s,t])}function zv(e,t){return PE(e,t)}function PE(e,t,a){var A;Ut($i(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=S.useContext(ua),{matches:l}=S.useContext(La),u=l[l.length-1],d=u?u.params:{},f=u?u.pathname:"/",m=u?u.pathnameBase:"/",h=u&&u.route;{let w=h&&h.path||"";HE(f,!h||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${w}">) 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="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let x=ca(),g;if(t){let w=typeof t=="string"?qi(t):t;Ut(m==="/"||((A=w.pathname)==null?void 0:A.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 "${w.pathname}" was given in the \`location\` prop.`),g=w}else g=x;let y=g.pathname||"/",T=y;if(m!=="/"){let w=m.replace(/^\//,"").split("/");T="/"+y.replace(/^\//,"").split("/").slice(w.length).join("/")}let N=a&&a.state.matches.length?a.state.matches.map(w=>Object.assign(w,{route:a.manifest[w.route.id]||w.route})):vE(e,{pathname:T});Sa(h||N!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Sa(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.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 v=Kv(N&&N.map(w=>Object.assign({},w,{params:Object.assign({},d,w.params),pathname:Ma([m,s.encodeLocation?s.encodeLocation(w.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?m:Ma([m,s.encodeLocation?s.encodeLocation(w.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),l,a);return t&&v?S.createElement(To.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},v):v}function qv(){let e=Zv(),t=Av(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:s},u={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",e),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),a?S.createElement("pre",{style:l},a):null,d)}var Yv=S.createElement(qv,null),UE=class extends S.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=Bv(e.digest);a&&(e=a)}let t=e!==void 0?S.createElement(La.Provider,{value:this.props.routeContext},S.createElement(wh.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement($v,{error:e},t):t}};UE.contextType=ME;var dm=new WeakMap;function $v({children:e,error:t}){let{basename:a}=S.useContext(ua);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=jv(t.digest);if(s){let l=dm.get(t);if(l)throw l;let u=OE(s.location,a),d=u.absoluteURL||u.to;if(Rv(d))throw new Error("Invalid redirect location");if(RE&&!dm.get(t))if(u.isExternal||s.reloadDocument)window.location.href=d;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:s.replace}));throw dm.set(t,f),f}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function Gv({routeContext:e,match:t,children:a}){let s=S.useContext(Yi);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(La.Provider,{value:e},a)}function Kv(e,t=[],a){let s=a==null?void 0:a.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let l=e,u=s==null?void 0:s.errors;if(u!=null){let x=l.findIndex(g=>g.route.id&&(u==null?void 0:u[g.route.id])!==void 0);Ut(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),l=l.slice(0,Math.min(l.length,x+1))}let d=!1,f=-1;if(a&&s){d=s.renderFallback;for(let x=0;x<l.length;x++){let g=l[x];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=x),g.route.id){let{loaderData:y,errors:T}=s,N=g.route.loader&&!y.hasOwnProperty(g.route.id)&&(!T||T[g.route.id]===void 0);if(g.route.lazy||N){a.isStatic&&(d=!0),f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}}let m=a==null?void 0:a.onError,h=s&&m?(x,g)=>{var y,T;m(x,{location:s.location,params:((T=(y=s.matches)==null?void 0:y[0])==null?void 0:T.params)??{},pattern:Cv(s.matches),errorInfo:g})}:void 0;return l.reduceRight((x,g,y)=>{let T,N=!1,v=null,A=null;s&&(T=u&&g.route.id?u[g.route.id]:void 0,v=g.route.errorElement||Yv,d&&(f<0&&y===0?(HE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,A=null):f===y&&(N=!0,A=g.route.hydrateFallbackElement||null)));let w=t.concat(l.slice(0,y+1)),C=()=>{let R;return T?R=v:N?R=A:g.route.Component?R=S.createElement(g.route.Component,null):g.route.element?R=g.route.element:R=x,S.createElement(Gv,{match:g,routeContext:{outlet:x,matches:w,isDataRoute:s!=null},children:R})};return s&&(g.route.ErrorBoundary||g.route.errorElement||y===0)?S.createElement(UE,{location:s.location,revalidation:s.revalidation,component:v,error:T,children:C(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:h}):C()},null)}function kh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vv(e){let t=S.useContext(Yi);return Ut(t,kh(e)),t}function Qv(e){let t=S.useContext(Lc);return Ut(t,kh(e)),t}function Xv(e){let t=S.useContext(La);return Ut(t,kh(e)),t}function Rh(e){let t=Xv(e),a=t.matches[t.matches.length-1];return Ut(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function Wv(){return Rh("useRouteId")}function Zv(){var s;let e=S.useContext(wh),t=Qv("useRouteError"),a=Rh("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[a]}function Jv(){let{router:e}=Vv("useNavigate"),t=Rh("useNavigate"),a=S.useRef(!1);return BE(()=>{a.current=!0}),S.useCallback(async(l,u={})=>{Sa(a.current,jE),a.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...u}))},[e,t])}var rx={};function HE(e,t,a){!t&&!rx[e]&&(rx[e]=!0,Sa(!1,a))}S.memo(eS);function eS({routes:e,manifest:t,future:a,state:s,isStatic:l,onError:u}){return PE(e,void 0,{manifest:t,state:s,isStatic:l,onError:u})}function Vm({to:e,replace:t,state:a,relative:s}){Ut($i(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=S.useContext(ua);Sa(!l,"<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}=S.useContext(La),{pathname:d}=ca(),f=Aa(),m=Dc(e,Ch(u),d,s==="path"),h=JSON.stringify(m);return S.useEffect(()=>{f(JSON.parse(h),{replace:t,state:a,relative:s})},[f,h,s,t,a]),null}function tS(e){return Fv(e.context)}function vr(e){Ut(!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 nS({basename:e="/",children:t=null,location:a,navigationType:s="POP",navigator:l,static:u=!1,useTransitions:d}){Ut(!$i(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),m=S.useMemo(()=>({basename:f,navigator:l,static:u,useTransitions:d,future:{}}),[f,l,u,d]);typeof a=="string"&&(a=qi(a));let{pathname:h="/",search:x="",hash:g="",state:y=null,key:T="default",mask:N}=a,v=S.useMemo(()=>{let A=Ar(h,f);return A==null?null:{location:{pathname:A,search:x,hash:g,state:y,key:T,mask:N},navigationType:s}},[f,h,x,g,y,T,s,N]);return Sa(v!=null,`<Router basename="${f}"> is not able to match the URL "${h}${x}${g}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:S.createElement(ua.Provider,{value:m},S.createElement(To.Provider,{children:t,value:v}))}function aS({children:e,location:t}){return zv(Qm(e),t)}function Qm(e,t=[]){let a=[];return S.Children.forEach(e,(s,l)=>{if(!S.isValidElement(s))return;let u=[...t,l];if(s.type===S.Fragment){a.push.apply(a,Qm(s.props.children,u));return}Ut(s.type===vr,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ut(!s.props.index||!s.props.children,"An index route cannot have child routes.");let d={id:s.props.id||u.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(d.children=Qm(s.props.children,u)),a.push(d)}),a}var sc="get",ic="application/x-www-form-urlencoded";function jc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function rS(e){return jc(e)&&e.tagName.toLowerCase()==="button"}function sS(e){return jc(e)&&e.tagName.toLowerCase()==="form"}function iS(e){return jc(e)&&e.tagName.toLowerCase()==="input"}function lS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oS(e,t){return e.button===0&&(!t||t==="_self")&&!lS(e)}function Xm(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,a)=>{let s=e[a];return t.concat(Array.isArray(s)?s.map(l=>[a,l]):[[a,s]])},[]))}function uS(e,t){let a=Xm(e);return t&&t.forEach((s,l)=>{a.has(l)||t.getAll(l).forEach(u=>{a.append(l,u)})}),a}var Vu=null;function cS(){if(Vu===null)try{new FormData(document.createElement("form"),0),Vu=!1}catch{Vu=!0}return Vu}var dS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function fm(e){return e!=null&&!dS.has(e)?(Sa(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ic}"`),null):e}function fS(e,t){let a,s,l,u,d;if(sS(e)){let f=e.getAttribute("action");s=f?Ar(f,t):null,a=e.getAttribute("method")||sc,l=fm(e.getAttribute("enctype"))||ic,u=new FormData(e)}else if(rS(e)||iS(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(s=m?Ar(m,t):null,a=e.getAttribute("formmethod")||f.getAttribute("method")||sc,l=fm(e.getAttribute("formenctype"))||fm(f.getAttribute("enctype"))||ic,u=new FormData(f,e),!cS()){let{name:h,type:x,value:g}=e;if(x==="image"){let y=h?`${h}.`:"";u.append(`${y}x`,"0"),u.append(`${y}y`,"0")}else h&&u.append(h,g)}}else{if(jc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=sc,s=null,l=ic,d=e}return u&&l==="text/plain"&&(d=u,u=void 0),{action:s,method:a.toLowerCase(),encType:l,formData:u,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Oh(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function FE(e,t,a,s){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${s}`:l.pathname=`${l.pathname}.${s}`:l.pathname==="/"?l.pathname=`_root.${s}`:t&&Ar(l.pathname,t)==="/"?l.pathname=`${mc(t)}/_root.${s}`:l.pathname=`${mc(l.pathname)}.${s}`,l}async function mS(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 hS(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 pS(e,t,a){let s=await Promise.all(e.map(async l=>{let u=t.routes[l.route.id];if(u){let d=await mS(u,a);return d.links?d.links():[]}return[]}));return ES(s.flat(1).filter(hS).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function sx(e,t,a,s,l,u){let d=(m,h)=>a[h]?m.route.id!==a[h].route.id:!0,f=(m,h)=>{var x;return a[h].pathname!==m.pathname||((x=a[h].route.path)==null?void 0:x.endsWith("*"))&&a[h].params["*"]!==m.params["*"]};return u==="assets"?t.filter((m,h)=>d(m,h)||f(m,h)):u==="data"?t.filter((m,h)=>{var g;let x=s.routes[m.route.id];if(!x||!x.hasLoader)return!1;if(d(m,h)||f(m,h))return!0;if(m.route.shouldRevalidate){let y=m.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.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 gS(e,t,{includeHydrateFallback:a}={}){return bS(e.map(s=>{let l=t.routes[s.route.id];if(!l)return[];let u=[l.module];return l.clientActionModule&&(u=u.concat(l.clientActionModule)),l.clientLoaderModule&&(u=u.concat(l.clientLoaderModule)),a&&l.hydrateFallbackModule&&(u=u.concat(l.hydrateFallbackModule)),l.imports&&(u=u.concat(l.imports)),u}).flat(1))}function bS(e){return[...new Set(e)]}function xS(e){let t={},a=Object.keys(e).sort();for(let s of a)t[s]=e[s];return t}function ES(e,t){let a=new Set;return new Set(t),e.reduce((s,l)=>{let u=JSON.stringify(xS(l));return a.has(u)||(a.add(u),s.push({key:u,link:l})),s},[])}function Ih(){let e=S.useContext(Yi);return Oh(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function yS(){let e=S.useContext(Lc);return Oh(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Mh=S.createContext(void 0);Mh.displayName="FrameworkContext";function Bc(){let e=S.useContext(Mh);return Oh(e,"You must render this element inside a <HydratedRouter> element"),e}function TS(e,t){let a=S.useContext(Mh),[s,l]=S.useState(!1),[u,d]=S.useState(!1),{onFocus:f,onBlur:m,onMouseEnter:h,onMouseLeave:x,onTouchStart:g}=t,y=S.useRef(null);S.useEffect(()=>{if(e==="render"&&d(!0),e==="viewport"){let v=w=>{w.forEach(C=>{d(C.isIntersecting)})},A=new IntersectionObserver(v,{threshold:.5});return y.current&&A.observe(y.current),()=>{A.disconnect()}}},[e]),S.useEffect(()=>{if(s){let v=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(v)}}},[s]);let T=()=>{l(!0)},N=()=>{l(!1),d(!1)};return a?e!=="intent"?[u,y,{}]:[u,y,{onFocus:Gl(f,T),onBlur:Gl(m,N),onMouseEnter:Gl(h,T),onMouseLeave:Gl(x,N),onTouchStart:Gl(g,T)}]:[!1,y,{}]}function Gl(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function _S({page:e,...t}){let a=Ov(),{nonce:s}=Bc(),{router:l}=Ih(),u=S.useMemo(()=>vE(l.routes,e,l.basename),[l.routes,e,l.basename]);return u?(t.nonce==null&&s&&(t={...t,nonce:s}),a?S.createElement(vS,{page:e,matches:u,...t}):S.createElement(SS,{page:e,matches:u,...t})):null}function NS(e){let{manifest:t,routeModules:a}=Bc(),[s,l]=S.useState([]);return S.useEffect(()=>{let u=!1;return pS(e,t,a).then(d=>{u||l(d)}),()=>{u=!0}},[e,t,a]),s}function vS({page:e,matches:t,...a}){let s=ca(),{future:l}=Bc(),{basename:u}=Ih(),d=S.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let f=FE(e,u,l.v8_trailingSlashAwareDataRequests,"rsc"),m=!1,h=[];for(let x of t)typeof x.route.shouldRevalidate=="function"?m=!0:h.push(x.route.id);return m&&h.length>0&&f.searchParams.set("_routes",h.join(",")),[f.pathname+f.search]},[u,l.v8_trailingSlashAwareDataRequests,e,s,t]);return S.createElement(S.Fragment,null,d.map(f=>S.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...a})))}function SS({page:e,matches:t,...a}){let s=ca(),{future:l,manifest:u,routeModules:d}=Bc(),{basename:f}=Ih(),{loaderData:m,matches:h}=yS(),x=S.useMemo(()=>sx(e,t,h,u,s,"data"),[e,t,h,u,s]),g=S.useMemo(()=>sx(e,t,h,u,s,"assets"),[e,t,h,u,s]),y=S.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let v=new Set,A=!1;if(t.forEach(C=>{var U;let R=u.routes[C.route.id];!R||!R.hasLoader||(!x.some(V=>V.route.id===C.route.id)&&C.route.id in m&&((U=d[C.route.id])!=null&&U.shouldRevalidate)||R.hasClientLoader?A=!0:v.add(C.route.id))}),v.size===0)return[];let w=FE(e,f,l.v8_trailingSlashAwareDataRequests,"data");return A&&v.size>0&&w.searchParams.set("_routes",t.filter(C=>v.has(C.route.id)).map(C=>C.route.id).join(",")),[w.pathname+w.search]},[f,l.v8_trailingSlashAwareDataRequests,m,s,u,x,t,e,d]),T=S.useMemo(()=>gS(g,u),[g,u]),N=NS(g);return S.createElement(S.Fragment,null,y.map(v=>S.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...a})),T.map(v=>S.createElement("link",{key:v,rel:"modulepreload",href:v,...a})),N.map(({key:v,link:A})=>S.createElement("link",{key:v,nonce:a.nonce,...A,crossOrigin:A.crossOrigin??a.crossOrigin})))}function AS(...e){return t=>{e.forEach(a=>{typeof a=="function"?a(t):a!=null&&(a.current=t)})}}var CS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{CS&&(window.__reactRouterVersion="7.18.1")}catch{}function wS({basename:e,children:t,useTransitions:a,window:s}){let l=S.useRef();l.current==null&&(l.current=av({window:s,v5Compat:!0}));let u=l.current,[d,f]=S.useState({action:u.action,location:u.location}),m=S.useCallback(h=>{a===!1?f(h):S.startTransition(()=>f(h))},[a]);return S.useLayoutEffect(()=>u.listen(m),[u,m]),S.createElement(nS,{basename:e,children:t,location:d.location,navigationType:d.action,navigator:u,useTransitions:a})}var zE=S.forwardRef(function({onClick:t,discover:a="render",prefetch:s="none",relative:l,reloadDocument:u,replace:d,mask:f,state:m,target:h,to:x,preventScrollReset:g,viewTransition:y,defaultShouldRevalidate:T,...N},v){let{basename:A,navigator:w,useTransitions:C}=S.useContext(ua),R=typeof x=="string"&&Ah.test(x),U=OE(x,A);x=U.to;let V=Pv(x,{relative:l}),L=ca(),z=null;if(f){let ae=Dc(f,[],L.mask?L.mask.pathname:"/",!0);A!=="/"&&(ae.pathname=ae.pathname==="/"?A:Ma([A,ae.pathname])),z=w.createHref(ae)}let[X,W,j]=TS(s,N),K=OS(x,{replace:d,mask:f,state:m,target:h,preventScrollReset:g,relative:l,viewTransition:y,defaultShouldRevalidate:T,useTransitions:C});function Z(ae){t&&t(ae),ae.defaultPrevented||K(ae)}let se=!(U.isExternal||u),le=S.createElement("a",{...N,...j,href:(se?z:void 0)||U.absoluteURL||V,onClick:se?Z:t,ref:AS(v,W),target:h,"data-discover":!R&&a==="render"?"true":void 0});return X&&!R?S.createElement(S.Fragment,null,le,S.createElement(_S,{page:V})):le});zE.displayName="Link";var Dh=S.forwardRef(function({"aria-current":t="page",caseSensitive:a=!1,className:s="",end:l=!1,style:u,to:d,viewTransition:f,children:m,...h},x){let g=_o(d,{relative:h.relative}),y=ca(),T=S.useContext(Lc),{navigator:N,basename:v}=S.useContext(ua),A=T!=null&&jS(g)&&f===!0,w=N.encodeLocation?N.encodeLocation(g).pathname:g.pathname,C=y.pathname,R=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;a||(C=C.toLowerCase(),R=R?R.toLowerCase():null,w=w.toLowerCase()),R&&v&&(R=Ar(R,v)||R);const U=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let V=C===w||!l&&C.startsWith(w)&&C.charAt(U)==="/",L=R!=null&&(R===w||!l&&R.startsWith(w)&&R.charAt(w.length)==="/"),z={isActive:V,isPending:L,isTransitioning:A},X=V?t:void 0,W;typeof s=="function"?W=s(z):W=[s,V?"active":null,L?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let j=typeof u=="function"?u(z):u;return S.createElement(zE,{...h,"aria-current":X,className:W,ref:x,style:j,to:d,viewTransition:f},typeof m=="function"?m(z):m)});Dh.displayName="NavLink";var kS=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:s,replace:l,state:u,method:d=sc,action:f,onSubmit:m,relative:h,preventScrollReset:x,viewTransition:g,defaultShouldRevalidate:y,...T},N)=>{let{useTransitions:v}=S.useContext(ua),A=DS(),w=LS(f,{relative:h}),C=d.toLowerCase()==="get"?"get":"post",R=typeof f=="string"&&Ah.test(f),U=V=>{if(m&&m(V),V.defaultPrevented)return;V.preventDefault();let L=V.nativeEvent.submitter,z=(L==null?void 0:L.getAttribute("formmethod"))||d,X=()=>A(L||V.currentTarget,{fetcherKey:t,method:z,navigate:a,replace:l,state:u,relative:h,preventScrollReset:x,viewTransition:g,defaultShouldRevalidate:y});v&&a!==!1?S.startTransition(()=>X()):X()};return S.createElement("form",{ref:N,method:C,action:w,onSubmit:s?m:U,...T,"data-discover":!R&&e==="render"?"true":void 0})});kS.displayName="Form";function RS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qE(e){let t=S.useContext(Yi);return Ut(t,RS(e)),t}function OS(e,{target:t,replace:a,mask:s,state:l,preventScrollReset:u,relative:d,viewTransition:f,defaultShouldRevalidate:m,useTransitions:h}={}){let x=Aa(),g=ca(),y=_o(e,{relative:d});return S.useCallback(T=>{if(oS(T,t)){T.preventDefault();let N=a!==void 0?a:fo(g)===fo(y),v=()=>x(e,{replace:N,mask:s,state:l,preventScrollReset:u,relative:d,viewTransition:f,defaultShouldRevalidate:m});h?S.startTransition(()=>v()):v()}},[g,x,y,a,s,l,t,e,u,d,f,m,h])}function YE(e){Sa(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=S.useRef(Xm(e)),a=S.useRef(!1),s=ca(),l=S.useMemo(()=>uS(s.search,a.current?null:t.current),[s.search]),u=Aa(),d=S.useCallback((f,m)=>{const h=Xm(typeof f=="function"?f(new URLSearchParams(l)):f);a.current=!0,u("?"+h,m)},[u,l]);return[l,d]}var IS=0,MS=()=>`__${String(++IS)}__`;function DS(){let{router:e}=qE("useSubmit"),{basename:t}=S.useContext(ua),a=Wv(),s=e.fetch,l=e.navigate;return S.useCallback(async(u,d={})=>{let{action:f,method:m,encType:h,formData:x,body:g}=fS(u,t);if(d.navigate===!1){let y=d.fetcherKey||MS();await s(y,a,d.action||f,{defaultShouldRevalidate:d.defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:g,formMethod:d.method||m,formEncType:d.encType||h,flushSync:d.flushSync})}else await l(d.action||f,{defaultShouldRevalidate:d.defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:g,formMethod:d.method||m,formEncType:d.encType||h,replace:d.replace,state:d.state,fromRouteId:a,flushSync:d.flushSync,viewTransition:d.viewTransition})},[s,l,t,a])}function LS(e,{relative:t}={}){let{basename:a}=S.useContext(ua),s=S.useContext(La);Ut(s,"useFormAction must be used inside a RouteContext");let[l]=s.matches.slice(-1),u={..._o(e||".",{relative:t})},d=ca();if(e==null){u.search=d.search;let f=new URLSearchParams(u.search),m=f.getAll("index");if(m.some(x=>x==="")){f.delete("index"),m.filter(g=>g).forEach(g=>f.append("index",g));let x=f.toString();u.search=x?`?${x}`:""}}return(!e||e===".")&&l.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(u.pathname=u.pathname==="/"?a:Ma([a,u.pathname])),fo(u)}function jS(e,{relative:t}={}){let a=S.useContext(DE);Ut(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=qE("useViewTransitionState"),l=_o(e,{relative:t});if(!a.isTransitioning)return!1;let u=Ar(a.currentLocation.pathname,s)||a.currentLocation.pathname,d=Ar(a.nextLocation.pathname,s)||a.nextLocation.pathname;return fc(l.pathname,d)!=null||fc(l.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 BS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),PS=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,s)=>s?s.toUpperCase():a.toLowerCase()),ix=e=>{const t=PS(e);return t.charAt(0).toUpperCase()+t.slice(1)},$E=(...e)=>e.filter((t,a,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===a).join(" ").trim(),US=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 HS={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 FS=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:l="",children:u,iconNode:d,...f},m)=>S.createElement("svg",{ref:m,...HS,width:t,height:t,stroke:e,strokeWidth:s?Number(a)*24/Number(t):a,className:$E("lucide",l),...!u&&!US(f)&&{"aria-hidden":"true"},...f},[...d.map(([h,x])=>S.createElement(h,x)),...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 Ce=(e,t)=>{const a=S.forwardRef(({className:s,...l},u)=>S.createElement(FS,{ref:u,iconNode:t,className:$E(`lucide-${BS(ix(e))}`,`lucide-${e}`,s),...l}));return a.displayName=ix(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 zS=[["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"}]],qS=Ce("activity",zS);/**
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 YS=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],$S=Ce("arrow-down-to-line",YS);/**
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 GS=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],lx=Ce("arrow-left",GS);/**
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 KS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],VS=Ce("arrow-right",KS);/**
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 QS=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],GE=Ce("arrow-up",QS);/**
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 XS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],WS=Ce("ban",XS);/**
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 ZS=[["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"}]],JS=Ce("bot",ZS);/**
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 eA=[["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"}]],tA=Ce("box",eA);/**
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 nA=[["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"}]],KE=Ce("brain",nA);/**
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 aA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],oa=Ce("check",aA);/**
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 rA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ia=Ce("chevron-down",rA);/**
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 sA=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Lh=Ce("chevron-left",sA);/**
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 iA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],jh=Ce("chevron-right",iA);/**
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 lA=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],oA=Ce("chevron-up",lA);/**
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 uA=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],cA=Ce("chevrons-left",uA);/**
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 dA=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],fA=Ce("chevrons-right",dA);/**
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 mA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],mm=Ce("circle-check",mA);/**
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 hA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],mo=Ce("circle-dot",hA);/**
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 pA=[["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"}]],VE=Ce("circle-x",pA);/**
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 gA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],bA=Ce("circle",gA);/**
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 xA=[["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"}]],EA=Ce("clipboard",xA);/**
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 yA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],TA=Ce("clock",yA);/**
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 _A=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],QE=Ce("cloud",_A);/**
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 NA=[["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"}]],hc=Ce("copy",NA);/**
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 vA=[["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"}]],lc=Ce("cpu",vA);/**
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 SA=[["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"}]],AA=Ce("download",SA);/**
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 CA=[["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"}]],pc=Ce("external-link",CA);/**
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 wA=[["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"}]],kA=Ce("eye-off",wA);/**
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 RA=[["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"}]],OA=Ce("eye",RA);/**
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 IA=[["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"}]],XE=Ce("file-text",IA);/**
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 MA=[["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"}]],Bh=Ce("flag",MA);/**
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 DA=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],LA=Ce("gauge",DA);/**
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 jA=[["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"}]],Ys=Ce("git-branch",jA);/**
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 BA=[["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"}]],gc=Ce("git-merge",BA);/**
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 PA=[["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"}]],ho=Ce("git-pull-request",PA);/**
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 UA=[["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"}]],HA=Ce("hard-drive",UA);/**
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 FA=[["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"}]],zA=Ce("image-plus",FA);/**
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 qA=[["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"}]],Pc=Ce("link-2",qA);/**
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 YA=[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],$A=Ce("list-todo",YA);/**
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 GA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],va=Ce("loader-circle",GA);/**
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 KA=[["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"}]],VA=Ce("maximize-2",KA);/**
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 QA=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Uc=Ce("menu",QA);/**
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 XA=[["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"}]],WA=Ce("message-circle-question",XA);/**
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 ZA=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],JA=Ce("message-circle",ZA);/**
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 e3=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],t3=Ce("message-square",e3);/**
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 n3=[["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"}]],a3=Ce("mic",n3);/**
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 r3=[["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"}]],s3=Ce("minimize-2",r3);/**
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 i3=[["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"}]],l3=Ce("monitor",i3);/**
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 o3=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],u3=Ce("moon",o3);/**
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 c3=[["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"}]],d3=Ce("network",c3);/**
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 f3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],WE=Ce("panel-right",f3);/**
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 m3=[["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"}]],h3=Ce("paperclip",m3);/**
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 p3=[["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"}]],ZE=Ce("pen-line",p3);/**
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 g3=[["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"}]],ox=Ce("pencil",g3);/**
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 b3=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Hc=Ce("play",b3);/**
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 x3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Wa=Ce("plus",x3);/**
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 E3=[["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"}]],Fs=Ce("refresh-cw",E3);/**
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 y3=[["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"}]],T3=Ce("rotate-ccw",y3);/**
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 _3=[["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"}]],Fc=Ce("save",_3);/**
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 N3=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],os=Ce("search",N3);/**
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 v3=[["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"}]],bc=Ce("send",v3);/**
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 S3=[["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"}]],A3=Ce("settings",S3);/**
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 C3=[["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"}]],hm=Ce("sparkles",C3);/**
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 w3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Wm=Ce("square",w3);/**
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 k3=[["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"}]],R3=Ce("sun",k3);/**
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 O3=[["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"}]],zs=Ce("trash-2",O3);/**
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 I3=[["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"}]],An=Ce("triangle-alert",I3);/**
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 M3=[["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"}]],JE=Ce("upload",M3);/**
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 D3=[["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"}]],ey=Ce("user",D3);/**
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 L3=[["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"}]],ty=Ce("users",L3);/**
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 j3=[["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"}]],ny=Ce("wifi",j3);/**
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 B3=[["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"}]],P3=Ce("wrench",B3);/**
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 U3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gt=Ce("x",U3);/**
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 H3=[["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"}]],Ph=Ce("zap",H3);function ay(e){var t,a,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=ay(e[t]))&&(s&&(s+=" "),s+=a)}else for(a in e)e[a]&&(s&&(s+=" "),s+=a);return s}function oe(){for(var e,t,a=0,s="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=ay(e))&&(s&&(s+=" "),s+=t);return s}const ux=e=>{let t;const a=new Set,s=(h,x)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const y=t;t=x??(typeof g!="object"||g===null)?g:Object.assign({},t,g),a.forEach(T=>T(t,y))}},l=()=>t,f={setState:s,getState:l,getInitialState:()=>m,subscribe:h=>(a.add(h),()=>a.delete(h))},m=t=e(s,l,f);return f},F3=(e=>e?ux(e):ux),z3=e=>e;function q3(e,t=z3){const a=Ku.useSyncExternalStore(e.subscribe,Ku.useCallback(()=>t(e.getState()),[e,t]),Ku.useCallback(()=>t(e.getInitialState()),[e,t]));return Ku.useDebugValue(a),a}const cx=e=>{const t=F3(e),a=s=>q3(t,s);return Object.assign(a,t),a},Za=(e=>e?cx(e):cx),pm="fs-theme";function ry(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function dx(e){return e==="system"?ry():e}function fx(e){e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}const Zm=Za((e,t)=>({preference:localStorage.getItem(pm)??"system",resolved:dx(localStorage.getItem(pm)??"system"),setPreference(a){const s=dx(a);localStorage.setItem(pm,a),fx(a),e({preference:a,resolved:s})},cycle(){const a=["system","light","dark"],s=a[(a.indexOf(t().preference)+1)%a.length];t().setPreference(s)},init(){fx(t().preference);const a=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>{const{preference:l}=t();if(l==="system"){const u=ry();e({resolved:u})}};return a.addEventListener("change",s),()=>a.removeEventListener("change",s)}})),xc="fourth-spark-server-url";function sy(){if(typeof window>"u")return!1;const t=window.Capacitor;return typeof(t==null?void 0:t.isNativePlatform)=="function"&&t.isNativePlatform()}function iy(){return localStorage.getItem(xc)??""}function Y3(e){const t=e.replace(/\/+$/,"");t?localStorage.setItem(xc,t):localStorage.removeItem(xc)}function Jm(){return localStorage.getItem(xc)??""}class Xa extends Error{constructor(a,s){super(a);rn(this,"status");this.name="ApiError",this.status=s}}async function ve(e,t){let a;try{a=await fetch(iy()+e,{...t,headers:{Accept:"application/json",...t!=null&&t.body?{"Content-Type":"application/json"}:{},...t==null?void 0:t.headers}})}catch(l){throw new Xa(l instanceof Error?l.message:"Network request failed",0)}if(!a.ok){const l=await a.text().catch(()=>"");throw new Xa(l.trim()||`${a.status} ${a.statusText}`,a.status)}if(a.status===204)return;const s=await a.text();if(s)return JSON.parse(s)}function yn(e,...t){if(Array.isArray(e))return e;if(e&&typeof e=="object"){const a=e;for(const s of[...t,"data","items"])if(Array.isArray(a[s]))return a[s]}return[]}async function $3(){return yn(await ve("/api/repos"),"repos")}async function G3(e,t,a,s){return ve("/api/repos",{method:"POST",body:JSON.stringify({name:e,gitUrl:t,localPath:a,runtimeType:s})})}async function K3(e){return ve("/api/repos/resolve",{method:"POST",body:JSON.stringify({localPath:e})})}async function V3(e){await ve(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}async function Q3(e){await ve(`/api/repos/${encodeURIComponent(e)}/start`,{method:"POST"})}async function X3(e){await ve(`/api/repos/${encodeURIComponent(e)}/stop`,{method:"POST"})}async function W3(e){return ve(`/api/repos/${encodeURIComponent(e)}/branches`)}async function Z3(e,t){return ve(`/api/repos/${encodeURIComponent(e)}/checkout`,{method:"POST",body:JSON.stringify({branch:t})})}async function J3(e){return ve(`/api/repos/${encodeURIComponent(e)}/pull`,{method:"POST"})}function Ke(e){return`/api/repos/${encodeURIComponent(e)}`}async function eC(e){return yn(await ve(`${Ke(e)}/workspaces`),"workspaces")}async function tC(e,t){await ve(`${Ke(e)}/workspaces/${encodeURIComponent(t)}`,{method:"DELETE"})}async function nC(e){return ve(`${Ke(e)}/workspaces/cleanup`,{method:"POST"})}async function aC(e,t){await ve(`/api/repos/${e}/worktree`,{method:"PATCH",body:JSON.stringify({enabled:t})})}async function rC(e,t){await ve(`/api/repos/${e}/runtime`,{method:"PATCH",body:JSON.stringify({runtimeType:t})})}async function sC(e){return yn(await ve(`${Ke(e)}/sessions`),"sessions")}async function iC(e,t,a,s,l,u,d,f){return ve(`${Ke(e)}/sessions`,{method:"POST",body:JSON.stringify({message:t,agent:a,model:s,variant:l,issueId:u,customAgentId:d,files:f})})}async function lC(e,t){return ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}`)}async function oC(e,t){await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}`,{method:"DELETE"})}async function uC(e,t,a,s,l,u){await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/prompt`,{method:"POST",body:JSON.stringify({content:a,agent:s,model:l,files:u})})}async function cC(e,t){await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"})}async function dC(e,t,a){await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/questions/reply`,{method:"POST",body:JSON.stringify({answers:a})})}async function fC(e,t){await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/questions/reject`,{method:"POST"})}async function mC(e,t,a){return ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/revert`,{method:"POST",body:JSON.stringify({messageID:a})})}function hC(e){const t=e,a=t.info;if(a&&typeof a.id=="string"){const s=Array.isArray(t.parts)?t.parts:void 0;return{...a,...s?{parts:s}:{}}}return t}async function pC(e,t){return yn(await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/messages`),"messages").map(hC)}async function gC(e,t){return yn(await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/todos`),"todos")}async function ly(e,t){return ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/status`)}async function mx(e,t){return ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/links`)}async function hx(e){return ve(`${Ke(e)}/sessions/all-links`)}async function bC(e,t,a,s){await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/links`,{method:"POST",body:JSON.stringify({type:a,targetId:s})})}async function xC(e,t,a,s){await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}/links`,{method:"DELETE",body:JSON.stringify({type:a,targetId:s})})}async function EC(e){return yn(await ve(`${Ke(e)}/agents`),"agents")}async function oy(){return yn(await ve("/api/custom-agents"))}async function uy(e){return ve("/api/custom-agents",{method:"POST",body:JSON.stringify(e)})}async function cy(e,t){return ve(`/api/custom-agents/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})}async function dy(e){await ve(`/api/custom-agents/${encodeURIComponent(e)}`,{method:"DELETE"})}async function px(e){return ve(`/api/custom-agents/${encodeURIComponent(e)}/export`)}async function yC(e){return ve("/api/custom-agents/import",{method:"POST",body:JSON.stringify(e)})}async function TC(e){return yn(await ve(`${Ke(e)}/custom-agents`))}async function _C(e,t){return ve(`${Ke(e)}/custom-agents`,{method:"POST",body:JSON.stringify(t)})}async function zc(e){return yn(await ve(`${Ke(e)}/models`))}async function NC(){return yn(await ve("/api/prompt-fragments"))}async function vC(e){return ve("/api/prompt-fragments",{method:"POST",body:JSON.stringify(e)})}async function SC(e,t){return ve(`/api/prompt-fragments/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})}async function AC(e){await ve(`/api/prompt-fragments/${encodeURIComponent(e)}`,{method:"DELETE"})}async function gx(e){return yn(await ve(`${Ke(e)}/tags`))}async function bx(e,t){return yn(await ve(`${Ke(e)}/milestones`))}async function xx(e,t="open"){return yn(await ve(`${Ke(e)}/issues?state=${encodeURIComponent(t)}`),"issues")}async function CC(e,t="all"){return ve(`${Ke(e)}/issues/sync`,{method:"POST",body:JSON.stringify({state:t})})}async function wC(e,t,a){return ve(`${Ke(e)}/issues`,{method:"POST",body:JSON.stringify({title:t,body:a})})}async function kC(e,t,a){await ve(`${Ke(e)}/issues/${t}/children`,{method:"POST",body:JSON.stringify({childNumber:a})})}async function fy(e,t,a){return ve(`${Ke(e)}/issues/${t}`,{method:"PATCH",body:JSON.stringify(a)})}async function Ex(e,t){return yn(await ve(`${Ke(e)}/issues/${t}/pulls`))}async function RC(e,t,a,s=!1){await ve(`${Ke(e)}/issues/${t}/pulls/${a}/merge`,{method:"POST",body:JSON.stringify({closeIssue:s})})}async function yx(e,t="open"){return yn(await ve(`${Ke(e)}/pulls?state=${encodeURIComponent(t)}`))}async function OC(e,t="all"){return ve(`${Ke(e)}/pulls/sync`,{method:"POST",body:JSON.stringify({state:t})})}async function IC(e,t){await ve(`${Ke(e)}/pulls/${t}/merge`,{method:"POST"})}async function my(e,t){return yn(await ve(`${Ke(e)}/pulls/${t}/issues`))}async function MC(e,t,a){await ve(`${Ke(e)}/pulls/${t}/issues`,{method:"POST",body:JSON.stringify({issueNumber:a})})}async function DC(e,t,a){await ve(`${Ke(e)}/pulls/${t}/issues/${a}`,{method:"DELETE"})}async function LC(e,t){return ve(`${Ke(e)}/pulls/${t}/comments`)}async function jC(e,t){return ve(`${Ke(e)}/issues/${t}/comments`)}async function Tx(e,t,a){return ve(`${Ke(e)}/issues/${t}/comments`,{method:"POST",body:JSON.stringify({body:a})})}async function BC(e,t,a){return ve(`${Ke(e)}/issues/${t}/polish`,{method:"POST",body:JSON.stringify({draft:a})})}async function _x(e,t){return ve(`${Ke(e)}/issues/${t}/draft`)}async function PC(e,t,a){await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({title:a})})}async function UC(e,t,a){await ve(`${Ke(e)}/sessions/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({completedAt:a})})}async function HC(){return ve("/api/agents-md")}async function FC(e){await ve("/api/agents-md",{method:"PUT",body:JSON.stringify({content:e})})}async function zC(e){return ve(`/api/repos/${encodeURIComponent(e)}/agents-md`)}async function qC(e,t){await ve(`/api/repos/${encodeURIComponent(e)}/agents-md`,{method:"PUT",body:JSON.stringify({content:t})})}function YC(e){return`${iy()}${Ke(e)}/events`}async function $C(e){return ve(`${Ke(e)}/sessions/status`)}async function qc(){return ve("/api/settings")}async function eh(e,t){await ve(`/api/settings/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({value:t})})}async function th(){return ve("/api/cloud/status")}async function GC(){return ve("/api/cloud/reload",{method:"POST"})}async function KC(e){try{return(await ve("/api/cloud/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})})).connected}catch{return!1}}async function VC(){return yn(await ve("/api/git-hosts"),"gitHosts")}async function QC(e,t,a,s="gitea"){return ve("/api/git-hosts",{method:"POST",body:JSON.stringify({host:e,name:t,token:a,platform:s})})}async function XC(e){await ve(`/api/git-hosts/${encodeURIComponent(e)}`,{method:"DELETE"})}async function hy(){return ve("/api/usage")}async function py(e){return ve("/api/usage/switch",{method:"POST",body:JSON.stringify({accountId:e})})}async function WC(e,t="ios"){await ve("/api/push/register",{method:"POST",body:JSON.stringify({token:e,platform:t})})}const as="fs-active-repo",He=Za((e,t)=>({repos:[],activeRepoId:localStorage.getItem(as),loading:!1,loadError:null,loadRepos:async()=>{e({loading:!0,loadError:null});try{const a=await $3(),s=t().activeRepoId,l=s&&a.some(d=>d.id===s);e({repos:a,loading:!1,activeRepoId:l?s:a.length>0?a[0].id:null});const u=t().activeRepoId;u?localStorage.setItem(as,u):localStorage.removeItem(as)}catch(a){e({loading:!1,loadError:a instanceof Error?a.message:"Failed to load repos"})}},setActiveRepo:a=>{e({activeRepoId:a}),a?localStorage.setItem(as,a):localStorage.removeItem(as)},addRepo:async(a,s,l,u)=>{try{const d=await G3(a,s,l,u);return e(f=>({repos:[...f.repos,d],activeRepoId:d.id})),localStorage.setItem(as,d.id),d}catch(d){return e({loadError:d instanceof Error?d.message:"Failed to add repo"}),null}},removeRepo:async a=>{try{await V3(a)}catch{}e(s=>{const l=s.repos.filter(d=>d.id!==a),u=s.activeRepoId===a?l.length>0?l[0].id:null:s.activeRepoId;return u?localStorage.setItem(as,u):localStorage.removeItem(as),{repos:l,activeRepoId:u}})},updateRepoBranch:(a,s)=>{e(l=>({repos:l.repos.map(u=>u.id===a?{...u,branch:s}:u)}))}})),ja=e=>{var t;return((t=e.repos.find(a=>a.id===e.activeRepoId))==null?void 0:t.name)??null},gm="fs-nav-collapsed",bm="fs-session-panel-collapsed",Ec=Za(e=>({navCollapsed:localStorage.getItem(gm)==="true",sessionPanelCollapsed:localStorage.getItem(bm)==="true",toggleNav(){e(t=>{const a=!t.navCollapsed;return localStorage.setItem(gm,String(a)),{navCollapsed:a}})},toggleSessionPanel(){e(t=>{const a=!t.sessionPanelCollapsed;return localStorage.setItem(bm,String(a)),{sessionPanelCollapsed:a}})},setNavCollapsed(t){localStorage.setItem(gm,String(t)),e({navCollapsed:t})},setSessionPanelCollapsed(t){localStorage.setItem(bm,String(t)),e({sessionPanelCollapsed:t})}})),gy=[{segment:"repos",icon:tA,label:"仓库管理",global:!0},{segment:"run",icon:Hc,label:"运行面板",global:!1},{segment:"issues",icon:mo,label:"Issues",global:!1},{segment:"pulls",icon:ho,label:"PRs",global:!1},{segment:"settings",icon:A3,label:"设置",global:!0}];function by(e,t,a){return t?`/${e}`:a?`/${encodeURIComponent(a)}/${e}`:`/${e}`}function ZC({repoId:e,currentBranch:t}){const a=He(w=>w.updateRepoBranch),[s,l]=S.useState(!1),[u,d]=S.useState(null),[f,m]=S.useState(!1),[h,x]=S.useState(null),[g,y]=S.useState(null),T=S.useRef(null),N=S.useCallback(()=>{l(!1),y(null)},[]);S.useEffect(()=>{if(!s)return;const w=C=>{T.current&&!T.current.contains(C.target)&&N()};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[s,N]);const v=async()=>{if(s){N();return}l(!0),m(!0),y(null);try{d(await W3(e))}catch{y("加载分支失败")}finally{m(!1)}},A=async w=>{if(!(w===t||h)){x(w),y(null);try{const C=await Z3(e,w);a(e,C.branch),N()}catch(C){y(C instanceof Error?C.message:"切换失败")}finally{x(null)}}};return t?o.jsxs("div",{ref:T,className:"relative",children:[o.jsxs("button",{type:"button",onClick:v,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:[o.jsx(Ys,{className:"h-3 w-3"}),t,o.jsx(Ia,{className:oe("h-3 w-3 transition-transform",s&&"rotate-180")})]}),s&&o.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?o.jsx("div",{className:"flex items-center justify-center py-4",children:o.jsx(va,{className:"h-4 w-4 animate-spin text-fg-4"})}):u?o.jsxs("div",{className:"max-h-64 overflow-y-auto py-1",children:[u.local.map(w=>o.jsxs("button",{type:"button",disabled:h!==null,onClick:()=>A(w),className:oe("flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors",w===t?"font-medium text-blue-600":"text-fg-2 hover:bg-elevated"),children:[w===t?o.jsx(oa,{className:"h-3 w-3 shrink-0"}):h===w?o.jsx(va,{className:"h-3 w-3 shrink-0 animate-spin"}):o.jsx("span",{className:"h-3 w-3 shrink-0"}),o.jsx("span",{className:"truncate",children:w})]},w)),u.remote.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mx-3 my-1 border-t border-line"}),o.jsx("div",{className:"px-3 py-1 text-[10px] font-medium uppercase tracking-wider text-fg-4",children:"Remote"}),u.remote.map(w=>o.jsxs("button",{type:"button",disabled:h!==null,onClick:()=>A(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===w?o.jsx(va,{className:"h-3 w-3 shrink-0 animate-spin"}):o.jsx("span",{className:"h-3 w-3 shrink-0"}),o.jsx("span",{className:"truncate",children:w})]},`remote-${w}`))]})]}):null,g&&o.jsx("div",{className:"border-t border-line px-3 py-2 text-xs text-red-500",children:g})]})]}):null}function JC(){const[e,t]=S.useState(null);return S.useEffect(()=>{const a=()=>fetch("/api/health").then(u=>u.json()).then(u=>{u.latestVersion&&u.latestVersion!=="0.9.6"&&t(u.latestVersion)}).catch(()=>{});a();const s=setInterval(a,30*6e4),l=()=>a();return window.addEventListener("focus",l),()=>{clearInterval(s),window.removeEventListener("focus",l)}},[]),e}function ew(){const e=Aa(),t=ca(),a=He(g=>g.repos),s=He(g=>g.activeRepoId),l=He(g=>g.setActiveRepo),u=Zm(g=>g.preference),d=Zm(g=>g.cycle),f=u==="light"?R3:u==="dark"?u3:l3,m=a.find(g=>g.id===s),h=JC(),x=g=>{var N;if(!g)return;l(g);const y=a.find(v=>v.id===g);if(!y)return;const T=((N=t.pathname.match(/\/(run|issues|pulls)/))==null?void 0:N[1])??"run";e(`/${encodeURIComponent(y.name)}/${T}`)};return o.jsx("header",{className:"shrink-0 border-b border-line bg-surface pt-[var(--safe-top)]",children:o.jsxs("div",{className:"flex h-12 items-center justify-between px-4",children:[o.jsxs("div",{className:"flex items-center gap-2.5",children:[o.jsx(Ph,{className:"h-5 w-5 text-blue-500"}),o.jsx("span",{className:"text-sm font-bold tracking-tight text-fg",children:"Fourth Spark"}),o.jsxs("span",{className:"rounded bg-elevated px-1.5 py-0.5 text-[10px] font-medium tabular-nums text-fg-4",children:["v","0.9.6"]}),h&&o.jsxs("span",{className:"text-[10px] text-amber-500",children:["→ v",h," 可用,运行 ",o.jsx("code",{className:"rounded bg-amber-500/10 px-1 font-mono",children:"fourth-spark upgrade"})," 更新"]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[a.length>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("select",{value:s??"",onChange:g=>x(g.target.value),className:"rounded-md border border-line bg-base px-2.5 py-1 text-xs text-fg-2 focus:border-blue-500 focus:outline-none",children:a.map(g=>o.jsx("option",{value:g.id,children:g.name},g.id))}),m&&s&&o.jsx(ZC,{repoId:s,currentBranch:m.branch})]}),o.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:o.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:o.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"})})}),o.jsx("button",{type:"button",onClick:d,"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:o.jsx(f,{className:"h-4 w-4"})})]})]})})}function tw(){const e=He(ja),t=Ec(s=>s.navCollapsed),a=Ec(s=>s.toggleNav);return o.jsxs("nav",{className:oe("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:[o.jsx("div",{className:"flex flex-1 flex-col",children:gy.map(s=>o.jsxs(Dh,{to:by(s.segment,s.global,e),title:t?s.label:void 0,className:({isActive:l})=>oe("mx-2 flex items-center rounded-md py-2 text-sm transition-colors",t?"justify-center px-2":"gap-2.5 px-3",l?"bg-blue-500/10 font-medium text-blue-600":"text-fg-3 hover:bg-elevated hover:text-fg"),children:[o.jsx(s.icon,{className:"h-4 w-4 shrink-0"}),o.jsx("span",{className:oe("truncate transition-[opacity,max-width] duration-200 ease-in-out",t?"max-w-0 opacity-0":"max-w-[8rem] opacity-100"),children:s.label})]},s.segment))}),o.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?o.jsx(fA,{className:"h-4 w-4"}):o.jsx(cA,{className:"h-4 w-4"})})]})}function nw(){const e=He(ja);return o.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:o.jsx("div",{className:"flex h-14 items-center justify-around",children:gy.map(t=>o.jsx(Dh,{to:by(t.segment,t.global,e),"aria-label":t.label,className:({isActive:a})=>oe("flex h-10 w-10 items-center justify-center rounded-md transition-colors",a?"bg-blue-500/10 text-blue-600":"text-fg-3 hover:bg-elevated hover:text-fg"),children:o.jsx(t.icon,{className:"h-5 w-5 shrink-0"})},t.segment))})})}function aw(){return o.jsxs("div",{className:"flex h-full flex-col overflow-hidden bg-base text-fg",children:[o.jsx(ew,{}),o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsx(tw,{}),o.jsx("main",{className:"flex min-w-0 flex-1 flex-col overflow-hidden pb-[calc(3.5rem_+_var(--safe-bottom))] md:pb-0",children:o.jsx(tS,{})})]}),o.jsx(nw,{})]})}let rw=0;const Ft=Za(e=>({toasts:[],addToast:(t,a="info",s,l)=>{const u=(l==null?void 0:l.id)??`toast-${++rw}-${Date.now()}`;e(d=>d.toasts.some(f=>f.id===u)?d:{toasts:[...d.toasts,{id:u,message:t,variant:a,sessionId:s,persistent:l==null?void 0:l.persistent}]}),l!=null&&l.persistent||setTimeout(()=>{e(d=>({toasts:d.toasts.filter(f=>f.id!==u)}))},4e3)},removeToast:t=>{e(a=>({toasts:a.toasts.filter(s=>s.id!==t)}))}}));function sw({onClose:e}){const[t,a]=S.useState(""),[s,l]=S.useState(""),[u,d]=S.useState(""),[f,m]=S.useState("opencode"),[h,x]=S.useState(!1),[g,y]=S.useState(""),T=He(C=>C.addRepo),N=s.trim()!==""&&u.trim()!==""&&t.trim()!==""&&!h,v=async C=>{const R=C.trim();if(R){x(!0),y("");try{const U=await K3(R);U.name&&!s.trim()&&l(U.name),U.gitUrl&&!u.trim()&&d(U.gitUrl)}catch(U){const V=U instanceof Error?U.message:"无法解析路径";try{const L=JSON.parse(V);y(L.error??V)}catch{y(V)}}x(!1)}},A=S.useRef(v);A.current=v,S.useEffect(()=>{const C=t.trim();if(!C)return;const R=setTimeout(()=>{A.current(C)},500);return()=>clearTimeout(R)},[t]);const w=async()=>{if(!N)return;y(""),await T(s.trim(),u.trim(),t.trim(),f)&&e()};return o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:e,children:o.jsxs("div",{className:"w-full max-w-md rounded-xl border border-line bg-surface p-6 shadow-2xl",onClick:C=>C.stopPropagation(),children:[o.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[o.jsx("h2",{className:"text-base font-semibold text-fg",children:"添加仓库"}),o.jsx("button",{type:"button",onClick:e,className:"rounded-md p-1 text-fg-4 hover:bg-elevated hover:text-fg-2",children:o.jsx(gt,{className:"h-4 w-4"})})]}),o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"flex flex-col gap-1.5",children:[o.jsx("label",{htmlFor:"m-path",className:"text-xs font-medium text-fg-3",children:"本地路径"}),o.jsx("input",{id:"m-path",value:t,onChange:C=>a(C.target.value),onBlur:C=>void v(C.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"}),o.jsx("span",{className:"text-[11px] text-fg-5",children:h?"正在读取 Git 信息…":"输入路径后自动读取仓库信息"})]}),o.jsxs("div",{className:"flex flex-col gap-1.5",children:[o.jsx("label",{htmlFor:"m-name",className:"text-xs font-medium text-fg-3",children:"名称"}),o.jsx("input",{id:"m-name",value:s,onChange:C=>l(C.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"})]}),o.jsxs("div",{className:"flex flex-col gap-1.5",children:[o.jsx("label",{htmlFor:"m-git",className:"text-xs font-medium text-fg-3",children:"Git 远程地址"}),o.jsx("input",{id:"m-git",value:u,onChange:C=>d(C.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"})]}),o.jsxs("div",{className:"flex flex-col gap-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-fg-3",children:"运行时"}),o.jsx("div",{className:"flex gap-2",children:[{value:"opencode",label:"OpenCode"},{value:"claude-code",label:"Claude Code"}].map(C=>o.jsx("button",{type:"button",onClick:()=>m(C.value),className:`flex-1 rounded-lg border px-3 py-2 text-sm font-medium transition-colors ${f===C.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:C.label},C.value))}),o.jsx("span",{className:"text-[11px] text-fg-5",children:f==="claude-code"?"需要本地安装 Claude Code CLI":"需要本地安装 OpenCode CLI"})]}),g&&o.jsx("p",{className:"rounded-md bg-red-500/10 px-3 py-2 text-xs text-red-500",children:g}),o.jsxs("div",{className:"mt-1 flex items-center justify-end gap-2",children:[o.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:"取消"}),o.jsx("button",{type:"button",onClick:w,disabled:!N,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 iw({repoId:e,repoName:t,onClose:a}){const[s,l]=S.useState(""),[u,d]=S.useState(""),[f,m]=S.useState(!0),[h,x]=S.useState(!1),[g,y]=S.useState(null);S.useEffect(()=>{zC(e).then(v=>{l(v.content),d(v.content),m(!1)}).catch(v=>{y(v instanceof Error?v.message:String(v)),m(!1)})},[e]);const T=async()=>{x(!0),y(null);try{await qC(e,s),d(s)}catch(v){y(v instanceof Error?v.message:String(v))}x(!1)},N=s!==u;return o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:a,children:o.jsxs("div",{className:"flex w-full max-w-2xl flex-col rounded-xl border border-line bg-surface p-6 shadow-2xl",onClick:v=>v.stopPropagation(),children:[o.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("h2",{className:"text-base font-semibold text-fg",children:[t," — AGENTS.md"]}),o.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"仅对此仓库生效,修改后 opencode 热加载即时生效。"})]}),o.jsx("button",{type:"button",onClick:a,className:"shrink-0 rounded-md p-1 text-fg-4 hover:bg-elevated hover:text-fg-2",children:o.jsx(gt,{className:"h-4 w-4"})})]}),g&&o.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:[o.jsx(An,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),o.jsx("span",{className:"min-w-0 break-words",children:g})]}),f?o.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-16 text-fg-5",children:[o.jsx(va,{className:"h-5 w-5 fs-spin"}),o.jsx("p",{className:"text-xs",children:"加载中…"})]}):o.jsx("textarea",{value:s,onChange:v=>l(v.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
451
+
452
+ 在此编写该仓库的 Agent 指令…`}),o.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2",children:[o.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:"关闭"}),o.jsxs("button",{type:"button",onClick:()=>void T(),disabled:h||!N,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:[o.jsx(Fc,{className:"h-3.5 w-3.5"}),h?"保存中…":"保存"]})]})]})})}const nh=1024,ah=nh*1024,Nx=ah*1024;function vx(e){return!e||e<=0?"0 B":e<nh?`${e} B`:e<ah?`${(e/nh).toFixed(1)} KB`:e<Nx?`${(e/ah).toFixed(1)} MB`:`${(e/Nx).toFixed(2)} GB`}const xm="ws/";function lw({repoId:e}){const[t,a]=S.useState(!1),[s,l]=S.useState(null),[u,d]=S.useState(!1),[f,m]=S.useState(null),[h,x]=S.useState(null),[g,y]=S.useState(!1),T=async()=>{d(!0),m(null);try{const C=await eC(e);l(C)}catch(C){m(C instanceof Xa?C.message:"加载失败")}d(!1)};S.useEffect(()=>{t&&s===null&&T()},[t]);const N=async C=>{x(C);try{await tC(e,C),await T()}catch(R){m(R instanceof Xa?R.message:"删除失败")}x(null)},v=async()=>{y(!0);try{await nC(e),await T()}catch(C){m(C instanceof Xa?C.message:"清理失败")}y(!1)},A=(s==null?void 0:s.length)??0,w=(s==null?void 0:s.reduce((C,R)=>C+(R.diskUsage||0),0))??0;return o.jsxs("div",{className:"mt-3 border-t border-line pt-3",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("button",{type:"button",onClick:()=>a(C=>!C),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?o.jsx(oA,{className:"h-3 w-3 shrink-0"}):o.jsx(Ia,{className:"h-3 w-3 shrink-0"}),o.jsx(Ys,{className:"h-3 w-3 shrink-0 text-fg-5"}),o.jsx("span",{children:"工作空间"}),s!==null&&o.jsxs("span",{className:"text-fg-5",children:["(",A,") · ",vx(w)]})]}),t&&A>0&&o.jsxs("button",{type:"button",onClick:()=>void v(),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?o.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):null,"清理已合并"]})]}),t&&o.jsxs("div",{className:"mt-2",children:[f&&o.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:[o.jsx("span",{className:"truncate",children:f}),o.jsx("button",{type:"button",onClick:()=>m(null),className:"shrink-0 rounded p-0.5 transition-colors hover:bg-red-500/10",children:o.jsx(gt,{className:"h-3 w-3"})})]}),u&&s===null?o.jsx("div",{className:"flex justify-center py-3",children:o.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-fg-5 border-t-transparent"})}):A===0?o.jsx("p",{className:"py-2 text-center text-xs text-fg-5",children:"暂无工作空间"}):o.jsx("ul",{className:"space-y-1",children:s==null?void 0:s.map(C=>{const R=C.branch.startsWith(xm),U=R?C.branch.slice(xm.length):C.branch,V=C.status==="active"?"bg-emerald-500/10 text-emerald-600":C.status==="idle"?"bg-amber-500/10 text-amber-600":"bg-fg-6/30 text-fg-4",L=C.status==="active"?"活跃":C.status==="idle"?"空闲":C.status==="merged"?"已合并":C.status==="stale"?"陈旧":C.status,z=C.status!=="active";return o.jsxs("li",{className:"flex items-center gap-2 rounded-md border border-line bg-elevated/40 px-2 py-1.5 text-xs",children:[o.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[C.running&&C.port&&o.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-emerald-500",title:`运行中 :${C.port}`}),o.jsxs("span",{className:"min-w-0 truncate font-mono",children:[R&&o.jsx("span",{className:"text-fg-5",children:xm}),o.jsx("span",{className:"text-fg-2",children:U})]})]}),o.jsx("span",{className:oe("shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-medium",V),children:L}),o.jsxs("span",{className:"flex shrink-0 items-center gap-0.5 text-fg-5",children:[o.jsx(HA,{className:"h-2.5 w-2.5"}),vx(C.diskUsage)]}),o.jsx("button",{type:"button",onClick:()=>void N(C.id),disabled:!z||h===C.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===C.id?o.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):o.jsx(zs,{className:"h-3 w-3"})})]},C.id)})})]})]})}function ow(){const e=He(C=>C.repos),t=He(C=>C.activeRepoId),a=He(C=>C.setActiveRepo),s=He(C=>C.removeRepo),l=He(C=>C.loadRepos),[u,d]=S.useState(!1),[f,m]=S.useState(null),[h,x]=S.useState(null),[g,y]=S.useState(null),T=Ft(C=>C.addToast),[N,v]=S.useState(null),A=async(C,R)=>{x(C);try{R?await X3(C):await Q3(C),await l()}catch{}x(null)},w=async C=>{y(C);try{const R=await J3(C);await l();const U=R.alreadyUpToDate?"info":"success";T(R.summary,U,void 0,{persistent:!0})}catch(R){let U="拉取失败";if(R instanceof Xa)try{U=JSON.parse(R.message).error??R.message}catch{U=R.message}T(U,"error",void 0,{persistent:!0})}y(null)};return o.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[o.jsxs("div",{className:"mx-auto max-w-4xl",children:[o.jsxs("div",{className:"mb-6 flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h1",{className:"text-lg font-semibold text-fg",children:"仓库管理"}),o.jsx("p",{className:"mt-0.5 text-sm text-fg-4",children:"管理代码仓库,每个仓库对应一个独立的 Agent 运行环境"})]}),o.jsxs("button",{type:"button",onClick:()=>d(!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:[o.jsx(Wa,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden md:inline",children:"添加仓库"})]})]}),e.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-dashed border-line-hard py-16 text-center",children:[o.jsx("div",{className:"rounded-full bg-elevated p-3",children:o.jsx(Wa,{className:"h-6 w-6 text-fg-4"})}),o.jsx("p",{className:"text-sm font-medium text-fg-3",children:"暂无代码仓库"}),o.jsx("p",{className:"text-xs text-fg-5",children:"添加一个本地仓库开始使用"}),o.jsx("button",{type:"button",onClick:()=>d(!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:"添加仓库"})]}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:e.map(C=>{const R=C.id===t;return o.jsxs("div",{className:oe("rounded-xl border p-4 transition-colors",R?"border-blue-500/40 bg-blue-500/5":"border-line"),children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("button",{type:"button",onClick:()=>a(C.id),className:"flex min-w-0 items-center gap-2 text-left",children:[R?o.jsx(mo,{className:"h-4 w-4 shrink-0 text-blue-500"}):o.jsx(bA,{className:"h-4 w-4 shrink-0 text-fg-5"}),o.jsx("span",{className:oe("truncate font-medium",R?"text-fg":"text-fg-2"),children:C.name})]}),o.jsxs("span",{className:oe("inline-flex shrink-0 items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium",C.running?"bg-emerald-500/10 text-emerald-600":"bg-fg-6/30 text-fg-4"),children:[o.jsx("span",{className:oe("h-1.5 w-1.5 rounded-full",C.running?"bg-emerald-500":"bg-fg-5")}),C.running?"运行中":"已停止"]})]}),o.jsxs("dl",{className:"mt-3 space-y-1 font-mono text-xs text-fg-4",children:[o.jsxs("div",{className:"flex gap-2",children:[o.jsx("dt",{className:"shrink-0 text-fg-5",children:"Git"}),o.jsx("dd",{className:"min-w-0 truncate",children:C.gitUrl})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("dt",{className:"shrink-0 text-fg-5",children:"路径"}),o.jsxs("dd",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx("span",{className:"truncate",children:C.localPath}),o.jsx("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(C.localPath),title:"复制路径",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:text-fg-3",children:o.jsx(hc,{className:"h-3 w-3"})})]})]}),C.running&&C.port&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("dt",{className:"shrink-0 text-fg-5",children:"直连"}),o.jsxs("dd",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsxs("a",{href:`http://127.0.0.1:${C.port}`,target:"_blank",rel:"noopener noreferrer",className:"truncate text-blue-500 hover:underline",children:["127.0.0.1:",C.port]}),o.jsx("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(`http://127.0.0.1:${C.port}`),title:"复制链接",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:text-fg-3",children:o.jsx(hc,{className:"h-3 w-3"})})]})]})]}),o.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:async()=>{const U=C.runtimeType==="claude-code"?"opencode":"claude-code";await rC(C.id,U),l()},className:oe("flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-md border px-2.5 text-xs font-medium transition-colors",C.runtimeType==="claude-code"?"border-orange-500/30 text-orange-600 hover:bg-orange-500/10":"border-sky-500/30 text-sky-600 hover:bg-sky-500/10"),title:`当前运行时: ${C.runtimeType==="claude-code"?"Claude Code":"OpenCode"},点击切换`,children:C.runtimeType==="claude-code"?"Claude":"OpenCode"}),o.jsxs("button",{type:"button",onClick:async()=>{await aC(C.id,!C.worktreeEnabled),l()},className:oe("flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-md border px-2.5 text-xs font-medium transition-colors",C.worktreeEnabled?"border-violet-500/30 text-violet-600 hover:bg-violet-500/10":"border-line text-fg-4 hover:bg-elevated hover:text-fg-2"),title:C.worktreeEnabled?"Worktree 已开启":"Worktree 已关闭",children:[o.jsx(Ys,{className:"h-3 w-3"}),"Worktree"]}),o.jsxs("button",{type:"button",onClick:()=>v({id:C.id,name:C.name}),className:"flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-md border border-line px-2.5 text-xs font-medium text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:[o.jsx(XE,{className:"h-3 w-3"}),"配置"]}),o.jsx("button",{type:"button",onClick:()=>void w(C.id),disabled:g===C.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===C.id?o.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):o.jsxs(o.Fragment,{children:[o.jsx($S,{className:"h-3 w-3"}),"拉取"]})}),o.jsx("button",{type:"button",onClick:()=>void A(C.id,C.running),disabled:h===C.id,className:oe("flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md border text-xs font-medium transition-colors disabled:opacity-50",C.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===C.id?o.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):C.running?o.jsxs(o.Fragment,{children:[o.jsx(Wm,{className:"h-3 w-3 fill-current"}),"停止"]}):o.jsxs(o.Fragment,{children:[o.jsx(Hc,{className:"h-3 w-3 fill-current"}),"启动"]})}),f===C.id?o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",onClick:()=>{s(C.id),m(null)},className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-red-500/30 text-red-500 transition-colors hover:bg-red-500/10",children:o.jsx(oa,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:()=>m(null),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",children:o.jsx(gt,{className:"h-3.5 w-3.5"})})]}):o.jsx("button",{type:"button",onClick:()=>m(C.id),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-line text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-500",children:o.jsx(zs,{className:"h-3.5 w-3.5"})})]}),C.worktreeEnabled&&o.jsx(lw,{repoId:C.id})]},C.id)})})}),o.jsxs("p",{className:"mt-3 text-xs text-fg-5",children:[e.length," 个仓库"]})]}),u&&o.jsx(sw,{onClose:()=>d(!1)}),N&&o.jsx(iw,{repoId:N.id,repoName:N.name,onClose:()=>v(null)})]})}const uw=new Set(["tool","tool-use","tool_use","tool-call","tool_call","tool-result","tool_result"]),cw=new Set(["thinking","reasoning","reason"]),dw=new Set(["text","output_text","message"]),fw=new Set(["file","image"]);function yc(e){var a;const t=((a=e.type)==null?void 0:a.toLowerCase())??"";return uw.has(t)||e.toolName!=null||e.tool!=null?"tool":fw.has(t)?"file":cw.has(t)?"thinking":dw.has(t)||e.content!=null||e.text!=null?"text":"other"}function Tc(e){return e.content??e.text??""}function xy(e){return e.toolName??e.tool??"tool"}function Yc(e){var t;return e.input??((t=e.state)==null?void 0:t.input)}function Uh(e){var t;return e.output??((t=e.state)==null?void 0:t.output)}function Hh(e){var a,s,l;const t=(s=(a=e.state)==null?void 0:a.status)==null?void 0:s.toLowerCase();return t==="completed"||t==="done"||t==="success"?"completed":t==="error"||t==="failed"||((l=e.state)==null?void 0:l.error)!=null?"error":t==="pending"||t==="queued"?"pending":t==="running"||t==="in_progress"?"running":Uh(e)!=null?"completed":"running"}function Sx(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Pi(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 mw(e){return e.filter(t=>Pi(t.status)==="completed").length}function po(e){const t=xy(e).toLowerCase();return t==="question"||t==="mcp_question"}function hw(e){const t=Yc(e);if(!t||typeof t!="object")return null;const a=t;return Array.isArray(a.questions)?a.questions:null}function _c(e){if(!po(e))return!1;const t=Hh(e);return t==="pending"||t==="running"}const pw=/\bses_[a-zA-Z0-9]+/;function gw(e){var l;const t=Yc(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=(l=e.state)==null?void 0:l.metadata;if(a){const u=a.session_id??a.sessionId;if(typeof u=="string"&&u.startsWith("ses_"))return u}const s=Uh(e);if(typeof s=="string"){const u=pw.exec(s);if(u)return u[0]}if(s&&typeof s=="object"){const u=s,d=u.session_id??u.sessionId??u.task_id;if(typeof d=="string"&&d.startsWith("ses_"))return d}return null}const bw=["Sisyphus","Prometheus","Atlas"];function xw(e){const t=(e.name||e.id||"").toLowerCase();return bw.some(a=>t.startsWith(a.toLowerCase()))}const Ew=Za(e=>({agents:[],loaded:!1,loadAgents:async()=>{const t=He.getState().activeRepoId;if(!t){e({agents:[],loaded:!0});return}try{const a=await EC(t);e({agents:a.filter(xw),loaded:!0})}catch{e({loaded:!0})}}}));function Ey(e){return`question-${e}`}function Em(e,t){const a=t.find(l=>l.id===e),s=(a==null?void 0:a.title)||e.slice(-8);Ft.getState().addToast(`${s} — 等待回复`,"warning",e,{id:Ey(e),persistent:!0})}function yw(e){var t;for(const a of e)if((t=a.parts)!=null&&t.some(s=>po(s)&&_c(s)))return!0;return!1}const go=[],Nc=[],Ax=[],Ds={};function Cx(e){return e.id??e.callID}function Mn(){return He.getState().activeRepoId}const Ie=Za((e,t)=>({sessions:[],activeSessionId:null,messages:{},todos:{},sessionStatuses:{},errorReasons:{},queuedMessageIds:{},sessionLinks:{},allSessionLinks:{},sessionFilter:"all",loadingSessions:!1,loadError:null,sendError:null,setSessionFilter:a=>e({sessionFilter:a}),toggleSessionComplete:async a=>{const s=Mn();if(!s)return;const l=t().sessions.find(d=>d.id===a);if(!l)return;const u=l.completedAt?null:Date.now();e(d=>({sessions:d.sessions.map(f=>f.id===a?{...f,completedAt:u??void 0}:f)}));try{await UC(s,a,u)}catch{await t().loadSessions()}},loadSessions:async()=>{const a=Mn();if(!a){e({sessions:[],loadingSessions:!1});return}e({loadingSessions:!0,loadError:null});try{const[s,l]=await Promise.all([sC(a),hx(a).catch(()=>null)]),u={sessions:s,loadingSessions:!1};l&&(u.allSessionLinks=l),e(u)}catch(s){e({loadingSessions:!1,loadError:s instanceof Error?s.message:"Failed to load sessions"})}},createSession:async(a,s,l,u,d,f,m)=>{const h=Mn();if(!h)return null;e({sendError:null});try{const x=await iC(h,a,s,l,u,d,f,m);return e(g=>({sessions:[x,...g.sessions.filter(y=>y.id!==x.id)],activeSessionId:x.id,messages:{...g.messages,[x.id]:[]}})),t().setSessionStatus(x.id,"busy"),x}catch(x){return e({sendError:x instanceof Error?x.message:"Failed to create session"}),null}},setActiveSession:async a=>{Mn()&&(e({activeSessionId:a,sendError:null}),await t().refreshSessionData(a))},refreshSessionData:async a=>{var x;const s=Mn();if(!s)return;const[l,u,d,f,m]=await Promise.allSettled([pC(s,a),gC(s,a),ly(s,a),lC(s,a),mx(s,a)]),h=f.status==="fulfilled"?(x=f.value.revert)==null?void 0:x.messageID:void 0;e(g=>{const y={};if(l.status==="fulfilled"){let T=l.value;if(h){const N=T.findIndex(v=>v.id===h);N>=0&&(T=T.slice(0,N+1))}y.messages={...g.messages,[a]:T}}if(u.status==="fulfilled"&&(y.todos={...g.todos,[a]:u.value}),d.status==="fulfilled"&&(y.sessionStatuses={...g.sessionStatuses,[a]:d.value.type}),f.status==="fulfilled"){const T=f.value;y.sessions=g.sessions.map(N=>N.id===a?{...N,...T}:N)}return m.status==="fulfilled"&&(y.sessionLinks={...g.sessionLinks,[a]:m.value}),y}),l.status==="fulfilled"&&yw(l.value)&&Em(a,t().sessions)},refreshSessionLinks:async a=>{const s=Mn();if(s)try{const[l,u]=await Promise.all([mx(s,a),hx(s).catch(()=>null)]);e(d=>{const f={sessionLinks:{...d.sessionLinks,[a]:l}};return u&&(f.allSessionLinks=u),f})}catch{}},addLink:async(a,s,l)=>{const u=Mn();if(!u)return!1;try{return await bC(u,a,s,l),await t().refreshSessionLinks(a),!0}catch{return!1}},removeLink:async(a,s,l)=>{const u=Mn();if(!u)return!1;try{return await xC(u,a,s,l),await t().refreshSessionLinks(a),!0}catch{return!1}},deleteSession:async a=>{const s=Mn();if(s)try{await oC(s,a)}catch{}delete Ds[a],e(l=>{const{[a]:u,...d}=l.messages,{[a]:f,...m}=l.todos,{[a]:h,...x}=l.sessionStatuses,{[a]:g,...y}=l.errorReasons,{[a]:T,...N}=l.queuedMessageIds,{[a]:v,...A}=l.sessionLinks,{[a]:w,...C}=l.allSessionLinks;return{sessions:l.sessions.filter(R=>R.id!==a),messages:d,todos:m,sessionStatuses:x,errorReasons:y,queuedMessageIds:N,sessionLinks:A,allSessionLinks:C,activeSessionId:l.activeSessionId===a?null:l.activeSessionId}})},sendMessage:async(a,s,l)=>{const u=Mn(),d=t().activeSessionId;if(!u||!d)return!1;const f=t().sessions.find(h=>h.id===d),m=t().sessionStatuses[d]==="busy";e({sendError:null}),m||t().setSessionStatus(d,"busy");try{const h=Ew.getState(),x=f!=null&&f.agent&&h.loaded&&h.agents.some(g=>g.name===f.agent||g.id===f.agent)?f.agent:void 0;return await uC(u,d,a,x,s,l),m&&(Ds[d]=(Ds[d]||0)+1),!0}catch(h){return e({sendError:h instanceof Error?h.message:"Failed to send message"}),m||t().setSessionStatus(d,"idle"),!1}},replyQuestion:async a=>{const s=Mn(),l=t().activeSessionId;if(!(!s||!l))try{await dC(s,l,a)}catch(u){e({sendError:u instanceof Error?u.message:"Failed to reply to question"})}},rejectQuestion:async()=>{const a=Mn(),s=t().activeSessionId;if(!(!a||!s))try{await fC(a,s)}catch{}},abortSession:async()=>{const a=Mn(),s=t().activeSessionId;if(!(!a||!s)){try{await cC(a,s)}catch{}t().setSessionStatus(s,"idle")}},clearSessions:()=>{for(const a of Object.keys(Ds))delete Ds[a];e({sessions:[],activeSessionId:null,messages:{},todos:{},sessionStatuses:{},errorReasons:{},queuedMessageIds:{},sessionLinks:{},allSessionLinks:{},loadError:null,sendError:null})},updateMessage:(a,s)=>{var l;e(u=>{const d=u.messages[a]??[],f=d.findIndex(x=>x.id===s.id);let m,h=u.queuedMessageIds;if(f>=0){const x={...d[f],...s};(!s.parts||s.parts.length===0)&&d[f].parts&&(x.parts=d[f].parts),m=[...d],m[f]=x}else{m=[...d,s];const x=Ds[a]||0;if(s.role==="user"&&x>0){const g=[...h[a]??[]];g.push(s.id),h={...h,[a]:g},Ds[a]=x-1}else if(s.role==="assistant"){const g=h[a];g&&g.length>0&&(h={...h,[a]:g.slice(1)})}}return{messages:{...u.messages,[a]:m},queuedMessageIds:h}}),(l=s.parts)!=null&&l.some(u=>po(u)&&_c(u))&&Em(a,t().sessions)},updateMessagePart:(a,s,l)=>{e(u=>{const d=u.messages[a]??[],f=d.findIndex(N=>N.id===s),m=f>=0?d[f]:{id:s,role:"assistant"},h=m.parts?[...m.parts]:[],x=Cx(l),g=x!=null?h.findIndex(N=>Cx(N)===x):-1;g>=0?h[g]={...h[g],...l}:h.push(l);const y={...m,parts:h},T=f>=0?[...d]:[...d,y];return f>=0&&(T[f]=y),{messages:{...u.messages,[a]:T}}}),po(l)&&_c(l)&&Em(a,t().sessions)},appendMessagePartDelta:(a,s,l,u)=>{e(d=>{const f=d.messages[a]??[],m=f.findIndex(N=>N.id===s),h=m>=0?f[m]:{id:s,role:"assistant"},x=h.parts?[...h.parts]:[],g=x.findIndex(N=>N.id===l);if(g>=0){const N=x[g],v=Tc(N)+u;x[g]=N.content!=null?{...N,content:v}:{...N,text:v}}else x.push({id:l,type:"text",text:u});const y={...h,parts:x},T=m>=0?[...f]:[...f,y];return m>=0&&(T[m]=y),{messages:{...d.messages,[a]:T}}})},updateTodos:(a,s)=>{e(l=>({todos:{...l.todos,[a]:s}}))},updateSessionInfo:a=>{e(s=>s.sessions.some(u=>u.id===a.id)?{sessions:s.sessions.map(u=>u.id===a.id?{...u,...a}:u)}:{sessions:[a,...s.sessions]})},setSessionStatus:(a,s,l)=>{const u=t().sessionStatuses[a];if(u!==s){const d=t().sessions.find(m=>m.id===a),f=(d==null?void 0:d.title)||a.slice(-8);if(s==="idle"&&u!==void 0&&u!=="idle")Ft.getState().removeToast(Ey(a)),Ft.getState().addToast(`${f} — 完成`,"success",a);else if(s==="busy"&&(u===void 0||u==="idle"))Ft.getState().addToast(`${f} — 开始运行`,"info",a);else if(s==="retry")Ft.getState().addToast(`${f} — 进入重试`,"warning",a);else if(s==="error"){const m=l?`${f} — 错误: ${l}`:`${f} — 发生错误`;Ft.getState().addToast(m,"error",a)}}e(d=>{const f=l?{...d.errorReasons,[a]:l}:s!=="error"?(()=>{const{[a]:m,...h}=d.errorReasons;return h})():d.errorReasons;return{sessionStatuses:{...d.sessionStatuses,[a]:s},errorReasons:f}})},bulkSetStatuses:a=>{e({sessionStatuses:{...t().sessionStatuses,...a}})},renameSession:async(a,s)=>{const l=Mn();if(l){e(u=>({sessions:u.sessions.map(d=>d.id===a?{...d,title:s}:d)}));try{await PC(l,a,s)}catch{await t().loadSessions()}}},revertToMessage:async(a,s)=>{const l=Mn();if(!l)return!1;try{return await mC(l,a,s),await t().refreshSessionData(a),!0}catch{return!1}}})),Ge=Za((e,t)=>({issues:[],tags:[],tagFilterMode:new Map,milestones:[],selectedMilestoneId:null,loaded:!1,syncing:!1,selectedIssueId:null,previewIssueId:null,matchingParentId:null,matchingCandidateId:null,pendingDraft:null,clearIssues:()=>e({issues:[],tags:[],tagFilterMode:new Map,milestones:[],selectedMilestoneId:null,loaded:!1,selectedIssueId:null,previewIssueId:null,matchingParentId:null,matchingCandidateId:null,pendingDraft:null}),setSelectedIssue:a=>e({selectedIssueId:a}),setPreviewIssue:a=>e({previewIssueId:a}),setPendingDraft:a=>e({pendingDraft:a}),enterMatchMode:a=>e({matchingParentId:a,matchingCandidateId:null,previewIssueId:null}),exitMatchMode:()=>{const a=t().matchingParentId;e({matchingParentId:null,matchingCandidateId:null,previewIssueId:a})},setMatchCandidate:a=>e({matchingCandidateId:a}),linkChild:async(a,s)=>{var u;const l=He.getState().activeRepoId;if(!l)return!1;try{await kC(l,a,s);const d=(u=t().issues.find(f=>f.number===a))==null?void 0:u.id;return d&&e(f=>({issues:f.issues.map(m=>m.number===s?{...m,parentId:d}:m),matchingCandidateId:null})),!0}catch{return!1}},updateIssueState:async(a,s)=>{const l=He.getState().activeRepoId;if(!l)return!1;try{const u=await fy(l,a,{state:s});return e(d=>({issues:d.issues.map(f=>f.number===a?{...f,state:u.state}:f)})),!0}catch{return!1}},loadIssues:async()=>{const a=He.getState().activeRepoId;if(!a){e({issues:[],loaded:!0});return}try{const s=await xx(a,"all");e({issues:s,loaded:!0})}catch{e({loaded:!0})}},syncIssues:async()=>{const a=He.getState().activeRepoId;if(a){e({syncing:!0});try{await CC(a);const[s,l,u]=await Promise.all([xx(a,"all"),gx(a),bx(a)]);e({issues:s,tags:l,milestones:u,syncing:!1})}catch(s){e({syncing:!1});let l="同步 Issue 失败";if(s instanceof Xa)try{const u=JSON.parse(s.message);u.error&&(l=u.error)}catch{s.message&&(l=s.message)}Ft.getState().addToast(l,"error")}}},createIssue:async(a,s)=>{const l=He.getState().activeRepoId;if(!l)return null;try{const u=await wC(l,a,s);return e(d=>({issues:[u,...d.issues]})),u}catch{return null}},loadTags:async()=>{const a=He.getState().activeRepoId;if(!a){e({tags:[]});return}try{const s=await gx(a);e({tags:s})}catch{}},cycleTagFilter:a=>{e(s=>{const l=new Map(s.tagFilterMode),u=l.get(a);return u?u==="include"?l.set(a,"exclude"):l.delete(a):l.set(a,"include"),{tagFilterMode:l}})},clearTagFilter:()=>e({tagFilterMode:new Map}),loadMilestones:async()=>{const a=He.getState().activeRepoId;if(!a){e({milestones:[]});return}try{const s=await bx(a);e({milestones:s})}catch{}},setMilestoneFilter:a=>e({selectedMilestoneId:a})})),oc=Za(e=>({drafts:{},setDraft:(t,a)=>e(s=>{if(!a.trim()){const{[t]:l,...u}=s.drafts;return{drafts:u}}return{drafts:{...s.drafts,[t]:a}}}),clearDraft:t=>e(a=>{const{[t]:s,...l}=a.drafts;return{drafts:l}})}));function wx(e){const t=[],a=String(e||"");let s=a.indexOf(","),l=0,u=!1;for(;!u;){s===-1&&(s=a.length,u=!0);const d=a.slice(l,s).trim();(d||!u)&&t.push(d),l=s+1,s=a.indexOf(",",l)}return t}function yy(e,t){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const Tw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_w=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nw={};function kx(e,t){return(Nw.jsx?_w:Tw).test(e)}const vw=/[ \t\n\f\r]/g;function Sw(e){return typeof e=="object"?e.type==="text"?Rx(e.value):!1:Rx(e)}function Rx(e){return e.replace(vw,"")===""}class No{constructor(t,a,s){this.normal=a,this.property=t,s&&(this.space=s)}}No.prototype.normal={};No.prototype.property={};No.prototype.space=void 0;function Ty(e,t){const a={},s={};for(const l of e)Object.assign(a,l.property),Object.assign(s,l.normal);return new No(a,s,t)}function bo(e){return e.toLowerCase()}class Qn{constructor(t,a){this.attribute=a,this.property=t}}Qn.prototype.attribute="";Qn.prototype.booleanish=!1;Qn.prototype.boolean=!1;Qn.prototype.commaOrSpaceSeparated=!1;Qn.prototype.commaSeparated=!1;Qn.prototype.defined=!1;Qn.prototype.mustUseProperty=!1;Qn.prototype.number=!1;Qn.prototype.overloadedBoolean=!1;Qn.prototype.property="";Qn.prototype.spaceSeparated=!1;Qn.prototype.space=void 0;let Aw=0;const Ve=$s(),sn=$s(),rh=$s(),Ee=$s(),kt=$s(),Us=$s(),ia=$s();function $s(){return 2**++Aw}const sh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ve,booleanish:sn,commaOrSpaceSeparated:ia,commaSeparated:Us,number:Ee,overloadedBoolean:rh,spaceSeparated:kt},Symbol.toStringTag,{value:"Module"})),ym=Object.keys(sh);class Fh extends Qn{constructor(t,a,s,l){let u=-1;if(super(t,a),Ox(this,"space",l),typeof s=="number")for(;++u<ym.length;){const d=ym[u];Ox(this,ym[u],(s&sh[d])===sh[d])}}}Fh.prototype.defined=!0;function Ox(e,t,a){a&&(e[t]=a)}function Gi(e){const t={},a={};for(const[s,l]of Object.entries(e.properties)){const u=new Fh(s,e.transform(e.attributes||{},s),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(u.mustUseProperty=!0),t[s]=u,a[bo(s)]=s,a[bo(u.attribute)]=s}return new No(t,a,e.space)}const _y=Gi({properties:{ariaActiveDescendant:null,ariaAtomic:sn,ariaAutoComplete:null,ariaBusy:sn,ariaChecked:sn,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:kt,ariaCurrent:null,ariaDescribedBy:kt,ariaDetails:null,ariaDisabled:sn,ariaDropEffect:kt,ariaErrorMessage:null,ariaExpanded:sn,ariaFlowTo:kt,ariaGrabbed:sn,ariaHasPopup:null,ariaHidden:sn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kt,ariaLevel:Ee,ariaLive:null,ariaModal:sn,ariaMultiLine:sn,ariaMultiSelectable:sn,ariaOrientation:null,ariaOwns:kt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:sn,ariaReadOnly:sn,ariaRelevant:null,ariaRequired:sn,ariaRoleDescription:kt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:sn,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ny(e,t){return t in e?e[t]:t}function vy(e,t){return Ny(e,t.toLowerCase())}const Cw=Gi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Us,acceptCharset:kt,accessKey:kt,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alpha:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:kt,autoFocus:Ve,autoPlay:Ve,blocking:kt,capture:null,charSet:null,checked:Ve,cite:null,className:kt,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:sn,controls:Ve,controlsList:kt,coords:Ee|Us,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:rh,draggable:sn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:kt,height:Ee,hidden:rh,high:Ee,href:null,hrefLang:null,htmlFor:kt,httpEquiv:kt,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:kt,itemRef:kt,itemScope:Ve,itemType:kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,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:Ve,optimum:Ee,pattern:null,ping:kt,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:kt,required:Ve,reversed:Ve,rows:Ee,rowSpan:Ee,sandbox:kt,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootCustomElementRegistry:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shadowRootSerializable:Ve,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:sn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:sn,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:sn,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ve,disablePictureInPicture:Ve,disableRemotePlayback:Ve,exportParts:Us,part:kt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:vy}),ww=Gi({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:ia,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:kt,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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,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:Us,g2:Us,glyphName:Us,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:ia,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,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:Ee,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:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ia,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ia,rev:ia,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ia,requiredFeatures:ia,requiredFonts:ia,requiredFormats:ia,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:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:ia,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ia,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ia,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ny}),Sy=Gi({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()}}),Ay=Gi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vy}),Cy=Gi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),kw={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"},Rw=/[A-Z]/g,Ix=/-[a-z]/g,Ow=/^data[-\w.:]+$/i;function $c(e,t){const a=bo(t);let s=t,l=Qn;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&Ow.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(Ix,Mw);s="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!Ix.test(u)){let d=u.replace(Rw,Iw);d.charAt(0)!=="-"&&(d="-"+d),t="data"+d}}l=Fh}return new l(s,t)}function Iw(e){return"-"+e.toLowerCase()}function Mw(e){return e.charAt(1).toUpperCase()}const vo=Ty([_y,Cw,Sy,Ay,Cy],"html"),ds=Ty([_y,ww,Sy,Ay,Cy],"svg");function Mx(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function wy(e){return e.join(" ").trim()}var Ii={},Tm,Dx;function Dw(){if(Dx)return Tm;Dx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,a=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
453
+ `,h="/",x="*",g="",y="comment",T="declaration";function N(A,w){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];w=w||{};var C=1,R=1;function U(le){var ae=le.match(t);ae&&(C+=ae.length);var F=le.lastIndexOf(m);R=~F?le.length-F:R+le.length}function V(){var le={line:C,column:R};return function(ae){return ae.position=new L(le),W(),ae}}function L(le){this.start=le,this.end={line:C,column:R},this.source=w.source}L.prototype.content=A;function z(le){var ae=new Error(w.source+":"+C+":"+R+": "+le);if(ae.reason=le,ae.filename=w.source,ae.line=C,ae.column=R,ae.source=A,!w.silent)throw ae}function X(le){var ae=le.exec(A);if(ae){var F=ae[0];return U(F),A=A.slice(F.length),ae}}function W(){X(a)}function j(le){var ae;for(le=le||[];ae=K();)ae!==!1&&le.push(ae);return le}function K(){var le=V();if(!(h!=A.charAt(0)||x!=A.charAt(1))){for(var ae=2;g!=A.charAt(ae)&&(x!=A.charAt(ae)||h!=A.charAt(ae+1));)++ae;if(ae+=2,g===A.charAt(ae-1))return z("End of comment missing");var F=A.slice(2,ae-2);return R+=2,U(F),A=A.slice(ae),R+=2,le({type:y,comment:F})}}function Z(){var le=V(),ae=X(s);if(ae){if(K(),!X(l))return z("property missing ':'");var F=X(u),O=le({type:T,property:v(ae[0].replace(e,g)),value:F?v(F[0].replace(e,g)):g});return X(d),O}}function se(){var le=[];j(le);for(var ae;ae=Z();)ae!==!1&&(le.push(ae),j(le));return le}return W(),se()}function v(A){return A?A.replace(f,g):g}return Tm=N,Tm}var Lx;function Lw(){if(Lx)return Ii;Lx=1;var e=Ii&&Ii.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.default=a;const t=e(Dw());function a(s,l){let u=null;if(!s||typeof s!="string")return u;const d=(0,t.default)(s),f=typeof l=="function";return d.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:x}=m;f?l(h,x,m):x&&(u=u||{},u[h]=x)}),u}return Ii}var Kl={},jx;function jw(){if(jx)return Kl;jx=1,Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,a=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,u=function(h){return!h||a.test(h)||e.test(h)},d=function(h,x){return x.toUpperCase()},f=function(h,x){return"".concat(x,"-")},m=function(h,x){return x===void 0&&(x={}),u(h)?h:(h=h.toLowerCase(),x.reactCompat?h=h.replace(l,f):h=h.replace(s,f),h.replace(t,d))};return Kl.camelCase=m,Kl}var Vl,Bx;function Bw(){if(Bx)return Vl;Bx=1;var e=Vl&&Vl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(Lw()),a=jw();function s(l,u){var d={};return!l||typeof l!="string"||(0,t.default)(l,function(f,m){f&&m&&(d[(0,a.camelCase)(f,u)]=m)}),d}return s.default=s,Vl=s,Vl}var Pw=Bw();const Uw=Mc(Pw),Gc=ky("end"),Ja=ky("start");function ky(e){return t;function t(a){const s=a&&a.position&&a.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function Hw(e){const t=Ja(e),a=Gc(e);if(t&&a)return{start:t,end:a}}function no(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Px(e.position):"start"in e||"end"in e?Px(e):"line"in e||"column"in e?ih(e):""}function ih(e){return Ux(e&&e.line)+":"+Ux(e&&e.column)}function Px(e){return ih(e&&e.start)+"-"+ih(e&&e.end)}function Ux(e){return e&&typeof e=="number"?e:1}class Cn extends Error{constructor(t,a,s){super(),typeof a=="string"&&(s=a,a=void 0);let l="",u={},d=!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"?l=t:!u.cause&&t&&(d=!0,l=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof s=="string"){const m=s.indexOf(":");m===-1?u.ruleId=s:(u.source=s.slice(0,m),u.ruleId=s.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=l,this.line=f?f.line:void 0,this.name=no(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=d&&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}}Cn.prototype.file="";Cn.prototype.name="";Cn.prototype.reason="";Cn.prototype.message="";Cn.prototype.stack="";Cn.prototype.column=void 0;Cn.prototype.line=void 0;Cn.prototype.ancestors=void 0;Cn.prototype.cause=void 0;Cn.prototype.fatal=void 0;Cn.prototype.place=void 0;Cn.prototype.ruleId=void 0;Cn.prototype.source=void 0;const zh={}.hasOwnProperty,Fw=new Map,zw=/[A-Z]/g,qw=new Set(["table","tbody","thead","tfoot","tr"]),Yw=new Set(["td","th"]),Ry="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $w(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=Jw(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");s=Zw(a,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,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"?ds:vo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=Oy(l,e,void 0);return u&&typeof u!="string"?u:l.create(e,l.Fragment,{children:u||void 0},void 0)}function Oy(e,t,a){if(t.type==="element")return Gw(e,t,a);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Kw(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Qw(e,t,a);if(t.type==="mdxjsEsm")return Vw(e,t);if(t.type==="root")return Xw(e,t,a);if(t.type==="text")return Ww(e,t)}function Gw(e,t,a){const s=e.schema;let l=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(l=ds,e.schema=l),e.ancestors.push(t);const u=My(e,t.tagName,!1),d=e5(e,t);let f=Yh(e,t);return qw.has(t.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!Sw(m):!0})),Iy(e,d,u,t),qh(d,f),e.ancestors.pop(),e.schema=s,e.create(t,u,d,a)}function Kw(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}xo(e,t.position)}function Vw(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xo(e,t.position)}function Qw(e,t,a){const s=e.schema;let l=s;t.name==="svg"&&s.space==="html"&&(l=ds,e.schema=l),e.ancestors.push(t);const u=t.name===null?e.Fragment:My(e,t.name,!0),d=t5(e,t),f=Yh(e,t);return Iy(e,d,u,t),qh(d,f),e.ancestors.pop(),e.schema=s,e.create(t,u,d,a)}function Xw(e,t,a){const s={};return qh(s,Yh(e,t)),e.create(t,e.Fragment,s,a)}function Ww(e,t){return t.value}function Iy(e,t,a,s){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(t.node=s)}function qh(e,t){if(t.length>0){const a=t.length>1?t:t[0];a&&(e.children=a)}}function Zw(e,t,a){return s;function s(l,u,d,f){const h=Array.isArray(d.children)?a:t;return f?h(u,d,f):h(u,d)}}function Jw(e,t){return a;function a(s,l,u,d){const f=Array.isArray(u.children),m=Ja(s);return t(l,u,d,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function e5(e,t){const a={};let s,l;for(l in t.properties)if(l!=="children"&&zh.call(t.properties,l)){const u=n5(e,l,t.properties[l]);if(u){const[d,f]=u;e.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&Yw.has(t.tagName)?s=f:a[d]=f}}if(s){const u=a.style||(a.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return a}function t5(e,t){const a={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const u=s.data.estree.body[0];u.type;const d=u.expression;d.type;const f=d.properties[0];f.type,Object.assign(a,e.evaluater.evaluateExpression(f.argument))}else xo(e,t.position);else{const l=s.name;let u;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const f=s.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else xo(e,t.position);else u=s.value===null?!0:s.value;a[l]=u}return a}function Yh(e,t){const a=[];let s=-1;const l=e.passKeys?new Map:Fw;for(;++s<t.children.length;){const u=t.children[s];let d;if(e.passKeys){const m=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(m){const h=l.get(m)||0;d=m+"-"+h,l.set(m,h+1)}}const f=Oy(e,u,d);f!==void 0&&a.push(f)}return a}function n5(e,t,a){const s=$c(e.schema,t);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=s.commaSeparated?yy(a):wy(a)),s.property==="style"){let l=typeof a=="object"?a:a5(e,String(a));return e.stylePropertyNameCase==="css"&&(l=r5(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&s.space?kw[s.property]||s.property:s.attribute,a]}}function a5(e,t){try{return Uw(t,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const s=a,l=new Cn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=Ry+"#cannot-parse-style-attribute",l}}function My(e,t,a){let s;if(!a)s={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let u=-1,d;for(;++u<l.length;){const f=kx(l[u])?{type:"Identifier",name:l[u]}:{type:"Literal",value:l[u]};d=d?{type:"MemberExpression",object:d,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}s=d}else s=kx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const l=s.value;return zh.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(s);xo(e)}function xo(e,t){const a=new Cn("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=Ry+"#cannot-handle-mdx-estrees-without-createevaluater",a}function r5(e){const t={};let a;for(a in e)zh.call(e,a)&&(t[s5(a)]=e[a]);return t}function s5(e){let t=e.replace(zw,i5);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function i5(e){return"-"+e.toLowerCase()}const _m={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"]},l5={};function $h(e,t){const a=l5,s=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,l=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return Dy(e,s,l)}function Dy(e,t,a){if(o5(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 Hx(e.children,t,a)}return Array.isArray(e)?Hx(e,t,a):""}function Hx(e,t,a){const s=[];let l=-1;for(;++l<e.length;)s[l]=Dy(e[l],t,a);return s.join("")}function o5(e){return!!(e&&typeof e=="object")}const Fx=document.createElement("i");function Gh(e){const t="&"+e+";";Fx.innerHTML=t;const a=Fx.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===t?!1:a}function la(e,t,a,s){const l=e.length;let u=0,d;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,a=a>0?a:0,s.length<1e4)d=Array.from(s),d.unshift(t,a),e.splice(...d);else for(a&&e.splice(t,a);u<s.length;)d=s.slice(u,u+1e4),d.unshift(t,0),e.splice(...d),u+=1e4,t+=1e4}function _a(e,t){return e.length>0?(la(e,e.length,0,t),e):t}const zx={}.hasOwnProperty;function Ly(e){const t={};let a=-1;for(;++a<e.length;)u5(t,e[a]);return t}function u5(e,t){let a;for(a in t){const l=(zx.call(e,a)?e[a]:void 0)||(e[a]={}),u=t[a];let d;if(u)for(d in u){zx.call(l,d)||(l[d]=[]);const f=u[d];c5(l[d],Array.isArray(f)?f:f?[f]:[])}}}function c5(e,t){let a=-1;const s=[];for(;++a<t.length;)(t[a].add==="after"?e:s).push(t[a]);la(e,0,0,s)}function jy(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 Da(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ln=fs(/[A-Za-z]/),Sn=fs(/[\dA-Za-z]/),d5=fs(/[#-'*+\--9=?A-Z^-~]/);function vc(e){return e!==null&&(e<32||e===127)}const lh=fs(/\d/),f5=fs(/[\dA-Fa-f]/),m5=fs(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function Rt(e){return e!==null&&(e<0||e===32)}function rt(e){return e===-2||e===-1||e===32}const Kc=fs(new RegExp("\\p{P}|\\p{S}","u")),qs=fs(/\s/);function fs(e){return t;function t(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function Ki(e){const t=[];let a=-1,s=0,l=0;for(;++a<e.length;){const u=e.charCodeAt(a);let d="";if(u===37&&Sn(e.charCodeAt(a+1))&&Sn(e.charCodeAt(a+2)))l=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(d=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(a+1);u<56320&&f>56319&&f<57344?(d=String.fromCharCode(u,f),l=1):d="�"}else d=String.fromCharCode(u);d&&(t.push(e.slice(s,a),encodeURIComponent(d)),s=a+l+1,d=""),l&&(a+=l,l=0)}return t.join("")+e.slice(s)}function ct(e,t,a,s){const l=s?s-1:Number.POSITIVE_INFINITY;let u=0;return d;function d(m){return rt(m)?(e.enter(a),f(m)):t(m)}function f(m){return rt(m)&&u++<l?(e.consume(m),f):(e.exit(a),t(m))}}const h5={tokenize:p5};function p5(e){const t=e.attempt(this.parser.constructs.contentInitial,s,l);let a;return t;function s(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ct(e,t,"linePrefix")}function l(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,d(f)}function d(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ue(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),d)}}const g5={tokenize:b5},qx={tokenize:x5};function b5(e){const t=this,a=[];let s=0,l,u,d;return f;function f(R){if(s<a.length){const U=a[s];return t.containerState=U[1],e.attempt(U[0].continuation,m,h)(R)}return h(R)}function m(R){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&C();const U=t.events.length;let V=U,L;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){L=t.events[V][1].end;break}w(s);let z=U;for(;z<t.events.length;)t.events[z][1].end={...L},z++;return la(t.events,V+1,0,t.events.slice(U)),t.events.length=z,h(R)}return f(R)}function h(R){if(s===a.length){if(!l)return y(R);if(l.currentConstruct&&l.currentConstruct.concrete)return N(R);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qx,x,g)(R)}function x(R){return l&&C(),w(s),y(R)}function g(R){return t.parser.lazy[t.now().line]=s!==a.length,d=t.now().offset,N(R)}function y(R){return t.containerState={},e.attempt(qx,T,N)(R)}function T(R){return s++,a.push([t.currentConstruct,t.containerState]),y(R)}function N(R){if(R===null){l&&C(),w(0),e.consume(R);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:u}),v(R)}function v(R){if(R===null){A(e.exit("chunkFlow"),!0),w(0),e.consume(R);return}return Ue(R)?(e.consume(R),A(e.exit("chunkFlow")),s=0,t.interrupt=void 0,f):(e.consume(R),v)}function A(R,U){const V=t.sliceStream(R);if(U&&V.push(null),R.previous=u,u&&(u.next=R),u=R,l.defineSkip(R.start),l.write(V),t.parser.lazy[R.start.line]){let L=l.events.length;for(;L--;)if(l.events[L][1].start.offset<d&&(!l.events[L][1].end||l.events[L][1].end.offset>d))return;const z=t.events.length;let X=z,W,j;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){if(W){j=t.events[X][1].end;break}W=!0}for(w(s),L=z;L<t.events.length;)t.events[L][1].end={...j},L++;la(t.events,X+1,0,t.events.slice(z)),t.events.length=L}}function w(R){let U=a.length;for(;U-- >R;){const V=a[U];t.containerState=V[1],V[0].exit.call(t,e)}a.length=R}function C(){l.write([null]),u=void 0,l=void 0,t.containerState._closeFlow=void 0}}function x5(e,t,a){return ct(e,e.attempt(this.parser.constructs.document,t,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ui(e){if(e===null||Rt(e)||qs(e))return 1;if(Kc(e))return 2}function Vc(e,t,a){const s=[];let l=-1;for(;++l<e.length;){const u=e[l].resolveAll;u&&!s.includes(u)&&(t=u(t,a),s.push(u))}return t}const oh={name:"attention",resolveAll:E5,tokenize:y5};function E5(e,t){let a=-1,s,l,u,d,f,m,h,x;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(s=a;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[s][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;m=e[s][1].end.offset-e[s][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const g={...e[s][1].end},y={...e[a][1].start};Yx(g,-m),Yx(y,m),d={type:m>1?"strongSequence":"emphasisSequence",start:g,end:{...e[s][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:y},u={type:m>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[a][1].start}},l={type:m>1?"strong":"emphasis",start:{...d.start},end:{...f.end}},e[s][1].end={...d.start},e[a][1].start={...f.end},h=[],e[s][1].end.offset-e[s][1].start.offset&&(h=_a(h,[["enter",e[s][1],t],["exit",e[s][1],t]])),h=_a(h,[["enter",l,t],["enter",d,t],["exit",d,t],["enter",u,t]]),h=_a(h,Vc(t.parser.constructs.insideSpan.null,e.slice(s+1,a),t)),h=_a(h,[["exit",u,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[a][1].end.offset-e[a][1].start.offset?(x=2,h=_a(h,[["enter",e[a][1],t],["exit",e[a][1],t]])):x=0,la(e,s-1,a-s+3,h),a=s+h.length-x-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function y5(e,t){const a=this.parser.constructs.attentionMarkers.null,s=this.previous,l=Ui(s);let u;return d;function d(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"),x=Ui(m),g=!x||x===2&&l||a.includes(m),y=!l||l===2&&x||a.includes(s);return h._open=!!(u===42?g:g&&(l||!y)),h._close=!!(u===42?y:y&&(x||!g)),t(m)}}function Yx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const T5={name:"autolink",tokenize:_5};function _5(e,t,a){let s=0;return l;function l(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(T){return Ln(T)?(e.consume(T),d):T===64?a(T):h(T)}function d(T){return T===43||T===45||T===46||Sn(T)?(s=1,f(T)):h(T)}function f(T){return T===58?(e.consume(T),s=0,m):(T===43||T===45||T===46||Sn(T))&&s++<32?(e.consume(T),f):(s=0,h(T))}function m(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):T===null||T===32||T===60||vc(T)?a(T):(e.consume(T),m)}function h(T){return T===64?(e.consume(T),x):d5(T)?(e.consume(T),h):a(T)}function x(T){return Sn(T)?g(T):a(T)}function g(T){return T===46?(e.consume(T),s=0,x):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):y(T)}function y(T){if((T===45||Sn(T))&&s++<63){const N=T===45?y:g;return e.consume(T),N}return a(T)}}const So={partial:!0,tokenize:N5};function N5(e,t,a){return s;function s(u){return rt(u)?ct(e,l,"linePrefix")(u):l(u)}function l(u){return u===null||Ue(u)?t(u):a(u)}}const By={continuation:{tokenize:S5},exit:A5,name:"blockQuote",tokenize:v5};function v5(e,t,a){const s=this;return l;function l(d){if(d===62){const f=s.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(d),e.exit("blockQuoteMarker"),u}return a(d)}function u(d){return rt(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(d))}}function S5(e,t,a){const s=this;return l;function l(d){return rt(d)?ct(e,u,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):u(d)}function u(d){return e.attempt(By,t,a)(d)}}function A5(e){e.exit("blockQuote")}const Py={name:"characterEscape",tokenize:C5};function C5(e,t,a){return s;function s(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),l}function l(u){return m5(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):a(u)}}const Uy={name:"characterReference",tokenize:w5};function w5(e,t,a){const s=this;let l=0,u,d;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,d=Sn,x(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,d=f5,x):(e.enter("characterReferenceValue"),u=7,d=lh,x(g))}function x(g){if(g===59&&l){const y=e.exit("characterReferenceValue");return d===Sn&&!Gh(s.sliceSerialize(y))?a(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return d(g)&&l++<u?(e.consume(g),x):a(g)}}const $x={partial:!0,tokenize:R5},Gx={concrete:!0,name:"codeFenced",tokenize:k5};function k5(e,t,a){const s=this,l={partial:!0,tokenize:V};let u=0,d=0,f;return m;function m(L){return h(L)}function h(L){const z=s.events[s.events.length-1];return u=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,f=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),x(L)}function x(L){return L===f?(d++,e.consume(L),x):d<3?a(L):(e.exit("codeFencedFenceSequence"),rt(L)?ct(e,g,"whitespace")(L):g(L))}function g(L){return L===null||Ue(L)?(e.exit("codeFencedFence"),s.interrupt?t(L):e.check($x,v,U)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(L))}function y(L){return L===null||Ue(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(L)):rt(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ct(e,T,"whitespace")(L)):L===96&&L===f?a(L):(e.consume(L),y)}function T(L){return L===null||Ue(L)?g(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(L))}function N(L){return L===null||Ue(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(L)):L===96&&L===f?a(L):(e.consume(L),N)}function v(L){return e.attempt(l,U,A)(L)}function A(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),w}function w(L){return u>0&&rt(L)?ct(e,C,"linePrefix",u+1)(L):C(L)}function C(L){return L===null||Ue(L)?e.check($x,v,U)(L):(e.enter("codeFlowValue"),R(L))}function R(L){return L===null||Ue(L)?(e.exit("codeFlowValue"),C(L)):(e.consume(L),R)}function U(L){return e.exit("codeFenced"),t(L)}function V(L,z,X){let W=0;return j;function j(ae){return L.enter("lineEnding"),L.consume(ae),L.exit("lineEnding"),K}function K(ae){return L.enter("codeFencedFence"),rt(ae)?ct(L,Z,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):Z(ae)}function Z(ae){return ae===f?(L.enter("codeFencedFenceSequence"),se(ae)):X(ae)}function se(ae){return ae===f?(W++,L.consume(ae),se):W>=d?(L.exit("codeFencedFenceSequence"),rt(ae)?ct(L,le,"whitespace")(ae):le(ae)):X(ae)}function le(ae){return ae===null||Ue(ae)?(L.exit("codeFencedFence"),z(ae)):X(ae)}}}function R5(e,t,a){const s=this;return l;function l(d){return d===null?a(d):(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u)}function u(d){return s.parser.lazy[s.now().line]?a(d):t(d)}}const Nm={name:"codeIndented",tokenize:I5},O5={partial:!0,tokenize:M5};function I5(e,t,a){const s=this;return l;function l(h){return e.enter("codeIndented"),ct(e,u,"linePrefix",5)(h)}function u(h){const x=s.events[s.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?d(h):a(h)}function d(h){return h===null?m(h):Ue(h)?e.attempt(O5,d,m)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Ue(h)?(e.exit("codeFlowValue"),d(h)):(e.consume(h),f)}function m(h){return e.exit("codeIndented"),t(h)}}function M5(e,t,a){const s=this;return l;function l(d){return s.parser.lazy[s.now().line]?a(d):Ue(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):ct(e,u,"linePrefix",5)(d)}function u(d){const f=s.events[s.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(d):Ue(d)?l(d):a(d)}}const D5={name:"codeText",previous:j5,resolve:L5,tokenize:B5};function L5(e){let t=e.length-4,a=3,s,l;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=a;++s<t;)if(e[s][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[t][1].type="codeTextPadding",a+=2,t-=2;break}}for(s=a-1,t++;++s<=t;)l===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(l=s):(s===t||e[s][1].type==="lineEnding")&&(e[l][1].type="codeTextData",s!==l+2&&(e[l][1].end=e[s-1][1].end,e.splice(l+2,s-l-2),t-=s-l-2,s=l+2),l=void 0);return e}function j5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function B5(e,t,a){let s=0,l,u;return d;function d(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),s++,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"),l=0,x(g)):Ue(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||Ue(g)?(e.exit("codeTextData"),m(g)):(e.consume(g),h)}function x(g){return g===96?(e.consume(g),l++,x):l===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(u.type="codeTextData",h(g))}}class P5{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 s=a??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,a,s){const l=a||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return s&&Ql(this.left,s),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),Ql(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ql(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);Ql(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ql(this.left,a.reverse())}}}function Ql(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 Hy(e){const t={};let a=-1,s,l,u,d,f,m,h;const x=new P5(e);for(;++a<x.length;){for(;a in t;)a=t[a];if(s=x.get(a),a&&s[1].type==="chunkFlow"&&x.get(a-1)[1].type==="listItemPrefix"&&(m=s[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(s[0]==="enter")s[1].contentType&&(Object.assign(t,U5(x,a)),a=t[a],h=!0);else if(s[1]._container){for(u=a,l=void 0;u--;)if(d=x.get(u),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(l&&(x.get(l)[1].type="lineEndingBlank"),d[1].type="lineEnding",l=u);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;l&&(s[1].end={...x.get(l)[1].start},f=x.slice(l,a),f.unshift(s),x.splice(l,a-l+1,f))}}return la(e,0,Number.POSITIVE_INFINITY,x.slice(0)),!h}function U5(e,t){const a=e.get(t)[1],s=e.get(t)[2];let l=t-1;const u=[];let d=a._tokenizer;d||(d=s.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const f=d.events,m=[],h={};let x,g,y=-1,T=a,N=0,v=0;const A=[v];for(;T;){for(;e.get(++l)[1]!==T;);u.push(l),T._tokenizer||(x=s.sliceStream(T),T.next||x.push(null),g&&d.defineSkip(T.start),T._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(x),T._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),g=T,T=T.next}for(T=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&&(v=y+1,A.push(v),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(d.events=[],T?(T._tokenizer=void 0,T.previous=void 0):A.pop(),y=A.length;y--;){const w=f.slice(A[y],A[y+1]),C=u.pop();m.push([C,C+w.length-1]),e.splice(C,2,w)}for(m.reverse(),y=-1;++y<m.length;)h[N+m[y][0]]=N+m[y][1],N+=m[y][1]-m[y][0]-1;return h}const H5={resolve:z5,tokenize:q5},F5={partial:!0,tokenize:Y5};function z5(e){return Hy(e),e}function q5(e,t){let a;return s;function s(f){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?u(f):Ue(f)?e.check(F5,d,u)(f):(e.consume(f),l)}function u(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function d(f){return e.consume(f),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,l}}function Y5(e,t,a){const s=this;return l;function l(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ct(e,u,"linePrefix")}function u(d){if(d===null||Ue(d))return a(d);const f=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(d):e.interrupt(s.parser.constructs.flow,a,t)(d)}}function Fy(e,t,a,s,l,u,d,f,m){const h=m||Number.POSITIVE_INFINITY;let x=0;return g;function g(w){return w===60?(e.enter(s),e.enter(l),e.enter(u),e.consume(w),e.exit(u),y):w===null||w===32||w===41||vc(w)?a(w):(e.enter(s),e.enter(d),e.enter(f),e.enter("chunkString",{contentType:"string"}),v(w))}function y(w){return w===62?(e.enter(u),e.consume(w),e.exit(u),e.exit(l),e.exit(s),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),T(w))}function T(w){return w===62?(e.exit("chunkString"),e.exit(f),y(w)):w===null||w===60||Ue(w)?a(w):(e.consume(w),w===92?N:T)}function N(w){return w===60||w===62||w===92?(e.consume(w),T):T(w)}function v(w){return!x&&(w===null||w===41||Rt(w))?(e.exit("chunkString"),e.exit(f),e.exit(d),e.exit(s),t(w)):x<h&&w===40?(e.consume(w),x++,v):w===41?(e.consume(w),x--,v):w===null||w===32||w===40||vc(w)?a(w):(e.consume(w),w===92?A:v)}function A(w){return w===40||w===41||w===92?(e.consume(w),v):v(w)}}function zy(e,t,a,s,l,u){const d=this;let f=0,m;return h;function h(T){return e.enter(s),e.enter(l),e.consume(T),e.exit(l),e.enter(u),x}function x(T){return f>999||T===null||T===91||T===93&&!m||T===94&&!f&&"_hiddenFootnoteSupport"in d.parser.constructs?a(T):T===93?(e.exit(u),e.enter(l),e.consume(T),e.exit(l),e.exit(s),t):Ue(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),x):(e.enter("chunkString",{contentType:"string"}),g(T))}function g(T){return T===null||T===91||T===93||Ue(T)||f++>999?(e.exit("chunkString"),x(T)):(e.consume(T),m||(m=!rt(T)),T===92?y:g)}function y(T){return T===91||T===92||T===93?(e.consume(T),f++,g):g(T)}}function qy(e,t,a,s,l,u){let d;return f;function f(y){return y===34||y===39||y===40?(e.enter(s),e.enter(l),e.consume(y),e.exit(l),d=y===40?41:y,m):a(y)}function m(y){return y===d?(e.enter(l),e.consume(y),e.exit(l),e.exit(s),t):(e.enter(u),h(y))}function h(y){return y===d?(e.exit(u),m(d)):y===null?a(y):Ue(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),ct(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),x(y))}function x(y){return y===d||y===null||Ue(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?g:x)}function g(y){return y===d||y===92?(e.consume(y),x):x(y)}}function ao(e,t){let a;return s;function s(l){return Ue(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a=!0,s):rt(l)?ct(e,s,a?"linePrefix":"lineSuffix")(l):t(l)}}const $5={name:"definition",tokenize:K5},G5={partial:!0,tokenize:V5};function K5(e,t,a){const s=this;let l;return u;function u(T){return e.enter("definition"),d(T)}function d(T){return zy.call(s,e,f,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function f(T){return l=Da(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),m):a(T)}function m(T){return Rt(T)?ao(e,h)(T):h(T)}function h(T){return Fy(e,x,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function x(T){return e.attempt(G5,g,g)(T)}function g(T){return rt(T)?ct(e,y,"whitespace")(T):y(T)}function y(T){return T===null||Ue(T)?(e.exit("definition"),s.parser.defined.push(l),t(T)):a(T)}}function V5(e,t,a){return s;function s(f){return Rt(f)?ao(e,l)(f):a(f)}function l(f){return qy(e,u,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return rt(f)?ct(e,d,"whitespace")(f):d(f)}function d(f){return f===null||Ue(f)?t(f):a(f)}}const Q5={name:"hardBreakEscape",tokenize:X5};function X5(e,t,a){return s;function s(u){return e.enter("hardBreakEscape"),e.consume(u),l}function l(u){return Ue(u)?(e.exit("hardBreakEscape"),t(u)):a(u)}}const W5={name:"headingAtx",resolve:Z5,tokenize:J5};function Z5(e,t){let a=e.length-2,s=3,l,u;return e[s][1].type==="whitespace"&&(s+=2),a-2>s&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(s===a-1||a-4>s&&e[a-2][1].type==="whitespace")&&(a-=s+1===a?2:4),a>s&&(l={type:"atxHeadingText",start:e[s][1].start,end:e[a][1].end},u={type:"chunkText",start:e[s][1].start,end:e[a][1].end,contentType:"text"},la(e,s,a-s+1,[["enter",l,t],["enter",u,t],["exit",u,t],["exit",l,t]])),e}function J5(e,t,a){let s=0;return l;function l(x){return e.enter("atxHeading"),u(x)}function u(x){return e.enter("atxHeadingSequence"),d(x)}function d(x){return x===35&&s++<6?(e.consume(x),d):x===null||Rt(x)?(e.exit("atxHeadingSequence"),f(x)):a(x)}function f(x){return x===35?(e.enter("atxHeadingSequence"),m(x)):x===null||Ue(x)?(e.exit("atxHeading"),t(x)):rt(x)?ct(e,f,"whitespace")(x):(e.enter("atxHeadingText"),h(x))}function m(x){return x===35?(e.consume(x),m):(e.exit("atxHeadingSequence"),f(x))}function h(x){return x===null||x===35||Rt(x)?(e.exit("atxHeadingText"),f(x)):(e.consume(x),h)}}const ek=["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"],Kx=["pre","script","style","textarea"],tk={concrete:!0,name:"htmlFlow",resolveTo:rk,tokenize:sk},nk={partial:!0,tokenize:lk},ak={partial:!0,tokenize:ik};function rk(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 sk(e,t,a){const s=this;let l,u,d,f,m;return h;function h(D){return x(D)}function x(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),g}function g(D){return D===33?(e.consume(D),y):D===47?(e.consume(D),u=!0,v):D===63?(e.consume(D),l=3,s.interrupt?t:P):Ln(D)?(e.consume(D),d=String.fromCharCode(D),A):a(D)}function y(D){return D===45?(e.consume(D),l=2,T):D===91?(e.consume(D),l=5,f=0,N):Ln(D)?(e.consume(D),l=4,s.interrupt?t:P):a(D)}function T(D){return D===45?(e.consume(D),s.interrupt?t:P):a(D)}function N(D){const Te="CDATA[";return D===Te.charCodeAt(f++)?(e.consume(D),f===Te.length?s.interrupt?t:Z:N):a(D)}function v(D){return Ln(D)?(e.consume(D),d=String.fromCharCode(D),A):a(D)}function A(D){if(D===null||D===47||D===62||Rt(D)){const Te=D===47,ke=d.toLowerCase();return!Te&&!u&&Kx.includes(ke)?(l=1,s.interrupt?t(D):Z(D)):ek.includes(d.toLowerCase())?(l=6,Te?(e.consume(D),w):s.interrupt?t(D):Z(D)):(l=7,s.interrupt&&!s.parser.lazy[s.now().line]?a(D):u?C(D):R(D))}return D===45||Sn(D)?(e.consume(D),d+=String.fromCharCode(D),A):a(D)}function w(D){return D===62?(e.consume(D),s.interrupt?t:Z):a(D)}function C(D){return rt(D)?(e.consume(D),C):j(D)}function R(D){return D===47?(e.consume(D),j):D===58||D===95||Ln(D)?(e.consume(D),U):rt(D)?(e.consume(D),R):j(D)}function U(D){return D===45||D===46||D===58||D===95||Sn(D)?(e.consume(D),U):V(D)}function V(D){return D===61?(e.consume(D),L):rt(D)?(e.consume(D),V):R(D)}function L(D){return D===null||D===60||D===61||D===62||D===96?a(D):D===34||D===39?(e.consume(D),m=D,z):rt(D)?(e.consume(D),L):X(D)}function z(D){return D===m?(e.consume(D),m=null,W):D===null||Ue(D)?a(D):(e.consume(D),z)}function X(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||Rt(D)?V(D):(e.consume(D),X)}function W(D){return D===47||D===62||rt(D)?R(D):a(D)}function j(D){return D===62?(e.consume(D),K):a(D)}function K(D){return D===null||Ue(D)?Z(D):rt(D)?(e.consume(D),K):a(D)}function Z(D){return D===45&&l===2?(e.consume(D),F):D===60&&l===1?(e.consume(D),O):D===62&&l===4?(e.consume(D),I):D===63&&l===3?(e.consume(D),P):D===93&&l===5?(e.consume(D),_e):Ue(D)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(nk,ie,se)(D)):D===null||Ue(D)?(e.exit("htmlFlowData"),se(D)):(e.consume(D),Z)}function se(D){return e.check(ak,le,ie)(D)}function le(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),ae}function ae(D){return D===null||Ue(D)?se(D):(e.enter("htmlFlowData"),Z(D))}function F(D){return D===45?(e.consume(D),P):Z(D)}function O(D){return D===47?(e.consume(D),d="",ee):Z(D)}function ee(D){if(D===62){const Te=d.toLowerCase();return Kx.includes(Te)?(e.consume(D),I):Z(D)}return Ln(D)&&d.length<8?(e.consume(D),d+=String.fromCharCode(D),ee):Z(D)}function _e(D){return D===93?(e.consume(D),P):Z(D)}function P(D){return D===62?(e.consume(D),I):D===45&&l===2?(e.consume(D),P):Z(D)}function I(D){return D===null||Ue(D)?(e.exit("htmlFlowData"),ie(D)):(e.consume(D),I)}function ie(D){return e.exit("htmlFlow"),t(D)}}function ik(e,t,a){const s=this;return l;function l(d){return Ue(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):a(d)}function u(d){return s.parser.lazy[s.now().line]?a(d):t(d)}}function lk(e,t,a){return s;function s(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(So,t,a)}}const ok={name:"htmlText",tokenize:uk};function uk(e,t,a){const s=this;let l,u,d;return f;function f(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),h):P===47?(e.consume(P),V):P===63?(e.consume(P),R):Ln(P)?(e.consume(P),X):a(P)}function h(P){return P===45?(e.consume(P),x):P===91?(e.consume(P),u=0,N):Ln(P)?(e.consume(P),C):a(P)}function x(P){return P===45?(e.consume(P),T):a(P)}function g(P){return P===null?a(P):P===45?(e.consume(P),y):Ue(P)?(d=g,O(P)):(e.consume(P),g)}function y(P){return P===45?(e.consume(P),T):g(P)}function T(P){return P===62?F(P):P===45?y(P):g(P)}function N(P){const I="CDATA[";return P===I.charCodeAt(u++)?(e.consume(P),u===I.length?v:N):a(P)}function v(P){return P===null?a(P):P===93?(e.consume(P),A):Ue(P)?(d=v,O(P)):(e.consume(P),v)}function A(P){return P===93?(e.consume(P),w):v(P)}function w(P){return P===62?F(P):P===93?(e.consume(P),w):v(P)}function C(P){return P===null||P===62?F(P):Ue(P)?(d=C,O(P)):(e.consume(P),C)}function R(P){return P===null?a(P):P===63?(e.consume(P),U):Ue(P)?(d=R,O(P)):(e.consume(P),R)}function U(P){return P===62?F(P):R(P)}function V(P){return Ln(P)?(e.consume(P),L):a(P)}function L(P){return P===45||Sn(P)?(e.consume(P),L):z(P)}function z(P){return Ue(P)?(d=z,O(P)):rt(P)?(e.consume(P),z):F(P)}function X(P){return P===45||Sn(P)?(e.consume(P),X):P===47||P===62||Rt(P)?W(P):a(P)}function W(P){return P===47?(e.consume(P),F):P===58||P===95||Ln(P)?(e.consume(P),j):Ue(P)?(d=W,O(P)):rt(P)?(e.consume(P),W):F(P)}function j(P){return P===45||P===46||P===58||P===95||Sn(P)?(e.consume(P),j):K(P)}function K(P){return P===61?(e.consume(P),Z):Ue(P)?(d=K,O(P)):rt(P)?(e.consume(P),K):W(P)}function Z(P){return P===null||P===60||P===61||P===62||P===96?a(P):P===34||P===39?(e.consume(P),l=P,se):Ue(P)?(d=Z,O(P)):rt(P)?(e.consume(P),Z):(e.consume(P),le)}function se(P){return P===l?(e.consume(P),l=void 0,ae):P===null?a(P):Ue(P)?(d=se,O(P)):(e.consume(P),se)}function le(P){return P===null||P===34||P===39||P===60||P===61||P===96?a(P):P===47||P===62||Rt(P)?W(P):(e.consume(P),le)}function ae(P){return P===47||P===62||Rt(P)?W(P):a(P)}function F(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):a(P)}function O(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ee}function ee(P){return rt(P)?ct(e,_e,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):_e(P)}function _e(P){return e.enter("htmlTextData"),d(P)}}const Kh={name:"labelEnd",resolveAll:mk,resolveTo:hk,tokenize:pk},ck={tokenize:gk},dk={tokenize:bk},fk={tokenize:xk};function mk(e){let t=-1;const a=[];for(;++t<e.length;){const s=e[t][1];if(a.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const l=s.type==="labelImage"?4:2;s.type="data",t+=l}}return e.length!==a.length&&la(e,0,e.length,a),e}function hk(e,t){let a=e.length,s=0,l,u,d,f;for(;a--;)if(l=e[a][1],u){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[a][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(d){if(e[a][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(u=a,l.type!=="labelLink")){s=2;break}}else l.type==="labelEnd"&&(d=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[d][1].end}},x={type:"labelText",start:{...e[u+s+2][1].end},end:{...e[d-2][1].start}};return f=[["enter",m,t],["enter",h,t]],f=_a(f,e.slice(u+1,u+s+3)),f=_a(f,[["enter",x,t]]),f=_a(f,Vc(t.parser.constructs.insideSpan.null,e.slice(u+s+4,d-3),t)),f=_a(f,[["exit",x,t],e[d-2],e[d-1],["exit",h,t]]),f=_a(f,e.slice(d+1)),f=_a(f,[["exit",m,t]]),la(e,u,e.length,f),e}function pk(e,t,a){const s=this;let l=s.events.length,u,d;for(;l--;)if((s.events[l][1].type==="labelImage"||s.events[l][1].type==="labelLink")&&!s.events[l][1]._balanced){u=s.events[l][1];break}return f;function f(y){return u?u._inactive?g(y):(d=s.parser.defined.includes(Da(s.sliceSerialize({start:u.end,end:s.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(ck,x,d?x:g)(y):y===91?e.attempt(dk,x,d?h:g)(y):d?x(y):g(y)}function h(y){return e.attempt(fk,x,g)(y)}function x(y){return t(y)}function g(y){return u._balanced=!0,a(y)}}function gk(e,t,a){return s;function s(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),l}function l(g){return Rt(g)?ao(e,u)(g):u(g)}function u(g){return g===41?x(g):Fy(e,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function d(g){return Rt(g)?ao(e,m)(g):x(g)}function f(g){return a(g)}function m(g){return g===34||g===39||g===40?qy(e,h,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):x(g)}function h(g){return Rt(g)?ao(e,x)(g):x(g)}function x(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):a(g)}}function bk(e,t,a){const s=this;return l;function l(f){return zy.call(s,e,u,d,"reference","referenceMarker","referenceString")(f)}function u(f){return s.parser.defined.includes(Da(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(f):a(f)}function d(f){return a(f)}}function xk(e,t,a){return s;function s(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),l}function l(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):a(u)}}const Ek={name:"labelStartImage",resolveAll:Kh.resolveAll,tokenize:yk};function yk(e,t,a){const s=this;return l;function l(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"),d):a(f)}function d(f){return f===94&&"_hiddenFootnoteSupport"in s.parser.constructs?a(f):t(f)}}const Tk={name:"labelStartLink",resolveAll:Kh.resolveAll,tokenize:_k};function _k(e,t,a){const s=this;return l;function l(d){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelLink"),u}function u(d){return d===94&&"_hiddenFootnoteSupport"in s.parser.constructs?a(d):t(d)}}const vm={name:"lineEnding",tokenize:Nk};function Nk(e,t){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ct(e,t,"linePrefix")}}const uc={name:"thematicBreak",tokenize:vk};function vk(e,t,a){let s=0,l;return u;function u(h){return e.enter("thematicBreak"),d(h)}function d(h){return l=h,f(h)}function f(h){return h===l?(e.enter("thematicBreakSequence"),m(h)):s>=3&&(h===null||Ue(h))?(e.exit("thematicBreak"),t(h)):a(h)}function m(h){return h===l?(e.consume(h),s++,m):(e.exit("thematicBreakSequence"),rt(h)?ct(e,f,"whitespace")(h):f(h))}}const Kn={continuation:{tokenize:wk},exit:Rk,name:"list",tokenize:Ck},Sk={partial:!0,tokenize:Ok},Ak={partial:!0,tokenize:kk};function Ck(e,t,a){const s=this,l=s.events[s.events.length-1];let u=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,d=0;return f;function f(T){const N=s.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!s.containerState.marker||T===s.containerState.marker:lh(T)){if(s.containerState.type||(s.containerState.type=N,e.enter(N,{_container:!0})),N==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(uc,a,h)(T):h(T);if(!s.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(T)}return a(T)}function m(T){return lh(T)&&++d<10?(e.consume(T),m):(!s.interrupt||d<2)&&(s.containerState.marker?T===s.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),h(T)):a(T)}function h(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||T,e.check(So,s.interrupt?a:x,e.attempt(Sk,y,g))}function x(T){return s.containerState.initialBlankLine=!0,u++,y(T)}function g(T){return rt(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),y):a(T)}function y(T){return s.containerState.size=u+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function wk(e,t,a){const s=this;return s.containerState._closeFlow=void 0,e.check(So,l,u);function l(f){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,ct(e,t,"listItemIndent",s.containerState.size+1)(f)}function u(f){return s.containerState.furtherBlankLines||!rt(f)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,d(f)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(Ak,t,d)(f))}function d(f){return s.containerState._closeFlow=!0,s.interrupt=void 0,ct(e,e.attempt(Kn,t,a),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function kk(e,t,a){const s=this;return ct(e,l,"listItemIndent",s.containerState.size+1);function l(u){const d=s.events[s.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===s.containerState.size?t(u):a(u)}}function Rk(e){e.exit(this.containerState.type)}function Ok(e,t,a){const s=this;return ct(e,l,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(u){const d=s.events[s.events.length-1];return!rt(u)&&d&&d[1].type==="listItemPrefixWhitespace"?t(u):a(u)}}const Vx={name:"setextUnderline",resolveTo:Ik,tokenize:Mk};function Ik(e,t){let a=e.length,s,l,u;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){s=a;break}e[a][1].type==="paragraph"&&(l=a)}else e[a][1].type==="content"&&e.splice(a,1),!u&&e[a][1].type==="definition"&&(u=a);const d={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",u?(e.splice(l,0,["enter",d,t]),e.splice(u+1,0,["exit",e[s][1],t]),e[s][1].end={...e[u][1].end}):e[s][1]=d,e.push(["exit",d,t]),e}function Mk(e,t,a){const s=this;let l;return u;function u(h){let x=s.events.length,g;for(;x--;)if(s.events[x][1].type!=="lineEnding"&&s.events[x][1].type!=="linePrefix"&&s.events[x][1].type!=="content"){g=s.events[x][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||g)?(e.enter("setextHeadingLine"),l=h,d(h)):a(h)}function d(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===l?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),rt(h)?ct(e,m,"lineSuffix")(h):m(h))}function m(h){return h===null||Ue(h)?(e.exit("setextHeadingLine"),t(h)):a(h)}}const Dk={tokenize:Lk};function Lk(e){const t=this,a=e.attempt(So,s,e.attempt(this.parser.constructs.flowInitial,l,ct(e,e.attempt(this.parser.constructs.flow,l,e.attempt(H5,l)),"linePrefix")));return a;function s(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,a}function l(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,a}}const jk={resolveAll:$y()},Bk=Yy("string"),Pk=Yy("text");function Yy(e){return{resolveAll:$y(e==="text"?Uk:void 0),tokenize:t};function t(a){const s=this,l=this.parser.constructs[e],u=a.attempt(l,d,f);return d;function d(x){return h(x)?u(x):f(x)}function f(x){if(x===null){a.consume(x);return}return a.enter("data"),a.consume(x),m}function m(x){return h(x)?(a.exit("data"),u(x)):(a.consume(x),m)}function h(x){if(x===null)return!0;const g=l[x];let y=-1;if(g)for(;++y<g.length;){const T=g[y];if(!T.previous||T.previous.call(s,s.previous))return!0}return!1}}}function $y(e){return t;function t(a,s){let l=-1,u;for(;++l<=a.length;)u===void 0?a[l]&&a[l][1].type==="data"&&(u=l,l++):(!a[l]||a[l][1].type!=="data")&&(l!==u+2&&(a[u][1].end=a[l-1][1].end,a.splice(u+2,l-u-2),l=u+2),u=void 0);return e?e(a,s):a}}function Uk(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 s=e[a-1][1],l=t.sliceStream(s);let u=l.length,d=-1,f=0,m;for(;u--;){const h=l[u];if(typeof h=="string"){for(d=h.length;h.charCodeAt(d-1)===32;)f++,d--;if(d)break;d=-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?d:s.start._bufferIndex+d,_index:s.start._index+u,line:s.end.line,column:s.end.column-f,offset:s.end.offset-f},end:{...s.end}};s.end={...h.start},s.start.offset===s.end.offset?Object.assign(s,h):(e.splice(a,0,["enter",h,t],["exit",h,t]),a+=2)}a++}return e}const Hk={42:Kn,43:Kn,45:Kn,48:Kn,49:Kn,50:Kn,51:Kn,52:Kn,53:Kn,54:Kn,55:Kn,56:Kn,57:Kn,62:By},Fk={91:$5},zk={[-2]:Nm,[-1]:Nm,32:Nm},qk={35:W5,42:uc,45:[Vx,uc],60:tk,61:Vx,95:uc,96:Gx,126:Gx},Yk={38:Uy,92:Py},$k={[-5]:vm,[-4]:vm,[-3]:vm,33:Ek,38:Uy,42:oh,60:[T5,ok],91:Tk,92:[Q5,Py],93:Kh,95:oh,96:D5},Gk={null:[oh,jk]},Kk={null:[42,95]},Vk={null:[]},Qk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Kk,contentInitial:Fk,disable:Vk,document:Hk,flow:qk,flowInitial:zk,insideSpan:Gk,string:Yk,text:$k},Symbol.toStringTag,{value:"Module"}));function Xk(e,t,a){let s={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const l={},u=[];let d=[],f=[];const m={attempt:z(V),check:z(L),consume:C,enter:R,exit:U,interrupt:z(L,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:N,parser:e,previous:null,sliceSerialize:y,sliceStream:T,write:g};let x=t.tokenize.call(h,m);return t.resolveAll&&u.push(t),h;function g(K){return d=_a(d,K),A(),d[d.length-1]!==null?[]:(X(t,0),h.events=Vc(u,h.events,h),h.events)}function y(K,Z){return Zk(T(K),Z)}function T(K){return Wk(d,K)}function N(){const{_bufferIndex:K,_index:Z,line:se,column:le,offset:ae}=s;return{_bufferIndex:K,_index:Z,line:se,column:le,offset:ae}}function v(K){l[K.line]=K.column,j()}function A(){let K;for(;s._index<d.length;){const Z=d[s._index];if(typeof Z=="string")for(K=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===K&&s._bufferIndex<Z.length;)w(Z.charCodeAt(s._bufferIndex));else w(Z)}}function w(K){x=x(K)}function C(K){Ue(K)?(s.line++,s.column=1,s.offset+=K===-3?2:1,j()):K!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===d[s._index].length&&(s._bufferIndex=-1,s._index++)),h.previous=K}function R(K,Z){const se=Z||{};return se.type=K,se.start=N(),h.events.push(["enter",se,h]),f.push(se),se}function U(K){const Z=f.pop();return Z.end=N(),h.events.push(["exit",Z,h]),Z}function V(K,Z){X(K,Z.from)}function L(K,Z){Z.restore()}function z(K,Z){return se;function se(le,ae,F){let O,ee,_e,P;return Array.isArray(le)?ie(le):"tokenize"in le?ie([le]):I(le);function I(Re){return Ye;function Ye(dt){const ut=dt!==null&&Re[dt],zt=dt!==null&&Re.null,Tn=[...Array.isArray(ut)?ut:ut?[ut]:[],...Array.isArray(zt)?zt:zt?[zt]:[]];return ie(Tn)(dt)}}function ie(Re){return O=Re,ee=0,Re.length===0?F:D(Re[ee])}function D(Re){return Ye;function Ye(dt){return P=W(),_e=Re,Re.partial||(h.currentConstruct=Re),Re.name&&h.parser.constructs.disable.null.includes(Re.name)?ke():Re.tokenize.call(Z?Object.assign(Object.create(h),Z):h,m,Te,ke)(dt)}}function Te(Re){return K(_e,P),ae}function ke(Re){return P.restore(),++ee<O.length?D(O[ee]):F}}}function X(K,Z){K.resolveAll&&!u.includes(K)&&u.push(K),K.resolve&&la(h.events,Z,h.events.length-Z,K.resolve(h.events.slice(Z),h)),K.resolveTo&&(h.events=K.resolveTo(h.events,h))}function W(){const K=N(),Z=h.previous,se=h.currentConstruct,le=h.events.length,ae=Array.from(f);return{from:le,restore:F};function F(){s=K,h.previous=Z,h.currentConstruct=se,h.events.length=le,f=ae,j()}}function j(){s.line in l&&s.column<2&&(s.column=l[s.line],s.offset+=l[s.line]-1)}}function Wk(e,t){const a=t.start._index,s=t.start._bufferIndex,l=t.end._index,u=t.end._bufferIndex;let d;if(a===l)d=[e[a].slice(s,u)];else{if(d=e.slice(a,l),s>-1){const f=d[0];typeof f=="string"?d[0]=f.slice(s):d.shift()}u>0&&d.push(e[l].slice(0,u))}return d}function Zk(e,t){let a=-1;const s=[];let l;for(;++a<e.length;){const u=e[a];let d;if(typeof u=="string")d=u;else switch(u){case-5:{d="\r";break}case-4:{d=`
454
+ `;break}case-3:{d=`\r
455
+ `;break}case-2:{d=t?" ":" ";break}case-1:{if(!t&&l)continue;d=" ";break}default:d=String.fromCharCode(u)}l=u===-2,s.push(d)}return s.join("")}function Jk(e){const s={constructs:Ly([Qk,...(e||{}).extensions||[]]),content:l(h5),defined:[],document:l(g5),flow:l(Dk),lazy:{},string:l(Bk),text:l(Pk)};return s;function l(u){return d;function d(f){return Xk(s,u,f)}}}function eR(e){for(;!Hy(e););return e}const Qx=/[\0\t\n\r]/g;function tR(){let e=1,t="",a=!0,s;return l;function l(u,d,f){const m=[];let h,x,g,y,T;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(d||void 0).decode(u)),g=0,t="",a&&(u.charCodeAt(0)===65279&&g++,a=void 0);g<u.length;){if(Qx.lastIndex=g,h=Qx.exec(u),y=h&&h.index!==void 0?h.index:u.length,T=u.charCodeAt(y),!h){t=u.slice(g);break}if(T===10&&g===y&&s)m.push(-3),s=void 0;else switch(s&&(m.push(-5),s=void 0),g<y&&(m.push(u.slice(g,y)),e+=y-g),T){case 0:{m.push(65533),e++;break}case 9:{for(x=Math.ceil(e/4)*4,m.push(-2);e++<x;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:s=!0,e=1}g=y+1}return f&&(s&&m.push(-5),t&&m.push(t),m.push(null)),m}}const nR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function aR(e){return e.replace(nR,rR)}function rR(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){const l=a.charCodeAt(1),u=l===120||l===88;return jy(a.slice(u?2:1),u?16:10)}return Gh(a)||e}const Gy={}.hasOwnProperty;function sR(e,t,a){return t&&typeof t=="object"&&(a=t,t=void 0),iR(a)(eR(Jk(a).document().write(tR()(e,t,!0))))}function iR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(fa),autolinkProtocol:W,autolinkEmail:W,atxHeading:u(Xn),blockQuote:u(zt),characterEscape:W,characterReference:W,codeFenced:u(Tn),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:u(Tn,d),codeText:u(da,d),codeTextData:W,data:W,codeFlowValue:W,definition:u(Ca),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:u(un),hardBreakEscape:u(Je),hardBreakTrailing:u(Je),htmlFlow:u(jn,d),htmlFlowData:W,htmlText:u(jn,d),htmlTextData:W,image:u(kn),label:d,link:u(fa),listItem:u(tr),listItemValue:y,listOrdered:u(wa,g),listUnordered:u(wa),paragraph:u(Pa),reference:D,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:u(Xn),strong:u(wr),thematicBreak:u(nr)},exit:{atxHeading:m(),atxHeadingSequence:V,autolink:m(),autolinkEmail:ut,autolinkProtocol:dt,blockQuote:m(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:Re,characterReference:Ye,codeFenced:m(A),codeFencedFence:v,codeFencedFenceInfo:T,codeFencedFenceMeta:N,codeFlowValue:j,codeIndented:m(w),codeText:m(ae),codeTextData:j,data:j,definition:m(),definitionDestinationString:U,definitionLabelString:C,definitionTitleString:R,emphasis:m(),hardBreakEscape:m(Z),hardBreakTrailing:m(Z),htmlFlow:m(se),htmlFlowData:j,htmlText:m(le),htmlTextData:j,image:m(O),label:_e,labelText:ee,lineEnding:K,link:m(F),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:Te,resourceDestinationString:P,resourceTitleString:I,resource:ie,setextHeading:m(X),setextHeadingLineSequence:z,setextHeadingText:L,strong:m(),thematicBreak:m()}};Ky(t,(e||{}).mdastExtensions||[]);const a={};return s;function s(de){let ye={type:"root",children:[]};const Pe={stack:[ye],tokenStack:[],config:t,enter:f,exit:h,buffer:d,resume:x,data:a},H=[];let Ae=-1;for(;++Ae<de.length;)if(de[Ae][1].type==="listOrdered"||de[Ae][1].type==="listUnordered")if(de[Ae][0]==="enter")H.push(Ae);else{const ft=H.pop();Ae=l(de,ft,Ae)}for(Ae=-1;++Ae<de.length;){const ft=t[de[Ae][0]];Gy.call(ft,de[Ae][1].type)&&ft[de[Ae][1].type].call(Object.assign({sliceSerialize:de[Ae][2].sliceSerialize},Pe),de[Ae][1])}if(Pe.tokenStack.length>0){const ft=Pe.tokenStack[Pe.tokenStack.length-1];(ft[1]||Xx).call(Pe,void 0,ft[0])}for(ye.position={start:rs(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:rs(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},Ae=-1;++Ae<t.transforms.length;)ye=t.transforms[Ae](ye)||ye;return ye}function l(de,ye,Pe){let H=ye-1,Ae=-1,ft=!1,ln,Wt,Ot,cn;for(;++H<=Pe;){const bt=de[H];switch(bt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{bt[0]==="enter"?Ae++:Ae--,cn=void 0;break}case"lineEndingBlank":{bt[0]==="enter"&&(ln&&!cn&&!Ae&&!Ot&&(Ot=H),cn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:cn=void 0}if(!Ae&&bt[0]==="enter"&&bt[1].type==="listItemPrefix"||Ae===-1&&bt[0]==="exit"&&(bt[1].type==="listUnordered"||bt[1].type==="listOrdered")){if(ln){let Ua=H;for(Wt=void 0;Ua--;){const Rn=de[Ua];if(Rn[1].type==="lineEnding"||Rn[1].type==="lineEndingBlank"){if(Rn[0]==="exit")continue;Wt&&(de[Wt][1].type="lineEndingBlank",ft=!0),Rn[1].type="lineEnding",Wt=Ua}else if(!(Rn[1].type==="linePrefix"||Rn[1].type==="blockQuotePrefix"||Rn[1].type==="blockQuotePrefixWhitespace"||Rn[1].type==="blockQuoteMarker"||Rn[1].type==="listItemIndent"))break}Ot&&(!Wt||Ot<Wt)&&(ln._spread=!0),ln.end=Object.assign({},Wt?de[Wt][1].start:bt[1].end),de.splice(Wt||H,0,["exit",ln,bt[2]]),H++,Pe++}if(bt[1].type==="listItemPrefix"){const Ua={type:"listItem",_spread:!1,start:Object.assign({},bt[1].start),end:void 0};ln=Ua,de.splice(H,0,["enter",Ua,bt[2]]),H++,Pe++,Ot=void 0,cn=!0}}}return de[ye][1]._spread=ft,Pe}function u(de,ye){return Pe;function Pe(H){f.call(this,de(H),H),ye&&ye.call(this,H)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(de,ye,Pe){this.stack[this.stack.length-1].children.push(de),this.stack.push(de),this.tokenStack.push([ye,Pe||void 0]),de.position={start:rs(ye.start),end:void 0}}function m(de){return ye;function ye(Pe){de&&de.call(this,Pe),h.call(this,Pe)}}function h(de,ye){const Pe=this.stack.pop(),H=this.tokenStack.pop();if(H)H[0].type!==de.type&&(ye?ye.call(this,de,H[0]):(H[1]||Xx).call(this,de,H[0]));else throw new Error("Cannot close `"+de.type+"` ("+no({start:de.start,end:de.end})+"): it’s not open");Pe.position.end=rs(de.end)}function x(){return $h(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function y(de){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(de),10),this.data.expectingFirstListItemValue=void 0}}function T(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=de}function N(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=de}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.value=de.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.value=de.replace(/(\r?\n|\r)$/g,"")}function C(de){const ye=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ye,Pe.identifier=Da(this.sliceSerialize(de)).toLowerCase()}function R(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.title=de}function U(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.url=de}function V(de){const ye=this.stack[this.stack.length-1];if(!ye.depth){const Pe=this.sliceSerialize(de).length;ye.depth=Pe}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function z(de){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(de).codePointAt(0)===61?1:2}function X(){this.data.setextHeadingSlurpLineEnding=void 0}function W(de){const Pe=this.stack[this.stack.length-1].children;let H=Pe[Pe.length-1];(!H||H.type!=="text")&&(H=_t(),H.position={start:rs(de.start),end:void 0},Pe.push(H)),this.stack.push(H)}function j(de){const ye=this.stack.pop();ye.value+=this.sliceSerialize(de),ye.position.end=rs(de.end)}function K(de){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Pe=ye.children[ye.children.length-1];Pe.position.end=rs(de.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ye.type)&&(W.call(this,de),j.call(this,de))}function Z(){this.data.atHardBreak=!0}function se(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.value=de}function le(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.value=de}function ae(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.value=de}function F(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=ye,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function O(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=ye,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function ee(de){const ye=this.sliceSerialize(de),Pe=this.stack[this.stack.length-2];Pe.label=aR(ye),Pe.identifier=Da(ye).toLowerCase()}function _e(){const de=this.stack[this.stack.length-1],ye=this.resume(),Pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Pe.type==="link"){const H=de.children;Pe.children=H}else Pe.alt=ye}function P(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.url=de}function I(){const de=this.resume(),ye=this.stack[this.stack.length-1];ye.title=de}function ie(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function Te(de){const ye=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ye,Pe.identifier=Da(this.sliceSerialize(de)).toLowerCase(),this.data.referenceType="full"}function ke(de){this.data.characterReferenceType=de.type}function Re(de){const ye=this.sliceSerialize(de),Pe=this.data.characterReferenceType;let H;Pe?(H=jy(ye,Pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):H=Gh(ye);const Ae=this.stack[this.stack.length-1];Ae.value+=H}function Ye(de){const ye=this.stack.pop();ye.position.end=rs(de.end)}function dt(de){j.call(this,de);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(de)}function ut(de){j.call(this,de);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(de)}function zt(){return{type:"blockquote",children:[]}}function Tn(){return{type:"code",lang:null,meta:null,value:""}}function da(){return{type:"inlineCode",value:""}}function Ca(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function un(){return{type:"emphasis",children:[]}}function Xn(){return{type:"heading",depth:0,children:[]}}function Je(){return{type:"break"}}function jn(){return{type:"html",value:""}}function kn(){return{type:"image",title:null,url:"",alt:null}}function fa(){return{type:"link",title:null,url:"",children:[]}}function wa(de){return{type:"list",ordered:de.type==="listOrdered",start:null,spread:de._spread,children:[]}}function tr(de){return{type:"listItem",spread:de._spread,checked:null,children:[]}}function Pa(){return{type:"paragraph",children:[]}}function wr(){return{type:"strong",children:[]}}function _t(){return{type:"text",value:""}}function nr(){return{type:"thematicBreak"}}}function rs(e){return{line:e.line,column:e.column,offset:e.offset}}function Ky(e,t){let a=-1;for(;++a<t.length;){const s=t[a];Array.isArray(s)?Ky(e,s):lR(e,s)}}function lR(e,t){let a;for(a in t)if(Gy.call(t,a))switch(a){case"canContainEols":{const s=t[a];s&&e[a].push(...s);break}case"transforms":{const s=t[a];s&&e[a].push(...s);break}case"enter":case"exit":{const s=t[a];s&&Object.assign(e[a],s);break}}}function Xx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+no({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+no({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+no({start:t.start,end:t.end})+") is still open")}function oR(e){const t=this;t.parser=a;function a(s){return sR(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function uR(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 cR(e,t){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
456
+ `}]}function dR(e,t){const a=t.value?t.value+`
457
+ `:"",s={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(s.className=["language-"+l[0]]);let u={type:"element",tagName:"code",properties:s,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 fR(e,t){const a={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function mR(e,t){const a={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hR(e,t){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),l=Ki(s.toLowerCase()),u=e.footnoteOrder.indexOf(s);let d,f=e.footnoteCounts.get(s);f===void 0?(f=0,e.footnoteOrder.push(s),d=e.footnoteOrder.length):d=u+1,f+=1,e.footnoteCounts.set(s,f);const m={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+l,id:a+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};e.patch(t,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(t,h),e.applyData(t,h)}function pR(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 gR(e,t){if(e.options.allowDangerousHtml){const a={type:"raw",value:t.value};return e.patch(t,a),e.applyData(t,a)}}function Vy(e,t){const a=t.referenceType;let s="]";if(a==="collapsed"?s+="[]":a==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const l=e.all(t),u=l[0];u&&u.type==="text"?u.value="["+u.value:l.unshift({type:"text",value:"["});const d=l[l.length-1];return d&&d.type==="text"?d.value+=s:l.push({type:"text",value:s}),l}function bR(e,t){const a=String(t.identifier).toUpperCase(),s=e.definitionById.get(a);if(!s)return Vy(e,t);const l={src:Ki(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(l.title=s.title);const u={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,u),e.applyData(t,u)}function xR(e,t){const a={src:Ki(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 s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)}function ER(e,t){const a={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,a);const s={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(t,s),e.applyData(t,s)}function yR(e,t){const a=String(t.identifier).toUpperCase(),s=e.definitionById.get(a);if(!s)return Vy(e,t);const l={href:Ki(s.url||"")};s.title!==null&&s.title!==void 0&&(l.title=s.title);const u={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function TR(e,t){const a={href:Ki(t.url)};t.title!==null&&t.title!==void 0&&(a.title=t.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function _R(e,t,a){const s=e.all(t),l=a?NR(a):Qy(t),u={},d=[];if(typeof t.checked=="boolean"){const x=s[0];let g;x&&x.type==="element"&&x.tagName==="p"?g=x:(g={type:"element",tagName:"p",properties:{},children:[]},s.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<s.length;){const x=s[f];(l||f!==0||x.type!=="element"||x.tagName!=="p")&&d.push({type:"text",value:`
458
+ `}),x.type==="element"&&x.tagName==="p"&&!l?d.push(...x.children):d.push(x)}const m=s[s.length-1];m&&(l||m.type!=="element"||m.tagName!=="p")&&d.push({type:"text",value:`
459
+ `});const h={type:"element",tagName:"li",properties:u,children:d};return e.patch(t,h),e.applyData(t,h)}function NR(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const a=e.children;let s=-1;for(;!t&&++s<a.length;)t=Qy(a[s])}return t}function Qy(e){const t=e.spread;return t??e.children.length>1}function vR(e,t){const a={},s=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(a.start=t.start);++l<s.length;){const d=s[l];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.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(s,!0)};return e.patch(t,u),e.applyData(t,u)}function SR(e,t){const a={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function AR(e,t){const a={type:"root",children:e.wrap(e.all(t))};return e.patch(t,a),e.applyData(t,a)}function CR(e,t){const a={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function wR(e,t){const a=e.all(t),s=a.shift(),l=[];if(s){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],d),l.push(d)}if(a.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},f=Ja(t.children[1]),m=Gc(t.children[t.children.length-1]);f&&m&&(d.position={start:f,end:m}),l.push(d)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)}function kR(e,t,a){const s=a?a.children:void 0,u=(s?s.indexOf(t):1)===0?"th":"td",d=a&&a.type==="table"?a.align:void 0,f=d?d.length:t.children.length;let m=-1;const h=[];for(;++m<f;){const g=t.children[m],y={},T=d?d[m]:void 0;T&&(y.align=T);let N={type:"element",tagName:u,properties:y,children:[]};g&&(N.children=e.all(g),e.patch(g,N),N=e.applyData(g,N)),h.push(N)}const x={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,x),e.applyData(t,x)}function RR(e,t){const a={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}const Wx=9,Zx=32;function OR(e){const t=String(e),a=/\r?\n|\r/g;let s=a.exec(t),l=0;const u=[];for(;s;)u.push(Jx(t.slice(l,s.index),l>0,!0),s[0]),l=s.index+s[0].length,s=a.exec(t);return u.push(Jx(t.slice(l),l>0,!1)),u.join("")}function Jx(e,t,a){let s=0,l=e.length;if(t){let u=e.codePointAt(s);for(;u===Wx||u===Zx;)s++,u=e.codePointAt(s)}if(a){let u=e.codePointAt(l-1);for(;u===Wx||u===Zx;)l--,u=e.codePointAt(l-1)}return l>s?e.slice(s,l):""}function IR(e,t){const a={type:"text",value:OR(String(t.value))};return e.patch(t,a),e.applyData(t,a)}function MR(e,t){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,a),e.applyData(t,a)}const DR={blockquote:uR,break:cR,code:dR,delete:fR,emphasis:mR,footnoteReference:hR,heading:pR,html:gR,imageReference:bR,image:xR,inlineCode:ER,linkReference:yR,link:TR,listItem:_R,list:vR,paragraph:SR,root:AR,strong:CR,table:wR,tableCell:RR,tableRow:kR,text:IR,thematicBreak:MR,toml:Qu,yaml:Qu,definition:Qu,footnoteDefinition:Qu};function Qu(){}const Xy=-1,Qc=0,ro=1,Sc=2,Vh=3,Qh=4,Xh=5,Wh=6,Wy=7,Zy=8,Jy=typeof self=="object"?self:globalThis,e1=(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 Jy[e](t)},LR=(e,t)=>{const a=(l,u)=>(e.set(u,l),l),s=l=>{if(e.has(l))return e.get(l);const[u,d]=t[l];switch(u){case Qc:case Xy:return a(d,l);case ro:{const f=a([],l);for(const m of d)f.push(s(m));return f}case Sc:{const f=a({},l);for(const[m,h]of d)f[s(m)]=s(h);return f}case Vh:return a(new Date(d),l);case Qh:{const{source:f,flags:m}=d;return a(new RegExp(f,m),l)}case Xh:{const f=a(new Map,l);for(const[m,h]of d)f.set(s(m),s(h));return f}case Wh:{const f=a(new Set,l);for(const m of d)f.add(s(m));return f}case Wy:{const{name:f,message:m}=d;return a(typeof Jy[f]=="function"?e1(f,m):new Error(m),l)}case Zy:return a(BigInt(d),l);case"BigInt":return a(Object(BigInt(d)),l);case"ArrayBuffer":return a(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:f}=new Uint8Array(d);return a(new DataView(f),d)}}return a(e1(u,d),l)};return s},t1=e=>LR(new Map,e)(0),Bs="",{toString:jR}={},{keys:BR}=Object,Xl=e=>{const t=typeof e;if(t!=="object"||!e)return[Qc,t];const a=jR.call(e).slice(8,-1);switch(a){case"Array":return[ro,Bs];case"Object":return[Sc,Bs];case"Date":return[Vh,Bs];case"RegExp":return[Qh,Bs];case"Map":return[Xh,Bs];case"Set":return[Wh,Bs];case"DataView":return[ro,a]}return a.includes("Array")?[ro,a]:e instanceof Error?[Wy,e.name||"Error"]:[Sc,a]},Xu=([e,t])=>e===Qc&&(t==="function"||t==="symbol"),PR=(e,t,a,s)=>{const l=(d,f)=>{const m=s.push(d)-1;return a.set(f,m),m},u=d=>{if(a.has(d))return a.get(d);let[f,m]=Xl(d);switch(f){case Qc:{let x=d;switch(m){case"bigint":f=Zy,x=d.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);x=null;break;case"undefined":return l([Xy],d)}return l([f,x],d)}case ro:{if(m){let y=d;return m==="DataView"?y=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(y=new Uint8Array(d)),l([m,[...y]],d)}const x=[],g=l([f,x],d);for(const y of d)x.push(u(y));return g}case Sc:{if(m)switch(m){case"BigInt":return l([m,d.toString()],d);case"Boolean":case"Number":case"String":return l([m,d.valueOf()],d)}if(t&&"toJSON"in d)return u(d.toJSON());const x=[],g=l([f,x],d);for(const y of BR(d))(e||!Xu(Xl(d[y])))&&x.push([u(y),u(d[y])]);return g}case Vh:return l([f,isNaN(d.getTime())?Bs:d.toISOString()],d);case Qh:{const{source:x,flags:g}=d;return l([f,{source:x,flags:g}],d)}case Xh:{const x=[],g=l([f,x],d);for(const[y,T]of d)(e||!(Xu(Xl(y))||Xu(Xl(T))))&&x.push([u(y),u(T)]);return g}case Wh:{const x=[],g=l([f,x],d);for(const y of d)(e||!Xu(Xl(y)))&&x.push(u(y));return g}}const{message:h}=d;return l([f,{name:m,message:h}],d)};return u},n1=(e,{json:t,lossy:a}={})=>{const s=[];return PR(!(t||a),!!t,new Map,s)(e),s},Hi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?t1(n1(e,t)):structuredClone(e):(e,t)=>t1(n1(e,t));function UR(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 HR(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function FR(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||UR,s=e.options.footnoteBackLabel||HR,l=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",d=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 x=e.all(h),g=String(h.identifier).toUpperCase(),y=Ki(g.toLowerCase());let T=0;const N=[],v=e.footnoteCounts.get(g);for(;v!==void 0&&++T<=v;){N.length>0&&N.push({type:"text",value:" "});let C=typeof a=="string"?a:a(m,T);typeof C=="string"&&(C={type:"text",value:C}),N.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(m,T),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const A=x[x.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const C=A.children[A.children.length-1];C&&C.type==="text"?C.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...N)}else x.push(...N);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(x,!0)};e.patch(h,w),f.push(w)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Hi(d),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
460
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
461
+ `}]}}const Ao=(function(e){if(e==null)return $R;if(typeof e=="function")return Xc(e);if(typeof e=="object")return Array.isArray(e)?zR(e):qR(e);if(typeof e=="string")return YR(e);throw new Error("Expected function, string, or object as test")});function zR(e){const t=[];let a=-1;for(;++a<e.length;)t[a]=Ao(e[a]);return Xc(s);function s(...l){let u=-1;for(;++u<t.length;)if(t[u].apply(this,l))return!0;return!1}}function qR(e){const t=e;return Xc(a);function a(s){const l=s;let u;for(u in e)if(l[u]!==t[u])return!1;return!0}}function YR(e){return Xc(t);function t(a){return a&&a.type===e}}function Xc(e){return t;function t(a,s,l){return!!(GR(a)&&e.call(this,a,typeof s=="number"?s:void 0,l||void 0))}}function $R(){return!0}function GR(e){return e!==null&&typeof e=="object"&&"type"in e}const eT=[],KR=!0,uh=!1,VR="skip";function tT(e,t,a,s){let l;typeof t=="function"&&typeof a!="function"?(s=a,a=t):l=t;const u=Ao(l),d=s?-1:1;f(e,void 0,[])();function f(m,h,x){const g=m&&typeof m=="object"?m:{};if(typeof g.type=="string"){const T=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(m.type+(T?"<"+T+">":""))+")"})}return y;function y(){let T=eT,N,v,A;if((!t||u(m,h,x[x.length-1]||void 0))&&(T=QR(a(m,x)),T[0]===uh))return T;if("children"in m&&m.children){const w=m;if(w.children&&T[0]!==VR)for(v=(s?w.children.length:-1)+d,A=x.concat(w);v>-1&&v<w.children.length;){const C=w.children[v];if(N=f(C,v,A)(),N[0]===uh)return N;v=typeof N[1]=="number"?N[1]:v+d}}return T}}}function QR(e){return Array.isArray(e)?e:typeof e=="number"?[KR,e]:e==null?eT:[e]}function Co(e,t,a,s){let l,u,d;typeof t=="function"&&typeof a!="function"?(u=void 0,d=t,l=a):(u=t,d=a,l=s),tT(e,u,f,l);function f(m,h){const x=h[h.length-1],g=x?x.children.indexOf(m):void 0;return d(m,g,x)}}const ch={}.hasOwnProperty,XR={};function WR(e,t){const a=t||XR,s=new Map,l=new Map,u=new Map,d={...DR,...a.handlers},f={all:h,applyData:JR,definitionById:s,footnoteById:l,footnoteCounts:u,footnoteOrder:[],handlers:d,one:m,options:a,patch:ZR,wrap:tO};return Co(e,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const g=x.type==="definition"?s:l,y=String(x.identifier).toUpperCase();g.has(y)||g.set(y,x)}}),f;function m(x,g){const y=x.type,T=f.handlers[y];if(ch.call(f.handlers,y)&&T)return T(f,x,g);if(f.options.passThrough&&f.options.passThrough.includes(y)){if("children"in x){const{children:v,...A}=x,w=Hi(A);return w.children=f.all(x),w}return Hi(x)}return(f.options.unknownHandler||eO)(f,x,g)}function h(x){const g=[];if("children"in x){const y=x.children;let T=-1;for(;++T<y.length;){const N=f.one(y[T],x);if(N){if(T&&y[T-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=a1(N.value)),!Array.isArray(N)&&N.type==="element")){const v=N.children[0];v&&v.type==="text"&&(v.value=a1(v.value))}Array.isArray(N)?g.push(...N):g.push(N)}}}return g}}function ZR(e,t){e.position&&(t.position=Hw(e))}function JR(e,t){let a=t;if(e&&e.data){const s=e.data.hName,l=e.data.hChildren,u=e.data.hProperties;if(typeof s=="string")if(a.type==="element")a.tagName=s;else{const d="children"in a?a.children:[a];a={type:"element",tagName:s,properties:{},children:d}}a.type==="element"&&u&&Object.assign(a.properties,Hi(u)),"children"in a&&a.children&&l!==null&&l!==void 0&&(a.children=l)}return a}function eO(e,t){const a=t.data||{},s="value"in t&&!(ch.call(a,"hProperties")||ch.call(a,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function tO(e,t){const a=[];let s=-1;for(t&&a.push({type:"text",value:`
462
+ `});++s<e.length;)s&&a.push({type:"text",value:`
463
+ `}),a.push(e[s]);return t&&e.length>0&&a.push({type:"text",value:`
464
+ `}),a}function a1(e){let t=0,a=e.charCodeAt(t);for(;a===9||a===32;)t++,a=e.charCodeAt(t);return e.slice(t)}function r1(e,t){const a=WR(e,t),s=a.one(e,void 0),l=FR(a),u=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return l&&u.children.push({type:"text",value:`
465
+ `},l),u}function nO(e,t){return e&&"run"in e?async function(a,s){const l=r1(a,{file:s,...t});await e.run(l,s)}:function(a,s){return r1(a,{file:s,...e||t})}}function s1(e){if(e)throw e}var Sm,i1;function aO(){if(i1)return Sm;i1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=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 x=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!x&&!g)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},d=function(h,x){a&&x.name==="__proto__"?a(h,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):h[x.name]=x.newValue},f=function(h,x){if(x==="__proto__")if(e.call(h,x)){if(s)return s(h,x).value}else return;return h[x]};return Sm=function m(){var h,x,g,y,T,N,v=arguments[0],A=1,w=arguments.length,C=!1;for(typeof v=="boolean"&&(C=v,v=arguments[1]||{},A=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});A<w;++A)if(h=arguments[A],h!=null)for(x in h)g=f(v,x),y=f(h,x),v!==y&&(C&&y&&(u(y)||(T=l(y)))?(T?(T=!1,N=g&&l(g)?g:[]):N=g&&u(g)?g:{},d(v,{name:x,newValue:m(C,N,y)})):typeof y<"u"&&d(v,{name:x,newValue:y}));return v},Sm}var rO=aO();const Am=Mc(rO);function dh(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 sO(){const e=[],t={run:a,use:s};return t;function a(...l){let u=-1;const d=l.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);f(null,...l);function f(m,...h){const x=e[++u];let g=-1;if(m){d(m);return}for(;++g<l.length;)(h[g]===null||h[g]===void 0)&&(h[g]=l[g]);l=h,x?iO(x,f)(...h):d(null,...h)}}function s(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function iO(e,t){let a;return s;function s(...d){const f=e.length>d.length;let m;f&&d.push(l);try{m=e.apply(this,d)}catch(h){const x=h;if(f&&a)throw x;return l(x)}f||(m&&m.then&&typeof m.then=="function"?m.then(u,l):m instanceof Error?l(m):u(m))}function l(d,...f){a||(a=!0,t(d,...f))}function u(d){l(null,d)}}const Ka={basename:lO,dirname:oO,extname:uO,join:cO,sep:"/"};function lO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');wo(e);let a=0,s=-1,l=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(u){a=l+1;break}}else s<0&&(u=!0,s=l+1);return s<0?"":e.slice(a,s)}if(t===e)return"";let d=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(u){a=l+1;break}}else d<0&&(u=!0,d=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(s=l):(f=-1,s=d));return a===s?s=d:s<0&&(s=e.length),e.slice(a,s)}function oO(e){if(wo(e),e.length===0)return".";let t=-1,a=e.length,s;for(;--a;)if(e.codePointAt(a)===47){if(s){t=a;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function uO(e){wo(e);let t=e.length,a=-1,s=0,l=-1,u=0,d;for(;t--;){const f=e.codePointAt(t);if(f===47){if(d){s=t+1;break}continue}a<0&&(d=!0,a=t+1),f===46?l<0?l=t:u!==1&&(u=1):l>-1&&(u=-1)}return l<0||a<0||u===0||u===1&&l===a-1&&l===s+1?"":e.slice(l,a)}function cO(...e){let t=-1,a;for(;++t<e.length;)wo(e[t]),e[t]&&(a=a===void 0?e[t]:a+"/"+e[t]);return a===void 0?".":dO(a)}function dO(e){wo(e);const t=e.codePointAt(0)===47;let a=fO(e,!t);return a.length===0&&!t&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),t?"/"+a:a}function fO(e,t){let a="",s=0,l=-1,u=0,d=-1,f,m;for(;++d<=e.length;){if(d<e.length)f=e.codePointAt(d);else{if(f===47)break;f=47}if(f===47){if(!(l===d-1||u===1))if(l!==d-1&&u===2){if(a.length<2||s!==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="",s=0):(a=a.slice(0,m),s=a.length-1-a.lastIndexOf("/")),l=d,u=0;continue}}else if(a.length>0){a="",s=0,l=d,u=0;continue}}t&&(a=a.length>0?a+"/..":"..",s=2)}else a.length>0?a+="/"+e.slice(l+1,d):a=e.slice(l+1,d),s=d-l-1;l=d,u=0}else f===46&&u>-1?u++:u=-1}return a}function wo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const mO={cwd:hO};function hO(){return"/"}function fh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function pO(e){if(typeof e=="string")e=new URL(e);else if(!fh(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 gO(e)}function gO(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let a=-1;for(;++a<t.length;)if(t.codePointAt(a)===37&&t.codePointAt(a+1)===50){const s=t.codePointAt(a+2);if(s===70||s===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Cm=["history","path","basename","stem","extname","dirname"];class nT{constructor(t){let a;t?fh(t)?a={path:t}:typeof t=="string"||bO(t)?a={value:t}:a=t:a={},this.cwd="cwd"in a?"":mO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<Cm.length;){const u=Cm[s];u in a&&a[u]!==void 0&&a[u]!==null&&(this[u]=u==="history"?[...a[u]]:a[u])}let l;for(l in a)Cm.includes(l)||(this[l]=a[l])}get basename(){return typeof this.path=="string"?Ka.basename(this.path):void 0}set basename(t){km(t,"basename"),wm(t,"basename"),this.path=Ka.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ka.dirname(this.path):void 0}set dirname(t){l1(this.basename,"dirname"),this.path=Ka.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ka.extname(this.path):void 0}set extname(t){if(wm(t,"extname"),l1(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=Ka.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){fh(t)&&(t=pO(t)),km(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ka.basename(this.path,this.extname):void 0}set stem(t){km(t,"stem"),wm(t,"stem"),this.path=Ka.join(this.dirname||"",t+(this.extname||""))}fail(t,a,s){const l=this.message(t,a,s);throw l.fatal=!0,l}info(t,a,s){const l=this.message(t,a,s);return l.fatal=void 0,l}message(t,a,s){const l=new Cn(t,a,s);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function wm(e,t){if(e&&e.includes(Ka.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ka.sep+"`")}function km(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function l1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function bO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xO=(function(e){const s=this.constructor.prototype,l=s[e],u=function(){return l.apply(u,arguments)};return Object.setPrototypeOf(u,s),u}),EO={}.hasOwnProperty;class Zh extends xO{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=sO()}copy(){const t=new Zh;let a=-1;for(;++a<this.attachers.length;){const s=this.attachers[a];t.use(...s)}return t.data(Am(!0,{},this.namespace)),t}data(t,a){return typeof t=="string"?arguments.length===2?(Im("data",this.frozen),this.namespace[t]=a,this):EO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Im("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,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const l=a.call(t,...s);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const a=Wu(t),s=this.parser||this.Parser;return Rm("parse",s),s(String(a),a)}process(t,a){const s=this;return this.freeze(),Rm("process",this.parser||this.Parser),Om("process",this.compiler||this.Compiler),a?l(void 0,a):new Promise(l);function l(u,d){const f=Wu(t),m=s.parse(f);s.run(m,f,function(x,g,y){if(x||!g||!y)return h(x);const T=g,N=s.stringify(T,y);_O(N)?y.value=N:y.result=N,h(x,y)});function h(x,g){x||!g?d(x):u?u(g):a(void 0,g)}}}processSync(t){let a=!1,s;return this.freeze(),Rm("processSync",this.parser||this.Parser),Om("processSync",this.compiler||this.Compiler),this.process(t,l),u1("processSync","process",a),s;function l(u,d){a=!0,s1(u),s=d}}run(t,a,s){o1(t),this.freeze();const l=this.transformers;return!s&&typeof a=="function"&&(s=a,a=void 0),s?u(void 0,s):new Promise(u);function u(d,f){const m=Wu(a);l.run(t,m,h);function h(x,g,y){const T=g||t;x?f(x):d?d(T):s(void 0,T,y)}}}runSync(t,a){let s=!1,l;return this.run(t,a,u),u1("runSync","run",s),l;function u(d,f){s1(d),l=f,s=!0}}stringify(t,a){this.freeze();const s=Wu(a),l=this.compiler||this.Compiler;return Om("stringify",l),o1(t),l(t,s)}use(t,...a){const s=this.attachers,l=this.namespace;if(Im("use",this.frozen),t!=null)if(typeof t=="function")m(t,a);else if(typeof t=="object")Array.isArray(t)?f(t):d(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[x,...g]=h;m(x,g)}else d(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function d(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&&(l.settings=Am(!0,l.settings,h.settings))}function f(h){let x=-1;if(h!=null)if(Array.isArray(h))for(;++x<h.length;){const g=h[x];u(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,x){let g=-1,y=-1;for(;++g<s.length;)if(s[g][0]===h){y=g;break}if(y===-1)s.push([h,...x]);else if(x.length>0){let[T,...N]=x;const v=s[y][1];dh(v)&&dh(T)&&(T=Am(!0,v,T)),s[y]=[h,T,...N]}}}}const yO=new Zh().freeze();function Rm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Om(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Im(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 o1(e){if(!dh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function u1(e,t,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wu(e){return TO(e)?e:new nT(e)}function TO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _O(e){return typeof e=="string"||NO(e)}function NO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",c1=[],d1={allowDangerousHtml:!0},SO=/^(https?|ircs?|mailto|xmpp)$/i,AO=[{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 us(e){const t=CO(e),a=wO(e);return kO(t.runSync(t.parse(a),a),e)}function CO(e){const t=e.rehypePlugins||c1,a=e.remarkPlugins||c1,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...d1}:d1;return yO().use(oR).use(a).use(nO,s).use(t)}function wO(e){const t=e.children||"",a=new nT;return typeof t=="string"&&(a.value=t),a}function kO(e,t){const a=t.allowedElements,s=t.allowElement,l=t.components,u=t.disallowedElements,d=t.skipHtml,f=t.unwrapDisallowed,m=t.urlTransform||RO;for(const x of AO)Object.hasOwn(t,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+vO+x.id,void 0);return Co(e,h),$w(e,{Fragment:o.Fragment,components:l,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function h(x,g,y){if(x.type==="raw"&&y&&typeof g=="number")return d?y.children.splice(g,1):y.children[g]={type:"text",value:x.value},g;if(x.type==="element"){let T;for(T in _m)if(Object.hasOwn(_m,T)&&Object.hasOwn(x.properties,T)){const N=x.properties[T],v=_m[T];(v===null||v.includes(x.tagName))&&(x.properties[T]=m(String(N||""),T,x))}}if(x.type==="element"){let T=a?!a.includes(x.tagName):u?u.includes(x.tagName):!1;if(!T&&s&&typeof g=="number"&&(T=!s(x,g,y)),T&&y&&typeof g=="number")return f&&x.children?y.children.splice(g,1,...x.children):y.children.splice(g,1),g}}}function RO(e){const t=e.indexOf(":"),a=e.indexOf("?"),s=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||a!==-1&&t>a||s!==-1&&t>s||SO.test(e.slice(0,t))?e:""}function f1(e,t){const a=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,l=a.indexOf(t);for(;l!==-1;)s++,l=a.indexOf(t,l+t.length);return s}function OO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function IO(e,t,a){const l=Ao((a||{}).ignore||[]),u=MO(t);let d=-1;for(;++d<u.length;)tT(e,"text",f);function f(h,x){let g=-1,y;for(;++g<x.length;){const T=x[g],N=y?y.children:void 0;if(l(T,N?N.indexOf(T):void 0,y))return;y=T}if(y)return m(h,x)}function m(h,x){const g=x[x.length-1],y=u[d][0],T=u[d][1];let N=0;const A=g.children.indexOf(h);let w=!1,C=[];y.lastIndex=0;let R=y.exec(h.value);for(;R;){const U=R.index,V={index:R.index,input:R.input,stack:[...x,h]};let L=T(...R,V);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?y.lastIndex=U+1:(N!==U&&C.push({type:"text",value:h.value.slice(N,U)}),Array.isArray(L)?C.push(...L):L&&C.push(L),N=U+R[0].length,w=!0),!y.global)break;R=y.exec(h.value)}return w?(N<h.value.length&&C.push({type:"text",value:h.value.slice(N)}),g.children.splice(A,1,...C)):C=[h],A+C.length}}function MO(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 s=-1;for(;++s<a.length;){const l=a[s];t.push([DO(l[0]),LO(l[1])])}return t}function DO(e){return typeof e=="string"?new RegExp(OO(e),"g"):e}function LO(e){return typeof e=="function"?e:function(){return e}}const Mm="phrasing",Dm=["autolink","link","image","label"];function jO(){return{transforms:[qO],enter:{literalAutolink:PO,literalAutolinkEmail:Lm,literalAutolinkHttp:Lm,literalAutolinkWww:Lm},exit:{literalAutolink:zO,literalAutolinkEmail:FO,literalAutolinkHttp:UO,literalAutolinkWww:HO}}}function BO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mm,notInConstruct:Dm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mm,notInConstruct:Dm},{character:":",before:"[ps]",after:"\\/",inConstruct:Mm,notInConstruct:Dm}]}}function PO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lm(e){this.config.enter.autolinkProtocol.call(this,e)}function UO(e){this.config.exit.autolinkProtocol.call(this,e)}function HO(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 FO(e){this.config.exit.autolinkEmail.call(this,e)}function zO(e){this.exit(e)}function qO(e){IO(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,YO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),$O]],{ignore:["link","linkReference"]})}function YO(e,t,a,s,l){let u="";if(!aT(l)||(/^w/i.test(t)&&(a=t+a,t="",u="http://"),!GO(a)))return!1;const d=KO(a+s);if(!d[0])return!1;const f={type:"link",title:null,url:u+t+d[0],children:[{type:"text",value:t+d[0]}]};return d[1]?[f,{type:"text",value:d[1]}]:f}function $O(e,t,a,s){return!aT(s,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+a,children:[{type:"text",value:t+"@"+a}]}}function GO(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 KO(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let a=t[0],s=a.indexOf(")");const l=f1(e,"(");let u=f1(e,")");for(;s!==-1&&l>u;)e+=a.slice(0,s+1),a=a.slice(s+1),s=a.indexOf(")"),u++;return[e,a]}function aT(e,t){const a=e.input.charCodeAt(e.index-1);return(e.index===0||qs(a)||Kc(a))&&(!t||a!==47)}rT.peek=n4;function VO(){this.buffer()}function QO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function XO(){this.buffer()}function WO(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=Da(this.sliceSerialize(e)).toLowerCase(),a.label=t}function JO(e){this.exit(e)}function e4(e){const t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Da(this.sliceSerialize(e)).toLowerCase(),a.label=t}function t4(e){this.exit(e)}function n4(){return"["}function rT(e,t,a,s){const l=a.createTracker(s);let u=l.move("[^");const d=a.enter("footnoteReference"),f=a.enter("reference");return u+=l.move(a.safe(a.associationId(e),{after:"]",before:u})),f(),d(),u+=l.move("]"),u}function a4(){return{enter:{gfmFootnoteCallString:VO,gfmFootnoteCall:QO,gfmFootnoteDefinitionLabelString:XO,gfmFootnoteDefinition:WO},exit:{gfmFootnoteCallString:ZO,gfmFootnoteCall:JO,gfmFootnoteDefinitionLabelString:e4,gfmFootnoteDefinition:t4}}}function r4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:a,footnoteReference:rT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(s,l,u,d){const f=u.createTracker(d);let m=f.move("[^");const h=u.enter("footnoteDefinition"),x=u.enter("label");return m+=f.move(u.safe(u.associationId(s),{before:m,after:"]"})),x(),m+=f.move("]:"),s.children&&s.children.length>0&&(f.shift(4),m+=f.move((t?`
466
+ `:" ")+u.indentLines(u.containerFlow(s,f.current()),t?sT:s4))),h(),m}}function s4(e,t,a){return t===0?e:sT(e,t,a)}function sT(e,t,a){return(a?"":" ")+e}const i4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];iT.peek=d4;function l4(){return{canContainEols:["delete"],enter:{strikethrough:u4},exit:{strikethrough:c4}}}function o4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:i4}],handlers:{delete:iT}}}function u4(e){this.enter({type:"delete",children:[]},e)}function c4(e){this.exit(e)}function iT(e,t,a,s){const l=a.createTracker(s),u=a.enter("strikethrough");let d=l.move("~~");return d+=a.containerPhrasing(e,{...l.current(),before:d,after:"~"}),d+=l.move("~~"),u(),d}function d4(){return"~"}function f4(e){return e.length}function m4(e,t){const a=t||{},s=(a.align||[]).concat(),l=a.stringLength||f4,u=[],d=[],f=[],m=[];let h=0,x=-1;for(;++x<e.length;){const v=[],A=[];let w=-1;for(e[x].length>h&&(h=e[x].length);++w<e[x].length;){const C=h4(e[x][w]);if(a.alignDelimiters!==!1){const R=l(C);A[w]=R,(m[w]===void 0||R>m[w])&&(m[w]=R)}v.push(C)}d[x]=v,f[x]=A}let g=-1;if(typeof s=="object"&&"length"in s)for(;++g<h;)u[g]=m1(s[g]);else{const v=m1(s);for(;++g<h;)u[g]=v}g=-1;const y=[],T=[];for(;++g<h;){const v=u[g];let A="",w="";v===99?(A=":",w=":"):v===108?A=":":v===114&&(w=":");let C=a.alignDelimiters===!1?1:Math.max(1,m[g]-A.length-w.length);const R=A+"-".repeat(C)+w;a.alignDelimiters!==!1&&(C=A.length+C+w.length,C>m[g]&&(m[g]=C),T[g]=C),y[g]=R}d.splice(1,0,y),f.splice(1,0,T),x=-1;const N=[];for(;++x<d.length;){const v=d[x],A=f[x];g=-1;const w=[];for(;++g<h;){const C=v[g]||"";let R="",U="";if(a.alignDelimiters!==!1){const V=m[g]-(A[g]||0),L=u[g];L===114?R=" ".repeat(V):L===99?V%2?(R=" ".repeat(V/2+.5),U=" ".repeat(V/2-.5)):(R=" ".repeat(V/2),U=R):U=" ".repeat(V)}a.delimiterStart!==!1&&!g&&w.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&C==="")&&(a.delimiterStart!==!1||g)&&w.push(" "),a.alignDelimiters!==!1&&w.push(R),w.push(C),a.alignDelimiters!==!1&&w.push(U),a.padding!==!1&&w.push(" "),(a.delimiterEnd!==!1||g!==h-1)&&w.push("|")}N.push(a.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return N.join(`
467
+ `)}function h4(e){return e==null?"":String(e)}function m1(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 h1={}.hasOwnProperty;function lT(e,t){const a=t||{};function s(l,...u){let d=s.invalid;const f=s.handlers;if(l&&h1.call(l,e)){const m=String(l[e]);d=h1.call(f,m)?f[m]:s.unknown}if(d)return d.call(this,l,...u)}return s.handlers=a.handlers||{},s.invalid=a.invalid,s.unknown=a.unknown,s}function p4(e,t,a,s){const l=a.enter("blockquote"),u=a.createTracker(s);u.move("> "),u.shift(2);const d=a.indentLines(a.containerFlow(e,u.current()),g4);return l(),d}function g4(e,t,a){return">"+(a?"":" ")+e}function b4(e,t){return p1(e,t.inConstruct,!0)&&!p1(e,t.notInConstruct,!1)}function p1(e,t,a){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return a;let s=-1;for(;++s<t.length;)if(e.includes(t[s]))return!0;return!1}function g1(e,t,a,s){let l=-1;for(;++l<a.unsafe.length;)if(a.unsafe[l].character===`
468
+ `&&b4(a.stack,a.unsafe[l]))return/[ \t]/.test(s.before)?"":" ";return`\\
469
+ `}function x4(e,t){const a=String(e);let s=a.indexOf(t),l=s,u=0,d=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===l?++u>d&&(d=u):u=1,l=s+t.length,s=a.indexOf(t,l);return d}function E4(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 y4(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 T4(e,t,a,s){const l=y4(a),u=e.value||"",d=l==="`"?"GraveAccent":"Tilde";if(E4(e,a)){const g=a.enter("codeIndented"),y=a.indentLines(u,_4);return g(),y}const f=a.createTracker(s),m=l.repeat(Math.max(x4(u,l)+1,3)),h=a.enter("codeFenced");let x=f.move(m);if(e.lang){const g=a.enter(`codeFencedLang${d}`);x+=f.move(a.safe(e.lang,{before:x,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=a.enter(`codeFencedMeta${d}`);x+=f.move(" "),x+=f.move(a.safe(e.meta,{before:x,after:`
470
+ `,encode:["`"],...f.current()})),g()}return x+=f.move(`
471
+ `),u&&(x+=f.move(u+`
472
+ `)),x+=f.move(m),h(),x}function _4(e,t,a){return(a?"":" ")+e}function Jh(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 N4(e,t,a,s){const l=Jh(a),u=l==='"'?"Quote":"Apostrophe",d=a.enter("definition");let f=a.enter("label");const m=a.createTracker(s);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?" ":`
473
+ `,...m.current()}))),f(),e.title&&(f=a.enter(`title${u}`),h+=m.move(" "+l),h+=m.move(a.safe(e.title,{before:h,after:l,...m.current()})),h+=m.move(l),f()),d(),h}function v4(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 Eo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ac(e,t,a){const s=Ui(e),l=Ui(t);return s===void 0?l===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}oT.peek=S4;function oT(e,t,a,s){const l=v4(a),u=a.enter("emphasis"),d=a.createTracker(s),f=d.move(l);let m=d.move(a.containerPhrasing(e,{after:l,before:f,...d.current()}));const h=m.charCodeAt(0),x=Ac(s.before.charCodeAt(s.before.length-1),h,l);x.inside&&(m=Eo(h)+m.slice(1));const g=m.charCodeAt(m.length-1),y=Ac(s.after.charCodeAt(0),g,l);y.inside&&(m=m.slice(0,-1)+Eo(g));const T=d.move(l);return u(),a.attentionEncodeSurroundingInfo={after:y.outside,before:x.outside},f+m+T}function S4(e,t,a){return a.options.emphasis||"*"}function A4(e,t){let a=!1;return Co(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return a=!0,uh}),!!((!e.depth||e.depth<3)&&$h(e)&&(t.options.setext||a))}function C4(e,t,a,s){const l=Math.max(Math.min(6,e.depth||1),1),u=a.createTracker(s);if(A4(e,a)){const x=a.enter("headingSetext"),g=a.enter("phrasing"),y=a.containerPhrasing(e,{...u.current(),before:`
474
+ `,after:`
475
+ `});return g(),x(),y+`
476
+ `+(l===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
477
+ `))+1))}const d="#".repeat(l),f=a.enter("headingAtx"),m=a.enter("phrasing");u.move(d+" ");let h=a.containerPhrasing(e,{before:"# ",after:`
478
+ `,...u.current()});return/^[\t ]/.test(h)&&(h=Eo(h.charCodeAt(0))+h.slice(1)),h=h?d+" "+h:d,a.options.closeAtx&&(h+=" "+d),m(),f(),h}uT.peek=w4;function uT(e){return e.value||""}function w4(){return"<"}cT.peek=k4;function cT(e,t,a,s){const l=Jh(a),u=l==='"'?"Quote":"Apostrophe",d=a.enter("image");let f=a.enter("label");const m=a.createTracker(s);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(" "+l),h+=m.move(a.safe(e.title,{before:h,after:l,...m.current()})),h+=m.move(l),f()),h+=m.move(")"),d(),h}function k4(){return"!"}dT.peek=R4;function dT(e,t,a,s){const l=e.referenceType,u=a.enter("imageReference");let d=a.enter("label");const f=a.createTracker(s);let m=f.move("![");const h=a.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(h+"]["),d();const x=a.stack;a.stack=[],d=a.enter("reference");const g=a.safe(a.associationId(e),{before:m,after:"]",...f.current()});return d(),a.stack=x,u(),l==="full"||!h||h!==g?m+=f.move(g+"]"):l==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function R4(){return"!"}fT.peek=O4;function fT(e,t,a){let s=e.value||"",l="`",u=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(s);)l+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++u<a.unsafe.length;){const d=a.unsafe[u],f=a.compilePattern(d);let m;if(d.atBreak)for(;m=f.exec(s);){let h=m.index;s.charCodeAt(h)===10&&s.charCodeAt(h-1)===13&&h--,s=s.slice(0,h)+" "+s.slice(m.index+1)}}return l+s+l}function O4(){return"`"}function mT(e,t){const a=$h(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))}hT.peek=I4;function hT(e,t,a,s){const l=Jh(a),u=l==='"'?"Quote":"Apostrophe",d=a.createTracker(s);let f,m;if(mT(e,a)){const x=a.stack;a.stack=[],f=a.enter("autolink");let g=d.move("<");return g+=d.move(a.containerPhrasing(e,{before:g,after:">",...d.current()})),g+=d.move(">"),f(),a.stack=x,g}f=a.enter("link"),m=a.enter("label");let h=d.move("[");return h+=d.move(a.containerPhrasing(e,{before:h,after:"](",...d.current()})),h+=d.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=a.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(a.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(m=a.enter("destinationRaw"),h+=d.move(a.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),m(),e.title&&(m=a.enter(`title${u}`),h+=d.move(" "+l),h+=d.move(a.safe(e.title,{before:h,after:l,...d.current()})),h+=d.move(l),m()),h+=d.move(")"),f(),h}function I4(e,t,a){return mT(e,a)?"<":"["}pT.peek=M4;function pT(e,t,a,s){const l=e.referenceType,u=a.enter("linkReference");let d=a.enter("label");const f=a.createTracker(s);let m=f.move("[");const h=a.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(h+"]["),d();const x=a.stack;a.stack=[],d=a.enter("reference");const g=a.safe(a.associationId(e),{before:m,after:"]",...f.current()});return d(),a.stack=x,u(),l==="full"||!h||h!==g?m+=f.move(g+"]"):l==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function M4(){return"["}function e0(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 D4(e){const t=e0(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 L4(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 gT(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 j4(e,t,a,s){const l=a.enter("list"),u=a.bulletCurrent;let d=e.ordered?L4(a):e0(a);const f=e.ordered?d==="."?")":".":D4(a);let m=t&&a.bulletLastUsed?d===a.bulletLastUsed:!1;if(!e.ordered){const x=e.children?e.children[0]:void 0;if((d==="*"||d==="-")&&x&&(!x.children||!x.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),gT(a)===d&&x){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&&(d=f),a.bulletCurrent=d;const h=a.containerFlow(e,s);return a.bulletLastUsed=d,a.bulletCurrent=u,l(),h}function B4(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 P4(e,t,a,s){const l=B4(a);let u=a.bulletCurrent||e0(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 d=u.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(d=Math.ceil(d/4)*4);const f=a.createTracker(s);f.move(u+" ".repeat(d-u.length)),f.shift(d);const m=a.enter("listItem"),h=a.indentLines(a.containerFlow(e,f.current()),x);return m(),h;function x(g,y,T){return y?(T?"":" ".repeat(d))+g:(T?u:u+" ".repeat(d-u.length))+g}}function U4(e,t,a,s){const l=a.enter("paragraph"),u=a.enter("phrasing"),d=a.containerPhrasing(e,s);return u(),l(),d}const H4=Ao(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function F4(e,t,a,s){return(e.children.some(function(d){return H4(d)})?a.containerPhrasing:a.containerFlow).call(a,e,s)}function z4(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}bT.peek=q4;function bT(e,t,a,s){const l=z4(a),u=a.enter("strong"),d=a.createTracker(s),f=d.move(l+l);let m=d.move(a.containerPhrasing(e,{after:l,before:f,...d.current()}));const h=m.charCodeAt(0),x=Ac(s.before.charCodeAt(s.before.length-1),h,l);x.inside&&(m=Eo(h)+m.slice(1));const g=m.charCodeAt(m.length-1),y=Ac(s.after.charCodeAt(0),g,l);y.inside&&(m=m.slice(0,-1)+Eo(g));const T=d.move(l+l);return u(),a.attentionEncodeSurroundingInfo={after:y.outside,before:x.outside},f+m+T}function q4(e,t,a){return a.options.strong||"*"}function Y4(e,t,a,s){return a.safe(e.value,s)}function $4(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 G4(e,t,a){const s=(gT(a)+(a.options.ruleSpaces?" ":"")).repeat($4(a));return a.options.ruleSpaces?s.slice(0,-1):s}const xT={blockquote:p4,break:g1,code:T4,definition:N4,emphasis:oT,hardBreak:g1,heading:C4,html:uT,image:cT,imageReference:dT,inlineCode:fT,link:hT,linkReference:pT,list:j4,listItem:P4,paragraph:U4,root:F4,strong:bT,text:Y4,thematicBreak:G4};function K4(){return{enter:{table:V4,tableData:b1,tableHeader:b1,tableRow:X4},exit:{codeText:W4,table:Q4,tableData:jm,tableHeader:jm,tableRow:jm}}}function V4(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 Q4(e){this.exit(e),this.data.inTable=void 0}function X4(e){this.enter({type:"tableRow",children:[]},e)}function jm(e){this.exit(e)}function b1(e){this.enter({type:"tableCell",children:[]},e)}function W4(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Z4));const a=this.stack[this.stack.length-1];a.type,a.value=t,this.exit(e)}function Z4(e,t){return t==="|"?t:e}function J4(e){const t=e||{},a=t.tableCellPadding,s=t.tablePipeAlign,l=t.stringLength,u=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
479
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:d,tableCell:m,tableRow:f}};function d(T,N,v,A){return h(x(T,v,A),T.align)}function f(T,N,v,A){const w=g(T,v,A),C=h([w]);return C.slice(0,C.indexOf(`
480
+ `))}function m(T,N,v,A){const w=v.enter("tableCell"),C=v.enter("phrasing"),R=v.containerPhrasing(T,{...A,before:u,after:u});return C(),w(),R}function h(T,N){return m4(T,{align:N,alignDelimiters:s,padding:a,stringLength:l})}function x(T,N,v){const A=T.children;let w=-1;const C=[],R=N.enter("table");for(;++w<A.length;)C[w]=g(A[w],N,v);return R(),C}function g(T,N,v){const A=T.children;let w=-1;const C=[],R=N.enter("tableRow");for(;++w<A.length;)C[w]=m(A[w],T,N,v);return R(),C}function y(T,N,v){let A=xT.inlineCode(T,N,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function eI(){return{exit:{taskListCheckValueChecked:x1,taskListCheckValueUnchecked:x1,paragraph:nI}}}function tI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:aI}}}function x1(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function nI(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 s=a.children[0];if(s&&s.type==="text"){const l=t.children;let u=-1,d;for(;++u<l.length;){const f=l[u];if(f.type==="paragraph"){d=f;break}}d===a&&(s.value=s.value.slice(1),s.value.length===0?a.children.shift():a.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,a.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function aI(e,t,a,s){const l=e.children[0],u=typeof e.checked=="boolean"&&l&&l.type==="paragraph",d="["+(e.checked?"x":" ")+"] ",f=a.createTracker(s);u&&f.move(d);let m=xT.listItem(e,t,a,{...s,...f.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),m;function h(x){return x+d}}function rI(){return[jO(),a4(),l4(),K4(),eI()]}function sI(e){return{extensions:[BO(),r4(e),o4(),J4(e),tI()]}}const iI={tokenize:fI,partial:!0},ET={tokenize:mI,partial:!0},yT={tokenize:hI,partial:!0},TT={tokenize:pI,partial:!0},lI={tokenize:gI,partial:!0},_T={name:"wwwAutolink",tokenize:cI,previous:vT},NT={name:"protocolAutolink",tokenize:dI,previous:ST},Cr={name:"emailAutolink",tokenize:uI,previous:AT},er={};function oI(){return{text:er}}let Ls=48;for(;Ls<123;)er[Ls]=Cr,Ls++,Ls===58?Ls=65:Ls===91&&(Ls=97);er[43]=Cr;er[45]=Cr;er[46]=Cr;er[95]=Cr;er[72]=[Cr,NT];er[104]=[Cr,NT];er[87]=[Cr,_T];er[119]=[Cr,_T];function uI(e,t,a){const s=this;let l,u;return d;function d(g){return!mh(g)||!AT.call(s,s.previous)||t0(s.events)?a(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return mh(g)?(e.consume(g),f):g===64?(e.consume(g),m):a(g)}function m(g){return g===46?e.check(lI,x,h)(g):g===45||g===95||Sn(g)?(u=!0,e.consume(g),m):x(g)}function h(g){return e.consume(g),l=!0,m}function x(g){return u&&l&&Ln(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):a(g)}}function cI(e,t,a){const s=this;return l;function l(d){return d!==87&&d!==119||!vT.call(s,s.previous)||t0(s.events)?a(d):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iI,e.attempt(ET,e.attempt(yT,u),a),a)(d))}function u(d){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(d)}}function dI(e,t,a){const s=this;let l="",u=!1;return d;function d(g){return(g===72||g===104)&&ST.call(s,s.previous)&&!t0(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(g),e.consume(g),f):a(g)}function f(g){if(Ln(g)&&l.length<5)return l+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const y=l.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||vc(g)||Rt(g)||qs(g)||Kc(g)?a(g):e.attempt(ET,e.attempt(yT,x),a)(g)}function x(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function fI(e,t,a){let s=0;return l;function l(d){return(d===87||d===119)&&s<3?(s++,e.consume(d),l):d===46&&s===3?(e.consume(d),u):a(d)}function u(d){return d===null?a(d):t(d)}}function mI(e,t,a){let s,l,u;return d;function d(h){return h===46||h===95?e.check(TT,m,f)(h):h===null||Rt(h)||qs(h)||h!==45&&Kc(h)?m(h):(u=!0,e.consume(h),d)}function f(h){return h===95?s=!0:(l=s,s=void 0),e.consume(h),d}function m(h){return l||s||!u?a(h):t(h)}}function hI(e,t){let a=0,s=0;return l;function l(d){return d===40?(a++,e.consume(d),l):d===41&&s<a?u(d):d===33||d===34||d===38||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===60||d===63||d===93||d===95||d===126?e.check(TT,t,u)(d):d===null||Rt(d)||qs(d)?t(d):(e.consume(d),l)}function u(d){return d===41&&s++,e.consume(d),l}}function pI(e,t,a){return s;function s(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),s):f===38?(e.consume(f),u):f===93?(e.consume(f),l):f===60||f===null||Rt(f)||qs(f)?t(f):a(f)}function l(f){return f===null||f===40||f===91||Rt(f)||qs(f)?t(f):s(f)}function u(f){return Ln(f)?d(f):a(f)}function d(f){return f===59?(e.consume(f),s):Ln(f)?(e.consume(f),d):a(f)}}function gI(e,t,a){return s;function s(u){return e.consume(u),l}function l(u){return Sn(u)?a(u):t(u)}}function vT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Rt(e)}function ST(e){return!Ln(e)}function AT(e){return!(e===47||mh(e))}function mh(e){return e===43||e===45||e===46||e===95||Sn(e)}function t0(e){let t=e.length,a=!1;for(;t--;){const s=e[t][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){a=!0;break}if(s._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const bI={tokenize:SI,partial:!0};function xI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:_I,continuation:{tokenize:NI},exit:vI}},text:{91:{name:"gfmFootnoteCall",tokenize:TI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:EI,resolveTo:yI}}}}function EI(e,t,a){const s=this;let l=s.events.length;const u=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let d;for(;l--;){const m=s.events[l][1];if(m.type==="labelImage"){d=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(!d||!d._balanced)return a(m);const h=Da(s.sliceSerialize({start:d.end,end:s.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 yI(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 s={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[a+1],e[a+2],["enter",s,t],e[a+3],e[a+4],["enter",l,t],["exit",l,t],["enter",u,t],["enter",d,t],["exit",d,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(a,e.length-a+1,...f),e}function TI(e,t,a){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let u=0,d;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&&!d||g===null||g===91||Rt(g))return a(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return l.includes(Da(s.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):a(g)}return Rt(g)||(d=!0),u++,e.consume(g),g===92?x:h}function x(g){return g===91||g===92||g===93?(e.consume(g),u++,h):h(g)}}function _I(e,t,a){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let u,d=0,f;return m;function m(N){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(N){return N===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",x):a(N)}function x(N){if(d>999||N===93&&!f||N===null||N===91||Rt(N))return a(N);if(N===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return u=Da(s.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Rt(N)||(f=!0),d++,e.consume(N),N===92?g:x}function g(N){return N===91||N===92||N===93?(e.consume(N),d++,x):x(N)}function y(N){return N===58?(e.enter("definitionMarker"),e.consume(N),e.exit("definitionMarker"),l.includes(u)||l.push(u),ct(e,T,"gfmFootnoteDefinitionWhitespace")):a(N)}function T(N){return t(N)}}function NI(e,t,a){return e.check(So,t,e.attempt(bI,t,a))}function vI(e){e.exit("gfmFootnoteDefinition")}function SI(e,t,a){const s=this;return ct(e,l,"gfmFootnoteDefinitionIndent",5);function l(u){const d=s.events[s.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?t(u):a(u)}}function AI(e){let a=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:u,resolveAll:l};return a==null&&(a=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function l(d,f){let m=-1;for(;++m<d.length;)if(d[m][0]==="enter"&&d[m][1].type==="strikethroughSequenceTemporary"&&d[m][1]._close){let h=m;for(;h--;)if(d[h][0]==="exit"&&d[h][1].type==="strikethroughSequenceTemporary"&&d[h][1]._open&&d[m][1].end.offset-d[m][1].start.offset===d[h][1].end.offset-d[h][1].start.offset){d[m][1].type="strikethroughSequence",d[h][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},d[h][1].start),end:Object.assign({},d[m][1].end)},g={type:"strikethroughText",start:Object.assign({},d[h][1].end),end:Object.assign({},d[m][1].start)},y=[["enter",x,f],["enter",d[h][1],f],["exit",d[h][1],f],["enter",g,f]],T=f.parser.constructs.insideSpan.null;T&&la(y,y.length,0,Vc(T,d.slice(h+1,m),f)),la(y,y.length,0,[["exit",g,f],["enter",d[m][1],f],["exit",d[m][1],f],["exit",x,f]]),la(d,h-1,m-h+3,y),m=h+y.length-2;break}}for(m=-1;++m<d.length;)d[m][1].type==="strikethroughSequenceTemporary"&&(d[m][1].type="data");return d}function u(d,f,m){const h=this.previous,x=this.events;let g=0;return y;function y(N){return h===126&&x[x.length-1][1].type!=="characterEscape"?m(N):(d.enter("strikethroughSequenceTemporary"),T(N))}function T(N){const v=Ui(h);if(N===126)return g>1?m(N):(d.consume(N),g++,T);if(g<2&&!a)return m(N);const A=d.exit("strikethroughSequenceTemporary"),w=Ui(N);return A._open=!w||w===2&&!!v,A._close=!v||v===2&&!!w,f(N)}}}class CI{constructor(){this.map=[]}add(t,a,s){wI(this,t,a,s)}consume(t){if(this.map.sort(function(u,d){return u[0]-d[0]}),this.map.length===0)return;let a=this.map.length;const s=[];for(;a>0;)a-=1,s.push(t.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),t.length=this.map[a][0];s.push(t.slice()),t.length=0;let l=s.pop();for(;l;){for(const u of l)t.push(u);l=s.pop()}this.map.length=0}}function wI(e,t,a,s){let l=0;if(!(a===0&&s.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=a,e.map[l][2].push(...s);return}l+=1}e.map.push([t,a,s])}}function kI(e,t){let a=!1;const s=[];for(;t<e.length;){const l=e[t];if(a){if(l[0]==="enter")l[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=s.length-1;s[u]=s[u]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(a=!0);t+=1}return s}function RI(){return{flow:{null:{name:"table",tokenize:OI,resolveAll:II}}}}function OI(e,t,a){const s=this;let l=0,u=0,d;return f;function f(j){let K=s.events.length-1;for(;K>-1;){const le=s.events[K][1].type;if(le==="lineEnding"||le==="linePrefix")K--;else break}const Z=K>-1?s.events[K][1].type:null,se=Z==="tableHead"||Z==="tableRow"?L:m;return se===L&&s.parser.lazy[s.now().line]?a(j):se(j)}function m(j){return e.enter("tableHead"),e.enter("tableRow"),h(j)}function h(j){return j===124||(d=!0,u+=1),x(j)}function x(j){return j===null?a(j):Ue(j)?u>1?(u=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),T):a(j):rt(j)?ct(e,x,"whitespace")(j):(u+=1,d&&(d=!1,l+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),d=!0,x):(e.enter("data"),g(j)))}function g(j){return j===null||j===124||Rt(j)?(e.exit("data"),x(j)):(e.consume(j),j===92?y:g)}function y(j){return j===92||j===124?(e.consume(j),g):g(j)}function T(j){return s.interrupt=!1,s.parser.lazy[s.now().line]?a(j):(e.enter("tableDelimiterRow"),d=!1,rt(j)?ct(e,N,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):N(j))}function N(j){return j===45||j===58?A(j):j===124?(d=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),v):V(j)}function v(j){return rt(j)?ct(e,A,"whitespace")(j):A(j)}function A(j){return j===58?(u+=1,d=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),w):j===45?(u+=1,w(j)):j===null||Ue(j)?U(j):V(j)}function w(j){return j===45?(e.enter("tableDelimiterFiller"),C(j)):V(j)}function C(j){return j===45?(e.consume(j),C):j===58?(d=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(j))}function R(j){return rt(j)?ct(e,U,"whitespace")(j):U(j)}function U(j){return j===124?N(j):j===null||Ue(j)?!d||l!==u?V(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):V(j)}function V(j){return a(j)}function L(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||Ue(j)?(e.exit("tableRow"),t(j)):rt(j)?ct(e,z,"whitespace")(j):(e.enter("data"),X(j))}function X(j){return j===null||j===124||Rt(j)?(e.exit("data"),z(j)):(e.consume(j),j===92?W:X)}function W(j){return j===92||j===124?(e.consume(j),X):X(j)}}function II(e,t){let a=-1,s=!0,l=0,u=[0,0,0,0],d=[0,0,0,0],f=!1,m=0,h,x,g;const y=new CI;for(;++a<e.length;){const T=e[a],N=T[1];T[0]==="enter"?N.type==="tableHead"?(f=!1,m!==0&&(E1(y,t,m,h,x),x=void 0,m=0),h={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},y.add(a,0,[["enter",h,t]])):N.type==="tableRow"||N.type==="tableDelimiterRow"?(s=!0,g=void 0,u=[0,0,0,0],d=[0,a+1,0,0],f&&(f=!1,x={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},y.add(a,0,[["enter",x,t]])),l=N.type==="tableDelimiterRow"?2:x?3:1):l&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")?(s=!1,d[2]===0&&(u[1]!==0&&(d[0]=d[1],g=Zu(y,t,u,l,void 0,g),u=[0,0,0,0]),d[2]=a)):N.type==="tableCellDivider"&&(s?s=!1:(u[1]!==0&&(d[0]=d[1],g=Zu(y,t,u,l,void 0,g)),u=d,d=[u[1],a,0,0])):N.type==="tableHead"?(f=!0,m=a):N.type==="tableRow"||N.type==="tableDelimiterRow"?(m=a,u[1]!==0?(d[0]=d[1],g=Zu(y,t,u,l,a,g)):d[1]!==0&&(g=Zu(y,t,d,l,a,g)),l=0):l&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(d[3]=a)}for(m!==0&&E1(y,t,m,h,x),y.consume(t.events),a=-1;++a<t.events.length;){const T=t.events[a];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=kI(t.events,a))}return e}function Zu(e,t,a,s,l,u){const d=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",f="tableContent";a[0]!==0&&(u.end=Object.assign({},Mi(t.events,a[0])),e.add(a[0],0,[["exit",u,t]]));const m=Mi(t.events,a[1]);if(u={type:d,start:Object.assign({},m),end:Object.assign({},m)},e.add(a[1],0,[["enter",u,t]]),a[2]!==0){const h=Mi(t.events,a[2]),x=Mi(t.events,a[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},x)};if(e.add(a[2],0,[["enter",g,t]]),s!==2){const y=t.events[a[2]],T=t.events[a[3]];if(y[1].end=Object.assign({},T[1].end),y[1].type="chunkText",y[1].contentType="text",a[3]>a[2]+1){const N=a[2]+1,v=a[3]-a[2]-1;e.add(N,v,[])}}e.add(a[3]+1,0,[["exit",g,t]])}return l!==void 0&&(u.end=Object.assign({},Mi(t.events,l)),e.add(l,0,[["exit",u,t]]),u=void 0),u}function E1(e,t,a,s,l){const u=[],d=Mi(t.events,a);l&&(l.end=Object.assign({},d),u.push(["exit",l,t])),s.end=Object.assign({},d),u.push(["exit",s,t]),e.add(a+1,0,u)}function Mi(e,t){const a=e[t],s=a[0]==="enter"?"start":"end";return a[1][s]}const MI={name:"tasklistCheck",tokenize:LI};function DI(){return{text:{91:MI}}}function LI(e,t,a){const s=this;return l;function l(m){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?a(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),u)}function u(m){return Rt(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),d):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),d):a(m)}function d(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):a(m)}function f(m){return Ue(m)?t(m):rt(m)?e.check({tokenize:jI},t,a)(m):a(m)}}function jI(e,t,a){return ct(e,s,"whitespace");function s(l){return l===null?a(l):t(l)}}function BI(e){return Ly([oI(),xI(),AI(e),RI(),DI()])}const PI={};function cs(e){const t=this,a=e||PI,s=t.data(),l=s.micromarkExtensions||(s.micromarkExtensions=[]),u=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),d=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);l.push(BI(a)),u.push(rI()),d.push(sI(a))}const UI=5*1024*1024,y1=10,CT=["image/png","image/jpeg","image/gif","image/webp"];let HI=0;function FI(e){return new Promise((t,a)=>{const s=new FileReader;s.onload=()=>t(String(s.result)),s.onerror=()=>a(s.error),s.readAsDataURL(e)})}function zI({url:e,label:t,onClose:a}){return S.useEffect(()=>{const s=l=>{l.key==="Escape"&&(l.preventDefault(),a())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[a]),o.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:o.jsx("img",{src:e,alt:t,className:"max-h-full max-w-full object-contain"})})}function wT({url:e,label:t,className:a}){const[s,l]=S.useState(!1);return o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",onClick:()=>l(!0),"aria-label":`预览 ${t}`,className:"block cursor-zoom-in rounded-md transition-opacity duration-150 hover:opacity-80",children:o.jsx("img",{src:e,alt:t,className:oe("rounded-md border border-line",a)})}),s&&o.jsx(zI,{url:e,label:t,onClose:()=>l(!1)})]})}function kT(e=!0){const[t,a]=S.useState([]),[s,l]=S.useState(null);S.useEffect(()=>{l(null),e||a([])},[e]);const u=async x=>{const g=[],y=[],T=t.length;let N=y1-T;for(const v of x){if(N<=0){y.push(`最多 ${y1} 张图片`);break}if(!CT.includes(v.type)){y.push(`${v.name||"文件"}:格式不支持`);continue}if(v.size>UI){y.push(`${v.name}:超过 5MB`);continue}g.push({_id:`att-${++HI}`,mime:v.type,url:await FI(v),filename:v.name}),N--}g.length>0&&a(v=>[...v,...g]),l(y.length>0?y.join(";"):null)},d=x=>{const g=Array.from(x.clipboardData.files);if(g.length!==0){if(x.preventDefault(),!e){l("当前模型不支持图片");return}u(g)}},f=x=>a(g=>g.filter(y=>y._id!==x)),m=S.useCallback(()=>{a([]),l(null)},[]),h=t.map(({mime:x,url:g,filename:y})=>({mime:x,url:g,filename:y}));return{attachments:t,promptFiles:h,error:s,setError:l,addFiles:u,onPaste:d,remove:f,clear:m}}function RT({onFiles:e,disabled:t,allowed:a}){const s=S.useRef(null);return o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:s,type:"file",accept:CT.join(","),multiple:!0,hidden:!0,onChange:l=>{e(Array.from(l.target.files??[])),l.target.value=""}}),o.jsx("button",{type:"button",onClick:()=>{var l;return(l=s.current)==null?void 0:l.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:o.jsx(zA,{className:"h-4 w-4"})})]})}function OT({attachments:e,error:t,onRemove:a,className:s}){return e.length===0&&!t?null:o.jsxs("div",{className:s,children:[e.length>0&&o.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:e.map(l=>o.jsxs("div",{className:"group relative",children:[o.jsx(wT,{url:l.url,label:l.filename??"attachment",className:"h-16 w-16 object-cover"}),o.jsx("button",{type:"button",onClick:()=>a(l._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:o.jsx(gt,{className:"h-2.5 w-2.5",strokeWidth:2.5})})]},l._id))}),t&&o.jsx("div",{className:"mb-2 font-mono text-[11px] text-red-400",children:t})]})}function n0(e){const[t,a]=S.useState("fit"),s=t==="wide";return o.jsxs("div",{className:`md-table-wrap ${s?"md-table-wide":"md-table-fit"}`,children:[o.jsxs("button",{type:"button",className:"md-table-toggle",title:s?"适应屏幕":"超宽展开",onClick:()=>a(s?"fit":"wide"),children:[s?o.jsx(s3,{className:"h-3 w-3"}):o.jsx(VA,{className:"h-3 w-3"}),o.jsx("span",{children:s?"适应屏幕":"超宽展开"})]}),o.jsx("div",{className:"md-table-scroll",children:o.jsx("table",{...e})})]})}const ji=Za(e=>({agents:[],loaded:!1,loadAgents:async()=>{const t=He.getState().activeRepoId;try{const a=t?await TC(t):await oy();e({agents:a,loaded:!0})}catch{e({loaded:!0})}},createAgent:async(t,a)=>{const s=a?await _C(a,t):await uy(t);return e(l=>({agents:[...l.agents,s]})),s},updateAgent:async(t,a)=>{const s=await cy(t,a);e(l=>({agents:l.agents.map(u=>u.id===t?s:u)}))},deleteAgent:async t=>{await dy(t),e(a=>({agents:a.agents.filter(s=>s.id!==t)}))}}));function qI(e){if(typeof e!="string")return e;const t=e.trim();if(t)try{return JSON.parse(t)}catch{return t}}function hn(e){return e&&typeof e=="object"?e:null}function Gs(e){const t=hn(e);return t&&"properties"in t?t.properties:e}function YI(e){const t=hn(e);return typeof(t==null?void 0:t.type)=="string"?t.type:void 0}function $I(e){const t=hn(Gs(e));if(!t)return null;const a=hn(t.info);if(a&&typeof a.id=="string"){const l=Array.isArray(t.parts)?t.parts:void 0;return{...a,...l?{parts:l}:{}}}if(typeof t.id=="string"&&typeof t.role=="string")return t;const s=hn(t.message);return s&&typeof s.id=="string"?s:null}function GI(e){const t=hn(Gs(e));if(!t)return{};const a=hn(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 KI(e){const t=hn(Gs(e));if(!t||t.field!=="text")return null;const a=typeof t.messageID=="string"?t.messageID:null,s=typeof t.partID=="string"?t.partID:null,l=typeof t.delta=="string"?t.delta:null;return!a||!s||l===null?null:{messageId:a,partId:s,delta:l}}function VI(e){const t=Gs(e);if(Array.isArray(t))return t;const a=hn(t);return a&&Array.isArray(a.todos)?a.todos:[]}function $a(e){return typeof e=="number"?e:0}function QI(e){const t=hn(Gs(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 s=typeof t.parentID=="string"?t.parentID:typeof t.parent_id=="string"?t.parent_id:void 0;s&&(a.parentID=s);const l=hn(t.tokens),u=typeof t.tokens_input=="number"||typeof t.tokens_output=="number";if(l||u){const f=l?hn(l.cache):null;a.tokens={input:$a(l==null?void 0:l.input)||$a(t.tokens_input),output:$a(l==null?void 0:l.output)||$a(t.tokens_output),reasoning:$a(l==null?void 0:l.reasoning)||$a(t.tokens_reasoning),cache:{read:$a(f==null?void 0:f.read)||$a(t.tokens_cache_read),write:$a(f==null?void 0:f.write)||$a(t.tokens_cache_write)}}}const d=hn(t.model);return d&&(a.model={providerID:typeof d.providerID=="string"?d.providerID:void 0,modelID:typeof d.modelID=="string"?d.modelID:void 0,variant:typeof d.variant=="string"?d.variant:void 0}),a}function XI(e){const t=hn(Gs(e));if(!t)return null;if(typeof t.message=="string")return t.message;const a=hn(t.error);if(a){const s=hn(a.data);if(typeof(s==null?void 0:s.message)=="string")return`${a.name??"Error"}: ${s.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 WI(e){const t=Gs(e);if(typeof t=="string")return t;const a=hn(t);if(typeof(a==null?void 0:a.status)=="string")return a.status;const s=hn(a==null?void 0:a.status);return typeof(s==null?void 0:s.type)=="string"?s.type:typeof(a==null?void 0:a.type)=="string"?a.type:null}function ZI(e,t,a,s){switch(e==="message"||e===""?YI(t)??e:e){case"message.updated":{const u=$I(t);u&&s.updateMessage(a,u);break}case"session.updated":{const u=QI(t);u&&s.updateSessionInfo(u);break}case"message.part.updated":{const{messageId:u,part:d}=GI(t);d&&u&&s.updateMessagePart(a,u,d);break}case"message.part.delta":{const u=KI(t);u&&s.appendMessagePartDelta(a,u.messageId,u.partId,u.delta);break}case"todo.updated":{s.updateTodos(a,VI(t));break}case"session.status":{const u=WI(t);u&&s.setSessionStatus(a,u);break}case"session.idle":{s.setSessionStatus(a,"idle");break}case"session.error":{const u=XI(t);s.setSessionStatus(a,"error",u??void 0);break}}}const JI=600*1e3;class e6{constructor(t,a){rn(this,"sessionId");rn(this,"idleTimer",null);rn(this,"active",!1);rn(this,"alive",!0);rn(this,"callbacks");this.sessionId=t,this.callbacks=a,this.resetIdleTimer()}dispatch(t,a){if(!this.alive)return;this.resetIdleTimer();const s=Ie.getState();ZI(t,a,this.sessionId,s)}activate(){this.active=!0,this.clearIdleTimer()}deactivate(){this.active=!1,this.resetIdleTimer()}refreshOnIdle(){Ie.getState().refreshSessionData(this.sessionId)}stop(){this.alive=!1,this.clearIdleTimer()}resetIdleTimer(){this.clearIdleTimer(),!this.active&&(this.idleTimer=setTimeout(()=>{this.callbacks.onWorkerIdle(this.sessionId)},JI))}clearIdleTimer(){this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null)}}const t6=1e3,n6=3e4;class a6{constructor(t,a){rn(this,"source",null);rn(this,"reconnectTimer",null);rn(this,"attempts",0);rn(this,"disposed",!1);rn(this,"repoId");rn(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=YC(this.repoId),a=new EventSource(t);this.source=a,a.onopen=()=>{this.attempts=0},a.onmessage=l=>{this.handleRaw("message",l)};const s=["message.updated","message.part.updated","message.part.delta","message.removed","todo.updated","session.status","session.idle","session.error","session.updated"];for(const l of s)a.addEventListener(l,u=>{this.handleRaw(l,u)});a.onerror=()=>{if(!(this.disposed||!this.source)&&this.source.readyState===EventSource.CLOSED){this.source.close(),this.source=null;const l=Math.min(t6*2**this.attempts,n6);this.attempts++,this.reconnectTimer=setTimeout(()=>this.connect(),l)}}}handleRaw(t,a){if(!(a instanceof MessageEvent))return;const s=qI(a.data);if(s===void 0)return;const l=this.extractSessionId(s);if(!l)return;let u=t;if(t==="message"||t===""){const d=s&&typeof s=="object"?s:null;typeof(d==null?void 0:d.type)=="string"&&(u=d.type)}this.onEvent(l,u,s)}extractSessionId(t){if(!t||typeof t!="object")return null;const a=t;if(a.properties&&typeof a.properties=="object"){const s=a.properties;if(typeof s.sessionID=="string")return s.sessionID;if(typeof s.id=="string")return s.id}return typeof a.sessionID=="string"?a.sessionID:typeof a.sessionId=="string"?a.sessionId:null}}const r6=6e4;class s6{constructor(t){rn(this,"timer",null);rn(this,"paused",!1);rn(this,"callbacks");this.callbacks=t}start(){this.tick(),this.timer=setInterval(()=>{this.paused||this.tick()},r6)}stop(){this.timer&&(clearInterval(this.timer),this.timer=null)}pause(){this.paused=!0}resume(){this.paused=!1,this.tick()}tick(){const t=He.getState().activeRepoId;t&&(Ie.getState().loadSessions(),$C(t).then(a=>{const s={};for(const[l,u]of Object.entries(a))s[l]=u.type??"idle";Ie.getState().bulkSetStatuses(s);for(const[l,u]of Object.entries(s))(u==="busy"||u==="retry")&&this.callbacks.ensureWorker(l)}).catch(()=>{}))}}class i6{constructor(){rn(this,"workers",new Map);rn(this,"dispatcher",null);rn(this,"supervisor",null);rn(this,"visibilityHandler",null)}start(t){this.stop();const a={onWorkerIdle:s=>this.removeWorker(s)};this.dispatcher=new a6(t,(s,l,u)=>{const d=this.ensureWorker(s,a);if(l==="session.idle"||l==="session.status"){const f=Ie.getState().sessionStatuses[s];d.dispatch(l,u);const m=Ie.getState().sessionStatuses[s];f&&f!=="idle"&&m==="idle"&&d.refreshOnIdle()}else d.dispatch(l,u)}),this.dispatcher.start(),this.supervisor=new s6({ensureWorker:s=>this.ensureWorker(s,a)}),this.supervisor.start(),this.visibilityHandler=()=>{var s,l;document.hidden?(s=this.supervisor)==null||s.pause():(l=this.supervisor)==null||l.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 s of this.workers.values())s.stop();this.workers.clear(),this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null)}activateSession(t){for(const l of this.workers.values())l.sessionId!==t&&l.deactivate();if(!t)return;const a={onWorkerIdle:l=>this.removeWorker(l)};this.ensureWorker(t,a).activate(),Ie.getState().refreshSessionData(t)}deactivateSession(t){var a;(a=this.workers.get(t))==null||a.deactivate()}ensureWorker(t,a){let s=this.workers.get(t);return s||(s=new e6(t,a),this.workers.set(t,s)),s}removeWorker(t){const a=Ie.getState().activeSessionId;if(t===a)return;const s=this.workers.get(t);s&&(s.stop(),this.workers.delete(t))}}const Cc=new i6,T1=(function(e,t,a){const s=Ao(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(s(e.children[t],t,e))return e.children[t]}),Ks=(function(e){if(e==null)return u6;if(typeof e=="string")return o6(e);if(typeof e=="object")return l6(e);if(typeof e=="function")return a0(e);throw new Error("Expected function, string, or array as `test`")});function l6(e){const t=[];let a=-1;for(;++a<e.length;)t[a]=Ks(e[a]);return a0(s);function s(...l){let u=-1;for(;++u<t.length;)if(t[u].apply(this,l))return!0;return!1}}function o6(e){return a0(t);function t(a){return a.tagName===e}}function a0(e){return t;function t(a,s,l){return!!(c6(a)&&e.call(this,a,typeof s=="number"?s:void 0,l||void 0))}}function u6(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function c6(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const _1=/\n/g,N1=/[\t ]+/g,hh=Ks("br"),v1=Ks(x6),d6=Ks("p"),S1=Ks("tr"),f6=Ks(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",b6,E6]),IT=Ks(["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 m6(e,t){const a=t||{},s="children"in e?e.children:[],l=IT(e),u=LT(e,{whitespace:a.whitespace||"normal"}),d=[];(e.type==="text"||e.type==="comment")&&d.push(...DT(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<s.length;)d.push(...MT(s[f],e,{whitespace:u,breakBefore:f?void 0:l,breakAfter:f<s.length-1?hh(s[f+1]):l}));const m=[];let h;for(f=-1;++f<d.length;){const x=d[f];typeof x=="number"?h!==void 0&&x>h&&(h=x):x&&(h!==void 0&&h>-1&&m.push(`
481
+ `.repeat(h)||" "),h=-1,m.push(x))}return m.join("")}function MT(e,t,a){return e.type==="element"?h6(e,t,a):e.type==="text"?a.whitespace==="normal"?DT(e,a):p6(e):[]}function h6(e,t,a){const s=LT(e,a),l=e.children||[];let u=-1,d=[];if(f6(e))return d;let f,m;for(hh(e)||S1(e)&&T1(t,e,S1)?m=`
482
+ `:d6(e)?(f=2,m=2):IT(e)&&(f=1,m=1);++u<l.length;)d=d.concat(MT(l[u],e,{whitespace:s,breakBefore:u?void 0:f,breakAfter:u<l.length-1?hh(l[u+1]):m}));return v1(e)&&T1(t,e,v1)&&d.push(" "),f&&d.unshift(f),m&&d.push(m),d}function DT(e,t){const a=String(e.value),s=[],l=[];let u=0;for(;u<=a.length;){_1.lastIndex=u;const m=_1.exec(a),h=m&&"index"in m?m.index:a.length;s.push(g6(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 d=-1,f;for(;++d<s.length;)s[d].charCodeAt(s[d].length-1)===8203||d<s.length-1&&s[d+1].charCodeAt(0)===8203?(l.push(s[d]),f=void 0):s[d]?(typeof f=="number"&&l.push(f),l.push(s[d]),f=0):(d===0||d===s.length-1)&&l.push(0);return l}function p6(e){return[String(e.value)]}function g6(e,t,a){const s=[];let l=0,u;for(;l<e.length;){N1.lastIndex=l;const d=N1.exec(e);u=d?d.index:e.length,!l&&!u&&d&&!t&&s.push(""),l!==u&&s.push(e.slice(l,u)),l=d?u+d[0].length:u}return l!==u&&!a&&s.push(""),s.join(" ")}function LT(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 b6(e){return!!(e.properties||{}).hidden}function x6(e){return e.tagName==="td"||e.tagName==="th"}function E6(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function y6(e){const t=e.regex,a=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",d="(?!struct)("+s+"|"+t.optional(l)+"[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})"/})]},x={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(l)+e.IDENT_RE,relevance:0},T=t.optional(l)+e.IDENT_RE+"\\s*\\(",N=["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"],v=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],A=["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"],w=["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"],U={type:v,keyword:N,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:A},V={className:"function.dispatch",relevance:0,keywords:{_hint:w},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},L=[V,g,f,a,e.C_BLOCK_COMMENT_MODE,x,h],z={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:U,contains:L.concat([{begin:/\(/,end:/\)/,keywords:U,contains:L.concat(["self"]),relevance:0}]),relevance:0},X={className:"function",begin:"("+d+"[\\*&\\s]+)+"+T,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:U,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:U,relevance:0},{begin:T,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,x]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:U,relevance:0,contains:[a,e.C_BLOCK_COMMENT_MODE,h,x,f,{begin:/\(/,end:/\)/,keywords:U,relevance:0,contains:["self",a,e.C_BLOCK_COMMENT_MODE,h,x,f]}]},f,a,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:U,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(z,X,V,L,[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:U,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:U},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function T6(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=y6(e),s=a.keywords;return s.type=[...s.type,...t.type],s.literal=[...s.literal,...t.literal],s.built_in=[...s.built_in,...t.built_in],s._hints=t._hints,a.name="Arduino",a.aliases=["ino"],a.supersetOf="cpp",a}function _6(e){const t=e.regex,a={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[a]}]};Object.assign(a,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},u=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),d={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,l]};l.contains.push(f);const m={match:/\\"/},h={className:"string",begin:/'/,end:/'/},x={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"],T=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),N={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},v=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],A=["true","false"],w={match:/(\/[a-z._-]+)+/},C=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],R=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],U=["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"],V=["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:v,literal:A,built_in:[...C,...R,"set","shopt",...U,...V]},contains:[T,e.SHEBANG(),N,g,u,d,w,f,m,h,x,a]}}function N6(e){const t=e.regex,a=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",d="("+s+"|"+t.optional(l)+"[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})"/})]},x={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(l)+e.IDENT_RE,relevance:0},T=t.optional(l)+e.IDENT_RE+"\\s*\\(",A={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"},w=[g,f,a,e.C_BLOCK_COMMENT_MODE,x,h],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:A,contains:w.concat([{begin:/\(/,end:/\)/,keywords:A,contains:w.concat(["self"]),relevance:0}]),relevance:0},R={begin:"("+d+"[\\*&\\s]+)+"+T,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:A,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:A,relevance:0},{begin:T,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:[a,e.C_BLOCK_COMMENT_MODE,h,x,f,{begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:["self",a,e.C_BLOCK_COMMENT_MODE,h,x,f]}]},f,a,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:A,disableAutodetect:!0,illegal:"</",contains:[].concat(C,R,w,[g,{begin:e.IDENT_RE+"::",keywords:A},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:h,keywords:A}}}function v6(e){const t=e.regex,a=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",d="(?!struct)("+s+"|"+t.optional(l)+"[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})"/})]},x={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(l)+e.IDENT_RE,relevance:0},T=t.optional(l)+e.IDENT_RE+"\\s*\\(",N=["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"],v=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],A=["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"],w=["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"],U={type:v,keyword:N,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:A},V={className:"function.dispatch",relevance:0,keywords:{_hint:w},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},L=[V,g,f,a,e.C_BLOCK_COMMENT_MODE,x,h],z={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:U,contains:L.concat([{begin:/\(/,end:/\)/,keywords:U,contains:L.concat(["self"]),relevance:0}]),relevance:0},X={className:"function",begin:"("+d+"[\\*&\\s]+)+"+T,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:U,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:U,relevance:0},{begin:T,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,x]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:U,relevance:0,contains:[a,e.C_BLOCK_COMMENT_MODE,h,x,f,{begin:/\(/,end:/\)/,keywords:U,relevance:0,contains:["self",a,e.C_BLOCK_COMMENT_MODE,h,x,f]}]},f,a,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:U,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(z,X,V,L,[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:U,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:U},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function S6(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"],s=["default","false","null","true"],l=["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"],d={keyword:l.concat(u),built_in:t,literal:s},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},x={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=e.inherit(x,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:d},T=e.inherit(y,{illegal:/\n/}),N={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,T]},v={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},A=e.inherit(v,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},T]});y.contains=[v,N,x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,e.C_BLOCK_COMMENT_MODE],T.contains=[A,N,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const w={variants:[h,v,N,x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},C={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},R=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",U={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:d,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"}},w,m,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,C,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,C,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:"("+R+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:d,contains:[{beginKeywords:a.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,C],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,relevance:0,contains:[w,m,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},U]}}const A6=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_-]*/}}),C6=["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"],w6=["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"],k6=[...C6,...w6],R6=["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(),O6=["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(),I6=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),M6=["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 D6(e){const t=e.regex,a=A6(e),s={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l="and or not only",u=/@-?\w[\w]*(-\w+)*/,d="[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,s,a.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+d,relevance:0},a.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+O6.join("|")+")"},{begin:":(:)?("+I6.join("|")+")"}]},a.CSS_VARIABLE,{className:"attribute",begin:"\\b("+M6.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:l,attribute:R6.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,a.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+k6.join("|")+")\\b"}]}}function L6(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 j6(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 B6(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 P6(e){const t=e.regex,a={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},s=e.COMMENT();s.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const l={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},u={className:"literal",begin:/\bon|off|true|false|yes|no\b/},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[s,u,l,d,a,"self"],relevance:0},m=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,x=/'[^']*'/,g=t.either(m,h,x),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:[s,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[s,f,u,l,d,a]}}]}}var Di="[0-9](_*[0-9])*",Ju=`\\.(${Di})`,ec="[0-9a-fA-F](_*[0-9a-fA-F])*",A1={className:"number",variants:[{begin:`(\\b(${Di})((${Ju})|\\.)?|(${Ju}))[eE][+-]?(${Di})[fFdD]?\\b`},{begin:`\\b(${Di})((${Ju})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Ju})[fFdD]?\\b`},{begin:`\\b(${Di})[fFdD]\\b`},{begin:`\\b0[xX]((${ec})\\.?|(${ec})?\\.(${ec}))[pP][+-]?(${Di})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ec})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function jT(e,t,a){return a===-1?"":e.replace(t,s=>jT(e,t,a-1))}function U6(e){const t=e.regex,a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",s=a+jT("(?:<"+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"]}]},x={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:[x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+s+"\\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,A1,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},A1,h]}}const C1="[A-Za-z$_][0-9A-Za-z$_]*",H6=["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"],F6=["true","false","null","undefined","NaN","Infinity"],BT=["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"],PT=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],UT=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],z6=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],q6=[].concat(UT,BT,PT);function Y6(e){const t=e.regex,a=(ee,{after:_e})=>{const P="</"+ee[0].slice(1);return ee.input.indexOf(P,_e)!==-1},s=C1,l={begin:"<>",end:"</>"},u=/<[A-Za-z0-9\\._:-]+\s*\/>/,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ee,_e)=>{const P=ee[0].length+ee.index,I=ee.input[P];if(I==="<"||I===","){_e.ignoreMatch();return}I===">"&&(a(ee,{after:P})||_e.ignoreMatch());let ie;const D=ee.input.substring(P);if(ie=D.match(/^\s*=/)){_e.ignoreMatch();return}if((ie=D.match(/^\s+extends\s+/))&&ie.index===0){_e.ignoreMatch();return}}},f={$pattern:C1,keyword:H6,literal:F6,built_in:q6,"variable.language":z6},m="[0-9](_?[0-9])*",h=`\\.(${m})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${x})((${h})|\\.)?|(${h}))[eE][+-]?(${m})\\b`},{begin:`\\b(${x})\\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:[]},T={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},N={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},v={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},A={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},C={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:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,T,N,v,A,{match:/\$\d+/},g];y.contains=R.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(R)});const U=[].concat(C,y.contains),V=U.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(U)}]),L={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:V},z={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},X={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:{_:[...BT,...PT]}},W={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Z(ee){return t.concat("(?!",ee.join("|"),")")}const se={match:t.concat(/\b/,Z([...UT,"super","import"].map(ee=>`${ee}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},le={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ae={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:V,CLASS_REFERENCE:X},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),W,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,T,N,v,A,C,{match:/\$\d+/},g,X,{scope:"attr",match:s+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:F,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:V}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:u},{begin:d.begin,"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{begin:d.begin,end:d.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:[L,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},le,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},se,K,z,ae,{match:/\$[(.]/}]}}function $6(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},a={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],l={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[t,a,e.QUOTE_STRING_MODE,l,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Li="[0-9](_*[0-9])*",tc=`\\.(${Li})`,nc="[0-9a-fA-F](_*[0-9a-fA-F])*",G6={className:"number",variants:[{begin:`(\\b(${Li})((${tc})|\\.)?|(${tc}))[eE][+-]?(${Li})[fFdD]?\\b`},{begin:`\\b(${Li})((${tc})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${tc})[fFdD]?\\b`},{begin:`\\b(${Li})[fFdD]\\b`},{begin:`\\b0[xX]((${nc})\\.?|(${nc})?\\.(${nc}))[pP][+-]?(${Li})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${nc})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function K6(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+/}]}},s={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},l={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},u={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[u,l]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,u,l]}]};l.contains.push(d);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(d,{className:"string"}),"self"]}]},h=G6,x=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,x,a,s,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,x],relevance:0},e.C_LINE_COMMENT_MODE,x,f,m,d,e.C_NUMBER_MODE]},x]},{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]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
483
+ `},h]}}const V6=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_-]*/}}),Q6=["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"],X6=["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"],W6=[...Q6,...X6],Z6=["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(),HT=["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(),FT=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),J6=["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(),eM=HT.concat(FT).sort().reverse();function tM(e){const t=V6(e),a=eM,s="and or not only",l="[\\w-]+",u="("+l+"|@\\{"+l+"\\})",d=[],f=[],m=function(R){return{className:"string",begin:"~?"+R+".*?"+R}},h=function(R,U,V){return{className:R,begin:U,relevance:V}},x={$pattern:/[a-z-]+/,keyword:s,attribute:Z6.join(" ")},g={begin:"\\(",end:"\\)",contains:f,keywords:x,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","@@?"+l,10),h("variable","@\\{"+l+"\\}"),h("built_in","~?`[^`]*?`"),{className:"attribute",begin:l+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const y=f.concat({begin:/\{/,end:/\}/,contains:d}),T={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},N={begin:u+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+J6.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},v={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:x,returnEnd:!0,contains:f,relevance:0}},A={className:"variable",variants:[{begin:"@"+l+"\\s*:",relevance:15},{begin:"@"+l}],starts:{end:"[;}]",returnEnd:!0,contains:y}},w={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:u,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,T,h("keyword","all\\b"),h("variable","@\\{"+l+"\\}"),{begin:"\\b("+W6.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:":("+HT.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+FT.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:y},{begin:"!important"},t.FUNCTION_DISPATCH]},C={begin:l+`:(:)?(${a.join("|")})`,returnBegin:!0,contains:[w]};return d.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,A,C,N,w,T,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:d}}function nM(e){const t="\\[=*\\[",a="\\]=*\\]",s={begin:t,end:a,contains:["self"]},l=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,a,{contains:[s],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:l.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:l}].concat(l)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:a,contains:[s],relevance:5}])}}function aM(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]},s={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]},l={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},u={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},d={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,s,l,u,d]}}function rM(e){const t=e.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},l={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},d={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}/}]},x={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=e.inherit(h,{contains:[]}),y=e.inherit(x,{contains:[]});h.contains.push(y),x.contains.push(g);let T=[a,m];return[h,x,g,y].forEach(w=>{w.contains=w.contains.concat(T)}),T=T.concat(h,x),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:T},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:T}]}]},a,u,h,x,{className:"quote",begin:"^>\\s+",contains:T,end:"$"},l,s,m,d,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function sM(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 iM(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"],s=/[dualxmsipngr]{0,12}/,l={$pattern:/[\w.]+/,keyword:a.join(" ")},u={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:l},d={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},x=[e.BACKSLASH_ESCAPE,u,m],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(v,A,w="\\1")=>{const C=w==="\\1"?w:t.concat(w,A);return t.concat(t.concat("(?:",v,")"),A,/(?:\\.|[^\\\/])*?/,C,/(?:\\.|[^\\\/])*?/,w,s)},T=(v,A,w)=>t.concat(t.concat("(?:",v,")"),A,/(?:\\.|[^\\\/])*?/,w,s),N=[m,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),d,{className:"string",contains:x,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:T("(?:m|qr)?",/\//,/\//)},{begin:T("m|qr",t.either(...g,{capture:!0}),/\1/)},{begin:T("m|qr",/\(/,/\)/)},{begin:T("m|qr",/\[/,/\]/)},{begin:T("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=N,d.contains=N,{name:"Perl",aliases:["pl","pm"],keywords:l,contains:N}}function lM(e){const t=e.regex,a=/(?![A-Za-z0-9])(?![$])/,s=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,a),l=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),d={scope:"variable",match:"\\$+"+s},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}),x=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":(le,ae)=>{ae.data._beginMatch=le[1]||le[2]},"on:end":(le,ae)=>{ae.data._beginMatch!==le[1]&&ae.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),T=`[
484
+ ]`,N={scope:"string",variants:[x,h,g,y]},v={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},A=["false","null","true"],w=["__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"],C=["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"],U={keyword:w,literal:(le=>{const ae=[];return le.forEach(F=>{ae.push(F),F.toLowerCase()===F?ae.push(F.toUpperCase()):ae.push(F.toLowerCase())}),ae})(A),built_in:C},V=le=>le.map(ae=>ae.replace(/\|\d+$/,"")),L={variants:[{match:[/new/,t.concat(T,"+"),t.concat("(?!",V(C).join("\\b|"),"\\b)"),l],scope:{1:"keyword",4:"title.class"}}]},z=t.concat(s,"\\b(?!\\()"),X={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),z],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[l,t.concat(/::/,t.lookahead(/(?!class\b)/)),z],scope:{1:"title.class",3:"variable.constant"}},{match:[l,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[l,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},W={scope:"attr",match:t.concat(s,t.lookahead(":"),t.lookahead(/(?!::)/))},j={relevance:0,begin:/\(/,end:/\)/,keywords:U,contains:[W,d,X,e.C_BLOCK_COMMENT_MODE,N,v,L]},K={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",V(w).join("\\b|"),"|",V(C).join("\\b|"),"\\b)"),s,t.concat(T,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[j]};j.contains.push(K);const Z=[W,X,e.C_BLOCK_COMMENT_MODE,N,v,L],se={begin:t.concat(/#\[\s*\\?/,t.either(l,u)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:A,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:A,keyword:["new","array"]},contains:["self",...Z]},...Z,{scope:"meta",variants:[{match:l},{match:u}]}]};return{case_insensitive:!1,keywords:U,contains:[se,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/},d,K,X,{match:[/const/,/\s/,s],scope:{1:"keyword",3:"variable.constant"}},L,{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:U,contains:["self",se,d,X,e.C_BLOCK_COMMENT_MODE,N,v]}]},{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]},N,v]}}function oM(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 uM(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function cM(e){const t=e.regex,a=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["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:s,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:/#/},x={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,x,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,m,x,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,x,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,x,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",T=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,N=`\\b|${s.join("|")}`,v={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${T}))[eE][+-]?(${y})[jJ]?(?=${N})`},{begin:`(${T})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${N})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${N})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${N})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${N})`},{begin:`\\b(${y})[jJ](?=${N})`}]},A={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},w={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",m,v,g,e.HASH_COMMENT_MODE]}]};return h.contains=[g,v,m],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[m,v,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,A,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[w]},{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:[v,w,g]}]}}function dM(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function fM(e){const t=e.regex,a=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,s=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]?/),l=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,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:[l,s]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,s]},{scope:{1:"punctuation",2:"number"},match:[u,s]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,s]}]},{scope:{3:"operator"},match:[a,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:l},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:u},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function mM(e){const t=e.regex,a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),l=t.concat(s,/(::\w+)*/),d={"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)],x={className:"subst",begin:/#\{/,end:/\}/,keywords:d},g={className:"string",contains:[e.BACKSLASH_ESCAPE,x],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,x]})]}]},y="[1-9](_?[0-9])*|0",T="[0-9](_?[0-9])*",N={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${T}))?([eE][+-]?(${T})|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"}]},v={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:d}]},L=[g,{variants:[{match:[/class\s+/,l,/\s+<\s+/,l]},{match:[/\b(class|module)\s+/,l]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:d},{match:[/(include|extend)\s+/,l],scope:{2:"title.class"},keywords:d},{relevance:0,match:[l,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:s,scope:"title.class"},{match:[/def/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[v]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:a}],relevance:0},N,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:d},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,x],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);x.contains=L,v.contains=L;const j=[{begin:/^\s*=>/,starts:{end:"$",contains:L}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:d,contains:L}}];return h.unshift(m),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:d,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(j).concat(h).concat(L)}}function hM(e){const t=e.regex,a=/(r#)?/,s=t.concat(a,e.UNDERSCORE_IDENT_RE),l=t.concat(a,e.IDENT_RE),u={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,l,t.lookahead(/\s*\(/))},d="([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!"],x=["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:x,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_]+)"+d},{begin:"\\b0o([0-7_]+)"+d},{begin:"\\b0x([A-Fa-f0-9_]+)"+d},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+d}],relevance:0},{begin:[/fn/,/\s+/,s],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,s],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,s,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:h,type:x}},{className:"punctuation",begin:"->"},u]}}const pM=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_-]*/}}),gM=["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"],bM=["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"],xM=[...gM,...bM],EM=["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(),yM=["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(),TM=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),_M=["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 NM(e){const t=pM(e),a=TM,s=yM,l="@[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("+xM.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+s.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+a.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+_M.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:l,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:u,attribute:EM.join(" ")},contains:[{begin:l,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 vM(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function SM(e){const t=e.regex,a=e.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={begin:/"/,end:/"/,contains:[{match:/""/}]},u=["true","false","unknown"],d=["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"],x=["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"],T=x,N=[...h,...m].filter(V=>!x.includes(V)),v={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},A={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},w={match:t.concat(/\b/,t.either(...T),/\s*\(/),relevance:0,keywords:{built_in:T}};function C(V){return t.concat(/\b/,t.either(...V.map(L=>L.replace(/\s+/,"\\s+"))),/\b/)}const R={scope:"keyword",match:C(y),relevance:0};function U(V,{exceptions:L,when:z}={}){const X=z;return L=L||[],V.map(W=>W.match(/\|\d+$/)||L.includes(W)?W:X(W)?`${W}|0`:W)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:U(N,{when:V=>V.length<3}),literal:u,type:f,built_in:g},contains:[{scope:"type",match:C(d)},R,w,v,s,l,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,a,A]}}function zT(e){return e?typeof e=="string"?e:e.source:null}function Wl(e){return At("(?=",e,")")}function At(...e){return e.map(a=>zT(a)).join("")}function AM(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Dn(...e){return"("+(AM(e).capture?"":"?:")+e.map(s=>zT(s)).join("|")+")"}const r0=e=>At(/\b/,e,/\w$/.test(e)?/\b/:/\B/),CM=["Protocol","Type"].map(r0),w1=["init","self"].map(r0),wM=["Any","Self"],Bm=["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"],k1=["false","nil","true"],kM=["assignment","associativity","higherThan","left","lowerThan","none","right"],RM=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],R1=["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"],qT=Dn(/[/=\-+!*%<>&|^~?]/,/[\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]/),YT=Dn(qT,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Pm=At(qT,YT,"*"),$T=Dn(/[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]/),wc=Dn($T,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Ga=At($T,wc,"*"),ac=At(/[A-Z]/,wc,"*"),OM=["attached","autoclosure",At(/convention\(/,Dn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",At(/objc\(/,Ga,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],IM=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function MM(e){const t={match:/\s+/,relevance:0},a=e.COMMENT("/\\*","\\*/",{contains:["self"]}),s=[e.C_LINE_COMMENT_MODE,a],l={match:[/\./,Dn(...CM,...w1)],className:{2:"keyword"}},u={match:At(/\./,Dn(...Bm)),relevance:0},d=Bm.filter(Je=>typeof Je=="string").concat(["_|0"]),f=Bm.filter(Je=>typeof Je!="string").concat(wM).map(r0),m={variants:[{className:"keyword",match:Dn(...f,...w1)}]},h={$pattern:Dn(/\b\w+/,/#\w+/),keyword:d.concat(RM),literal:k1},x=[l,u,m],g={match:At(/\./,Dn(...R1)),relevance:0},y={className:"built_in",match:At(/\b/,Dn(...R1),/(?=\()/)},T=[g,y],N={match:/->/,relevance:0},v={className:"operator",relevance:0,variants:[{match:Pm},{match:`\\.(\\.|${YT})+`}]},A=[N,v],w="([0-9]_*)+",C="([0-9a-fA-F]_*)+",R={className:"number",relevance:0,variants:[{match:`\\b(${w})(\\.(${w}))?([eE][+-]?(${w}))?\\b`},{match:`\\b0x(${C})(\\.(${C}))?([pP][+-]?(${w}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},U=(Je="")=>({className:"subst",variants:[{match:At(/\\/,Je,/[0\\tnr"']/)},{match:At(/\\/,Je,/u\{[0-9a-fA-F]{1,8}\}/)}]}),V=(Je="")=>({className:"subst",match:At(/\\/,Je,/[\t ]*(?:[\r\n]|\r\n)/)}),L=(Je="")=>({className:"subst",label:"interpol",begin:At(/\\/,Je,/\(/),end:/\)/}),z=(Je="")=>({begin:At(Je,/"""/),end:At(/"""/,Je),contains:[U(Je),V(Je),L(Je)]}),X=(Je="")=>({begin:At(Je,/"/),end:At(/"/,Je),contains:[U(Je),L(Je)]}),W={className:"string",variants:[z(),z("#"),z("##"),z("###"),X(),X("#"),X("##"),X("###")]},j=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],K={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:j},Z=Je=>{const jn=At(Je,/\//),kn=At(/\//,Je);return{begin:jn,end:kn,contains:[...j,{scope:"comment",begin:`#(?!.*${kn})`,end:/$/}]}},se={scope:"regexp",variants:[Z("###"),Z("##"),Z("#"),K]},le={match:At(/`/,Ga,/`/)},ae={className:"variable",match:/\$\d+/},F={className:"variable",match:`\\$${wc}+`},O=[le,ae,F],ee={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:IM,contains:[...A,R,W]}]}},_e={scope:"keyword",match:At(/@/,Dn(...OM),Wl(Dn(/\(/,/\s+/)))},P={scope:"meta",match:At(/@/,Ga)},I=[ee,_e,P],ie={match:Wl(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:At(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,wc,"+")},{className:"type",match:ac,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:At(/\s+&\s+/,Wl(ac)),relevance:0}]},D={begin:/</,end:/>/,keywords:h,contains:[...s,...x,...I,N,ie]};ie.contains.push(D);const Te={match:At(Ga,/\s*:/),keywords:"_|0",relevance:0},ke={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",Te,...s,se,...x,...T,...A,R,W,...O,...I,ie]},Re={begin:/</,end:/>/,keywords:"repeat each",contains:[...s,ie]},Ye={begin:Dn(Wl(At(Ga,/\s*:/)),Wl(At(Ga,/\s+/,Ga,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Ga}]},dt={begin:/\(/,end:/\)/,keywords:h,contains:[Ye,...s,...x,...A,R,W,...I,ie,ke],endsParent:!0,illegal:/["']/},ut={match:[/(func|macro)/,/\s+/,Dn(le.match,Ga,Pm)],className:{1:"keyword",3:"title.function"},contains:[Re,dt,t],illegal:[/\[/,/%/]},zt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Re,dt,t],illegal:/\[|%/},Tn={match:[/operator/,/\s+/,Pm],className:{1:"keyword",3:"title"}},da={begin:[/precedencegroup/,/\s+/,ac],className:{1:"keyword",3:"title"},contains:[ie],keywords:[...kM,...k1],end:/}/},Ca={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},un={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Xn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Ga,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[Re,...x,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:ac},...x],relevance:0}]};for(const Je of W.variants){const jn=Je.contains.find(fa=>fa.label==="interpol");jn.keywords=h;const kn=[...x,...T,...A,R,W,...O];jn.contains=[...kn,{begin:/\(/,end:/\)/,contains:["self",...kn]}]}return{name:"Swift",keywords:h,contains:[...s,ut,zt,Ca,un,Xn,Tn,da,{beginKeywords:"import",end:/$/,contains:[...s],relevance:0},se,...x,...T,...A,R,W,...O,...I,ie,ke]}}const kc="[A-Za-z$_][0-9A-Za-z$_]*",GT=["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"],KT=["true","false","null","undefined","NaN","Infinity"],VT=["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"],QT=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],XT=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],WT=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ZT=[].concat(XT,VT,QT);function DM(e){const t=e.regex,a=(ee,{after:_e})=>{const P="</"+ee[0].slice(1);return ee.input.indexOf(P,_e)!==-1},s=kc,l={begin:"<>",end:"</>"},u=/<[A-Za-z0-9\\._:-]+\s*\/>/,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ee,_e)=>{const P=ee[0].length+ee.index,I=ee.input[P];if(I==="<"||I===","){_e.ignoreMatch();return}I===">"&&(a(ee,{after:P})||_e.ignoreMatch());let ie;const D=ee.input.substring(P);if(ie=D.match(/^\s*=/)){_e.ignoreMatch();return}if((ie=D.match(/^\s+extends\s+/))&&ie.index===0){_e.ignoreMatch();return}}},f={$pattern:kc,keyword:GT,literal:KT,built_in:ZT,"variable.language":WT},m="[0-9](_?[0-9])*",h=`\\.(${m})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${x})((${h})|\\.)?|(${h}))[eE][+-]?(${m})\\b`},{begin:`\\b(${x})\\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:[]},T={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},N={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},v={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},A={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},C={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:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,T,N,v,A,{match:/\$\d+/},g];y.contains=R.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(R)});const U=[].concat(C,y.contains),V=U.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(U)}]),L={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:V},z={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},X={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:{_:[...VT,...QT]}},W={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Z(ee){return t.concat("(?!",ee.join("|"),")")}const se={match:t.concat(/\b/,Z([...XT,"super","import"].map(ee=>`${ee}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},le={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ae={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:V,CLASS_REFERENCE:X},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),W,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,T,N,v,A,C,{match:/\$\d+/},g,X,{scope:"attr",match:s+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:F,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:V}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:u},{begin:d.begin,"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{begin:d.begin,end:d.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:[L,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},le,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},se,K,z,ae,{match:/\$[(.]/}]}}function LM(e){const t=e.regex,a=DM(e),s=kc,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],u={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},d={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},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:kc,keyword:GT.concat(m),literal:KT,built_in:ZT.concat(l),"variable.language":WT},x={className:"meta",begin:"@"+s},g=(v,A,w)=>{const C=v.contains.findIndex(R=>R.label===A);if(C===-1)throw new Error("can not find mode to replace");v.contains.splice(C,1,w)};Object.assign(a.keywords,h),a.exports.PARAMS_CONTAINS.push(x);const y=a.contains.find(v=>v.scope==="attr"),T=Object.assign({},y,{match:t.concat(s,t.lookahead(/\s*\?:/))});a.exports.PARAMS_CONTAINS.push([a.exports.CLASS_REFERENCE,y,T]),a.contains=a.contains.concat([x,u,d,T]),g(a,"shebang",e.SHEBANG()),g(a,"use_strict",f);const N=a.contains.find(v=>v.label==="func.def");return N.relevance=0,Object.assign(a,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),a}function jM(e){const t=e.regex,a={className:"string",begin:/"(""|[^/n])"C\b/},s={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},l=/\d{1,2}\/\d{1,2}\/\d{4}/,u=/\d{4}-\d{1,2}-\d{1,2}/,d=/(\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,l),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,d,/ *#/)},{begin:t.concat(/# */,t.either(u,l),/ +/,t.either(d,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])|[%&])?/}]},x={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,s,m,h,x,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 BM(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const a=e.COMMENT(/;;/,/$/),s=["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"],l={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},u={className:"variable",begin:/\$[\w_]+/},d={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:s},contains:[a,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},u,d,l,e.QUOTE_STRING_MODE,m,h,f]}}function PM(e){const t=e.regex,a=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,l={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/}]},d=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:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[l]},{begin:/'/,end:/'/,contains:[l]},{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,d,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[u,d,m,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},l,{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 UM(e){const t="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},l={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},u={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},d={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,l]},f=e.inherit(d,{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"},T={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},N={begin:/\{/,end:/\}/,contains:[T],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[T],illegal:"\\n",relevance:0},A=[s,{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},N,v,u,d],w=[...A];return w.pop(),w.push(f),T.contains=w,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:A}}const HM={arduino:T6,bash:_6,c:N6,cpp:v6,csharp:S6,css:D6,diff:L6,go:j6,graphql:B6,ini:P6,java:U6,javascript:Y6,json:$6,kotlin:K6,less:tM,lua:nM,makefile:aM,markdown:rM,objectivec:sM,perl:iM,php:lM,"php-template":oM,plaintext:uM,python:cM,"python-repl":dM,r:fM,ruby:mM,rust:hM,scss:NM,shell:vM,sql:SM,swift:MM,typescript:LM,vbnet:jM,wasm:BM,xml:PM,yaml:UM};var Um,O1;function FM(){if(O1)return Um;O1=1;function e($){return $ instanceof Map?$.clear=$.delete=$.set=function(){throw new Error("map is read-only")}:$ instanceof Set&&($.add=$.clear=$.delete=function(){throw new Error("set is read-only")}),Object.freeze($),Object.getOwnPropertyNames($).forEach(me=>{const Se=$[me],$e=typeof Se;($e==="object"||$e==="function")&&!Object.isFrozen(Se)&&e(Se)}),$}class t{constructor(me){me.data===void 0&&(me.data={}),this.data=me.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function a($){return $.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function s($,...me){const Se=Object.create(null);for(const $e in $)Se[$e]=$[$e];return me.forEach(function($e){for(const Mt in $e)Se[Mt]=$e[Mt]}),Se}const l="</span>",u=$=>!!$.scope,d=($,{prefix:me})=>{if($.startsWith("language:"))return $.replace("language:","language-");if($.includes(".")){const Se=$.split(".");return[`${me}${Se.shift()}`,...Se.map(($e,Mt)=>`${$e}${"_".repeat(Mt+1)}`)].join(" ")}return`${me}${$}`};class f{constructor(me,Se){this.buffer="",this.classPrefix=Se.classPrefix,me.walk(this)}addText(me){this.buffer+=a(me)}openNode(me){if(!u(me))return;const Se=d(me.scope,{prefix:this.classPrefix});this.span(Se)}closeNode(me){u(me)&&(this.buffer+=l)}value(){return this.buffer}span(me){this.buffer+=`<span class="${me}">`}}const m=($={})=>{const me={children:[]};return Object.assign(me,$),me};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(me){this.top.children.push(me)}openNode(me){const Se=m({scope:me});this.add(Se),this.stack.push(Se)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(me){return this.constructor._walk(me,this.rootNode)}static _walk(me,Se){return typeof Se=="string"?me.addText(Se):Se.children&&(me.openNode(Se),Se.children.forEach($e=>this._walk(me,$e)),me.closeNode(Se)),me}static _collapse(me){typeof me!="string"&&me.children&&(me.children.every(Se=>typeof Se=="string")?me.children=[me.children.join("")]:me.children.forEach(Se=>{h._collapse(Se)}))}}class x extends h{constructor(me){super(),this.options=me}addText(me){me!==""&&this.add(me)}startScope(me){this.openNode(me)}endScope(){this.closeNode()}__addSublanguage(me,Se){const $e=me.root;Se&&($e.scope=`language:${Se}`),this.add($e)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g($){return $?typeof $=="string"?$:$.source:null}function y($){return v("(?=",$,")")}function T($){return v("(?:",$,")*")}function N($){return v("(?:",$,")?")}function v(...$){return $.map(Se=>g(Se)).join("")}function A($){const me=$[$.length-1];return typeof me=="object"&&me.constructor===Object?($.splice($.length-1,1),me):{}}function w(...$){return"("+(A($).capture?"":"?:")+$.map($e=>g($e)).join("|")+")"}function C($){return new RegExp($.toString()+"|").exec("").length-1}function R($,me){const Se=$&&$.exec(me);return Se&&Se.index===0}const U=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function V($,{joinWith:me}){let Se=0;return $.map($e=>{Se+=1;const Mt=Se;let Ct=g($e),Me="";for(;Ct.length>0;){const we=U.exec(Ct);if(!we){Me+=Ct;break}Me+=Ct.substring(0,we.index),Ct=Ct.substring(we.index+we[0].length),we[0][0]==="\\"&&we[1]?Me+="\\"+String(Number(we[1])+Mt):(Me+=we[0],we[0]==="("&&Se++)}return Me}).map($e=>`(${$e})`).join(me)}const L=/\b\B/,z="[a-zA-Z]\\w*",X="[a-zA-Z_]\\w*",W="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",K="\\b(0b[01]+)",Z="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",se=($={})=>{const me=/^#![ ]*\//;return $.binary&&($.begin=v(me,/.*\b/,$.binary,/\b.*/)),s({scope:"meta",begin:me,end:/$/,relevance:0,"on:begin":(Se,$e)=>{Se.index!==0&&$e.ignoreMatch()}},$)},le={begin:"\\\\[\\s\\S]",relevance:0},ae={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[le]},F={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[le]},O={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/},ee=function($,me,Se={}){const $e=s({scope:"comment",begin:$,end:me,contains:[]},Se);$e.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 Mt=w("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 $e.contains.push({begin:v(/[ ]+/,"(",Mt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),$e},_e=ee("//","$"),P=ee("/\\*","\\*/"),I=ee("#","$"),ie={scope:"number",begin:W,relevance:0},D={scope:"number",begin:j,relevance:0},Te={scope:"number",begin:K,relevance:0},ke={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[le,{begin:/\[/,end:/\]/,relevance:0,contains:[le]}]},Re={scope:"title",begin:z,relevance:0},Ye={scope:"title",begin:X,relevance:0},dt={begin:"\\.\\s*"+X,relevance:0};var zt=Object.freeze({__proto__:null,APOS_STRING_MODE:ae,BACKSLASH_ESCAPE:le,BINARY_NUMBER_MODE:Te,BINARY_NUMBER_RE:K,COMMENT:ee,C_BLOCK_COMMENT_MODE:P,C_LINE_COMMENT_MODE:_e,C_NUMBER_MODE:D,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function($){return Object.assign($,{"on:begin":(me,Se)=>{Se.data._beginMatch=me[1]},"on:end":(me,Se)=>{Se.data._beginMatch!==me[1]&&Se.ignoreMatch()}})},HASH_COMMENT_MODE:I,IDENT_RE:z,MATCH_NOTHING_RE:L,METHOD_GUARD:dt,NUMBER_MODE:ie,NUMBER_RE:W,PHRASAL_WORDS_MODE:O,QUOTE_STRING_MODE:F,REGEXP_MODE:ke,RE_STARTERS_RE:Z,SHEBANG:se,TITLE_MODE:Re,UNDERSCORE_IDENT_RE:X,UNDERSCORE_TITLE_MODE:Ye});function Tn($,me){$.input[$.index-1]==="."&&me.ignoreMatch()}function da($,me){$.className!==void 0&&($.scope=$.className,delete $.className)}function Ca($,me){me&&$.beginKeywords&&($.begin="\\b("+$.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",$.__beforeBegin=Tn,$.keywords=$.keywords||$.beginKeywords,delete $.beginKeywords,$.relevance===void 0&&($.relevance=0))}function un($,me){Array.isArray($.illegal)&&($.illegal=w(...$.illegal))}function Xn($,me){if($.match){if($.begin||$.end)throw new Error("begin & end are not supported with match");$.begin=$.match,delete $.match}}function Je($,me){$.relevance===void 0&&($.relevance=1)}const jn=($,me)=>{if(!$.beforeMatch)return;if($.starts)throw new Error("beforeMatch cannot be used with starts");const Se=Object.assign({},$);Object.keys($).forEach($e=>{delete $[$e]}),$.keywords=Se.keywords,$.begin=v(Se.beforeMatch,y(Se.begin)),$.starts={relevance:0,contains:[Object.assign(Se,{endsParent:!0})]},$.relevance=0,delete Se.beforeMatch},kn=["of","and","for","in","not","or","if","then","parent","list","value"],fa="keyword";function wa($,me,Se=fa){const $e=Object.create(null);return typeof $=="string"?Mt(Se,$.split(" ")):Array.isArray($)?Mt(Se,$):Object.keys($).forEach(function(Ct){Object.assign($e,wa($[Ct],me,Ct))}),$e;function Mt(Ct,Me){me&&(Me=Me.map(we=>we.toLowerCase())),Me.forEach(function(we){const qe=we.split("|");$e[qe[0]]=[Ct,tr(qe[0],qe[1])]})}}function tr($,me){return me?Number(me):Pa($)?0:1}function Pa($){return kn.includes($.toLowerCase())}const wr={},_t=$=>{console.error($)},nr=($,...me)=>{console.log(`WARN: ${$}`,...me)},de=($,me)=>{wr[`${$}/${me}`]||(console.log(`Deprecated as of ${$}. ${me}`),wr[`${$}/${me}`]=!0)},ye=new Error;function Pe($,me,{key:Se}){let $e=0;const Mt=$[Se],Ct={},Me={};for(let we=1;we<=me.length;we++)Me[we+$e]=Mt[we],Ct[we+$e]=!0,$e+=C(me[we-1]);$[Se]=Me,$[Se]._emit=Ct,$[Se]._multi=!0}function H($){if(Array.isArray($.begin)){if($.skip||$.excludeBegin||$.returnBegin)throw _t("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ye;if(typeof $.beginScope!="object"||$.beginScope===null)throw _t("beginScope must be object"),ye;Pe($,$.begin,{key:"beginScope"}),$.begin=V($.begin,{joinWith:""})}}function Ae($){if(Array.isArray($.end)){if($.skip||$.excludeEnd||$.returnEnd)throw _t("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ye;if(typeof $.endScope!="object"||$.endScope===null)throw _t("endScope must be object"),ye;Pe($,$.end,{key:"endScope"}),$.end=V($.end,{joinWith:""})}}function ft($){$.scope&&typeof $.scope=="object"&&$.scope!==null&&($.beginScope=$.scope,delete $.scope)}function ln($){ft($),typeof $.beginScope=="string"&&($.beginScope={_wrap:$.beginScope}),typeof $.endScope=="string"&&($.endScope={_wrap:$.endScope}),H($),Ae($)}function Wt($){function me(Me,we){return new RegExp(g(Me),"m"+($.case_insensitive?"i":"")+($.unicodeRegex?"u":"")+(we?"g":""))}class Se{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(we,qe){qe.position=this.position++,this.matchIndexes[this.matchAt]=qe,this.regexes.push([qe,we]),this.matchAt+=C(we)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const we=this.regexes.map(qe=>qe[1]);this.matcherRe=me(V(we,{joinWith:"|"}),!0),this.lastIndex=0}exec(we){this.matcherRe.lastIndex=this.lastIndex;const qe=this.matcherRe.exec(we);if(!qe)return null;const $t=qe.findIndex((ar,Xs)=>Xs>0&&ar!==void 0),jt=this.matchIndexes[$t];return qe.splice(0,$t),Object.assign(qe,jt)}}class $e{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(we){if(this.multiRegexes[we])return this.multiRegexes[we];const qe=new Se;return this.rules.slice(we).forEach(([$t,jt])=>qe.addRule($t,jt)),qe.compile(),this.multiRegexes[we]=qe,qe}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(we,qe){this.rules.push([we,qe]),qe.type==="begin"&&this.count++}exec(we){const qe=this.getMatcher(this.regexIndex);qe.lastIndex=this.lastIndex;let $t=qe.exec(we);if(this.resumingScanAtSamePosition()&&!($t&&$t.index===this.lastIndex)){const jt=this.getMatcher(0);jt.lastIndex=this.lastIndex+1,$t=jt.exec(we)}return $t&&(this.regexIndex+=$t.position+1,this.regexIndex===this.count&&this.considerAll()),$t}}function Mt(Me){const we=new $e;return Me.contains.forEach(qe=>we.addRule(qe.begin,{rule:qe,type:"begin"})),Me.terminatorEnd&&we.addRule(Me.terminatorEnd,{type:"end"}),Me.illegal&&we.addRule(Me.illegal,{type:"illegal"}),we}function Ct(Me,we){const qe=Me;if(Me.isCompiled)return qe;[da,Xn,ln,jn].forEach(jt=>jt(Me,we)),$.compilerExtensions.forEach(jt=>jt(Me,we)),Me.__beforeBegin=null,[Ca,un,Je].forEach(jt=>jt(Me,we)),Me.isCompiled=!0;let $t=null;return typeof Me.keywords=="object"&&Me.keywords.$pattern&&(Me.keywords=Object.assign({},Me.keywords),$t=Me.keywords.$pattern,delete Me.keywords.$pattern),$t=$t||/\w+/,Me.keywords&&(Me.keywords=wa(Me.keywords,$.case_insensitive)),qe.keywordPatternRe=me($t,!0),we&&(Me.begin||(Me.begin=/\B|\b/),qe.beginRe=me(qe.begin),!Me.end&&!Me.endsWithParent&&(Me.end=/\B|\b/),Me.end&&(qe.endRe=me(qe.end)),qe.terminatorEnd=g(qe.end)||"",Me.endsWithParent&&we.terminatorEnd&&(qe.terminatorEnd+=(Me.end?"|":"")+we.terminatorEnd)),Me.illegal&&(qe.illegalRe=me(Me.illegal)),Me.contains||(Me.contains=[]),Me.contains=[].concat(...Me.contains.map(function(jt){return cn(jt==="self"?Me:jt)})),Me.contains.forEach(function(jt){Ct(jt,qe)}),Me.starts&&Ct(Me.starts,we),qe.matcher=Mt(qe),qe}if($.compilerExtensions||($.compilerExtensions=[]),$.contains&&$.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return $.classNameAliases=s($.classNameAliases||{}),Ct($)}function Ot($){return $?$.endsWithParent||Ot($.starts):!1}function cn($){return $.variants&&!$.cachedVariants&&($.cachedVariants=$.variants.map(function(me){return s($,{variants:null},me)})),$.cachedVariants?$.cachedVariants:Ot($)?s($,{starts:$.starts?s($.starts):null}):Object.isFrozen($)?s($):$}var bt="11.11.1";class Ua extends Error{constructor(me,Se){super(me),this.name="HTMLInjectionError",this.html=Se}}const Rn=a,Oo=s,ms=Symbol("nomatch"),Qs=7,hs=function($){const me=Object.create(null),Se=Object.create(null),$e=[];let Mt=!0;const Ct="Could not find the language '{}', did you forget to load/include a language module?",Me={disableAutodetect:!0,name:"Plain text",contains:[]};let we={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:x};function qe(xe){return we.noHighlightRe.test(xe)}function $t(xe){let je=xe.className+" ";je+=xe.parentNode?xe.parentNode.className:"";const et=we.languageDetectRe.exec(je);if(et){const xt=On(et[1]);return xt||(nr(Ct.replace("{}",et[1])),nr("Falling back to no-highlight mode for this block.",xe)),xt?et[1]:"no-highlight"}return je.split(/\s+/).find(xt=>qe(xt)||On(xt))}function jt(xe,je,et){let xt="",Kt="";typeof je=="object"?(xt=xe,et=je.ignoreIllegals,Kt=je.language):(de("10.7.0","highlight(lang, code, ...args) has been deprecated."),de("10.7.0",`Please use highlight(code, options) instead.
485
+ https://github.com/highlightjs/highlight.js/issues/2277`),Kt=xe,xt=je),et===void 0&&(et=!0);const Nn={code:xt,language:Kt};gs("before:highlight",Nn);const Wn=Nn.result?Nn.result:ar(Nn.language,Nn.code,et);return Wn.code=Nn.code,gs("after:highlight",Wn),Wn}function ar(xe,je,et,xt){const Kt=Object.create(null);function Nn(Ne,De){return Ne.keywords[De]}function Wn(){if(!ze.keywords){Jt.addText(Et);return}let Ne=0;ze.keywordPatternRe.lastIndex=0;let De=ze.keywordPatternRe.exec(Et),Xe="";for(;De;){Xe+=Et.substring(Ne,De.index);const st=pn.case_insensitive?De[0].toLowerCase():De[0],Ht=Nn(ze,st);if(Ht){const[ma,nl]=Ht;if(Jt.addText(Xe),Xe="",Kt[st]=(Kt[st]||0)+1,Kt[st]<=Qs&&(Ir+=nl),ma.startsWith("_"))Xe+=De[0];else{const Po=pn.classNameAliases[ma]||ma;Zn(De[0],Po)}}else Xe+=De[0];Ne=ze.keywordPatternRe.lastIndex,De=ze.keywordPatternRe.exec(Et)}Xe+=Et.substring(Ne),Jt.addText(Xe)}function Pn(){if(Et==="")return;let Ne=null;if(typeof ze.subLanguage=="string"){if(!me[ze.subLanguage]){Jt.addText(Et);return}Ne=ar(ze.subLanguage,Et,!0,Bo[ze.subLanguage]),Bo[ze.subLanguage]=Ne._top}else Ne=Ws(Et,ze.subLanguage.length?ze.subLanguage:null);ze.relevance>0&&(Ir+=Ne.relevance),Jt.__addSublanguage(Ne._emitter,Ne.language)}function It(){ze.subLanguage!=null?Pn():Wn(),Et=""}function Zn(Ne,De){Ne!==""&&(Jt.startScope(De),Jt.addText(Ne),Jt.endScope())}function Lo(Ne,De){let Xe=1;const st=De.length-1;for(;Xe<=st;){if(!Ne._emit[Xe]){Xe++;continue}const Ht=pn.classNameAliases[Ne[Xe]]||Ne[Xe],ma=De[Xe];Ht?Zn(ma,Ht):(Et=ma,Wn(),Et=""),Xe++}}function Js(Ne,De){return Ne.scope&&typeof Ne.scope=="string"&&Jt.openNode(pn.classNameAliases[Ne.scope]||Ne.scope),Ne.beginScope&&(Ne.beginScope._wrap?(Zn(Et,pn.classNameAliases[Ne.beginScope._wrap]||Ne.beginScope._wrap),Et=""):Ne.beginScope._multi&&(Lo(Ne.beginScope,De),Et="")),ze=Object.create(Ne,{parent:{value:ze}}),ze}function Ji(Ne,De,Xe){let st=R(Ne.endRe,Xe);if(st){if(Ne["on:end"]){const Ht=new t(Ne);Ne["on:end"](De,Ht),Ht.isMatchIgnored&&(st=!1)}if(st){for(;Ne.endsParent&&Ne.parent;)Ne=Ne.parent;return Ne}}if(Ne.endsWithParent)return Ji(Ne.parent,De,Xe)}function ei(Ne){return ze.matcher.regexIndex===0?(Et+=Ne[0],1):(Mr=!0,0)}function nd(Ne){const De=Ne[0],Xe=Ne.rule,st=new t(Xe),Ht=[Xe.__beforeBegin,Xe["on:begin"]];for(const ma of Ht)if(ma&&(ma(Ne,st),st.isMatchIgnored))return ei(De);return Xe.skip?Et+=De:(Xe.excludeBegin&&(Et+=De),It(),!Xe.returnBegin&&!Xe.excludeBegin&&(Et=De)),Js(Xe,Ne),Xe.returnBegin?0:De.length}function Un(Ne){const De=Ne[0],Xe=je.substring(Ne.index),st=Ji(ze,Ne,Xe);if(!st)return ms;const Ht=ze;ze.endScope&&ze.endScope._wrap?(It(),Zn(De,ze.endScope._wrap)):ze.endScope&&ze.endScope._multi?(It(),Lo(ze.endScope,Ne)):Ht.skip?Et+=De:(Ht.returnEnd||Ht.excludeEnd||(Et+=De),It(),Ht.excludeEnd&&(Et=De));do ze.scope&&Jt.closeNode(),!ze.skip&&!ze.subLanguage&&(Ir+=ze.relevance),ze=ze.parent;while(ze!==st.parent);return st.starts&&Js(st.starts,Ne),Ht.returnEnd?0:De.length}function el(){const Ne=[];for(let De=ze;De!==pn;De=De.parent)De.scope&&Ne.unshift(De.scope);Ne.forEach(De=>Jt.openNode(De))}let bs={};function ti(Ne,De){const Xe=De&&De[0];if(Et+=Ne,Xe==null)return It(),0;if(bs.type==="begin"&&De.type==="end"&&bs.index===De.index&&Xe===""){if(Et+=je.slice(De.index,De.index+1),!Mt){const st=new Error(`0 width match regex (${xe})`);throw st.languageName=xe,st.badRule=bs.rule,st}return 1}if(bs=De,De.type==="begin")return nd(De);if(De.type==="illegal"&&!et){const st=new Error('Illegal lexeme "'+Xe+'" for mode "'+(ze.scope||"<unnamed>")+'"');throw st.mode=ze,st}else if(De.type==="end"){const st=Un(De);if(st!==ms)return st}if(De.type==="illegal"&&Xe==="")return Et+=`
486
+ `,1;if(tl>1e5&&tl>De.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Et+=Xe,Xe.length}const pn=On(xe);if(!pn)throw _t(Ct.replace("{}",xe)),new Error('Unknown language: "'+xe+'"');const jo=Wt(pn);let ni="",ze=xt||jo;const Bo={},Jt=new we.__emitter(we);el();let Et="",Ir=0,ir=0,tl=0,Mr=!1;try{if(pn.__emitTokens)pn.__emitTokens(je,Jt);else{for(ze.matcher.considerAll();;){tl++,Mr?Mr=!1:ze.matcher.considerAll(),ze.matcher.lastIndex=ir;const Ne=ze.matcher.exec(je);if(!Ne)break;const De=je.substring(ir,Ne.index),Xe=ti(De,Ne);ir=Ne.index+Xe}ti(je.substring(ir))}return Jt.finalize(),ni=Jt.toHTML(),{language:xe,value:ni,relevance:Ir,illegal:!1,_emitter:Jt,_top:ze}}catch(Ne){if(Ne.message&&Ne.message.includes("Illegal"))return{language:xe,value:Rn(je),illegal:!0,relevance:0,_illegalBy:{message:Ne.message,index:ir,context:je.slice(ir-100,ir+100),mode:Ne.mode,resultSoFar:ni},_emitter:Jt};if(Mt)return{language:xe,value:Rn(je),illegal:!1,relevance:0,errorRaised:Ne,_emitter:Jt,_top:ze};throw Ne}}function Xs(xe){const je={value:Rn(xe),illegal:!1,relevance:0,_top:Me,_emitter:new we.__emitter(we)};return je._emitter.addText(xe),je}function Ws(xe,je){je=je||we.languages||Object.keys(me);const et=Xs(xe),xt=je.filter(On).filter(Rr).map(It=>ar(It,xe,!1));xt.unshift(et);const Kt=xt.sort((It,Zn)=>{if(It.relevance!==Zn.relevance)return Zn.relevance-It.relevance;if(It.language&&Zn.language){if(On(It.language).supersetOf===Zn.language)return 1;if(On(Zn.language).supersetOf===It.language)return-1}return 0}),[Nn,Wn]=Kt,Pn=Nn;return Pn.secondBest=Wn,Pn}function Ha(xe,je,et){const xt=je&&Se[je]||et;xe.classList.add("hljs"),xe.classList.add(`language-${xt}`)}function Gt(xe){let je=null;const et=$t(xe);if(qe(et))return;if(gs("before:highlightElement",{el:xe,language:et}),xe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",xe);return}if(xe.children.length>0&&(we.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(xe)),we.throwUnescapedHTML))throw new Ua("One of your code blocks includes unescaped HTML.",xe.innerHTML);je=xe;const xt=je.textContent,Kt=et?jt(xt,{language:et,ignoreIllegals:!0}):Ws(xt);xe.innerHTML=Kt.value,xe.dataset.highlighted="yes",Ha(xe,et,Kt.language),xe.result={language:Kt.language,re:Kt.relevance,relevance:Kt.relevance},Kt.secondBest&&(xe.secondBest={language:Kt.secondBest.language,relevance:Kt.secondBest.relevance}),gs("after:highlightElement",{el:xe,result:Kt,text:xt})}function _n(xe){we=Oo(we,xe)}const kr=()=>{Zs(),de("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Wi(){Zs(),de("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Io=!1;function Zs(){function xe(){Zs()}if(document.readyState==="loading"){Io||window.addEventListener("DOMContentLoaded",xe,!1),Io=!0;return}document.querySelectorAll(we.cssSelector).forEach(Gt)}function Mo(xe,je){let et=null;try{et=je($)}catch(xt){if(_t("Language definition for '{}' could not be registered.".replace("{}",xe)),Mt)_t(xt);else throw xt;et=Me}et.name||(et.name=xe),me[xe]=et,et.rawDefinition=je.bind(null,$),et.aliases&&rr(et.aliases,{languageName:xe})}function ps(xe){delete me[xe];for(const je of Object.keys(Se))Se[je]===xe&&delete Se[je]}function Zi(){return Object.keys(me)}function On(xe){return xe=(xe||"").toLowerCase(),me[xe]||me[Se[xe]]}function rr(xe,{languageName:je}){typeof xe=="string"&&(xe=[xe]),xe.forEach(et=>{Se[et.toLowerCase()]=je})}function Rr(xe){const je=On(xe);return je&&!je.disableAutodetect}function Or(xe){xe["before:highlightBlock"]&&!xe["before:highlightElement"]&&(xe["before:highlightElement"]=je=>{xe["before:highlightBlock"](Object.assign({block:je.el},je))}),xe["after:highlightBlock"]&&!xe["after:highlightElement"]&&(xe["after:highlightElement"]=je=>{xe["after:highlightBlock"](Object.assign({block:je.el},je))})}function Zt(xe){Or(xe),$e.push(xe)}function Do(xe){const je=$e.indexOf(xe);je!==-1&&$e.splice(je,1)}function gs(xe,je){const et=xe;$e.forEach(function(xt){xt[et]&&xt[et](je)})}function sr(xe){return de("10.7.0","highlightBlock will be removed entirely in v12.0"),de("10.7.0","Please use highlightElement now."),Gt(xe)}Object.assign($,{highlight:jt,highlightAuto:Ws,highlightAll:Zs,highlightElement:Gt,highlightBlock:sr,configure:_n,initHighlighting:kr,initHighlightingOnLoad:Wi,registerLanguage:Mo,unregisterLanguage:ps,listLanguages:Zi,getLanguage:On,registerAliases:rr,autoDetection:Rr,inherit:Oo,addPlugin:Zt,removePlugin:Do}),$.debugMode=function(){Mt=!1},$.safeMode=function(){Mt=!0},$.versionString=bt,$.regex={concat:v,lookahead:y,either:w,optional:N,anyNumberOfTimes:T};for(const xe in zt)typeof zt[xe]=="object"&&e(zt[xe]);return Object.assign($,zt),$},Bn=hs({});return Bn.newInstance=()=>hs({}),Um=Bn,Bn.HighlightJS=Bn,Bn.default=Bn,Um}var zM=FM();const qM=Mc(zM),I1={},YM="hljs-";function $M(e){const t=qM.newInstance();return e&&u(e),{highlight:a,highlightAuto:s,listLanguages:l,register:u,registerAlias:d,registered:f};function a(m,h,x){const g=x||I1,y=typeof g.prefix=="string"?g.prefix:YM;if(!t.getLanguage(m))throw new Error("Unknown language: `"+m+"` is not registered");t.configure({__emitter:GM,classPrefix:y});const T=t.highlight(h,{ignoreIllegals:!0,language:m});if(T.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:T.errorRaised});const N=T._emitter.root,v=N.data;return v.language=T.language,v.relevance=T.relevance,N}function s(m,h){const g=(h||I1).subset||l();let y=-1,T=0,N;for(;++y<g.length;){const v=g[y];if(!t.getLanguage(v))continue;const A=a(v,m,h);A.data&&A.data.relevance!==void 0&&A.data.relevance>T&&(T=A.data.relevance,N=A)}return N||{type:"root",children:[],data:{language:void 0,relevance:T}}}function l(){return t.listLanguages()}function u(m,h){if(typeof m=="string")t.registerLanguage(m,h);else{let x;for(x in m)Object.hasOwn(m,x)&&t.registerLanguage(x,m[x])}}function d(m,h){if(typeof m=="string")t.registerAliases(typeof h=="string"?h:[...h],{languageName:m});else{let x;for(x in m)if(Object.hasOwn(m,x)){const g=m[x];t.registerAliases(typeof g=="string"?g:[...g],{languageName:x})}}}function f(m){return!!t.getLanguage(m)}}class GM{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],s=a.children[a.children.length-1];s&&s.type==="text"?s.value+=t:a.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,a){const s=this.stack[this.stack.length-1],l=t.root.children;a?s.children.push({type:"element",tagName:"span",properties:{className:[a]},children:l}):s.children.push(...l)}openNode(t){const a=this,s=t.split(".").map(function(d,f){return f?d+"_".repeat(f):a.options.classPrefix+d}),l=this.stack[this.stack.length-1],u={type:"element",tagName:"span",properties:{className:s},children:[]};l.children.push(u),this.stack.push(u)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const KM={};function VM(e){const t=e||KM,a=t.aliases,s=t.detect||!1,l=t.languages||HM,u=t.plainText,d=t.prefix,f=t.subset;let m="hljs";const h=$M(l);if(a&&h.registerAlias(a),d){const x=d.indexOf("-");m=x===-1?d:d.slice(0,x)}return function(x,g){Co(x,"element",function(y,T,N){if(y.tagName!=="code"||!N||N.type!=="element"||N.tagName!=="pre")return;const v=QM(y);if(v===!1||!v&&!s||v&&u&&u.includes(v))return;Array.isArray(y.properties.className)||(y.properties.className=[]),y.properties.className.includes(m)||y.properties.className.unshift(m);const A=m6(y,{whitespace:"pre"});let w;try{w=v?h.highlight(v,A,{prefix:d}):h.highlightAuto(A,{prefix:d,subset:f})}catch(C){const R=C;if(v&&/Unknown language/.test(R.message)){g.message("Cannot highlight as `"+v+"`, it’s not registered",{ancestors:[N,y],cause:R,place:y.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw R}!v&&w.data&&w.data.language&&y.properties.className.push("language-"+w.data.language),w.children.length>0&&(y.children=w.children)})}}function QM(e){const t=e.properties.className;let a=-1;if(!Array.isArray(t))return;let s;for(;++a<t.length;){const l=String(t[a]);if(l==="no-highlight"||l==="nohighlight")return!1;!s&&l.slice(0,5)==="lang-"&&(s=l.slice(5)),!s&&l.slice(0,9)==="language-"&&(s=l.slice(9))}return s}function XM({q:e,pending:t,selected:a,customText:s,onSelect:l,onCustomTextChange:u,onClearSelections:d,onSubmitCustom:f,isSingle:m}){const[h,x]=S.useState(!1),g=h||s.length>0;return o.jsxs("div",{className:"space-y-2",children:[e.header&&o.jsx("div",{className:"text-xs font-semibold text-fg-3",children:e.header}),o.jsx("p",{className:"text-sm text-fg-2",children:e.question}),e.options.length>0&&o.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.options.map(y=>{const T=!g&&((a==null?void 0:a.includes(y.label))??!1);return o.jsxs("button",{type:"button",disabled:!t,onClick:()=>{x(!1),u(""),l(y.label)},className:oe("rounded-md border px-3 py-1.5 text-left text-xs transition-colors",T?"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:[T&&o.jsx(oa,{className:"mr-1 inline h-3 w-3"}),o.jsx("span",{className:"font-medium",children:y.label}),y.description&&o.jsx("span",{className:"ml-1.5 text-fg-5",children:y.description})]},y.label)}),t&&o.jsxs("button",{type:"button",onClick:()=>{g?(x(!1),u("")):(x(!0),d())},className:oe("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&&o.jsx(oa,{className:"mr-1 inline h-3 w-3"}),o.jsx("span",{className:"font-medium",children:"其他…"})]})]}),g&&t&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"text",value:s,onChange:y=>{u(y.target.value),y.target.value&&d()},onKeyDown:y=>{y.key==="Enter"&&s.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&&o.jsx("button",{type:"button",disabled:!s.trim(),onClick:f,className:oe("flex items-center gap-1 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",s.trim()?"bg-emerald-600 text-white hover:bg-emerald-500":"bg-surface/50 text-fg-5 cursor-not-allowed"),children:o.jsx(bc,{className:"h-3 w-3"})})]})]})}function WM({part:e}){const t=hw(e),a=Hh(e),s=a==="pending"||a==="running",l=Ie(X=>X.activeSessionId),u=Ie(X=>X.replyQuestion),d=Ie(X=>X.rejectQuestion),[f,m]=S.useState(null),[h,x]=S.useState({}),[g,y]=S.useState({});if(!t||t.length===0)return null;const T=t.length===1,N=()=>{l&&Ft.getState().removeToast(`question-${l}`)},v=(X,W)=>{if(!f){if(y(j=>{const{[X]:K,...Z}=j;return Z}),T){m("answered"),N(),u([[W]]);return}x(j=>{const K=t[X],Z=j[X]??[];if(K.multiple){const se=Z.includes(W);return{...j,[X]:se?Z.filter(le=>le!==W):[...Z,W]}}return{...j,[X]:[W]}})}},A=(X,W)=>{y(j=>{if(W)return{...j,[X]:W};const{[X]:K,...Z}=j;return Z})},w=X=>{x(W=>{const{[X]:j,...K}=W;return K})},C=X=>{var j;const W=(j=g[X])==null?void 0:j.trim();f||!W||(m("answered"),N(),u([[W]]))},R=t.filter((X,W)=>{var j,K;return(((j=h[W])==null?void 0:j.length)??0)>0||(((K=g[W])==null?void 0:K.trim().length)??0)>0}).length,U=!T&&R===t.length,V=()=>{if(f||!U)return;m("answered"),N();const X=t.map((W,j)=>{var Z;const K=(Z=g[j])==null?void 0:Z.trim();return K?[K]:h[j]??[]});u(X)},L=()=>{f||(m("dismissed"),N(),d())},z=s&&!f;return o.jsxs("div",{className:oe("my-1 overflow-hidden rounded-md border bg-term/70",z?"border-blue-500/40":"border-line"),children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 font-mono text-xs",children:[o.jsx(WA,{className:oe("h-3.5 w-3.5 shrink-0",z?"text-blue-400":"text-fg-4")}),o.jsx("span",{className:oe("font-medium",z?"text-blue-300":"text-fg-3"),children:f==="answered"?"已回复":f==="dismissed"?"已取消":z?"等待回复":"Question"}),!T&&z&&o.jsxs("span",{className:"text-fg-5",children:["(",R,"/",t.length,")"]}),z&&o.jsxs("button",{type:"button",onClick:L,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:[o.jsx(gt,{className:"h-3 w-3"}),o.jsx("span",{children:"取消"})]})]}),o.jsxs("div",{className:"border-t border-line px-4 py-3 space-y-3",children:[t.map((X,W)=>o.jsx(XM,{q:X,pending:z,selected:h[W],customText:g[W]??"",onSelect:j=>v(W,j),onCustomTextChange:j=>A(W,j),onClearSelections:()=>w(W),onSubmitCustom:T?()=>C(W):void 0,isSingle:T},W)),!T&&z&&o.jsx("div",{className:"flex justify-end pt-1",children:o.jsxs("button",{type:"button",disabled:!U,onClick:V,className:oe("flex items-center gap-1.5 rounded-md px-4 py-1.5 text-xs font-medium transition-colors",U?"bg-emerald-600 text-white hover:bg-emerald-500":"bg-surface/50 text-fg-5 cursor-not-allowed"),children:[o.jsx(bc,{className:"h-3 w-3"}),o.jsx("span",{children:"提交回答"})]})})]})]})}const Hm=2e3,ZM={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"},JM={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 s0(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Va(e,t){if(!e)return null;for(const a of t){const s=e[a];if(typeof s=="string"&&s.trim())return s.trim()}return null}function eD(e,t){const a=e.toLowerCase(),s=ZM[a]??e.charAt(0).toUpperCase()+e.slice(1),l=s0(t);switch(a){case"read":case"write":case"edit":case"patch":return{label:s,arg:Va(l,["filePath","path","file"])};case"grep":{const u=Va(l,["pattern","query"]);return{label:s,arg:u?`"${u}"`:null}}case"glob":return{label:s,arg:Va(l,["pattern","query"])};case"bash":case"shell":{const u=Va(l,["command","cmd","script"]);return{label:s,arg:u?u.split(`
487
+ `)[0]:null}}case"webfetch":case"fetch":return{label:s,arg:Va(l,["url"])};case"task":case"agent":return{label:s,arg:Va(l,["description","prompt","title"])};default:return{label:s,arg:Va(l,["filePath","path","pattern","query","command","url","description"])}}}function tD({oldStr:e,newStr:t}){const a=e.split(`
488
+ `),s=t.split(`
489
+ `);return o.jsxs("div",{className:"grid grid-cols-1 gap-px overflow-x-auto rounded text-xs md:grid-cols-2",children:[o.jsx("pre",{className:"min-w-0 whitespace-pre-wrap break-words p-1.5 fs-diff-del",children:a.map((l,u)=>o.jsxs("div",{children:[o.jsx("span",{className:"select-none text-red-400/70",children:"− "}),o.jsx("span",{className:"text-red-400",children:l})]},u))}),o.jsx("pre",{className:"min-w-0 whitespace-pre-wrap break-words p-1.5 fs-diff-add",children:s.map((l,u)=>o.jsxs("div",{children:[o.jsx("span",{className:"select-none text-emerald-400/70",children:"+ "}),o.jsx("span",{className:"text-emerald-400",children:l})]},u))})]})}const M1={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 JT({todos:e}){return o.jsx("ul",{className:"space-y-0.5 text-xs",children:e.map((t,a)=>{var f;const s=((f=t.status)==null?void 0:f.toLowerCase())??"pending",l=s==="in-progress"||s==="active"?"in_progress":s==="done"||s==="complete"?"completed":s==="canceled"?"cancelled":s,u=M1[l]??M1.pending,d=l==="completed"||l==="cancelled";return o.jsxs("li",{className:"flex items-start gap-1.5",children:[o.jsx("span",{className:oe("shrink-0 leading-5",u.color,l==="in_progress"&&"fs-spin"),children:u.glyph}),o.jsx("span",{className:oe("leading-5",d?"text-fg-5 line-through":"text-fg-2"),children:t.content}),t.priority&&o.jsx("span",{className:"ml-auto shrink-0 text-fg-5",children:t.priority})]},a)})})}const nD={"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"},aD={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]=S.useState(!1),s=typeof e.category=="string"?e.category:null,l=typeof e.subagent_type=="string"?e.subagent_type:null,u=Va(e,["description","title"]),d=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,x=s??l,g=(s&&nD[s])??(l&&aD[l])??"bg-elevated text-fg-3";return o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[x&&o.jsx("span",{className:oe("rounded px-1.5 py-0.5 text-[10px] font-medium",g),children:x}),f.map(y=>o.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 text-[10px] text-fg-4",children:y},y)),m&&o.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 text-[10px] text-fg-5",children:"bg"}),h&&o.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&&o.jsx("p",{className:"text-xs text-fg-2",children:u}),d&&o.jsxs("div",{children:[o.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:[o.jsx(jh,{className:oe("h-3 w-3 transition-transform",t&&"rotate-90")}),"Prompt",o.jsxs("span",{className:"text-fg-5",children:["(",d.length," chars)"]})]}),t&&o.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:d})]})]})}function sD(e){const t=gw(e),a=Ie(m=>m.activeSessionId),s=Ie(m=>m.sessions);if(t)return t;if(!a)return null;const l=Yc(e),u=s0(l),d=Va(u,["description","title"]),f=s.filter(m=>m.parentID===a);if(f.length===0)return null;if(f.length===1)return f[0].id;if(d){const m=f.find(h=>h.title===d);if(m)return m.id}return null}function iD({part:e}){const t=sD(e),a=Ie(s=>s.setActiveSession);return t?o.jsxs("button",{type:"button",onClick:s=>{s.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:[o.jsxs("span",{className:"truncate text-fg-5",children:[t.slice(0,20),"…"]}),o.jsx(VS,{className:"h-3 w-3 shrink-0"}),o.jsx("span",{className:"shrink-0",children:"查看子会话"})]}):null}function lD(e,t){const a=s0(t);if(!a)return null;const s=e.toLowerCase();if(s==="edit"||s==="patch"){const l=typeof a.oldString=="string"?a.oldString:"",u=typeof a.newString=="string"?a.newString:"";if(l||u)return o.jsx(tD,{oldStr:l,newStr:u})}if(s==="todowrite"||s==="write_todos"){const l=Array.isArray(a.todos)?a.todos:null;if(l&&l.length>0)return o.jsx(JT,{todos:l})}if(s==="bash"||s==="shell"){const l=Va(a,["command","cmd","script"]);if(l)return o.jsxs("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:[o.jsx("span",{className:"select-none text-emerald-400/70",children:"❯ "}),l]})}if(s==="task"||s==="agent")return o.jsx(rD,{record:a});if(s==="read")return null;if(s==="write"){const l=typeof a.content=="string"?a.content:null;if(l){const u=l.length>500?`${l.slice(0,500)}…`:l;return o.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:u})}}return null}function oD(e,t){const a=e.toLowerCase();if(a==="todowrite"||a==="write_todos"){const s=Array.isArray(t)?t:null;if(s&&s.length>0)return o.jsx(JT,{todos:s})}return null}function uD({part:e}){const t=Hh(e),a=t==="running"||t==="pending",[s,l]=S.useState(a),[u,d]=S.useState(!1),f=S.useRef(a);S.useEffect(()=>{f.current!==a&&(l(a),f.current=a)},[a]);const m=xy(e),h=m.toLowerCase(),x=h==="task"||h==="agent",g=Yc(e),{label:y,arg:T}=eD(m,g),N=lD(m,g),v=N?null:Sx(g),A=Uh(e),w=oD(m,A),C=w?"":Sx(A),R=JM[t],U=C.length>Hm,V=u||!U?C:`${C.slice(0,Hm)}…`;return o.jsxs("div",{className:"my-1 overflow-hidden rounded-md border border-line bg-term/70",children:[o.jsxs("button",{type:"button",onClick:()=>l(L=>!L),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:[o.jsx("span",{className:oe("shrink-0 leading-none",R.color),children:s?"▾":"▸"}),o.jsx("span",{className:"shrink-0 font-medium text-fg",children:y}),T&&o.jsx("span",{className:"truncate text-fg-3",children:T}),o.jsxs("span",{className:oe("ml-auto flex shrink-0 items-center gap-1.5 leading-none",R.color),children:[o.jsx("span",{className:oe(R.spin&&"fs-spin"),children:R.glyph}),o.jsx("span",{children:R.label})]})]}),s&&o.jsx("div",{className:"border-t border-line px-3 py-2",children:o.jsxs("div",{className:oe("ml-1 border-l-2 pl-3 font-mono text-xs",R.accent),children:[N&&o.jsx("section",{className:"mb-2",children:N}),v&&o.jsxs("section",{className:"mb-2",children:[o.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wider text-fg-5",children:"input"}),o.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:v})]}),x&&o.jsx(iD,{part:e}),w&&o.jsx("section",{children:w}),C&&o.jsxs("section",{children:[o.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wider text-fg-5",children:"output"}),o.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:V}),U&&o.jsx("button",{type:"button",onClick:()=>d(L=>!L),className:"mt-1 text-blue-400 transition-colors hover:text-blue-300",children:u?"show less":`show ${C.length-Hm} more chars`})]}),!N&&!v&&!w&&!C&&o.jsx("div",{className:"text-fg-5",children:"no parameters"})]})})]})}function cD({text:e}){const[t,a]=S.useState(!1);return o.jsxs("div",{className:"my-1",children:[o.jsxs("button",{type:"button",onClick:()=>a(s=>!s),className:"flex items-center gap-1.5 font-mono text-xs text-fg-5 transition-colors hover:text-fg-3",children:[t?o.jsx(Ia,{className:"h-3 w-3 shrink-0"}):o.jsx(jh,{className:"h-3 w-3 shrink-0"}),o.jsx(KE,{className:"h-3 w-3 shrink-0"}),o.jsx("span",{children:"thinking"})]}),t&&o.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 dD(){const[e,t]=S.useState(0);return S.useEffect(()=>{const a=Date.now(),s=setInterval(()=>{t(Math.floor((Date.now()-a)/1e3))},1e3);return()=>clearInterval(s)},[]),o.jsxs("div",{className:"my-1 flex items-center gap-1.5 font-mono text-xs text-fg-5",children:[o.jsx(KE,{className:"h-3 w-3 shrink-0 animate-pulse"}),o.jsx("span",{children:"thinking"}),e>0&&o.jsxs("span",{className:"text-fg-6",children:[e,"s"]})]})}function e_({part:e,className:t}){var a;return e.url?(a=e.mime)!=null&&a.startsWith("image/")?o.jsx(wT,{url:e.url,label:e.filename??"attachment",className:oe("object-contain",t??"max-h-80")}):o.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs text-fg-5",children:[o.jsx(h3,{className:"h-3 w-3 shrink-0"}),o.jsx("span",{children:e.filename??e.mime??"attachment"})]}):null}function fD({part:e,isStreaming:t}){switch(yc(e)){case"text":{const s=Tc(e);return s.trim()?o.jsx("div",{className:"markdown-body leading-relaxed",children:o.jsx(us,{remarkPlugins:[cs],rehypePlugins:[VM],components:{table:n0},children:s})}):null}case"thinking":{const s=Tc(e);return s.trim()?o.jsx(cD,{text:s}):t?o.jsx(dD,{}):null}case"tool":return po(e)?o.jsx(WM,{part:e}):o.jsx(uD,{part:e});case"file":return o.jsx(e_,{part:e});default:return null}}function mD({message:e,isStreaming:t,queued:a}){var x,g,y,T,N,v;const s=e.role==="user",l=e.parts??[],u=l.filter(A=>yc(A)!=="other");if(s){const A=l.map(Tc).join("").trim(),w=l.filter(U=>yc(U)==="file"),C=(x=e.time)==null?void 0:x.created,R=C?new Date(C*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):null;return o.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:[o.jsxs("div",{className:"mb-1 flex items-center gap-2 text-[11px]",children:[o.jsx("span",{className:"font-medium text-emerald-400",children:"You"}),R&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-fg-6",children:"·"}),o.jsx("span",{className:"text-fg-5",children:R})]}),a&&o.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:[o.jsx("span",{className:"leading-none",children:"○"}),o.jsx("span",{children:"queued"})]})]}),o.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[o.jsx("span",{className:"shrink-0 select-none text-emerald-400",children:"❯"}),o.jsx("span",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words text-fg",children:A||"…"})]}),w.length>0&&o.jsx("div",{className:"mt-2 flex flex-wrap gap-2 pl-5",children:w.map((U,V)=>o.jsx(e_,{part:U,className:"max-h-40"},U.id??V))})]})}const d=((g=e.info)==null?void 0:g.agent)??e.agent,f=((y=e.info)==null?void 0:y.modelID)??e.modelID,m=(T=e.info)==null?void 0:T.error,h=(N=e.info)==null?void 0:N.finish;return o.jsxs("div",{className:"fs-fade-in font-mono",children:[(d||f)&&o.jsxs("div",{className:"mb-1 flex items-center gap-2 text-xs",children:[d&&o.jsx("span",{className:"text-fg-3",children:d}),d&&f&&o.jsx("span",{className:"text-fg-6",children:"·"}),f&&o.jsx("span",{className:"text-fg-5",children:f})]}),m&&o.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:[o.jsx(An,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("span",{className:"font-semibold",children:m.name??"Error"}),((v=m.data)==null?void 0:v.message)&&o.jsx("p",{className:"mt-0.5 text-red-400/80",children:m.data.message}),h&&h!=="end"&&o.jsxs("p",{className:"mt-0.5 text-red-400/60",children:["finish: ",h]})]})]}),o.jsx("div",{className:"space-y-2 text-sm text-fg",children:u.length>0?u.map((A,w)=>o.jsx(fD,{part:A,isStreaming:t},A.id??A.callID??w)):!m&&(t?o.jsx("span",{className:"text-fg-5",children:"…"}):o.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-amber-400/80",children:[o.jsx(An,{className:"h-3 w-3 shrink-0"}),o.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 pD(e){const t=e.find(s=>Pi(s.status)==="in_progress");if(t)return t.content;const a=e.find(s=>Pi(s.status)==="pending");return a?a.content:"all steps complete"}function gD({todos:e,onClick:t}){if(e.length===0)return null;const a=e.length,s=mw(e);return o.jsx("div",{className:"rounded-md border border-line bg-term/60 px-3 py-2",children:o.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center gap-2 text-left font-mono text-xs",children:[o.jsxs("span",{className:"shrink-0 tabular-nums text-fg-4",children:["[",s,"/",a,"]"]}),o.jsx("span",{className:"shrink-0 tracking-tight",children:e.map(l=>{const u=hD[Pi(l.status)];return o.jsx("span",{className:u.color,children:u.glyph},l.id)})}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-fg-2",children:pD(e)}),o.jsx("span",{className:"shrink-0 text-[10px] text-fg-5",children:"详情 →"})]})})}function bD({isListening:e,disabled:t,onClick:a,error:s}){return o.jsx("button",{type:"button",onClick:a,disabled:t,"aria-label":e?"停止语音输入":"语音输入",title:s??(e?"点击停止":"语音输入"),className:oe("flex h-7 w-7 shrink-0 items-center justify-center rounded-md transition-colors duration-150 disabled:cursor-not-allowed disabled:text-fg-6/40",e?"bg-red-500/15 text-red-400 hover:bg-red-500/25":"text-fg-5 hover:text-fg-3"),children:o.jsx(a3,{className:oe("h-4 w-4",e&&"animate-pulse")})})}const Fm=typeof window<"u"?window.SpeechRecognition??window.webkitSpeechRecognition:void 0;function xD(e="zh-CN"){const[t,a]=S.useState(!1),[s,l]=S.useState(""),[u,d]=S.useState(""),[f,m]=S.useState(null),h=S.useRef(null),x=S.useRef(!1),g=Fm!==void 0,y=S.useCallback(()=>{var v;x.current=!0,(v=h.current)==null||v.stop()},[]),T=S.useCallback(()=>{if(!Fm)return;l(""),d(""),m(null),x.current=!1;const v=new Fm;v.lang=e,v.continuous=!0,v.interimResults=!0,v.maxAlternatives=1,v.onstart=()=>a(!0),v.onresult=A=>{let w="",C="";for(let R=A.resultIndex;R<A.results.length;R++){const U=A.results[R][0].transcript;A.results[R].isFinal?w+=U:C+=U}w&&l(R=>R+w),d(C)},v.onerror=A=>{switch(A.error!=="no-speech"&&A.error!=="aborted"&&(x.current=!0),A.error){case"not-allowed":m("请允许麦克风权限");break;case"network":m("网络错误,请检查连接");break;case"no-speech":case"aborted":return;default:m(`语音识别错误:${A.error}`)}},v.onend=()=>{if(d(""),!x.current)try{v.start();return}catch{}a(!1),h.current=null},h.current=v;try{v.start()}catch{m("无法启动语音识别")}},[e]);S.useEffect(()=>()=>{var v;x.current=!0,(v=h.current)==null||v.stop()},[]);const N=S.useCallback(()=>{l(""),d("")},[]);return{isSupported:g,isListening:t,transcript:s,interimTranscript:u,error:f,start:T,stop:y,resetTranscript:N}}const ED=200;function yD(){return Ie(e=>{const t=e.activeSessionId;if(!t)return!1;const a=e.messages[t]??go;for(let s=a.length-1;s>=0;s--){const l=a[s].parts;if(l){for(const u of l)if(yc(u)==="tool"&&_c(u))return!0}}return!1})}function TD(){var ae;const[e,t]=S.useState(""),[a,s]=S.useState(""),[l,u]=S.useState([]),d=S.useRef(null),f=xD(),m=S.useRef(""),h=Ie(F=>F.activeSessionId),x=He(F=>F.activeRepoId),g=Ie(F=>{const O=F.activeSessionId;return O?F.sessionStatuses[O]:void 0}),y=Ie(F=>F.sendMessage),T=oc(F=>F.setDraft),N=oc(F=>F.clearDraft),v=yD();S.useEffect(()=>{if(!x){u([]);return}let F=!1;return(async()=>{try{const[O,ee]=await Promise.all([qc(),zc(x)]);if(F)return;const _e=O.pinned_models,P=_e?JSON.parse(_e):[];u(P.length>0?ee.filter(I=>P.includes(I.id)):[])}catch{F||u([])}})(),()=>{F=!0}},[x]);const A=g==="busy"&&!v,w=!h;S.useLayoutEffect(()=>{const F=d.current;F&&(F.style.height="auto",F.style.height=`${Math.min(F.scrollHeight,ED)}px`)},[e]);const C=((ae=l.find(F=>F.id===a))==null?void 0:ae.supportsImage)!==!1,{attachments:R,promptFiles:U,error:V,addFiles:L,onPaste:z,remove:X,clear:W}=kT(C);S.useEffect(()=>{t(h?oc.getState().drafts[h]??"":""),W(),f.stop()},[h,W,f.stop]);const j=async()=>{const F=e.trim();if(w||!F&&R.length===0)return;await y(F,a||void 0,U.length>0?U:void 0)&&(t(""),W(),h&&N(h))},K=F=>{F.nativeEvent.isComposing||F.keyCode===229||F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),j())},Z=()=>{if(f.isListening){f.stop();const F=m.current+f.transcript;t(F),h&&T(h,F)}else m.current=e,f.start()};S.useEffect(()=>{f.isListening&&t(m.current+f.transcript+f.interimTranscript)},[f.isListening,f.transcript,f.interimTranscript]);const se=h?v?"输入回复,或点击上方选项…":A?"输入消息将排队等待处理…":"enter a command…":"select or start a run",le=h?A?"text-amber-400 fs-blink":v?"text-blue-400":"text-emerald-400":"text-fg-6";return o.jsxs("div",{className:"border-t border-line bg-term px-4 py-4",children:[o.jsx(OT,{attachments:R,error:V,onRemove:X,className:"mx-auto max-w-4xl"}),o.jsxs("div",{className:oe("mx-auto flex max-w-4xl items-start gap-2 rounded-lg border px-3 py-2 transition-colors duration-150",w?"border-line":"border-fg-5 focus-within:border-fg-4"),children:[o.jsx("span",{className:oe("select-none pt-px font-mono text-sm leading-6",le),children:"❯"}),o.jsx("textarea",{ref:d,rows:2,value:e,disabled:w,onChange:F=>{const O=F.target.value;t(O),h&&T(h,O)},onKeyDown:K,onPaste:z,placeholder:se,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"}),o.jsx(RT,{onFiles:F=>void L(F),disabled:w,allowed:C}),f.isSupported&&o.jsx(bD,{isListening:f.isListening,disabled:w,onClick:Z,error:f.error}),o.jsx("button",{type:"button",onClick:j,disabled:w||e.trim().length===0&&R.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:o.jsx(GE,{className:"h-4 w-4",strokeWidth:2.5})})]}),o.jsxs("div",{className:"mx-auto mt-1.5 flex max-w-4xl items-center gap-3 pl-5",children:[f.isListening&&o.jsx("span",{className:"font-mono text-[10px] text-red-400 animate-pulse",children:"● 录音中…"}),f.error&&o.jsx("span",{className:"font-mono text-[10px] text-red-400",children:f.error}),o.jsx("span",{className:"font-mono text-[10px] text-fg-6",children:"⏎ to run · shift+⏎ for newline"}),l.length>0&&o.jsxs("select",{value:a,onChange:F=>s(F.target.value),className:"ml-auto 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:[o.jsx("option",{value:"",children:"默认模型"}),l.map(F=>o.jsx("option",{value:F.id,children:F.name||F.id},F.id))]})]})]})}const D1={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}};function L1({status:e,reason:t}){const a=D1[e??"idle"]??D1.idle;return o.jsxs("span",{className:oe("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:[o.jsx("span",{className:oe("leading-none",a.spin&&"fs-spin"),children:a.glyph}),o.jsx("span",{children:a.label})]})}const _D={"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},j1=1e6;function ND(e){if(!e)return j1;for(const[t,a]of Object.entries(_D))if(e.startsWith(t))return a;return j1}function B1(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function vD(e){return e>=1?`$${e.toFixed(2)}`:e>=.01?`$${e.toFixed(3)}`:e>0?`$${e.toFixed(4)}`:"$0"}function SD(e){for(let t=e.length-1;t>=0;t--){const a=e[t];if(a.role==="assistant"&&a.tokens){const s=a.tokens;if(s.cache&&(s.cache.read>0||s.cache.write>0)||s.input>0||s.output>0)return s}}return null}function P1({session:e,messages:t}){var m,h,x;const a=SD(t),s=(e==null?void 0:e.cost)??0;if(!a&&!s)return null;const l=a?a.input+(((m=a.cache)==null?void 0:m.read)??0)+(((h=a.cache)==null?void 0:h.write)??0):0,u=ND((x=e==null?void 0:e.model)==null?void 0:x.modelID),d=l>0?Math.min(Math.round(l/u*100),999):0,f=d>=80?"text-red-400":d>=50?"text-amber-400":"text-fg-5";return o.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px] text-fg-5",children:[l>0&&o.jsxs(o.Fragment,{children:[o.jsx("span",{title:"当前上下文 = cache_read + cache_write + input (最近一次请求)",children:B1(l)}),o.jsx("span",{className:"text-fg-6",children:"·"}),o.jsxs("span",{className:f,title:`上下文占比 (${B1(u)} 窗口)`,children:[d,"%"]}),o.jsx("span",{className:"text-fg-6",children:"·"})]}),o.jsx("span",{title:"会话累计费用",children:vD(s)})]})}const AD=144,CD=64;function t_({onToggleSidebar:e}){const[t,a]=S.useState(""),[s,l]=S.useState(""),[u,d]=S.useState(""),[f,m]=S.useState(""),[h,x]=S.useState(!1),g=S.useRef(null),y=S.useRef(null),[T,N]=S.useState([]),v=Ie(I=>I.createSession),A=Ie(I=>I.sendError),w=He(I=>I.activeRepoId),C=ji(I=>I.agents),R=Ge(I=>I.issues),U=Ge(I=>I.selectedIssueId),V=Ge(I=>I.pendingDraft);S.useEffect(()=>{if(!w){N([]);return}let I=!1;return zc(w).then(ie=>{I||N(ie)}).catch(()=>{I||N([])}),()=>{I=!0}},[w]);const L=T.length===0||T.some(I=>I.supportsImage!==!1),{attachments:z,promptFiles:X,error:W,addFiles:j,onPaste:K,remove:Z,clear:se}=kT(L);S.useEffect(()=>{U&&(d(U),Ge.getState().setSelectedIssue(null))},[U]),S.useEffect(()=>{V&&(a(V),Ge.getState().setPendingDraft(null))},[V]),S.useLayoutEffect(()=>{const I=g.current;I&&(I.style.height="auto",I.style.height=`${Math.min(I.scrollHeight,AD)}px`)},[t]),S.useEffect(()=>{const I=ie=>{y.current&&!y.current.contains(ie.target)&&x(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[]);const le=R.filter(I=>I.state==="open"),ae=R.find(I=>I.id===u),F=f.trim().toLowerCase(),O=F?le.filter(I=>`#${I.number} ${I.title}`.toLowerCase().includes(F)):le,ee=!!s||!!u,_e=()=>{const I=t.trim();!w||!I&&!ee&&z.length===0||(a(""),se(),v(I,void 0,void 0,void 0,u||void 0,s||void 0,X.length>0?X:void 0))},P=I=>{I.nativeEvent.isComposing||I.keyCode===229||I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),_e())};return o.jsxs("div",{className:"relative flex flex-1 flex-col items-center justify-center bg-term",children:[o.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:o.jsx(Uc,{className:"h-5 w-5"})}),o.jsxs("div",{className:"w-full max-w-2xl px-6",children:[o.jsx("div",{className:"mb-8 text-center",children:o.jsxs("div",{className:"font-mono text-2xl text-fg-6",children:[o.jsx("span",{className:"text-emerald-500/60",children:"❯"}),o.jsx("span",{className:"fs-blink text-fg-4",children:" ▋"})]})}),o.jsx(OT,{attachments:z,error:W,onRemove:Z}),o.jsxs("div",{className:"rounded-xl border border-line bg-base/80 shadow-sm transition-colors focus-within:border-fg-5",children:[o.jsxs("div",{className:"flex items-start gap-2 px-4 py-3",children:[o.jsx("span",{className:"select-none pt-px font-mono text-sm leading-6 text-emerald-400",children:"❯"}),o.jsx("textarea",{ref:g,rows:1,value:t,autoFocus:!0,disabled:!w,onChange:I=>a(I.target.value),onKeyDown:P,onPaste:K,placeholder:w?"让 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"}),o.jsx(RT,{onFiles:I=>void j(I),disabled:!w,allowed:!0}),o.jsx("button",{type:"button",onClick:_e,disabled:!w||!t.trim()&&!ee&&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:o.jsx(GE,{className:"h-4 w-4",strokeWidth:2.5})})]}),o.jsxs("div",{className:"flex flex-col gap-2 border-t border-line/60 px-4 py-2 sm:flex-row sm:items-center sm:gap-3",children:[o.jsxs("label",{className:"flex items-center gap-1.5 font-mono text-[11px] text-fg-4",children:[o.jsx("span",{className:"shrink-0",children:"Agent"}),o.jsxs("select",{value:s,onChange:I=>l(I.target.value),className:"rounded border border-line bg-surface px-2 py-1 font-mono text-xs text-fg focus:border-fg-5 focus:outline-none",children:[o.jsx("option",{value:"",children:"默认"}),C.map(I=>o.jsx("option",{value:I.id,children:I.name},I.id))]})]}),R.length>0&&o.jsxs("div",{ref:y,className:"relative hidden min-w-0 flex-1 items-center gap-1.5 font-mono text-[11px] text-fg-4 sm:flex",children:[o.jsx("span",{className:"shrink-0",children:"Issue"}),o.jsxs("button",{type:"button",onClick:()=>{x(I=>!I),m("")},className:"flex min-w-0 flex-1 items-center gap-1 truncate rounded border border-line bg-surface px-2 py-1 font-mono text-xs text-fg transition-colors hover:border-fg-5 focus:border-fg-5 focus:outline-none",children:[o.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:ae?`#${ae.number} ${ae.title}`:"无"}),o.jsx(Ia,{className:"h-3 w-3 shrink-0 text-fg-5"})]}),u&&o.jsx("button",{type:"button",onClick:()=>{d(""),m("")},className:"shrink-0 text-fg-5 hover:text-fg-3",children:o.jsx(gt,{className:"h-3 w-3"})}),h&&o.jsxs("div",{className:"absolute left-0 top-full z-50 mt-1 w-full min-w-[280px] rounded-md border border-line bg-surface shadow-lg",children:[o.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-2 py-1.5",children:[o.jsx(os,{className:"h-3 w-3 shrink-0 text-fg-5"}),o.jsx("input",{type:"text",value:f,onChange:I=>m(I.target.value),onKeyDown:I=>{I.key==="Escape"&&x(!1)},placeholder:"搜索 issue...",autoFocus:!0,className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"})]}),o.jsxs("ul",{className:"max-h-48 overflow-y-auto py-1",children:[!F&&o.jsx("li",{children:o.jsx("button",{type:"button",onClick:()=>{d(""),x(!1)},className:oe("w-full px-2.5 py-1.5 text-left font-mono text-xs transition-colors hover:bg-elevated/60",u?"text-fg-4":"text-blue-400"),children:"无"})}),O.map(I=>o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:()=>{d(I.id),m(""),x(!1)},className:oe("flex w-full items-center gap-1.5 px-2.5 py-1.5 text-left transition-colors hover:bg-elevated/60",I.id===u?"bg-blue-500/10":""),children:[o.jsxs("span",{className:oe("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium",I.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",I.number]}),o.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-fg-3",children:I.title})]})},I.id)),O.length===0&&o.jsx("li",{className:"px-2.5 py-3 text-center font-mono text-[10px] text-fg-5",children:"无匹配结果"})]})]})]})]})]}),o.jsx("div",{className:"mt-2 text-center font-mono text-[10px] text-fg-6",children:"⌘⏎ / ctrl+⏎ 开始运行"}),A&&o.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:A})]})]})}function U1({body:e}){return e?o.jsx("div",{className:"markdown-body leading-relaxed",children:o.jsx(us,{remarkPlugins:[cs],components:{table:n0},children:e})}):o.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"没有描述内容"})}function H1({issue:e}){var t;return o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("span",{className:oe("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=>o.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))]}),o.jsx("h2",{className:"mt-0.5 truncate text-sm font-medium text-fg",children:e.title})]})}function wD({onToggleSidebar:e}){const t=Ge(x=>x.matchingParentId),a=Ge(x=>x.matchingCandidateId),s=Ge(x=>x.issues.find(g=>g.id===t)),l=Ge(x=>x.issues.find(g=>g.id===a)),u=Ge(x=>x.exitMatchMode),d=Ge(x=>x.linkChild),[f,m]=S.useState(!1);if(!s)return null;const h=async()=>{l&&(m(!0),await d(s.number,l.number),m(!1))};return o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden bg-term",children:[o.jsxs("header",{className:"flex items-center gap-3 border-b border-line bg-base px-4 py-2.5",children:[o.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:o.jsx(Uc,{className:"h-5 w-5"})}),o.jsx("span",{className:"text-xs font-medium text-fg-4",children:"匹配子任务"}),o.jsxs("span",{className:"font-mono text-xs text-fg-3",children:["父: #",s.number]}),o.jsx("div",{className:"flex-1"}),o.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:[o.jsx(gt,{className:"h-3.5 w-3.5"}),"退出匹配"]})]}),o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[o.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:[o.jsx("div",{className:"border-b border-line/60 px-4 py-2.5",children:o.jsx(H1,{issue:s})}),o.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6",children:o.jsx(U1,{body:s.body})})]}),o.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:l?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-b border-line/60 px-4 py-2.5",children:o.jsx(H1,{issue:l})}),o.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6",children:o.jsx(U1,{body:l.body})})]}):o.jsx("div",{className:"flex flex-1 items-center justify-center",children:o.jsx("p",{className:"font-mono text-xs text-fg-5",children:"← 从左侧列表选择候选 Issue"})})})]}),l&&o.jsx("div",{className:"flex items-center justify-center gap-3 border-t border-line bg-base px-4 py-3",children:o.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:[o.jsx(oa,{className:"h-3.5 w-3.5"}),f?"关联中…":`确认: 将 #${l.number} 设为 #${s.number} 的子任务`]})})]})}function kD({onToggleSidebar:e}){var l;const t=Ge(u=>u.previewIssueId),a=Ge(u=>u.issues.find(d=>d.id===t));if(!a)return o.jsx(t_,{onToggleSidebar:e});const s=()=>{Ge.getState().setSelectedIssue(a.id),Ge.getState().setPreviewIssue(null)};return o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden bg-term",children:[o.jsxs("header",{className:"flex items-center gap-3 border-b border-line bg-base px-4 py-2.5",children:[o.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:o.jsx(Uc,{className:"h-5 w-5"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("span",{className:oe("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",a.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",a.number," ",a.state]}),(l=a.labels)==null?void 0:l.map(u=>o.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${u.color}20`,color:`#${u.color}`},children:u.name},u.id))]}),o.jsx("h2",{className:"mt-0.5 truncate text-sm font-medium text-fg",children:a.title})]}),o.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[a.htmlUrl&&o.jsxs("a",{href:a.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:[o.jsx(pc,{className:"h-3.5 w-3.5"}),"源站"]}),o.jsxs("button",{type:"button",onClick:()=>Ge.getState().enterMatchMode(a.id),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:[o.jsx(Ys,{className:"h-3.5 w-3.5"}),"匹配子任务"]}),o.jsxs("button",{type:"button",onClick:s,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:[o.jsx(Hc,{className:"h-3.5 w-3.5 fill-current"}),"开始处理"]})]})]}),o.jsx("div",{className:"flex-1 overflow-y-auto",children:o.jsx("div",{className:"mx-auto max-w-4xl px-6 py-6",children:a.body?o.jsx("div",{className:"markdown-body leading-relaxed",children:o.jsx(us,{remarkPlugins:[cs],components:{table:n0},children:a.body})}):o.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 Issue 没有描述内容"})})})]})}function RD({onToggleSidebar:e,onToggleRightPanel:t,rightPanelOpen:a}){var ae,F;const s=Aa(),l=He(ja),u=Ie(O=>O.activeSessionId),d=Ge(O=>O.previewIssueId),f=Ie(O=>O.sessions.find(ee=>ee.id===O.activeSessionId)??null),m=Ie(O=>{const ee=O.activeSessionId;return ee?O.messages[ee]??go:go}),h=Ie(O=>{const ee=O.activeSessionId;return ee?O.todos[ee]??Nc:Nc}),x=Ie(O=>{const ee=O.activeSessionId;return ee?O.sessionStatuses[ee]:void 0}),g=Ie(O=>{const ee=O.activeSessionId;return ee?O.queuedMessageIds[ee]??Ax:Ax}),y=Ie(O=>{const ee=O.activeSessionId;return ee?O.errorReasons[ee]:void 0}),T=Ie(O=>O.sendError),N=Ie(O=>O.abortSession),v=Ie(O=>O.revertToMessage),A=He(O=>O.repos.find(ee=>ee.id===O.activeRepoId)),w=(A==null?void 0:A.runtimeType)!=="claude-code",[C,R]=S.useState(null),[U,V]=S.useState(!1),L=Ge(O=>f!=null&&f.issueId?O.issues.find(ee=>ee.id===f.issueId):void 0);S.useEffect(()=>{if(u)return Cc.activateSession(u),()=>Cc.deactivateSession(u)},[u]);const z=S.useRef(null),X=S.useRef(!0),[W,j]=S.useState(!1);S.useEffect(()=>{const O=z.current;O&&X.current&&(O.scrollTop=O.scrollHeight)},[m,h]),S.useEffect(()=>{X.current=!0,j(!1)},[u]),S.useEffect(()=>{if(x!=="busy"&&x!=="retry")return;const O=ee=>{if(ee.key!=="Escape"||ee.defaultPrevented)return;const _e=ee.target;_e instanceof HTMLInputElement||_e instanceof HTMLTextAreaElement||_e!=null&&_e.isContentEditable||N()};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[x,N]);const K=Ge(O=>O.matchingParentId);if(!u)return K?o.jsx(wD,{onToggleSidebar:e}):d?o.jsx(kD,{onToggleSidebar:e}):o.jsx(t_,{onToggleSidebar:e});const Z=x==="busy",se=x==="retry",le=Z||se;return o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden bg-term",children:[o.jsxs("header",{className:"border-b border-line bg-base md:hidden",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",onClick:()=>V(O=>!O),children:[o.jsxs("div",{className:"flex items-center gap-1",onClick:O=>O.stopPropagation(),children:[o.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:o.jsx(Uc,{className:"h-5 w-5"})}),o.jsx("button",{type:"button",onClick:()=>Ie.setState({activeSessionId:null}),"aria-label":"新建运行",title:"新建运行",className:"rounded-lg p-1.5 text-fg-3 hover:bg-elevated",children:o.jsx(Wa,{className:"h-5 w-5"})})]}),o.jsxs("div",{className:"min-w-0 flex-1",children:[(f==null?void 0:f.parentID)&&o.jsxs("button",{type:"button",onClick:O=>{O.stopPropagation(),Ie.getState().setActiveSession(f.parentID)},className:"mb-0.5 flex items-center gap-1 text-[11px] text-fg-4 transition-colors hover:text-blue-400",children:[o.jsx(lx,{className:"h-3 w-3"}),"返回父会话"]}),o.jsx("h2",{className:"text-sm font-medium leading-snug text-fg",children:((ae=f==null?void 0:f.title)==null?void 0:ae.trim())||"untitled run"})]}),le&&o.jsx("span",{className:oe("h-2 w-2 shrink-0 rounded-full","bg-amber-400 animate-pulse")}),!le&&x==="error"&&o.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-red-400"}),o.jsx(Ia,{className:oe("h-4 w-4 shrink-0 text-fg-5 transition-transform duration-200",U&&"rotate-180")})]}),o.jsx("div",{className:oe("grid transition-[grid-template-rows] duration-200 ease-in-out",U?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:o.jsx("div",{className:"overflow-hidden",children:o.jsxs("div",{className:"flex flex-col gap-2.5 border-t border-line/60 px-4 py-3",children:[(f==null?void 0:f.agent)&&o.jsxs("div",{className:"flex items-center gap-2 font-mono text-xs text-fg-4",children:[o.jsx("span",{className:"w-14 shrink-0 text-fg-5",children:"Agent"}),o.jsx("span",{className:"truncate",children:f.agent})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"w-14 shrink-0 font-mono text-xs text-fg-5",children:"Status"}),o.jsx(L1,{status:x,reason:y})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"w-14 shrink-0 font-mono text-xs text-fg-5",children:"Context"}),o.jsx(P1,{session:f,messages:m})]}),L&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"w-14 shrink-0 font-mono text-xs text-fg-5",children:"Issue"}),o.jsxs("button",{type:"button",onClick:()=>s(`/${encodeURIComponent(l)}/issues?issueId=${L.id}`),className:"flex items-center gap-1.5 truncate font-mono text-xs text-fg-3 transition-colors hover:text-blue-400",children:[o.jsxs("span",{className:oe("shrink-0 rounded px-1 py-0.5 text-[10px] font-semibold",L.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",L.number]}),o.jsx("span",{className:"truncate",children:L.title})]})]}),le&&o.jsxs("button",{type:"button",onClick:()=>void N(),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:[o.jsx(Wm,{className:"h-3 w-3 fill-current"}),se?"stop retry":"stop"]})]})})})]}),o.jsxs("header",{className:"hidden items-center gap-3 border-b border-line bg-base px-4 py-2.5 md:flex",children:[o.jsxs("div",{className:"min-w-0 flex-1",children:[(f==null?void 0:f.parentID)&&o.jsxs("button",{type:"button",onClick:()=>void Ie.getState().setActiveSession(f.parentID),className:"mb-0.5 flex items-center gap-1 text-[11px] text-fg-4 transition-colors hover:text-blue-400",children:[o.jsx(lx,{className:"h-3 w-3"}),"返回父会话"]}),o.jsx("h2",{className:"truncate text-sm font-medium text-fg",children:((F=f==null?void 0:f.title)==null?void 0:F.trim())||"untitled run"}),(f==null?void 0:f.agent)&&o.jsx("p",{className:"truncate font-mono text-xs text-fg-4",children:f.agent}),o.jsx(P1,{session:f,messages:m})]}),L&&o.jsxs("button",{type:"button",onClick:()=>s(`/${encodeURIComponent(l)}/issues?issueId=${L.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:[o.jsxs("span",{className:oe("rounded px-1 py-0.5 text-[10px] font-semibold",L.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",L.number]}),o.jsx("span",{className:"hidden max-w-[120px] truncate sm:inline",children:L.title})]}),o.jsx(L1,{status:x,reason:y}),t&&o.jsx("button",{type:"button",onClick:t,"aria-label":a?"关闭侧边栏":"打开侧边栏",className:oe("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:o.jsx(WE,{className:"h-4 w-4"})}),le&&o.jsxs("button",{type:"button",onClick:()=>void N(),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:[o.jsx(Wm,{className:"h-3 w-3 fill-current"}),se?"stop retry":"stop"]})]}),o.jsxs("div",{className:"relative min-h-0 flex-1",children:[o.jsx("div",{ref:z,onScroll:()=>{const O=z.current;if(!O)return;const ee=O.scrollHeight-O.clientHeight-O.scrollTop<=CD;X.current=ee,j(!ee)},className:"h-full overflow-y-auto",children:o.jsxs("div",{className:"mx-auto flex max-w-4xl flex-col gap-3 px-4 py-4",children:[m.length===0?o.jsxs("p",{className:"py-10 text-center font-mono text-xs text-fg-6",children:[o.jsx("span",{className:"text-emerald-500/60",children:"❯"})," waiting for input",o.jsx("span",{className:"fs-blink",children:" ▋"})]}):m.map((O,ee)=>o.jsxs(S.Fragment,{children:[ee>0&&O.role==="user"&&o.jsx("div",{className:"group/revert relative border-t border-line py-2",children:w&&!le&&o.jsxs("button",{type:"button",disabled:C!==null,onClick:async()=>{const _e=m.length-ee;window.confirm(`回退到此处?将移除后续 ${_e} 条对话记录(不影响已产生的代码改动)。`)&&(R(O.id),await v(u,O.id),R(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:[C===O.id?o.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-current border-t-transparent"}):o.jsx(T3,{className:"h-3 w-3"}),"回退到此处"]})}),o.jsx("div",{"data-message-id":O.id,children:o.jsx(mD,{message:O,isStreaming:Z&&ee===m.length-1,queued:g.includes(O.id)})})]},O.id)),h.length>0&&o.jsx(gD,{todos:[...h],onClick:t})]})}),o.jsx("button",{type:"button",onClick:()=>{const O=z.current;O&&(O.scrollTo({top:O.scrollHeight,behavior:"smooth"}),X.current=!0)},"aria-label":"滚动到底部",className:oe("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",W?"translate-y-0 opacity-100":"pointer-events-none translate-y-2 opacity-0"),children:o.jsx(Ia,{className:"h-4 w-4"})})]}),x==="error"&&y&&o.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:[o.jsx(An,{className:"h-3.5 w-3.5 shrink-0"}),o.jsx("span",{className:"truncate",children:y})]}),T&&o.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:[o.jsx(An,{className:"h-3.5 w-3.5 shrink-0"}),o.jsx("span",{className:"truncate",children:T})]}),o.jsx(TD,{})]})}const Vn=Za((e,t)=>({pulls:[],loaded:!1,syncing:!1,selectedPrId:null,matchingPrId:null,matchingCandidateIssueId:null,clearPulls:()=>e({pulls:[],loaded:!1,selectedPrId:null,matchingPrId:null,matchingCandidateIssueId:null}),setSelectedPr:a=>e({selectedPrId:a}),enterMatchMode:a=>e({matchingPrId:a,matchingCandidateIssueId:null}),exitMatchMode:()=>{const a=t().matchingPrId;e({matchingPrId:null,matchingCandidateIssueId:null,selectedPrId:a})},setMatchCandidate:a=>e({matchingCandidateIssueId:a}),linkIssue:async(a,s)=>{const l=He.getState().activeRepoId;if(!l)return!1;try{return await MC(l,a,s),!0}catch{return!1}},unlinkIssue:async(a,s)=>{const l=He.getState().activeRepoId;if(!l)return!1;try{return await DC(l,a,s),!0}catch{return!1}},loadPulls:async()=>{const a=He.getState().activeRepoId;if(!a){e({pulls:[],loaded:!0});return}try{const s=await yx(a,"all");e({pulls:s,loaded:!0})}catch{e({loaded:!0})}},syncPulls:async()=>{const a=He.getState().activeRepoId;if(a){e({syncing:!0});try{await OC(a);const s=await yx(a,"all");e({pulls:s,syncing:!1})}catch(s){e({syncing:!1});let l="同步 PR 失败";if(s instanceof Xa)try{const u=JSON.parse(s.message);u.error&&(l=u.error)}catch{s.message&&(l=s.message)}Ft.getState().addToast(l,"error")}}}})),OD={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 ID(e){var l;const t=(l=e.time)==null?void 0:l.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 MD(e){if(!e.parts)return"";for(const t of e.parts){const a=t.content??t.text;if(a)return a}return""}function DD({todos:e}){if(e.length===0)return o.jsx("div",{className:"flex flex-1 items-center justify-center",children:o.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无待办项"})});const t=e.filter(a=>{const s=Pi(a.status);return s==="completed"||s==="cancelled"}).length;return o.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[o.jsxs("div",{className:"mb-2 font-mono text-[10px] tabular-nums text-fg-5",children:["进度 ",t,"/",e.length]}),o.jsx("ul",{className:"space-y-1.5",children:e.map(a=>{const s=Pi(a.status),l=OD[s],u=s==="completed"||s==="cancelled";return o.jsxs("li",{className:"flex items-start gap-2 font-mono text-xs",children:[o.jsx("span",{className:oe("shrink-0 leading-5",l.color,l.spin&&"fs-spin"),children:l.glyph}),o.jsx("span",{className:oe("leading-5",u?"text-fg-5 line-through":"text-fg-2"),children:a.content})]},a.id)})})]})}function LD({messages:e,onScrollToMessage:t}){const a=e.filter(s=>s.role==="user");return a.length===0?o.jsx("div",{className:"flex flex-1 items-center justify-center",children:o.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无输入记录"})}):o.jsx("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:o.jsx("ul",{className:"space-y-1",children:a.map((s,l)=>{const u=MD(s),d=ID(s);return o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:()=>t==null?void 0:t(s.id),className:"group w-full rounded-md px-2 py-1.5 text-left transition-colors hover:bg-elevated/60",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"shrink-0 font-mono text-[10px] text-emerald-400/60",children:"❯"}),o.jsxs("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:["#",l+1]}),d&&o.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-fg-6",children:d})]}),u&&o.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})]})},s.id)})})})}function jD({linked:e,number:t,title:a,state:s,mergedAt:l,isPr:u,onToggle:d}){const f=u?s==="open"?"bg-emerald-500/15 text-emerald-400":l?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400":s==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400";return o.jsx("li",{children:o.jsx("button",{type:"button",onClick:d,className:oe("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:o.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[o.jsxs("span",{className:oe("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-semibold",f),children:["#",t]}),o.jsx("span",{className:"min-w-0 truncate text-xs text-fg-2",children:a}),e&&o.jsx(Pc,{className:"ml-auto h-3 w-3 shrink-0 text-emerald-400"})]})})})}function BD({links:e,sessionId:t}){var L,z,X,W;const a=Aa(),s=He(ja),[l,u]=S.useState(null),[d,f]=S.useState(""),m=S.useRef(null),h=Ge(j=>j.issues),x=Vn(j=>j.pulls),g=Ie(j=>j.addLink),y=Ie(j=>j.removeLink),T=new Set(((L=e==null?void 0:e.issues)==null?void 0:L.map(j=>j.id))??[]),N=new Set(((z=e==null?void 0:e.pullRequests)==null?void 0:z.map(j=>j.id))??[]);S.useEffect(()=>{var j;l&&((j=m.current)==null||j.focus())},[l]);const v=()=>{u(null),f("")},A=async(j,K,Z)=>{t&&(Z?await y(t,j,K):await g(t,j,K))},w=d.trim().toLowerCase(),C=w?h.filter(j=>`#${j.number} ${j.title}`.toLowerCase().includes(w)):h,R=w?x.filter(j=>`#${j.number} ${j.title} ${j.headBranch}`.toLowerCase().includes(w)):x,U=((X=e==null?void 0:e.issues)==null?void 0:X.length)??0,V=((W=e==null?void 0:e.pullRequests)==null?void 0:W.length)??0;if(l){const j=l==="issue",K=j?C:R,Z=j?T:N;return o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-2",children:[o.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-400",children:j?"关联 Issue":"关联 PR"}),o.jsxs("button",{type:"button",onClick:v,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:[o.jsx(gt,{className:"h-3.5 w-3.5"}),"完成"]})]}),o.jsx("div",{className:"border-b border-line px-3 py-2",children:o.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[o.jsx(os,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),o.jsx("input",{ref:m,type:"text",value:d,onChange:se=>f(se.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"}),d&&o.jsx("button",{type:"button",onClick:()=>f(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:o.jsx(gt,{className:"h-3 w-3"})})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:K.length===0?o.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:(j?h:x).length===0?j?"暂无 Issue,请先同步":"暂无 PR,请先同步":"无匹配结果"}):o.jsx("ul",{className:"space-y-0.5",children:K.map(se=>o.jsx(jD,{linked:Z.has(se.id),number:se.number,title:se.title,state:se.state,mergedAt:j?void 0:se.mergedAt,isPr:!j,onToggle:()=>A(l,se.id,Z.has(se.id))},se.id))})})]})}return o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-2",children:[o.jsx("span",{className:"flex-1 font-mono text-[10px] text-fg-5",children:U+V>0?`${U+V} 项关联`:"暂无关联"}),o.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:[o.jsx(Wa,{className:"h-3 w-3"}),o.jsx("span",{className:"text-[10px] font-medium",children:"Issue"})]}),o.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:[o.jsx(Wa,{className:"h-3 w-3"}),o.jsx("span",{className:"text-[10px] font-medium",children:"PR"})]})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[U>0&&o.jsxs("div",{className:"mb-3",children:[o.jsxs("div",{className:"mb-1.5 font-mono text-[10px] font-medium uppercase tracking-wider text-fg-5",children:["Issues (",U,")"]}),o.jsx("ul",{className:"space-y-1",children:e.issues.map(j=>o.jsxs("li",{className:"group flex items-start gap-1",children:[o.jsxs("button",{type:"button",onClick:()=>a(`/${encodeURIComponent(s)}/issues?issueId=${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:[o.jsxs("span",{className:oe("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]}),o.jsx("span",{className:"line-clamp-2 text-xs leading-5 text-fg-3 group-hover:text-fg-2",children:j.title})]}),o.jsx("button",{type:"button",onClick:()=>void A("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:o.jsx(gt,{className:"h-3 w-3"})})]},j.id))})]}),V>0&&o.jsxs("div",{children:[o.jsxs("div",{className:"mb-1.5 font-mono text-[10px] font-medium uppercase tracking-wider text-fg-5",children:["Pull Requests (",V,")"]}),o.jsx("ul",{className:"space-y-1",children:e.pullRequests.map(j=>o.jsxs("li",{className:"group flex items-start gap-1",children:[o.jsxs("button",{type:"button",onClick:()=>a(`/${encodeURIComponent(s)}/pulls?prId=${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:[o.jsxs("span",{className:oe("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]}),o.jsx("span",{className:"line-clamp-2 text-xs leading-5 text-fg-3 group-hover:text-fg-2",children:j.title})]}),o.jsx("button",{type:"button",onClick:()=>void A("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:o.jsx(gt,{className:"h-3 w-3"})})]},j.id))})]}),U===0&&V===0&&o.jsx("div",{className:"flex flex-1 items-center justify-center py-10",children:o.jsx("p",{className:"font-mono text-xs text-fg-5",children:"点击上方按钮添加关联"})})]})]})}const PD={"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 UD(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 zm(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 s=Date.parse(e.createdAt);if(!Number.isNaN(s))return s}return null}function HD(e){const t=Date.now()-e,a=Math.floor(t/1e3);if(a<60)return"just now";const s=Math.floor(a/60);if(s<60)return`${s}m ago`;const l=Math.floor(s/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function FD(){const e=Ie(m=>m.sessions),t=Ie(m=>m.activeSessionId),a=Ie(m=>m.sessionStatuses),s=Ie(m=>m.setActiveSession),l=e.find(m=>m.id===t),u=(l==null?void 0:l.parentID)??t,d=!!(l!=null&&l.parentID),f=e.filter(m=>m.parentID===u).sort((m,h)=>(zm(h)??0)-(zm(m)??0));return f.length===0?o.jsx("div",{className:"flex flex-1 items-center justify-center",children:o.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无子任务"})}):o.jsxs("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:[d&&o.jsxs("div",{className:"mb-1.5 px-2 font-mono text-[10px] text-fg-5",children:["同级子任务 (",f.length,")"]}),o.jsx("ul",{className:"space-y-0.5",children:f.map(m=>{const h=m.id===t,x=a[m.id],g=zm(m),y=(m.agent&&PD[m.agent])??"bg-elevated text-fg-4",T=m.title||`${m.id.slice(0,9)}...`;return o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:()=>{h||s(m.id)},className:oe("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:[o.jsx("span",{className:oe("mt-1 h-2 w-2 shrink-0 rounded-full",UD(x))}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[m.agent&&o.jsx("span",{className:oe("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium",y),children:m.agent}),g!=null&&o.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-6",children:HD(g)})]}),o.jsx("p",{className:oe("mt-0.5 line-clamp-2 text-xs leading-5",h?"text-fg-2":"text-fg-3 group-hover:text-fg-2"),children:T})]})]})},m.id)})})]})}function F1({todos:e,messages:t,sessionLinks:a,sessionId:s,onScrollToMessage:l}){var N,v;const[u,d]=S.useState("todo"),f=Ie(A=>A.sessions),m=Ie(A=>A.activeSessionId),h=t.filter(A=>A.role==="user").length,x=(((N=a==null?void 0:a.issues)==null?void 0:N.length)??0)+(((v=a==null?void 0:a.pullRequests)==null?void 0:v.length)??0),g=f.find(A=>A.id===m),y=(g==null?void 0:g.parentID)??m,T=f.filter(A=>A.parentID===y).length;return o.jsxs("div",{className:"flex h-full w-72 shrink-0 flex-col border-l border-line bg-surface",children:[o.jsxs("div",{className:"flex items-center border-b border-line",children:[o.jsxs("button",{type:"button",onClick:()=>d("todo"),className:oe("flex flex-1 items-center justify-center gap-1.5 border-b-2 px-3 py-2.5 text-xs font-medium transition-colors",u==="todo"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:[o.jsx($A,{className:"h-3.5 w-3.5"}),"待办",e.length>0&&o.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:e.length})]}),o.jsxs("button",{type:"button",onClick:()=>d("prompts"),className:oe("flex flex-1 items-center justify-center gap-1.5 border-b-2 px-3 py-2.5 text-xs font-medium transition-colors",u==="prompts"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:[o.jsx(t3,{className:"h-3.5 w-3.5"}),"输入",h>0&&o.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:h})]}),o.jsxs("button",{type:"button",onClick:()=>d("links"),className:oe("flex flex-1 items-center justify-center gap-1.5 border-b-2 px-3 py-2.5 text-xs font-medium transition-colors",u==="links"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:[o.jsx(Pc,{className:"h-3.5 w-3.5"}),"关联",x>0&&o.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:x})]}),o.jsxs("button",{type:"button",onClick:()=>d("subtasks"),className:oe("flex flex-1 items-center justify-center gap-1.5 border-b-2 px-3 py-2.5 text-xs font-medium transition-colors",u==="subtasks"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:[o.jsx(Ys,{className:"h-3.5 w-3.5"}),"子任务",T>0&&o.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:T})]})]}),u==="todo"?o.jsx(DD,{todos:e}):u==="prompts"?o.jsx(LD,{messages:t,onScrollToMessage:l}):u==="links"?o.jsx(BD,{links:a,sessionId:s}):o.jsx(FD,{})]})}const z1=8;function zD(e,t){let a=e instanceof Element?e:null;for(;a&&a!==t;){if(a.scrollWidth>a.clientWidth){const s=getComputedStyle(a).overflowX;if(s==="auto"||s==="scroll")return!0}a=a.parentElement}return!1}function n_({onSwipeLeft:e,onSwipeRight:t,threshold:a=40,disabled:s=!1}={}){const l=S.useRef({x0:0,y0:0,dir:null,on:!1}),u=S.useRef(0),d=S.useCallback(h=>{if(s||zD(h.target,h.currentTarget))return;const x=h.touches[0];l.current={x0:x.clientX,y0:x.clientY,dir:null,on:!0},u.current=0},[s]),f=S.useCallback(h=>{const x=l.current;if(!x.on)return;const g=h.touches[0].clientX-x.x0,y=h.touches[0].clientY-x.y0;if(!x.dir){(Math.abs(g)>z1||Math.abs(y)>z1)&&(x.dir=Math.abs(g)>Math.abs(y)?"h":"v");return}if(x.dir==="v"){x.on=!1;return}u.current=g},[]),m=S.useCallback(()=>{const h=l.current;if(!h.on||h.dir!=="h"){h.on=!1;return}h.on=!1;const x=u.current;x>a?t==null||t():x<-a&&(e==null||e())},[a,e,t]);return{onTouchStart:d,onTouchMove:f,onTouchEnd:m}}function ph({side:e,open:t,onClose:a,children:s,width:l="w-80"}){const u=e==="left";return o.jsxs("div",{className:"md:hidden",children:[t&&o.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:a,"aria-hidden":"true"}),o.jsx("div",{className:oe("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",l,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:s})]})}function gh(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 s=Date.parse(e.createdAt);return Number.isNaN(s)?0:s}return 0}function qD(e){const t=gh(e);if(!t)return"";const a=t<1e12?t*1e3:t,s=new Date(a);return s.toDateString()===new Date().toDateString()?s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):s.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function q1(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>Y1(e)):Y1(e)}function Y1(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 YD(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 $D({session:e,isActive:t,isConfirming:a,onSelect:s,onDelete:l,onConfirm:u,onCancelConfirm:d,onRename:f,onToggleComplete:m,status:h,issue:x,linkedItems:g}){var ae,F;const y=oc(O=>O.drafts[e.id]),T=!!e.completedAt,N=qD(e),[v,A]=S.useState(!1),[w,C]=S.useState(""),R=S.useRef(null),U=()=>{var O;C(((O=e.title)==null?void 0:O.trim())||""),A(!0),requestAnimationFrame(()=>{var ee;return(ee=R.current)==null?void 0:ee.focus()})},V=()=>{var ee;A(!1);const O=w.trim();O&&O!==(((ee=e.title)==null?void 0:ee.trim())||"")&&f(O)},[L,z]=S.useState(0),[X,W]=S.useState(!1),j=S.useRef({x0:0,y0:0,base:0,dir:null,on:!1}),K=O=>{const ee=O.touches[0];j.current={x0:ee.clientX,y0:ee.clientY,base:L,dir:null,on:!0},W(!1)},Z=O=>{const ee=j.current;if(!ee.on)return;const _e=O.touches[0].clientX-ee.x0,P=O.touches[0].clientY-ee.y0;if(!ee.dir){(Math.abs(_e)>5||Math.abs(P)>5)&&(ee.dir=Math.abs(_e)>Math.abs(P)?"h":"v");return}ee.dir!=="v"&&z(Math.max(-192,Math.min(0,ee.base+_e)))},se=()=>{j.current.on=!1,W(!0),z(O=>O<-192/2?-192:0)},le=()=>{W(!0),z(0)};return o.jsxs("li",{className:"relative overflow-hidden rounded-md",children:[o.jsx("div",{className:"absolute right-0 top-0 bottom-0 flex md:hidden",style:L<0?{zIndex:10}:void 0,children:a?o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",onClick:()=>{l(),le()},className:"flex w-12 items-center justify-center bg-red-500 text-white active:bg-red-600",children:o.jsx(oa,{className:"h-4 w-4"})}),o.jsx("button",{type:"button",onClick:()=>{d(),le()},className:"flex w-12 items-center justify-center bg-neutral-500 text-white active:bg-neutral-600",children:o.jsx(gt,{className:"h-4 w-4"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",onClick:()=>{m(),le()},className:oe("flex w-12 items-center justify-center text-white",T?"bg-neutral-500 active:bg-neutral-600":"bg-emerald-500 active:bg-emerald-600"),children:o.jsx(mm,{className:"h-4 w-4"})}),o.jsx("button",{type:"button",onClick:()=>{U(),le()},className:"flex w-12 items-center justify-center bg-amber-500 text-white active:bg-amber-600",children:o.jsx(ox,{className:"h-4 w-4"})}),o.jsx("button",{type:"button",onClick:()=>{var O;q1(JSON.stringify({id:e.id,name:((O=e.title)==null?void 0:O.trim())||""},null,2)),le()},className:"flex w-12 items-center justify-center bg-blue-500 text-white active:bg-blue-600",children:o.jsx(hc,{className:"h-4 w-4"})}),o.jsx("button",{type:"button",onClick:()=>u(),className:"flex w-12 items-center justify-center bg-red-500 text-white active:bg-red-600",children:o.jsx(zs,{className:"h-4 w-4"})})]})}),o.jsxs("div",{className:oe("group relative rounded-md border-l-2",t?"border-blue-500 bg-elevated":"border-transparent bg-surface hover:bg-elevated/50",X&&"transition-transform duration-200 ease-out"),style:{...L!==0?{transform:`translateX(${L}px)`}:{},...L===-192?{pointerEvents:"none"}:{}},onTouchStart:K,onTouchMove:Z,onTouchEnd:se,children:[o.jsxs("button",{type:"button",onClick:()=>{v||(s(),le())},className:oe("block w-full px-2.5 py-2 text-left",T&&!t&&"opacity-50"),style:L===-192?{pointerEvents:"auto"}:void 0,children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:oe("h-1.5 w-1.5 shrink-0 rounded-full",YD(h))}),o.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-fg-3",children:((ae=e.agent)==null?void 0:ae.trim())||"默认"}),T&&o.jsx(mm,{className:"h-3 w-3 shrink-0 text-emerald-400"}),N&&o.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:N})]}),v?o.jsx("input",{ref:R,type:"text",value:w,onChange:O=>C(O.target.value),onBlur:V,onKeyDown:O=>{O.key==="Enter"&&V(),O.key==="Escape"&&A(!1)},onClick:O=>O.stopPropagation(),className:"mt-0.5 w-full rounded border border-blue-500 bg-base pl-3.5 text-sm text-fg-2 outline-none"}):o.jsxs("div",{className:"mt-0.5 pl-3.5",onDoubleClick:O=>{O.stopPropagation(),U()},children:[(x||g)&&o.jsxs("div",{className:"mb-0.5 flex flex-wrap gap-1",children:[x&&o.jsxs("span",{className:oe("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium leading-none",x.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",x.number]}),g==null?void 0:g.map(O=>o.jsx("span",{className:oe("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium leading-none",O.type==="pr"?O.state==="open"?"bg-blue-500/15 text-blue-400":O.mergedAt?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400":O.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:O.type==="pr"?`PR#${O.number}`:`#${O.number}`},`${O.type}-${O.number}`))]}),o.jsx("span",{className:"block truncate text-sm text-fg-2",children:((F=e.title)==null?void 0:F.trim())||"未命名运行"}),y&&o.jsxs("span",{className:"mt-0.5 block truncate text-xs text-amber-400/80",children:["✏️ ",y]})]})]}),a?o.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:[o.jsx("button",{type:"button",onClick:l,className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:o.jsx(oa,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:d,className:"rounded p-1 text-fg-3 hover:bg-elevated",children:o.jsx(gt,{className:"h-3.5 w-3.5"})})]}):o.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:[o.jsx("button",{type:"button",onClick:m,title:T?"取消完成":"标记完成",className:oe("rounded p-1",T?"text-emerald-400 hover:text-emerald-300":"text-fg-5 hover:text-emerald-400"),children:o.jsx(mm,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:U,title:"重命名",className:"rounded p-1 text-fg-5 hover:text-fg-2",children:o.jsx(ox,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:()=>{var O;q1(JSON.stringify({id:e.id,name:((O=e.title)==null?void 0:O.trim())||""},null,2))},title:"复制 Session JSON",className:"rounded p-1 text-fg-5 hover:text-fg-2",children:o.jsx(hc,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:u,className:"rounded p-1 text-fg-5 hover:text-red-400",children:o.jsx(zs,{className:"h-3.5 w-3.5"})})]})]})]})}function $1({onClose:e}){const[t,a]=S.useState(null),s=Ie(C=>C.sessions),l=Ie(C=>C.activeSessionId),u=Ie(C=>C.sessionStatuses),d=Ie(C=>C.sessionFilter),f=Ie(C=>C.setSessionFilter),m=Ie(C=>C.setActiveSession),h=Ie(C=>C.deleteSession),x=Ie(C=>C.renameSession),g=Ie(C=>C.toggleSessionComplete),y=He(C=>C.activeRepoId),T=Ge(C=>C.issues),N=Ie(C=>C.allSessionLinks),v=[...s].filter(C=>C.parentID?!1:d==="active"?!C.completedAt:d==="completed"?!!C.completedAt:!0).sort((C,R)=>gh(R)-gh(C)),A=new Map(T.map(C=>[C.id,C])),w=C=>o.jsx("ul",{className:"space-y-0.5",children:C.map(R=>{const U=R.issueId?A.get(R.issueId):void 0,V=N[R.id],L=[];if(V){for(const z of V.issues)L.push({number:z.number,state:z.state,type:"issue"});for(const z of V.pullRequests)L.push({number:z.number,state:z.state,type:"pr",mergedAt:z.mergedAt})}return o.jsx($D,{session:R,isActive:R.id===l,isConfirming:t===R.id,status:u[R.id],issue:U?{number:U.number,title:U.title,state:U.state}:void 0,linkedItems:L.length>0?L:void 0,onSelect:()=>{m(R.id),e==null||e()},onDelete:()=>{h(R.id),a(null)},onConfirm:()=>a(R.id),onCancelConfirm:()=>a(null),onRename:z=>void x(R.id,z),onToggleComplete:()=>void g(R.id)},R.id)})});return o.jsx("div",{className:"flex h-full w-80 shrink-0 flex-col border-r border-line bg-surface",children:o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[o.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"运行记录"}),y&&o.jsx("button",{type:"button",onClick:()=>{Ie.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:o.jsx(Wa,{className:"h-4 w-4"})})]}),y&&o.jsx("div",{className:"flex gap-1 border-b border-line px-3 py-1.5",children:[["all","全部"],["active","进行中"],["completed","已完成"]].map(([C,R])=>o.jsx("button",{type:"button",onClick:()=>f(C),className:oe("rounded-md px-2 py-0.5 font-mono text-[11px] transition-colors",d===C?"bg-elevated text-fg-2":"text-fg-5 hover:text-fg-3"),children:R},C))}),o.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:y?v.length===0?o.jsx("p",{className:"px-2 py-6 text-center font-mono text-xs text-fg-5",children:"暂无运行记录"}):o.jsx("div",{children:w(v)}):o.jsx("p",{className:"px-2 py-6 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]})})}function GD(){const[e,t]=S.useState(()=>typeof window<"u"&&window.matchMedia("(min-width: 1280px)").matches);return S.useEffect(()=>{const a=window.matchMedia("(min-width: 1280px)"),s=l=>t(l.matches);return a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e}function G1(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))}function KD(){const[e,t]=S.useState(!1),[a,s]=S.useState(!1),[l,u]=S.useState(!1),d=GD(),f=Ie(A=>A.activeSessionId),m=Ec(A=>A.sessionPanelCollapsed),h=Ec(A=>A.toggleSessionPanel),x=Ie(A=>{const w=A.activeSessionId;return w?A.todos[w]??Nc:Nc}),g=Ie(A=>{const w=A.activeSessionId;return w?A.messages[w]??go:go}),y=Ie(A=>{const w=A.activeSessionId;return w?A.sessionLinks[w]:void 0});S.useEffect(()=>{d&&f?u(!0):d||u(!1)},[d,f]);const T=l&&!!f,N=()=>{window.matchMedia("(max-width: 767px)").matches?s(A=>!A):u(A=>!A)},v=n_({onSwipeRight:()=>t(!0),onSwipeLeft:()=>s(!0),disabled:e||a});return o.jsxs("div",{className:"flex min-h-0 flex-1",...v,children:[o.jsxs("div",{className:"relative hidden shrink-0 md:flex",children:[o.jsx("div",{className:oe("overflow-hidden transition-[width] duration-200 ease-in-out",m?"w-0":"w-80"),children:o.jsx("div",{className:"h-full w-80",children:o.jsx($1,{})})}),o.jsx("button",{type:"button",onClick:h,title:m?"展开运行记录":"收起运行记录",className:oe("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",m?"bg-surface opacity-80 hover:w-5 hover:opacity-100":"bg-surface/80 opacity-40 hover:opacity-100"),children:m?o.jsx(jh,{className:"h-3 w-3"}):o.jsx(Lh,{className:"h-3 w-3"})})]}),o.jsx(ph,{side:"left",open:e,onClose:()=>t(!1),children:o.jsx($1,{onClose:()=>t(!1)})}),o.jsx(ph,{side:"right",open:a,onClose:()=>s(!1),children:o.jsx(F1,{todos:x,messages:g,sessionLinks:y,sessionId:f,onScrollToMessage:A=>{s(!1),setTimeout(()=>G1(A),300)}})}),o.jsx("div",{className:"flex min-w-0 flex-1 flex-col",children:o.jsx(RD,{onToggleSidebar:()=>t(A=>!A),onToggleRightPanel:N,rightPanelOpen:T})}),T&&o.jsx("div",{className:"hidden shrink-0 md:flex",children:o.jsx(F1,{todos:x,messages:g,sessionLinks:y,sessionId:f,onScrollToMessage:G1})})]})}const K1=/[#.]/g;function VD(e,t){const a=e||"",s={};let l=0,u,d;for(;l<a.length;){K1.lastIndex=l;const f=K1.exec(a),m=a.slice(l,f?f.index:a.length);m&&(u?u==="#"?s.id=m:Array.isArray(s.className)?s.className.push(m):s.className=[m]:d=m,l+=m.length),f&&(u=f[0],l++)}return{type:"element",tagName:d||t||"div",properties:s,children:[]}}function a_(e,t,a){const s=a?ZD(a):void 0;function l(u,d,...f){let m;if(u==null){m={type:"root",children:[]};const h=d;f.unshift(h)}else{m=VD(u,t);const h=m.tagName.toLowerCase(),x=s?s.get(h):void 0;if(m.tagName=x||h,QD(d))f.unshift(d);else for(const[g,y]of Object.entries(d))XD(e,m.properties,g,y)}for(const h of f)bh(m.children,h);return m.type==="element"&&m.tagName==="template"&&(m.content={type:"root",children:m.children},m.children=[]),m}return l}function QD(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 s of a){const l=t[s];if(l&&typeof l=="object"){if(!Array.isArray(l))return!0;const u=l;for(const d of u)if(typeof d!="number"&&typeof d!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function XD(e,t,a,s){const l=$c(e,a);let u;if(s!=null){if(typeof s=="number"){if(Number.isNaN(s))return;u=s}else typeof s=="boolean"?u=s:typeof s=="string"?l.spaceSeparated?u=Mx(s):l.commaSeparated?u=wx(s):l.commaOrSpaceSeparated?u=Mx(wx(s).join(" ")):u=V1(l,l.property,s):Array.isArray(s)?u=[...s]:u=l.property==="style"?WD(s):String(s);if(Array.isArray(u)){const d=[];for(const f of u)d.push(V1(l,l.property,f));u=d}l.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[l.property]=u}}function bh(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)bh(e,a);else if(typeof t=="object"&&"type"in t)t.type==="root"?bh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function V1(e,t,a){if(typeof a=="string"){if(e.number&&a&&!Number.isNaN(Number(a)))return Number(a);if((e.boolean||e.overloadedBoolean)&&(a===""||bo(a)===bo(t)))return!0}return a}function WD(e){const t=[];for(const[a,s]of Object.entries(e))t.push([a,s].join(": "));return t.join("; ")}function ZD(e){const t=new Map;for(const a of e)t.set(a.toLowerCase(),a);return t}const JD=["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"],eL=a_(vo,"div"),tL=a_(ds,"g",JD);function nL(e){const t=String(e),a=[];return{toOffset:l,toPoint:s};function s(u){if(typeof u=="number"&&u>-1&&u<=t.length){let d=0;for(;;){let f=a[d];if(f===void 0){const m=Q1(t,a[d-1]);f=m===-1?t.length+1:m+1,a[d]=f}if(f>u)return{line:d+1,column:u-(d>0?a[d-1]:0)+1,offset:u};d++}}}function l(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=Q1(t,f),h=m===-1?t.length+1:m+1;if(f===h)break;a.push(h)}const d=(u.line>1?a[u.line-2]:0)+u.column-1;if(d<a[u.line-1])return d}}}function Q1(e,t){const a=e.indexOf("\r",t),s=e.indexOf(`
490
+ `,t);return s===-1?a:a===-1||a+1===s?s:a<s?a:s}const Ps={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/"},r_={}.hasOwnProperty,aL=Object.prototype;function rL(e,t){const a=t||{};return i0({file:a.file||void 0,location:!1,schema:a.space==="svg"?ds:vo,verbose:a.verbose||!1},e)}function i0(e,t){let a;switch(t.nodeName){case"#comment":{const s=t;return a={type:"comment",value:s.data},cc(e,s,a),a}case"#document":case"#document-fragment":{const s=t,l="mode"in s?s.mode==="quirks"||s.mode==="limited-quirks":!1;if(a={type:"root",children:s_(e,t.childNodes),data:{quirksMode:l}},e.file&&e.location){const u=String(e.file),d=nL(u),f=d.toPoint(0),m=d.toPoint(u.length);a.position={start:f,end:m}}return a}case"#documentType":{const s=t;return a={type:"doctype"},cc(e,s,a),a}case"#text":{const s=t;return a={type:"text",value:s.value},cc(e,s,a),a}default:return a=sL(e,t),a}}function s_(e,t){let a=-1;const s=[];for(;++a<t.length;){const l=i0(e,t[a]);s.push(l)}return s}function sL(e,t){const a=e.schema;e.schema=t.namespaceURI===Ps.svg?ds:vo;let s=-1;const l={};for(;++s<t.attrs.length;){const f=t.attrs[s],m=(f.prefix?f.prefix+":":"")+f.name;r_.call(aL,m)||(l[m]=f.value)}const d=(e.schema.space==="svg"?tL:eL)(t.tagName,l,s_(e,t.childNodes));if(cc(e,t,d),d.tagName==="template"){const f=t,m=f.sourceCodeLocation,h=m&&m.startTag&&Bi(m.startTag),x=m&&m.endTag&&Bi(m.endTag),g=i0(e,f.content);h&&x&&e.file&&(g.position={start:h.end,end:x.start}),d.content=g}return e.schema=a,d}function cc(e,t,a){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const s=iL(e,a,t.sourceCodeLocation);s&&(e.location=!0,a.position=s)}}function iL(e,t,a){const s=Bi(a);if(t.type==="element"){const l=t.children[t.children.length-1];if(s&&!a.endTag&&l&&l.position&&l.position.end&&(s.end=Object.assign({},l.position.end)),e.verbose){const u={};let d;if(a.attrs)for(d in a.attrs)r_.call(a.attrs,d)&&(u[$c(e.schema,d).property]=Bi(a.attrs[d]));a.startTag;const f=Bi(a.startTag),m=a.endTag?Bi(a.endTag):void 0,h={opening:f};m&&(h.closing=m),h.properties=u,t.data={position:h}}}return s}function Bi(e){const t=X1({line:e.startLine,column:e.startCol,offset:e.startOffset}),a=X1({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||a?{start:t,end:a}:void 0}function X1(e){return e.line&&e.column?e:void 0}const lL={},oL={}.hasOwnProperty,i_=lT("type",{handlers:{root:cL,element:pL,text:mL,comment:hL,doctype:fL}});function uL(e,t){const s=(t||lL).space;return i_(e,s==="svg"?ds:vo)}function cL(e,t){const a={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return a.childNodes=l0(e.children,a,t),Vi(e,a),a}function dL(e,t){const a={nodeName:"#document-fragment",childNodes:[]};return a.childNodes=l0(e.children,a,t),Vi(e,a),a}function fL(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Vi(e,t),t}function mL(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Vi(e,t),t}function hL(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Vi(e,t),t}function pL(e,t){const a=t;let s=a;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=ds);const l=[];let u;if(e.properties){for(u in e.properties)if(u!=="children"&&oL.call(e.properties,u)){const m=gL(s,u,e.properties[u]);m&&l.push(m)}}const d=s.space,f={nodeName:e.tagName,tagName:e.tagName,attrs:l,namespaceURI:Ps[d],childNodes:[],parentNode:null};return f.childNodes=l0(e.children,f,s),Vi(e,f),e.tagName==="template"&&e.content&&(f.content=dL(e.content,s)),f}function gL(e,t,a){const s=$c(e,t);if(a===!1||a===null||a===void 0||typeof a=="number"&&Number.isNaN(a)||!a&&s.boolean)return;Array.isArray(a)&&(a=s.commaSeparated?yy(a):wy(a));const l={name:s.attribute,value:a===!0?"":String(a)};if(s.space&&s.space!=="html"&&s.space!=="svg"){const u=l.name.indexOf(":");u<0?l.prefix="":(l.name=l.name.slice(u+1),l.prefix=s.attribute.slice(0,u)),l.namespace=Ps[s.space]}return l}function l0(e,t,a){let s=-1;const l=[];if(e)for(;++s<e.length;){const u=i_(e[s],a);u.parentNode=t,l.push(u)}return l}function Vi(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 bL=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],xL=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]),Pt="�";var M;(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"})(M||(M={}));const Gn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function l_(e){return e>=55296&&e<=57343}function EL(e){return e>=56320&&e<=57343}function yL(e,t){return(e-55296)*1024+9216+t}function o_(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function u_(e){return e>=64976&&e<=65007||xL.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 TL=65536;class _L{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=TL,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:s,col:l,offset:u}=this,d=l+a,f=u+a;return{code:t,startLine:s,endLine:s,startCol:d,endCol:d,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(EL(a))return this.pos++,this._addGap(),yL(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,M.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 s=0;s<t.length;s++)if((this.html.charCodeAt(this.pos+s)|32)!==t.charCodeAt(s))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,M.EOF;const s=this.html.charCodeAt(a);return s===M.CARRIAGE_RETURN?M.LINE_FEED:s}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,M.EOF;let t=this.html.charCodeAt(this.pos);return t===M.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,M.LINE_FEED):t===M.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,l_(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===M.LINE_FEED||t===M.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){o_(t)?this._err(ce.controlCharacterInInputStream):u_(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 tt;(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"})(tt||(tt={}));function c_(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 NL=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୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢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;怳Ādp໩໮uct;戏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ǣጓ\0጖y;䐎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Ā;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀ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Ā;e᜚᜜lƀ;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\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩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ↄⅪ←ٖ↛ǰ↉\0↎proø₞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;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\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\0⹻m;櫳;櫽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))),vL=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 SL(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=vL.get(e))!==null&&t!==void 0?t:e}var mn;(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"})(mn||(mn={}));const AL=32;var ls;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ls||(ls={}));function xh(e){return e>=mn.ZERO&&e<=mn.NINE}function CL(e){return e>=mn.UPPER_A&&e<=mn.UPPER_F||e>=mn.LOWER_A&&e<=mn.LOWER_F}function wL(e){return e>=mn.UPPER_A&&e<=mn.UPPER_Z||e>=mn.LOWER_A&&e<=mn.LOWER_Z||xh(e)}function kL(e){return e===mn.EQUALS||wL(e)}var fn;(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"})(fn||(fn={}));var Sr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Sr||(Sr={}));class RL{constructor(t,a,s){this.decodeTree=t,this.emitCodePoint=a,this.errors=s,this.state=fn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Sr.Strict}startEntity(t){this.decodeMode=t,this.state=fn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case fn.EntityStart:return t.charCodeAt(a)===mn.NUM?(this.state=fn.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=fn.NamedEntity,this.stateNamedEntity(t,a));case fn.NumericStart:return this.stateNumericStart(t,a);case fn.NumericDecimal:return this.stateNumericDecimal(t,a);case fn.NumericHex:return this.stateNumericHex(t,a);case fn.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|AL)===mn.LOWER_X?(this.state=fn.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=fn.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,s,l){if(a!==s){const u=s-a;this.result=this.result*Math.pow(l,u)+Number.parseInt(t.substr(a,u),l),this.consumed+=u}}stateNumericHex(t,a){const s=a;for(;a<t.length;){const l=t.charCodeAt(a);if(xh(l)||CL(l))a+=1;else return this.addToNumericResult(t,s,a,16),this.emitNumericEntity(l,3)}return this.addToNumericResult(t,s,a,16),-1}stateNumericDecimal(t,a){const s=a;for(;a<t.length;){const l=t.charCodeAt(a);if(xh(l))a+=1;else return this.addToNumericResult(t,s,a,10),this.emitNumericEntity(l,2)}return this.addToNumericResult(t,s,a,10),-1}emitNumericEntity(t,a){var s;if(this.consumed<=a)return(s=this.errors)===null||s===void 0||s.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===mn.SEMI)this.consumed+=1;else if(this.decodeMode===Sr.Strict)return 0;return this.emitCodePoint(SL(this.result),this.consumed),this.errors&&(t!==mn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:s}=this;let l=s[this.treeIndex],u=(l&ls.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const d=t.charCodeAt(a);if(this.treeIndex=OL(s,l,this.treeIndex+Math.max(1,u),d),this.treeIndex<0)return this.result===0||this.decodeMode===Sr.Attribute&&(u===0||kL(d))?0:this.emitNotTerminatedNamedEntity();if(l=s[this.treeIndex],u=(l&ls.VALUE_LENGTH)>>14,u!==0){if(d===mn.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Sr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:s}=this,l=(s[a]&ls.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,l,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,s){const{decodeTree:l}=this;return this.emitCodePoint(a===1?l[t]&~ls.VALUE_LENGTH:l[t+1],s),a===3&&this.emitCodePoint(l[t+2],s),s}end(){var t;switch(this.state){case fn.NamedEntity:return this.result!==0&&(this.decodeMode!==Sr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case fn.NumericDecimal:return this.emitNumericEntity(0,2);case fn.NumericHex:return this.emitNumericEntity(0,3);case fn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case fn.EntityStart:return 0}}}function OL(e,t,a,s){const l=(t&ls.BRANCH_LENGTH)>>7,u=t&ls.JUMP_TABLE;if(l===0)return u!==0&&s===u?a:-1;if(u){const m=s-u;return m<0||m>=l?-1:e[a+m]-1}let d=a,f=d+l-1;for(;d<=f;){const m=d+f>>>1,h=e[m];if(h<s)d=m+1;else if(h>s)f=m-1;else return e[m+l]}return-1}var ge;(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/"})(ge||(ge={}));var Hs;(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"})(Hs||(Hs={}));var Na;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Na||(Na={}));var J;(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"})(J||(J={}));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 IL=new Map([[J.A,E.A],[J.ADDRESS,E.ADDRESS],[J.ANNOTATION_XML,E.ANNOTATION_XML],[J.APPLET,E.APPLET],[J.AREA,E.AREA],[J.ARTICLE,E.ARTICLE],[J.ASIDE,E.ASIDE],[J.B,E.B],[J.BASE,E.BASE],[J.BASEFONT,E.BASEFONT],[J.BGSOUND,E.BGSOUND],[J.BIG,E.BIG],[J.BLOCKQUOTE,E.BLOCKQUOTE],[J.BODY,E.BODY],[J.BR,E.BR],[J.BUTTON,E.BUTTON],[J.CAPTION,E.CAPTION],[J.CENTER,E.CENTER],[J.CODE,E.CODE],[J.COL,E.COL],[J.COLGROUP,E.COLGROUP],[J.DD,E.DD],[J.DESC,E.DESC],[J.DETAILS,E.DETAILS],[J.DIALOG,E.DIALOG],[J.DIR,E.DIR],[J.DIV,E.DIV],[J.DL,E.DL],[J.DT,E.DT],[J.EM,E.EM],[J.EMBED,E.EMBED],[J.FIELDSET,E.FIELDSET],[J.FIGCAPTION,E.FIGCAPTION],[J.FIGURE,E.FIGURE],[J.FONT,E.FONT],[J.FOOTER,E.FOOTER],[J.FOREIGN_OBJECT,E.FOREIGN_OBJECT],[J.FORM,E.FORM],[J.FRAME,E.FRAME],[J.FRAMESET,E.FRAMESET],[J.H1,E.H1],[J.H2,E.H2],[J.H3,E.H3],[J.H4,E.H4],[J.H5,E.H5],[J.H6,E.H6],[J.HEAD,E.HEAD],[J.HEADER,E.HEADER],[J.HGROUP,E.HGROUP],[J.HR,E.HR],[J.HTML,E.HTML],[J.I,E.I],[J.IMG,E.IMG],[J.IMAGE,E.IMAGE],[J.INPUT,E.INPUT],[J.IFRAME,E.IFRAME],[J.KEYGEN,E.KEYGEN],[J.LABEL,E.LABEL],[J.LI,E.LI],[J.LINK,E.LINK],[J.LISTING,E.LISTING],[J.MAIN,E.MAIN],[J.MALIGNMARK,E.MALIGNMARK],[J.MARQUEE,E.MARQUEE],[J.MATH,E.MATH],[J.MENU,E.MENU],[J.META,E.META],[J.MGLYPH,E.MGLYPH],[J.MI,E.MI],[J.MO,E.MO],[J.MN,E.MN],[J.MS,E.MS],[J.MTEXT,E.MTEXT],[J.NAV,E.NAV],[J.NOBR,E.NOBR],[J.NOFRAMES,E.NOFRAMES],[J.NOEMBED,E.NOEMBED],[J.NOSCRIPT,E.NOSCRIPT],[J.OBJECT,E.OBJECT],[J.OL,E.OL],[J.OPTGROUP,E.OPTGROUP],[J.OPTION,E.OPTION],[J.P,E.P],[J.PARAM,E.PARAM],[J.PLAINTEXT,E.PLAINTEXT],[J.PRE,E.PRE],[J.RB,E.RB],[J.RP,E.RP],[J.RT,E.RT],[J.RTC,E.RTC],[J.RUBY,E.RUBY],[J.S,E.S],[J.SCRIPT,E.SCRIPT],[J.SEARCH,E.SEARCH],[J.SECTION,E.SECTION],[J.SELECT,E.SELECT],[J.SOURCE,E.SOURCE],[J.SMALL,E.SMALL],[J.SPAN,E.SPAN],[J.STRIKE,E.STRIKE],[J.STRONG,E.STRONG],[J.STYLE,E.STYLE],[J.SUB,E.SUB],[J.SUMMARY,E.SUMMARY],[J.SUP,E.SUP],[J.TABLE,E.TABLE],[J.TBODY,E.TBODY],[J.TEMPLATE,E.TEMPLATE],[J.TEXTAREA,E.TEXTAREA],[J.TFOOT,E.TFOOT],[J.TD,E.TD],[J.TH,E.TH],[J.THEAD,E.THEAD],[J.TITLE,E.TITLE],[J.TR,E.TR],[J.TRACK,E.TRACK],[J.TT,E.TT],[J.U,E.U],[J.UL,E.UL],[J.SVG,E.SVG],[J.VAR,E.VAR],[J.WBR,E.WBR],[J.XMP,E.XMP]]);function Qi(e){var t;return(t=IL.get(e))!==null&&t!==void 0?t:E.UNKNOWN}const be=E,ML={[ge.HTML]:new Set([be.ADDRESS,be.APPLET,be.AREA,be.ARTICLE,be.ASIDE,be.BASE,be.BASEFONT,be.BGSOUND,be.BLOCKQUOTE,be.BODY,be.BR,be.BUTTON,be.CAPTION,be.CENTER,be.COL,be.COLGROUP,be.DD,be.DETAILS,be.DIR,be.DIV,be.DL,be.DT,be.EMBED,be.FIELDSET,be.FIGCAPTION,be.FIGURE,be.FOOTER,be.FORM,be.FRAME,be.FRAMESET,be.H1,be.H2,be.H3,be.H4,be.H5,be.H6,be.HEAD,be.HEADER,be.HGROUP,be.HR,be.HTML,be.IFRAME,be.IMG,be.INPUT,be.LI,be.LINK,be.LISTING,be.MAIN,be.MARQUEE,be.MENU,be.META,be.NAV,be.NOEMBED,be.NOFRAMES,be.NOSCRIPT,be.OBJECT,be.OL,be.P,be.PARAM,be.PLAINTEXT,be.PRE,be.SCRIPT,be.SECTION,be.SELECT,be.SOURCE,be.STYLE,be.SUMMARY,be.TABLE,be.TBODY,be.TD,be.TEMPLATE,be.TEXTAREA,be.TFOOT,be.TH,be.THEAD,be.TITLE,be.TR,be.TRACK,be.UL,be.WBR,be.XMP]),[ge.MATHML]:new Set([be.MI,be.MO,be.MN,be.MS,be.MTEXT,be.ANNOTATION_XML]),[ge.SVG]:new Set([be.TITLE,be.FOREIGN_OBJECT,be.DESC]),[ge.XLINK]:new Set,[ge.XML]:new Set,[ge.XMLNS]:new Set},Eh=new Set([be.H1,be.H2,be.H3,be.H4,be.H5,be.H6]);J.STYLE,J.SCRIPT,J.XMP,J.IFRAME,J.NOEMBED,J.NOFRAMES,J.PLAINTEXT;var B;(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"})(B||(B={}));const Xt={DATA:B.DATA,RCDATA:B.RCDATA,RAWTEXT:B.RAWTEXT,SCRIPT_DATA:B.SCRIPT_DATA,PLAINTEXT:B.PLAINTEXT,CDATA_SECTION:B.CDATA_SECTION};function DL(e){return e>=M.DIGIT_0&&e<=M.DIGIT_9}function to(e){return e>=M.LATIN_CAPITAL_A&&e<=M.LATIN_CAPITAL_Z}function LL(e){return e>=M.LATIN_SMALL_A&&e<=M.LATIN_SMALL_Z}function ss(e){return LL(e)||to(e)}function W1(e){return ss(e)||DL(e)}function rc(e){return e+32}function d_(e){return e===M.SPACE||e===M.LINE_FEED||e===M.TABULATION||e===M.FORM_FEED}function Z1(e){return d_(e)||e===M.SOLIDUS||e===M.GREATER_THAN_SIGN}function jL(e){return e===M.NULL?ce.nullCharacterReference:e>1114111?ce.characterReferenceOutsideUnicodeRange:l_(e)?ce.surrogateCharacterReference:u_(e)?ce.noncharacterCharacterReference:o_(e)||e===M.CARRIAGE_RETURN?ce.controlCharacterReference:null}class BL{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=B.DATA,this.returnState=B.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new _L(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new RL(NL,(s,l)=>{this.preprocessor.pos=this.entityStartPos+l-1,this._flushCodePointConsumedAsCharacterReference(s)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ce.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:s=>{this._err(ce.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+s)},validateNumericCharacterReference:s=>{const l=jL(s);l&&this._err(l,1)}}:void 0)}_err(t,a=0){var s,l;(l=(s=this.handler).onParseError)===null||l===void 0||l.call(s,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,s){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||s==null||s()}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:tt.START_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:tt.END_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:tt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:tt.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 s=this.currentToken;if(c_(s,this.currentAttr.name)===null){if(s.attrs.push(this.currentAttr),s.location&&this.currentLocation){const l=(t=(a=s.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);l[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=Qi(t.tagName),t.type===tt.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 tt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case tt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case tt.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:tt.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=d_(t)?tt.WHITESPACE_CHARACTER:t===M.NULL?tt.NULL_CHARACTER:tt.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(tt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=B.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Sr.Attribute:Sr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===B.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===B.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===B.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case B.DATA:{this._stateData(t);break}case B.RCDATA:{this._stateRcdata(t);break}case B.RAWTEXT:{this._stateRawtext(t);break}case B.SCRIPT_DATA:{this._stateScriptData(t);break}case B.PLAINTEXT:{this._statePlaintext(t);break}case B.TAG_OPEN:{this._stateTagOpen(t);break}case B.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case B.TAG_NAME:{this._stateTagName(t);break}case B.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case B.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case B.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case B.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case B.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case B.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case B.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case B.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case B.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case B.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case B.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case B.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case B.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case B.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case B.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case B.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case B.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case B.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case B.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case B.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case B.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case B.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case B.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case B.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case B.BOGUS_COMMENT:{this._stateBogusComment(t);break}case B.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case B.COMMENT_START:{this._stateCommentStart(t);break}case B.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case B.COMMENT:{this._stateComment(t);break}case B.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case B.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case B.COMMENT_END:{this._stateCommentEnd(t);break}case B.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case B.DOCTYPE:{this._stateDoctype(t);break}case B.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case B.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case B.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case B.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case B.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case B.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case B.CDATA_SECTION:{this._stateCdataSection(t);break}case B.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case B.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case B.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case B.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case M.LESS_THAN_SIGN:{this.state=B.TAG_OPEN;break}case M.AMPERSAND:{this._startCharacterReference();break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this._emitCodePoint(t);break}case M.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case M.AMPERSAND:{this._startCharacterReference();break}case M.LESS_THAN_SIGN:{this.state=B.RCDATA_LESS_THAN_SIGN;break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case M.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case M.LESS_THAN_SIGN:{this.state=B.RAWTEXT_LESS_THAN_SIGN;break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case M.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case M.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_LESS_THAN_SIGN;break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case M.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case M.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case M.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ss(t))this._createStartTagToken(),this.state=B.TAG_NAME,this._stateTagName(t);else switch(t){case M.EXCLAMATION_MARK:{this.state=B.MARKUP_DECLARATION_OPEN;break}case M.SOLIDUS:{this.state=B.END_TAG_OPEN;break}case M.QUESTION_MARK:{this._err(ce.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t);break}case M.EOF:{this._err(ce.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ce.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=B.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ss(t))this._createEndTagToken(),this.state=B.TAG_NAME,this._stateTagName(t);else switch(t){case M.GREATER_THAN_SIGN:{this._err(ce.missingEndTagName),this.state=B.DATA;break}case M.EOF:{this._err(ce.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ce.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const a=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=B.BEFORE_ATTRIBUTE_NAME;break}case M.SOLIDUS:{this.state=B.SELF_CLOSING_START_TAG;break}case M.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentTagToken();break}case M.NULL:{this._err(ce.unexpectedNullCharacter),a.tagName+=Pt;break}case M.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(to(t)?rc(t):t)}}_stateRcdataLessThanSign(t){t===M.SOLIDUS?this.state=B.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=B.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ss(t)?(this.state=B.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=B.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 M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=B.BEFORE_ATTRIBUTE_NAME,!1;case M.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=B.SELF_CLOSING_START_TAG,!1;case M.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=B.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===M.SOLIDUS?this.state=B.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ss(t)?(this.state=B.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case M.SOLIDUS:{this.state=B.SCRIPT_DATA_END_TAG_OPEN;break}case M.EXCLAMATION_MARK:{this.state=B.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=B.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ss(t)?(this.state=B.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===M.HYPHEN_MINUS?(this.state=B.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===M.HYPHEN_MINUS?(this.state=B.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case M.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case M.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case M.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case M.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case M.HYPHEN_MINUS:{this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case M.GREATER_THAN_SIGN:{this.state=B.SCRIPT_DATA,this._emitChars(">");break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case M.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===M.SOLIDUS?this.state=B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ss(t)?(this._emitChars("<"),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ss(t)?(this.state=B.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Gn.SCRIPT,!1)&&Z1(this.preprocessor.peek(Gn.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Gn.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case M.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case M.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case M.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case M.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case M.HYPHEN_MINUS:{this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case M.GREATER_THAN_SIGN:{this.state=B.SCRIPT_DATA,this._emitChars(">");break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case M.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===M.SOLIDUS?(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Gn.SCRIPT,!1)&&Z1(this.preprocessor.peek(Gn.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Gn.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=B.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.SOLIDUS:case M.GREATER_THAN_SIGN:case M.EOF:{this.state=B.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case M.EQUALS_SIGN:{this._err(ce.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=B.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=B.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:case M.SOLIDUS:case M.GREATER_THAN_SIGN:case M.EOF:{this._leaveAttrName(),this.state=B.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case M.EQUALS_SIGN:{this._leaveAttrName(),this.state=B.BEFORE_ATTRIBUTE_VALUE;break}case M.QUOTATION_MARK:case M.APOSTROPHE:case M.LESS_THAN_SIGN:{this._err(ce.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.name+=Pt;break}default:this.currentAttr.name+=String.fromCodePoint(to(t)?rc(t):t)}}_stateAfterAttributeName(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.SOLIDUS:{this.state=B.SELF_CLOSING_START_TAG;break}case M.EQUALS_SIGN:{this.state=B.BEFORE_ATTRIBUTE_VALUE;break}case M.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentTagToken();break}case M.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=B.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.QUOTATION_MARK:{this.state=B.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case M.APOSTROPHE:{this.state=B.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case M.GREATER_THAN_SIGN:{this._err(ce.missingAttributeValue),this.state=B.DATA,this.emitCurrentTagToken();break}default:this.state=B.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case M.QUOTATION_MARK:{this.state=B.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case M.AMPERSAND:{this._startCharacterReference();break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case M.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case M.APOSTROPHE:{this.state=B.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case M.AMPERSAND:{this._startCharacterReference();break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case M.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this._leaveAttrValue(),this.state=B.BEFORE_ATTRIBUTE_NAME;break}case M.AMPERSAND:{this._startCharacterReference();break}case M.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=B.DATA,this.emitCurrentTagToken();break}case M.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case M.QUOTATION_MARK:case M.APOSTROPHE:case M.LESS_THAN_SIGN:case M.EQUALS_SIGN:case M.GRAVE_ACCENT:{this._err(ce.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case M.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this._leaveAttrValue(),this.state=B.BEFORE_ATTRIBUTE_NAME;break}case M.SOLIDUS:{this._leaveAttrValue(),this.state=B.SELF_CLOSING_START_TAG;break}case M.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=B.DATA,this.emitCurrentTagToken();break}case M.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._err(ce.missingWhitespaceBetweenAttributes),this.state=B.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case M.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=B.DATA,this.emitCurrentTagToken();break}case M.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._err(ce.unexpectedSolidusInTag),this.state=B.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case M.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentComment(a);break}case M.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case M.NULL:{this._err(ce.unexpectedNullCharacter),a.data+=Pt;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Gn.DASH_DASH,!0)?(this._createCommentToken(Gn.DASH_DASH.length+1),this.state=B.COMMENT_START):this._consumeSequenceIfMatch(Gn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Gn.DOCTYPE.length+1),this.state=B.DOCTYPE):this._consumeSequenceIfMatch(Gn.CDATA_START,!0)?this.inForeignNode?this.state=B.CDATA_SECTION:(this._err(ce.cdataInHtmlContent),this._createCommentToken(Gn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=B.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ce.incorrectlyOpenedComment),this._createCommentToken(2),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case M.HYPHEN_MINUS:{this.state=B.COMMENT_START_DASH;break}case M.GREATER_THAN_SIGN:{this._err(ce.abruptClosingOfEmptyComment),this.state=B.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=B.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case M.HYPHEN_MINUS:{this.state=B.COMMENT_END;break}case M.GREATER_THAN_SIGN:{this._err(ce.abruptClosingOfEmptyComment),this.state=B.DATA,this.emitCurrentComment(a);break}case M.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=B.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case M.HYPHEN_MINUS:{this.state=B.COMMENT_END_DASH;break}case M.LESS_THAN_SIGN:{a.data+="<",this.state=B.COMMENT_LESS_THAN_SIGN;break}case M.NULL:{this._err(ce.unexpectedNullCharacter),a.data+=Pt;break}case M.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 M.EXCLAMATION_MARK:{a.data+="!",this.state=B.COMMENT_LESS_THAN_SIGN_BANG;break}case M.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=B.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===M.HYPHEN_MINUS?this.state=B.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=B.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===M.HYPHEN_MINUS?this.state=B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=B.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==M.GREATER_THAN_SIGN&&t!==M.EOF&&this._err(ce.nestedComment),this.state=B.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case M.HYPHEN_MINUS:{this.state=B.COMMENT_END;break}case M.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=B.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case M.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentComment(a);break}case M.EXCLAMATION_MARK:{this.state=B.COMMENT_END_BANG;break}case M.HYPHEN_MINUS:{a.data+="-";break}case M.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=B.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case M.HYPHEN_MINUS:{a.data+="--!",this.state=B.COMMENT_END_DASH;break}case M.GREATER_THAN_SIGN:{this._err(ce.incorrectlyClosedComment),this.state=B.DATA,this.emitCurrentComment(a);break}case M.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=B.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_NAME;break}case M.GREATER_THAN_SIGN:{this.state=B.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case M.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=B.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(to(t))this._createDoctypeToken(String.fromCharCode(rc(t))),this.state=B.DOCTYPE_NAME;else switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.NULL:{this._err(ce.unexpectedNullCharacter),this._createDoctypeToken(Pt),this.state=B.DOCTYPE_NAME;break}case M.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=B.DATA;break}case M.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=B.DOCTYPE_NAME}}_stateDoctypeName(t){const a=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=B.AFTER_DOCTYPE_NAME;break}case M.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(a);break}case M.NULL:{this._err(ce.unexpectedNullCharacter),a.name+=Pt;break}case M.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(to(t)?rc(t):t)}}_stateAfterDoctypeName(t){const a=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(a);break}case M.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Gn.PUBLIC,!1)?this.state=B.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Gn.SYSTEM,!1)?this.state=B.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ce.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const a=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case M.QUOTATION_MARK:{this._err(ce.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{this._err(ce.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case M.GREATER_THAN_SIGN:{this._err(ce.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(a);break}case M.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.QUOTATION_MARK:{a.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{a.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case M.GREATER_THAN_SIGN:{this._err(ce.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(a);break}case M.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case M.QUOTATION_MARK:{this.state=B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case M.NULL:{this._err(ce.unexpectedNullCharacter),a.publicId+=Pt;break}case M.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=B.DATA;break}case M.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 M.APOSTROPHE:{this.state=B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case M.NULL:{this._err(ce.unexpectedNullCharacter),a.publicId+=Pt;break}case M.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=B.DATA;break}case M.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 M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case M.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(a);break}case M.QUOTATION_MARK:{this._err(ce.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{this._err(ce.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case M.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const a=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=B.DATA;break}case M.QUOTATION_MARK:{a.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{a.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case M.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const a=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case M.QUOTATION_MARK:{this._err(ce.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{this._err(ce.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case M.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(a);break}case M.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.QUOTATION_MARK:{a.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{a.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case M.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(a);break}case M.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case M.QUOTATION_MARK:{this.state=B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case M.NULL:{this._err(ce.unexpectedNullCharacter),a.systemId+=Pt;break}case M.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=B.DATA;break}case M.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 M.APOSTROPHE:{this.state=B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case M.NULL:{this._err(ce.unexpectedNullCharacter),a.systemId+=Pt;break}case M.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=B.DATA;break}case M.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 M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=B.DATA;break}case M.EOF:{this._err(ce.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(ce.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case M.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=B.DATA;break}case M.NULL:{this._err(ce.unexpectedNullCharacter);break}case M.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case M.RIGHT_SQUARE_BRACKET:{this.state=B.CDATA_SECTION_BRACKET;break}case M.EOF:{this._err(ce.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===M.RIGHT_SQUARE_BRACKET?this.state=B.CDATA_SECTION_END:(this._emitChars("]"),this.state=B.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case M.GREATER_THAN_SIGN:{this.state=B.DATA;break}case M.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=B.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(M.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&W1(this.preprocessor.peek(1))?B.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){W1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===M.SEMICOLON&&this._err(ce.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const f_=new Set([E.DD,E.DT,E.LI,E.OPTGROUP,E.OPTION,E.P,E.RB,E.RP,E.RT,E.RTC]),J1=new Set([...f_,E.CAPTION,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]),Rc=new Set([E.APPLET,E.CAPTION,E.HTML,E.MARQUEE,E.OBJECT,E.TABLE,E.TD,E.TEMPLATE,E.TH]),PL=new Set([...Rc,E.OL,E.UL]),UL=new Set([...Rc,E.BUTTON]),eE=new Set([E.ANNOTATION_XML,E.MI,E.MN,E.MO,E.MS,E.MTEXT]),tE=new Set([E.DESC,E.FOREIGN_OBJECT,E.TITLE]),HL=new Set([E.TR,E.TEMPLATE,E.HTML]),FL=new Set([E.TBODY,E.TFOOT,E.THEAD,E.TEMPLATE,E.HTML]),zL=new Set([E.TABLE,E.TEMPLATE,E.HTML]),qL=new Set([E.TD,E.TH]);class YL{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,s){this.treeAdapter=a,this.handler=s,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)===ge.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 s=this._indexOf(t);this.items[s]=a,s===this.stackTop&&(this.current=a)}insertAfter(t,a,s){const l=this._indexOf(t)+1;this.items.splice(l,0,a),this.tagIDs.splice(l,0,s),this.stackTop++,l===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,l===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])!==ge.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 s=this._indexOfTagNames(t,a);this.shortenToLength(Math.max(s,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Eh,ge.HTML)}popUntilTableCellPopped(){this.popUntilPopped(qL,ge.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let s=this.stackTop;s>=0;s--)if(t.has(this.tagIDs[s])&&this.treeAdapter.getNamespaceURI(this.items[s])===a)return s;return-1}clearBackTo(t,a){const s=this._indexOfTagNames(t,a);this.shortenToLength(s+1)}clearBackToTableContext(){this.clearBackTo(zL,ge.HTML)}clearBackToTableBodyContext(){this.clearBackTo(FL,ge.HTML)}clearBackToTableRowContext(){this.clearBackTo(HL,ge.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 s=this.stackTop;s>=0;s--){const l=this.tagIDs[s];switch(this.treeAdapter.getNamespaceURI(this.items[s])){case ge.HTML:{if(l===t)return!0;if(a.has(l))return!1;break}case ge.SVG:{if(tE.has(l))return!1;break}case ge.MATHML:{if(eE.has(l))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Rc)}hasInListItemScope(t){return this.hasInDynamicScope(t,PL)}hasInButtonScope(t){return this.hasInDynamicScope(t,UL)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ge.HTML:{if(Eh.has(a))return!0;if(Rc.has(a))return!1;break}case ge.SVG:{if(tE.has(a))return!1;break}case ge.MATHML:{if(eE.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===ge.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])===ge.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])===ge.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&&f_.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&J1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&J1.has(this.currentTagId);)this.pop()}}const qm=3;var Qa;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Qa||(Qa={}));const nE={type:Qa.Marker};class $L{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const s=[],l=a.length,u=this.treeAdapter.getTagName(t),d=this.treeAdapter.getNamespaceURI(t);for(let f=0;f<this.entries.length;f++){const m=this.entries[f];if(m.type===Qa.Marker)break;const{element:h}=m;if(this.treeAdapter.getTagName(h)===u&&this.treeAdapter.getNamespaceURI(h)===d){const x=this.treeAdapter.getAttrList(h);x.length===l&&s.push({idx:f,attrs:x})}}return s}_ensureNoahArkCondition(t){if(this.entries.length<qm)return;const a=this.treeAdapter.getAttrList(t),s=this._getNoahArkConditionCandidates(t,a);if(s.length<qm)return;const l=new Map(a.map(d=>[d.name,d.value]));let u=0;for(let d=0;d<s.length;d++){const f=s[d];f.attrs.every(m=>l.get(m.name)===m.value)&&(u+=1,u>=qm&&this.entries.splice(f.idx,1))}}insertMarker(){this.entries.unshift(nE)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:Qa.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const s=this.entries.indexOf(this.bookmark);this.entries.splice(s,0,{type:Qa.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(nE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const a=this.entries.find(s=>s.type===Qa.Marker||this.treeAdapter.getTagName(s.element)===t);return a&&a.type===Qa.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===Qa.Element&&a.element===t)}}const is={createDocument(){return{nodeName:"#document",mode:Na.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 s=e.childNodes.indexOf(a);e.childNodes.splice(s,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,s){const l=e.childNodes.find(u=>u.nodeName==="#documentType");if(l)l.name=t,l.publicId=a,l.systemId=s;else{const u={nodeName:"#documentType",name:t,publicId:a,systemId:s,parentNode:null};is.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(is.isTextNode(a)){a.value+=t;return}}is.appendChild(e,is.createTextNode(t))},insertTextBefore(e,t,a){const s=e.childNodes[e.childNodes.indexOf(a)-1];s&&is.isTextNode(s)?s.value+=t:is.insertBefore(e,is.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(s=>s.name));for(let s=0;s<t.length;s++)a.has(t[s].name)||e.attrs.push(t[s])},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}}},m_="html",GL="about:legacy-compat",KL="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",h_=["+//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//"],VL=[...h_,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],QL=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),p_=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],XL=[...p_,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function aE(e,t){return t.some(a=>e.startsWith(a))}function WL(e){return e.name===m_&&e.publicId===null&&(e.systemId===null||e.systemId===GL)}function ZL(e){if(e.name!==m_)return Na.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===KL)return Na.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),QL.has(a))return Na.QUIRKS;let s=t===null?VL:h_;if(aE(a,s))return Na.QUIRKS;if(s=t===null?p_:XL,aE(a,s))return Na.LIMITED_QUIRKS}return Na.NO_QUIRKS}const rE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},JL="definitionurl",e8="definitionURL",t8=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])),n8=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ge.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ge.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ge.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ge.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ge.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ge.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ge.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ge.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ge.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ge.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ge.XMLNS}]]),a8=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])),r8=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 s8(e){const t=e.tagID;return t===E.FONT&&e.attrs.some(({name:s})=>s===Hs.COLOR||s===Hs.SIZE||s===Hs.FACE)||r8.has(t)}function g_(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===JL){e.attrs[t].name=e8;break}}function b_(e){for(let t=0;t<e.attrs.length;t++){const a=t8.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function o0(e){for(let t=0;t<e.attrs.length;t++){const a=n8.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 i8(e){const t=a8.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Qi(e.tagName))}function l8(e,t){return t===ge.MATHML&&(e===E.MI||e===E.MO||e===E.MN||e===E.MS||e===E.MTEXT)}function o8(e,t,a){if(t===ge.MATHML&&e===E.ANNOTATION_XML){for(let s=0;s<a.length;s++)if(a[s].name===Hs.ENCODING){const l=a[s].value.toLowerCase();return l===rE.TEXT_HTML||l===rE.APPLICATION_XML}}return t===ge.SVG&&(e===E.FOREIGN_OBJECT||e===E.DESC||e===E.TITLE)}function u8(e,t,a,s){return(!s||s===ge.HTML)&&o8(e,t,a)||(!s||s===ge.MATHML)&&l8(e,t)}const c8="hidden",d8=8,f8=3;var q;(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"})(q||(q={}));const m8={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},x_=new Set([E.TABLE,E.TBODY,E.TFOOT,E.THEAD,E.TR]),sE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:is,onParseError:null};class iE{constructor(t,a,s=null,l=null){this.fragmentContext=s,this.scriptHandler=l,this.currentToken=null,this.stopped=!1,this.insertionMode=q.INITIAL,this.originalInsertionMode=q.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={...sE,...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 BL(this.options,this),this.activeFormattingElements=new $L(this.treeAdapter),this.fragmentContextID=s?Qi(this.treeAdapter.getTagName(s)):E.UNKNOWN,this._setContextModes(s??this.document,this.fragmentContextID),this.openElements=new YL(this.document,this.treeAdapter,this)}static parse(t,a){const s=new this(a);return s.tokenizer.write(t,!0),s.document}static getFragmentParser(t,a){const s={...sE,...a};t??(t=s.treeAdapter.createElement(J.TEMPLATE,ge.HTML,[]));const l=s.treeAdapter.createElement("documentmock",ge.HTML,[]),u=new this(s,l,t);return u.fragmentContextID===E.TEMPLATE&&u.tmplInsertionModeStack.unshift(q.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,s){var l;if(!this.onParseError)return;const u=(l=t.location)!==null&&l!==void 0?l:m8,d={code:a,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:s?u.startLine:u.endLine,endCol:s?u.startCol:u.endCol,endOffset:s?u.startOffset:u.endOffset};this.onParseError(d)}onItemPush(t,a,s){var l,u;(u=(l=this.treeAdapter).onItemPush)===null||u===void 0||u.call(l,t),s&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var s,l;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(l=(s=this.treeAdapter).onItemPop)===null||l===void 0||l.call(s,t,this.openElements.current),a){let u,d;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,d=this.fragmentContextID):{current:u,currentTagId:d}=this.openElements,this._setContextModes(u,d)}}_setContextModes(t,a){const s=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ge.HTML;this.currentNotInHTML=!s,this.tokenizer.inForeignNode=!s&&t!==void 0&&a!==void 0&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,ge.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=q.TEXT}switchToPlaintextParsing(){this.insertionMode=q.TEXT,this.originalInsertionMode=q.IN_BODY,this.tokenizer.state=Xt.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)===J.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ge.HTML))switch(this.fragmentContextID){case E.TITLE:case E.TEXTAREA:{this.tokenizer.state=Xt.RCDATA;break}case E.STYLE:case E.XMP:case E.IFRAME:case E.NOEMBED:case E.NOFRAMES:case E.NOSCRIPT:{this.tokenizer.state=Xt.RAWTEXT;break}case E.SCRIPT:{this.tokenizer.state=Xt.SCRIPT_DATA;break}case E.PLAINTEXT:{this.tokenizer.state=Xt.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",s=t.publicId||"",l=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,s,l),t.location){const d=this.treeAdapter.getChildNodes(this.document).find(f=>this.treeAdapter.isDocumentTypeNode(f));d&&this.treeAdapter.setNodeSourceCodeLocation(d,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const s=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,s)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const s=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(s??this.document,t)}}_appendElement(t,a){const s=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(s,t.location)}_insertElement(t,a){const s=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(s,t.location),this.openElements.push(s,t.tagID)}_insertFakeElement(t,a){const s=this.treeAdapter.createElement(t,ge.HTML,[]);this._attachElementToTree(s,null),this.openElements.push(s,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,ge.HTML,t.attrs),s=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,s),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(J.HTML,ge.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 s=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,s),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_insertCharacters(t){let a,s;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:s}=this._findFosterParentingLocation(),s?this.treeAdapter.insertTextBefore(a,t.chars,s):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const l=this.treeAdapter.getChildNodes(a),u=s?l.lastIndexOf(s):l.length,d=l[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(d)){const{endLine:m,endCol:h,endOffset:x}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(d,{endLine:m,endCol:h,endOffset:x})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(d,t.location)}_adoptNodes(t,a){for(let s=this.treeAdapter.getFirstChild(t);s;s=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(s),this.treeAdapter.appendChild(a,s)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const s=a.location,l=this.treeAdapter.getTagName(t),u=a.type===tt.END_TAG&&l===a.tagName?{endTag:{...s},endLine:s.endLine,endCol:s.endCol,endOffset:s.endOffset}:{endLine:s.startLine,endCol:s.startCol,endOffset:s.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,s;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,t.tagID===E.SVG&&this.treeAdapter.getTagName(a)===J.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===ge.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===E.MGLYPH||t.tagID===E.MALIGNMARK)&&s!==void 0&&!this._isIntegrationPoint(s,a,ge.HTML)}_processToken(t){switch(t.type){case tt.CHARACTER:{this.onCharacter(t);break}case tt.NULL_CHARACTER:{this.onNullCharacter(t);break}case tt.COMMENT:{this.onComment(t);break}case tt.DOCTYPE:{this.onDoctype(t);break}case tt.START_TAG:{this._processStartTag(t);break}case tt.END_TAG:{this.onEndTag(t);break}case tt.EOF:{this.onEof(t);break}case tt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,s){const l=this.treeAdapter.getNamespaceURI(a),u=this.treeAdapter.getAttrList(a);return u8(t,l,u,s)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(l=>l.type===Qa.Marker||this.openElements.contains(l.element)),s=a===-1?t-1:a-1;for(let l=s;l>=0;l--){const u=this.activeFormattingElements.entries[l];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=q.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=q.IN_ROW;return}case E.TBODY:case E.THEAD:case E.TFOOT:{this.insertionMode=q.IN_TABLE_BODY;return}case E.CAPTION:{this.insertionMode=q.IN_CAPTION;return}case E.COLGROUP:{this.insertionMode=q.IN_COLUMN_GROUP;return}case E.TABLE:{this.insertionMode=q.IN_TABLE;return}case E.BODY:{this.insertionMode=q.IN_BODY;return}case E.FRAMESET:{this.insertionMode=q.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?q.AFTER_HEAD:q.BEFORE_HEAD;return}case E.TD:case E.TH:{if(t>0){this.insertionMode=q.IN_CELL;return}break}case E.HEAD:{if(t>0){this.insertionMode=q.IN_HEAD;return}break}}this.insertionMode=q.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const s=this.openElements.tagIDs[a];if(s===E.TEMPLATE)break;if(s===E.TABLE){this.insertionMode=q.IN_SELECT_IN_TABLE;return}}this.insertionMode=q.IN_SELECT}_isElementCausesFosterParenting(t){return x_.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)===ge.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case E.TABLE:{const s=this.treeAdapter.getParentNode(a);return s?{parent:s,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 s=this.treeAdapter.getNamespaceURI(t);return ML[s].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qj(this,t);return}switch(this.insertionMode){case q.INITIAL:{Zl(this,t);break}case q.BEFORE_HTML:{so(this,t);break}case q.BEFORE_HEAD:{io(this,t);break}case q.IN_HEAD:{lo(this,t);break}case q.IN_HEAD_NO_SCRIPT:{oo(this,t);break}case q.AFTER_HEAD:{uo(this,t);break}case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:{y_(this,t);break}case q.TEXT:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{Ym(this,t);break}case q.IN_TABLE_TEXT:{A_(this,t);break}case q.IN_COLUMN_GROUP:{Oc(this,t);break}case q.AFTER_BODY:{Ic(this,t);break}case q.AFTER_AFTER_BODY:{dc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){zj(this,t);return}switch(this.insertionMode){case q.INITIAL:{Zl(this,t);break}case q.BEFORE_HTML:{so(this,t);break}case q.BEFORE_HEAD:{io(this,t);break}case q.IN_HEAD:{lo(this,t);break}case q.IN_HEAD_NO_SCRIPT:{oo(this,t);break}case q.AFTER_HEAD:{uo(this,t);break}case q.TEXT:{this._insertCharacters(t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{Ym(this,t);break}case q.IN_COLUMN_GROUP:{Oc(this,t);break}case q.AFTER_BODY:{Ic(this,t);break}case q.AFTER_AFTER_BODY:{dc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){yh(this,t);return}switch(this.insertionMode){case q.INITIAL:case q.BEFORE_HTML:case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_TEMPLATE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:{yh(this,t);break}case q.IN_TABLE_TEXT:{Jl(this,t);break}case q.AFTER_BODY:{y8(this,t);break}case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{T8(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case q.INITIAL:{_8(this,t);break}case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:{this._err(t,ce.misplacedDoctype);break}case q.IN_TABLE_TEXT:{Jl(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)?Yj(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case q.INITIAL:{Zl(this,t);break}case q.BEFORE_HTML:{N8(this,t);break}case q.BEFORE_HEAD:{S8(this,t);break}case q.IN_HEAD:{Ba(this,t);break}case q.IN_HEAD_NO_SCRIPT:{w8(this,t);break}case q.AFTER_HEAD:{R8(this,t);break}case q.IN_BODY:{wn(this,t);break}case q.IN_TABLE:{Fi(this,t);break}case q.IN_TABLE_TEXT:{Jl(this,t);break}case q.IN_CAPTION:{Aj(this,t);break}case q.IN_COLUMN_GROUP:{d0(this,t);break}case q.IN_TABLE_BODY:{Jc(this,t);break}case q.IN_ROW:{ed(this,t);break}case q.IN_CELL:{kj(this,t);break}case q.IN_SELECT:{k_(this,t);break}case q.IN_SELECT_IN_TABLE:{Oj(this,t);break}case q.IN_TEMPLATE:{Mj(this,t);break}case q.AFTER_BODY:{Lj(this,t);break}case q.IN_FRAMESET:{jj(this,t);break}case q.AFTER_FRAMESET:{Pj(this,t);break}case q.AFTER_AFTER_BODY:{Hj(this,t);break}case q.AFTER_AFTER_FRAMESET:{Fj(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?$j(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case q.INITIAL:{Zl(this,t);break}case q.BEFORE_HTML:{v8(this,t);break}case q.BEFORE_HEAD:{A8(this,t);break}case q.IN_HEAD:{C8(this,t);break}case q.IN_HEAD_NO_SCRIPT:{k8(this,t);break}case q.AFTER_HEAD:{O8(this,t);break}case q.IN_BODY:{Zc(this,t);break}case q.TEXT:{gj(this,t);break}case q.IN_TABLE:{yo(this,t);break}case q.IN_TABLE_TEXT:{Jl(this,t);break}case q.IN_CAPTION:{Cj(this,t);break}case q.IN_COLUMN_GROUP:{wj(this,t);break}case q.IN_TABLE_BODY:{Th(this,t);break}case q.IN_ROW:{w_(this,t);break}case q.IN_CELL:{Rj(this,t);break}case q.IN_SELECT:{R_(this,t);break}case q.IN_SELECT_IN_TABLE:{Ij(this,t);break}case q.IN_TEMPLATE:{Dj(this,t);break}case q.AFTER_BODY:{I_(this,t);break}case q.IN_FRAMESET:{Bj(this,t);break}case q.AFTER_FRAMESET:{Uj(this,t);break}case q.AFTER_AFTER_BODY:{dc(this,t);break}}}onEof(t){switch(this.insertionMode){case q.INITIAL:{Zl(this,t);break}case q.BEFORE_HTML:{so(this,t);break}case q.BEFORE_HEAD:{io(this,t);break}case q.IN_HEAD:{lo(this,t);break}case q.IN_HEAD_NO_SCRIPT:{oo(this,t);break}case q.AFTER_HEAD:{uo(this,t);break}case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:{v_(this,t);break}case q.TEXT:{bj(this,t);break}case q.IN_TABLE_TEXT:{Jl(this,t);break}case q.IN_TEMPLATE:{O_(this,t);break}case q.AFTER_BODY:case q.IN_FRAMESET:case q.AFTER_FRAMESET:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{c0(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===M.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 q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.TEXT:case q.IN_COLUMN_GROUP:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:{this._insertCharacters(t);break}case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:case q.AFTER_BODY:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{E_(this,t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{Ym(this,t);break}case q.IN_TABLE_TEXT:{S_(this,t);break}}}}function h8(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):N_(e,t),a}function p8(e,t){let a=null,s=e.openElements.stackTop;for(;s>=0;s--){const l=e.openElements.items[s];if(l===t.element)break;e._isSpecialElement(l,e.openElements.tagIDs[s])&&(a=l)}return a||(e.openElements.shortenToLength(Math.max(s,0)),e.activeFormattingElements.removeEntry(t)),a}function g8(e,t,a){let s=t,l=e.openElements.getCommonAncestor(t);for(let u=0,d=l;d!==a;u++,d=l){l=e.openElements.getCommonAncestor(d);const f=e.activeFormattingElements.getElementEntry(d),m=f&&u>=f8;!f||m?(m&&e.activeFormattingElements.removeEntry(f),e.openElements.remove(d)):(d=b8(e,f),s===t&&(e.activeFormattingElements.bookmark=f),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(d,s),s=d)}return s}function b8(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),s=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,s),t.element=s,s}function x8(e,t,a){const s=e.treeAdapter.getTagName(t),l=Qi(s);if(e._isElementCausesFosterParenting(l))e._fosterParentElement(a);else{const u=e.treeAdapter.getNamespaceURI(t);l===E.TEMPLATE&&u===ge.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function E8(e,t,a){const s=e.treeAdapter.getNamespaceURI(a.element),{token:l}=a,u=e.treeAdapter.createElement(l.tagName,s,l.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,l),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,u,l.tagID)}function u0(e,t){for(let a=0;a<d8;a++){const s=h8(e,t);if(!s)break;const l=p8(e,s);if(!l)break;e.activeFormattingElements.bookmark=s;const u=g8(e,l,s.element),d=e.openElements.getCommonAncestor(s.element);e.treeAdapter.detachNode(u),d&&x8(e,d,u),E8(e,l,s)}}function yh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function y8(e,t){e._appendCommentNode(t,e.openElements.items[0])}function T8(e,t){e._appendCommentNode(t,e.document)}function c0(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let s=e.openElements.stackTop;s>=a;s--)e._setEndLocation(e.openElements.items[s],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const s=e.openElements.items[0],l=e.treeAdapter.getNodeSourceCodeLocation(s);if(l&&!l.endTag&&(e._setEndLocation(s,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],d=e.treeAdapter.getNodeSourceCodeLocation(u);d&&!d.endTag&&e._setEndLocation(u,t)}}}}function _8(e,t){e._setDocumentType(t);const a=t.forceQuirks?Na.QUIRKS:ZL(t);WL(t)||e._err(t,ce.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=q.BEFORE_HTML}function Zl(e,t){e._err(t,ce.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Na.QUIRKS),e.insertionMode=q.BEFORE_HTML,e._processToken(t)}function N8(e,t){t.tagID===E.HTML?(e._insertElement(t,ge.HTML),e.insertionMode=q.BEFORE_HEAD):so(e,t)}function v8(e,t){const a=t.tagID;(a===E.HTML||a===E.HEAD||a===E.BODY||a===E.BR)&&so(e,t)}function so(e,t){e._insertFakeRootElement(),e.insertionMode=q.BEFORE_HEAD,e._processToken(t)}function S8(e,t){switch(t.tagID){case E.HTML:{wn(e,t);break}case E.HEAD:{e._insertElement(t,ge.HTML),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD;break}default:io(e,t)}}function A8(e,t){const a=t.tagID;a===E.HEAD||a===E.BODY||a===E.HTML||a===E.BR?io(e,t):e._err(t,ce.endTagWithoutMatchingOpenElement)}function io(e,t){e._insertFakeElement(J.HEAD,E.HEAD),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD,e._processToken(t)}function Ba(e,t){switch(t.tagID){case E.HTML:{wn(e,t);break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case E.TITLE:{e._switchToTextParsing(t,Xt.RCDATA);break}case E.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Xt.RAWTEXT):(e._insertElement(t,ge.HTML),e.insertionMode=q.IN_HEAD_NO_SCRIPT);break}case E.NOFRAMES:case E.STYLE:{e._switchToTextParsing(t,Xt.RAWTEXT);break}case E.SCRIPT:{e._switchToTextParsing(t,Xt.SCRIPT_DATA);break}case E.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=q.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(q.IN_TEMPLATE);break}case E.HEAD:{e._err(t,ce.misplacedStartTagForHeadElement);break}default:lo(e,t)}}function C8(e,t){switch(t.tagID){case E.HEAD:{e.openElements.pop(),e.insertionMode=q.AFTER_HEAD;break}case E.BODY:case E.BR:case E.HTML:{lo(e,t);break}case E.TEMPLATE:{Vs(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function Vs(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 lo(e,t){e.openElements.pop(),e.insertionMode=q.AFTER_HEAD,e._processToken(t)}function w8(e,t){switch(t.tagID){case E.HTML:{wn(e,t);break}case E.BASEFONT:case E.BGSOUND:case E.HEAD:case E.LINK:case E.META:case E.NOFRAMES:case E.STYLE:{Ba(e,t);break}case E.NOSCRIPT:{e._err(t,ce.nestedNoscriptInHead);break}default:oo(e,t)}}function k8(e,t){switch(t.tagID){case E.NOSCRIPT:{e.openElements.pop(),e.insertionMode=q.IN_HEAD;break}case E.BR:{oo(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function oo(e,t){const a=t.type===tt.EOF?ce.openElementsLeftAfterEof:ce.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=q.IN_HEAD,e._processToken(t)}function R8(e,t){switch(t.tagID){case E.HTML:{wn(e,t);break}case E.BODY:{e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=q.IN_BODY;break}case E.FRAMESET:{e._insertElement(t,ge.HTML),e.insertionMode=q.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),Ba(e,t),e.openElements.remove(e.headElement);break}case E.HEAD:{e._err(t,ce.misplacedStartTagForHeadElement);break}default:uo(e,t)}}function O8(e,t){switch(t.tagID){case E.BODY:case E.HTML:case E.BR:{uo(e,t);break}case E.TEMPLATE:{Vs(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function uo(e,t){e._insertFakeElement(J.BODY,E.BODY),e.insertionMode=q.IN_BODY,Wc(e,t)}function Wc(e,t){switch(t.type){case tt.CHARACTER:{y_(e,t);break}case tt.WHITESPACE_CHARACTER:{E_(e,t);break}case tt.COMMENT:{yh(e,t);break}case tt.START_TAG:{wn(e,t);break}case tt.END_TAG:{Zc(e,t);break}case tt.EOF:{v_(e,t);break}}}function E_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function y_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function I8(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function M8(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function D8(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ge.HTML),e.insertionMode=q.IN_FRAMESET)}function L8(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ge.HTML)}function j8(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Eh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ge.HTML)}function B8(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function P8(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ge.HTML),a||(e.formElement=e.openElements.current))}function U8(e,t){e.framesetOk=!1;const a=t.tagID;for(let s=e.openElements.stackTop;s>=0;s--){const l=e.openElements.tagIDs[s];if(a===E.LI&&l===E.LI||(a===E.DD||a===E.DT)&&(l===E.DD||l===E.DT)){e.openElements.generateImpliedEndTagsWithExclusion(l),e.openElements.popUntilTagNamePopped(l);break}if(l!==E.ADDRESS&&l!==E.DIV&&l!==E.P&&e._isSpecialElement(e.openElements.items[s],l))break}e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ge.HTML)}function H8(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.tokenizer.state=Xt.PLAINTEXT}function F8(e,t){e.openElements.hasInScope(E.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1}function z8(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(J.A);a&&(u0(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function q8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Y8(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(E.NOBR)&&(u0(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function G8(e,t){e.treeAdapter.getDocumentMode(e.document)!==Na.QUIRKS&&e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=q.IN_TABLE}function T_(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function __(e){const t=c_(e,Hs.TYPE);return t!=null&&t.toLowerCase()===c8}function K8(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),__(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function V8(e,t){e._appendElement(t,ge.HTML),t.ackSelfClosing=!0}function Q8(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function X8(e,t){t.tagName=J.IMG,t.tagID=E.IMG,T_(e,t)}function W8(e,t){e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Xt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=q.TEXT}function Z8(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Xt.RAWTEXT)}function J8(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Xt.RAWTEXT)}function lE(e,t){e._switchToTextParsing(t,Xt.RAWTEXT)}function ej(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===q.IN_TABLE||e.insertionMode===q.IN_CAPTION||e.insertionMode===q.IN_TABLE_BODY||e.insertionMode===q.IN_ROW||e.insertionMode===q.IN_CELL?q.IN_SELECT_IN_TABLE:q.IN_SELECT}function tj(e,t){e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function nj(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ge.HTML)}function aj(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(E.RTC),e._insertElement(t,ge.HTML)}function rj(e,t){e._reconstructActiveFormattingElements(),g_(t),o0(t),t.selfClosing?e._appendElement(t,ge.MATHML):e._insertElement(t,ge.MATHML),t.ackSelfClosing=!0}function sj(e,t){e._reconstructActiveFormattingElements(),b_(t),o0(t),t.selfClosing?e._appendElement(t,ge.SVG):e._insertElement(t,ge.SVG),t.ackSelfClosing=!0}function oE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function wn(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:{q8(e,t);break}case E.A:{z8(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{j8(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:{L8(e,t);break}case E.LI:case E.DD:case E.DT:{U8(e,t);break}case E.BR:case E.IMG:case E.WBR:case E.AREA:case E.EMBED:case E.KEYGEN:{T_(e,t);break}case E.HR:{Q8(e,t);break}case E.RB:case E.RTC:{nj(e,t);break}case E.RT:case E.RP:{aj(e,t);break}case E.PRE:case E.LISTING:{B8(e,t);break}case E.XMP:{Z8(e,t);break}case E.SVG:{sj(e,t);break}case E.HTML:{I8(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:{Ba(e,t);break}case E.BODY:{M8(e,t);break}case E.FORM:{P8(e,t);break}case E.NOBR:{Y8(e,t);break}case E.MATH:{rj(e,t);break}case E.TABLE:{G8(e,t);break}case E.INPUT:{K8(e,t);break}case E.PARAM:case E.TRACK:case E.SOURCE:{V8(e,t);break}case E.IMAGE:{X8(e,t);break}case E.BUTTON:{F8(e,t);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{$8(e,t);break}case E.IFRAME:{J8(e,t);break}case E.SELECT:{ej(e,t);break}case E.OPTION:case E.OPTGROUP:{tj(e,t);break}case E.NOEMBED:case E.NOFRAMES:{lE(e,t);break}case E.FRAMESET:{D8(e,t);break}case E.TEXTAREA:{W8(e,t);break}case E.NOSCRIPT:{e.options.scriptingEnabled?lE(e,t):oE(e,t);break}case E.PLAINTEXT:{H8(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:oE(e,t)}}function ij(e,t){if(e.openElements.hasInScope(E.BODY)&&(e.insertionMode=q.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function lj(e,t){e.openElements.hasInScope(E.BODY)&&(e.insertionMode=q.AFTER_BODY,I_(e,t))}function oj(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function uj(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 cj(e){e.openElements.hasInButtonScope(E.P)||e._insertFakeElement(J.P,E.P),e._closePElement()}function dj(e){e.openElements.hasInListItemScope(E.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(E.LI),e.openElements.popUntilTagNamePopped(E.LI))}function fj(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function mj(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function hj(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function pj(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(J.BR,E.BR),e.openElements.pop(),e.framesetOk=!1}function N_(e,t){const a=t.tagName,s=t.tagID;for(let l=e.openElements.stackTop;l>0;l--){const u=e.openElements.items[l],d=e.openElements.tagIDs[l];if(s===d&&(s!==E.UNKNOWN||e.treeAdapter.getTagName(u)===a)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.stackTop>=l&&e.openElements.shortenToLength(l);break}if(e._isSpecialElement(u,d))break}}function Zc(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:{u0(e,t);break}case E.P:{cj(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:{oj(e,t);break}case E.LI:{dj(e);break}case E.DD:case E.DT:{fj(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{mj(e);break}case E.BR:{pj(e);break}case E.BODY:{ij(e,t);break}case E.HTML:{lj(e,t);break}case E.FORM:{uj(e);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{hj(e,t);break}case E.TEMPLATE:{Vs(e,t);break}default:N_(e,t)}}function v_(e,t){e.tmplInsertionModeStack.length>0?O_(e,t):c0(e,t)}function gj(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 bj(e,t){e._err(t,ce.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ym(e,t){if(e.openElements.currentTagId!==void 0&&x_.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=q.IN_TABLE_TEXT,t.type){case tt.CHARACTER:{A_(e,t);break}case tt.WHITESPACE_CHARACTER:{S_(e,t);break}}else ko(e,t)}function xj(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ge.HTML),e.insertionMode=q.IN_CAPTION}function Ej(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=q.IN_COLUMN_GROUP}function yj(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(J.COLGROUP,E.COLGROUP),e.insertionMode=q.IN_COLUMN_GROUP,d0(e,t)}function Tj(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=q.IN_TABLE_BODY}function _j(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(J.TBODY,E.TBODY),e.insertionMode=q.IN_TABLE_BODY,Jc(e,t)}function Nj(e,t){e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function vj(e,t){__(t)?e._appendElement(t,ge.HTML):ko(e,t),t.ackSelfClosing=!0}function Sj(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ge.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Fi(e,t){switch(t.tagID){case E.TD:case E.TH:case E.TR:{_j(e,t);break}case E.STYLE:case E.SCRIPT:case E.TEMPLATE:{Ba(e,t);break}case E.COL:{yj(e,t);break}case E.FORM:{Sj(e,t);break}case E.TABLE:{Nj(e,t);break}case E.TBODY:case E.TFOOT:case E.THEAD:{Tj(e,t);break}case E.INPUT:{vj(e,t);break}case E.CAPTION:{xj(e,t);break}case E.COLGROUP:{Ej(e,t);break}default:ko(e,t)}}function yo(e,t){switch(t.tagID){case E.TABLE:{e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode());break}case E.TEMPLATE:{Vs(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:ko(e,t)}}function ko(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Wc(e,t),e.fosterParentingEnabled=a}function S_(e,t){e.pendingCharacterTokens.push(t)}function A_(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Jl(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)ko(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 Aj(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=q.IN_TABLE,Fi(e,t)):wn(e,t)}function Cj(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=q.IN_TABLE,a===E.TABLE&&yo(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:Zc(e,t)}}function d0(e,t){switch(t.tagID){case E.HTML:{wn(e,t);break}case E.COL:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case E.TEMPLATE:{Ba(e,t);break}default:Oc(e,t)}}function wj(e,t){switch(t.tagID){case E.COLGROUP:{e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE);break}case E.TEMPLATE:{Vs(e,t);break}case E.COL:break;default:Oc(e,t)}}function Oc(e,t){e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE,e._processToken(t))}function Jc(e,t){switch(t.tagID){case E.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ge.HTML),e.insertionMode=q.IN_ROW;break}case E.TH:case E.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(J.TR,E.TR),e.insertionMode=q.IN_ROW,ed(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=q.IN_TABLE,Fi(e,t));break}default:Fi(e,t)}}function Th(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=q.IN_TABLE);break}case E.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,yo(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:yo(e,t)}}function ed(e,t){switch(t.tagID){case E.TH:case E.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ge.HTML),e.insertionMode=q.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=q.IN_TABLE_BODY,Jc(e,t));break}default:Fi(e,t)}}function w_(e,t){switch(t.tagID){case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY);break}case E.TABLE:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,Th(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=q.IN_TABLE_BODY,Th(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:yo(e,t)}}function kj(e,t){const a=t.tagID;C_.has(a)?(e.openElements.hasInTableScope(E.TD)||e.openElements.hasInTableScope(E.TH))&&(e._closeTableCell(),ed(e,t)):wn(e,t)}function Rj(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=q.IN_ROW);break}case E.TABLE:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),w_(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:break;default:Zc(e,t)}}function k_(e,t){switch(t.tagID){case E.HTML:{wn(e,t);break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case E.OPTGROUP:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case E.HR:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ge.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:{Ba(e,t);break}}}function R_(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:{Vs(e,t);break}}}function Oj(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)):k_(e,t)}function Ij(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)):R_(e,t)}function Mj(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:{Ba(e,t);break}case E.CAPTION:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.tmplInsertionModeStack[0]=q.IN_TABLE,e.insertionMode=q.IN_TABLE,Fi(e,t);break}case E.COL:{e.tmplInsertionModeStack[0]=q.IN_COLUMN_GROUP,e.insertionMode=q.IN_COLUMN_GROUP,d0(e,t);break}case E.TR:{e.tmplInsertionModeStack[0]=q.IN_TABLE_BODY,e.insertionMode=q.IN_TABLE_BODY,Jc(e,t);break}case E.TD:case E.TH:{e.tmplInsertionModeStack[0]=q.IN_ROW,e.insertionMode=q.IN_ROW,ed(e,t);break}default:e.tmplInsertionModeStack[0]=q.IN_BODY,e.insertionMode=q.IN_BODY,wn(e,t)}}function Dj(e,t){t.tagID===E.TEMPLATE&&Vs(e,t)}function O_(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):c0(e,t)}function Lj(e,t){t.tagID===E.HTML?wn(e,t):Ic(e,t)}function I_(e,t){var a;if(t.tagID===E.HTML){if(e.fragmentContext||(e.insertionMode=q.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===E.HTML){e._setEndLocation(e.openElements.items[0],t);const s=e.openElements.items[1];s&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(s))===null||a===void 0)&&a.endTag)&&e._setEndLocation(s,t)}}else Ic(e,t)}function Ic(e,t){e.insertionMode=q.IN_BODY,Wc(e,t)}function jj(e,t){switch(t.tagID){case E.HTML:{wn(e,t);break}case E.FRAMESET:{e._insertElement(t,ge.HTML);break}case E.FRAME:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case E.NOFRAMES:{Ba(e,t);break}}}function Bj(e,t){t.tagID===E.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==E.FRAMESET&&(e.insertionMode=q.AFTER_FRAMESET))}function Pj(e,t){switch(t.tagID){case E.HTML:{wn(e,t);break}case E.NOFRAMES:{Ba(e,t);break}}}function Uj(e,t){t.tagID===E.HTML&&(e.insertionMode=q.AFTER_AFTER_FRAMESET)}function Hj(e,t){t.tagID===E.HTML?wn(e,t):dc(e,t)}function dc(e,t){e.insertionMode=q.IN_BODY,Wc(e,t)}function Fj(e,t){switch(t.tagID){case E.HTML:{wn(e,t);break}case E.NOFRAMES:{Ba(e,t);break}}}function zj(e,t){t.chars=Pt,e._insertCharacters(t)}function qj(e,t){e._insertCharacters(t),e.framesetOk=!1}function M_(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ge.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Yj(e,t){if(s8(t))M_(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(a);s===ge.MATHML?g_(t):s===ge.SVG&&(i8(t),b_(t)),o0(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0}}function $j(e,t){if(t.tagID===E.P||t.tagID===E.BR){M_(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const s=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(s)===ge.HTML){e._endTagOutsideForeignContent(t);break}const l=e.treeAdapter.getTagName(s);if(l.toLowerCase()===t.tagName){t.tagName=l,e.openElements.shortenToLength(a);break}}}J.AREA,J.BASE,J.BASEFONT,J.BGSOUND,J.BR,J.COL,J.EMBED,J.FRAME,J.HR,J.IMG,J.INPUT,J.KEYGEN,J.LINK,J.META,J.PARAM,J.SOURCE,J.TRACK,J.WBR;const Gj=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Kj=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),uE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function D_(e,t){const a=a9(e),s=lT("type",{handlers:{root:Vj,element:Qj,text:Xj,comment:j_,doctype:Wj,raw:Jj},unknown:e9}),l={parser:a?new iE(uE):iE.getFragmentParser(void 0,uE),handle(f){s(f,l)},stitches:!1,options:t||{}};s(e,l),Xi(l,Ja());const u=a?l.parser.document:l.parser.getFragment(),d=rL(u,{file:l.options.file});return l.stitches&&Co(d,"comment",function(f,m,h){const x=f;if(x.value.stitch&&h&&m!==void 0){const g=h.children;return g[m]=x.value.stitch,m}}),d.type==="root"&&d.children.length===1&&d.children[0].type===e.type?d.children[0]:d}function L_(e,t){let a=-1;if(e)for(;++a<e.length;)t.handle(e[a])}function Vj(e,t){L_(e.children,t)}function Qj(e,t){t9(e,t),L_(e.children,t),n9(e,t)}function Xj(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const a={type:tt.CHARACTER,chars:e.value,location:Ro(e)};Xi(t,Ja(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function Wj(e,t){const a={type:tt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ro(e)};Xi(t,Ja(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function Zj(e,t){t.stitches=!0;const a=r9(e);if("children"in e&&"children"in a){const s=D_({type:"root",children:e.children},t.options);a.children=s.children}j_({type:"comment",value:{stitch:a}},t)}function j_(e,t){const a=e.value,s={type:tt.COMMENT,data:a,location:Ro(e)};Xi(t,Ja(e)),t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken)}function Jj(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,B_(t,Ja(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Gj,"&lt;$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 e9(e,t){const a=e;if(t.options.passThrough&&t.options.passThrough.includes(a.type))Zj(a,t);else{let s="";throw Kj.has(a.type)&&(s=". 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"+s)}}function Xi(e,t){B_(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=Xt.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 B_(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 t9(e,t){const a=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Xt.PLAINTEXT)return;Xi(t,Ja(e));const s=t.parser.openElements.current;let l="namespaceURI"in s?s.namespaceURI:Ps.html;l===Ps.html&&a==="svg"&&(l=Ps.svg);const u=uL({...e,children:[]},{space:l===Ps.svg?"svg":"html"}),d={type:tt.START_TAG,tagName:a,tagID:Qi(a),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in u?u.attrs:[],location:Ro(e)};t.parser.currentToken=d,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=a}function n9(e,t){const a=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&bL.includes(a)||t.parser.tokenizer.state===Xt.PLAINTEXT)return;Xi(t,Gc(e));const s={type:tt.END_TAG,tagName:a,tagID:Qi(a),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ro(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),a===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Xt.RCDATA||t.parser.tokenizer.state===Xt.RAWTEXT||t.parser.tokenizer.state===Xt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Xt.DATA)}function a9(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ro(e){const t=Ja(e)||{line:void 0,column:void 0,offset:void 0},a=Gc(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 r9(e){return"children"in e?Hi({...e,children:[]}):Hi(e)}function co(e){return function(t,a){return D_(t,{...e,file:a})}}const cE=[{key:"open",label:"开放"},{key:"closed",label:"已关闭"},{key:"all",label:"全部"}];function s9(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 dE({onDone:e}){const[t,a]=S.useState(""),[s,l]=S.useState(""),[u,d]=S.useState(!1),f=Ge(x=>x.createIssue),m=async()=>{!t.trim()||u||(d(!0),await f(t.trim(),s.trim()||void 0),d(!1),e())},h=x=>{(x.metaKey||x.ctrlKey)&&x.key==="Enter"&&(x.preventDefault(),m())};return o.jsxs("div",{className:"border-b border-line px-3 py-3",children:[o.jsx("input",{type:"text",value:t,onChange:x=>a(x.target.value),onKeyDown:h,placeholder:"Issue 标题",autoFocus:!0,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"}),o.jsx("textarea",{value:s,onChange:x=>l(x.target.value),onKeyDown:h,placeholder:"描述(可选) ⌘⏎ 创建",rows:3,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"}),o.jsxs("div",{className:"mt-2 flex items-center justify-end gap-2",children:[o.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:"取消"}),o.jsx("button",{type:"button",onClick:()=>void m(),disabled:!t.trim()||u,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 i9({repoId:e,issueNumber:t,onPublished:a}){const s=Aa(),l=He(ja),[u,d]=S.useState(""),[f,m]=S.useState("idle"),[h,x]=S.useState(""),[g,y]=S.useState(null),[T,N]=S.useState(!1),v=S.useRef(null),A=S.useCallback(()=>{v.current&&(clearInterval(v.current),v.current=null)},[]);S.useEffect(()=>()=>A(),[A]),S.useEffect(()=>{let L=!1;return _x(e,t).then(z=>{!L&&z.body&&(x(z.body),m("preview"))}).catch(()=>{}),()=>{L=!0}},[e,t]);const w=async()=>{if(!(!u.trim()||T)){N(!0);try{const L=await Tx(e,t,u.trim());a(L),d(""),Ft.getState().addToast("评论已发布","success")}catch(L){Ft.getState().addToast(L instanceof Error?L.message:"发布失败","error")}finally{N(!1)}}},C=async()=>{if(!(!u.trim()||f==="polishing")){m("polishing");try{const{sessionId:L}=await BC(e,t,u.trim());y(L),v.current=setInterval(async()=>{try{if((await ly(e,L)).type==="idle"){A();const X=await _x(e,t);x(X.body),m("preview")}}catch{A(),m("idle"),Ft.getState().addToast("润色状态检查失败","error")}},2e3)}catch(L){m("idle"),Ft.getState().addToast(L instanceof Error?L.message:"润色启动失败","error")}}},R=async()=>{if(!(!h.trim()||T)){N(!0);try{const L=await Tx(e,t,h.trim());a(L),d(""),x(""),y(null),m("idle"),Ft.getState().addToast("评论已发布","success")}catch(L){Ft.getState().addToast(L instanceof Error?L.message:"发布失败","error")}finally{N(!1)}}},U=()=>{A(),x(""),y(null),m("idle")},V=()=>{!g||!l||(Ie.setState({activeSessionId:g}),s(`/${encodeURIComponent(l)}/run`))};return f==="preview"?o.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[o.jsxs("h3",{className:"mb-3 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4",children:[o.jsx(hm,{className:"h-3.5 w-3.5 text-amber-400"}),"AI 润色结果"]}),o.jsx("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-4 py-3",children:o.jsx("textarea",{value:h,onChange:L=>x(L.target.value),rows:6,className:"w-full resize-none bg-transparent text-sm text-fg placeholder:text-fg-6 focus:outline-none"})}),o.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[o.jsxs("button",{type:"button",disabled:T,onClick:()=>void R(),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:[o.jsx(bc,{className:"h-3.5 w-3.5"}),"发布评论"]}),o.jsxs("button",{type:"button",onClick:()=>void C(),className:"flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1.5 text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[o.jsx(hm,{className:"h-3.5 w-3.5"}),"重新润色"]}),o.jsx("button",{type:"button",onClick:V,className:"flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1.5 text-xs text-fg-3 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:"转入深度对话"}),o.jsx("button",{type:"button",onClick:U,className:"ml-auto rounded-md px-2.5 py-1.5 text-xs text-fg-5 transition-colors hover:text-fg-3",children:"放弃"})]})]}):o.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[o.jsx("h3",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-fg-4",children:"添加评论"}),o.jsx("textarea",{value:u,onChange:L=>d(L.target.value),placeholder:"写下你的评论...",rows:4,disabled:f==="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"}),o.jsxs("div",{className:"mt-2.5 flex items-center gap-2",children:[o.jsxs("button",{type:"button",disabled:!u.trim()||T||f==="polishing",onClick:()=>void w(),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:[o.jsx(bc,{className:"h-3.5 w-3.5"}),T?"发送中...":"直接发送"]}),o.jsxs("button",{type:"button",disabled:!u.trim()||f==="polishing",onClick:()=>void C(),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:[o.jsx(hm,{className:"h-3.5 w-3.5"}),f==="polishing"?"润色中...":"AI 润色"]})]})]})}function fE({issue:e,sessionCount:t,isActive:a,isEpic:s,milestone:l,onSelect:u}){return o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:u,className:oe("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:[o.jsx("span",{className:oe("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}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[s&&o.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"}),o.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&&o.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:e.labels.map(d=>o.jsx("span",{className:"rounded px-1 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${d.color}20`,color:`#${d.color}`},children:d.name},d.id))}),l&&o.jsxs("span",{className:"mt-1 flex items-center gap-1 text-[10px] text-indigo-400/70",children:[o.jsx(Bh,{className:"h-2.5 w-2.5"}),l.title]})]}),t>0&&o.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 l9({issue:e,sessionCount:t,isEpic:a,milestone:s,onSelect:l}){return o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:l,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:[o.jsx("span",{className:oe("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}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[a&&o.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"}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:e.title}),s&&o.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:[o.jsx(Bh,{className:"h-2.5 w-2.5"}),s.title]}),t>0&&o.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&&o.jsxs("div",{className:"hidden shrink-0 items-center -space-x-1.5 sm:flex",children:[e.assignees.slice(0,3).map(u=>o.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&&o.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]})]})]}),o.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[e.authorLogin&&o.jsxs("span",{className:"shrink-0 text-[11px] text-fg-5",title:e.authorLogin,children:[e.authorAvatar&&o.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&&o.jsx("span",{className:"text-fg-6",children:"·"}),o.jsx("span",{className:"shrink-0 text-[11px] text-fg-6",children:s9(e.createdAt)}),(e.commentCount??0)>0&&o.jsxs("span",{className:"flex shrink-0 items-center gap-0.5 text-[11px] text-fg-6",children:[o.jsx("span",{className:"text-fg-6",children:"·"}),o.jsx(JA,{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&&o.jsx("span",{className:"text-fg-6",children:"·"}),e.labels&&e.labels.length>0?e.labels.map(u=>o.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:o.jsx("span",{className:"text-[11px] text-fg-6",children:" "})]})]})]})})}function o9({issue:e,milestone:t,onBack:a,onClose:s,onToggleSidebar:l}){var Z;const u=Aa(),d=He(se=>se.activeRepoId),f=He(ja),[m,h]=S.useState([]),[x,g]=S.useState(!1),[y,T]=S.useState([]),[N,v]=S.useState(0),[A,w]=S.useState(!1),[C,R]=S.useState(!1),[U,V]=S.useState("issue"),L=Ge(se=>se.updateIssueState);S.useEffect(()=>{d&&(g(!0),jC(d,e.number).then(h).catch(()=>h([])).finally(()=>g(!1)))},[d,e.number]),S.useEffect(()=>{d&&Ex(d,e.number).then(T).catch(()=>T([]))},[d,e.number]),S.useEffect(()=>{V("issue"),v(0)},[e.id]);const z=y[N]??y[0],X=async se=>{if(!(A||!d||!z)){w(!0);try{await RC(d,e.number,z.number,se),se&&await L(e.number,"closed");const le=await Ex(d,e.number);T(le),N>=le.length&&v(Math.max(0,le.length-1)),Ft.getState().addToast(`PR #${z.number} 合入成功`,"success")}catch(le){let ae="合入失败";if(le instanceof Xa)try{ae=JSON.parse(le.message).error??ae}catch{ae=le.message}Ft.getState().addToast(ae,"error")}finally{w(!1)}}},W=()=>{if(!z)return;const se=`请解决 PR #${z.number} 的合并冲突: ${z.title}`;Ge.getState().setSelectedIssue(e.id),Ge.getState().setPendingDraft(se),Ge.getState().setPreviewIssue(null),Ie.setState({activeSessionId:null}),u(`/${encodeURIComponent(f)}/run`)},j=()=>{Ge.getState().setSelectedIssue(e.id),Ge.getState().setPreviewIssue(null),Ie.setState({activeSessionId:null}),u(`/${encodeURIComponent(f)}/run`)},K=se=>{const le=new Date(se);return le.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})+" "+le.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})};return o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.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:[o.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[o.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:o.jsx(Lh,{className:"h-5 w-5"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[o.jsxs("span",{className:oe("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]}),(Z=e.labels)==null?void 0:Z.map(se=>o.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${se.color}20`,color:`#${se.color}`},children:se.name},se.id)),t&&o.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:[o.jsx(Bh,{className:"h-2.5 w-2.5"}),t.title]})]}),o.jsx("h2",{className:"mt-1 text-base font-semibold text-fg",children:e.title}),(e.authorLogin||e.assignees&&e.assignees.length>0)&&o.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 text-xs text-fg-4",children:[e.authorLogin&&o.jsxs("span",{className:"flex items-center gap-1.5",children:[e.authorAvatar&&o.jsx("img",{src:e.authorAvatar,alt:"",className:"h-4 w-4 rounded-full"}),e.authorLogin]}),e.assignees&&e.assignees.length>0&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("span",{className:"text-fg-5",children:"→"}),o.jsx("span",{className:"flex items-center -space-x-1",children:e.assignees.map(se=>o.jsx("img",{src:se.avatar_url,alt:se.login,title:se.login,className:"h-4 w-4 rounded-full ring-1 ring-surface"},se.login))}),o.jsx("span",{className:"text-fg-4",children:e.assignees.map(se=>se.login).join(", ")})]})]})]})]}),o.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[e.htmlUrl&&o.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:[o.jsx(pc,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"源站"})]}),o.jsxs("button",{type:"button",onClick:()=>{Ge.getState().enterMatchMode(e.id),Ie.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:[o.jsx(Ys,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"匹配子任务"})]}),o.jsx("button",{type:"button",disabled:C,onClick:async()=>{R(!0),await L(e.number,e.state==="open"?"closed":"open"),R(!1)},className:oe("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"?o.jsxs(o.Fragment,{children:[o.jsx(VE,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"关闭"})]}):o.jsxs(o.Fragment,{children:[o.jsx(mo,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"重新打开"})]})}),o.jsxs("button",{type:"button",onClick:j,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:[o.jsx(Hc,{className:"h-3.5 w-3.5 fill-current"}),o.jsx("span",{className:"hidden sm:inline",children:"开始处理"})]}),l&&o.jsx("button",{type:"button",onClick:l,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:o.jsx(WE,{className:"h-4 w-4"})}),s&&o.jsx("button",{type:"button",onClick:s,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:o.jsx(gt,{className:"h-4 w-4"})})]})]}),y.length>0&&o.jsxs("div",{className:"flex shrink-0 items-center border-b border-line bg-surface",children:[o.jsxs("button",{type:"button",onClick:()=>V("issue"),className:oe("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",U==="issue"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[o.jsx(mo,{className:"h-3.5 w-3.5"}),"Issue"]}),o.jsxs("button",{type:"button",onClick:()=>V("pr"),className:oe("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",U==="pr"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[o.jsx(ho,{className:"h-3.5 w-3.5"}),"PR",o.jsx("span",{className:oe("rounded-full px-1.5 py-0.5 font-mono text-[10px]",U==="pr"?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:y.length}),y.some(se=>se.mergeable===!1)&&o.jsxs("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:[o.jsx(An,{className:"inline h-3 w-3 -mt-px"})," Conflict"]})]})]}),U==="issue"||y.length===0?o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:[e.body?o.jsx("div",{className:"markdown-body leading-relaxed",children:o.jsx(us,{remarkPlugins:[cs],rehypePlugins:[co],children:e.body})}):o.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 Issue 没有描述内容"}),x?o.jsx("p",{className:"mt-8 text-center font-mono text-xs text-fg-6",children:"加载评论…"}):m.length>0&&o.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[o.jsxs("h3",{className:"mb-4 text-xs font-semibold uppercase tracking-wider text-fg-4",children:["评论 (",m.length,")"]}),o.jsx("div",{className:"space-y-4",children:m.map(se=>o.jsxs("div",{className:"rounded-lg border border-line bg-elevated/40 px-4 py-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("img",{src:se.user.avatar_url,alt:se.user.login,className:"h-5 w-5 rounded-full"}),o.jsx("span",{className:"text-xs font-semibold text-fg-2",children:se.user.login}),o.jsx("span",{className:"text-[10px] text-fg-6",children:K(se.created_at)})]}),o.jsx("div",{className:"markdown-body mt-2 text-sm leading-relaxed text-fg-3",children:o.jsx(us,{remarkPlugins:[cs],rehypePlugins:[co],children:se.body})})]},se.id))})]}),d&&o.jsx(i9,{repoId:d,issueNumber:e.number,onPublished:se=>h(le=>[...le,se])},e.id)]})}):o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2 border-b border-line bg-surface px-4 py-0",children:[y.length>1&&y.map((se,le)=>o.jsxs("button",{type:"button",onClick:()=>v(le),className:oe("flex items-center gap-1.5 border-b-2 px-2.5 py-2.5 text-xs font-medium transition-colors",le===N?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[o.jsxs("span",{className:"font-mono text-[10px]",children:["#",se.number]}),o.jsx("span",{className:"max-w-[140px] truncate",children:se.title})]},se.number)),o.jsxs("div",{className:oe("flex items-center gap-2",y.length>1&&"ml-auto"),children:[(z==null?void 0:z.html_url)&&o.jsxs("a",{href:z.html_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 rounded-md border border-line px-2 py-1.5 font-mono text-[11px] text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[o.jsx(pc,{className:"h-3 w-3"}),o.jsx("span",{className:"hidden sm:inline",children:"查看"})]}),(z==null?void 0:z.mergeable)===!1&&o.jsxs("button",{type:"button",onClick:W,className:"flex items-center gap-1.5 rounded-md border border-amber-500/30 px-2.5 py-1.5 text-xs font-medium text-amber-400 transition-colors hover:border-amber-500/60 hover:bg-amber-500/10",children:[o.jsx(P3,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"解冲突"})]}),o.jsxs("button",{type:"button",disabled:A||(z==null?void 0:z.mergeable)===!1,onClick:()=>void X(!1),className:"flex items-center gap-1.5 rounded-md border border-emerald-500/30 px-2.5 py-1.5 text-xs font-medium text-emerald-400 transition-colors hover:border-emerald-500/60 hover:bg-emerald-500/10 disabled:opacity-40",children:[o.jsx(gc,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"合入"})]}),o.jsxs("button",{type:"button",disabled:A||(z==null?void 0:z.mergeable)===!1,onClick:()=>void X(!0),className:"flex items-center gap-1.5 rounded-md border border-blue-500/30 px-2.5 py-1.5 text-xs font-medium text-blue-400 transition-colors hover:border-blue-500/60 hover:bg-blue-500/10 disabled:opacity-40",children:[o.jsx(gc,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"合入并关闭"})]})]})]}),z&&o.jsx("div",{className:"flex-1 overflow-y-auto",children:o.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:[o.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[o.jsxs("span",{className:oe("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",z.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",z.number," ",z.state]}),z.mergeable===!1&&o.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"}),o.jsx("span",{className:"text-sm font-semibold text-fg",children:z.title})]}),z.body?o.jsx("div",{className:"markdown-body leading-relaxed",children:o.jsx(us,{remarkPlugins:[cs],rehypePlugins:[co],children:z.body})}):o.jsx("p",{className:"py-6 text-center font-mono text-xs text-fg-5",children:"该 PR 没有描述内容"})]})})]})]})}function P_({issue:e,childrenMap:t,currentId:a,onSelect:s,depth:l}){const u=t.get(e.id)??[],d=e.id===a;return o.jsxs("div",{children:[o.jsxs("button",{type:"button",onClick:()=>s(e.id),className:oe("group flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-xs transition-colors",d?"bg-blue-500/10 text-blue-400":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),style:{paddingLeft:`${l*18+8}px`},children:[o.jsx("span",{className:oe("h-1.5 w-1.5 shrink-0 rounded-full",e.state==="open"?"bg-emerald-400":"bg-purple-400")}),o.jsxs("span",{className:"shrink-0 font-mono text-[10px] text-fg-6",children:["#",e.number]}),o.jsx("span",{className:"min-w-0 truncate",children:e.title})]}),u.length>0&&o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute top-0 bottom-3 w-px bg-line",style:{left:`${l*18+16}px`}}),u.map(f=>o.jsx(P_,{issue:f,childrenMap:t,currentId:a,onSelect:s,depth:l+1},f.id))]})]})}function u9(e,t){let a=0,s=0;const l=[...t.get(e)??[]];for(let u=0;u<l.length;u++){const d=l[u];a++,d.state==="closed"&&s++;const f=t.get(d.id);f&&l.push(...f)}return{total:a,closed:s}}function c9(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,s=new Date(a);return s.toDateString()===new Date().toDateString()?s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):s.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function mE({session:e,onSelect:t}){var s,l;const a=c9(e);return o.jsx("li",{children:o.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:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-fg-3",children:((s=e.agent)==null?void 0:s.trim())||"默认"}),a&&o.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:a})]}),o.jsx("div",{className:"mt-0.5 truncate text-sm text-fg-2",children:((l=e.title)==null?void 0:l.trim())||"未命名运行"})]})})}function U_({sessions:e,onSelect:t}){const a=Ge(d=>d.issues),s=new Map(a.map(d=>[d.id,d])),l=new Map,u=[];for(const d of e)if(d.issueId&&s.has(d.issueId)){const f=l.get(d.issueId)??[];f.push(d),l.set(d.issueId,f)}else u.push(d);return o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col border-t border-line",children:[o.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-3",children:[o.jsx(qS,{className:"h-3.5 w-3.5 text-fg-5"}),o.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:"运行记录"}),o.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})]}),o.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:e.length===0?o.jsx("p",{className:"px-2 py-4 text-center font-mono text-[10px] text-fg-6",children:"暂无运行记录"}):o.jsxs("div",{className:"space-y-3",children:[[...l.entries()].map(([d,f])=>{const m=s.get(d);return o.jsxs("div",{children:[o.jsxs("div",{className:"mb-1 flex items-center gap-1.5 px-1",children:[o.jsxs("span",{className:oe("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]}),o.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg-3",children:m.title})]}),o.jsx("ul",{className:"space-y-0.5",children:f.map(h=>o.jsx(mE,{session:h,onSelect:()=>t(h.id)},h.id))})]},d)}),u.length>0&&o.jsxs("div",{children:[l.size>0&&o.jsx("div",{className:"mb-1 px-1",children:o.jsx("span",{className:"text-xs font-medium text-fg-5",children:"未关联 Issue"})}),o.jsx("ul",{className:"space-y-0.5",children:u.map(d=>o.jsx(mE,{session:d,onSelect:()=>t(d.id)},d.id))})]})]})})]})}function d9({rootIssue:e,childrenMap:t,currentId:a,onSelect:s,sessions:l,onSessionSelect:u}){const{total:d,closed:f}=u9(e.id,t),m=d===0?0:Math.round(f/d*100);return o.jsxs("div",{className:"flex w-full flex-col",children:[o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-3",children:[o.jsx(d3,{className:"h-3.5 w-3.5 text-fg-5"}),o.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:"子任务树"})]}),d>0&&o.jsxs("div",{className:"border-b border-line px-3 py-2",children:[o.jsx("div",{className:"h-1 overflow-hidden rounded-full bg-elevated",children:o.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-emerald-400 to-blue-500 transition-all",style:{width:`${m}%`}})}),o.jsxs("p",{className:"mt-1 font-mono text-[10px] text-fg-6",children:[f," / ",d," completed"]})]}),o.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:o.jsx(P_,{issue:e,childrenMap:t,currentId:a,onSelect:s,depth:0})})]}),o.jsx(U_,{sessions:l,onSelect:u})]})}function f9({sessions:e,onSessionSelect:t}){return o.jsx("div",{className:"flex w-full flex-col",children:o.jsx(U_,{sessions:e,onSelect:t})})}function m9(){const[e,t]=S.useState("open"),[a,s]=S.useState("stray"),[l,u]=S.useState(!1),[d,f]=S.useState(""),[m,h]=S.useState(null),[x,g]=S.useState(null),[y,T]=S.useState(!1),[N,v]=S.useState(!1),[A,w]=S.useState(null),[C,R]=S.useState(null),[U,V]=S.useState(null),[L,z]=YE(),X=Ge(H=>H.issues),W=Ge(H=>H.syncing),j=Ge(H=>H.syncIssues),K=Ge(H=>H.tags),Z=Ge(H=>H.tagFilterMode),se=Ge(H=>H.cycleTagFilter),le=Ge(H=>H.clearTagFilter),ae=Ge(H=>H.loadTags),F=Ge(H=>H.milestones),O=Ge(H=>H.selectedMilestoneId),ee=Ge(H=>H.setMilestoneFilter),_e=Ge(H=>H.loadMilestones),P=He(H=>H.activeRepoId),I=Ie(H=>H.sessions);S.useEffect(()=>{const H=L.get("issueId");H&&X.some(Ae=>Ae.id===H)&&(h(H),z({},{replace:!0}))},[L,z,X]),S.useEffect(()=>{P&&(ae(),_e())},[P,ae,_e]);const ie=new Map;for(const H of I)H.issueId&&!H.parentID&&ie.set(H.issueId,(ie.get(H.issueId)??0)+1);const D=new Set(X.filter(H=>H.parentId).map(H=>H.parentId)),Te=new Map;for(const H of X)if(H.parentId){const Ae=Te.get(H.parentId);Ae?Ae.push(H):Te.set(H.parentId,[H])}function ke(H){return H.parentId?"task":D.has(H.id)?"epic":"stray"}const Re=new Map(F.map(H=>[H.id,H])),Ye=e==="all"?X:X.filter(H=>H.state===e),dt=a==="all"?Ye:Ye.filter(H=>ke(H)===a),ut=Z.size===0?dt:dt.filter(H=>{var ft;const Ae=new Set((H.labels??[]).map(ln=>ln.name));for(const[ln,Wt]of Z){const Ot=(ft=K.find(cn=>cn.id===ln))==null?void 0:ft.name;if(Ot&&(Wt==="include"&&!Ae.has(Ot)||Wt==="exclude"&&Ae.has(Ot)))return!1}return!0}),zt=d.trim().toLowerCase(),Tn=zt?ut.filter(H=>`#${H.number} ${H.title}`.toLowerCase().includes(zt)):ut,da=O?Tn.filter(H=>H.milestoneId===O):Tn,Ca=C?da.filter(H=>H.authorLogin===C):da,un=U?Ca.filter(H=>(H.assignees??[]).some(Ae=>Ae.login===U)):Ca,Xn=(()=>{const H=new Map;for(const Ae of X)Ae.authorLogin&&!H.has(Ae.authorLogin)&&H.set(Ae.authorLogin,{login:Ae.authorLogin,avatar:Ae.authorAvatar});return[...H.values()]})(),Je=(()=>{const H=new Map;for(const Ae of X)for(const ft of Ae.assignees??[])H.has(ft.login)||H.set(ft.login,{login:ft.login,avatar:ft.avatar_url});return[...H.values()]})(),jn=X.filter(H=>H.state==="open").length,kn=X.filter(H=>H.state==="closed").length,fa=Ye.filter(H=>ke(H)==="epic").length,wa=Ye.filter(H=>ke(H)==="task").length,tr=Ye.filter(H=>ke(H)==="stray").length,Pa=X.find(H=>H.id===m)??null,wr=Aa(),_t=new Set;if(m&&(_t.add(m),x)){_t.add(x);const H=[...Te.get(x)??[]];for(let Ae=0;Ae<H.length;Ae++){_t.add(H[Ae].id);const ft=Te.get(H[Ae].id);ft&&H.push(...ft)}}const nr=I.filter(H=>H.issueId&&_t.has(H.issueId)&&!H.parentID),de=He(ja),ye=H=>{Ie.setState({activeSessionId:H}),wr(`/${encodeURIComponent(de)}/run`)},Pe=n_({onSwipeRight:()=>v(!0),onSwipeLeft:()=>T(!0),disabled:!m||N||y});return o.jsxs("div",{className:"flex min-h-0 flex-1",...Pe,children:[o.jsxs("div",{className:oe("shrink-0 flex-col bg-surface",m?"hidden md:flex md:w-80 border-r border-line":"flex w-full"),children:[m?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[o.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Issues"}),P&&o.jsx("div",{className:"flex items-center gap-1",children:o.jsx("button",{type:"button",onClick:()=>void j(),disabled:W,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:o.jsx(Fs,{className:oe("h-3.5 w-3.5",W&&"animate-spin")})})})]}),l&&o.jsx(dE,{onDone:()=>u(!1)}),o.jsx("div",{className:"flex border-b border-line",children:cE.map(({key:H,label:Ae})=>{const ft=H==="open"?jn:H==="closed"?kn:X.length;return o.jsxs("button",{type:"button",onClick:()=>t(H),className:oe("flex flex-1 items-center justify-center gap-1.5 py-2 text-xs font-medium transition-colors",e===H?"border-b-2 border-blue-500 text-blue-500":"text-fg-4 hover:text-fg-2"),children:[Ae,o.jsx("span",{className:oe("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===H?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:ft})]},H)})}),o.jsx("div",{className:"border-b border-line px-3 py-2",children:o.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[o.jsx(os,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),o.jsx("input",{type:"text",value:d,onChange:H=>f(H.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"}),d&&o.jsx("button",{type:"button",onClick:()=>f(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:o.jsx(gt,{className:"h-3 w-3"})})]})})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-2 border-b border-line px-4 py-2.5",children:[o.jsx("span",{className:"shrink-0 text-sm font-semibold text-fg md:order-1",children:"Issues"}),P&&o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1 md:order-last md:ml-0",children:[o.jsx("button",{type:"button",onClick:()=>void j(),disabled:W,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:o.jsx(Fs,{className:oe("h-3.5 w-3.5",W&&"animate-spin")})}),o.jsx("button",{type:"button",onClick:()=>u(H=>!H),title:"新建 Issue",className:oe("flex h-8 w-8 items-center justify-center rounded-md transition-colors",l?"bg-blue-600 text-white":"text-fg-4 hover:bg-elevated hover:text-fg-2"),children:o.jsx(Wa,{className:"h-3.5 w-3.5"})})]}),o.jsx("div",{className:"w-full md:order-2 md:w-auto",children:o.jsx("div",{className:"flex shrink-0 items-center rounded-lg bg-elevated/60 p-0.5",children:cE.map(({key:H,label:Ae})=>{const ft=H==="open"?jn:H==="closed"?kn:X.length;return o.jsxs("button",{type:"button",onClick:()=>t(H),className:oe("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",e===H?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[Ae,o.jsx("span",{className:oe("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===H?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:ft})]},H)})})}),o.jsx("div",{className:"w-full md:order-5 md:w-auto md:min-w-0 md:flex-1 md:px-1",children:o.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2.5 py-1.5",children:[o.jsx(os,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),o.jsx("input",{type:"text",value:d,onChange:H=>f(H.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),d&&o.jsx("button",{type:"button",onClick:()=>f(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:o.jsx(gt,{className:"h-3 w-3"})})]})}),o.jsx("div",{className:"hidden md:order-3 md:mx-1 md:block md:h-4 md:w-px md:shrink-0 md:bg-line"}),o.jsxs("div",{className:"flex w-full gap-2 overflow-x-auto scrollbar-none md:order-4 md:w-auto md:overflow-visible",children:[o.jsxs("button",{type:"button",onClick:()=>w(A==="type"?null:"type"),className:oe("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",A==="type"?"bg-elevated text-fg":a!=="all"?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["类型",a!=="all"&&o.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"?"任务":"游离"}),o.jsx(Ia,{className:oe("h-3 w-3 transition-transform",A==="type"&&"rotate-180")})]}),o.jsxs("button",{type:"button",onClick:()=>w(A==="tag"?null:"tag"),className:oe("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",A==="tag"?"bg-elevated text-fg":Z.size>0?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["标签",Z.size>0&&o.jsx("span",{className:"rounded-full bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:Z.size}),o.jsx(Ia,{className:oe("h-3 w-3 transition-transform",A==="tag"&&"rotate-180")})]}),o.jsxs("button",{type:"button",onClick:()=>w(A==="milestone"?null:"milestone"),className:oe("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",A==="milestone"?"bg-elevated text-fg":O?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Milestone",O&&(()=>{const H=F.find(Ae=>Ae.id===O);return H?o.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:H.title}):null})(),o.jsx(Ia,{className:oe("h-3 w-3 transition-transform",A==="milestone"&&"rotate-180")})]}),o.jsxs("button",{type:"button",onClick:()=>w(A==="author"?null:"author"),className:oe("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",A==="author"?"bg-elevated text-fg":C?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Author",C&&o.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:C}),o.jsx(Ia,{className:oe("h-3 w-3 transition-transform",A==="author"&&"rotate-180")})]}),o.jsxs("button",{type:"button",onClick:()=>w(A==="assignee"?null:"assignee"),className:oe("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",A==="assignee"?"bg-elevated text-fg":U?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Assignee",U&&o.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:U}),o.jsx(Ia,{className:oe("h-3 w-3 transition-transform",A==="assignee"&&"rotate-180")})]})]})]}),A==="type"&&o.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(H=>{const Ae=H==="epic"?"Epic":H==="stray"?"游离":H==="task"?"任务":"全部",ft=H==="epic"?fa:H==="stray"?tr:H==="task"?wa:Ye.length,ln=a===H;return o.jsxs("button",{type:"button",onClick:()=>s(ln&&H!=="all"?"all":H),className:oe("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-semibold transition-colors",ln?H==="epic"?"bg-amber-400/15 text-amber-400":H==="stray"?"bg-sky-400/15 text-sky-400":H==="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:[Ae,o.jsx("span",{className:oe("rounded-full px-1.5 py-0.5 font-mono text-[10px] font-medium",ln?"opacity-70":"text-fg-6"),children:ft})]},H)})}),A==="tag"&&o.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:K.length===0?o.jsx("span",{className:"text-xs text-fg-5",children:"暂无标签"}):o.jsxs(o.Fragment,{children:[K.map(H=>{const Ae=Z.get(H.id);return o.jsxs("button",{type:"button",onClick:()=>se(H.id),className:oe("shrink-0 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",Ae==="include"?"ring-1 ring-current shadow-sm":Ae==="exclude"?"opacity-90 line-through decoration-2":"opacity-50 hover:opacity-80"),style:Ae==="exclude"?{backgroundColor:`#${H.color}10`,color:`#${H.color}`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, #${H.color} 30%, transparent)`}:{backgroundColor:`#${H.color}18`,color:`#${H.color}`,boxShadow:Ae==="include"?`inset 0 0 0 1px color-mix(in srgb, #${H.color} 50%, transparent)`:void 0},children:[Ae==="exclude"&&o.jsx("span",{className:"mr-1 text-[10px]",children:"✕"}),H.name]},H.id)}),Z.size>0&&o.jsx("button",{type:"button",onClick:le,className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),A==="milestone"&&o.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:F.length===0?o.jsx("span",{className:"text-xs text-fg-5",children:"暂无里程碑"}):o.jsxs(o.Fragment,{children:[F.map(H=>{const Ae=O===H.id;return o.jsxs("button",{type:"button",onClick:()=>ee(Ae?null:H.id),className:oe("shrink-0 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",Ae?"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:[H.title,H.state==="closed"&&o.jsx("span",{className:"ml-1 text-[10px] opacity-60",children:"✓"})]},H.id)}),O&&o.jsx("button",{type:"button",onClick:()=>ee(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:"清除"})]})}),A==="author"&&o.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:Xn.length===0?o.jsx("span",{className:"text-xs text-fg-5",children:"同步后可见作者"}):o.jsxs(o.Fragment,{children:[Xn.map(H=>o.jsxs("button",{type:"button",onClick:()=>R(C===H.login?null:H.login),className:oe("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",C===H.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:[H.avatar&&o.jsx("img",{src:H.avatar,alt:"",className:"h-4 w-4 rounded-full"}),H.login]},H.login)),C&&o.jsx("button",{type:"button",onClick:()=>R(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:"清除"})]})}),A==="assignee"&&o.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:Je.length===0?o.jsx("span",{className:"text-xs text-fg-5",children:"同步后可见指派人"}):o.jsxs(o.Fragment,{children:[Je.map(H=>o.jsxs("button",{type:"button",onClick:()=>V(U===H.login?null:H.login),className:oe("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",U===H.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:[H.avatar&&o.jsx("img",{src:H.avatar,alt:"",className:"h-4 w-4 rounded-full"}),H.login]},H.login)),U&&o.jsx("button",{type:"button",onClick:()=>V(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:"清除"})]})}),l&&o.jsx(dE,{onDone:()=>u(!1)})]}),o.jsx("div",{className:oe("flex-1 overflow-y-auto",m?"px-2 py-2":"px-3 py-3"),children:P?un.length===0?o.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:X.length===0?"点击 ↻ 同步 Issues":"无匹配 Issue"}):o.jsx("ul",{className:oe(m?"space-y-0.5":"space-y-1"),children:un.map(H=>m?o.jsx(fE,{issue:H,sessionCount:ie.get(H.id)??0,isActive:m===H.id,isEpic:ke(H)==="epic",milestone:H.milestoneId?Re.get(H.milestoneId):void 0,onSelect:()=>{h(H.id),g(ke(H)==="epic"?H.id:null)}},H.id):o.jsx(l9,{issue:H,sessionCount:ie.get(H.id)??0,isEpic:ke(H)==="epic",milestone:H.milestoneId?Re.get(H.milestoneId):void 0,onSelect:()=>{h(H.id),g(ke(H)==="epic"?H.id:null)}},H.id))}):o.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]}),m&&o.jsx(ph,{side:"left",open:N,onClose:()=>v(!1),children:o.jsxs("div",{className:"flex h-full flex-col",children:[o.jsx("div",{className:"border-b border-line px-3 py-3",children:o.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Issues"})}),o.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:un.length===0?o.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"无匹配 Issue"}):o.jsx("ul",{className:"space-y-0.5",children:un.map(H=>o.jsx(fE,{issue:H,sessionCount:ie.get(H.id)??0,isActive:m===H.id,isEpic:ke(H)==="epic",milestone:H.milestoneId?Re.get(H.milestoneId):void 0,onSelect:()=>{h(H.id),g(ke(H)==="epic"?H.id:null),v(!1)}},H.id))})})]})}),m&&o.jsx("div",{className:"relative flex min-w-0 flex-1 flex-col bg-term",children:Pa?o.jsxs(o.Fragment,{children:[o.jsx(o9,{issue:Pa,milestone:Pa.milestoneId?Re.get(Pa.milestoneId):void 0,onBack:()=>{h(null),g(null),T(!1)},onClose:()=>{h(null),g(null),T(!1)},onToggleSidebar:()=>T(H=>!H)}),y&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"absolute inset-0 z-10 bg-black/30",onClick:()=>T(!1)}),o.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:[o.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-line px-3 py-2.5",children:[o.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:x?"子任务树 & 运行记录":"运行记录"}),o.jsx("button",{type:"button",onClick:()=>T(!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:o.jsx(gt,{className:"h-4 w-4"})})]}),o.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:x?(()=>{const H=X.find(Ae=>Ae.id===x);return H?o.jsx(d9,{rootIssue:H,childrenMap:Te,currentId:m,onSelect:Ae=>{h(Ae),T(!1)},sessions:nr,onSessionSelect:ye}):null})():o.jsx(f9,{sessions:nr,onSessionSelect:ye})})]})]})]}):o.jsx("div",{className:"flex flex-1 items-center justify-center",children:o.jsx("p",{className:"font-mono text-xs text-fg-5",children:"Issue 未找到"})})})]})}const hE=[{key:"open",label:"开放"},{key:"merged",label:"已合并"},{key:"closed",label:"已关闭"},{key:"all",label:"全部"}];function H_(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 h9(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 p9({pr:e,isActive:t,onSelect:a}){return o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:a,className:oe("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:[o.jsx("span",{className:oe("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}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[e.draft===1&&o.jsx("span",{className:"shrink-0 rounded px-1 py-0.5 text-[9px] font-bold bg-fg-6/15 text-fg-4",children:"DRAFT"}),o.jsx("span",{className:"min-w-0 text-xs font-medium text-fg-2 group-hover:text-fg",children:e.title})]}),o.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&&o.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:e.labels.map(s=>o.jsx("span",{className:"rounded px-1 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${s.color}20`,color:`#${s.color}`},children:s.name},s.id))})]})]})})}function g9({pr:e,onSelect:t}){return o.jsx("li",{children:o.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:[o.jsx("span",{className:oe("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}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[e.draft===1&&o.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"}),o.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"&&o.jsxs("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:[o.jsx(An,{className:"inline h-3 w-3 -mt-px"})," Conflict"]}),e.assignees&&e.assignees.length>0&&o.jsx("div",{className:"hidden shrink-0 items-center -space-x-1.5 sm:flex",children:e.assignees.slice(0,3).map(a=>o.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))})]}),o.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[o.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-fg-5",children:[e.headBranch," → ",e.baseBranch]}),o.jsx("span",{className:"text-fg-6",children:"·"}),e.authorLogin&&o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"shrink-0 text-[11px] text-fg-5",title:e.authorLogin,children:[e.authorAvatar&&o.jsx("img",{src:e.authorAvatar,alt:"",className:"mr-1 inline-block h-3.5 w-3.5 rounded-full align-text-bottom"}),e.authorLogin]}),o.jsx("span",{className:"text-fg-6",children:"·"})]}),o.jsx("span",{className:"shrink-0 text-[11px] text-fg-6",children:H_(e.createdAt)}),e.labels&&e.labels.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-fg-6",children:"·"}),e.labels.map(a=>o.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))]})]})]})]})})}function b9({issue:e,linked:t,onToggle:a}){return o.jsx("li",{children:o.jsx("button",{type:"button",onClick:a,className:oe("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:o.jsx("div",{className:"min-w-0 flex-1",children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsxs("span",{className:oe("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]}),o.jsx("span",{className:"min-w-0 truncate text-sm font-medium text-fg-2",children:e.title}),t&&o.jsx(Pc,{className:"ml-auto h-3.5 w-3.5 shrink-0 text-emerald-400"})]})})})})}function x9({pr:e,onBack:t,onClose:a,onEnterMatch:s}){var R;const l=He(U=>U.activeRepoId),u=He(ja),[d,f]=S.useState(!1),[m,h]=S.useState([]),[x,g]=S.useState(!1),[y,T]=S.useState([]),N=Aa(),v=Vn(U=>U.unlinkIssue);S.useEffect(()=>{l&&(g(!0),LC(l,e.number).then(h).catch(()=>h([])).finally(()=>g(!1)))},[l,e.number]),S.useEffect(()=>{l&&my(l,e.number).then(T).catch(()=>T([]))},[l,e.number]);const A=async U=>{if(!(d||!l)){f(!0);try{if(await IC(l,e.number),U&&y.length>0){const V=y.filter(L=>L.state==="open");await Promise.all(V.map(L=>fy(l,L.number,{state:"closed"}))),T(L=>L.map(z=>z.state==="open"?{...z,state:"closed"}:z)),Ge.getState().loadIssues(),Ft.getState().addToast(`PR #${e.number} 合入成功,已关闭 ${V.length} 个 Issue`,"success")}else Ft.getState().addToast(`PR #${e.number} 合入成功`,"success");Vn.getState().loadPulls()}catch(V){let L="合入失败";if(V instanceof Xa)try{L=JSON.parse(V.message).error??L}catch{L=V.message}Ft.getState().addToast(L,"error")}finally{f(!1)}}},w=async U=>{await v(e.number,U)&&T(L=>L.filter(z=>z.number!==U))},C=U=>{const V=new Date(U);return V.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})+" "+V.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})};return o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.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:[o.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[o.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:o.jsx(Lh,{className:"h-5 w-5"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[o.jsxs("span",{className:oe("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",h9(e.state)),children:["#",e.number," ",e.state]}),e.draft===1&&o.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"&&o.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"}),(R=e.labels)==null?void 0:R.map(U=>o.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${U.color}20`,color:`#${U.color}`},children:U.name},U.id))]}),o.jsx("h2",{className:"mt-1 text-base font-semibold text-fg",children:e.title}),o.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 text-xs text-fg-4",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-fg-5",children:[o.jsx(ho,{className:"h-3.5 w-3.5 shrink-0"}),o.jsxs("span",{className:"truncate",children:[e.headBranch," → ",e.baseBranch]})]}),e.authorLogin&&o.jsxs("span",{className:"flex items-center gap-1.5",children:[e.authorAvatar&&o.jsx("img",{src:e.authorAvatar,alt:"",className:"h-4 w-4 rounded-full"}),e.authorLogin]}),e.mergedAt&&o.jsxs("span",{className:"text-purple-400",children:["合并于 ",H_(e.mergedAt)]})]})]})]}),o.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[e.htmlUrl&&o.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:[o.jsx(pc,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"源站"})]}),o.jsxs("button",{type:"button",onClick:s,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:[o.jsx(Pc,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"关联 Issue"})]}),e.state==="open"&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",disabled:d||e.mergeable==="false",onClick:()=>void A(!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:[o.jsx(gc,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"合入"})]}),y.some(U=>U.state==="open")&&o.jsxs("button",{type:"button",disabled:d||e.mergeable==="false",onClick:()=>void A(!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:[o.jsx(gc,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"合入并关闭 Issues"})]})]}),a&&o.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:o.jsx(gt,{className:"h-4 w-4"})})]})]}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:[y.length>0&&o.jsxs("div",{className:"mb-6 rounded-lg border border-line bg-elevated/30 px-4 py-3",children:[o.jsxs("h3",{className:"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4",children:[o.jsx(mo,{className:"h-3.5 w-3.5"}),"关联 Issues (",y.length,")"]}),o.jsx("div",{className:"space-y-1.5",children:y.map(U=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{type:"button",onClick:()=>N(`/${encodeURIComponent(u)}/issues?issueId=${encodeURIComponent(U.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:[o.jsxs("span",{className:oe("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",U.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",U.number]}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-sm text-fg-2",children:U.title})]}),o.jsx("button",{type:"button",onClick:()=>void w(U.number),title:"取消关联",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-400",children:o.jsx(VE,{className:"h-3.5 w-3.5"})})]},U.id))})]}),e.body?o.jsx("div",{className:"markdown-body leading-relaxed",children:o.jsx(us,{remarkPlugins:[cs],rehypePlugins:[co],children:e.body})}):o.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 PR 没有描述内容"}),x?o.jsx("p",{className:"mt-8 text-center font-mono text-xs text-fg-6",children:"加载评论…"}):m.length>0&&o.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[o.jsxs("h3",{className:"mb-4 text-xs font-semibold uppercase tracking-wider text-fg-4",children:["评论 (",m.length,")"]}),o.jsx("div",{className:"space-y-4",children:m.map(U=>o.jsxs("div",{className:"rounded-lg border border-line bg-elevated/40 px-4 py-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("img",{src:U.user.avatar_url,alt:U.user.login,className:"h-5 w-5 rounded-full"}),o.jsx("span",{className:"text-xs font-semibold text-fg-2",children:U.user.login}),o.jsx("span",{className:"text-[10px] text-fg-6",children:C(U.created_at)})]}),o.jsx("div",{className:"markdown-body mt-2 text-sm leading-relaxed text-fg-3",children:o.jsx(us,{remarkPlugins:[cs],rehypePlugins:[co],children:U.body})})]},U.id))})]})]})})]})}function E9(){const[e,t]=S.useState("open"),[a,s]=S.useState(""),[l,u]=S.useState(null),[d,f]=S.useState(""),[m,h]=YE(),x=Vn(O=>O.pulls),g=Vn(O=>O.syncing),y=Vn(O=>O.syncPulls),T=Vn(O=>O.matchingPrId),N=Vn(O=>O.enterMatchMode),v=Vn(O=>O.exitMatchMode),A=Vn(O=>O.linkIssue),w=He(O=>O.activeRepoId),C=Ge(O=>O.issues);S.useEffect(()=>{const O=m.get("prId");O&&x.some(ee=>ee.id===O)&&(u(O),h({},{replace:!0}))},[m,h,x]);const R=T?x.find(O=>O.id===T)??null:null,[U,V]=S.useState(new Set);S.useEffect(()=>{if(!w||!R){V(new Set);return}my(w,R.number).then(O=>V(new Set(O.map(ee=>ee.id)))).catch(()=>V(new Set))},[w,R]);const L=async O=>{if(!R)return;U.has(O.id)?await Vn.getState().unlinkIssue(R.number,O.number)&&V(P=>{const I=new Set(P);return I.delete(O.id),I}):await A(R.number,O.number)&&V(P=>new Set(P).add(O.id))},z=x.filter(O=>O.state==="open").length,X=x.filter(O=>O.state==="merged").length,W=x.filter(O=>O.state==="closed").length,j=e==="all"?x:x.filter(O=>O.state===e),K=a.trim().toLowerCase(),Z=K?j.filter(O=>`#${O.number} ${O.title} ${O.headBranch} ${O.baseBranch}`.toLowerCase().includes(K)):j,se=d.trim().toLowerCase(),le=se?C.filter(O=>`#${O.number} ${O.title}`.toLowerCase().includes(se)):C,ae=x.find(O=>O.id===l)??null,F=R??ae;return o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsxs("div",{className:oe("shrink-0 flex-col bg-surface",F?"hidden md:flex md:w-80 border-r border-line":"flex w-full"),children:[T?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[o.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-400",children:"选择 Issue 关联"}),o.jsxs("button",{type:"button",onClick:v,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:[o.jsx(gt,{className:"h-3.5 w-3.5"}),"完成"]})]}),o.jsx("div",{className:"border-b border-line px-3 py-2",children:o.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[o.jsx(os,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),o.jsx("input",{type:"text",value:d,onChange:O=>f(O.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"}),d&&o.jsx("button",{type:"button",onClick:()=>f(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:o.jsx(gt,{className:"h-3 w-3"})})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:le.length===0?o.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:C.length===0?"暂无 Issue,请先同步":"无匹配 Issue"}):o.jsx("ul",{className:"space-y-0.5",children:le.map(O=>o.jsx(b9,{issue:O,linked:U.has(O.id),onToggle:()=>void L(O)},O.id))})})]}):F?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[o.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Pull Requests"}),w&&o.jsx("button",{type:"button",onClick:()=>void y(),disabled:g,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:o.jsx(Fs,{className:oe("h-3.5 w-3.5",g&&"animate-spin")})})]}),o.jsx("div",{className:"flex border-b border-line",children:hE.map(({key:O,label:ee})=>{const _e=O==="open"?z:O==="merged"?X:O==="closed"?W:x.length;return o.jsxs("button",{type:"button",onClick:()=>t(O),className:oe("flex flex-1 items-center justify-center gap-1.5 py-2 text-xs font-medium transition-colors",e===O?"border-b-2 border-blue-500 text-blue-500":"text-fg-4 hover:text-fg-2"),children:[ee,o.jsx("span",{className:oe("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===O?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:_e})]},O)})}),o.jsx("div",{className:"border-b border-line px-3 py-2",children:o.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[o.jsx(os,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),o.jsx("input",{type:"text",value:a,onChange:O=>s(O.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&&o.jsx("button",{type:"button",onClick:()=>s(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:o.jsx(gt,{className:"h-3 w-3"})})]})})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-2 border-b border-line px-4 py-2.5",children:[o.jsx("span",{className:"shrink-0 text-sm font-semibold text-fg md:order-1",children:"Pull Requests"}),o.jsx("button",{type:"button",onClick:()=>void y(),disabled:g||!w,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:o.jsx(Fs,{className:oe("h-4 w-4",g&&"animate-spin")})}),o.jsx("div",{className:"w-full md:order-2 md:w-auto",children:o.jsx("div",{className:"flex shrink-0 items-center rounded-lg bg-elevated/60 p-0.5",children:hE.map(({key:O,label:ee})=>{const _e=O==="open"?z:O==="merged"?X:O==="closed"?W:x.length;return o.jsxs("button",{type:"button",onClick:()=>t(O),className:oe("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",e===O?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[ee,o.jsx("span",{className:oe("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===O?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:_e})]},O)})})}),o.jsx("div",{className:"w-full md:order-3 md:w-auto md:min-w-0 md:flex-1 md:px-1",children:o.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2.5 py-1.5",children:[o.jsx(os,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),o.jsx("input",{type:"text",value:a,onChange:O=>s(O.target.value),placeholder:"搜索 PR...",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),a&&o.jsx("button",{type:"button",onClick:()=>s(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:o.jsx(gt,{className:"h-3 w-3"})})]})})]})}),!T&&o.jsx("div",{className:oe("flex-1 overflow-y-auto",F?"px-2 py-2":"px-3 py-3"),children:w?Z.length===0?o.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-fg-5",children:[o.jsx(ho,{className:"h-8 w-8"}),o.jsx("p",{className:"font-mono text-xs",children:x.length===0?"点击 ↻ 同步 PR":"没有匹配的 PR"})]}):o.jsx("ul",{className:oe(F?"space-y-0.5":"space-y-1"),children:Z.map(O=>F?o.jsx(p9,{pr:O,isActive:O.id===(l??T),onSelect:()=>u(O.id)},O.id):o.jsx(g9,{pr:O,onSelect:()=>u(O.id)},O.id))}):o.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]}),F?o.jsx(x9,{pr:F,onBack:()=>{u(null),T&&v()},onClose:()=>{u(null),T&&v()},onEnterMatch:()=>N(F.id)},`${F.id}-${T??"view"}`):o.jsx("div",{className:"hidden flex-1 items-center justify-center md:flex",children:o.jsxs("div",{className:"text-center text-fg-5",children:[o.jsx(ho,{className:"mx-auto h-12 w-12 opacity-20"}),o.jsx("p",{className:"mt-3 font-mono text-xs",children:"选择一个 PR 查看详情"})]})})]})}let Nr=null;function y9(e){const t=Date.now()-e,a=Math.floor(t/6e4);return a<1?"刚刚":a<60?`${a} 分钟前`:`${Math.floor(a/60)} 小时前`}const pE=[{id:"usage",label:"Claude 账号",icon:Ph},{id:"git",label:"Git 源站",icon:Ys},{id:"models",label:"模型",icon:lc},{id:"custom-agents",label:"Custom Agents",icon:JS},{id:"agents",label:"AGENTS.md",icon:XE}],T9={id:"server",label:"服务器",icon:ny};function _h(e){if(!e)return null;const t=new Date(e).getTime()-Date.now();if(t<=0)return"已重置";const a=Math.floor(t/36e5),s=Math.floor(t%36e5/6e4);return a>0?`${a}h ${s}m 后重置`:`${s}m 后重置`}function _9(e){return e>=90?"bg-red-500":e>=70?"bg-amber-500":"bg-blue-500"}function $m({label:e,window:t}){if(!t)return null;const a=Math.round(t.utilization),s=_h(t.resets_at),l=a>=90,u=a>=70;return o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg-3",children:e}),o.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s&&o.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:[o.jsx(TA,{className:"h-2.5 w-2.5"}),s]}),o.jsxs("span",{className:oe("text-sm font-bold leading-none tabular-nums",l?"text-red-400":u?"text-amber-400":"text-fg"),children:[a,"%"]})]})]}),o.jsx("div",{className:"h-2.5 overflow-hidden rounded-full bg-elevated ring-1 ring-inset ring-line/60",children:o.jsx("div",{className:oe("h-full rounded-full transition-all duration-500 ease-out",_9(a),l?"shadow-sm shadow-red-500/50":u?"shadow-sm shadow-amber-500/40":null),style:{width:`${Math.min(a,100)}%`}})})]})}function N9({account:e,onSwitch:t,switching:a}){var l;const s=e.active;return o.jsxs("div",{className:oe("relative overflow-hidden rounded-xl border bg-base p-4 shadow-sm transition-colors",s?"border-blue-500/30 ring-1 ring-inset ring-blue-500/20":"border-line"),children:[s&&o.jsx("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-1 bg-blue-500"}),o.jsxs("div",{className:"flex items-center gap-2.5",children:[o.jsx("div",{className:oe("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg",s?"bg-blue-500/15 text-blue-500":"bg-elevated text-fg-4"),children:o.jsx(ey,{className:"h-3.5 w-3.5"})}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-fg",children:e.label}),s&&o.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:[o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500 shadow-sm shadow-blue-500/60"}),"当前"]}),!s&&t&&o.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&&o.jsx(va,{className:"h-2.5 w-2.5 fs-spin"}),"切换"]}),e.excluded&&o.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:[o.jsx(WS,{className:"h-2.5 w-2.5"}),"不自动切"]}),e.needsReauth&&o.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:[o.jsx(An,{className:"h-2.5 w-2.5"}),"需重新登录"]})]}),e.holders&&e.holders.length>0&&o.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-fg-5",children:[o.jsx(ty,{className:"h-3 w-3 shrink-0"}),o.jsx("span",{className:"truncate",children:e.holders.join(", ")})]}),e.error&&!e.usage?o.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:[o.jsx(An,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),o.jsx("span",{className:"min-w-0 break-words",children:e.error})]}):e.usage?o.jsxs("div",{className:"mt-4 space-y-3",children:[o.jsx($m,{label:"5 小时窗口",window:e.usage.five_hour}),o.jsx($m,{label:"7 天窗口",window:e.usage.seven_day}),(l=e.usage.scoped)==null?void 0:l.map(u=>o.jsx($m,{label:u.label,window:u},u.label))]}):null]})}function v9(){const[e,t]=S.useState((Nr==null?void 0:Nr.data)??null),[a,s]=S.useState(!Nr),[l,u]=S.useState(null),[d,f]=S.useState(null),[m,h]=S.useState((Nr==null?void 0:Nr.fetchedAt)??null),[,x]=S.useState(0),g=S.useCallback(v=>{const A=Date.now();Nr={data:v,fetchedAt:A},t(v),h(A)},[]),y=S.useCallback(()=>{s(!0),u(null),hy().then(v=>{g(v),s(!1)}).catch(v=>{u(v instanceof Error?v.message:String(v)),s(!1)})},[g]);S.useEffect(()=>{Nr||y()},[y]),S.useEffect(()=>{const v=setInterval(()=>x(A=>A+1),3e4);return()=>clearInterval(v)},[]);const T=S.useRef(!1),N=S.useCallback(v=>{T.current||(T.current=!0,f(v),py(v).then(A=>{g(A),f(null)}).catch(A=>{u(A instanceof Error?A.message:String(A)),f(null)}).finally(()=>{T.current=!1}))},[g]);return o.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[o.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:o.jsx(LA,{className:"h-4 w-4"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Claude 订阅额度"}),o.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"各账号的 Pro/Max 订阅窗口用量。"})]})]}),o.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[m&&o.jsx("span",{className:"text-[10px] tabular-nums text-fg-5",children:y9(m)}),o.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:o.jsx(Fs,{className:oe("h-4 w-4",a&&"fs-spin")})})]})]}),o.jsx("div",{className:"mt-4 space-y-2.5",children:a&&!e?o.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[o.jsx(va,{className:"h-5 w-5 fs-spin"}),o.jsx("p",{className:"text-xs",children:"加载中…"})]}):l&&!e?o.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-red-400",children:[o.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-red-500/10",children:o.jsx(An,{className:"h-5 w-5"})}),o.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:l})]}):e&&e.accounts.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[o.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-elevated text-fg-4",children:o.jsx(ty,{className:"h-5 w-5"})}),o.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:"未找到账号。请在 OpenCode TUI 中通过 claude-accounts-usage 插件登录。"})]}):e?e.accounts.map(v=>o.jsx(N9,{account:v,onSwitch:N,switching:d===v.id},v.id)):null})]})}function S9({host:e,onDelete:t}){const[a,s]=S.useState(!1);return o.jsxs("div",{className:"group flex items-center gap-3 rounded-lg border border-line bg-base px-4 py-3",children:[o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm font-medium text-fg",children:e.name}),o.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-4",children:e.platform})]}),o.jsxs("div",{className:"mt-0.5 flex items-center gap-2 font-mono text-xs text-fg-4",children:[o.jsx("span",{children:e.host}),o.jsx("span",{className:"text-fg-6",children:"·"}),o.jsx("span",{className:"text-fg-5",children:e.token})]})]}),a?o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{type:"button",onClick:t,className:"rounded p-1.5 text-red-400 hover:bg-red-500/10",children:o.jsx(oa,{className:"h-4 w-4"})}),o.jsx("button",{type:"button",onClick:()=>s(!1),className:"rounded p-1.5 text-fg-4 hover:bg-elevated",children:o.jsx(gt,{className:"h-4 w-4"})})]}):o.jsx("button",{type:"button",onClick:()=>s(!0),className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100",children:o.jsx(zs,{className:"h-4 w-4"})})]})}function A9({onAdded:e}){const[t,a]=S.useState(!1),[s,l]=S.useState(""),[u,d]=S.useState(""),[f,m]=S.useState(""),[h,x]=S.useState("gitea"),[g,y]=S.useState(!1),[T,N]=S.useState(!1),v=()=>{l(""),d(""),m(""),x("gitea"),a(!1)},A=async()=>{if(!(!s.trim()||!u.trim()||!f.trim())){y(!0);try{await QC(s.trim(),u.trim(),f.trim(),h),v(),e()}finally{y(!1)}}};return t?o.jsxs("div",{className:"space-y-3 rounded-lg border border-line bg-base p-4",children:[o.jsxs("div",{className:"flex gap-3",children:[o.jsxs("label",{className:"flex-1",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"名称"}),o.jsx("input",{type:"text",value:u,onChange:w=>d(w.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"})]}),o.jsxs("label",{className:"w-28",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"平台"}),o.jsxs("select",{value:h,onChange:w=>x(w.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:[o.jsx("option",{value:"gitea",children:"Gitea"}),o.jsx("option",{value:"github",children:"GitHub"}),o.jsx("option",{value:"gitlab",children:"GitLab"})]})]})]}),o.jsxs("label",{className:"block",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Host"}),o.jsx("input",{type:"text",value:s,onChange:w=>l(w.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"})]}),o.jsxs("label",{className:"block",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Token"}),o.jsxs("div",{className:"relative mt-1",children:[o.jsx("input",{type:T?"text":"password",value:f,onChange:w=>m(w.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"}),o.jsx("button",{type:"button",onClick:()=>N(!T),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-fg-5 hover:text-fg-3",children:T?o.jsx(kA,{className:"h-3.5 w-3.5"}):o.jsx(OA,{className:"h-3.5 w-3.5"})})]})]}),o.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[o.jsx("button",{type:"button",onClick:v,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),o.jsx("button",{type:"button",onClick:()=>void A(),disabled:g||!s.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?"保存中…":"保存"})]})]}):o.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:[o.jsx(Wa,{className:"h-3.5 w-3.5"})," 添加 Git 源站"]})}function C9(){const[e,t]=S.useState(""),[a,s]=S.useState(""),[l,u]=S.useState(!0),[d,f]=S.useState(!1),[m,h]=S.useState(null);S.useEffect(()=>{HC().then(y=>{t(y.content),s(y.content),u(!1)}).catch(y=>{h(y instanceof Error?y.message:String(y)),u(!1)})},[]);const x=async()=>{f(!0),h(null);try{await FC(e),s(e)}catch(y){h(y instanceof Error?y.message:String(y))}f(!1)},g=e!==a;return o.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h2",{className:"text-sm font-semibold text-fg",children:"全局 AGENTS.md"}),o.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"此内容会注入到所有仓库的 Agent 系统指令中。修改后 opencode 热加载,即时生效。"})]}),o.jsxs("button",{type:"button",onClick:()=>void x(),disabled:d||!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:[o.jsx(Fc,{className:"h-3.5 w-3.5"}),d?"保存中…":"保存"]})]}),m&&o.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:[o.jsx(An,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),o.jsx("span",{className:"min-w-0 break-words",children:m})]}),o.jsx("div",{className:"mt-4",children:l?o.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[o.jsx(va,{className:"h-5 w-5 fs-spin"}),o.jsx("p",{className:"text-xs",children:"加载中…"})]}):o.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
491
+
492
+ 在此编写全局 Agent 指令…`})}),o.jsx("p",{className:"mt-3 text-[11px] text-fg-5",children:"文件路径:~/.config/opencode/AGENTS.md"})]})}function w9(){const[e,t]=S.useState([]),[a,s]=S.useState(!0),l=()=>{VC().then(d=>{t(d),s(!1)}).catch(()=>s(!1))};S.useEffect(l,[]);const u=async d=>{await XC(d),t(f=>f.filter(m=>m.id!==d))};return o.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[o.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Git 源站管理"}),o.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"为不同的 Git 托管平台配置访问凭证,用于同步 Issues。系统会根据仓库的 git URL 自动匹配对应的源站。"}),o.jsx("div",{className:"mt-4 space-y-2",children:a?o.jsx("p",{className:"py-4 text-center font-mono text-xs text-fg-5",children:"加载中…"}):o.jsxs(o.Fragment,{children:[e.map(d=>o.jsx(S9,{host:d,onDelete:()=>void u(d.id)},d.id)),o.jsx(A9,{onAdded:l})]})}),o.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"Token 存储在数据库中。也可通过环境变量 GITEA_TOKEN 设置全局 fallback。"})]})}const Nh="pinned_models";function k9(e){const t=new Map;for(const a of e){const s=a.providerName||a.providerID,l=t.get(s);l?l.push(a):t.set(s,[a])}return Array.from(t,([a,s])=>({provider:a,models:s})).sort((a,s)=>{const l=a.models.some(d=>d.configured),u=s.models.some(d=>d.configured);return l!==u?l?-1:1:a.provider.localeCompare(s.provider)})}function R9(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e):""}function O9(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 I9(){const e=He(R=>R.activeRepoId),[t,a]=S.useState([]),[s,l]=S.useState(new Set),[u,d]=S.useState(!0),[f,m]=S.useState(null),[h,x]=S.useState(null),[g,y]=S.useState("");S.useEffect(()=>{let R=!1;async function U(){d(!0),m(null);try{const[V,L]=await Promise.all([qc(),e?zc(e):Promise.resolve([])]);if(R)return;const z=V[Nh],X=z?JSON.parse(z):[];l(new Set(X)),a(L),x(null),y("")}catch(V){R||m(V instanceof Error?V.message:String(V))}R||d(!1)}return U(),()=>{R=!0}},[e]);const T=async R=>{const U=new Set(s);U.has(R)?U.delete(R):U.add(R),l(U);try{await eh(Nh,JSON.stringify([...U]))}catch{l(s)}},N=S.useMemo(()=>k9(t),[t]),v=t.filter(R=>s.has(R.id)).length,A=h?N.find(R=>R.provider===h):N[0],w=g.trim().toLowerCase(),C=A?w?A.models.filter(R=>(R.name||R.id).toLowerCase().includes(w)||R.id.toLowerCase().includes(w)):A.models:[];return o.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[o.jsx("div",{className:"flex items-center justify-between gap-3",children:o.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[o.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:o.jsx(lc,{className:"h-4 w-4"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("h2",{className:"text-sm font-semibold text-fg",children:"常用模型"}),o.jsxs("p",{className:"mt-0.5 text-xs text-fg-4",children:["勾选常用模型,在新建对话时快速选择。",v>0&&o.jsxs("span",{className:"ml-1 text-blue-400",children:["已选 ",v," 个"]})]})]})]})}),o.jsx("div",{className:"mt-4",children:e?u?o.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[o.jsx(va,{className:"h-5 w-5 fs-spin"}),o.jsx("p",{className:"text-xs",children:"加载模型列表…"})]}):f?o.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-red-400",children:[o.jsx(An,{className:"h-5 w-5"}),o.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:f})]}):t.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[o.jsx(lc,{className:"h-5 w-5"}),o.jsx("p",{className:"text-xs",children:"当前仓库没有可用模型。"})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex gap-1 overflow-x-auto rounded-lg border border-line bg-base p-1",children:N.map(R=>{var L;const U=R.provider===(h??((L=N[0])==null?void 0:L.provider)),V=R.models.filter(z=>s.has(z.id)).length;return o.jsxs("button",{type:"button",onClick:()=>{x(R.provider),y("")},className:oe("flex shrink-0 items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",U?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-3"),children:[R.provider,V>0&&o.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:V})]},R.provider)})}),o.jsxs("div",{className:"mt-3 flex items-center gap-2 rounded-md border border-line bg-base px-3 py-1.5",children:[o.jsx(os,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),o.jsx("input",{type:"text",value:g,onChange:R=>y(R.target.value),placeholder:"搜索模型…",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),g&&o.jsx("button",{type:"button",onClick:()=>y(""),className:"text-fg-5 hover:text-fg-3",children:o.jsx(gt,{className:"h-3 w-3"})})]}),o.jsx("div",{className:"mt-3 rounded-lg border border-line bg-base",children:C.length===0?o.jsx("div",{className:"px-3 py-6 text-center text-xs text-fg-5",children:"无匹配模型"}):o.jsx("div",{className:"divide-y divide-line/40",children:C.map(R=>{const U=s.has(R.id),V=R9(R.contextLimit),L=O9(R.cost);return o.jsxs("label",{className:oe("flex cursor-pointer items-center gap-3 px-3 py-2 transition-colors hover:bg-elevated/60",U&&"bg-blue-500/5"),children:[o.jsx("input",{type:"checkbox",checked:U,onChange:()=>void T(R.id),className:"h-3.5 w-3.5 shrink-0 cursor-pointer rounded border-line accent-blue-500"}),o.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-fg",children:R.name||R.id}),o.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[V&&o.jsx("span",{className:"rounded bg-surface px-1.5 py-0.5 text-[10px] text-fg-5",children:V}),L&&o.jsx("span",{className:"text-[10px] text-fg-6",children:L})]})]},R.id)})})})]}):o.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[o.jsx(lc,{className:"h-5 w-5"}),o.jsx("p",{className:"text-xs",children:"请先在左侧选择一个仓库以加载可用模型。"})]})})]})}const M9=["Sisyphus - ultraworker","Prometheus - Plan Builder","Atlas - Plan Executor"];function D9({agent:e,onEdit:t,onDelete:a}){const[s,l]=S.useState(!1),[u,d]=S.useState(!1),f=async()=>{const h=await px(e.id),x=new Blob([JSON.stringify(h,null,2)],{type:"application/json"}),g=URL.createObjectURL(x),y=document.createElement("a");y.href=g,y.download=`${e.name.replace(/[^a-zA-Z0-9\u4e00-\u9fff_-]/g,"_")}.json`,y.click(),URL.revokeObjectURL(g)},m=async()=>{const h=await px(e.id);await navigator.clipboard.writeText(JSON.stringify(h,null,2)),d(!0),setTimeout(()=>d(!1),2e3)};return o.jsxs("div",{className:"group flex items-center gap-3 rounded-lg border border-line bg-base px-4 py-3",children:[o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm font-medium text-fg",children:e.name}),o.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-4",children:e.baseAgent}),e.model&&o.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:e.model}),e.repoId&&o.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-medium text-blue-400",children:"repo"})]}),e.systemPrompt&&o.jsx("p",{className:"mt-0.5 truncate font-mono text-xs text-fg-5",children:e.systemPrompt})]}),o.jsx("div",{className:"flex items-center gap-1",children:s?o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",onClick:a,className:"rounded p-1.5 text-red-400 hover:bg-red-500/10",children:o.jsx(oa,{className:"h-4 w-4"})}),o.jsx("button",{type:"button",onClick:()=>l(!1),className:"rounded p-1.5 text-fg-4 hover:bg-elevated",children:o.jsx(gt,{className:"h-4 w-4"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",onClick:()=>void f(),title:"导出 JSON 文件",className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-fg-3 group-hover:opacity-100",children:o.jsx(AA,{className:"h-4 w-4"})}),o.jsx("button",{type:"button",onClick:()=>void m(),title:"复制 JSON 到剪贴板",className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-fg-3 group-hover:opacity-100",children:u?o.jsx(oa,{className:"h-4 w-4 text-green-500"}):o.jsx(EA,{className:"h-4 w-4"})}),o.jsx("button",{type:"button",onClick:t,className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-fg-3 group-hover:opacity-100",children:o.jsx(ZE,{className:"h-4 w-4"})}),o.jsx("button",{type:"button",onClick:()=>l(!0),className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100",children:o.jsx(zs,{className:"h-4 w-4"})})]})})]})}const js="__system_prompt__";function gE({initial:e,availableFragments:t,onSave:a,onCancel:s}){const l=He(K=>K.activeRepoId),[u,d]=S.useState((e==null?void 0:e.name)??""),[f,m]=S.useState((e==null?void 0:e.baseAgent)??"Sisyphus - ultraworker"),[h,x]=S.useState((e==null?void 0:e.model)??""),[g,y]=S.useState((e==null?void 0:e.systemPrompt)??""),[T,N]=S.useState(!1),[v,A]=S.useState(!1),[w,C]=S.useState([]);S.useEffect(()=>{if(!l){C([]);return}let K=!1;return(async()=>{try{const[Z,se]=await Promise.all([qc(),zc(l)]);if(K)return;const le=Z[Nh],ae=le?JSON.parse(le):[];C(ae.length>0?se.filter(F=>ae.includes(F.id)):[])}catch{K||C([])}})(),()=>{K=!0}},[l]);const[R,U]=S.useState(()=>{const K=(e==null?void 0:e.fragments.map(ae=>ae.id))??[],Z=(e==null?void 0:e.systemPromptPosition)??-1,se=Z>=0&&Z<=K.length?Z:K.length,le=[...K];return le.splice(se,0,js),le}),V=K=>{U(Z=>{if(Z.includes(K))return Z.filter(ae=>ae!==K);const se=Z.indexOf(js),le=[...Z];return le.splice(se>=0?se:le.length,0,K),le})},L=(K,Z)=>{const se=K+Z;se<0||se>=R.length||U(le=>{const ae=[...le];return[ae[K],ae[se]]=[ae[se],ae[K]],ae})},z=R.filter(K=>K!==js),X=(()=>{const K=R.indexOf(js);return K<0?-1:R.slice(0,K).filter(Z=>Z!==js).length})(),W=R.map(K=>{var Z;return K===js?g:(Z=t.find(se=>se.id===K))==null?void 0:Z.content}).filter(Boolean).join(`
493
+
494
+ ---
495
+
496
+ `),j=async()=>{if(!(!u.trim()||!f)){A(!0);try{await a({name:u.trim(),baseAgent:f,model:h.trim()||void 0,systemPrompt:g,systemPromptPosition:X,fragmentIds:z})}finally{A(!1)}}};return o.jsxs("div",{className:"space-y-3 rounded-lg border border-line bg-base p-4",children:[o.jsxs("div",{className:"flex gap-3",children:[o.jsxs("label",{className:"flex-1",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"名称"}),o.jsx("input",{type:"text",value:u,onChange:K=>d(K.target.value),placeholder:"代码审查员",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"})]}),o.jsxs("label",{className:"w-36",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Base Agent"}),o.jsx("select",{value:f,onChange:K=>m(K.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:M9.map(K=>o.jsx("option",{value:K,children:K},K))})]})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"模型(可选)"}),o.jsxs("select",{value:h,onChange:K=>x(K.target.value),className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[o.jsx("option",{value:"",children:"默认模型"}),w.map(K=>o.jsx("option",{value:K.id,children:K.name||K.id},K.id))]}),w.length===0&&o.jsx("p",{className:"mt-1 text-[11px] text-fg-5",children:"在「模型」Tab 中勾选常用模型后可选择。"})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"提示词组合"}),o.jsx("p",{className:"mt-0.5 text-[11px] text-fg-5",children:"拖拽排序片段与补充指令的拼接顺序。"}),o.jsxs("div",{className:"mt-1.5 space-y-1",children:[R.map((K,Z)=>{if(K===js)return o.jsxs("div",{className:"flex items-center gap-2 rounded border border-amber-500/30 bg-amber-500/5 px-2 py-1",children:[o.jsxs("div",{className:"flex flex-col",children:[o.jsx("button",{type:"button",onClick:()=>L(Z,-1),disabled:Z===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),o.jsx("button",{type:"button",onClick:()=>L(Z,1),disabled:Z===R.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),o.jsx("span",{className:"flex-1 truncate text-xs font-medium text-amber-400",children:"✎ 补充指令"})]},K);const se=t.find(le=>le.id===K);return se?o.jsxs("div",{className:"flex items-center gap-2 rounded border border-blue-500/30 bg-blue-500/5 px-2 py-1",children:[o.jsxs("div",{className:"flex flex-col",children:[o.jsx("button",{type:"button",onClick:()=>L(Z,-1),disabled:Z===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),o.jsx("button",{type:"button",onClick:()=>L(Z,1),disabled:Z===R.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),o.jsx("span",{className:"flex-1 truncate text-xs text-fg",children:se.name}),o.jsx("button",{type:"button",onClick:()=>V(K),className:"text-fg-5 hover:text-red-400",children:o.jsx(gt,{className:"h-3 w-3"})})]},K):null}),t.filter(K=>!z.includes(K.id)).length>0&&o.jsxs("select",{value:"",onChange:K=>{K.target.value&&V(K.target.value)},className:"w-full rounded border border-dashed border-line bg-surface px-2 py-1 text-xs text-fg-4 focus:border-blue-500 focus:outline-none",children:[o.jsx("option",{value:"",children:"+ 添加片段…"}),t.filter(K=>!z.includes(K.id)).map(K=>o.jsx("option",{value:K.id,children:K.name},K.id))]})]})]}),o.jsxs("label",{className:"block",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"补充指令内容"}),o.jsx("textarea",{value:g,onChange:K=>y(K.target.value),rows:3,placeholder:"agent 级别的补充指令…",className:"mt-1 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"})]}),(z.length>0||g)&&o.jsxs("div",{children:[o.jsxs("button",{type:"button",onClick:()=>N(!T),className:"flex items-center gap-1 text-xs font-medium text-fg-4 hover:text-fg-3",children:[o.jsx("span",{children:T?"▾":"▸"})," 预览最终提示词"]}),T&&o.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:W||"(空)"})]}),o.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[o.jsx("button",{type:"button",onClick:s,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),o.jsx("button",{type:"button",onClick:()=>void j(),disabled:v||!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:v?"保存中…":e?"更新":"创建"})]})]})}function L9({fragment:e,onEdit:t,onDelete:a}){const[s,l]=S.useState(!1);return o.jsxs("div",{className:"group flex items-center gap-3 rounded-lg border border-line bg-base px-3 py-2",children:[o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"text-xs font-medium text-fg",children:e.name}),e.content&&o.jsx("p",{className:"mt-0.5 truncate font-mono text-[11px] text-fg-5",children:e.content})]}),o.jsx("div",{className:"flex items-center gap-1",children:s?o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",onClick:a,className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:o.jsx(oa,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:()=>l(!1),className:"rounded p-1 text-fg-4 hover:bg-elevated",children:o.jsx(gt,{className:"h-3.5 w-3.5"})})]}):o.jsxs(o.Fragment,{children:[o.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:o.jsx(ZE,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:()=>l(!0),className:"rounded p-1 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100",children:o.jsx(zs,{className:"h-3.5 w-3.5"})})]})})]})}function bE({initial:e,onSave:t,onCancel:a}){const[s,l]=S.useState((e==null?void 0:e.name)??""),[u,d]=S.useState((e==null?void 0:e.content)??""),[f,m]=S.useState(!1),h=async()=>{if(s.trim()){m(!0);try{await t({name:s.trim(),content:u})}finally{m(!1)}}};return o.jsxs("div",{className:"space-y-2 rounded-lg border border-line bg-base p-3",children:[o.jsx("input",{type:"text",value:s,onChange:x=>l(x.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"}),o.jsx("textarea",{value:u,onChange:x=>d(x.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"}),o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx("button",{type:"button",onClick:a,className:"rounded-md px-3 py-1 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),o.jsx("button",{type:"button",onClick:()=>void h(),disabled:f||!s.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 j9({onImported:e,onCancel:t}){const[a,s]=S.useState(""),[l,u]=S.useState(!1),[d,f]=S.useState(null),m=S.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 yC(y),e()}catch(T){f(T instanceof Error?T.message:String(T))}finally{u(!1)}},x=g=>{var N;const y=(N=g.target.files)==null?void 0:N[0];if(!y)return;const T=new FileReader;T.onload=()=>{const v=T.result;s(v),h(v)},T.readAsText(y)};return o.jsxs("div",{className:"space-y-3 rounded-lg border border-line bg-base p-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"导入 Custom Agent"}),o.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-fg-5 hover:text-fg-3",children:o.jsx(gt,{className:"h-3.5 w-3.5"})})]}),o.jsx("input",{ref:m,type:"file",accept:".json",onChange:x,className:"hidden"}),o.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:[o.jsx(JE,{className:"h-3.5 w-3.5"})," 上传 JSON 文件"]}),o.jsx("div",{className:"relative",children:o.jsx("textarea",{value:a,onChange:g=>s(g.target.value),rows:4,placeholder:"或粘贴 JSON 内容…",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"})}),d&&o.jsxs("div",{className:"flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[o.jsx(An,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),o.jsx("span",{children:d})]}),o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx("button",{type:"button",onClick:t,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),o.jsx("button",{type:"button",onClick:()=>void h(a),disabled:l||!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:l?"导入中…":"导入"})]})]})}function B9(){const[e,t]=S.useState([]),[a,s]=S.useState([]),[l,u]=S.useState(!0),[d,f]=S.useState(!1),[m,h]=S.useState(null),[x,g]=S.useState(!1),[y,T]=S.useState(null),[N,v]=S.useState(!1),A=()=>{Promise.all([oy(),NC()]).then(([z,X])=>{t(z),s(X),u(!1)}).catch(()=>u(!1))};S.useEffect(A,[]);const w=async z=>{await uy(z),f(!1),A(),ji.getState().loadAgents()},C=async z=>{m&&(await cy(m.id,z),h(null),A(),ji.getState().loadAgents())},R=async z=>{await dy(z),t(X=>X.filter(W=>W.id!==z)),ji.getState().loadAgents()},U=async z=>{await vC(z),g(!1),A()},V=async z=>{y&&(await SC(y.id,z),T(null),A())},L=async z=>{await AC(z),s(X=>X.filter(W=>W.id!==z))};return l?o.jsx("section",{className:"rounded-xl border border-line bg-surface p-5",children:o.jsx("p",{className:"py-4 text-center font-mono text-xs text-fg-5",children:"加载中…"})}):o.jsxs("div",{className:"space-y-4",children:[o.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[o.jsx("h2",{className:"text-sm font-semibold text-fg",children:"提示词片段"}),o.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"可复用的提示词模块,可在多个 Custom Agent 间共享。"}),o.jsxs("div",{className:"mt-3 space-y-1.5",children:[a.map(z=>(y==null?void 0:y.id)===z.id?o.jsx(bE,{initial:z,onSave:V,onCancel:()=>T(null)},z.id):o.jsx(L9,{fragment:z,onEdit:()=>T(z),onDelete:()=>void L(z.id)},z.id)),x?o.jsx(bE,{onSave:U,onCancel:()=>g(!1)}):o.jsxs("button",{type:"button",onClick:()=>g(!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:[o.jsx(Wa,{className:"h-3.5 w-3.5"})," 添加片段"]})]})]}),o.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[o.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Custom Agents"}),o.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"组合 base agent + 模型 + 提示词片段 + 补充指令。创建 Session 时选择即可。"}),o.jsxs("div",{className:"mt-3 space-y-2",children:[e.map(z=>(m==null?void 0:m.id)===z.id?o.jsx(gE,{initial:z,availableFragments:a,onSave:C,onCancel:()=>h(null)},z.id):o.jsx(D9,{agent:z,onEdit:()=>h(z),onDelete:()=>void R(z.id)},z.id)),d?o.jsx(gE,{availableFragments:a,onSave:w,onCancel:()=>f(!1)}):N?o.jsx(j9,{onImported:()=>{v(!1),A(),ji.getState().loadAgents()},onCancel:()=>v(!1)}):o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("button",{type:"button",onClick:()=>f(!0),className:"flex flex-1 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:[o.jsx(Wa,{className:"h-3.5 w-3.5"})," 添加 Custom Agent"]}),o.jsxs("button",{type:"button",onClick:()=>v(!0),className:"flex flex-1 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:[o.jsx(JE,{className:"h-3.5 w-3.5"})," 导入 Agent"]})]})]}),o.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"全局 Agent 对所有仓库可见。支持导出 JSON 分享给其他实例。"})]})]})}function P9(){const[e,t]=S.useState(Jm),[a,s]=S.useState(!1),[l,u]=S.useState(null),[d,f]=S.useState(Jm),m=e!==d,h=async()=>{const g=e.replace(/\/+$/,"");if(g){s(!0),u(null);try{const y=await fetch(`${g}/api/health`,{signal:AbortSignal.timeout(5e3)});u(y.ok?"ok":"fail")}catch{u("fail")}s(!1)}},x=()=>{const g=e.replace(/\/+$/,"");Y3(g),f(g),t(g)};return o.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[o.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:o.jsx(ny,{className:"h-4 w-4"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("h2",{className:"text-sm font-semibold text-fg",children:"服务器连接"}),o.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"配置远程 Fourth Spark Server 地址。"})]})]}),o.jsxs("div",{className:"mt-4 space-y-3",children:[o.jsxs("label",{className:"block",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"服务器地址"}),o.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"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.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?o.jsx(va,{className:"h-3.5 w-3.5 fs-spin"}):o.jsx(Fs,{className:"h-3.5 w-3.5"}),"测试连接"]}),o.jsxs("button",{type:"button",onClick:x,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:[o.jsx(Fc,{className:"h-3.5 w-3.5"}),"保存"]}),l==="ok"&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-green-500",children:[o.jsx(oa,{className:"h-3.5 w-3.5"})," 连接成功"]}),l==="fail"&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-red-400",children:[o.jsx(An,{className:"h-3.5 w-3.5"})," 连接失败"]})]})]}),o.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"保存后需重新打开 App 生效。确保手机与开发机在同一局域网。"})]})}function U9(){const[e,t]=S.useState("local"),[a,s]=S.useState(!1),[l,u]=S.useState(!1);S.useEffect(()=>{th().then(f=>{const m=f.mode==="worker";s(m),t(m?"cloud":"local")}).catch(()=>{}).finally(()=>u(!0))},[]);const d=S.useCallback(f=>{const m=f.mode==="worker";s(m),m&&t("cloud")},[]);return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex gap-1 rounded-lg border border-line bg-base p-1",children:[o.jsxs("button",{type:"button",onClick:()=>{a||t("local")},disabled:a,className:oe("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:[o.jsx(Ph,{className:"h-3.5 w-3.5"}),"本地模式"]}),o.jsxs("button",{type:"button",onClick:()=>t("cloud"),className:oe("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:[o.jsx(QE,{className:"h-3.5 w-3.5"}),"账号池"]})]}),l&&e==="local"&&o.jsx(v9,{}),l&&e==="cloud"&&o.jsx(F9,{onStatusChange:d})]})}function H9({onClose:e,onSwitched:t}){const[a,s]=S.useState([]),[l,u]=S.useState(!0),[d,f]=S.useState(null),[m,h]=S.useState(null);S.useEffect(()=>{hy().then(T=>s(T.accounts)).catch(()=>{}).finally(()=>u(!1))},[]);const x=async T=>{f(T),h(null);try{await py(T),t(),e()}catch(N){const v=N instanceof Error?N.message:String(N);h(v||"切换失败"),f(null)}},g=T=>{var N;return(N=T.usage)==null?void 0:N.five_hour},y=T=>{var N;return(N=T.usage)==null?void 0:N.seven_day};return o.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:o.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:T=>T.stopPropagation(),children:[o.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-fg",children:"切换账号"}),o.jsx("button",{type:"button",onClick:e,className:"rounded-md p-1 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:o.jsx(gt,{className:"h-4 w-4"})})]}),l?o.jsx("div",{className:"flex items-center justify-center py-10",children:o.jsx(va,{className:"h-5 w-5 fs-spin text-fg-4"})}):a.length===0?o.jsx("p",{className:"py-10 text-center text-xs text-fg-4",children:"暂无可用账号"}):o.jsx("div",{className:"mt-3 min-h-0 flex-1 space-y-1.5 overflow-y-auto pb-[var(--safe-bottom)]",children:a.map(T=>o.jsxs("button",{type:"button",disabled:d!==null,onClick:()=>{T.active||x(T.id)},className:oe("flex w-full items-center gap-2 rounded-lg border px-3 py-2.5 text-left transition-colors sm:gap-3",T.active?"border-blue-500/40 bg-blue-500/5":"border-line hover:bg-elevated",d===T.id&&"opacity-60"),children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("span",{className:"truncate text-xs font-medium text-fg",children:T.label}),T.active&&o.jsx("span",{className:"rounded bg-blue-500/15 px-1.5 py-0.5 text-[9px] font-semibold text-blue-500",children:"当前"}),d===T.id&&o.jsx(va,{className:"h-3 w-3 fs-spin text-blue-500"})]})}),o.jsxs("div",{className:"flex shrink-0 gap-2 text-right sm:gap-4",children:[o.jsxs("div",{className:"w-14 sm:w-20",children:[o.jsx("div",{className:"text-[10px] text-fg-5",children:"5h"}),g(T)?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:oe("text-xs font-medium",g(T).utilization>80?"text-red-400":"text-fg-3"),children:[Math.round(g(T).utilization),"%"]}),o.jsx("div",{className:"hidden text-[9px] text-fg-5 sm:block",children:g(T).resets_at?_h(g(T).resets_at):""})]}):o.jsx("div",{className:"text-[10px] text-fg-5",children:"—"})]}),o.jsxs("div",{className:"w-14 sm:w-20",children:[o.jsx("div",{className:"text-[10px] text-fg-5",children:"7d"}),y(T)?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:oe("text-xs font-medium",y(T).utilization>80?"text-red-400":"text-fg-3"),children:[Math.round(y(T).utilization),"%"]}),o.jsx("div",{className:"hidden text-[9px] text-fg-5 sm:block",children:y(T).resets_at?_h(y(T).resets_at):""})]}):o.jsx("div",{className:"text-[10px] text-fg-5",children:"—"})]})]})]},T.id))}),m&&o.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:[o.jsx(An,{className:"h-3.5 w-3.5 shrink-0 text-red-400"}),o.jsx("span",{className:"text-xs text-red-400",children:m})]})]})})}function F9({onStatusChange:e}){const[t,a]=S.useState(""),[s,l]=S.useState(""),[u,d]=S.useState(""),[f,m]=S.useState(""),[h,x]=S.useState(!1),[g,y]=S.useState(null),[T,N]=S.useState(!1),[v,A]=S.useState(null),[w,C]=S.useState(!1);S.useEffect(()=>{let W=!1;return(async()=>{const[j,K]=await Promise.all([qc().catch(()=>({})),th().catch(()=>null)]);if(W)return;const Z=j.cloud_master_url??"",se=j.cloud_worker_id||(K==null?void 0:K.defaultWorkerId)||"";a(Z),d(Z),l(se),m(j.cloud_worker_id??""),A(K)})(),()=>{W=!0}},[]);const U=((v==null?void 0:v.mode)??(u?"worker":"local"))==="worker",V=!U&&!!t.trim()&&!!s.trim(),L=t!==u||s!==f||V,z=async()=>{const W=t.replace(/\/+$/,"");if(!W)return;x(!0),y(null);const j=await KC(W);y(j?"ok":"fail"),x(!1)},X=async()=>{const W=t.replace(/\/+$/,""),j=s.trim();N(!0);try{await eh("cloud_master_url",W),await eh("cloud_worker_id",j),d(W),m(j),a(W),l(j);const K=await GC().catch(()=>null);K&&(A(K),e==null||e(K))}finally{N(!1)}};return o.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[o.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:o.jsx(QE,{className:"h-4 w-4"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("h2",{className:"text-sm font-semibold text-fg",children:"账号池配置"}),o.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"连接 claude-accounts-pool Master,共享多账号池。"})]})]}),o.jsxs("div",{className:"mt-4 space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-line bg-base px-3 py-2",children:[o.jsx("span",{className:oe("h-2 w-2 shrink-0 rounded-full",U?"bg-blue-500 shadow-sm shadow-blue-500/60":"bg-green-500 shadow-sm shadow-green-500/60")}),o.jsx("span",{className:"text-xs font-medium text-fg-3",children:U?"Worker 模式":"本地模式"}),U&&(v==null?void 0:v.workerId)&&o.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-4",children:v.workerId}),U&&(v==null?void 0:v.connected)!=null&&o.jsx("span",{className:oe("ml-auto text-[10px] font-medium",v.connected?"text-green-500":"text-red-400"),children:v.connected?"已连接":"未连接"})]}),U&&(v==null?void 0:v.heldAccount)&&o.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-line bg-base px-3 py-2",children:[o.jsx(ey,{className:"h-3.5 w-3.5 shrink-0 text-blue-500"}),o.jsx("span",{className:"text-xs text-fg-4",children:"当前账号"}),o.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg",children:v.heldAccount.label}),o.jsx("button",{type:"button",onClick:()=>C(!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:"切换账号"})]})]}),o.jsxs("div",{className:"mt-4 space-y-3",children:[o.jsxs("label",{className:"block",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Master URL"}),o.jsx("input",{type:"url",value:t,onChange:W=>{a(W.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"})]}),o.jsxs("label",{className:"block",children:[o.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Worker ID"}),o.jsx("input",{type:"text",value:s,onChange:W=>l(W.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"}),o.jsx("span",{className:"mt-1 block text-[11px] text-fg-5",children:"此 Worker 在账号池中的唯一标识,建议用小写字母、数字和连字符。"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.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?o.jsx(va,{className:"h-3.5 w-3.5 fs-spin"}):o.jsx(Fs,{className:"h-3.5 w-3.5"}),"测试连接"]}),o.jsxs("button",{type:"button",onClick:()=>void X(),disabled:!L||T,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:[o.jsx(Fc,{className:"h-3.5 w-3.5"}),T?"保存中…":"保存"]}),g==="ok"&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-green-500",children:[o.jsx(oa,{className:"h-3.5 w-3.5"})," 连接成功"]}),g==="fail"&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-red-400",children:[o.jsx(An,{className:"h-3.5 w-3.5"})," 连接失败"]})]})]}),o.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"清空 Master URL 可切回本地模式。"}),w&&o.jsx(H9,{onClose:()=>C(!1),onSwitched:async()=>{const W=await th().catch(()=>null);W&&(A(W),e==null||e(W))}})]})}function z9(){const[e,t]=S.useState("usage"),a=S.useMemo(()=>sy()||Jm()?[...pE,T9]:pE,[]);return o.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:o.jsxs("div",{className:"mx-auto max-w-2xl",children:[o.jsx("h1",{className:"text-lg font-semibold text-fg",children:"设置"}),o.jsx("p",{className:"mt-0.5 text-sm text-fg-4",children:"全局配置"}),o.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(s=>o.jsxs("button",{type:"button",onClick:()=>t(s.id),className:oe("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===s.id?"bg-base text-fg shadow-sm":"text-fg-4 hover:text-fg-3"),children:[o.jsx(s.icon,{className:"h-3.5 w-3.5"}),s.label]},s.id))}),o.jsxs("div",{className:"mt-4",children:[e==="usage"&&o.jsx(U9,{}),e==="git"&&o.jsx(w9,{}),e==="models"&&o.jsx(I9,{}),e==="custom-agents"&&o.jsx(B9,{}),e==="agents"&&o.jsx(C9,{}),e==="server"&&o.jsx(P9,{})]})]})})}const q9=300,Y9=4e3,$9={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 G9(){const e=Ft(h=>h.toasts),t=Ft(h=>h.removeToast),a=Ie(h=>h.setActiveSession),s=He(ja),l=Aa(),u=h=>{t(h.id),h.sessionId&&(a(h.sessionId),l(`/${encodeURIComponent(s)}/run`))},[d,f]=S.useState([]),m=S.useRef(new Map);return S.useEffect(()=>{const h=new Set(e.map(x=>x.id));f(x=>{let g=x.map(y=>h.has(y.id)||y.exiting?y:{...y,exiting:!0});for(const y of e)g.some(T=>T.id===y.id)||(g=[...g,{...y}]);return g})},[e]),S.useEffect(()=>{const h=m.current;for(const x of d)x.exiting&&!h.has(x.id)&&h.set(x.id,setTimeout(()=>{h.delete(x.id),f(g=>g.filter(y=>y.id!==x.id))},q9))},[d]),S.useEffect(()=>{const h=m.current;return()=>h.forEach(clearTimeout)},[]),d.length===0?null:o.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:d.map(h=>{const x=$9[h.variant];return o.jsx("div",{className:"grid w-full transition-[grid-template-rows] duration-300 ease-out",style:{gridTemplateRows:h.exiting?"0fr":"1fr"},children:o.jsx("div",{className:"min-h-0 overflow-hidden",children:o.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:[o.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 ${x.badge}`,children:x.icon}),o.jsx("p",{className:"min-w-0 flex-1 text-sm leading-snug break-words text-fg",children:h.message}),h.persistent&&!h.exiting&&o.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&&o.jsx("span",{"aria-hidden":!0,className:`absolute bottom-0 left-0 h-0.5 w-full origin-left ${x.bar}`,style:{animation:`toast-progress ${Y9}ms linear forwards`}})]})})},h.id)})})}/*! Capacitor: https://capacitorjs.com/ - MIT License */var zi;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(zi||(zi={}));class Gm extends Error{constructor(t,a,s){super(t),this.message=t,this.code=a,this.data=s}}const K9=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"},V9=e=>{const t=e.CapacitorCustomPlatform||null,a=e.Capacitor||{},s=a.Plugins=a.Plugins||{},l=()=>t!==null?t.name:K9(e),u=()=>l()!=="web",d=g=>{const y=h.get(g);return!!(y!=null&&y.platforms.has(l())||f(g))},f=g=>{var y;return(y=a.PluginHeaders)===null||y===void 0?void 0:y.find(T=>T.name===g)},m=g=>e.console.error(g),h=new Map,x=(g,y={})=>{const T=h.get(g);if(T)return console.warn(`Capacitor plugin "${g}" already registered. Cannot register plugins twice.`),T.proxy;const N=l(),v=f(g);let A;const w=async()=>(!A&&N in y?A=typeof y[N]=="function"?A=await y[N]():A=y[N]:t!==null&&!A&&"web"in y&&(A=typeof y.web=="function"?A=await y.web():A=y.web),A),C=(X,W)=>{var j,K;if(v){const Z=v==null?void 0:v.methods.find(se=>W===se.name);if(Z)return Z.rtype==="promise"?se=>a.nativePromise(g,W.toString(),se):(se,le)=>a.nativeCallback(g,W.toString(),se,le);if(X)return(j=X[W])===null||j===void 0?void 0:j.bind(X)}else{if(X)return(K=X[W])===null||K===void 0?void 0:K.bind(X);throw new Gm(`"${g}" plugin is not implemented on ${N}`,zi.Unimplemented)}},R=X=>{let W;const j=(...K)=>{const Z=w().then(se=>{const le=C(se,X);if(le){const ae=le(...K);return W=ae==null?void 0:ae.remove,ae}else throw new Gm(`"${g}.${X}()" is not implemented on ${N}`,zi.Unimplemented)});return X==="addListener"&&(Z.remove=async()=>W()),Z};return j.toString=()=>`${X.toString()}() { [capacitor code] }`,Object.defineProperty(j,"name",{value:X,writable:!1,configurable:!1}),j},U=R("addListener"),V=R("removeListener"),L=(X,W)=>{const j=U({eventName:X},W),K=async()=>{const se=await j;V({eventName:X,callbackId:se},W)},Z=new Promise(se=>j.then(()=>se({remove:K})));return Z.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await K()},Z},z=new Proxy({},{get(X,W){switch(W){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return v?L:U;case"removeListener":return V;default:return R(W)}}});return s[g]=z,h.set(g,{name:g,proxy:z,platforms:new Set([...Object.keys(y),...v?[N]:[]])}),z};return a.convertFileSrc||(a.convertFileSrc=g=>g),a.getPlatform=l,a.handleError=m,a.isNativePlatform=u,a.isPluginAvailable=d,a.registerPlugin=x,a.Exception=Gm,a.DEBUG=!!a.DEBUG,a.isLoggingEnabled=!!a.isLoggingEnabled,a},Q9=e=>e.Capacitor=V9(e),vh=Q9(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),td=vh.registerPlugin;class f0{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(t,a){let s=!1;this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(a);const u=this.windowListeners[t];u&&!u.registered&&this.addWindowListener(u),s&&this.sendRetainedArgumentsForEvent(t);const d=async()=>this.removeListener(t,a);return Promise.resolve({remove:d})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,a,s){const l=this.listeners[t];if(!l){if(s){let u=this.retainedEventArguments[t];u||(u=[]),u.push(a),this.retainedEventArguments[t]=u}return}l.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:s=>{this.notifyListeners(a,s)}}}unimplemented(t="not implemented"){return new vh.Exception(t,zi.Unimplemented)}unavailable(t="not available"){return new vh.Exception(t,zi.Unavailable)}async removeListener(t,a){const s=this.listeners[t];if(!s)return;const l=s.indexOf(a);this.listeners[t].splice(l,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(s=>{this.notifyListeners(t,s)}))}}const xE=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),EE=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class X9 extends f0{async getCookies(){const t=document.cookie,a={};return t.split(";").forEach(s=>{if(s.length<=0)return;let[l,u]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");l=EE(l).trim(),u=EE(u).trim(),a[l]=u}),a}async setCookie(t){try{const a=xE(t.key),s=xE(t.value),l=t.expires?`; expires=${t.expires.replace("expires=","")}`:"",u=(t.path||"/").replace("path=",""),d=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${a}=${s||""}${l}; path=${u}; ${d};`}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)}}}td("CapacitorCookies",{web:()=>new X9});const W9=async e=>new Promise((t,a)=>{const s=new FileReader;s.onload=()=>{const l=s.result;t(l.indexOf(",")>=0?l.split(",")[1]:l)},s.onerror=l=>a(l),s.readAsDataURL(e)}),Z9=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(l=>l.toLocaleLowerCase()).reduce((l,u,d)=>(l[u]=e[t[d]],l),{})},J9=(e,t=!0)=>e?Object.entries(e).reduce((s,l)=>{const[u,d]=l;let f,m;return Array.isArray(d)?(m="",d.forEach(h=>{f=t?encodeURIComponent(h):h,m+=`${u}=${f}&`}),m.slice(0,-1)):(f=t?encodeURIComponent(d):d,m=`${u}=${f}`),`${s}&${m}`},"").substr(1):null,eB=(e,t={})=>{const a=Object.assign({method:e.method||"GET",headers:e.headers},t),l=Z9(e.headers)["content-type"]||"";if(typeof e.data=="string")a.body=e.data;else if(l.includes("application/x-www-form-urlencoded")){const u=new URLSearchParams;for(const[d,f]of Object.entries(e.data||{}))u.set(d,f);a.body=u.toString()}else if(l.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 d=new Headers(a.headers);d.delete("content-type"),a.headers=d}else(l.includes("application/json")||typeof e.data=="object")&&(a.body=JSON.stringify(e.data));return a};class tB extends f0{async request(t){const a=eB(t,t.webFetchExtra),s=J9(t.params,t.shouldEncodeUrlParams),l=s?`${t.url}?${s}`:t.url,u=await fetch(l,a),d=u.headers.get("content-type")||"";let{responseType:f="text"}=u.ok?t:{};d.includes("application/json")&&(f="json");let m,h;switch(f){case"arraybuffer":case"blob":h=await u.blob(),m=await W9(h);break;case"json":m=await u.json();break;case"document":case"text":default:m=await u.text()}const x={};return u.headers.forEach((g,y)=>{x[y]=g}),{data:m,headers:x,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"}))}}td("CapacitorHttp",{web:()=>new tB});var yE;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(yE||(yE={}));var TE;(function(e){e.StatusBar="StatusBar",e.NavigationBar="NavigationBar"})(TE||(TE={}));class nB extends f0{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")}}td("SystemBars",{web:()=>new nB});const eo=td("PushNotifications",{});let _E=!1;async function aB(e){!sy()||_E||(_E=!0,(await eo.requestPermissions()).receive!=="granted")||(eo.addListener("registration",async a=>{try{await WC(a.value,"ios")}catch{}}),eo.addListener("registrationError",()=>{}),eo.addListener("pushNotificationActionPerformed",a=>{const s=a.notification.data,l=s==null?void 0:s.sessionId;if(l){const u=ja(He.getState());u&&e(`/${encodeURIComponent(u)}/run?session=${l}`)}}),await eo.register())}function rB(e){const t=e.match(/^\/([^/]+)\/(run|issues|pulls)/);return t?decodeURIComponent(t[1]):null}function sB(){const e=He(s=>s.repos),a=He(ja)??(e.length>0?e[0].name:null);return a?o.jsx(Vm,{to:`/${encodeURIComponent(a)}/run`,replace:!0}):o.jsx(Vm,{to:"/repos",replace:!0})}function iB(){const e=Aa(),t=ca(),a=He(f=>f.activeRepoId),s=He(f=>f.repos),l=He(f=>f.setActiveRepo),u=Ie(f=>f.loadSessions),d=Ie(f=>f.clearSessions);return S.useEffect(()=>(He.getState().loadRepos(),aB(e),Zm.getState().init()),[e]),S.useEffect(()=>{if(s.length===0)return;const f=rB(t.pathname);if(!f)return;const m=s.find(h=>h.name===f);m&&m.id!==He.getState().activeRepoId&&l(m.id)},[t.pathname,s,l]),S.useEffect(()=>(a?(d(),Ge.getState().clearIssues(),Vn.getState().clearPulls(),u(),ji.getState().loadAgents(),Ge.getState().loadIssues(),Vn.getState().loadPulls(),Cc.start(a)):(d(),Ge.getState().clearIssues(),Vn.getState().clearPulls()),()=>Cc.stop()),[a,u,d]),o.jsxs(o.Fragment,{children:[o.jsx(aS,{children:o.jsxs(vr,{element:o.jsx(aw,{}),children:[o.jsx(vr,{path:"/repos",element:o.jsx(ow,{})}),o.jsx(vr,{path:"/settings",element:o.jsx(z9,{})}),o.jsx(vr,{path:"/:repoId/run",element:o.jsx(KD,{})}),o.jsx(vr,{path:"/:repoId/issues",element:o.jsx(m9,{})}),o.jsx(vr,{path:"/:repoId/pulls",element:o.jsx(E9,{})}),o.jsx(vr,{path:"/:repoId",element:o.jsx(Vm,{to:"run",replace:!0})}),o.jsx(vr,{path:"*",element:o.jsx(sB,{})})]})}),o.jsx(G9,{})]})}function lB(){return o.jsx(wS,{children:o.jsx(iB,{})})}const F_=document.getElementById("root");if(!F_)throw new Error("Root element #root not found in index.html");tv.createRoot(F_).render(o.jsx(S.StrictMode,{children:o.jsx(lB,{})}));