@coralai/sps-cli 0.49.8 → 0.49.10

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,509 @@
1
+ var PN=Object.defineProperty;var hv=e=>{throw TypeError(e)};var qN=(e,t,n)=>t in e?PN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var mv=(e,t,n)=>qN(e,typeof t!="symbol"?t+"":t,n),im=(e,t,n)=>t.has(e)||hv("Cannot "+n);var z=(e,t,n)=>(im(e,t,"read from private field"),n?n.call(e):t.get(e)),we=(e,t,n)=>t.has(e)?hv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ge=(e,t,n,a)=>(im(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),Ue=(e,t,n)=>(im(e,t,"access private method"),n);var Pu=(e,t,n,a)=>({set _(s){ge(e,t,s,n)},get _(){return z(e,t,a)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function kp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var am={exports:{}},Po={};/**
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 pv;function HN(){if(pv)return Po;pv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var f in s)f!=="key"&&(o[f]=s[f])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return Po.Fragment=t,Po.jsx=n,Po.jsxs=n,Po}var gv;function KN(){return gv||(gv=1,am.exports=HN()),am.exports}var m=KN(),rm={exports:{}},De={};/**
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 bv;function GN(){if(bv)return De;bv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function v(L){return L===null||typeof L!="object"?null:(L=x&&L[x]||L["@@iterator"],typeof L=="function"?L:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,N={};function w(L,te,T){this.props=L,this.context=te,this.refs=N,this.updater=T||S}w.prototype.isReactComponent={},w.prototype.setState=function(L,te){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,te,"setState")},w.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function R(){}R.prototype=w.prototype;function A(L,te,T){this.props=L,this.context=te,this.refs=N,this.updater=T||S}var D=A.prototype=new R;D.constructor=A,_(D,w.prototype),D.isPureReactComponent=!0;var F=Array.isArray;function M(){}var q={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function J(L,te,T){var he=T.ref;return{$$typeof:e,type:L,key:te,ref:he!==void 0?he:null,props:T}}function C(L,te){return J(L.type,te,L.props)}function P(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function Y(L){var te={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(T){return te[T]})}var le=/\/+/g;function H(L,te){return typeof L=="object"&&L!==null&&L.key!=null?Y(""+L.key):te.toString(36)}function Q(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(M,M):(L.status="pending",L.then(function(te){L.status==="pending"&&(L.status="fulfilled",L.value=te)},function(te){L.status==="pending"&&(L.status="rejected",L.reason=te)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function G(L,te,T,he,Ne){var ve=typeof L;(ve==="undefined"||ve==="boolean")&&(L=null);var Fe=!1;if(L===null)Fe=!0;else switch(ve){case"bigint":case"string":case"number":Fe=!0;break;case"object":switch(L.$$typeof){case e:case t:Fe=!0;break;case y:return Fe=L._init,G(Fe(L._payload),te,T,he,Ne)}}if(Fe)return Ne=Ne(L),Fe=he===""?"."+H(L,0):he,F(Ne)?(T="",Fe!=null&&(T=Fe.replace(le,"$&/")+"/"),G(Ne,te,T,"",function(Wt){return Wt})):Ne!=null&&(P(Ne)&&(Ne=C(Ne,T+(Ne.key==null||L&&L.key===Ne.key?"":(""+Ne.key).replace(le,"$&/")+"/")+Fe)),te.push(Ne)),1;Fe=0;var st=he===""?".":he+":";if(F(L))for(var it=0;it<L.length;it++)he=L[it],ve=st+H(he,it),Fe+=G(he,te,T,ve,Ne);else if(it=v(L),typeof it=="function")for(L=it.call(L),it=0;!(he=L.next()).done;)he=he.value,ve=st+H(he,it++),Fe+=G(he,te,T,ve,Ne);else if(ve==="object"){if(typeof L.then=="function")return G(Q(L),te,T,he,Ne);throw te=String(L),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return Fe}function oe(L,te,T){if(L==null)return L;var he=[],Ne=0;return G(L,he,"","",function(ve){return te.call(T,ve,Ne++)}),he}function Z(L){if(L._status===-1){var te=L._result;te=te(),te.then(function(T){(L._status===0||L._status===-1)&&(L._status=1,L._result=T)},function(T){(L._status===0||L._status===-1)&&(L._status=2,L._result=T)}),L._status===-1&&(L._status=0,L._result=te)}if(L._status===1)return L._result.default;throw L._result}var pe=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},O={map:oe,forEach:function(L,te,T){oe(L,function(){te.apply(this,arguments)},T)},count:function(L){var te=0;return oe(L,function(){te++}),te},toArray:function(L){return oe(L,function(te){return te})||[]},only:function(L){if(!P(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return De.Activity=g,De.Children=O,De.Component=w,De.Fragment=n,De.Profiler=s,De.PureComponent=A,De.StrictMode=a,De.Suspense=d,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,De.__COMPILER_RUNTIME={__proto__:null,c:function(L){return q.H.useMemoCache(L)}},De.cache=function(L){return function(){return L.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(L,te,T){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var he=_({},L.props),Ne=L.key;if(te!=null)for(ve in te.key!==void 0&&(Ne=""+te.key),te)!U.call(te,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&te.ref===void 0||(he[ve]=te[ve]);var ve=arguments.length-2;if(ve===1)he.children=T;else if(1<ve){for(var Fe=Array(ve),st=0;st<ve;st++)Fe[st]=arguments[st+2];he.children=Fe}return J(L.type,Ne,he)},De.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},De.createElement=function(L,te,T){var he,Ne={},ve=null;if(te!=null)for(he in te.key!==void 0&&(ve=""+te.key),te)U.call(te,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(Ne[he]=te[he]);var Fe=arguments.length-2;if(Fe===1)Ne.children=T;else if(1<Fe){for(var st=Array(Fe),it=0;it<Fe;it++)st[it]=arguments[it+2];Ne.children=st}if(L&&L.defaultProps)for(he in Fe=L.defaultProps,Fe)Ne[he]===void 0&&(Ne[he]=Fe[he]);return J(L,ve,Ne)},De.createRef=function(){return{current:null}},De.forwardRef=function(L){return{$$typeof:f,render:L}},De.isValidElement=P,De.lazy=function(L){return{$$typeof:y,_payload:{_status:-1,_result:L},_init:Z}},De.memo=function(L,te){return{$$typeof:h,type:L,compare:te===void 0?null:te}},De.startTransition=function(L){var te=q.T,T={};q.T=T;try{var he=L(),Ne=q.S;Ne!==null&&Ne(T,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(M,pe)}catch(ve){pe(ve)}finally{te!==null&&T.types!==null&&(te.types=T.types),q.T=te}},De.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},De.use=function(L){return q.H.use(L)},De.useActionState=function(L,te,T){return q.H.useActionState(L,te,T)},De.useCallback=function(L,te){return q.H.useCallback(L,te)},De.useContext=function(L){return q.H.useContext(L)},De.useDebugValue=function(){},De.useDeferredValue=function(L,te){return q.H.useDeferredValue(L,te)},De.useEffect=function(L,te){return q.H.useEffect(L,te)},De.useEffectEvent=function(L){return q.H.useEffectEvent(L)},De.useId=function(){return q.H.useId()},De.useImperativeHandle=function(L,te,T){return q.H.useImperativeHandle(L,te,T)},De.useInsertionEffect=function(L,te){return q.H.useInsertionEffect(L,te)},De.useLayoutEffect=function(L,te){return q.H.useLayoutEffect(L,te)},De.useMemo=function(L,te){return q.H.useMemo(L,te)},De.useOptimistic=function(L,te){return q.H.useOptimistic(L,te)},De.useReducer=function(L,te,T){return q.H.useReducer(L,te,T)},De.useRef=function(L){return q.H.useRef(L)},De.useState=function(L){return q.H.useState(L)},De.useSyncExternalStore=function(L,te,T){return q.H.useSyncExternalStore(L,te,T)},De.useTransition=function(){return q.H.useTransition()},De.version="19.2.5",De}var yv;function Tp(){return yv||(yv=1,rm.exports=GN()),rm.exports}var j=Tp(),sm={exports:{}},qo={},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 xv;function QN(){return xv||(xv=1,(function(e){function t(G,oe){var Z=G.length;G.push(oe);e:for(;0<Z;){var pe=Z-1>>>1,O=G[pe];if(0<s(O,oe))G[pe]=oe,G[Z]=O,Z=pe;else break e}}function n(G){return G.length===0?null:G[0]}function a(G){if(G.length===0)return null;var oe=G[0],Z=G.pop();if(Z!==oe){G[0]=Z;e:for(var pe=0,O=G.length,L=O>>>1;pe<L;){var te=2*(pe+1)-1,T=G[te],he=te+1,Ne=G[he];if(0>s(T,Z))he<O&&0>s(Ne,T)?(G[pe]=Ne,G[he]=Z,pe=he):(G[pe]=T,G[te]=Z,pe=te);else if(he<O&&0>s(Ne,Z))G[pe]=Ne,G[he]=Z,pe=he;else break e}}return oe}function s(G,oe){var Z=G.sortIndex-oe.sortIndex;return Z!==0?Z:G.id-oe.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],y=1,g=null,x=3,v=!1,S=!1,_=!1,N=!1,w=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function D(G){for(var oe=n(h);oe!==null;){if(oe.callback===null)a(h);else if(oe.startTime<=G)a(h),oe.sortIndex=oe.expirationTime,t(d,oe);else break;oe=n(h)}}function F(G){if(_=!1,D(G),!S)if(n(d)!==null)S=!0,M||(M=!0,Y());else{var oe=n(h);oe!==null&&Q(F,oe.startTime-G)}}var M=!1,q=-1,U=5,J=-1;function C(){return N?!0:!(e.unstable_now()-J<U)}function P(){if(N=!1,M){var G=e.unstable_now();J=G;var oe=!0;try{e:{S=!1,_&&(_=!1,R(q),q=-1),v=!0;var Z=x;try{t:{for(D(G),g=n(d);g!==null&&!(g.expirationTime>G&&C());){var pe=g.callback;if(typeof pe=="function"){g.callback=null,x=g.priorityLevel;var O=pe(g.expirationTime<=G);if(G=e.unstable_now(),typeof O=="function"){g.callback=O,D(G),oe=!0;break t}g===n(d)&&a(d),D(G)}else a(d);g=n(d)}if(g!==null)oe=!0;else{var L=n(h);L!==null&&Q(F,L.startTime-G),oe=!1}}break e}finally{g=null,x=Z,v=!1}oe=void 0}}finally{oe?Y():M=!1}}}var Y;if(typeof A=="function")Y=function(){A(P)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,H=le.port2;le.port1.onmessage=P,Y=function(){H.postMessage(null)}}else Y=function(){w(P,0)};function Q(G,oe){q=w(function(){G(e.unstable_now())},oe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(G){switch(x){case 1:case 2:case 3:var oe=3;break;default:oe=x}var Z=x;x=oe;try{return G()}finally{x=Z}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(G,oe){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var Z=x;x=G;try{return oe()}finally{x=Z}},e.unstable_scheduleCallback=function(G,oe,Z){var pe=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?pe+Z:pe):Z=pe,G){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=Z+O,G={id:y++,callback:oe,priorityLevel:G,startTime:Z,expirationTime:O,sortIndex:-1},Z>pe?(G.sortIndex=Z,t(h,G),n(d)===null&&G===n(h)&&(_?(R(q),q=-1):_=!0,Q(F,Z-pe))):(G.sortIndex=O,t(d,G),S||v||(S=!0,M||(M=!0,Y()))),G},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(G){var oe=x;return function(){var Z=x;x=oe;try{return G.apply(this,arguments)}finally{x=Z}}}})(om)),om}var vv;function YN(){return vv||(vv=1,lm.exports=QN()),lm.exports}var cm={exports:{}},hn={};/**
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 Ev;function VN(){if(Ev)return hn;Ev=1;var e=Tp();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(d,h,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:h,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,hn.createPortal=function(d,h){var y=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 o(d,h,null,y)},hn.flushSync=function(d){var h=c.T,y=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=h,a.p=y,a.d.f()}},hn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(d,h))},hn.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},hn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?a.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:v}):y==="script"&&a.d.X(d,{crossOrigin:g,integrity:x,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},hn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=f(h.as,h.crossOrigin);a.d.M(d,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(d)},hn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin);a.d.L(d,y,{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})}},hn.preloadModule=function(d,h){if(typeof d=="string")if(h){var y=f(h.as,h.crossOrigin);a.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(d)},hn.requestFormReset=function(d){a.d.r(d)},hn.unstable_batchedUpdates=function(d,h){return d(h)},hn.useFormState=function(d,h,y){return c.H.useFormState(d,h,y)},hn.useFormStatus=function(){return c.H.useHostTransitionStatus()},hn.version="19.2.5",hn}var Sv;function XN(){if(Sv)return cm.exports;Sv=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(),cm.exports=VN(),cm.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 _v;function ZN(){if(_v)return qo;_v=1;var e=YN(),t=Tp(),n=XN();function a(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var r=i,l=i;if(i.alternate)for(;r.return;)r=r.return;else{i=r;do r=i,(r.flags&4098)!==0&&(l=r.return),i=r.return;while(i)}return r.tag===3?l:null}function c(i){if(i.tag===13){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function f(i){if(i.tag===31){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function d(i){if(o(i)!==i)throw Error(a(188))}function h(i){var r=i.alternate;if(!r){if(r=o(i),r===null)throw Error(a(188));return r!==i?null:i}for(var l=i,u=r;;){var p=l.return;if(p===null)break;var b=p.alternate;if(b===null){if(u=p.return,u!==null){l=u;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===l)return d(p),i;if(b===u)return d(p),r;b=b.sibling}throw Error(a(188))}if(l.return!==u.return)l=p,u=b;else{for(var E=!1,k=p.child;k;){if(k===l){E=!0,l=p,u=b;break}if(k===u){E=!0,u=p,l=b;break}k=k.sibling}if(!E){for(k=b.child;k;){if(k===l){E=!0,l=b,u=p;break}if(k===u){E=!0,u=b,l=p;break}k=k.sibling}if(!E)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?i:r}function y(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i;for(i=i.child;i!==null;){if(r=y(i),r!==null)return r;i=i.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),C=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function Y(i){return i===null||typeof i!="object"?null:(i=P&&i[P]||i["@@iterator"],typeof i=="function"?i:null)}var le=Symbol.for("react.client.reference");function H(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===le?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case _:return"Fragment";case w:return"Profiler";case N:return"StrictMode";case F:return"Suspense";case M:return"SuspenseList";case J:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case A:return i.displayName||"Context";case R:return(i._context.displayName||"Context")+".Consumer";case D:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case q:return r=i.displayName||null,r!==null?r:H(i.type)||"Memo";case U:r=i._payload,i=i._init;try{return H(i(r))}catch{}}return null}var Q=Array.isArray,G=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},pe=[],O=-1;function L(i){return{current:i}}function te(i){0>O||(i.current=pe[O],pe[O]=null,O--)}function T(i,r){O++,pe[O]=i.current,i.current=r}var he=L(null),Ne=L(null),ve=L(null),Fe=L(null);function st(i,r){switch(T(ve,r),T(Ne,i),T(he,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?Ix(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=Ix(r),i=zx(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}te(he),T(he,i)}function it(){te(he),te(Ne),te(ve)}function Wt(i){i.memoizedState!==null&&T(Fe,i);var r=he.current,l=zx(r,i.type);r!==l&&(T(Ne,i),T(he,l))}function Kn(i){Ne.current===i&&(te(he),te(Ne)),Fe.current===i&&(te(Fe),Bo._currentValue=Z)}var Ji,Ra;function Gn(i){if(Ji===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Ji=r&&r[1]||"",Ra=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Ji+i+Ra}var Ii=!1;function Xe(i,r){if(!i||Ii)return"";Ii=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(ee){var W=ee}Reflect.construct(i,[],se)}else{try{se.call()}catch(ee){W=ee}i.call(se.prototype)}}else{try{throw Error()}catch(ee){W=ee}(se=i())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(ee){if(ee&&W&&typeof ee.stack=="string")return[ee.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),E=b[0],k=b[1];if(E&&k){var I=E.split(`
44
+ `),X=k.split(`
45
+ `);for(p=u=0;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;for(;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;if(u===I.length||p===X.length)for(u=I.length-1,p=X.length-1;1<=u&&0<=p&&I[u]!==X[p];)p--;for(;1<=u&&0<=p;u--,p--)if(I[u]!==X[p]){if(u!==1||p!==1)do if(u--,p--,0>p||I[u]!==X[p]){var ie=`
46
+ `+I[u].replace(" at new "," at ");return i.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",i.displayName)),ie}while(1<=u&&0<=p);break}}}finally{Ii=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?Gn(l):""}function wi(i,r){switch(i.tag){case 26:case 27:case 5:return Gn(i.type);case 16:return Gn("Lazy");case 13:return i.child!==r&&r!==null?Gn("Suspense Fallback"):Gn("Suspense");case 19:return Gn("SuspenseList");case 0:case 15:return Xe(i.type,!1);case 11:return Xe(i.type.render,!1);case 1:return Xe(i.type,!0);case 31:return Gn("Activity");default:return""}}function li(i){try{var r="",l=null;do r+=wi(i,l),l=i,i=i.return;while(i);return r}catch(u){return`
47
+ Error generating stack: `+u.message+`
48
+ `+u.stack}}var zi=Object.prototype.hasOwnProperty,ea=e.unstable_scheduleCallback,kr=e.unstable_cancelCallback,Ql=e.unstable_shouldYield,ys=e.unstable_requestPaint,Ot=e.unstable_now,xs=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,fe=e.unstable_UserBlockingPriority,Ce=e.unstable_NormalPriority,Pe=e.unstable_LowPriority,et=e.unstable_IdlePriority,yn=e.log,Ni=e.unstable_setDisableYieldValue,an=null,Dt=null;function un(i){if(typeof yn=="function"&&Ni(i),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(an,i)}catch{}}var lt=Math.clz32?Math.clz32:kc,Bi=Math.log,xn=Math.LN2;function kc(i){return i>>>=0,i===0?32:31-(Bi(i)/xn|0)|0}var Tr=256,vs=262144,Cr=4194304;function Cn(i){var r=i&42;if(r!==0)return r;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function B(i,r,l){var u=i.pendingLanes;if(u===0)return 0;var p=0,b=i.suspendedLanes,E=i.pingedLanes;i=i.warmLanes;var k=u&134217727;return k!==0?(u=k&~b,u!==0?p=Cn(u):(E&=k,E!==0?p=Cn(E):l||(l=k&~i,l!==0&&(p=Cn(l))))):(k=u&~b,k!==0?p=Cn(k):E!==0?p=Cn(E):l||(l=u&~i,l!==0&&(p=Cn(l)))),p===0?0:r!==0&&r!==p&&(r&b)===0&&(b=p&-p,l=r&-r,b>=l||b===32&&(l&4194048)!==0)?r:p}function ae(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function me(i,r){switch(i){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 je(){var i=Cr;return Cr<<=1,(Cr&62914560)===0&&(Cr=4194304),i}function _t(i){for(var r=[],l=0;31>l;l++)r.push(i);return r}function bt(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function xe(i,r,l,u,p,b){var E=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var k=i.entanglements,I=i.expirationTimes,X=i.hiddenUpdates;for(l=E&~l;0<l;){var ie=31-lt(l),se=1<<ie;k[ie]=0,I[ie]=-1;var W=X[ie];if(W!==null)for(X[ie]=null,ie=0;ie<W.length;ie++){var ee=W[ie];ee!==null&&(ee.lane&=-536870913)}l&=~se}u!==0&&be(i,u,0),b!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=b&~(E&~r))}function be(i,r,l){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-lt(r);i.entangledLanes|=r,i.entanglements[u]=i.entanglements[u]|1073741824|l&261930}function Me(i,r){var l=i.entangledLanes|=r;for(i=i.entanglements;l;){var u=31-lt(l),p=1<<u;p&r|i[u]&r&&(i[u]|=r),l&=~p}}function Ut(i,r){var l=r&-r;return l=(l&42)!==0?1:kt(l),(l&(i.suspendedLanes|r))!==0?0:l}function kt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ta(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Es(){var i=oe.p;return i!==0?i:(i=window.event,i===void 0?32:sv(i.type))}function Ss(i,r){var l=oe.p;try{return oe.p=i,r()}finally{oe.p=l}}var Ui=Math.random().toString(36).slice(2),$t="__reactFiber$"+Ui,fn="__reactProps$"+Ui,Ma="__reactContainer$"+Ui,Yl="__reactEvents$"+Ui,Tc="__reactListeners$"+Ui,_s="__reactHandles$"+Ui,Cc="__reactResources$"+Ui,Ar="__reactMarker$"+Ui;function Vl(i){delete i[$t],delete i[fn],delete i[Yl],delete i[Tc],delete i[_s]}function vn(i){var r=i[$t];if(r)return r;for(var l=i.parentNode;l;){if(r=l[Ma]||l[$t]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(i=Hx(i);i!==null;){if(l=i[$t])return l;i=Hx(i)}return r}i=l,l=i.parentNode}return null}function na(i){if(i=i[$t]||i[Ma]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function ja(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(a(33))}function Da(i){var r=i[Cc];return r||(r=i[Cc]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Ht(i){i[Ar]=!0}var Ac=new Set,Or={};function ia(i,r){ce(i,r),ce(i+"Capture",r)}function ce(i,r){for(Or[i]=r,i=0;i<r.length;i++)Ac.add(r[i])}var _e=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]*$"),qe={},ot={};function Ft(i){return zi.call(ot,i)?!0:zi.call(qe,i)?!1:_e.test(i)?ot[i]=!0:(qe[i]=!0,!1)}function dn(i,r,l){if(Ft(r))if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":i.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){i.removeAttribute(r);return}}i.setAttribute(r,""+l)}}function Qn(i,r,l){if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(r);return}i.setAttribute(r,""+l)}}function An(i,r,l,u){if(u===null)i.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(r,l,""+u)}}function Et(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Yn(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Oc(i,r,l){var u=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,b=u.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return p.call(this)},set:function(E){l=""+E,b.call(this,E)}}),Object.defineProperty(i,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(E){l=""+E},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function ws(i){if(!i._valueTracker){var r=Yn(i)?"checked":"value";i._valueTracker=Oc(i,r,""+i[r])}}function Xl(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return i&&(u=Yn(i)?i.checked?"true":"false":i.value),i=u,i!==l?(r.setValue(i),!0):!1}function Ns(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var nd=/[\n"\\]/g;function On(i){return i.replace(nd,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Zl(i,r,l,u,p,b,E,k){i.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?i.type=E:i.removeAttribute("type"),r!=null?E==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+Et(r)):i.value!==""+Et(r)&&(i.value=""+Et(r)):E!=="submit"&&E!=="reset"||i.removeAttribute("value"),r!=null?ks(i,E,Et(r)):l!=null?ks(i,E,Et(l)):u!=null&&i.removeAttribute("value"),p==null&&b!=null&&(i.defaultChecked=!!b),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+Et(k):i.removeAttribute("name")}function Rr(i,r,l,u,p,b,E,k){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),r!=null||l!=null){if(!(b!=="submit"&&b!=="reset"||r!=null)){ws(i);return}l=l!=null?""+Et(l):"",r=r!=null?""+Et(r):l,k||r===i.value||(i.value=r),i.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,i.checked=k?i.checked:!!u,i.defaultChecked=!!u,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(i.name=E),ws(i)}function ks(i,r,l){r==="number"&&Ns(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function rn(i,r,l,u){if(i=i.options,r){r={};for(var p=0;p<l.length;p++)r["$"+l[p]]=!0;for(l=0;l<i.length;l++)p=r.hasOwnProperty("$"+i[l].value),i[l].selected!==p&&(i[l].selected=p),p&&u&&(i[l].defaultSelected=!0)}else{for(l=""+Et(l),r=null,p=0;p<i.length;p++){if(i[p].value===l){i[p].selected=!0,u&&(i[p].defaultSelected=!0);return}r!==null||i[p].disabled||(r=i[p])}r!==null&&(r.selected=!0)}}function Rc(i,r,l){if(r!=null&&(r=""+Et(r),r!==i.value&&(i.value=r),l==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=l!=null?""+Et(l):""}function Ts(i,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(Q(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=Et(r),i.defaultValue=l,u=i.textContent,u===l&&u!==""&&u!==null&&(i.value=u),ws(i)}function Oe(i,r){if(r){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=r;return}}i.textContent=r}var Mc=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 Kt(i,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?i.setProperty(r,""):r==="float"?i.cssFloat="":i[r]="":u?i.setProperty(r,l):typeof l!="number"||l===0||Mc.has(r)?r==="float"?i.cssFloat=l:i[r]=(""+l).trim():i[r]=l+"px"}function ct(i,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(i=i.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?i.setProperty(u,""):u==="float"?i.cssFloat="":i[u]="");for(var p in r)u=r[p],r.hasOwnProperty(p)&&l[p]!==u&&Kt(i,p,u)}else for(var b in r)r.hasOwnProperty(b)&&Kt(i,b,r[b])}function La(i){if(i.indexOf("-")===-1)return!1;switch(i){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 aa=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"]]),Wl=/^[\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 Ia(i){return Wl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function de(){}var Ee=null;function Ie(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Qe=null,Rt=null;function oi(i){var r=na(i);if(r&&(i=r.stateNode)){var l=i[fn]||null;e:switch(i=r.stateNode,r.type){case"input":if(Zl(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+On(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==i&&u.form===i.form){var p=u[fn]||null;if(!p)throw Error(a(90));Zl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===i.form&&Xl(u)}break e;case"textarea":Rc(i,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&rn(i,!!l.multiple,r,!1)}}}var Jl=!1;function jc(i,r,l){if(Jl)return i(r,l);Jl=!0;try{var u=i(r);return u}finally{if(Jl=!1,(Qe!==null||Rt!==null)&&(vu(),Qe&&(r=Qe,i=Rt,Rt=Qe=null,oi(r),i)))for(r=0;r<i.length;r++)oi(i[r])}}function eo(i,r){var l=i.stateNode;if(l===null)return null;var u=l[fn]||null;if(u===null)return null;l=u[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":(u=!u.disabled)||(i=i.type,u=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!u;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var ra=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),id=!1;if(ra)try{var to={};Object.defineProperty(to,"passive",{get:function(){id=!0}}),window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{id=!1}var za=null,ad=null,Dc=null;function zg(){if(Dc)return Dc;var i,r=ad,l=r.length,u,p="value"in za?za.value:za.textContent,b=p.length;for(i=0;i<l&&r[i]===p[i];i++);var E=l-i;for(u=1;u<=E&&r[l-u]===p[b-u];u++);return Dc=p.slice(i,1<u?1-u:void 0)}function Lc(i){var r=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&r===13&&(i=13)):i=r,i===10&&(i=13),32<=i||i===13?i:0}function Ic(){return!0}function Bg(){return!1}function Rn(i){function r(l,u,p,b,E){this._reactName=l,this._targetInst=p,this.type=u,this.nativeEvent=b,this.target=E,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(l=i[k],this[k]=l?l(b):b[k]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Ic:Bg,this.isPropagationStopped=Bg,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ic)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ic)},persist:function(){},isPersistent:Ic}),r}var Mr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zc=Rn(Mr),no=g({},Mr,{view:0,detail:0}),$_=Rn(no),rd,sd,io,Bc=g({},no,{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(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==io&&(io&&i.type==="mousemove"?(rd=i.screenX-io.screenX,sd=i.screenY-io.screenY):sd=rd=0,io=i),rd)},movementY:function(i){return"movementY"in i?i.movementY:sd}}),Ug=Rn(Bc),F_=g({},Bc,{dataTransfer:0}),P_=Rn(F_),q_=g({},no,{relatedTarget:0}),ld=Rn(q_),H_=g({},Mr,{animationName:0,elapsedTime:0,pseudoElement:0}),K_=Rn(H_),G_=g({},Mr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Q_=Rn(G_),Y_=g({},Mr,{data:0}),$g=Rn(Y_),V_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},X_={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"},Z_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W_(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=Z_[i])?!!r[i]:!1}function od(){return W_}var J_=g({},no,{key:function(i){if(i.key){var r=V_[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=Lc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?X_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:od,charCode:function(i){return i.type==="keypress"?Lc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Lc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),ew=Rn(J_),tw=g({},Bc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fg=Rn(tw),nw=g({},no,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:od}),iw=Rn(nw),aw=g({},Mr,{propertyName:0,elapsedTime:0,pseudoElement:0}),rw=Rn(aw),sw=g({},Bc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),lw=Rn(sw),ow=g({},Mr,{newState:0,oldState:0}),cw=Rn(ow),uw=[9,13,27,32],cd=ra&&"CompositionEvent"in window,ao=null;ra&&"documentMode"in document&&(ao=document.documentMode);var fw=ra&&"TextEvent"in window&&!ao,Pg=ra&&(!cd||ao&&8<ao&&11>=ao),qg=" ",Hg=!1;function Kg(i,r){switch(i){case"keyup":return uw.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gg(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Cs=!1;function dw(i,r){switch(i){case"compositionend":return Gg(r);case"keypress":return r.which!==32?null:(Hg=!0,qg);case"textInput":return i=r.data,i===qg&&Hg?null:i;default:return null}}function hw(i,r){if(Cs)return i==="compositionend"||!cd&&Kg(i,r)?(i=zg(),Dc=ad=za=null,Cs=!1,i):null;switch(i){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 Pg&&r.locale!=="ko"?null:r.data;default:return null}}var mw={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 Qg(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!mw[i.type]:r==="textarea"}function Yg(i,r,l,u){Qe?Rt?Rt.push(u):Rt=[u]:Qe=u,r=Tu(r,"onChange"),0<r.length&&(l=new zc("onChange","change",null,l,u),i.push({event:l,listeners:r}))}var ro=null,so=null;function pw(i){Ox(i,0)}function Uc(i){var r=ja(i);if(Xl(r))return i}function Vg(i,r){if(i==="change")return r}var Xg=!1;if(ra){var ud;if(ra){var fd="oninput"in document;if(!fd){var Zg=document.createElement("div");Zg.setAttribute("oninput","return;"),fd=typeof Zg.oninput=="function"}ud=fd}else ud=!1;Xg=ud&&(!document.documentMode||9<document.documentMode)}function Wg(){ro&&(ro.detachEvent("onpropertychange",Jg),so=ro=null)}function Jg(i){if(i.propertyName==="value"&&Uc(so)){var r=[];Yg(r,so,i,Ie(i)),jc(pw,r)}}function gw(i,r,l){i==="focusin"?(Wg(),ro=r,so=l,ro.attachEvent("onpropertychange",Jg)):i==="focusout"&&Wg()}function bw(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Uc(so)}function yw(i,r){if(i==="click")return Uc(r)}function xw(i,r){if(i==="input"||i==="change")return Uc(r)}function vw(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Vn=typeof Object.is=="function"?Object.is:vw;function lo(i,r){if(Vn(i,r))return!0;if(typeof i!="object"||i===null||typeof r!="object"||r===null)return!1;var l=Object.keys(i),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var p=l[u];if(!zi.call(r,p)||!Vn(i[p],r[p]))return!1}return!0}function eb(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function tb(i,r){var l=eb(i);i=0;for(var u;l;){if(l.nodeType===3){if(u=i+l.textContent.length,i<=r&&u>=r)return{node:l,offset:r-i};i=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=eb(l)}}function nb(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?nb(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function ib(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=Ns(i.document);r instanceof i.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)i=r.contentWindow;else break;r=Ns(i.document)}return r}function dd(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r&&(r==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||r==="textarea"||i.contentEditable==="true")}var Ew=ra&&"documentMode"in document&&11>=document.documentMode,As=null,hd=null,oo=null,md=!1;function ab(i,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;md||As==null||As!==Ns(u)||(u=As,"selectionStart"in u&&dd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),oo&&lo(oo,u)||(oo=u,u=Tu(hd,"onSelect"),0<u.length&&(r=new zc("onSelect","select",null,r,l),i.push({event:r,listeners:u}),r.target=As)))}function jr(i,r){var l={};return l[i.toLowerCase()]=r.toLowerCase(),l["Webkit"+i]="webkit"+r,l["Moz"+i]="moz"+r,l}var Os={animationend:jr("Animation","AnimationEnd"),animationiteration:jr("Animation","AnimationIteration"),animationstart:jr("Animation","AnimationStart"),transitionrun:jr("Transition","TransitionRun"),transitionstart:jr("Transition","TransitionStart"),transitioncancel:jr("Transition","TransitionCancel"),transitionend:jr("Transition","TransitionEnd")},pd={},rb={};ra&&(rb=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function Dr(i){if(pd[i])return pd[i];if(!Os[i])return i;var r=Os[i],l;for(l in r)if(r.hasOwnProperty(l)&&l in rb)return pd[i]=r[l];return i}var sb=Dr("animationend"),lb=Dr("animationiteration"),ob=Dr("animationstart"),Sw=Dr("transitionrun"),_w=Dr("transitionstart"),ww=Dr("transitioncancel"),cb=Dr("transitionend"),ub=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 ki(i,r){ub.set(i,r),ia(r,[i])}var $c=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=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(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},ci=[],Rs=0,bd=0;function Fc(){for(var i=Rs,r=bd=Rs=0;r<i;){var l=ci[r];ci[r++]=null;var u=ci[r];ci[r++]=null;var p=ci[r];ci[r++]=null;var b=ci[r];if(ci[r++]=null,u!==null&&p!==null){var E=u.pending;E===null?p.next=p:(p.next=E.next,E.next=p),u.pending=p}b!==0&&fb(l,p,b)}}function Pc(i,r,l,u){ci[Rs++]=i,ci[Rs++]=r,ci[Rs++]=l,ci[Rs++]=u,bd|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function yd(i,r,l,u){return Pc(i,r,l,u),qc(i)}function Lr(i,r){return Pc(i,null,null,r),qc(i)}function fb(i,r,l){i.lanes|=l;var u=i.alternate;u!==null&&(u.lanes|=l);for(var p=!1,b=i.return;b!==null;)b.childLanes|=l,u=b.alternate,u!==null&&(u.childLanes|=l),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(p=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,p&&r!==null&&(p=31-lt(l),i=b.hiddenUpdates,u=i[p],u===null?i[p]=[r]:u.push(r),r.lane=l|536870912),b):null}function qc(i){if(50<Ro)throw Ro=0,Th=null,Error(a(185));for(var r=i.return;r!==null;)i=r,r=i.return;return i.tag===3?i.stateNode:null}var Ms={};function Nw(i,r,l,u){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xn(i,r,l,u){return new Nw(i,r,l,u)}function xd(i){return i=i.prototype,!(!i||!i.isReactComponent)}function sa(i,r){var l=i.alternate;return l===null?(l=Xn(i.tag,r,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=r,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&65011712,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,r=i.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l.refCleanup=i.refCleanup,l}function db(i,r){i.flags&=65011714;var l=i.alternate;return l===null?(i.childLanes=0,i.lanes=r,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,r=l.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),i}function Hc(i,r,l,u,p,b){var E=0;if(u=i,typeof i=="function")xd(i)&&(E=1);else if(typeof i=="string")E=ON(i,l,he.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case J:return i=Xn(31,l,r,p),i.elementType=J,i.lanes=b,i;case _:return Ir(l.children,p,b,r);case N:E=8,p|=24;break;case w:return i=Xn(12,l,r,p|2),i.elementType=w,i.lanes=b,i;case F:return i=Xn(13,l,r,p),i.elementType=F,i.lanes=b,i;case M:return i=Xn(19,l,r,p),i.elementType=M,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case A:E=10;break e;case R:E=9;break e;case D:E=11;break e;case q:E=14;break e;case U:E=16,u=null;break e}E=29,l=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Xn(E,l,r,p),r.elementType=i,r.type=u,r.lanes=b,r}function Ir(i,r,l,u){return i=Xn(7,i,u,r),i.lanes=l,i}function vd(i,r,l){return i=Xn(6,i,null,r),i.lanes=l,i}function hb(i){var r=Xn(18,null,null,0);return r.stateNode=i,r}function Ed(i,r,l){return r=Xn(4,i.children!==null?i.children:[],i.key,r),r.lanes=l,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var mb=new WeakMap;function ui(i,r){if(typeof i=="object"&&i!==null){var l=mb.get(i);return l!==void 0?l:(r={value:i,source:r,stack:li(r)},mb.set(i,r),r)}return{value:i,source:r,stack:li(r)}}var js=[],Ds=0,Kc=null,co=0,fi=[],di=0,Ba=null,$i=1,Fi="";function la(i,r){js[Ds++]=co,js[Ds++]=Kc,Kc=i,co=r}function pb(i,r,l){fi[di++]=$i,fi[di++]=Fi,fi[di++]=Ba,Ba=i;var u=$i;i=Fi;var p=32-lt(u)-1;u&=~(1<<p),l+=1;var b=32-lt(r)+p;if(30<b){var E=p-p%5;b=(u&(1<<E)-1).toString(32),u>>=E,p-=E,$i=1<<32-lt(r)+p|l<<p|u,Fi=b+i}else $i=1<<b|l<<p|u,Fi=i}function Sd(i){i.return!==null&&(la(i,1),pb(i,1,0))}function _d(i){for(;i===Kc;)Kc=js[--Ds],js[Ds]=null,co=js[--Ds],js[Ds]=null;for(;i===Ba;)Ba=fi[--di],fi[di]=null,Fi=fi[--di],fi[di]=null,$i=fi[--di],fi[di]=null}function gb(i,r){fi[di++]=$i,fi[di++]=Fi,fi[di++]=Ba,$i=r.id,Fi=r.overflow,Ba=i}var sn=null,wt=null,Ze=!1,Ua=null,hi=!1,wd=Error(a(519));function $a(i){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw uo(ui(r,i)),wd}function bb(i){var r=i.stateNode,l=i.type,u=i.memoizedProps;switch(r[$t]=i,r[fn]=u,l){case"dialog":Ke("cancel",r),Ke("close",r);break;case"iframe":case"object":case"embed":Ke("load",r);break;case"video":case"audio":for(l=0;l<jo.length;l++)Ke(jo[l],r);break;case"source":Ke("error",r);break;case"img":case"image":case"link":Ke("error",r),Ke("load",r);break;case"details":Ke("toggle",r);break;case"input":Ke("invalid",r),Rr(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ke("invalid",r);break;case"textarea":Ke("invalid",r),Ts(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||Dx(r.textContent,l)?(u.popover!=null&&(Ke("beforetoggle",r),Ke("toggle",r)),u.onScroll!=null&&Ke("scroll",r),u.onScrollEnd!=null&&Ke("scrollend",r),u.onClick!=null&&(r.onclick=de),r=!0):r=!1,r||$a(i,!0)}function yb(i){for(sn=i.return;sn;)switch(sn.tag){case 5:case 31:case 13:hi=!1;return;case 27:case 3:hi=!0;return;default:sn=sn.return}}function Ls(i){if(i!==sn)return!1;if(!Ze)return yb(i),Ze=!0,!1;var r=i.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=i.type,l=!(l!=="form"&&l!=="button")||Ph(i.type,i.memoizedProps)),l=!l),l&&wt&&$a(i),yb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));wt=qx(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));wt=qx(i)}else r===27?(r=wt,er(i.type)?(i=Qh,Qh=null,wt=i):wt=r):wt=sn?pi(i.stateNode.nextSibling):null;return!0}function zr(){wt=sn=null,Ze=!1}function Nd(){var i=Ua;return i!==null&&(Ln===null?Ln=i:Ln.push.apply(Ln,i),Ua=null),i}function uo(i){Ua===null?Ua=[i]:Ua.push(i)}var kd=L(null),Br=null,oa=null;function Fa(i,r,l){T(kd,r._currentValue),r._currentValue=l}function ca(i){i._currentValue=kd.current,te(kd)}function Td(i,r,l){for(;i!==null;){var u=i.alternate;if((i.childLanes&r)!==r?(i.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),i===l)break;i=i.return}}function Cd(i,r,l,u){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var b=p.dependencies;if(b!==null){var E=p.child;b=b.firstContext;e:for(;b!==null;){var k=b;b=p;for(var I=0;I<r.length;I++)if(k.context===r[I]){b.lanes|=l,k=b.alternate,k!==null&&(k.lanes|=l),Td(b.return,l,i),u||(E=null);break e}b=k.next}}else if(p.tag===18){if(E=p.return,E===null)throw Error(a(341));E.lanes|=l,b=E.alternate,b!==null&&(b.lanes|=l),Td(E,l,i),E=null}else E=p.child;if(E!==null)E.return=p;else for(E=p;E!==null;){if(E===i){E=null;break}if(p=E.sibling,p!==null){p.return=E.return,E=p;break}E=E.return}p=E}}function Is(i,r,l,u){i=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 E=p.alternate;if(E===null)throw Error(a(387));if(E=E.memoizedProps,E!==null){var k=p.type;Vn(p.pendingProps.value,E.value)||(i!==null?i.push(k):i=[k])}}else if(p===Fe.current){if(E=p.alternate,E===null)throw Error(a(387));E.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(Bo):i=[Bo])}p=p.return}i!==null&&Cd(r,i,l,u),r.flags|=262144}function Gc(i){for(i=i.firstContext;i!==null;){if(!Vn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ur(i){Br=i,oa=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function ln(i){return xb(Br,i)}function Qc(i,r){return Br===null&&Ur(i),xb(i,r)}function xb(i,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},oa===null){if(i===null)throw Error(a(308));oa=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else oa=oa.next=r;return l}var kw=typeof AbortController<"u"?AbortController:function(){var i=[],r=this.signal={aborted:!1,addEventListener:function(l,u){i.push(u)}};this.abort=function(){r.aborted=!0,i.forEach(function(l){return l()})}},Tw=e.unstable_scheduleCallback,Cw=e.unstable_NormalPriority,Gt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ad(){return{controller:new kw,data:new Map,refCount:0}}function fo(i){i.refCount--,i.refCount===0&&Tw(Cw,function(){i.controller.abort()})}var ho=null,Od=0,zs=0,Bs=null;function Aw(i,r){if(ho===null){var l=ho=[];Od=0,zs=jh(),Bs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Od++,r.then(vb,vb),r}function vb(){if(--Od===0&&ho!==null){Bs!==null&&(Bs.status="fulfilled");var i=ho;ho=null,zs=0,Bs=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function Ow(i,r){var l=[],u={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return i.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<l.length;p++)(0,l[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),u}var Eb=G.S;G.S=function(i,r){ax=Ot(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&Aw(i,r),Eb!==null&&Eb(i,r)};var $r=L(null);function Rd(){var i=$r.current;return i!==null?i:yt.pooledCache}function Yc(i,r){r===null?T($r,$r.current):T($r,r.pool)}function Sb(){var i=Rd();return i===null?null:{parent:Gt._currentValue,pool:i}}var Us=Error(a(460)),Md=Error(a(474)),Vc=Error(a(542)),Xc={then:function(){}};function _b(i){return i=i.status,i==="fulfilled"||i==="rejected"}function wb(i,r,l){switch(l=i[l],l===void 0?i.push(r):l!==r&&(r.then(de,de),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,kb(i),i;default:if(typeof r.status=="string")r.then(de,de);else{if(i=yt,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=r,i.status="pending",i.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,kb(i),i}throw Pr=r,Us}}function Fr(i){try{var r=i._init;return r(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Pr=l,Us):l}}var Pr=null;function Nb(){if(Pr===null)throw Error(a(459));var i=Pr;return Pr=null,i}function kb(i){if(i===Us||i===Vc)throw Error(a(483))}var $s=null,mo=0;function Zc(i){var r=mo;return mo+=1,$s===null&&($s=[]),wb($s,i,r)}function po(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function Wc(i,r){throw r.$$typeof===x?Error(a(525)):(i=Object.prototype.toString.call(r),Error(a(31,i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)))}function Tb(i){function r(K,$){if(i){var V=K.deletions;V===null?(K.deletions=[$],K.flags|=16):V.push($)}}function l(K,$){if(!i)return null;for(;$!==null;)r(K,$),$=$.sibling;return null}function u(K){for(var $=new Map;K!==null;)K.key!==null?$.set(K.key,K):$.set(K.index,K),K=K.sibling;return $}function p(K,$){return K=sa(K,$),K.index=0,K.sibling=null,K}function b(K,$,V){return K.index=V,i?(V=K.alternate,V!==null?(V=V.index,V<$?(K.flags|=67108866,$):V):(K.flags|=67108866,$)):(K.flags|=1048576,$)}function E(K){return i&&K.alternate===null&&(K.flags|=67108866),K}function k(K,$,V,re){return $===null||$.tag!==6?($=vd(V,K.mode,re),$.return=K,$):($=p($,V),$.return=K,$)}function I(K,$,V,re){var ke=V.type;return ke===_?ie(K,$,V.props.children,re,V.key):$!==null&&($.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===U&&Fr(ke)===$.type)?($=p($,V.props),po($,V),$.return=K,$):($=Hc(V.type,V.key,V.props,null,K.mode,re),po($,V),$.return=K,$)}function X(K,$,V,re){return $===null||$.tag!==4||$.stateNode.containerInfo!==V.containerInfo||$.stateNode.implementation!==V.implementation?($=Ed(V,K.mode,re),$.return=K,$):($=p($,V.children||[]),$.return=K,$)}function ie(K,$,V,re,ke){return $===null||$.tag!==7?($=Ir(V,K.mode,re,ke),$.return=K,$):($=p($,V),$.return=K,$)}function se(K,$,V){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=vd(""+$,K.mode,V),$.return=K,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return V=Hc($.type,$.key,$.props,null,K.mode,V),po(V,$),V.return=K,V;case S:return $=Ed($,K.mode,V),$.return=K,$;case U:return $=Fr($),se(K,$,V)}if(Q($)||Y($))return $=Ir($,K.mode,V,null),$.return=K,$;if(typeof $.then=="function")return se(K,Zc($),V);if($.$$typeof===A)return se(K,Qc(K,$),V);Wc(K,$)}return null}function W(K,$,V,re){var ke=$!==null?$.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return ke!==null?null:k(K,$,""+V,re);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case v:return V.key===ke?I(K,$,V,re):null;case S:return V.key===ke?X(K,$,V,re):null;case U:return V=Fr(V),W(K,$,V,re)}if(Q(V)||Y(V))return ke!==null?null:ie(K,$,V,re,null);if(typeof V.then=="function")return W(K,$,Zc(V),re);if(V.$$typeof===A)return W(K,$,Qc(K,V),re);Wc(K,V)}return null}function ee(K,$,V,re,ke){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return K=K.get(V)||null,k($,K,""+re,ke);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case v:return K=K.get(re.key===null?V:re.key)||null,I($,K,re,ke);case S:return K=K.get(re.key===null?V:re.key)||null,X($,K,re,ke);case U:return re=Fr(re),ee(K,$,V,re,ke)}if(Q(re)||Y(re))return K=K.get(V)||null,ie($,K,re,ke,null);if(typeof re.then=="function")return ee(K,$,V,Zc(re),ke);if(re.$$typeof===A)return ee(K,$,V,Qc($,re),ke);Wc($,re)}return null}function ye(K,$,V,re){for(var ke=null,tt=null,Se=$,Be=$=0,Ve=null;Se!==null&&Be<V.length;Be++){Se.index>Be?(Ve=Se,Se=null):Ve=Se.sibling;var nt=W(K,Se,V[Be],re);if(nt===null){Se===null&&(Se=Ve);break}i&&Se&&nt.alternate===null&&r(K,Se),$=b(nt,$,Be),tt===null?ke=nt:tt.sibling=nt,tt=nt,Se=Ve}if(Be===V.length)return l(K,Se),Ze&&la(K,Be),ke;if(Se===null){for(;Be<V.length;Be++)Se=se(K,V[Be],re),Se!==null&&($=b(Se,$,Be),tt===null?ke=Se:tt.sibling=Se,tt=Se);return Ze&&la(K,Be),ke}for(Se=u(Se);Be<V.length;Be++)Ve=ee(Se,K,Be,V[Be],re),Ve!==null&&(i&&Ve.alternate!==null&&Se.delete(Ve.key===null?Be:Ve.key),$=b(Ve,$,Be),tt===null?ke=Ve:tt.sibling=Ve,tt=Ve);return i&&Se.forEach(function(rr){return r(K,rr)}),Ze&&la(K,Be),ke}function Ae(K,$,V,re){if(V==null)throw Error(a(151));for(var ke=null,tt=null,Se=$,Be=$=0,Ve=null,nt=V.next();Se!==null&&!nt.done;Be++,nt=V.next()){Se.index>Be?(Ve=Se,Se=null):Ve=Se.sibling;var rr=W(K,Se,nt.value,re);if(rr===null){Se===null&&(Se=Ve);break}i&&Se&&rr.alternate===null&&r(K,Se),$=b(rr,$,Be),tt===null?ke=rr:tt.sibling=rr,tt=rr,Se=Ve}if(nt.done)return l(K,Se),Ze&&la(K,Be),ke;if(Se===null){for(;!nt.done;Be++,nt=V.next())nt=se(K,nt.value,re),nt!==null&&($=b(nt,$,Be),tt===null?ke=nt:tt.sibling=nt,tt=nt);return Ze&&la(K,Be),ke}for(Se=u(Se);!nt.done;Be++,nt=V.next())nt=ee(Se,K,Be,nt.value,re),nt!==null&&(i&&nt.alternate!==null&&Se.delete(nt.key===null?Be:nt.key),$=b(nt,$,Be),tt===null?ke=nt:tt.sibling=nt,tt=nt);return i&&Se.forEach(function(FN){return r(K,FN)}),Ze&&la(K,Be),ke}function pt(K,$,V,re){if(typeof V=="object"&&V!==null&&V.type===_&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case v:e:{for(var ke=V.key;$!==null;){if($.key===ke){if(ke=V.type,ke===_){if($.tag===7){l(K,$.sibling),re=p($,V.props.children),re.return=K,K=re;break e}}else if($.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===U&&Fr(ke)===$.type){l(K,$.sibling),re=p($,V.props),po(re,V),re.return=K,K=re;break e}l(K,$);break}else r(K,$);$=$.sibling}V.type===_?(re=Ir(V.props.children,K.mode,re,V.key),re.return=K,K=re):(re=Hc(V.type,V.key,V.props,null,K.mode,re),po(re,V),re.return=K,K=re)}return E(K);case S:e:{for(ke=V.key;$!==null;){if($.key===ke)if($.tag===4&&$.stateNode.containerInfo===V.containerInfo&&$.stateNode.implementation===V.implementation){l(K,$.sibling),re=p($,V.children||[]),re.return=K,K=re;break e}else{l(K,$);break}else r(K,$);$=$.sibling}re=Ed(V,K.mode,re),re.return=K,K=re}return E(K);case U:return V=Fr(V),pt(K,$,V,re)}if(Q(V))return ye(K,$,V,re);if(Y(V)){if(ke=Y(V),typeof ke!="function")throw Error(a(150));return V=ke.call(V),Ae(K,$,V,re)}if(typeof V.then=="function")return pt(K,$,Zc(V),re);if(V.$$typeof===A)return pt(K,$,Qc(K,V),re);Wc(K,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,$!==null&&$.tag===6?(l(K,$.sibling),re=p($,V),re.return=K,K=re):(l(K,$),re=vd(V,K.mode,re),re.return=K,K=re),E(K)):l(K,$)}return function(K,$,V,re){try{mo=0;var ke=pt(K,$,V,re);return $s=null,ke}catch(Se){if(Se===Us||Se===Vc)throw Se;var tt=Xn(29,Se,null,K.mode);return tt.lanes=re,tt.return=K,tt}finally{}}}var qr=Tb(!0),Cb=Tb(!1),Pa=!1;function jd(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dd(i,r){i=i.updateQueue,r.updateQueue===i&&(r.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qa(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ha(i,r,l){var u=i.updateQueue;if(u===null)return null;if(u=u.shared,(at&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=qc(i),fb(i,null,l),r}return Pc(i,u,r,l),qc(i)}function go(i,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,Me(i,l)}}function Ld(i,r){var l=i.updateQueue,u=i.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var p=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var E={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};b===null?p=b=E:b=b.next=E,l=l.next}while(l!==null);b===null?p=b=r:b=b.next=r}else p=b=r;l={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=r:i.next=r,l.lastBaseUpdate=r}var Id=!1;function bo(){if(Id){var i=Bs;if(i!==null)throw i}}function yo(i,r,l,u){Id=!1;var p=i.updateQueue;Pa=!1;var b=p.firstBaseUpdate,E=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var I=k,X=I.next;I.next=null,E===null?b=X:E.next=X,E=I;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,k=ie.lastBaseUpdate,k!==E&&(k===null?ie.firstBaseUpdate=X:k.next=X,ie.lastBaseUpdate=I))}if(b!==null){var se=p.baseState;E=0,ie=X=I=null,k=b;do{var W=k.lane&-536870913,ee=W!==k.lane;if(ee?(Ye&W)===W:(u&W)===W){W!==0&&W===zs&&(Id=!0),ie!==null&&(ie=ie.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var ye=i,Ae=k;W=r;var pt=l;switch(Ae.tag){case 1:if(ye=Ae.payload,typeof ye=="function"){se=ye.call(pt,se,W);break e}se=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ae.payload,W=typeof ye=="function"?ye.call(pt,se,W):ye,W==null)break e;se=g({},se,W);break e;case 2:Pa=!0}}W=k.callback,W!==null&&(i.flags|=64,ee&&(i.flags|=8192),ee=p.callbacks,ee===null?p.callbacks=[W]:ee.push(W))}else ee={lane:W,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ie===null?(X=ie=ee,I=se):ie=ie.next=ee,E|=W;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;ee=k,k=ee.next,ee.next=null,p.lastBaseUpdate=ee,p.shared.pending=null}}while(!0);ie===null&&(I=se),p.baseState=I,p.firstBaseUpdate=X,p.lastBaseUpdate=ie,b===null&&(p.shared.lanes=0),Va|=E,i.lanes=E,i.memoizedState=se}}function Ab(i,r){if(typeof i!="function")throw Error(a(191,i));i.call(r)}function Ob(i,r){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)Ab(l[i],r)}var Fs=L(null),Jc=L(0);function Rb(i,r){i=ya,T(Jc,i),T(Fs,r),ya=i|r.baseLanes}function zd(){T(Jc,ya),T(Fs,Fs.current)}function Bd(){ya=Jc.current,te(Fs),te(Jc)}var Zn=L(null),mi=null;function Ka(i){var r=i.alternate;T(Pt,Pt.current&1),T(Zn,i),mi===null&&(r===null||Fs.current!==null||r.memoizedState!==null)&&(mi=i)}function Ud(i){T(Pt,Pt.current),T(Zn,i),mi===null&&(mi=i)}function Mb(i){i.tag===22?(T(Pt,Pt.current),T(Zn,i),mi===null&&(mi=i)):Ga()}function Ga(){T(Pt,Pt.current),T(Zn,Zn.current)}function Wn(i){te(Zn),mi===i&&(mi=null),te(Pt)}var Pt=L(0);function eu(i){for(var r=i;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Kh(l)||Gh(l)))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===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ua=0,ze=null,ht=null,Qt=null,tu=!1,Ps=!1,Hr=!1,nu=0,xo=0,qs=null,Rw=0;function Lt(){throw Error(a(321))}function $d(i,r){if(r===null)return!1;for(var l=0;l<r.length&&l<i.length;l++)if(!Vn(i[l],r[l]))return!1;return!0}function Fd(i,r,l,u,p,b){return ua=b,ze=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,G.H=i===null||i.memoizedState===null?py:nh,Hr=!1,b=l(u,p),Hr=!1,Ps&&(b=Db(r,l,u,p)),jb(i),b}function jb(i){G.H=So;var r=ht!==null&&ht.next!==null;if(ua=0,Qt=ht=ze=null,tu=!1,xo=0,qs=null,r)throw Error(a(300));i===null||Yt||(i=i.dependencies,i!==null&&Gc(i)&&(Yt=!0))}function Db(i,r,l,u){ze=i;var p=0;do{if(Ps&&(qs=null),xo=0,Ps=!1,25<=p)throw Error(a(301));if(p+=1,Qt=ht=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}G.H=gy,b=r(l,u)}while(Ps);return b}function Mw(){var i=G.H,r=i.useState()[0];return r=typeof r.then=="function"?vo(r):r,i=i.useState()[0],(ht!==null?ht.memoizedState:null)!==i&&(ze.flags|=1024),r}function Pd(){var i=nu!==0;return nu=0,i}function qd(i,r,l){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~l}function Hd(i){if(tu){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}tu=!1}ua=0,Qt=ht=ze=null,Ps=!1,xo=nu=0,qs=null}function En(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?ze.memoizedState=Qt=i:Qt=Qt.next=i,Qt}function qt(){if(ht===null){var i=ze.alternate;i=i!==null?i.memoizedState:null}else i=ht.next;var r=Qt===null?ze.memoizedState:Qt.next;if(r!==null)Qt=r,ht=i;else{if(i===null)throw ze.alternate===null?Error(a(467)):Error(a(310));ht=i,i={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Qt===null?ze.memoizedState=Qt=i:Qt=Qt.next=i}return Qt}function iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vo(i){var r=xo;return xo+=1,qs===null&&(qs=[]),i=wb(qs,i,r),r=ze,(Qt===null?r.memoizedState:Qt.next)===null&&(r=r.alternate,G.H=r===null||r.memoizedState===null?py:nh),i}function au(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return vo(i);if(i.$$typeof===A)return ln(i)}throw Error(a(438,String(i)))}function Kd(i){var r=null,l=ze.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=iu(),ze.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(i),u=0;u<i;u++)l[u]=C;return r.index++,l}function fa(i,r){return typeof r=="function"?r(i):r}function ru(i){var r=qt();return Gd(r,ht,i)}function Gd(i,r,l){var u=i.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var p=i.baseQueue,b=u.pending;if(b!==null){if(p!==null){var E=p.next;p.next=b.next,b.next=E}r.baseQueue=p=b,u.pending=null}if(b=i.baseState,p===null)i.memoizedState=b;else{r=p.next;var k=E=null,I=null,X=r,ie=!1;do{var se=X.lane&-536870913;if(se!==X.lane?(Ye&se)===se:(ua&se)===se){var W=X.revertLane;if(W===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),se===zs&&(ie=!0);else if((ua&W)===W){X=X.next,W===zs&&(ie=!0);continue}else se={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(k=I=se,E=b):I=I.next=se,ze.lanes|=W,Va|=W;se=X.action,Hr&&l(b,se),b=X.hasEagerState?X.eagerState:l(b,se)}else W={lane:se,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(k=I=W,E=b):I=I.next=W,ze.lanes|=se,Va|=se;X=X.next}while(X!==null&&X!==r);if(I===null?E=b:I.next=k,!Vn(b,i.memoizedState)&&(Yt=!0,ie&&(l=Bs,l!==null)))throw l;i.memoizedState=b,i.baseState=E,i.baseQueue=I,u.lastRenderedState=b}return p===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function Qd(i){var r=qt(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var u=l.dispatch,p=l.pending,b=r.memoizedState;if(p!==null){l.pending=null;var E=p=p.next;do b=i(b,E.action),E=E.next;while(E!==p);Vn(b,r.memoizedState)||(Yt=!0),r.memoizedState=b,r.baseQueue===null&&(r.baseState=b),l.lastRenderedState=b}return[b,u]}function Lb(i,r,l){var u=ze,p=qt(),b=Ze;if(b){if(l===void 0)throw Error(a(407));l=l()}else l=r();var E=!Vn((ht||p).memoizedState,l);if(E&&(p.memoizedState=l,Yt=!0),p=p.queue,Xd(Bb.bind(null,u,p,i),[i]),p.getSnapshot!==r||E||Qt!==null&&Qt.memoizedState.tag&1){if(u.flags|=2048,Hs(9,{destroy:void 0},zb.bind(null,u,p,l,r),null),yt===null)throw Error(a(349));b||(ua&127)!==0||Ib(u,r,l)}return l}function Ib(i,r,l){i.flags|=16384,i={getSnapshot:r,value:l},r=ze.updateQueue,r===null?(r=iu(),ze.updateQueue=r,r.stores=[i]):(l=r.stores,l===null?r.stores=[i]:l.push(i))}function zb(i,r,l,u){r.value=l,r.getSnapshot=u,Ub(r)&&$b(i)}function Bb(i,r,l){return l(function(){Ub(r)&&$b(i)})}function Ub(i){var r=i.getSnapshot;i=i.value;try{var l=r();return!Vn(i,l)}catch{return!0}}function $b(i){var r=Lr(i,2);r!==null&&In(r,i,2)}function Yd(i){var r=En();if(typeof i=="function"){var l=i;if(i=l(),Hr){un(!0);try{l()}finally{un(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:i},r}function Fb(i,r,l,u){return i.baseState=l,Gd(i,ht,typeof u=="function"?u:fa)}function jw(i,r,l,u,p){if(ou(i))throw Error(a(485));if(i=r.action,i!==null){var b={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){b.listeners.push(E)}};G.T!==null?l(!0):b.isTransition=!1,u(b),l=r.pending,l===null?(b.next=r.pending=b,Pb(r,b)):(b.next=l.next,r.pending=l.next=b)}}function Pb(i,r){var l=r.action,u=r.payload,p=i.state;if(r.isTransition){var b=G.T,E={};G.T=E;try{var k=l(p,u),I=G.S;I!==null&&I(E,k),qb(i,r,k)}catch(X){Vd(i,r,X)}finally{b!==null&&E.types!==null&&(b.types=E.types),G.T=b}}else try{b=l(p,u),qb(i,r,b)}catch(X){Vd(i,r,X)}}function qb(i,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Hb(i,r,u)},function(u){return Vd(i,r,u)}):Hb(i,r,l)}function Hb(i,r,l){r.status="fulfilled",r.value=l,Kb(r),i.state=l,r=i.pending,r!==null&&(l=r.next,l===r?i.pending=null:(l=l.next,r.next=l,Pb(i,l)))}function Vd(i,r,l){var u=i.pending;if(i.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Kb(r),r=r.next;while(r!==u)}i.action=null}function Kb(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function Gb(i,r){return r}function Qb(i,r){if(Ze){var l=yt.formState;if(l!==null){e:{var u=ze;if(Ze){if(wt){t:{for(var p=wt,b=hi;p.nodeType!==8;){if(!b){p=null;break t}if(p=pi(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){wt=pi(p.nextSibling),u=p.data==="F!";break e}}$a(u)}u=!1}u&&(r=l[0])}}return l=En(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gb,lastRenderedState:r},l.queue=u,l=dy.bind(null,ze,u),u.dispatch=l,u=Yd(!1),b=th.bind(null,ze,!1,u.queue),u=En(),p={state:r,dispatch:null,action:i,pending:null},u.queue=p,l=jw.bind(null,ze,p,b,l),p.dispatch=l,u.memoizedState=i,[r,l,!1]}function Yb(i){var r=qt();return Vb(r,ht,i)}function Vb(i,r,l){if(r=Gd(i,r,Gb)[0],i=ru(fa)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=vo(r)}catch(E){throw E===Us?Vc:E}else u=r;r=qt();var p=r.queue,b=p.dispatch;return l!==r.memoizedState&&(ze.flags|=2048,Hs(9,{destroy:void 0},Dw.bind(null,p,l),null)),[u,b,i]}function Dw(i,r){i.action=r}function Xb(i){var r=qt(),l=ht;if(l!==null)return Vb(r,l,i);qt(),r=r.memoizedState,l=qt();var u=l.queue.dispatch;return l.memoizedState=i,[r,u,!1]}function Hs(i,r,l,u){return i={tag:i,create:l,deps:u,inst:r,next:null},r=ze.updateQueue,r===null&&(r=iu(),ze.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=i.next=i:(u=l.next,l.next=i,i.next=u,r.lastEffect=i),i}function Zb(){return qt().memoizedState}function su(i,r,l,u){var p=En();ze.flags|=i,p.memoizedState=Hs(1|r,{destroy:void 0},l,u===void 0?null:u)}function lu(i,r,l,u){var p=qt();u=u===void 0?null:u;var b=p.memoizedState.inst;ht!==null&&u!==null&&$d(u,ht.memoizedState.deps)?p.memoizedState=Hs(r,b,l,u):(ze.flags|=i,p.memoizedState=Hs(1|r,b,l,u))}function Wb(i,r){su(8390656,8,i,r)}function Xd(i,r){lu(2048,8,i,r)}function Lw(i){ze.flags|=4;var r=ze.updateQueue;if(r===null)r=iu(),ze.updateQueue=r,r.events=[i];else{var l=r.events;l===null?r.events=[i]:l.push(i)}}function Jb(i){var r=qt().memoizedState;return Lw({ref:r,nextImpl:i}),function(){if((at&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function ey(i,r){return lu(4,2,i,r)}function ty(i,r){return lu(4,4,i,r)}function ny(i,r){if(typeof r=="function"){i=i();var l=r(i);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return i=i(),r.current=i,function(){r.current=null}}function iy(i,r,l){l=l!=null?l.concat([i]):null,lu(4,4,ny.bind(null,r,i),l)}function Zd(){}function ay(i,r){var l=qt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&$d(r,u[1])?u[0]:(l.memoizedState=[i,r],i)}function ry(i,r){var l=qt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&$d(r,u[1]))return u[0];if(u=i(),Hr){un(!0);try{i()}finally{un(!1)}}return l.memoizedState=[u,r],u}function Wd(i,r,l){return l===void 0||(ua&1073741824)!==0&&(Ye&261930)===0?i.memoizedState=r:(i.memoizedState=l,i=sx(),ze.lanes|=i,Va|=i,l)}function sy(i,r,l,u){return Vn(l,r)?l:Fs.current!==null?(i=Wd(i,l,u),Vn(i,r)||(Yt=!0),i):(ua&42)===0||(ua&1073741824)!==0&&(Ye&261930)===0?(Yt=!0,i.memoizedState=l):(i=sx(),ze.lanes|=i,Va|=i,r)}function ly(i,r,l,u,p){var b=oe.p;oe.p=b!==0&&8>b?b:8;var E=G.T,k={};G.T=k,th(i,!1,r,l);try{var I=p(),X=G.S;if(X!==null&&X(k,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ie=Ow(I,u);Eo(i,r,ie,ti(i))}else Eo(i,r,u,ti(i))}catch(se){Eo(i,r,{then:function(){},status:"rejected",reason:se},ti())}finally{oe.p=b,E!==null&&k.types!==null&&(E.types=k.types),G.T=E}}function Iw(){}function Jd(i,r,l,u){if(i.tag!==5)throw Error(a(476));var p=oy(i).queue;ly(i,p,r,Z,l===null?Iw:function(){return cy(i),l(u)})}function oy(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:Z},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:l},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function cy(i){var r=oy(i);r.next===null&&(r=i.alternate.memoizedState),Eo(i,r.next.queue,{},ti())}function eh(){return ln(Bo)}function uy(){return qt().memoizedState}function fy(){return qt().memoizedState}function zw(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var l=ti();i=qa(l);var u=Ha(r,i,l);u!==null&&(In(u,r,l),go(u,r,l)),r={cache:Ad()},i.payload=r;return}r=r.return}}function Bw(i,r,l){var u=ti();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ou(i)?hy(r,l):(l=yd(i,r,l,u),l!==null&&(In(l,i,u),my(l,r,u)))}function dy(i,r,l){var u=ti();Eo(i,r,l,u)}function Eo(i,r,l,u){var p={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ou(i))hy(r,p);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=r.lastRenderedReducer,b!==null))try{var E=r.lastRenderedState,k=b(E,l);if(p.hasEagerState=!0,p.eagerState=k,Vn(k,E))return Pc(i,r,p,0),yt===null&&Fc(),!1}catch{}finally{}if(l=yd(i,r,p,u),l!==null)return In(l,i,u),my(l,r,u),!0}return!1}function th(i,r,l,u){if(u={lane:2,revertLane:jh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ou(i)){if(r)throw Error(a(479))}else r=yd(i,l,u,2),r!==null&&In(r,i,2)}function ou(i){var r=i.alternate;return i===ze||r!==null&&r===ze}function hy(i,r){Ps=tu=!0;var l=i.pending;l===null?r.next=r:(r.next=l.next,l.next=r),i.pending=r}function my(i,r,l){if((l&4194048)!==0){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,Me(i,l)}}var So={readContext:ln,use:au,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useLayoutEffect:Lt,useInsertionEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useSyncExternalStore:Lt,useId:Lt,useHostTransitionStatus:Lt,useFormState:Lt,useActionState:Lt,useOptimistic:Lt,useMemoCache:Lt,useCacheRefresh:Lt};So.useEffectEvent=Lt;var py={readContext:ln,use:au,useCallback:function(i,r){return En().memoizedState=[i,r===void 0?null:r],i},useContext:ln,useEffect:Wb,useImperativeHandle:function(i,r,l){l=l!=null?l.concat([i]):null,su(4194308,4,ny.bind(null,r,i),l)},useLayoutEffect:function(i,r){return su(4194308,4,i,r)},useInsertionEffect:function(i,r){su(4,2,i,r)},useMemo:function(i,r){var l=En();r=r===void 0?null:r;var u=i();if(Hr){un(!0);try{i()}finally{un(!1)}}return l.memoizedState=[u,r],u},useReducer:function(i,r,l){var u=En();if(l!==void 0){var p=l(r);if(Hr){un(!0);try{l(r)}finally{un(!1)}}}else p=r;return u.memoizedState=u.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},u.queue=i,i=i.dispatch=Bw.bind(null,ze,i),[u.memoizedState,i]},useRef:function(i){var r=En();return i={current:i},r.memoizedState=i},useState:function(i){i=Yd(i);var r=i.queue,l=dy.bind(null,ze,r);return r.dispatch=l,[i.memoizedState,l]},useDebugValue:Zd,useDeferredValue:function(i,r){var l=En();return Wd(l,i,r)},useTransition:function(){var i=Yd(!1);return i=ly.bind(null,ze,i.queue,!0,!1),En().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,l){var u=ze,p=En();if(Ze){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),yt===null)throw Error(a(349));(Ye&127)!==0||Ib(u,r,l)}p.memoizedState=l;var b={value:l,getSnapshot:r};return p.queue=b,Wb(Bb.bind(null,u,b,i),[i]),u.flags|=2048,Hs(9,{destroy:void 0},zb.bind(null,u,b,l,r),null),l},useId:function(){var i=En(),r=yt.identifierPrefix;if(Ze){var l=Fi,u=$i;l=(u&~(1<<32-lt(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=nu++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=Rw++,r="_"+r+"r_"+l.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:eh,useFormState:Qb,useActionState:Qb,useOptimistic:function(i){var r=En();r.memoizedState=r.baseState=i;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=th.bind(null,ze,!0,l),l.dispatch=r,[i,r]},useMemoCache:Kd,useCacheRefresh:function(){return En().memoizedState=zw.bind(null,ze)},useEffectEvent:function(i){var r=En(),l={impl:i};return r.memoizedState=l,function(){if((at&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},nh={readContext:ln,use:au,useCallback:ay,useContext:ln,useEffect:Xd,useImperativeHandle:iy,useInsertionEffect:ey,useLayoutEffect:ty,useMemo:ry,useReducer:ru,useRef:Zb,useState:function(){return ru(fa)},useDebugValue:Zd,useDeferredValue:function(i,r){var l=qt();return sy(l,ht.memoizedState,i,r)},useTransition:function(){var i=ru(fa)[0],r=qt().memoizedState;return[typeof i=="boolean"?i:vo(i),r]},useSyncExternalStore:Lb,useId:uy,useHostTransitionStatus:eh,useFormState:Yb,useActionState:Yb,useOptimistic:function(i,r){var l=qt();return Fb(l,ht,i,r)},useMemoCache:Kd,useCacheRefresh:fy};nh.useEffectEvent=Jb;var gy={readContext:ln,use:au,useCallback:ay,useContext:ln,useEffect:Xd,useImperativeHandle:iy,useInsertionEffect:ey,useLayoutEffect:ty,useMemo:ry,useReducer:Qd,useRef:Zb,useState:function(){return Qd(fa)},useDebugValue:Zd,useDeferredValue:function(i,r){var l=qt();return ht===null?Wd(l,i,r):sy(l,ht.memoizedState,i,r)},useTransition:function(){var i=Qd(fa)[0],r=qt().memoizedState;return[typeof i=="boolean"?i:vo(i),r]},useSyncExternalStore:Lb,useId:uy,useHostTransitionStatus:eh,useFormState:Xb,useActionState:Xb,useOptimistic:function(i,r){var l=qt();return ht!==null?Fb(l,ht,i,r):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:Kd,useCacheRefresh:fy};gy.useEffectEvent=Jb;function ih(i,r,l,u){r=i.memoizedState,l=l(u,r),l=l==null?r:g({},r,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var ah={enqueueSetState:function(i,r,l){i=i._reactInternals;var u=ti(),p=qa(u);p.payload=r,l!=null&&(p.callback=l),r=Ha(i,p,u),r!==null&&(In(r,i,u),go(r,i,u))},enqueueReplaceState:function(i,r,l){i=i._reactInternals;var u=ti(),p=qa(u);p.tag=1,p.payload=r,l!=null&&(p.callback=l),r=Ha(i,p,u),r!==null&&(In(r,i,u),go(r,i,u))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var l=ti(),u=qa(l);u.tag=2,r!=null&&(u.callback=r),r=Ha(i,u,l),r!==null&&(In(r,i,l),go(r,i,l))}};function by(i,r,l,u,p,b,E){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(u,b,E):r.prototype&&r.prototype.isPureReactComponent?!lo(l,u)||!lo(p,b):!0}function yy(i,r,l,u){i=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==i&&ah.enqueueReplaceState(r,r.state,null)}function Kr(i,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(i=i.defaultProps){l===r&&(l=g({},l));for(var p in i)l[p]===void 0&&(l[p]=i[p])}return l}function xy(i){$c(i)}function vy(i){console.error(i)}function Ey(i){$c(i)}function cu(i,r){try{var l=i.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function Sy(i,r,l){try{var u=i.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function rh(i,r,l){return l=qa(l),l.tag=3,l.payload={element:null},l.callback=function(){cu(i,r)},l}function _y(i){return i=qa(i),i.tag=3,i}function wy(i,r,l,u){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var b=u.value;i.payload=function(){return p(b)},i.callback=function(){Sy(r,l,u)}}var E=l.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(i.callback=function(){Sy(r,l,u),typeof p!="function"&&(Xa===null?Xa=new Set([this]):Xa.add(this));var k=u.stack;this.componentDidCatch(u.value,{componentStack:k!==null?k:""})})}function Uw(i,r,l,u,p){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Is(r,l,p,!0),l=Zn.current,l!==null){switch(l.tag){case 31:case 13:return mi===null?Eu():l.alternate===null&&It===0&&(It=3),l.flags&=-257,l.flags|=65536,l.lanes=p,u===Xc?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Oh(i,u,p)),!1;case 22:return l.flags|=65536,u===Xc?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),Oh(i,u,p)),!1}throw Error(a(435,l.tag))}return Oh(i,u,p),Eu(),!1}if(Ze)return r=Zn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==wd&&(i=Error(a(422),{cause:u}),uo(ui(i,l)))):(u!==wd&&(r=Error(a(423),{cause:u}),uo(ui(r,l))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,u=ui(u,l),p=rh(i.stateNode,u,p),Ld(i,p),It!==4&&(It=2)),!1;var b=Error(a(520),{cause:u});if(b=ui(b,l),Oo===null?Oo=[b]:Oo.push(b),It!==4&&(It=2),r===null)return!0;u=ui(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,i=p&-p,l.lanes|=i,i=rh(l.stateNode,u,i),Ld(l,i),!1;case 1:if(r=l.type,b=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Xa===null||!Xa.has(b))))return l.flags|=65536,p&=-p,l.lanes|=p,p=_y(p),wy(p,i,l,u),Ld(l,p),!1}l=l.return}while(l!==null);return!1}var sh=Error(a(461)),Yt=!1;function on(i,r,l,u){r.child=i===null?Cb(r,null,l,u):qr(r,i.child,l,u)}function Ny(i,r,l,u,p){l=l.render;var b=r.ref;if("ref"in u){var E={};for(var k in u)k!=="ref"&&(E[k]=u[k])}else E=u;return Ur(r),u=Fd(i,r,l,E,b,p),k=Pd(),i!==null&&!Yt?(qd(i,r,p),da(i,r,p)):(Ze&&k&&Sd(r),r.flags|=1,on(i,r,u,p),r.child)}function ky(i,r,l,u,p){if(i===null){var b=l.type;return typeof b=="function"&&!xd(b)&&b.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=b,Ty(i,r,b,u,p)):(i=Hc(l.type,null,u,r,r.mode,p),i.ref=r.ref,i.return=r,r.child=i)}if(b=i.child,!mh(i,p)){var E=b.memoizedProps;if(l=l.compare,l=l!==null?l:lo,l(E,u)&&i.ref===r.ref)return da(i,r,p)}return r.flags|=1,i=sa(b,u),i.ref=r.ref,i.return=r,r.child=i}function Ty(i,r,l,u,p){if(i!==null){var b=i.memoizedProps;if(lo(b,u)&&i.ref===r.ref)if(Yt=!1,r.pendingProps=u=b,mh(i,p))(i.flags&131072)!==0&&(Yt=!0);else return r.lanes=i.lanes,da(i,r,p)}return lh(i,r,l,u,p)}function Cy(i,r,l,u){var p=u.children,b=i!==null?i.memoizedState:null;if(i===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(b=b!==null?b.baseLanes|l:l,i!==null){for(u=r.child=i.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~b}else u=0,r.child=null;return Ay(i,r,b,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&Yc(r,b!==null?b.cachePool:null),b!==null?Rb(r,b):zd(),Mb(r);else return u=r.lanes=536870912,Ay(i,r,b!==null?b.baseLanes|l:l,l,u)}else b!==null?(Yc(r,b.cachePool),Rb(r,b),Ga(),r.memoizedState=null):(i!==null&&Yc(r,null),zd(),Ga());return on(i,r,p,l),r.child}function _o(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Ay(i,r,l,u,p){var b=Rd();return b=b===null?null:{parent:Gt._currentValue,pool:b},r.memoizedState={baseLanes:l,cachePool:b},i!==null&&Yc(r,null),zd(),Mb(r),i!==null&&Is(i,r,u,!0),r.childLanes=p,null}function uu(i,r){return r=du({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function Oy(i,r,l){return qr(r,i.child,null,l),i=uu(r,r.pendingProps),i.flags|=2,Wn(r),r.memoizedState=null,i}function $w(i,r,l){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(Ze){if(u.mode==="hidden")return i=uu(r,u),r.lanes=536870912,_o(null,i);if(Ud(r),(i=wt)?(i=Px(i,hi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Ba!==null?{id:$i,overflow:Fi}:null,retryLane:536870912,hydrationErrors:null},l=hb(i),l.return=r,r.child=l,sn=r,wt=null)):i=null,i===null)throw $a(r);return r.lanes=536870912,null}return uu(r,u)}var b=i.memoizedState;if(b!==null){var E=b.dehydrated;if(Ud(r),p)if(r.flags&256)r.flags&=-257,r=Oy(i,r,l);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(a(558));else if(Yt||Is(i,r,l,!1),p=(l&i.childLanes)!==0,Yt||p){if(u=yt,u!==null&&(E=Ut(u,l),E!==0&&E!==b.retryLane))throw b.retryLane=E,Lr(i,E),In(u,i,E),sh;Eu(),r=Oy(i,r,l)}else i=b.treeContext,wt=pi(E.nextSibling),sn=r,Ze=!0,Ua=null,hi=!1,i!==null&&gb(r,i),r=uu(r,u),r.flags|=4096;return r}return i=sa(i.child,{mode:u.mode,children:u.children}),i.ref=r.ref,r.child=i,i.return=r,i}function fu(i,r){var l=r.ref;if(l===null)i!==null&&i.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(i===null||i.ref!==l)&&(r.flags|=4194816)}}function lh(i,r,l,u,p){return Ur(r),l=Fd(i,r,l,u,void 0,p),u=Pd(),i!==null&&!Yt?(qd(i,r,p),da(i,r,p)):(Ze&&u&&Sd(r),r.flags|=1,on(i,r,l,p),r.child)}function Ry(i,r,l,u,p,b){return Ur(r),r.updateQueue=null,l=Db(r,u,l,p),jb(i),u=Pd(),i!==null&&!Yt?(qd(i,r,b),da(i,r,b)):(Ze&&u&&Sd(r),r.flags|=1,on(i,r,l,b),r.child)}function My(i,r,l,u,p){if(Ur(r),r.stateNode===null){var b=Ms,E=l.contextType;typeof E=="object"&&E!==null&&(b=ln(E)),b=new l(u,b),r.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=ah,r.stateNode=b,b._reactInternals=r,b=r.stateNode,b.props=u,b.state=r.memoizedState,b.refs={},jd(r),E=l.contextType,b.context=typeof E=="object"&&E!==null?ln(E):Ms,b.state=r.memoizedState,E=l.getDerivedStateFromProps,typeof E=="function"&&(ih(r,l,E,u),b.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(E=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),E!==b.state&&ah.enqueueReplaceState(b,b.state,null),yo(r,u,b,p),bo(),b.state=r.memoizedState),typeof b.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){b=r.stateNode;var k=r.memoizedProps,I=Kr(l,k);b.props=I;var X=b.context,ie=l.contextType;E=Ms,typeof ie=="object"&&ie!==null&&(E=ln(ie));var se=l.getDerivedStateFromProps;ie=typeof se=="function"||typeof b.getSnapshotBeforeUpdate=="function",k=r.pendingProps!==k,ie||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(k||X!==E)&&yy(r,b,u,E),Pa=!1;var W=r.memoizedState;b.state=W,yo(r,u,b,p),bo(),X=r.memoizedState,k||W!==X||Pa?(typeof se=="function"&&(ih(r,l,se,u),X=r.memoizedState),(I=Pa||by(r,l,I,u,W,X,E))?(ie||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=u,r.memoizedState=X),b.props=u,b.state=X,b.context=E,u=I):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{b=r.stateNode,Dd(i,r),E=r.memoizedProps,ie=Kr(l,E),b.props=ie,se=r.pendingProps,W=b.context,X=l.contextType,I=Ms,typeof X=="object"&&X!==null&&(I=ln(X)),k=l.getDerivedStateFromProps,(X=typeof k=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==se||W!==I)&&yy(r,b,u,I),Pa=!1,W=r.memoizedState,b.state=W,yo(r,u,b,p),bo();var ee=r.memoizedState;E!==se||W!==ee||Pa||i!==null&&i.dependencies!==null&&Gc(i.dependencies)?(typeof k=="function"&&(ih(r,l,k,u),ee=r.memoizedState),(ie=Pa||by(r,l,ie,u,W,ee,I)||i!==null&&i.dependencies!==null&&Gc(i.dependencies))?(X||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,ee,I),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,ee,I)),typeof b.componentDidUpdate=="function"&&(r.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=ee),b.props=u,b.state=ee,b.context=I,u=ie):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),u=!1)}return b=u,fu(i,r),u=(r.flags&128)!==0,b||u?(b=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:b.render(),r.flags|=1,i!==null&&u?(r.child=qr(r,i.child,null,p),r.child=qr(r,null,l,p)):on(i,r,l,p),r.memoizedState=b.state,i=r.child):i=da(i,r,p),i}function jy(i,r,l,u){return zr(),r.flags|=256,on(i,r,l,u),r.child}var oh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ch(i){return{baseLanes:i,cachePool:Sb()}}function uh(i,r,l){return i=i!==null?i.childLanes&~l:0,r&&(i|=ei),i}function Dy(i,r,l){var u=r.pendingProps,p=!1,b=(r.flags&128)!==0,E;if((E=b)||(E=i!==null&&i.memoizedState===null?!1:(Pt.current&2)!==0),E&&(p=!0,r.flags&=-129),E=(r.flags&32)!==0,r.flags&=-33,i===null){if(Ze){if(p?Ka(r):Ga(),(i=wt)?(i=Px(i,hi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Ba!==null?{id:$i,overflow:Fi}:null,retryLane:536870912,hydrationErrors:null},l=hb(i),l.return=r,r.child=l,sn=r,wt=null)):i=null,i===null)throw $a(r);return Gh(i)?r.lanes=32:r.lanes=536870912,null}var k=u.children;return u=u.fallback,p?(Ga(),p=r.mode,k=du({mode:"hidden",children:k},p),u=Ir(u,p,l,null),k.return=r,u.return=r,k.sibling=u,r.child=k,u=r.child,u.memoizedState=ch(l),u.childLanes=uh(i,E,l),r.memoizedState=oh,_o(null,u)):(Ka(r),fh(r,k))}var I=i.memoizedState;if(I!==null&&(k=I.dehydrated,k!==null)){if(b)r.flags&256?(Ka(r),r.flags&=-257,r=dh(i,r,l)):r.memoizedState!==null?(Ga(),r.child=i.child,r.flags|=128,r=null):(Ga(),k=u.fallback,p=r.mode,u=du({mode:"visible",children:u.children},p),k=Ir(k,p,l,null),k.flags|=2,u.return=r,k.return=r,u.sibling=k,r.child=u,qr(r,i.child,null,l),u=r.child,u.memoizedState=ch(l),u.childLanes=uh(i,E,l),r.memoizedState=oh,r=_o(null,u));else if(Ka(r),Gh(k)){if(E=k.nextSibling&&k.nextSibling.dataset,E)var X=E.dgst;E=X,u=Error(a(419)),u.stack="",u.digest=E,uo({value:u,source:null,stack:null}),r=dh(i,r,l)}else if(Yt||Is(i,r,l,!1),E=(l&i.childLanes)!==0,Yt||E){if(E=yt,E!==null&&(u=Ut(E,l),u!==0&&u!==I.retryLane))throw I.retryLane=u,Lr(i,u),In(E,i,u),sh;Kh(k)||Eu(),r=dh(i,r,l)}else Kh(k)?(r.flags|=192,r.child=i.child,r=null):(i=I.treeContext,wt=pi(k.nextSibling),sn=r,Ze=!0,Ua=null,hi=!1,i!==null&&gb(r,i),r=fh(r,u.children),r.flags|=4096);return r}return p?(Ga(),k=u.fallback,p=r.mode,I=i.child,X=I.sibling,u=sa(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,X!==null?k=sa(X,k):(k=Ir(k,p,l,null),k.flags|=2),k.return=r,u.return=r,u.sibling=k,r.child=u,_o(null,u),u=r.child,k=i.child.memoizedState,k===null?k=ch(l):(p=k.cachePool,p!==null?(I=Gt._currentValue,p=p.parent!==I?{parent:I,pool:I}:p):p=Sb(),k={baseLanes:k.baseLanes|l,cachePool:p}),u.memoizedState=k,u.childLanes=uh(i,E,l),r.memoizedState=oh,_o(i.child,u)):(Ka(r),l=i.child,i=l.sibling,l=sa(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,i!==null&&(E=r.deletions,E===null?(r.deletions=[i],r.flags|=16):E.push(i)),r.child=l,r.memoizedState=null,l)}function fh(i,r){return r=du({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function du(i,r){return i=Xn(22,i,null,r),i.lanes=0,i}function dh(i,r,l){return qr(r,i.child,null,l),i=fh(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function Ly(i,r,l){i.lanes|=r;var u=i.alternate;u!==null&&(u.lanes|=r),Td(i.return,r,l)}function hh(i,r,l,u,p,b){var E=i.memoizedState;E===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:p,treeForkCount:b}:(E.isBackwards=r,E.rendering=null,E.renderingStartTime=0,E.last=u,E.tail=l,E.tailMode=p,E.treeForkCount=b)}function Iy(i,r,l){var u=r.pendingProps,p=u.revealOrder,b=u.tail;u=u.children;var E=Pt.current,k=(E&2)!==0;if(k?(E=E&1|2,r.flags|=128):E&=1,T(Pt,E),on(i,r,u,l),u=Ze?co:0,!k&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Ly(i,l,r);else if(i.tag===19)Ly(i,l,r);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(p){case"forwards":for(l=r.child,p=null;l!==null;)i=l.alternate,i!==null&&eu(i)===null&&(p=l),l=l.sibling;l=p,l===null?(p=r.child,r.child=null):(p=l.sibling,l.sibling=null),hh(r,!1,p,l,b,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=r.child,r.child=null;p!==null;){if(i=p.alternate,i!==null&&eu(i)===null){r.child=p;break}i=p.sibling,p.sibling=l,l=p,p=i}hh(r,!0,l,null,b,u);break;case"together":hh(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function da(i,r,l){if(i!==null&&(r.dependencies=i.dependencies),Va|=r.lanes,(l&r.childLanes)===0)if(i!==null){if(Is(i,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(i!==null&&r.child!==i.child)throw Error(a(153));if(r.child!==null){for(i=r.child,l=sa(i,i.pendingProps),r.child=l,l.return=r;i.sibling!==null;)i=i.sibling,l=l.sibling=sa(i,i.pendingProps),l.return=r;l.sibling=null}return r.child}function mh(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Gc(i)))}function Fw(i,r,l){switch(r.tag){case 3:st(r,r.stateNode.containerInfo),Fa(r,Gt,i.memoizedState.cache),zr();break;case 27:case 5:Wt(r);break;case 4:st(r,r.stateNode.containerInfo);break;case 10:Fa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Ud(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Ka(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Dy(i,r,l):(Ka(r),i=da(i,r,l),i!==null?i.sibling:null);Ka(r);break;case 19:var p=(i.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Is(i,r,l,!1),u=(l&r.childLanes)!==0),p){if(u)return Iy(i,r,l);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),T(Pt,Pt.current),u)break;return null;case 22:return r.lanes=0,Cy(i,r,l,r.pendingProps);case 24:Fa(r,Gt,i.memoizedState.cache)}return da(i,r,l)}function zy(i,r,l){if(i!==null)if(i.memoizedProps!==r.pendingProps)Yt=!0;else{if(!mh(i,l)&&(r.flags&128)===0)return Yt=!1,Fw(i,r,l);Yt=(i.flags&131072)!==0}else Yt=!1,Ze&&(r.flags&1048576)!==0&&pb(r,co,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(i=Fr(r.elementType),r.type=i,typeof i=="function")xd(i)?(u=Kr(i,u),r.tag=1,r=My(null,r,i,u,l)):(r.tag=0,r=lh(null,r,i,u,l));else{if(i!=null){var p=i.$$typeof;if(p===D){r.tag=11,r=Ny(null,r,i,u,l);break e}else if(p===q){r.tag=14,r=ky(null,r,i,u,l);break e}}throw r=H(i)||i,Error(a(306,r,""))}}return r;case 0:return lh(i,r,r.type,r.pendingProps,l);case 1:return u=r.type,p=Kr(u,r.pendingProps),My(i,r,u,p,l);case 3:e:{if(st(r,r.stateNode.containerInfo),i===null)throw Error(a(387));u=r.pendingProps;var b=r.memoizedState;p=b.element,Dd(i,r),yo(r,u,null,l);var E=r.memoizedState;if(u=E.cache,Fa(r,Gt,u),u!==b.cache&&Cd(r,[Gt],l,!0),bo(),u=E.element,b.isDehydrated)if(b={element:u,isDehydrated:!1,cache:E.cache},r.updateQueue.baseState=b,r.memoizedState=b,r.flags&256){r=jy(i,r,u,l);break e}else if(u!==p){p=ui(Error(a(424)),r),uo(p),r=jy(i,r,u,l);break e}else{switch(i=r.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(wt=pi(i.firstChild),sn=r,Ze=!0,Ua=null,hi=!0,l=Cb(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(zr(),u===p){r=da(i,r,l);break e}on(i,r,u,l)}r=r.child}return r;case 26:return fu(i,r),i===null?(l=Yx(r.type,null,r.pendingProps,null))?r.memoizedState=l:Ze||(l=r.type,i=r.pendingProps,u=Cu(ve.current).createElement(l),u[$t]=r,u[fn]=i,cn(u,l,i),Ht(u),r.stateNode=u):r.memoizedState=Yx(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return Wt(r),i===null&&Ze&&(u=r.stateNode=Kx(r.type,r.pendingProps,ve.current),sn=r,hi=!0,p=wt,er(r.type)?(Qh=p,wt=pi(u.firstChild)):wt=p),on(i,r,r.pendingProps.children,l),fu(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&Ze&&((p=u=wt)&&(u=bN(u,r.type,r.pendingProps,hi),u!==null?(r.stateNode=u,sn=r,wt=pi(u.firstChild),hi=!1,p=!0):p=!1),p||$a(r)),Wt(r),p=r.type,b=r.pendingProps,E=i!==null?i.memoizedProps:null,u=b.children,Ph(p,b)?u=null:E!==null&&Ph(p,E)&&(r.flags|=32),r.memoizedState!==null&&(p=Fd(i,r,Mw,null,null,l),Bo._currentValue=p),fu(i,r),on(i,r,u,l),r.child;case 6:return i===null&&Ze&&((i=l=wt)&&(l=yN(l,r.pendingProps,hi),l!==null?(r.stateNode=l,sn=r,wt=null,i=!0):i=!1),i||$a(r)),null;case 13:return Dy(i,r,l);case 4:return st(r,r.stateNode.containerInfo),u=r.pendingProps,i===null?r.child=qr(r,null,u,l):on(i,r,u,l),r.child;case 11:return Ny(i,r,r.type,r.pendingProps,l);case 7:return on(i,r,r.pendingProps,l),r.child;case 8:return on(i,r,r.pendingProps.children,l),r.child;case 12:return on(i,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,Fa(r,r.type,u.value),on(i,r,u.children,l),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,Ur(r),p=ln(p),u=u(p),r.flags|=1,on(i,r,u,l),r.child;case 14:return ky(i,r,r.type,r.pendingProps,l);case 15:return Ty(i,r,r.type,r.pendingProps,l);case 19:return Iy(i,r,l);case 31:return $w(i,r,l);case 22:return Cy(i,r,l,r.pendingProps);case 24:return Ur(r),u=ln(Gt),i===null?(p=Rd(),p===null&&(p=yt,b=Ad(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=l),p=b),r.memoizedState={parent:u,cache:p},jd(r),Fa(r,Gt,p)):((i.lanes&l)!==0&&(Dd(i,r),yo(r,null,null,l),bo()),p=i.memoizedState,b=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),Fa(r,Gt,u)):(u=b.cache,Fa(r,Gt,u),u!==p.cache&&Cd(r,[Gt],l,!0))),on(i,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ha(i){i.flags|=4}function ph(i,r,l,u,p){if((r=(i.mode&32)!==0)&&(r=!1),r){if(i.flags|=16777216,(p&335544128)===p)if(i.stateNode.complete)i.flags|=8192;else if(ux())i.flags|=8192;else throw Pr=Xc,Md}else i.flags&=-16777217}function By(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Jx(r))if(ux())i.flags|=8192;else throw Pr=Xc,Md}function hu(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?je():536870912,i.lanes|=r,Ys|=r)}function wo(i,r){if(!Ze)switch(i.tailMode){case"hidden":r=i.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||i.tail===null?i.tail=null:i.tail.sibling=null:u.sibling=null}}function Nt(i){var r=i.alternate!==null&&i.alternate.child===i.child,l=0,u=0;if(r)for(var p=i.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=u,i.childLanes=l,r}function Pw(i,r,l){var u=r.pendingProps;switch(_d(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(r),null;case 1:return Nt(r),null;case 3:return l=r.stateNode,u=null,i!==null&&(u=i.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),ca(Gt),it(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(Ls(r)?ha(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Nd())),Nt(r),null;case 26:var p=r.type,b=r.memoizedState;return i===null?(ha(r),b!==null?(Nt(r),By(r,b)):(Nt(r),ph(r,p,null,u,l))):b?b!==i.memoizedState?(ha(r),Nt(r),By(r,b)):(Nt(r),r.flags&=-16777217):(i=i.memoizedProps,i!==u&&ha(r),Nt(r),ph(r,p,i,u,l)),null;case 27:if(Kn(r),l=ve.current,p=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Nt(r),null}i=he.current,Ls(r)?bb(r):(i=Kx(p,u,l),r.stateNode=i,ha(r))}return Nt(r),null;case 5:if(Kn(r),p=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Nt(r),null}if(b=he.current,Ls(r))bb(r);else{var E=Cu(ve.current);switch(b){case 1:b=E.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:b=E.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":b=E.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":b=E.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":b=E.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof u.is=="string"?E.createElement("select",{is:u.is}):E.createElement("select"),u.multiple?b.multiple=!0:u.size&&(b.size=u.size);break;default:b=typeof u.is=="string"?E.createElement(p,{is:u.is}):E.createElement(p)}}b[$t]=r,b[fn]=u;e:for(E=r.child;E!==null;){if(E.tag===5||E.tag===6)b.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===r)break e;for(;E.sibling===null;){if(E.return===null||E.return===r)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}r.stateNode=b;e:switch(cn(b,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ha(r)}}return Nt(r),ph(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,l),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(i=ve.current,Ls(r)){if(i=r.stateNode,l=r.memoizedProps,u=null,p=sn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}i[$t]=r,i=!!(i.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Dx(i.nodeValue,l)),i||$a(r,!0)}else i=Cu(i).createTextNode(u),i[$t]=r,r.stateNode=i}return Nt(r),null;case 31:if(l=r.memoizedState,i===null||i.memoizedState!==null){if(u=Ls(r),l!==null){if(i===null){if(!u)throw Error(a(318));if(i=r.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[$t]=r}else zr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Nt(r),i=!1}else l=Nd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return r.flags&256?(Wn(r),r):(Wn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Nt(r),null;case 13:if(u=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=Ls(r),u!==null&&u.dehydrated!==null){if(i===null){if(!p)throw Error(a(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[$t]=r}else zr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Nt(r),p=!1}else p=Nd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(Wn(r),r):(Wn(r),null)}return Wn(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,i=i!==null&&i.memoizedState!==null,l&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==p&&(u.flags|=2048)),l!==i&&l&&(r.child.flags|=8192),hu(r,r.updateQueue),Nt(r),null);case 4:return it(),i===null&&zh(r.stateNode.containerInfo),Nt(r),null;case 10:return ca(r.type),Nt(r),null;case 19:if(te(Pt),u=r.memoizedState,u===null)return Nt(r),null;if(p=(r.flags&128)!==0,b=u.rendering,b===null)if(p)wo(u,!1);else{if(It!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(b=eu(i),b!==null){for(r.flags|=128,wo(u,!1),i=b.updateQueue,r.updateQueue=i,hu(r,i),r.subtreeFlags=0,i=l,l=r.child;l!==null;)db(l,i),l=l.sibling;return T(Pt,Pt.current&1|2),Ze&&la(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&Ot()>yu&&(r.flags|=128,p=!0,wo(u,!1),r.lanes=4194304)}else{if(!p)if(i=eu(b),i!==null){if(r.flags|=128,p=!0,i=i.updateQueue,r.updateQueue=i,hu(r,i),wo(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!Ze)return Nt(r),null}else 2*Ot()-u.renderingStartTime>yu&&l!==536870912&&(r.flags|=128,p=!0,wo(u,!1),r.lanes=4194304);u.isBackwards?(b.sibling=r.child,r.child=b):(i=u.last,i!==null?i.sibling=b:r.child=b,u.last=b)}return u.tail!==null?(i=u.tail,u.rendering=i,u.tail=i.sibling,u.renderingStartTime=Ot(),i.sibling=null,l=Pt.current,T(Pt,p?l&1|2:l&1),Ze&&la(r,u.treeForkCount),i):(Nt(r),null);case 22:case 23:return Wn(r),Bd(),u=r.memoizedState!==null,i!==null?i.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(Nt(r),r.subtreeFlags&6&&(r.flags|=8192)):Nt(r),l=r.updateQueue,l!==null&&hu(r,l.retryQueue),l=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),i!==null&&te($r),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),ca(Gt),Nt(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function qw(i,r){switch(_d(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return ca(Gt),it(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return Kn(r),null;case 31:if(r.memoizedState!==null){if(Wn(r),r.alternate===null)throw Error(a(340));zr()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(Wn(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(a(340));zr()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return te(Pt),null;case 4:return it(),null;case 10:return ca(r.type),null;case 22:case 23:return Wn(r),Bd(),i!==null&&te($r),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return ca(Gt),null;case 25:return null;default:return null}}function Uy(i,r){switch(_d(r),r.tag){case 3:ca(Gt),it();break;case 26:case 27:case 5:Kn(r);break;case 4:it();break;case 31:r.memoizedState!==null&&Wn(r);break;case 13:Wn(r);break;case 19:te(Pt);break;case 10:ca(r.type);break;case 22:case 23:Wn(r),Bd(),i!==null&&te($r);break;case 24:ca(Gt)}}function No(i,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&i)===i){u=void 0;var b=l.create,E=l.inst;u=b(),E.destroy=u}l=l.next}while(l!==p)}}catch(k){ft(r,r.return,k)}}function Qa(i,r,l){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&i)===i){var E=u.inst,k=E.destroy;if(k!==void 0){E.destroy=void 0,p=r;var I=l,X=k;try{X()}catch(ie){ft(p,I,ie)}}}u=u.next}while(u!==b)}}catch(ie){ft(r,r.return,ie)}}function $y(i){var r=i.updateQueue;if(r!==null){var l=i.stateNode;try{Ob(r,l)}catch(u){ft(i,i.return,u)}}}function Fy(i,r,l){l.props=Kr(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(u){ft(i,r,u)}}function ko(i,r){try{var l=i.ref;if(l!==null){switch(i.tag){case 26:case 27:case 5:var u=i.stateNode;break;case 30:u=i.stateNode;break;default:u=i.stateNode}typeof l=="function"?i.refCleanup=l(u):l.current=u}}catch(p){ft(i,r,p)}}function Pi(i,r){var l=i.ref,u=i.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(p){ft(i,r,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){ft(i,r,p)}else l.current=null}function Py(i){var r=i.type,l=i.memoizedProps,u=i.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(p){ft(i,i.return,p)}}function gh(i,r,l){try{var u=i.stateNode;fN(u,i.type,l,r),u[fn]=r}catch(p){ft(i,i.return,p)}}function qy(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&er(i.type)||i.tag===4}function bh(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||qy(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&er(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function yh(i,r,l){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(i,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(i),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=de));else if(u!==4&&(u===27&&er(i.type)&&(l=i.stateNode,r=null),i=i.child,i!==null))for(yh(i,r,l),i=i.sibling;i!==null;)yh(i,r,l),i=i.sibling}function mu(i,r,l){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?l.insertBefore(i,r):l.appendChild(i);else if(u!==4&&(u===27&&er(i.type)&&(l=i.stateNode),i=i.child,i!==null))for(mu(i,r,l),i=i.sibling;i!==null;)mu(i,r,l),i=i.sibling}function Hy(i){var r=i.stateNode,l=i.memoizedProps;try{for(var u=i.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);cn(r,u,l),r[$t]=i,r[fn]=l}catch(b){ft(i,i.return,b)}}var ma=!1,Vt=!1,xh=!1,Ky=typeof WeakSet=="function"?WeakSet:Set,tn=null;function Hw(i,r){if(i=i.containerInfo,$h=Lu,i=ib(i),dd(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var p=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{l.nodeType,b.nodeType}catch{l=null;break e}var E=0,k=-1,I=-1,X=0,ie=0,se=i,W=null;t:for(;;){for(var ee;se!==l||p!==0&&se.nodeType!==3||(k=E+p),se!==b||u!==0&&se.nodeType!==3||(I=E+u),se.nodeType===3&&(E+=se.nodeValue.length),(ee=se.firstChild)!==null;)W=se,se=ee;for(;;){if(se===i)break t;if(W===l&&++X===p&&(k=E),W===b&&++ie===u&&(I=E),(ee=se.nextSibling)!==null)break;se=W,W=se.parentNode}se=ee}l=k===-1||I===-1?null:{start:k,end:I}}else l=null}l=l||{start:0,end:0}}else l=null;for(Fh={focusedElem:i,selectionRange:l},Lu=!1,tn=r;tn!==null;)if(r=tn,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,tn=i;else for(;tn!==null;){switch(r=tn,b=r.alternate,i=r.flags,r.tag){case 0:if((i&4)!==0&&(i=r.updateQueue,i=i!==null?i.events:null,i!==null))for(l=0;l<i.length;l++)p=i[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&b!==null){i=void 0,l=r,p=b.memoizedProps,b=b.memoizedState,u=l.stateNode;try{var ye=Kr(l.type,p);i=u.getSnapshotBeforeUpdate(ye,b),u.__reactInternalSnapshotBeforeUpdate=i}catch(Ae){ft(l,l.return,Ae)}}break;case 3:if((i&1024)!==0){if(i=r.stateNode.containerInfo,l=i.nodeType,l===9)Hh(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Hh(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(a(163))}if(i=r.sibling,i!==null){i.return=r.return,tn=i;break}tn=r.return}}function Gy(i,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:ga(i,l),u&4&&No(5,l);break;case 1:if(ga(i,l),u&4)if(i=l.stateNode,r===null)try{i.componentDidMount()}catch(E){ft(l,l.return,E)}else{var p=Kr(l.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(p,r,i.__reactInternalSnapshotBeforeUpdate)}catch(E){ft(l,l.return,E)}}u&64&&$y(l),u&512&&ko(l,l.return);break;case 3:if(ga(i,l),u&64&&(i=l.updateQueue,i!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Ob(i,r)}catch(E){ft(l,l.return,E)}}break;case 27:r===null&&u&4&&Hy(l);case 26:case 5:ga(i,l),r===null&&u&4&&Py(l),u&512&&ko(l,l.return);break;case 12:ga(i,l);break;case 31:ga(i,l),u&4&&Vy(i,l);break;case 13:ga(i,l),u&4&&Xy(i,l),u&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=Jw.bind(null,l),xN(i,l))));break;case 22:if(u=l.memoizedState!==null||ma,!u){r=r!==null&&r.memoizedState!==null||Vt,p=ma;var b=Vt;ma=u,(Vt=r)&&!b?ba(i,l,(l.subtreeFlags&8772)!==0):ga(i,l),ma=p,Vt=b}break;case 30:break;default:ga(i,l)}}function Qy(i){var r=i.alternate;r!==null&&(i.alternate=null,Qy(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&Vl(r)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Tt=null,Mn=!1;function pa(i,r,l){for(l=l.child;l!==null;)Yy(i,r,l),l=l.sibling}function Yy(i,r,l){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(an,l)}catch{}switch(l.tag){case 26:Vt||Pi(l,r),pa(i,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Vt||Pi(l,r);var u=Tt,p=Mn;er(l.type)&&(Tt=l.stateNode,Mn=!1),pa(i,r,l),Lo(l.stateNode),Tt=u,Mn=p;break;case 5:Vt||Pi(l,r);case 6:if(u=Tt,p=Mn,Tt=null,pa(i,r,l),Tt=u,Mn=p,Tt!==null)if(Mn)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(l.stateNode)}catch(b){ft(l,r,b)}else try{Tt.removeChild(l.stateNode)}catch(b){ft(l,r,b)}break;case 18:Tt!==null&&(Mn?(i=Tt,$x(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),nl(i)):$x(Tt,l.stateNode));break;case 4:u=Tt,p=Mn,Tt=l.stateNode.containerInfo,Mn=!0,pa(i,r,l),Tt=u,Mn=p;break;case 0:case 11:case 14:case 15:Qa(2,l,r),Vt||Qa(4,l,r),pa(i,r,l);break;case 1:Vt||(Pi(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Fy(l,r,u)),pa(i,r,l);break;case 21:pa(i,r,l);break;case 22:Vt=(u=Vt)||l.memoizedState!==null,pa(i,r,l),Vt=u;break;default:pa(i,r,l)}}function Vy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{nl(i)}catch(l){ft(r,r.return,l)}}}function Xy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{nl(i)}catch(l){ft(r,r.return,l)}}function Kw(i){switch(i.tag){case 31:case 13:case 19:var r=i.stateNode;return r===null&&(r=i.stateNode=new Ky),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new Ky),r;default:throw Error(a(435,i.tag))}}function pu(i,r){var l=Kw(i);r.forEach(function(u){if(!l.has(u)){l.add(u);var p=eN.bind(null,i,u);u.then(p,p)}})}function jn(i,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var p=l[u],b=i,E=r,k=E;e:for(;k!==null;){switch(k.tag){case 27:if(er(k.type)){Tt=k.stateNode,Mn=!1;break e}break;case 5:Tt=k.stateNode,Mn=!1;break e;case 3:case 4:Tt=k.stateNode.containerInfo,Mn=!0;break e}k=k.return}if(Tt===null)throw Error(a(160));Yy(b,E,p),Tt=null,Mn=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Zy(r,i),r=r.sibling}var Ti=null;function Zy(i,r){var l=i.alternate,u=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:jn(r,i),Dn(i),u&4&&(Qa(3,i,i.return),No(3,i),Qa(5,i,i.return));break;case 1:jn(r,i),Dn(i),u&512&&(Vt||l===null||Pi(l,l.return)),u&64&&ma&&(i=i.updateQueue,i!==null&&(u=i.callbacks,u!==null&&(l=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var p=Ti;if(jn(r,i),Dn(i),u&512&&(Vt||l===null||Pi(l,l.return)),u&4){var b=l!==null?l.memoizedState:null;if(u=i.memoizedState,l===null)if(u===null)if(i.stateNode===null){e:{u=i.type,l=i.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":b=p.getElementsByTagName("title")[0],(!b||b[Ar]||b[$t]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(u),p.head.insertBefore(b,p.querySelector("head > title"))),cn(b,u,l),b[$t]=i,Ht(b),u=b;break e;case"link":var E=Zx("link","href",p).get(u+(l.href||""));if(E){for(var k=0;k<E.length;k++)if(b=E[k],b.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&b.getAttribute("rel")===(l.rel==null?null:l.rel)&&b.getAttribute("title")===(l.title==null?null:l.title)&&b.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){E.splice(k,1);break t}}b=p.createElement(u),cn(b,u,l),p.head.appendChild(b);break;case"meta":if(E=Zx("meta","content",p).get(u+(l.content||""))){for(k=0;k<E.length;k++)if(b=E[k],b.getAttribute("content")===(l.content==null?null:""+l.content)&&b.getAttribute("name")===(l.name==null?null:l.name)&&b.getAttribute("property")===(l.property==null?null:l.property)&&b.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&b.getAttribute("charset")===(l.charSet==null?null:l.charSet)){E.splice(k,1);break t}}b=p.createElement(u),cn(b,u,l),p.head.appendChild(b);break;default:throw Error(a(468,u))}b[$t]=i,Ht(b),u=b}i.stateNode=u}else Wx(p,i.type,i.stateNode);else i.stateNode=Xx(p,u,i.memoizedProps);else b!==u?(b===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):b.count--,u===null?Wx(p,i.type,i.stateNode):Xx(p,u,i.memoizedProps)):u===null&&i.stateNode!==null&&gh(i,i.memoizedProps,l.memoizedProps)}break;case 27:jn(r,i),Dn(i),u&512&&(Vt||l===null||Pi(l,l.return)),l!==null&&u&4&&gh(i,i.memoizedProps,l.memoizedProps);break;case 5:if(jn(r,i),Dn(i),u&512&&(Vt||l===null||Pi(l,l.return)),i.flags&32){p=i.stateNode;try{Oe(p,"")}catch(ye){ft(i,i.return,ye)}}u&4&&i.stateNode!=null&&(p=i.memoizedProps,gh(i,p,l!==null?l.memoizedProps:p)),u&1024&&(xh=!0);break;case 6:if(jn(r,i),Dn(i),u&4){if(i.stateNode===null)throw Error(a(162));u=i.memoizedProps,l=i.stateNode;try{l.nodeValue=u}catch(ye){ft(i,i.return,ye)}}break;case 3:if(Ru=null,p=Ti,Ti=Au(r.containerInfo),jn(r,i),Ti=p,Dn(i),u&4&&l!==null&&l.memoizedState.isDehydrated)try{nl(r.containerInfo)}catch(ye){ft(i,i.return,ye)}xh&&(xh=!1,Wy(i));break;case 4:u=Ti,Ti=Au(i.stateNode.containerInfo),jn(r,i),Dn(i),Ti=u;break;case 12:jn(r,i),Dn(i);break;case 31:jn(r,i),Dn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,pu(i,u)));break;case 13:jn(r,i),Dn(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(bu=Ot()),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,pu(i,u)));break;case 22:p=i.memoizedState!==null;var I=l!==null&&l.memoizedState!==null,X=ma,ie=Vt;if(ma=X||p,Vt=ie||I,jn(r,i),Vt=ie,ma=X,Dn(i),u&8192)e:for(r=i.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(l===null||I||ma||Vt||Gr(i)),l=null,r=i;;){if(r.tag===5||r.tag===26){if(l===null){I=l=r;try{if(b=I.stateNode,p)E=b.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{k=I.stateNode;var se=I.memoizedProps.style,W=se!=null&&se.hasOwnProperty("display")?se.display:null;k.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(ye){ft(I,I.return,ye)}}}else if(r.tag===6){if(l===null){I=r;try{I.stateNode.nodeValue=p?"":I.memoizedProps}catch(ye){ft(I,I.return,ye)}}}else if(r.tag===18){if(l===null){I=r;try{var ee=I.stateNode;p?Fx(ee,!0):Fx(I.stateNode,!1)}catch(ye){ft(I,I.return,ye)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===i)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=i.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,pu(i,l))));break;case 19:jn(r,i),Dn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,pu(i,u)));break;case 30:break;case 21:break;default:jn(r,i),Dn(i)}}function Dn(i){var r=i.flags;if(r&2){try{for(var l,u=i.return;u!==null;){if(qy(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var p=l.stateNode,b=bh(i);mu(i,b,p);break;case 5:var E=l.stateNode;l.flags&32&&(Oe(E,""),l.flags&=-33);var k=bh(i);mu(i,k,E);break;case 3:case 4:var I=l.stateNode.containerInfo,X=bh(i);yh(i,X,I);break;default:throw Error(a(161))}}catch(ie){ft(i,i.return,ie)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function Wy(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;Wy(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),i=i.sibling}}function ga(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Gy(i,r.alternate,r),r=r.sibling}function Gr(i){for(i=i.child;i!==null;){var r=i;switch(r.tag){case 0:case 11:case 14:case 15:Qa(4,r,r.return),Gr(r);break;case 1:Pi(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Fy(r,r.return,l),Gr(r);break;case 27:Lo(r.stateNode);case 26:case 5:Pi(r,r.return),Gr(r);break;case 22:r.memoizedState===null&&Gr(r);break;case 30:Gr(r);break;default:Gr(r)}i=i.sibling}}function ba(i,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=i,b=r,E=b.flags;switch(b.tag){case 0:case 11:case 15:ba(p,b,l),No(4,b);break;case 1:if(ba(p,b,l),u=b,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(X){ft(u,u.return,X)}if(u=b,p=u.updateQueue,p!==null){var k=u.stateNode;try{var I=p.shared.hiddenCallbacks;if(I!==null)for(p.shared.hiddenCallbacks=null,p=0;p<I.length;p++)Ab(I[p],k)}catch(X){ft(u,u.return,X)}}l&&E&64&&$y(b),ko(b,b.return);break;case 27:Hy(b);case 26:case 5:ba(p,b,l),l&&u===null&&E&4&&Py(b),ko(b,b.return);break;case 12:ba(p,b,l);break;case 31:ba(p,b,l),l&&E&4&&Vy(p,b);break;case 13:ba(p,b,l),l&&E&4&&Xy(p,b);break;case 22:b.memoizedState===null&&ba(p,b,l),ko(b,b.return);break;case 30:break;default:ba(p,b,l)}r=r.sibling}}function vh(i,r){var l=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==l&&(i!=null&&i.refCount++,l!=null&&fo(l))}function Eh(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&fo(i))}function Ci(i,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Jy(i,r,l,u),r=r.sibling}function Jy(i,r,l,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Ci(i,r,l,u),p&2048&&No(9,r);break;case 1:Ci(i,r,l,u);break;case 3:Ci(i,r,l,u),p&2048&&(i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&fo(i)));break;case 12:if(p&2048){Ci(i,r,l,u),i=r.stateNode;try{var b=r.memoizedProps,E=b.id,k=b.onPostCommit;typeof k=="function"&&k(E,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(I){ft(r,r.return,I)}}else Ci(i,r,l,u);break;case 31:Ci(i,r,l,u);break;case 13:Ci(i,r,l,u);break;case 23:break;case 22:b=r.stateNode,E=r.alternate,r.memoizedState!==null?b._visibility&2?Ci(i,r,l,u):To(i,r):b._visibility&2?Ci(i,r,l,u):(b._visibility|=2,Ks(i,r,l,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&vh(E,r);break;case 24:Ci(i,r,l,u),p&2048&&Eh(r.alternate,r);break;default:Ci(i,r,l,u)}}function Ks(i,r,l,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var b=i,E=r,k=l,I=u,X=E.flags;switch(E.tag){case 0:case 11:case 15:Ks(b,E,k,I,p),No(8,E);break;case 23:break;case 22:var ie=E.stateNode;E.memoizedState!==null?ie._visibility&2?Ks(b,E,k,I,p):To(b,E):(ie._visibility|=2,Ks(b,E,k,I,p)),p&&X&2048&&vh(E.alternate,E);break;case 24:Ks(b,E,k,I,p),p&&X&2048&&Eh(E.alternate,E);break;default:Ks(b,E,k,I,p)}r=r.sibling}}function To(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=i,u=r,p=u.flags;switch(u.tag){case 22:To(l,u),p&2048&&vh(u.alternate,u);break;case 24:To(l,u),p&2048&&Eh(u.alternate,u);break;default:To(l,u)}r=r.sibling}}var Co=8192;function Gs(i,r,l){if(i.subtreeFlags&Co)for(i=i.child;i!==null;)ex(i,r,l),i=i.sibling}function ex(i,r,l){switch(i.tag){case 26:Gs(i,r,l),i.flags&Co&&i.memoizedState!==null&&RN(l,Ti,i.memoizedState,i.memoizedProps);break;case 5:Gs(i,r,l);break;case 3:case 4:var u=Ti;Ti=Au(i.stateNode.containerInfo),Gs(i,r,l),Ti=u;break;case 22:i.memoizedState===null&&(u=i.alternate,u!==null&&u.memoizedState!==null?(u=Co,Co=16777216,Gs(i,r,l),Co=u):Gs(i,r,l));break;default:Gs(i,r,l)}}function tx(i){var r=i.alternate;if(r!==null&&(i=r.child,i!==null)){r.child=null;do r=i.sibling,i.sibling=null,i=r;while(i!==null)}}function Ao(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];tn=u,ix(u,i)}tx(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)nx(i),i=i.sibling}function nx(i){switch(i.tag){case 0:case 11:case 15:Ao(i),i.flags&2048&&Qa(9,i,i.return);break;case 3:Ao(i);break;case 12:Ao(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,gu(i)):Ao(i);break;default:Ao(i)}}function gu(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];tn=u,ix(u,i)}tx(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Qa(8,r,r.return),gu(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,gu(r));break;default:gu(r)}i=i.sibling}}function ix(i,r){for(;tn!==null;){var l=tn;switch(l.tag){case 0:case 11:case 15:Qa(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:fo(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,tn=u;else e:for(l=i;tn!==null;){u=tn;var p=u.sibling,b=u.return;if(Qy(u),u===l){tn=null;break e}if(p!==null){p.return=b,tn=p;break e}tn=b}}}var Gw={getCacheForType:function(i){var r=ln(Gt),l=r.data.get(i);return l===void 0&&(l=i(),r.data.set(i,l)),l},cacheSignal:function(){return ln(Gt).controller.signal}},Qw=typeof WeakMap=="function"?WeakMap:Map,at=0,yt=null,He=null,Ye=0,ut=0,Jn=null,Ya=!1,Qs=!1,Sh=!1,ya=0,It=0,Va=0,Qr=0,_h=0,ei=0,Ys=0,Oo=null,Ln=null,wh=!1,bu=0,ax=0,yu=1/0,xu=null,Xa=null,Jt=0,Za=null,Vs=null,xa=0,Nh=0,kh=null,rx=null,Ro=0,Th=null;function ti(){return(at&2)!==0&&Ye!==0?Ye&-Ye:G.T!==null?jh():Es()}function sx(){if(ei===0)if((Ye&536870912)===0||Ze){var i=vs;vs<<=1,(vs&3932160)===0&&(vs=262144),ei=i}else ei=536870912;return i=Zn.current,i!==null&&(i.flags|=32),ei}function In(i,r,l){(i===yt&&(ut===2||ut===9)||i.cancelPendingCommit!==null)&&(Xs(i,0),Wa(i,Ye,ei,!1)),bt(i,l),((at&2)===0||i!==yt)&&(i===yt&&((at&2)===0&&(Qr|=l),It===4&&Wa(i,Ye,ei,!1)),qi(i))}function lx(i,r,l){if((at&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&i.expiredLanes)===0||ae(i,r),p=u?Xw(i,r):Ah(i,r,!0),b=u;do{if(p===0){Qs&&!u&&Wa(i,r,0,!1);break}else{if(l=i.current.alternate,b&&!Yw(l)){p=Ah(i,r,!1),b=!1;continue}if(p===2){if(b=r,i.errorRecoveryDisabledLanes&b)var E=0;else E=i.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){r=E;e:{var k=i;p=Oo;var I=k.current.memoizedState.isDehydrated;if(I&&(Xs(k,E).flags|=256),E=Ah(k,E,!1),E!==2){if(Sh&&!I){k.errorRecoveryDisabledLanes|=b,Qr|=b,p=4;break e}b=Ln,Ln=p,b!==null&&(Ln===null?Ln=b:Ln.push.apply(Ln,b))}p=E}if(b=!1,p!==2)continue}}if(p===1){Xs(i,0),Wa(i,r,0,!0);break}e:{switch(u=i,b=p,b){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Wa(u,r,ei,!Ya);break e;case 2:Ln=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(p=bu+300-Ot(),10<p)){if(Wa(u,r,ei,!Ya),B(u,0,!0)!==0)break e;xa=r,u.timeoutHandle=Bx(ox.bind(null,u,l,Ln,xu,wh,r,ei,Qr,Ys,Ya,b,"Throttled",-0,0),p);break e}ox(u,l,Ln,xu,wh,r,ei,Qr,Ys,Ya,b,null,-0,0)}}break}while(!0);qi(i)}function ox(i,r,l,u,p,b,E,k,I,X,ie,se,W,ee){if(i.timeoutHandle=-1,se=r.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:de},ex(r,b,se);var ye=(b&62914560)===b?bu-Ot():(b&4194048)===b?ax-Ot():0;if(ye=MN(se,ye),ye!==null){xa=b,i.cancelPendingCommit=ye(gx.bind(null,i,r,b,l,u,p,E,k,I,ie,se,null,W,ee)),Wa(i,b,E,!X);return}}gx(i,r,b,l,u,p,E,k,I)}function Yw(i){for(var r=i;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var p=l[u],b=p.getSnapshot;p=p.value;try{if(!Vn(b(),p))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Wa(i,r,l,u){r&=~_h,r&=~Qr,i.suspendedLanes|=r,i.pingedLanes&=~r,u&&(i.warmLanes|=r),u=i.expirationTimes;for(var p=r;0<p;){var b=31-lt(p),E=1<<b;u[b]=-1,p&=~E}l!==0&&be(i,l,r)}function vu(){return(at&6)===0?(Mo(0),!1):!0}function Ch(){if(He!==null){if(ut===0)var i=He.return;else i=He,oa=Br=null,Hd(i),$s=null,mo=0,i=He;for(;i!==null;)Uy(i.alternate,i),i=i.return;He=null}}function Xs(i,r){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,mN(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),xa=0,Ch(),yt=i,He=l=sa(i.current,null),Ye=r,ut=0,Jn=null,Ya=!1,Qs=ae(i,r),Sh=!1,Ys=ei=_h=Qr=Va=It=0,Ln=Oo=null,wh=!1,(r&8)!==0&&(r|=r&32);var u=i.entangledLanes;if(u!==0)for(i=i.entanglements,u&=r;0<u;){var p=31-lt(u),b=1<<p;r|=i[p],u&=~b}return ya=r,Fc(),l}function cx(i,r){ze=null,G.H=So,r===Us||r===Vc?(r=Nb(),ut=3):r===Md?(r=Nb(),ut=4):ut=r===sh?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Jn=r,He===null&&(It=1,cu(i,ui(r,i.current)))}function ux(){var i=Zn.current;return i===null?!0:(Ye&4194048)===Ye?mi===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?i===mi:!1}function fx(){var i=G.H;return G.H=So,i===null?So:i}function dx(){var i=G.A;return G.A=Gw,i}function Eu(){It=4,Ya||(Ye&4194048)!==Ye&&Zn.current!==null||(Qs=!0),(Va&134217727)===0&&(Qr&134217727)===0||yt===null||Wa(yt,Ye,ei,!1)}function Ah(i,r,l){var u=at;at|=2;var p=fx(),b=dx();(yt!==i||Ye!==r)&&(xu=null,Xs(i,r)),r=!1;var E=It;e:do try{if(ut!==0&&He!==null){var k=He,I=Jn;switch(ut){case 8:Ch(),E=6;break e;case 3:case 2:case 9:case 6:Zn.current===null&&(r=!0);var X=ut;if(ut=0,Jn=null,Zs(i,k,I,X),l&&Qs){E=0;break e}break;default:X=ut,ut=0,Jn=null,Zs(i,k,I,X)}}Vw(),E=It;break}catch(ie){cx(i,ie)}while(!0);return r&&i.shellSuspendCounter++,oa=Br=null,at=u,G.H=p,G.A=b,He===null&&(yt=null,Ye=0,Fc()),E}function Vw(){for(;He!==null;)hx(He)}function Xw(i,r){var l=at;at|=2;var u=fx(),p=dx();yt!==i||Ye!==r?(xu=null,yu=Ot()+500,Xs(i,r)):Qs=ae(i,r);e:do try{if(ut!==0&&He!==null){r=He;var b=Jn;t:switch(ut){case 1:ut=0,Jn=null,Zs(i,r,b,1);break;case 2:case 9:if(_b(b)){ut=0,Jn=null,mx(r);break}r=function(){ut!==2&&ut!==9||yt!==i||(ut=7),qi(i)},b.then(r,r);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:_b(b)?(ut=0,Jn=null,mx(r)):(ut=0,Jn=null,Zs(i,r,b,7));break;case 5:var E=null;switch(He.tag){case 26:E=He.memoizedState;case 5:case 27:var k=He;if(E?Jx(E):k.stateNode.complete){ut=0,Jn=null;var I=k.sibling;if(I!==null)He=I;else{var X=k.return;X!==null?(He=X,Su(X)):He=null}break t}}ut=0,Jn=null,Zs(i,r,b,5);break;case 6:ut=0,Jn=null,Zs(i,r,b,6);break;case 8:Ch(),It=6;break e;default:throw Error(a(462))}}Zw();break}catch(ie){cx(i,ie)}while(!0);return oa=Br=null,G.H=u,G.A=p,at=l,He!==null?0:(yt=null,Ye=0,Fc(),It)}function Zw(){for(;He!==null&&!Ql();)hx(He)}function hx(i){var r=zy(i.alternate,i,ya);i.memoizedProps=i.pendingProps,r===null?Su(i):He=r}function mx(i){var r=i,l=r.alternate;switch(r.tag){case 15:case 0:r=Ry(l,r,r.pendingProps,r.type,void 0,Ye);break;case 11:r=Ry(l,r,r.pendingProps,r.type.render,r.ref,Ye);break;case 5:Hd(r);default:Uy(l,r),r=He=db(r,ya),r=zy(l,r,ya)}i.memoizedProps=i.pendingProps,r===null?Su(i):He=r}function Zs(i,r,l,u){oa=Br=null,Hd(r),$s=null,mo=0;var p=r.return;try{if(Uw(i,p,r,l,Ye)){It=1,cu(i,ui(l,i.current)),He=null;return}}catch(b){if(p!==null)throw He=p,b;It=1,cu(i,ui(l,i.current)),He=null;return}r.flags&32768?(Ze||u===1?i=!0:Qs||(Ye&536870912)!==0?i=!1:(Ya=i=!0,(u===2||u===9||u===3||u===6)&&(u=Zn.current,u!==null&&u.tag===13&&(u.flags|=16384))),px(r,i)):Su(r)}function Su(i){var r=i;do{if((r.flags&32768)!==0){px(r,Ya);return}i=r.return;var l=Pw(r.alternate,r,ya);if(l!==null){He=l;return}if(r=r.sibling,r!==null){He=r;return}He=r=i}while(r!==null);It===0&&(It=5)}function px(i,r){do{var l=qw(i.alternate,i);if(l!==null){l.flags&=32767,He=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(i=i.sibling,i!==null)){He=i;return}He=i=l}while(i!==null);It=6,He=null}function gx(i,r,l,u,p,b,E,k,I){i.cancelPendingCommit=null;do _u();while(Jt!==0);if((at&6)!==0)throw Error(a(327));if(r!==null){if(r===i.current)throw Error(a(177));if(b=r.lanes|r.childLanes,b|=bd,xe(i,l,b,E,k,I),i===yt&&(He=yt=null,Ye=0),Vs=r,Za=i,xa=l,Nh=b,kh=p,rx=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,tN(Ce,function(){return Ex(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=G.T,G.T=null,p=oe.p,oe.p=2,E=at,at|=4;try{Hw(i,r,l)}finally{at=E,oe.p=p,G.T=u}}Jt=1,bx(),yx(),xx()}}function bx(){if(Jt===1){Jt=0;var i=Za,r=Vs,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=G.T,G.T=null;var u=oe.p;oe.p=2;var p=at;at|=4;try{Zy(r,i);var b=Fh,E=ib(i.containerInfo),k=b.focusedElem,I=b.selectionRange;if(E!==k&&k&&k.ownerDocument&&nb(k.ownerDocument.documentElement,k)){if(I!==null&&dd(k)){var X=I.start,ie=I.end;if(ie===void 0&&(ie=X),"selectionStart"in k)k.selectionStart=X,k.selectionEnd=Math.min(ie,k.value.length);else{var se=k.ownerDocument||document,W=se&&se.defaultView||window;if(W.getSelection){var ee=W.getSelection(),ye=k.textContent.length,Ae=Math.min(I.start,ye),pt=I.end===void 0?Ae:Math.min(I.end,ye);!ee.extend&&Ae>pt&&(E=pt,pt=Ae,Ae=E);var K=tb(k,Ae),$=tb(k,pt);if(K&&$&&(ee.rangeCount!==1||ee.anchorNode!==K.node||ee.anchorOffset!==K.offset||ee.focusNode!==$.node||ee.focusOffset!==$.offset)){var V=se.createRange();V.setStart(K.node,K.offset),ee.removeAllRanges(),Ae>pt?(ee.addRange(V),ee.extend($.node,$.offset)):(V.setEnd($.node,$.offset),ee.addRange(V))}}}}for(se=[],ee=k;ee=ee.parentNode;)ee.nodeType===1&&se.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<se.length;k++){var re=se[k];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Lu=!!$h,Fh=$h=null}finally{at=p,oe.p=u,G.T=l}}i.current=r,Jt=2}}function yx(){if(Jt===2){Jt=0;var i=Za,r=Vs,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=G.T,G.T=null;var u=oe.p;oe.p=2;var p=at;at|=4;try{Gy(i,r.alternate,r)}finally{at=p,oe.p=u,G.T=l}}Jt=3}}function xx(){if(Jt===4||Jt===3){Jt=0,ys();var i=Za,r=Vs,l=xa,u=rx;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Jt=5:(Jt=0,Vs=Za=null,vx(i,i.pendingLanes));var p=i.pendingLanes;if(p===0&&(Xa=null),ta(l),r=r.stateNode,Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(an,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=G.T,p=oe.p,oe.p=2,G.T=null;try{for(var b=i.onRecoverableError,E=0;E<u.length;E++){var k=u[E];b(k.value,{componentStack:k.stack})}}finally{G.T=r,oe.p=p}}(xa&3)!==0&&_u(),qi(i),p=i.pendingLanes,(l&261930)!==0&&(p&42)!==0?i===Th?Ro++:(Ro=0,Th=i):Ro=0,Mo(0)}}function vx(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,fo(r)))}function _u(){return bx(),yx(),xx(),Ex()}function Ex(){if(Jt!==5)return!1;var i=Za,r=Nh;Nh=0;var l=ta(xa),u=G.T,p=oe.p;try{oe.p=32>l?32:l,G.T=null,l=kh,kh=null;var b=Za,E=xa;if(Jt=0,Vs=Za=null,xa=0,(at&6)!==0)throw Error(a(331));var k=at;if(at|=4,nx(b.current),Jy(b,b.current,E,l),at=k,Mo(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(an,b)}catch{}return!0}finally{oe.p=p,G.T=u,vx(i,r)}}function Sx(i,r,l){r=ui(l,r),r=rh(i.stateNode,r,2),i=Ha(i,r,2),i!==null&&(bt(i,2),qi(i))}function ft(i,r,l){if(i.tag===3)Sx(i,i,l);else for(;r!==null;){if(r.tag===3){Sx(r,i,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Xa===null||!Xa.has(u))){i=ui(l,i),l=_y(2),u=Ha(r,l,2),u!==null&&(wy(l,u,r,i),bt(u,2),qi(u));break}}r=r.return}}function Oh(i,r,l){var u=i.pingCache;if(u===null){u=i.pingCache=new Qw;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(l)||(Sh=!0,p.add(l),i=Ww.bind(null,i,r,l),r.then(i,i))}function Ww(i,r,l){var u=i.pingCache;u!==null&&u.delete(r),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,yt===i&&(Ye&l)===l&&(It===4||It===3&&(Ye&62914560)===Ye&&300>Ot()-bu?(at&2)===0&&Xs(i,0):_h|=l,Ys===Ye&&(Ys=0)),qi(i)}function _x(i,r){r===0&&(r=je()),i=Lr(i,r),i!==null&&(bt(i,r),qi(i))}function Jw(i){var r=i.memoizedState,l=0;r!==null&&(l=r.retryLane),_x(i,l)}function eN(i,r){var l=0;switch(i.tag){case 31:case 13:var u=i.stateNode,p=i.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=i.stateNode;break;case 22:u=i.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),_x(i,l)}function tN(i,r){return ea(i,r)}var wu=null,Ws=null,Rh=!1,Nu=!1,Mh=!1,Ja=0;function qi(i){i!==Ws&&i.next===null&&(Ws===null?wu=Ws=i:Ws=Ws.next=i),Nu=!0,Rh||(Rh=!0,iN())}function Mo(i,r){if(!Mh&&Nu){Mh=!0;do for(var l=!1,u=wu;u!==null;){if(i!==0){var p=u.pendingLanes;if(p===0)var b=0;else{var E=u.suspendedLanes,k=u.pingedLanes;b=(1<<31-lt(42|i)+1)-1,b&=p&~(E&~k),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(l=!0,Tx(u,b))}else b=Ye,b=B(u,u===yt?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||ae(u,b)||(l=!0,Tx(u,b));u=u.next}while(l);Mh=!1}}function nN(){wx()}function wx(){Nu=Rh=!1;var i=0;Ja!==0&&hN()&&(i=Ja);for(var r=Ot(),l=null,u=wu;u!==null;){var p=u.next,b=Nx(u,r);b===0?(u.next=null,l===null?wu=p:l.next=p,p===null&&(Ws=l)):(l=u,(i!==0||(b&3)!==0)&&(Nu=!0)),u=p}Jt!==0&&Jt!==5||Mo(i),Ja!==0&&(Ja=0)}function Nx(i,r){for(var l=i.suspendedLanes,u=i.pingedLanes,p=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var E=31-lt(b),k=1<<E,I=p[E];I===-1?((k&l)===0||(k&u)!==0)&&(p[E]=me(k,r)):I<=r&&(i.expiredLanes|=k),b&=~k}if(r=yt,l=Ye,l=B(i,i===r?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,l===0||i===r&&(ut===2||ut===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&kr(u),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||ae(i,l)){if(r=l&-l,r===i.callbackPriority)return r;switch(u!==null&&kr(u),ta(l)){case 2:case 8:l=fe;break;case 32:l=Ce;break;case 268435456:l=et;break;default:l=Ce}return u=kx.bind(null,i),l=ea(l,u),i.callbackPriority=r,i.callbackNode=l,r}return u!==null&&u!==null&&kr(u),i.callbackPriority=2,i.callbackNode=null,2}function kx(i,r){if(Jt!==0&&Jt!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(_u()&&i.callbackNode!==l)return null;var u=Ye;return u=B(i,i===yt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(lx(i,u,r),Nx(i,Ot()),i.callbackNode!=null&&i.callbackNode===l?kx.bind(null,i):null)}function Tx(i,r){if(_u())return null;lx(i,r,!0)}function iN(){pN(function(){(at&6)!==0?ea(ne,nN):wx()})}function jh(){if(Ja===0){var i=zs;i===0&&(i=Tr,Tr<<=1,(Tr&261888)===0&&(Tr=256)),Ja=i}return Ja}function Cx(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ia(""+i)}function Ax(i,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,i.id&&l.setAttribute("form",i.id),r.parentNode.insertBefore(l,r),i=new FormData(i),l.parentNode.removeChild(l),i}function aN(i,r,l,u,p){if(r==="submit"&&l&&l.stateNode===p){var b=Cx((p[fn]||null).action),E=u.submitter;E&&(r=(r=E[fn]||null)?Cx(r.formAction):E.getAttribute("formAction"),r!==null&&(b=r,E=null));var k=new zc("action","action",null,u,p);i.push({event:k,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Ja!==0){var I=E?Ax(p,E):new FormData(p);Jd(l,{pending:!0,data:I,method:p.method,action:b},null,I)}}else typeof b=="function"&&(k.preventDefault(),I=E?Ax(p,E):new FormData(p),Jd(l,{pending:!0,data:I,method:p.method,action:b},b,I))},currentTarget:p}]})}}for(var Dh=0;Dh<gd.length;Dh++){var Lh=gd[Dh],rN=Lh.toLowerCase(),sN=Lh[0].toUpperCase()+Lh.slice(1);ki(rN,"on"+sN)}ki(sb,"onAnimationEnd"),ki(lb,"onAnimationIteration"),ki(ob,"onAnimationStart"),ki("dblclick","onDoubleClick"),ki("focusin","onFocus"),ki("focusout","onBlur"),ki(Sw,"onTransitionRun"),ki(_w,"onTransitionStart"),ki(ww,"onTransitionCancel"),ki(cb,"onTransitionEnd"),ce("onMouseEnter",["mouseout","mouseover"]),ce("onMouseLeave",["mouseout","mouseover"]),ce("onPointerEnter",["pointerout","pointerover"]),ce("onPointerLeave",["pointerout","pointerover"]),ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jo="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(" "),lN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(jo));function Ox(i,r){r=(r&4)!==0;for(var l=0;l<i.length;l++){var u=i[l],p=u.event;u=u.listeners;e:{var b=void 0;if(r)for(var E=u.length-1;0<=E;E--){var k=u[E],I=k.instance,X=k.currentTarget;if(k=k.listener,I!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=X;try{b(p)}catch(ie){$c(ie)}p.currentTarget=null,b=I}else for(E=0;E<u.length;E++){if(k=u[E],I=k.instance,X=k.currentTarget,k=k.listener,I!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=X;try{b(p)}catch(ie){$c(ie)}p.currentTarget=null,b=I}}}}function Ke(i,r){var l=r[Yl];l===void 0&&(l=r[Yl]=new Set);var u=i+"__bubble";l.has(u)||(Rx(r,i,2,!1),l.add(u))}function Ih(i,r,l){var u=0;r&&(u|=4),Rx(l,i,u,r)}var ku="_reactListening"+Math.random().toString(36).slice(2);function zh(i){if(!i[ku]){i[ku]=!0,Ac.forEach(function(l){l!=="selectionchange"&&(lN.has(l)||Ih(l,!1,i),Ih(l,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[ku]||(r[ku]=!0,Ih("selectionchange",!1,r))}}function Rx(i,r,l,u){switch(sv(r)){case 2:var p=LN;break;case 8:p=IN;break;default:p=Wh}l=p.bind(null,r,l,i),p=void 0,!id||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?i.addEventListener(r,l,{capture:!0,passive:p}):i.addEventListener(r,l,!0):p!==void 0?i.addEventListener(r,l,{passive:p}):i.addEventListener(r,l,!1)}function Bh(i,r,l,u,p){var b=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var E=u.tag;if(E===3||E===4){var k=u.stateNode.containerInfo;if(k===p)break;if(E===4)for(E=u.return;E!==null;){var I=E.tag;if((I===3||I===4)&&E.stateNode.containerInfo===p)return;E=E.return}for(;k!==null;){if(E=vn(k),E===null)return;if(I=E.tag,I===5||I===6||I===26||I===27){u=b=E;continue e}k=k.parentNode}}u=u.return}jc(function(){var X=b,ie=Ie(l),se=[];e:{var W=ub.get(i);if(W!==void 0){var ee=zc,ye=i;switch(i){case"keypress":if(Lc(l)===0)break e;case"keydown":case"keyup":ee=ew;break;case"focusin":ye="focus",ee=ld;break;case"focusout":ye="blur",ee=ld;break;case"beforeblur":case"afterblur":ee=ld;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=Ug;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=P_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=iw;break;case sb:case lb:case ob:ee=K_;break;case cb:ee=rw;break;case"scroll":case"scrollend":ee=$_;break;case"wheel":ee=lw;break;case"copy":case"cut":case"paste":ee=Q_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Fg;break;case"toggle":case"beforetoggle":ee=cw}var Ae=(r&4)!==0,pt=!Ae&&(i==="scroll"||i==="scrollend"),K=Ae?W!==null?W+"Capture":null:W;Ae=[];for(var $=X,V;$!==null;){var re=$;if(V=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||V===null||K===null||(re=eo($,K),re!=null&&Ae.push(Do($,re,V))),pt)break;$=$.return}0<Ae.length&&(W=new ee(W,ye,null,l,ie),se.push({event:W,listeners:Ae}))}}if((r&7)===0){e:{if(W=i==="mouseover"||i==="pointerover",ee=i==="mouseout"||i==="pointerout",W&&l!==Ee&&(ye=l.relatedTarget||l.fromElement)&&(vn(ye)||ye[Ma]))break e;if((ee||W)&&(W=ie.window===ie?ie:(W=ie.ownerDocument)?W.defaultView||W.parentWindow:window,ee?(ye=l.relatedTarget||l.toElement,ee=X,ye=ye?vn(ye):null,ye!==null&&(pt=o(ye),Ae=ye.tag,ye!==pt||Ae!==5&&Ae!==27&&Ae!==6)&&(ye=null)):(ee=null,ye=X),ee!==ye)){if(Ae=Ug,re="onMouseLeave",K="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Ae=Fg,re="onPointerLeave",K="onPointerEnter",$="pointer"),pt=ee==null?W:ja(ee),V=ye==null?W:ja(ye),W=new Ae(re,$+"leave",ee,l,ie),W.target=pt,W.relatedTarget=V,re=null,vn(ie)===X&&(Ae=new Ae(K,$+"enter",ye,l,ie),Ae.target=V,Ae.relatedTarget=pt,re=Ae),pt=re,ee&&ye)t:{for(Ae=oN,K=ee,$=ye,V=0,re=K;re;re=Ae(re))V++;re=0;for(var ke=$;ke;ke=Ae(ke))re++;for(;0<V-re;)K=Ae(K),V--;for(;0<re-V;)$=Ae($),re--;for(;V--;){if(K===$||$!==null&&K===$.alternate){Ae=K;break t}K=Ae(K),$=Ae($)}Ae=null}else Ae=null;ee!==null&&Mx(se,W,ee,Ae,!1),ye!==null&&pt!==null&&Mx(se,pt,ye,Ae,!0)}}e:{if(W=X?ja(X):window,ee=W.nodeName&&W.nodeName.toLowerCase(),ee==="select"||ee==="input"&&W.type==="file")var tt=Vg;else if(Qg(W))if(Xg)tt=xw;else{tt=bw;var Se=gw}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?X&&La(X.elementType)&&(tt=Vg):tt=yw;if(tt&&(tt=tt(i,X))){Yg(se,tt,l,ie);break e}Se&&Se(i,W,X),i==="focusout"&&X&&W.type==="number"&&X.memoizedProps.value!=null&&ks(W,"number",W.value)}switch(Se=X?ja(X):window,i){case"focusin":(Qg(Se)||Se.contentEditable==="true")&&(As=Se,hd=X,oo=null);break;case"focusout":oo=hd=As=null;break;case"mousedown":md=!0;break;case"contextmenu":case"mouseup":case"dragend":md=!1,ab(se,l,ie);break;case"selectionchange":if(Ew)break;case"keydown":case"keyup":ab(se,l,ie)}var Be;if(cd)e:{switch(i){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Cs?Kg(i,l)&&(Ve="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ve="onCompositionStart");Ve&&(Pg&&l.locale!=="ko"&&(Cs||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Cs&&(Be=zg()):(za=ie,ad="value"in za?za.value:za.textContent,Cs=!0)),Se=Tu(X,Ve),0<Se.length&&(Ve=new $g(Ve,i,null,l,ie),se.push({event:Ve,listeners:Se}),Be?Ve.data=Be:(Be=Gg(l),Be!==null&&(Ve.data=Be)))),(Be=fw?dw(i,l):hw(i,l))&&(Ve=Tu(X,"onBeforeInput"),0<Ve.length&&(Se=new $g("onBeforeInput","beforeinput",null,l,ie),se.push({event:Se,listeners:Ve}),Se.data=Be)),aN(se,i,X,l,ie)}Ox(se,r)})}function Do(i,r,l){return{instance:i,listener:r,currentTarget:l}}function Tu(i,r){for(var l=r+"Capture",u=[];i!==null;){var p=i,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=eo(i,l),p!=null&&u.unshift(Do(i,p,b)),p=eo(i,r),p!=null&&u.push(Do(i,p,b))),i.tag===3)return u;i=i.return}return[]}function oN(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Mx(i,r,l,u,p){for(var b=r._reactName,E=[];l!==null&&l!==u;){var k=l,I=k.alternate,X=k.stateNode;if(k=k.tag,I!==null&&I===u)break;k!==5&&k!==26&&k!==27||X===null||(I=X,p?(X=eo(l,b),X!=null&&E.unshift(Do(l,X,I))):p||(X=eo(l,b),X!=null&&E.push(Do(l,X,I)))),l=l.return}E.length!==0&&i.push({event:r,listeners:E})}var cN=/\r\n?/g,uN=/\u0000|\uFFFD/g;function jx(i){return(typeof i=="string"?i:""+i).replace(cN,`
49
+ `).replace(uN,"")}function Dx(i,r){return r=jx(r),jx(i)===r}function mt(i,r,l,u,p,b){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Oe(i,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Oe(i,""+u);break;case"className":Qn(i,"class",u);break;case"tabIndex":Qn(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Qn(i,l,u);break;case"style":ct(i,u,b);break;case"data":if(r!=="object"){Qn(i,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){i.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=Ia(""+u),i.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){i.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(l==="formAction"?(r!=="input"&&mt(i,r,"name",p.name,p,null),mt(i,r,"formEncType",p.formEncType,p,null),mt(i,r,"formMethod",p.formMethod,p,null),mt(i,r,"formTarget",p.formTarget,p,null)):(mt(i,r,"encType",p.encType,p,null),mt(i,r,"method",p.method,p,null),mt(i,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=Ia(""+u),i.setAttribute(l,u);break;case"onClick":u!=null&&(i.onclick=de);break;case"onScroll":u!=null&&Ke("scroll",i);break;case"onScrollEnd":u!=null&&Ke("scrollend",i);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"multiple":i.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":i.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){i.removeAttribute("xlink:href");break}l=Ia(""+u),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""+u):i.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":u===!0?i.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,u):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?i.setAttribute(l,u):i.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?i.removeAttribute(l):i.setAttribute(l,u);break;case"popover":Ke("beforetoggle",i),Ke("toggle",i),dn(i,"popover",u);break;case"xlinkActuate":An(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":An(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":An(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":An(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":An(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":An(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":An(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":An(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":An(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":dn(i,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=aa.get(l)||l,dn(i,l,u))}}function Uh(i,r,l,u,p,b){switch(l){case"style":ct(i,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"children":typeof u=="string"?Oe(i,u):(typeof u=="number"||typeof u=="bigint")&&Oe(i,""+u);break;case"onScroll":u!=null&&Ke("scroll",i);break;case"onScrollEnd":u!=null&&Ke("scrollend",i);break;case"onClick":u!=null&&(i.onclick=de);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Or.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),r=l.slice(2,p?l.length-7:void 0),b=i[fn]||null,b=b!=null?b[l]:null,typeof b=="function"&&i.removeEventListener(r,b,p),typeof u=="function")){typeof b!="function"&&b!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(r,u,p);break e}l in i?i[l]=u:u===!0?i.setAttribute(l,""):dn(i,l,u)}}}function cn(i,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",i),Ke("load",i);var u=!1,p=!1,b;for(b in l)if(l.hasOwnProperty(b)){var E=l[b];if(E!=null)switch(b){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,b,E,l,null)}}p&&mt(i,r,"srcSet",l.srcSet,l,null),u&&mt(i,r,"src",l.src,l,null);return;case"input":Ke("invalid",i);var k=b=E=p=null,I=null,X=null;for(u in l)if(l.hasOwnProperty(u)){var ie=l[u];if(ie!=null)switch(u){case"name":p=ie;break;case"type":E=ie;break;case"checked":I=ie;break;case"defaultChecked":X=ie;break;case"value":b=ie;break;case"defaultValue":k=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,r));break;default:mt(i,r,u,ie,l,null)}}Rr(i,b,k,I,X,E,p,!1);return;case"select":Ke("invalid",i),u=E=b=null;for(p in l)if(l.hasOwnProperty(p)&&(k=l[p],k!=null))switch(p){case"value":b=k;break;case"defaultValue":E=k;break;case"multiple":u=k;default:mt(i,r,p,k,l,null)}r=b,l=E,i.multiple=!!u,r!=null?rn(i,!!u,r,!1):l!=null&&rn(i,!!u,l,!0);return;case"textarea":Ke("invalid",i),b=p=u=null;for(E in l)if(l.hasOwnProperty(E)&&(k=l[E],k!=null))switch(E){case"value":u=k;break;case"defaultValue":p=k;break;case"children":b=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(a(91));break;default:mt(i,r,E,k,l,null)}Ts(i,u,p,b);return;case"option":for(I in l)if(l.hasOwnProperty(I)&&(u=l[I],u!=null))switch(I){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:mt(i,r,I,u,l,null)}return;case"dialog":Ke("beforetoggle",i),Ke("toggle",i),Ke("cancel",i),Ke("close",i);break;case"iframe":case"object":Ke("load",i);break;case"video":case"audio":for(u=0;u<jo.length;u++)Ke(jo[u],i);break;case"image":Ke("error",i),Ke("load",i);break;case"details":Ke("toggle",i);break;case"embed":case"source":case"link":Ke("error",i),Ke("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in l)if(l.hasOwnProperty(X)&&(u=l[X],u!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,X,u,l,null)}return;default:if(La(r)){for(ie in l)l.hasOwnProperty(ie)&&(u=l[ie],u!==void 0&&Uh(i,r,ie,u,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(u=l[k],u!=null&&mt(i,r,k,u,l,null))}function fN(i,r,l,u){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,E=null,k=null,I=null,X=null,ie=null;for(ee in l){var se=l[ee];if(l.hasOwnProperty(ee)&&se!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":I=se;default:u.hasOwnProperty(ee)||mt(i,r,ee,null,u,se)}}for(var W in u){var ee=u[W];if(se=l[W],u.hasOwnProperty(W)&&(ee!=null||se!=null))switch(W){case"type":b=ee;break;case"name":p=ee;break;case"checked":X=ee;break;case"defaultChecked":ie=ee;break;case"value":E=ee;break;case"defaultValue":k=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,r));break;default:ee!==se&&mt(i,r,W,ee,u,se)}}Zl(i,E,k,I,X,ie,b,p);return;case"select":ee=E=k=W=null;for(b in l)if(I=l[b],l.hasOwnProperty(b)&&I!=null)switch(b){case"value":break;case"multiple":ee=I;default:u.hasOwnProperty(b)||mt(i,r,b,null,u,I)}for(p in u)if(b=u[p],I=l[p],u.hasOwnProperty(p)&&(b!=null||I!=null))switch(p){case"value":W=b;break;case"defaultValue":k=b;break;case"multiple":E=b;default:b!==I&&mt(i,r,p,b,u,I)}r=k,l=E,u=ee,W!=null?rn(i,!!l,W,!1):!!u!=!!l&&(r!=null?rn(i,!!l,r,!0):rn(i,!!l,l?[]:"",!1));return;case"textarea":ee=W=null;for(k in l)if(p=l[k],l.hasOwnProperty(k)&&p!=null&&!u.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:mt(i,r,k,null,u,p)}for(E in u)if(p=u[E],b=l[E],u.hasOwnProperty(E)&&(p!=null||b!=null))switch(E){case"value":W=p;break;case"defaultValue":ee=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==b&&mt(i,r,E,p,u,b)}Rc(i,W,ee);return;case"option":for(var ye in l)if(W=l[ye],l.hasOwnProperty(ye)&&W!=null&&!u.hasOwnProperty(ye))switch(ye){case"selected":i.selected=!1;break;default:mt(i,r,ye,null,u,W)}for(I in u)if(W=u[I],ee=l[I],u.hasOwnProperty(I)&&W!==ee&&(W!=null||ee!=null))switch(I){case"selected":i.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:mt(i,r,I,W,u,ee)}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 Ae in l)W=l[Ae],l.hasOwnProperty(Ae)&&W!=null&&!u.hasOwnProperty(Ae)&&mt(i,r,Ae,null,u,W);for(X in u)if(W=u[X],ee=l[X],u.hasOwnProperty(X)&&W!==ee&&(W!=null||ee!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,r));break;default:mt(i,r,X,W,u,ee)}return;default:if(La(r)){for(var pt in l)W=l[pt],l.hasOwnProperty(pt)&&W!==void 0&&!u.hasOwnProperty(pt)&&Uh(i,r,pt,void 0,u,W);for(ie in u)W=u[ie],ee=l[ie],!u.hasOwnProperty(ie)||W===ee||W===void 0&&ee===void 0||Uh(i,r,ie,W,u,ee);return}}for(var K in l)W=l[K],l.hasOwnProperty(K)&&W!=null&&!u.hasOwnProperty(K)&&mt(i,r,K,null,u,W);for(se in u)W=u[se],ee=l[se],!u.hasOwnProperty(se)||W===ee||W==null&&ee==null||mt(i,r,se,W,u,ee)}function Lx(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dN(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var p=l[u],b=p.transferSize,E=p.initiatorType,k=p.duration;if(b&&k&&Lx(E)){for(E=0,k=p.responseEnd,u+=1;u<l.length;u++){var I=l[u],X=I.startTime;if(X>k)break;var ie=I.transferSize,se=I.initiatorType;ie&&Lx(se)&&(I=I.responseEnd,E+=ie*(I<k?1:(k-X)/(I-X)))}if(--u,r+=8*(b+E)/(p.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var $h=null,Fh=null;function Cu(i){return i.nodeType===9?i:i.ownerDocument}function Ix(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zx(i,r){if(i===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&r==="foreignObject"?0:i}function Ph(i,r){return i==="textarea"||i==="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 qh=null;function hN(){var i=window.event;return i&&i.type==="popstate"?i===qh?!1:(qh=i,!0):(qh=null,!1)}var Bx=typeof setTimeout=="function"?setTimeout:void 0,mN=typeof clearTimeout=="function"?clearTimeout:void 0,Ux=typeof Promise=="function"?Promise:void 0,pN=typeof queueMicrotask=="function"?queueMicrotask:typeof Ux<"u"?function(i){return Ux.resolve(null).then(i).catch(gN)}:Bx;function gN(i){setTimeout(function(){throw i})}function er(i){return i==="head"}function $x(i,r){var l=r,u=0;do{var p=l.nextSibling;if(i.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(u===0){i.removeChild(p),nl(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Lo(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Lo(l);for(var b=l.firstChild;b;){var E=b.nextSibling,k=b.nodeName;b[Ar]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&b.rel.toLowerCase()==="stylesheet"||l.removeChild(b),b=E}}else l==="body"&&Lo(i.ownerDocument.body);l=p}while(l);nl(r)}function Fx(i,r){var l=i;i=0;do{var u=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(i===0)break;i--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||i++;l=u}while(l)}function Hh(i){var r=i.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Hh(l),Vl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function bN(i,r,l,u){for(;i.nodeType===1;){var p=l;if(i.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(u){if(!i[Ar])switch(r){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==p.rel||i.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(b=i.getAttribute("src"),(b!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=pi(i.nextSibling),i===null)break}return null}function yN(i,r,l){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=pi(i.nextSibling),i===null))return null;return i}function Px(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=pi(i.nextSibling),i===null))return null;return i}function Kh(i){return i.data==="$?"||i.data==="$~"}function Gh(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function xN(i,r){var l=i.ownerDocument;if(i.data==="$~")i._reactRetry=r;else if(i.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),i._reactRetry=u}}function pi(i){for(;i!=null;i=i.nextSibling){var r=i.nodeType;if(r===1||r===3)break;if(r===8){if(r=i.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return i}var Qh=null;function qx(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(r===0)return pi(i.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}i=i.nextSibling}return null}function Hx(i){i=i.previousSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return i;r--}else l!=="/$"&&l!=="/&"||r++}i=i.previousSibling}return null}function Kx(i,r,l){switch(r=Cu(l),i){case"html":if(i=r.documentElement,!i)throw Error(a(452));return i;case"head":if(i=r.head,!i)throw Error(a(453));return i;case"body":if(i=r.body,!i)throw Error(a(454));return i;default:throw Error(a(451))}}function Lo(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);Vl(i)}var gi=new Map,Gx=new Set;function Au(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var va=oe.d;oe.d={f:vN,r:EN,D:SN,C:_N,L:wN,m:NN,X:TN,S:kN,M:CN};function vN(){var i=va.f(),r=vu();return i||r}function EN(i){var r=na(i);r!==null&&r.tag===5&&r.type==="form"?cy(r):va.r(i)}var Js=typeof document>"u"?null:document;function Qx(i,r,l){var u=Js;if(u&&typeof r=="string"&&r){var p=On(r);p='link[rel="'+i+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),Gx.has(p)||(Gx.add(p),i={rel:i,crossOrigin:l,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),cn(r,"link",i),Ht(r),u.head.appendChild(r)))}}function SN(i){va.D(i),Qx("dns-prefetch",i,null)}function _N(i,r){va.C(i,r),Qx("preconnect",i,r)}function wN(i,r,l){va.L(i,r,l);var u=Js;if(u&&i&&r){var p='link[rel="preload"][as="'+On(r)+'"]';r==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+On(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+On(l.imageSizes)+'"]')):p+='[href="'+On(i)+'"]';var b=p;switch(r){case"style":b=el(i);break;case"script":b=tl(i)}gi.has(b)||(i=g({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:i,as:r},l),gi.set(b,i),u.querySelector(p)!==null||r==="style"&&u.querySelector(Io(b))||r==="script"&&u.querySelector(zo(b))||(r=u.createElement("link"),cn(r,"link",i),Ht(r),u.head.appendChild(r)))}}function NN(i,r){va.m(i,r);var l=Js;if(l&&i){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+On(u)+'"][href="'+On(i)+'"]',b=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=tl(i)}if(!gi.has(b)&&(i=g({rel:"modulepreload",href:i},r),gi.set(b,i),l.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(zo(b)))return}u=l.createElement("link"),cn(u,"link",i),Ht(u),l.head.appendChild(u)}}}function kN(i,r,l){va.S(i,r,l);var u=Js;if(u&&i){var p=Da(u).hoistableStyles,b=el(i);r=r||"default";var E=p.get(b);if(!E){var k={loading:0,preload:null};if(E=u.querySelector(Io(b)))k.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":r},l),(l=gi.get(b))&&Yh(i,l);var I=E=u.createElement("link");Ht(I),cn(I,"link",i),I._p=new Promise(function(X,ie){I.onload=X,I.onerror=ie}),I.addEventListener("load",function(){k.loading|=1}),I.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Ou(E,r,u)}E={type:"stylesheet",instance:E,count:1,state:k},p.set(b,E)}}}function TN(i,r){va.X(i,r);var l=Js;if(l&&i){var u=Da(l).hoistableScripts,p=tl(i),b=u.get(p);b||(b=l.querySelector(zo(p)),b||(i=g({src:i,async:!0},r),(r=gi.get(p))&&Vh(i,r),b=l.createElement("script"),Ht(b),cn(b,"link",i),l.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function CN(i,r){va.M(i,r);var l=Js;if(l&&i){var u=Da(l).hoistableScripts,p=tl(i),b=u.get(p);b||(b=l.querySelector(zo(p)),b||(i=g({src:i,async:!0,type:"module"},r),(r=gi.get(p))&&Vh(i,r),b=l.createElement("script"),Ht(b),cn(b,"link",i),l.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function Yx(i,r,l,u){var p=(p=ve.current)?Au(p):null;if(!p)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=el(l.href),l=Da(p).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){i=el(l.href);var b=Da(p).hoistableStyles,E=b.get(i);if(E||(p=p.ownerDocument||p,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,E),(b=p.querySelector(Io(i)))&&!b._p&&(E.instance=b,E.state.loading=5),gi.has(i)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},gi.set(i,l),b||AN(p,i,l,E.state))),r&&u===null)throw Error(a(528,""));return E}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=tl(l),l=Da(p).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function el(i){return'href="'+On(i)+'"'}function Io(i){return'link[rel="stylesheet"]['+i+"]"}function Vx(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function AN(i,r,l,u){i.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=i.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),cn(r,"link",l),Ht(r),i.head.appendChild(r))}function tl(i){return'[src="'+On(i)+'"]'}function zo(i){return"script[async]"+i}function Xx(i,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=i.querySelector('style[data-href~="'+On(l.href)+'"]');if(u)return r.instance=u,Ht(u),u;var p=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(i.ownerDocument||i).createElement("style"),Ht(u),cn(u,"style",p),Ou(u,l.precedence,i),r.instance=u;case"stylesheet":p=el(l.href);var b=i.querySelector(Io(p));if(b)return r.state.loading|=4,r.instance=b,Ht(b),b;u=Vx(l),(p=gi.get(p))&&Yh(u,p),b=(i.ownerDocument||i).createElement("link"),Ht(b);var E=b;return E._p=new Promise(function(k,I){E.onload=k,E.onerror=I}),cn(b,"link",u),r.state.loading|=4,Ou(b,l.precedence,i),r.instance=b;case"script":return b=tl(l.src),(p=i.querySelector(zo(b)))?(r.instance=p,Ht(p),p):(u=l,(p=gi.get(b))&&(u=g({},l),Vh(u,p)),i=i.ownerDocument||i,p=i.createElement("script"),Ht(p),cn(p,"link",u),i.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Ou(u,l.precedence,i));return r.instance}function Ou(i,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,b=p,E=0;E<u.length;E++){var k=u[E];if(k.dataset.precedence===r)b=k;else if(b!==p)break}b?b.parentNode.insertBefore(i,b.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(i,r.firstChild))}function Yh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function Vh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var Ru=null;function Zx(i,r,l){if(Ru===null){var u=new Map,p=Ru=new Map;p.set(l,u)}else p=Ru,u=p.get(l),u||(u=new Map,p.set(l,u));if(u.has(i))return u;for(u.set(i,null),l=l.getElementsByTagName(i),p=0;p<l.length;p++){var b=l[p];if(!(b[Ar]||b[$t]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var E=b.getAttribute(r)||"";E=i+E;var k=u.get(E);k?k.push(b):u.set(E,[b])}}return u}function Wx(i,r,l){i=i.ownerDocument||i,i.head.insertBefore(l,r==="title"?i.querySelector("head > title"):null)}function ON(i,r,l){if(l===1||r.itemProp!=null)return!1;switch(i){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 i=r.disabled,typeof r.precedence=="string"&&i==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 Jx(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function RN(i,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=el(u.href),b=r.querySelector(Io(p));if(b){r=b._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=Mu.bind(i),r.then(i,i)),l.state.loading|=4,l.instance=b,Ht(b);return}b=r.ownerDocument||r,u=Vx(u),(p=gi.get(p))&&Yh(u,p),b=b.createElement("link"),Ht(b);var E=b;E._p=new Promise(function(k,I){E.onload=k,E.onerror=I}),cn(b,"link",u),l.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=Mu.bind(i),r.addEventListener("load",l),r.addEventListener("error",l))}}var Xh=0;function MN(i,r){return i.stylesheets&&i.count===0&&Du(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var u=setTimeout(function(){if(i.stylesheets&&Du(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+r);0<i.imgBytes&&Xh===0&&(Xh=62500*dN());var p=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Du(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>Xh?50:800)+r);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Mu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Du(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var ju=null;function Du(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,ju=new Map,r.forEach(jN,i),ju=null,Mu.call(i))}function jN(i,r){if(!(r.state.loading&4)){var l=ju.get(i);if(l)var u=l.get(null);else{l=new Map,ju.set(i,l);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var E=p[b];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(l.set(E.dataset.precedence,E),u=E)}u&&l.set(null,u)}p=r.instance,E=p.getAttribute("data-precedence"),b=l.get(E)||u,b===u&&l.set(null,p),l.set(E,p),this.count++,u=Mu.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),b?b.parentNode.insertBefore(p,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),r.state.loading|=4}}var Bo={$$typeof:A,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function DN(i,r,l,u,p,b,E,k,I){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=_t(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_t(0),this.hiddenUpdates=_t(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function ev(i,r,l,u,p,b,E,k,I,X,ie,se){return i=new DN(i,r,l,E,I,X,ie,se,k),r=1,b===!0&&(r|=24),b=Xn(3,null,null,r),i.current=b,b.stateNode=i,r=Ad(),r.refCount++,i.pooledCache=r,r.refCount++,b.memoizedState={element:u,isDehydrated:l,cache:r},jd(b),i}function tv(i){return i?(i=Ms,i):Ms}function nv(i,r,l,u,p,b){p=tv(p),u.context===null?u.context=p:u.pendingContext=p,u=qa(r),u.payload={element:l},b=b===void 0?null:b,b!==null&&(u.callback=b),l=Ha(i,u,r),l!==null&&(In(l,i,r),go(l,i,r))}function iv(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<r?l:r}}function Zh(i,r){iv(i,r),(i=i.alternate)&&iv(i,r)}function av(i){if(i.tag===13||i.tag===31){var r=Lr(i,67108864);r!==null&&In(r,i,67108864),Zh(i,67108864)}}function rv(i){if(i.tag===13||i.tag===31){var r=ti();r=kt(r);var l=Lr(i,r);l!==null&&In(l,i,r),Zh(i,r)}}var Lu=!0;function LN(i,r,l,u){var p=G.T;G.T=null;var b=oe.p;try{oe.p=2,Wh(i,r,l,u)}finally{oe.p=b,G.T=p}}function IN(i,r,l,u){var p=G.T;G.T=null;var b=oe.p;try{oe.p=8,Wh(i,r,l,u)}finally{oe.p=b,G.T=p}}function Wh(i,r,l,u){if(Lu){var p=Jh(u);if(p===null)Bh(i,r,u,Iu,l),lv(i,u);else if(BN(p,i,r,l,u))u.stopPropagation();else if(lv(i,u),r&4&&-1<zN.indexOf(i)){for(;p!==null;){var b=na(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=Cn(b.pendingLanes);if(E!==0){var k=b;for(k.pendingLanes|=2,k.entangledLanes|=2;E;){var I=1<<31-lt(E);k.entanglements[1]|=I,E&=~I}qi(b),(at&6)===0&&(yu=Ot()+500,Mo(0))}}break;case 31:case 13:k=Lr(b,2),k!==null&&In(k,b,2),vu(),Zh(b,2)}if(b=Jh(u),b===null&&Bh(i,r,u,Iu,l),b===p)break;p=b}p!==null&&u.stopPropagation()}else Bh(i,r,u,null,l)}}function Jh(i){return i=Ie(i),em(i)}var Iu=null;function em(i){if(Iu=null,i=vn(i),i!==null){var r=o(i);if(r===null)i=null;else{var l=r.tag;if(l===13){if(i=c(r),i!==null)return i;i=null}else if(l===31){if(i=f(r),i!==null)return i;i=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return Iu=i,null}function sv(i){switch(i){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(xs()){case ne:return 2;case fe:return 8;case Ce:case Pe:return 32;case et:return 268435456;default:return 32}default:return 32}}var tm=!1,tr=null,nr=null,ir=null,Uo=new Map,$o=new Map,ar=[],zN="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 lv(i,r){switch(i){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":ir=null;break;case"pointerover":case"pointerout":Uo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":$o.delete(r.pointerId)}}function Fo(i,r,l,u,p,b){return i===null||i.nativeEvent!==b?(i={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:b,targetContainers:[p]},r!==null&&(r=na(r),r!==null&&av(r)),i):(i.eventSystemFlags|=u,r=i.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),i)}function BN(i,r,l,u,p){switch(r){case"focusin":return tr=Fo(tr,i,r,l,u,p),!0;case"dragenter":return nr=Fo(nr,i,r,l,u,p),!0;case"mouseover":return ir=Fo(ir,i,r,l,u,p),!0;case"pointerover":var b=p.pointerId;return Uo.set(b,Fo(Uo.get(b)||null,i,r,l,u,p)),!0;case"gotpointercapture":return b=p.pointerId,$o.set(b,Fo($o.get(b)||null,i,r,l,u,p)),!0}return!1}function ov(i){var r=vn(i.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){i.blockedOn=r,Ss(i.priority,function(){rv(l)});return}}else if(r===31){if(r=f(l),r!==null){i.blockedOn=r,Ss(i.priority,function(){rv(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function zu(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var l=Jh(i.nativeEvent);if(l===null){l=i.nativeEvent;var u=new l.constructor(l.type,l);Ee=u,l.target.dispatchEvent(u),Ee=null}else return r=na(l),r!==null&&av(r),i.blockedOn=l,!1;r.shift()}return!0}function cv(i,r,l){zu(i)&&l.delete(r)}function UN(){tm=!1,tr!==null&&zu(tr)&&(tr=null),nr!==null&&zu(nr)&&(nr=null),ir!==null&&zu(ir)&&(ir=null),Uo.forEach(cv),$o.forEach(cv)}function Bu(i,r){i.blockedOn===r&&(i.blockedOn=null,tm||(tm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,UN)))}var Uu=null;function uv(i){Uu!==i&&(Uu=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Uu===i&&(Uu=null);for(var r=0;r<i.length;r+=3){var l=i[r],u=i[r+1],p=i[r+2];if(typeof u!="function"){if(em(u||l)===null)continue;break}var b=na(l);b!==null&&(i.splice(r,3),r-=3,Jd(b,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function nl(i){function r(I){return Bu(I,i)}tr!==null&&Bu(tr,i),nr!==null&&Bu(nr,i),ir!==null&&Bu(ir,i),Uo.forEach(r),$o.forEach(r);for(var l=0;l<ar.length;l++){var u=ar[l];u.blockedOn===i&&(u.blockedOn=null)}for(;0<ar.length&&(l=ar[0],l.blockedOn===null);)ov(l),l.blockedOn===null&&ar.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var p=l[u],b=l[u+1],E=p[fn]||null;if(typeof b=="function")E||uv(l);else if(E){var k=null;if(b&&b.hasAttribute("formAction")){if(p=b,E=b[fn]||null)k=E.formAction;else if(em(p)!==null)continue}else k=E.action;typeof k=="function"?l[u+1]=k:(l.splice(u,3),u-=3),uv(l)}}}function fv(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(E){return p=E})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),u||setTimeout(l,20)}function l(){if(!u&&!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 u=!1,p=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function nm(i){this._internalRoot=i}$u.prototype.render=nm.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=ti();nv(l,u,i,r,null,null)},$u.prototype.unmount=nm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;nv(i.current,2,null,i,null,null),vu(),r[Ma]=null}};function $u(i){this._internalRoot=i}$u.prototype.unstable_scheduleHydration=function(i){if(i){var r=Es();i={blockedOn:null,target:i,priority:r};for(var l=0;l<ar.length&&r!==0&&r<ar[l].priority;l++);ar.splice(l,0,i),l===0&&ov(i)}};var dv=t.version;if(dv!=="19.2.5")throw Error(a(527,dv,"19.2.5"));oe.findDOMNode=function(i){var r=i._reactInternals;if(r===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=h(r),i=i!==null?y(i):null,i=i===null?null:i.stateNode,i};var $N={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{an=Fu.inject($N),Dt=Fu}catch{}}return qo.createRoot=function(i,r){if(!s(i))throw Error(a(299));var l=!1,u="",p=xy,b=vy,E=Ey;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(E=r.onRecoverableError)),r=ev(i,1,!1,null,null,l,u,null,p,b,E,fv),i[Ma]=r.current,zh(i),new nm(r)},qo.hydrateRoot=function(i,r,l){if(!s(i))throw Error(a(299));var u=!1,p="",b=xy,E=vy,k=Ey,I=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(b=l.onUncaughtError),l.onCaughtError!==void 0&&(E=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(I=l.formState)),r=ev(i,1,!0,r,l??null,u,p,I,b,E,k,fv),r.context=tv(null),l=r.current,u=ti(),u=kt(u),p=qa(u),p.callback=null,Ha(l,p,u),l=u,r.current.lanes=l,bt(r,l),qi(r),i[Ma]=r.current,zh(i),new $u(r)},qo.version="19.2.5",qo}var wv;function WN(){if(wv)return sm.exports;wv=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(),sm.exports=ZN(),sm.exports}var JN=WN(),jl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ts,ur,bl,lE,ek=(lE=class extends jl{constructor(){super();we(this,ts);we(this,ur);we(this,bl);ge(this,bl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,ur)||this.setEventListener(z(this,bl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,ur))==null||t.call(this),ge(this,ur,void 0))}setEventListener(t){var n;ge(this,bl,t),(n=z(this,ur))==null||n.call(this),ge(this,ur,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){z(this,ts)!==t&&(ge(this,ts,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof z(this,ts)=="boolean"?z(this,ts):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ts=new WeakMap,ur=new WeakMap,bl=new WeakMap,lE),Cp=new ek,tk={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fr,Np,oE,nk=(oE=class{constructor(){we(this,fr,tk);we(this,Np,!1)}setTimeoutProvider(e){ge(this,fr,e)}setTimeout(e,t){return z(this,fr).setTimeout(e,t)}clearTimeout(e){z(this,fr).clearTimeout(e)}setInterval(e,t){return z(this,fr).setInterval(e,t)}clearInterval(e){z(this,fr).clearInterval(e)}},fr=new WeakMap,Np=new WeakMap,oE),Zr=new nk;function ik(e){setTimeout(e,0)}var ak=typeof window>"u"||"Deno"in globalThis;function wn(){}function rk(e,t){return typeof e=="function"?e(t):e}function qm(e){return typeof e=="number"&&e>=0&&e!==1/0}function yE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xr(e,t){return typeof e=="function"?e(t):e}function yi(e,t){return typeof e=="function"?e(t):e}function Nv(e,t){const{type:n="all",exact:a,fetchStatus:s,predicate:o,queryKey:c,stale:f}=e;if(c){if(a){if(t.queryHash!==Ap(c,t.options))return!1}else if(!ic(t.queryKey,c))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||s&&s!==t.state.fetchStatus||o&&!o(t))}function kv(e,t){const{exact:n,status:a,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(us(t.options.mutationKey)!==us(o))return!1}else if(!ic(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function Ap(e,t){return((t==null?void 0:t.queryKeyHashFn)||us)(e)}function us(e){return JSON.stringify(e,(t,n)=>Hm(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function ic(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ic(e[n],t[n])):!1}var sk=Object.prototype.hasOwnProperty;function xE(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=Tv(e)&&Tv(t);if(!a&&!(Hm(e)&&Hm(t)))return t;const o=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),f=c.length,d=a?new Array(f):{};let h=0;for(let y=0;y<f;y++){const g=a?y:c[y],x=e[g],v=t[g];if(x===v){d[g]=x,(a?y<o:sk.call(e,g))&&h++;continue}if(x===null||v===null||typeof x!="object"||typeof v!="object"){d[g]=v;continue}const S=xE(x,v,n+1);d[g]=S,S===x&&h++}return o===f&&h===o?e:d}function pf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Tv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hm(e){if(!Cv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Cv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Cv(e){return Object.prototype.toString.call(e)==="[object Object]"}function lk(e){return new Promise(t=>{Zr.setTimeout(t,e)})}function Km(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?xE(e,t):t}function ok(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function ck(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var Op=Symbol();function vE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Op?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Rp(e,t){return typeof e=="function"?e(...t):!!e}function uk(e,t,n){let a=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),a||(a=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var ac=(()=>{let e=()=>ak;return{isServer(){return e()},setIsServer(t){e=t}}})();function Gm(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function a(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},n.reject=s=>{a({status:"rejected",reason:s}),t(s)},n}var fk=ik;function dk(){let e=[],t=0,n=f=>{f()},a=f=>{f()},s=fk;const o=f=>{t?e.push(f):s(()=>{n(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{a(()=>{f.forEach(d=>{n(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||c()}return d},batchCalls:f=>(...d)=>{o(()=>{f(...d)})},schedule:o,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{s=f}}}var en=dk(),yl,dr,xl,cE,hk=(cE=class extends jl{constructor(){super();we(this,yl,!0);we(this,dr);we(this,xl);ge(this,xl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}})}onSubscribe(){z(this,dr)||this.setEventListener(z(this,xl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,dr))==null||t.call(this),ge(this,dr,void 0))}setEventListener(t){var n;ge(this,xl,t),(n=z(this,dr))==null||n.call(this),ge(this,dr,t(this.setOnline.bind(this)))}setOnline(t){z(this,yl)!==t&&(ge(this,yl,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return z(this,yl)}},yl=new WeakMap,dr=new WeakMap,xl=new WeakMap,cE),gf=new hk;function mk(e){return Math.min(1e3*2**e,3e4)}function EE(e){return(e??"online")==="online"?gf.isOnline():!0}var Qm=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function SE(e){let t=!1,n=0,a;const s=Gm(),o=()=>s.status!=="pending",c=_=>{var N;if(!o()){const w=new Qm(_);x(w),(N=e.onCancel)==null||N.call(e,w)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>Cp.isFocused()&&(e.networkMode==="always"||gf.isOnline())&&e.canRun(),y=()=>EE(e.networkMode)&&e.canRun(),g=_=>{o()||(a==null||a(),s.resolve(_))},x=_=>{o()||(a==null||a(),s.reject(_))},v=()=>new Promise(_=>{var N;a=w=>{(o()||h())&&_(w)},(N=e.onPause)==null||N.call(e)}).then(()=>{var _;a=void 0,o()||(_=e.onContinue)==null||_.call(e)}),S=()=>{if(o())return;let _;const N=n===0?e.initialPromise:void 0;try{_=N??e.fn()}catch(w){_=Promise.reject(w)}Promise.resolve(_).then(g).catch(w=>{var M;if(o())return;const R=e.retry??(ac.isServer()?0:3),A=e.retryDelay??mk,D=typeof A=="function"?A(n,w):A,F=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,w);if(t||!F){x(w);return}n++,(M=e.onFail)==null||M.call(e,n,w),lk(D).then(()=>h()?void 0:v()).then(()=>{t?x(w):S()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a==null||a(),s),cancelRetry:f,continueRetry:d,canStart:y,start:()=>(y()?S():v().then(S),s)}}var ns,uE,_E=(uE=class{constructor(){we(this,ns)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qm(this.gcTime)&&ge(this,ns,Zr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ac.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,ns)!==void 0&&(Zr.clearTimeout(z(this,ns)),ge(this,ns,void 0))}},ns=new WeakMap,uE),is,vl,bi,as,nn,fc,rs,ii,wE,Ea,fE,pk=(fE=class extends _E{constructor(t){super();we(this,ii);we(this,is);we(this,vl);we(this,bi);we(this,as);we(this,nn);we(this,fc);we(this,rs);ge(this,rs,!1),ge(this,fc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,as,t.client),ge(this,bi,z(this,as).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,is,Ov(this.options)),this.state=t.state??z(this,is),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,nn))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,fc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Ov(this.options);n.data!==void 0&&(this.setState(Av(n.data,n.dataUpdatedAt)),ge(this,is,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,bi).remove(this)}setData(t,n){const a=Km(this.state.data,t,this.options);return Ue(this,ii,Ea).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){Ue(this,ii,Ea).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=z(this,nn))==null?void 0:a.promise;return(s=z(this,nn))==null||s.cancel(t),n?n.then(wn).catch(wn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,is)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>yi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Op||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>xr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!yE(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,nn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,nn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,bi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(z(this,nn)&&(z(this,rs)||Ue(this,ii,wE).call(this)?z(this,nn).cancel({revert:!0}):z(this,nn).cancelRetry()),this.scheduleGc()),z(this,bi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,ii,Ea).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,y,g,x,v,S,_,N,w,R,A;if(this.state.fetchStatus!=="idle"&&((d=z(this,nn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,nn))return z(this,nn).continueRetry(),z(this,nn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(F=>F.options.queryFn);D&&this.setOptions(D.options)}const a=new AbortController,s=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(ge(this,rs,!0),a.signal)})},o=()=>{const D=vE(this.options,n),M=(()=>{const q={client:z(this,as),queryKey:this.queryKey,meta:this.meta};return s(q),q})();return ge(this,rs,!1),this.options.persister?this.options.persister(D,M,this):D(M)},f=(()=>{const D={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,as),state:this.state,fetchFn:o};return s(D),D})();(h=this.options.behavior)==null||h.onFetch(f,this),ge(this,vl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=f.fetchOptions)==null?void 0:y.meta))&&Ue(this,ii,Ea).call(this,{type:"fetch",meta:(g=f.fetchOptions)==null?void 0:g.meta}),ge(this,nn,SE({initialPromise:n==null?void 0:n.initialPromise,fn:f.fetchFn,onCancel:D=>{D instanceof Qm&&D.revert&&this.setState({...z(this,vl),fetchStatus:"idle"}),a.abort()},onFail:(D,F)=>{Ue(this,ii,Ea).call(this,{type:"failed",failureCount:D,error:F})},onPause:()=>{Ue(this,ii,Ea).call(this,{type:"pause"})},onContinue:()=>{Ue(this,ii,Ea).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const D=await z(this,nn).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(v=(x=z(this,bi).config).onSuccess)==null||v.call(x,D,this),(_=(S=z(this,bi).config).onSettled)==null||_.call(S,D,this.state.error,this),D}catch(D){if(D instanceof Qm){if(D.silent)return z(this,nn).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw Ue(this,ii,Ea).call(this,{type:"error",error:D}),(w=(N=z(this,bi).config).onError)==null||w.call(N,D,this),(A=(R=z(this,bi).config).onSettled)==null||A.call(R,this.state.data,D,this),D}finally{this.scheduleGc()}}},is=new WeakMap,vl=new WeakMap,bi=new WeakMap,as=new WeakMap,nn=new WeakMap,fc=new WeakMap,rs=new WeakMap,ii=new WeakSet,wE=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ea=function(t){const n=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...NE(a.data,this.options),fetchMeta:t.meta??null};case"success":const s={...a,...Av(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ge(this,vl,t.manual?s:void 0),s;case"error":const o=t.error;return{...a,error:o,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=n(this.state),en.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),z(this,bi).notify({query:this,type:"updated",action:t})})},fE);function NE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:EE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Av(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ov(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Un,We,dc,Sn,ss,El,Sa,hr,hc,Sl,_l,ls,os,mr,wl,rt,Zo,Ym,Vm,Xm,Zm,Wm,Jm,ep,kE,dE,gk=(dE=class extends jl{constructor(t,n){super();we(this,rt);we(this,Un);we(this,We);we(this,dc);we(this,Sn);we(this,ss);we(this,El);we(this,Sa);we(this,hr);we(this,hc);we(this,Sl);we(this,_l);we(this,ls);we(this,os);we(this,mr);we(this,wl,new Set);this.options=n,ge(this,Un,t),ge(this,hr,null),ge(this,Sa,Gm()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,We).addObserver(this),Rv(z(this,We),this.options)?Ue(this,rt,Zo).call(this):this.updateResult(),Ue(this,rt,Zm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return tp(z(this,We),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return tp(z(this,We),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,rt,Wm).call(this),Ue(this,rt,Jm).call(this),z(this,We).removeObserver(this)}setOptions(t){const n=this.options,a=z(this,We);if(this.options=z(this,Un).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,z(this,We))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,rt,ep).call(this),z(this,We).setOptions(this.options),n._defaulted&&!pf(this.options,n)&&z(this,Un).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,We),observer:this});const s=this.hasListeners();s&&Mv(z(this,We),a,this.options,n)&&Ue(this,rt,Zo).call(this),this.updateResult(),s&&(z(this,We)!==a||yi(this.options.enabled,z(this,We))!==yi(n.enabled,z(this,We))||xr(this.options.staleTime,z(this,We))!==xr(n.staleTime,z(this,We)))&&Ue(this,rt,Ym).call(this);const o=Ue(this,rt,Vm).call(this);s&&(z(this,We)!==a||yi(this.options.enabled,z(this,We))!==yi(n.enabled,z(this,We))||o!==z(this,mr))&&Ue(this,rt,Xm).call(this,o)}getOptimisticResult(t){const n=z(this,Un).getQueryCache().build(z(this,Un),t),a=this.createResult(n,t);return yk(this,a)&&(ge(this,Sn,a),ge(this,El,this.options),ge(this,ss,z(this,We).state)),a}getCurrentResult(){return z(this,Sn)}trackResult(t,n){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Sa).status==="pending"&&z(this,Sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){z(this,wl).add(t)}getCurrentQuery(){return z(this,We)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=z(this,Un).defaultQueryOptions(t),a=z(this,Un).getQueryCache().build(z(this,Un),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return Ue(this,rt,Zo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,Sn)))}createResult(t,n){var J;const a=z(this,We),s=this.options,o=z(this,Sn),c=z(this,ss),f=z(this,El),h=t!==a?t.state:z(this,dc),{state:y}=t;let g={...y},x=!1,v;if(n._optimisticResults){const C=this.hasListeners(),P=!C&&Rv(t,n),Y=C&&Mv(t,a,n,s);(P||Y)&&(g={...g,...NE(y.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:S,errorUpdatedAt:_,status:N}=g;v=g.data;let w=!1;if(n.placeholderData!==void 0&&v===void 0&&N==="pending"){let C;o!=null&&o.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(C=o.data,w=!0):C=typeof n.placeholderData=="function"?n.placeholderData((J=z(this,_l))==null?void 0:J.state.data,z(this,_l)):n.placeholderData,C!==void 0&&(N="success",v=Km(o==null?void 0:o.data,C,n),x=!0)}if(n.select&&v!==void 0&&!w)if(o&&v===(c==null?void 0:c.data)&&n.select===z(this,hc))v=z(this,Sl);else try{ge(this,hc,n.select),v=n.select(v),v=Km(o==null?void 0:o.data,v,n),ge(this,Sl,v),ge(this,hr,null)}catch(C){ge(this,hr,C)}z(this,hr)&&(S=z(this,hr),v=z(this,Sl),_=Date.now(),N="error");const R=g.fetchStatus==="fetching",A=N==="pending",D=N==="error",F=A&&R,M=v!==void 0,U={status:N,fetchStatus:g.fetchStatus,isPending:A,isSuccess:N==="success",isError:D,isInitialLoading:F,isLoading:F,data:v,dataUpdatedAt:g.dataUpdatedAt,error:S,errorUpdatedAt:_,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:D&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:D&&M,isStale:Mp(t,n),refetch:this.refetch,promise:z(this,Sa),isEnabled:yi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=U.data!==void 0,P=U.status==="error"&&!C,Y=Q=>{P?Q.reject(U.error):C&&Q.resolve(U.data)},le=()=>{const Q=ge(this,Sa,U.promise=Gm());Y(Q)},H=z(this,Sa);switch(H.status){case"pending":t.queryHash===a.queryHash&&Y(H);break;case"fulfilled":(P||U.data!==H.value)&&le();break;case"rejected":(!P||U.error!==H.reason)&&le();break}}return U}updateResult(){const t=z(this,Sn),n=this.createResult(z(this,We),this.options);if(ge(this,ss,z(this,We).state),ge(this,El,this.options),z(this,ss).data!==void 0&&ge(this,_l,z(this,We)),pf(n,t))return;ge(this,Sn,n);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!z(this,wl).size)return!0;const c=new Set(o??z(this,wl));return this.options.throwOnError&&c.add("error"),Object.keys(z(this,Sn)).some(f=>{const d=f;return z(this,Sn)[d]!==t[d]&&c.has(d)})};Ue(this,rt,kE).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,rt,Zm).call(this)}},Un=new WeakMap,We=new WeakMap,dc=new WeakMap,Sn=new WeakMap,ss=new WeakMap,El=new WeakMap,Sa=new WeakMap,hr=new WeakMap,hc=new WeakMap,Sl=new WeakMap,_l=new WeakMap,ls=new WeakMap,os=new WeakMap,mr=new WeakMap,wl=new WeakMap,rt=new WeakSet,Zo=function(t){Ue(this,rt,ep).call(this);let n=z(this,We).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(wn)),n},Ym=function(){Ue(this,rt,Wm).call(this);const t=xr(this.options.staleTime,z(this,We));if(ac.isServer()||z(this,Sn).isStale||!qm(t))return;const a=yE(z(this,Sn).dataUpdatedAt,t)+1;ge(this,ls,Zr.setTimeout(()=>{z(this,Sn).isStale||this.updateResult()},a))},Vm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,We)):this.options.refetchInterval)??!1},Xm=function(t){Ue(this,rt,Jm).call(this),ge(this,mr,t),!(ac.isServer()||yi(this.options.enabled,z(this,We))===!1||!qm(z(this,mr))||z(this,mr)===0)&&ge(this,os,Zr.setInterval(()=>{(this.options.refetchIntervalInBackground||Cp.isFocused())&&Ue(this,rt,Zo).call(this)},z(this,mr)))},Zm=function(){Ue(this,rt,Ym).call(this),Ue(this,rt,Xm).call(this,Ue(this,rt,Vm).call(this))},Wm=function(){z(this,ls)!==void 0&&(Zr.clearTimeout(z(this,ls)),ge(this,ls,void 0))},Jm=function(){z(this,os)!==void 0&&(Zr.clearInterval(z(this,os)),ge(this,os,void 0))},ep=function(){const t=z(this,Un).getQueryCache().build(z(this,Un),this.options);if(t===z(this,We))return;const n=z(this,We);ge(this,We,t),ge(this,dc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},kE=function(t){en.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(z(this,Sn))}),z(this,Un).getQueryCache().notify({query:z(this,We),type:"observerResultsUpdated"})})},dE);function bk(e,t){return yi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rv(e,t){return bk(e,t)||e.state.data!==void 0&&tp(e,t,t.refetchOnMount)}function tp(e,t,n){if(yi(t.enabled,e)!==!1&&xr(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&Mp(e,t)}return!1}function Mv(e,t,n,a){return(e!==t||yi(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Mp(e,n)}function Mp(e,t){return yi(t.enabled,e)!==!1&&e.isStaleByTime(xr(t.staleTime,e))}function yk(e,t){return!pf(e.getCurrentResult(),t)}function jv(e){return{onFetch:(t,n)=>{var y,g,x,v,S;const a=t.options,s=(x=(g=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((v=t.state.data)==null?void 0:v.pages)||[],c=((S=t.state.data)==null?void 0:S.pageParams)||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let _=!1;const N=A=>{uk(A,()=>t.signal,()=>_=!0)},w=vE(t.options,t.fetchOptions),R=async(A,D,F)=>{if(_)return Promise.reject();if(D==null&&A.pages.length)return Promise.resolve(A);const q=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:D,direction:F?"backward":"forward",meta:t.options.meta};return N(P),P})(),U=await w(q),{maxPages:J}=t.options,C=F?ck:ok;return{pages:C(A.pages,U,J),pageParams:C(A.pageParams,D,J)}};if(s&&o.length){const A=s==="backward",D=A?xk:Dv,F={pages:o,pageParams:c},M=D(a,F);f=await R(F,M,A)}else{const A=e??o.length;do{const D=d===0?c[0]??a.initialPageParam:Dv(a,f);if(d>0&&D==null)break;f=await R(f,D),d++}while(d<A)}return f};t.options.persister?t.fetchFn=()=>{var _,N;return(N=(_=t.options).persister)==null?void 0:N.call(_,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function Dv(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function xk(e,{pages:t,pageParams:n}){var a;return t.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,t[0],t,n[0],n):void 0}var mc,Gi,mn,cs,Qi,or,hE,vk=(hE=class extends _E{constructor(t){super();we(this,Qi);we(this,mc);we(this,Gi);we(this,mn);we(this,cs);ge(this,mc,t.client),this.mutationId=t.mutationId,ge(this,mn,t.mutationCache),ge(this,Gi,[]),this.state=t.state||TE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Gi).includes(t)||(z(this,Gi).push(t),this.clearGcTimeout(),z(this,mn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,Gi,z(this,Gi).filter(n=>n!==t)),this.scheduleGc(),z(this,mn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Gi).length||(this.state.status==="pending"?this.scheduleGc():z(this,mn).remove(this))}continue(){var t;return((t=z(this,cs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,f,d,h,y,g,x,v,S,_,N,w,R,A,D,F,M,q;const n=()=>{Ue(this,Qi,or).call(this,{type:"continue"})},a={client:z(this,mc),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,cs,SE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(U,J)=>{Ue(this,Qi,or).call(this,{type:"failed",failureCount:U,error:J})},onPause:()=>{Ue(this,Qi,or).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,mn).canRun(this)}));const s=this.state.status==="pending",o=!z(this,cs).canStart();try{if(s)n();else{Ue(this,Qi,or).call(this,{type:"pending",variables:t,isPaused:o}),z(this,mn).config.onMutate&&await z(this,mn).config.onMutate(t,this,a);const J=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,a));J!==this.state.context&&Ue(this,Qi,or).call(this,{type:"pending",context:J,variables:t,isPaused:o})}const U=await z(this,cs).start();return await((h=(d=z(this,mn).config).onSuccess)==null?void 0:h.call(d,U,t,this.state.context,this,a)),await((g=(y=this.options).onSuccess)==null?void 0:g.call(y,U,t,this.state.context,a)),await((v=(x=z(this,mn).config).onSettled)==null?void 0:v.call(x,U,null,this.state.variables,this.state.context,this,a)),await((_=(S=this.options).onSettled)==null?void 0:_.call(S,U,null,t,this.state.context,a)),Ue(this,Qi,or).call(this,{type:"success",data:U}),U}catch(U){try{await((w=(N=z(this,mn).config).onError)==null?void 0:w.call(N,U,t,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((A=(R=this.options).onError)==null?void 0:A.call(R,U,t,this.state.context,a))}catch(J){Promise.reject(J)}try{await((F=(D=z(this,mn).config).onSettled)==null?void 0:F.call(D,void 0,U,this.state.variables,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((q=(M=this.options).onSettled)==null?void 0:q.call(M,void 0,U,t,this.state.context,a))}catch(J){Promise.reject(J)}throw Ue(this,Qi,or).call(this,{type:"error",error:U}),U}finally{z(this,mn).runNext(this)}}},mc=new WeakMap,Gi=new WeakMap,mn=new WeakMap,cs=new WeakMap,Qi=new WeakSet,or=function(t){const n=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),en.batch(()=>{z(this,Gi).forEach(a=>{a.onMutationUpdate(t)}),z(this,mn).notify({mutation:this,type:"updated",action:t})})},hE);function TE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _a,Oi,pc,mE,Ek=(mE=class extends jl{constructor(t={}){super();we(this,_a);we(this,Oi);we(this,pc);this.config=t,ge(this,_a,new Set),ge(this,Oi,new Map),ge(this,pc,0)}build(t,n,a){const s=new vk({client:t,mutationCache:this,mutationId:++Pu(this,pc)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){z(this,_a).add(t);const n=qu(t);if(typeof n=="string"){const a=z(this,Oi).get(n);a?a.push(t):z(this,Oi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,_a).delete(t)){const n=qu(t);if(typeof n=="string"){const a=z(this,Oi).get(n);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&z(this,Oi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=qu(t);if(typeof n=="string"){const a=z(this,Oi).get(n),s=a==null?void 0:a.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var a;const n=qu(t);if(typeof n=="string"){const s=(a=z(this,Oi).get(n))==null?void 0:a.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){en.batch(()=>{z(this,_a).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,_a).clear(),z(this,Oi).clear()})}getAll(){return Array.from(z(this,_a))}find(t){const n={exact:!0,...t};return this.getAll().find(a=>kv(n,a))}findAll(t={}){return this.getAll().filter(n=>kv(t,n))}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return en.batch(()=>Promise.all(t.map(n=>n.continue().catch(wn))))}},_a=new WeakMap,Oi=new WeakMap,pc=new WeakMap,mE);function qu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var wa,pr,$n,Na,Ca,lf,np,pE,Sk=(pE=class extends jl{constructor(n,a){super();we(this,Ca);we(this,wa);we(this,pr);we(this,$n);we(this,Na);ge(this,wa,n),this.setOptions(a),this.bindMethods(),Ue(this,Ca,lf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const a=this.options;this.options=z(this,wa).defaultMutationOptions(n),pf(this.options,a)||z(this,wa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,$n),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&us(a.mutationKey)!==us(this.options.mutationKey)?this.reset():((s=z(this,$n))==null?void 0:s.state.status)==="pending"&&z(this,$n).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=z(this,$n))==null||n.removeObserver(this)}onMutationUpdate(n){Ue(this,Ca,lf).call(this),Ue(this,Ca,np).call(this,n)}getCurrentResult(){return z(this,pr)}reset(){var n;(n=z(this,$n))==null||n.removeObserver(this),ge(this,$n,void 0),Ue(this,Ca,lf).call(this),Ue(this,Ca,np).call(this)}mutate(n,a){var s;return ge(this,Na,a),(s=z(this,$n))==null||s.removeObserver(this),ge(this,$n,z(this,wa).getMutationCache().build(z(this,wa),this.options)),z(this,$n).addObserver(this),z(this,$n).execute(n)}},wa=new WeakMap,pr=new WeakMap,$n=new WeakMap,Na=new WeakMap,Ca=new WeakSet,lf=function(){var a;const n=((a=z(this,$n))==null?void 0:a.state)??TE();ge(this,pr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},np=function(n){en.batch(()=>{var a,s,o,c,f,d,h,y;if(z(this,Na)&&this.hasListeners()){const g=z(this,pr).variables,x=z(this,pr).context,v={client:z(this,wa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=z(this,Na)).onSuccess)==null||s.call(a,n.data,g,x,v)}catch(S){Promise.reject(S)}try{(c=(o=z(this,Na)).onSettled)==null||c.call(o,n.data,null,g,x,v)}catch(S){Promise.reject(S)}}else if((n==null?void 0:n.type)==="error"){try{(d=(f=z(this,Na)).onError)==null||d.call(f,n.error,g,x,v)}catch(S){Promise.reject(S)}try{(y=(h=z(this,Na)).onSettled)==null||y.call(h,void 0,n.error,g,x,v)}catch(S){Promise.reject(S)}}}this.listeners.forEach(g=>{g(z(this,pr))})})},pE),Yi,gE,_k=(gE=class extends jl{constructor(t={}){super();we(this,Yi);this.config=t,ge(this,Yi,new Map)}build(t,n,a){const s=n.queryKey,o=n.queryHash??Ap(s,n);let c=this.get(o);return c||(c=new pk({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(c)),c}add(t){z(this,Yi).has(t.queryHash)||(z(this,Yi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,Yi).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,Yi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){en.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Yi).get(t)}getAll(){return[...z(this,Yi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Nv(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>Nv(t,a)):n}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){en.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){en.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yi=new WeakMap,gE),zt,gr,br,Nl,kl,yr,Tl,Cl,bE,wk=(bE=class{constructor(e={}){we(this,zt);we(this,gr);we(this,br);we(this,Nl);we(this,kl);we(this,yr);we(this,Tl);we(this,Cl);ge(this,zt,e.queryCache||new _k),ge(this,gr,e.mutationCache||new Ek),ge(this,br,e.defaultOptions||{}),ge(this,Nl,new Map),ge(this,kl,new Map),ge(this,yr,0)}mount(){Pu(this,yr)._++,z(this,yr)===1&&(ge(this,Tl,Cp.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,zt).onFocus())})),ge(this,Cl,gf.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,zt).onOnline())})))}unmount(){var e,t;Pu(this,yr)._--,z(this,yr)===0&&((e=z(this,Tl))==null||e.call(this),ge(this,Tl,void 0),(t=z(this,Cl))==null||t.call(this),ge(this,Cl,void 0))}isFetching(e){return z(this,zt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,gr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,zt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(this,zt).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(xr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return z(this,zt).findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),s=z(this,zt).get(a.queryHash),o=s==null?void 0:s.state.data,c=rk(t,o);if(c!==void 0)return z(this,zt).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return en.batch(()=>z(this,zt).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,zt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,zt);en.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,zt);return en.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=en.batch(()=>z(this,zt).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(wn).catch(wn)}invalidateQueries(e,t={}){return en.batch(()=>(z(this,zt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=en.batch(()=>z(this,zt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(wn)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(wn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=z(this,zt).build(this,t);return n.isStaleByTime(xr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(wn).catch(wn)}fetchInfiniteQuery(e){return e.behavior=jv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(wn).catch(wn)}ensureInfiniteQueryData(e){return e.behavior=jv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gf.isOnline()?z(this,gr).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,zt)}getMutationCache(){return z(this,gr)}getDefaultOptions(){return z(this,br)}setDefaultOptions(e){ge(this,br,e)}setQueryDefaults(e,t){z(this,Nl).set(us(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,Nl).values()],n={};return t.forEach(a=>{ic(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){z(this,kl).set(us(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,kl).values()],n={};return t.forEach(a=>{ic(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,br).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ap(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Op&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,br).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,zt).clear(),z(this,gr).clear()}},zt=new WeakMap,gr=new WeakMap,br=new WeakMap,Nl=new WeakMap,kl=new WeakMap,yr=new WeakMap,Tl=new WeakMap,Cl=new WeakMap,bE),CE=j.createContext(void 0),Tn=e=>{const t=j.useContext(CE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Nk=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(CE.Provider,{value:e,children:t})),AE=j.createContext(!1),kk=()=>j.useContext(AE);AE.Provider;function Tk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ck=j.createContext(Tk()),Ak=()=>j.useContext(Ck),Ok=(e,t,n)=>{const a=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Rp(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},Rk=e=>{j.useEffect(()=>{e.clearReset()},[e])},Mk=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||Rp(n,[e.error,a])),jk=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>n(a(...s)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Dk=(e,t)=>e.isLoading&&e.isFetching&&!t,Lk=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Lv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ik(e,t,n){var x,v,S,_;const a=kk(),s=Ak(),o=Tn(),c=o.defaultQueryOptions(e);(v=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||v.call(x,c);const f=o.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",jk(c),Ok(c,s,f),Rk(s);const d=!o.getQueryCache().get(c.queryHash),[h]=j.useState(()=>new t(o,c)),y=h.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(N=>{const w=g?h.subscribe(en.batchCalls(N)):wn;return h.updateResult(),w},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),j.useEffect(()=>{h.setOptions(c)},[c,h]),Lk(c,y))throw Lv(c,h,s);if(Mk({result:y,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw y.error;if((_=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||_.call(S,c,y),c.experimental_prefetchInRender&&!ac.isServer()&&Dk(y,a)){const N=d?Lv(c,h,s):f==null?void 0:f.promise;N==null||N.catch(wn).finally(()=>{h.updateResult()})}return c.notifyOnChangeProps?y:h.trackResult(y)}function dt(e,t){return Ik(e,gk)}function Pn(e,t){const n=Tn(),[a]=j.useState(()=>new Sk(n,e));j.useEffect(()=>{a.setOptions(e)},[a,e]);const s=j.useSyncExternalStore(j.useCallback(c=>a.subscribe(en.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=j.useCallback((c,f)=>{a.mutate(c,f).catch(wn)},[a]);if(s.error&&Rp(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/**
50
+ * react-router v7.14.2
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 Iv="popstate";function zv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function zk(e={}){function t(a,s){var h;let o=(h=s.state)==null?void 0:h.masked,{pathname:c,search:f,hash:d}=o||a.location;return ip("",{pathname:c,search:f,hash:d},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:rc(s)}return Uk(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ei(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Bk(){return Math.random().toString(36).substring(2,10)}function Bv(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ip(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Dl(t):t,state:n,key:t&&t.key||a||Bk(),unstable_mask:s}}function rc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Dl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Uk(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,c=s.history,f="POP",d=null,h=y();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function y(){return(c.state||{idx:null}).idx}function g(){f="POP";let N=y(),w=N==null?null:N-h;h=N,d&&d({action:f,location:_.location,delta:w})}function x(N,w){f="PUSH";let R=zv(N)?N:ip(_.location,N,w);h=y()+1;let A=Bv(R,h),D=_.createHref(R.unstable_mask||R);try{c.pushState(A,"",D)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;s.location.assign(D)}o&&d&&d({action:f,location:_.location,delta:1})}function v(N,w){f="REPLACE";let R=zv(N)?N:ip(_.location,N,w);h=y();let A=Bv(R,h),D=_.createHref(R.unstable_mask||R);c.replaceState(A,"",D),o&&d&&d({action:f,location:_.location,delta:0})}function S(N){return $k(N)}let _={get action(){return f},get location(){return e(s,c)},listen(N){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(Iv,g),d=N,()=>{s.removeEventListener(Iv,g),d=null}},createHref(N){return t(s,N)},createURL:S,encodeLocation(N){let w=S(N);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:x,replace:v,go(N){return c.go(N)}};return _}function $k(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:rc(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function OE(e,t,n="/"){return Fk(e,t,n,!1)}function Fk(e,t,n,a){let s=typeof t=="string"?Dl(t):t,o=Aa(s.pathname||"/",n);if(o==null)return null;let c=RE(e);Pk(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let h=Jk(o);f=Zk(c[d],h,a)}return f}function RE(e,t=[],n=[],a="",s=!1){let o=(c,f,d=s,h)=>{let y={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(a)&&d)return;Ct(y.relativePath.startsWith(a),`Absolute route path "${y.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(a.length)}let g=Ri([a,y.relativePath]),x=n.concat(y);c.children&&c.children.length>0&&(Ct(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),RE(c.children,t,x,g,d)),!(c.path==null&&!c.index)&&t.push({path:g,score:Vk(g,c.index),routesMeta:x})};return e.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))o(c,f);else for(let h of ME(c.path))o(c,f,!0,h)}),t}function ME(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return s?[o,""]:[o];let c=ME(a.join("/")),f=[];return f.push(...c.map(d=>d===""?o:[o,d].join("/"))),s&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function Pk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Xk(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var qk=/^:[\w-]+$/,Hk=3,Kk=2,Gk=1,Qk=10,Yk=-2,Uv=e=>e==="*";function Vk(e,t){let n=e.split("/"),a=n.length;return n.some(Uv)&&(a+=Yk),t&&(a+=Kk),n.filter(s=>!Uv(s)).reduce((s,o)=>s+(qk.test(o)?Hk:o===""?Gk:Qk),a)}function Xk(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function Zk(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",c=[];for(let f=0;f<a.length;++f){let d=a[f],h=f===a.length-1,y=o==="/"?t:t.slice(o.length)||"/",g=bf({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},y),x=d.route;if(!g&&h&&n&&!a[a.length-1].route.index&&(g=bf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},y)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:Ri([o,g.pathname]),pathnameBase:iT(Ri([o,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(o=Ri([o,g.pathnameBase]))}return c}function bf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=Wk(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((h,{paramName:y,isOptional:g},x)=>{if(y==="*"){let S=f[x]||"";c=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const v=f[x];return g&&!v?h[y]=void 0:h[y]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:c,pattern:e}}function Wk(e,t=!1,n=!0){Ei(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 a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,d,h,y)=>{if(a.push({paramName:f,isOptional:d!=null}),d){let g=y.charAt(h+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function Jk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ei(!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 Aa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var eT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function tT(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?Dl(e):e,o;return n?(n=jE(n),n.startsWith("/")?o=$v(n.substring(1),"/"):o=$v(n,t)):o=t,{pathname:o,search:aT(a),hash:rT(s)}}function $v(e,t){let n=yf(t).split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function um(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function nT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function jp(e){let t=nT(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Of(e,t,n,a=!1){let s;typeof e=="string"?s=Dl(e):(s={...e},Ct(!s.pathname||!s.pathname.includes("?"),um("?","pathname","search",s)),Ct(!s.pathname||!s.pathname.includes("#"),um("#","pathname","hash",s)),Ct(!s.search||!s.search.includes("#"),um("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,f;if(c==null)f=n;else{let g=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),g-=1;s.pathname=x.join("/")}f=g>=0?t[g]:"/"}let d=tT(s,f),h=c&&c!=="/"&&c.endsWith("/"),y=(o||c===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||y)&&(d.pathname+="/"),d}var jE=e=>e.replace(/\/\/+/g,"/"),Ri=e=>jE(e.join("/")),yf=e=>e.replace(/\/+$/,""),iT=e=>yf(e).replace(/^\/*/,"/"),aT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,sT=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function lT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function oT(e){let t=e.map(n=>n.route.path).filter(Boolean);return Ri(t)||"/"}var DE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function LE(e,t){let n=e;if(typeof n!="string"||!eT.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(DE)try{let o=new URL(window.location.href),c=n.startsWith("//")?new URL(o.protocol+n):new URL(n),f=Aa(c.pathname,t);c.origin===o.origin&&f!=null?n=f+c.search+c.hash:s=!0}catch{Ei(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var IE=["POST","PUT","PATCH","DELETE"];new Set(IE);var cT=["GET",...IE];new Set(cT);var Ll=j.createContext(null);Ll.displayName="DataRouter";var Rf=j.createContext(null);Rf.displayName="DataRouterState";var zE=j.createContext(!1);function uT(){return j.useContext(zE)}var BE=j.createContext({isTransitioning:!1});BE.displayName="ViewTransition";var fT=j.createContext(new Map);fT.displayName="Fetchers";var dT=j.createContext(null);dT.displayName="Await";var si=j.createContext(null);si.displayName="Navigation";var gc=j.createContext(null);gc.displayName="Location";var _i=j.createContext({outlet:null,matches:[],isDataRoute:!1});_i.displayName="Route";var Dp=j.createContext(null);Dp.displayName="RouteError";var UE="REACT_ROUTER_ERROR",hT="REDIRECT",mT="ROUTE_ERROR_RESPONSE";function pT(e){if(e.startsWith(`${UE}:${hT}:{`))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 gT(e){if(e.startsWith(`${UE}:${mT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new sT(t.status,t.statusText,t.data)}catch{}}function bT(e,{relative:t}={}){Ct(Il(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=j.useContext(si),{hash:s,pathname:o,search:c}=bc(e,{relative:t}),f=o;return n!=="/"&&(f=o==="/"?n:Ri([n,o])),a.createHref({pathname:f,search:c,hash:s})}function Il(){return j.useContext(gc)!=null}function Di(){return Ct(Il(),"useLocation() may be used only in the context of a <Router> component."),j.useContext(gc).location}var $E="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function FE(e){j.useContext(si).static||j.useLayoutEffect(e)}function _r(){let{isDataRoute:e}=j.useContext(_i);return e?MT():yT()}function yT(){Ct(Il(),"useNavigate() may be used only in the context of a <Router> component.");let e=j.useContext(Ll),{basename:t,navigator:n}=j.useContext(si),{matches:a}=j.useContext(_i),{pathname:s}=Di(),o=JSON.stringify(jp(a)),c=j.useRef(!1);return FE(()=>{c.current=!0}),j.useCallback((d,h={})=>{if(Ei(c.current,$E),!c.current)return;if(typeof d=="number"){n.go(d);return}let y=Of(d,JSON.parse(o),s,h.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Ri([t,y.pathname])),(h.replace?n.replace:n.push)(y,h.state,h)},[t,n,o,s,e])}var xT=j.createContext(null);function vT(e){let t=j.useContext(_i).outlet;return j.useMemo(()=>t&&j.createElement(xT.Provider,{value:e},t),[t,e])}function PE(){let{matches:e}=j.useContext(_i),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function bc(e,{relative:t}={}){let{matches:n}=j.useContext(_i),{pathname:a}=Di(),s=JSON.stringify(jp(n));return j.useMemo(()=>Of(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function ET(e,t){return qE(e,t)}function qE(e,t,n){var N;Ct(Il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=j.useContext(si),{matches:s}=j.useContext(_i),o=s[s.length-1],c=o?o.params:{},f=o?o.pathname:"/",d=o?o.pathnameBase:"/",h=o&&o.route;{let w=h&&h.path||"";KE(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 y=Di(),g;if(t){let w=typeof t=="string"?Dl(t):t;Ct(d==="/"||((N=w.pathname)==null?void 0:N.startsWith(d)),`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 "${d}" but pathname "${w.pathname}" was given in the \`location\` prop.`),g=w}else g=y;let x=g.pathname||"/",v=x;if(d!=="/"){let w=d.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(w.length).join("/")}let S=OE(e,{pathname:v});Ei(h||S!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ei(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=kT(S&&S.map(w=>Object.assign({},w,{params:Object.assign({},c,w.params),pathname:Ri([d,a.encodeLocation?a.encodeLocation(w.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?d:Ri([d,a.encodeLocation?a.encodeLocation(w.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),s,n);return t&&_?j.createElement(gc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},_):_}function ST(){let e=RT(),t=lT(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=j.createElement(j.Fragment,null,j.createElement("p",null,"💿 Hey developer 👋"),j.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",j.createElement("code",{style:o},"ErrorBoundary")," or"," ",j.createElement("code",{style:o},"errorElement")," prop on your route.")),j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),n?j.createElement("pre",{style:s},n):null,c)}var _T=j.createElement(ST,null),HE=class extends j.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 n=gT(e.digest);n&&(e=n)}let t=e!==void 0?j.createElement(_i.Provider,{value:this.props.routeContext},j.createElement(Dp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?j.createElement(wT,{error:e},t):t}};HE.contextType=zE;var fm=new WeakMap;function wT({children:e,error:t}){let{basename:n}=j.useContext(si);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=pT(t.digest);if(a){let s=fm.get(t);if(s)throw s;let o=LE(a.location,n);if(DE&&!fm.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw fm.set(t,c),c}return j.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function NT({routeContext:e,match:t,children:n}){let a=j.useContext(Ll);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),j.createElement(_i.Provider,{value:e},n)}function kT(e,t=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,o=a==null?void 0:a.errors;if(o!=null){let y=s.findIndex(g=>g.route.id&&(o==null?void 0:o[g.route.id])!==void 0);Ct(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,f=-1;if(n&&a){c=a.renderFallback;for(let y=0;y<s.length;y++){let g=s[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=y),g.route.id){let{loaderData:x,errors:v}=a,S=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!v||v[g.route.id]===void 0);if(g.route.lazy||S){n.isStatic&&(c=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let d=n==null?void 0:n.onError,h=a&&d?(y,g)=>{var x,v;d(y,{location:a.location,params:((v=(x=a.matches)==null?void 0:x[0])==null?void 0:v.params)??{},unstable_pattern:oT(a.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,x)=>{let v,S=!1,_=null,N=null;a&&(v=o&&g.route.id?o[g.route.id]:void 0,_=g.route.errorElement||_T,c&&(f<0&&x===0?(KE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,N=null):f===x&&(S=!0,N=g.route.hydrateFallbackElement||null)));let w=t.concat(s.slice(0,x+1)),R=()=>{let A;return v?A=_:S?A=N:g.route.Component?A=j.createElement(g.route.Component,null):g.route.element?A=g.route.element:A=y,j.createElement(NT,{match:g,routeContext:{outlet:y,matches:w,isDataRoute:a!=null},children:A})};return a&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?j.createElement(HE,{location:a.location,revalidation:a.revalidation,component:_,error:v,children:R(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:h}):R()},null)}function Lp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function TT(e){let t=j.useContext(Ll);return Ct(t,Lp(e)),t}function CT(e){let t=j.useContext(Rf);return Ct(t,Lp(e)),t}function AT(e){let t=j.useContext(_i);return Ct(t,Lp(e)),t}function Ip(e){let t=AT(e),n=t.matches[t.matches.length-1];return Ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function OT(){return Ip("useRouteId")}function RT(){var a;let e=j.useContext(Dp),t=CT("useRouteError"),n=Ip("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function MT(){let{router:e}=TT("useNavigate"),t=Ip("useNavigate"),n=j.useRef(!1);return FE(()=>{n.current=!0}),j.useCallback(async(s,o={})=>{Ei(n.current,$E),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var Fv={};function KE(e,t,n){!t&&!Fv[e]&&(Fv[e]=!0,Ei(!1,n))}j.memo(jT);function jT({routes:e,future:t,state:n,isStatic:a,onError:s}){return qE(e,void 0,{state:n,isStatic:a,onError:s})}function DT({to:e,replace:t,state:n,relative:a}){Ct(Il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=j.useContext(si);Ei(!s,"<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:o}=j.useContext(_i),{pathname:c}=Di(),f=_r(),d=Of(e,jp(o),c,a==="path"),h=JSON.stringify(d);return j.useEffect(()=>{f(JSON.parse(h),{replace:t,state:n,relative:a})},[f,h,a,t,n]),null}function LT(e){return vT(e.context)}function zn(e){Ct(!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 IT({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){Ct(!Il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=j.useMemo(()=>({basename:f,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[f,s,o,c]);typeof n=="string"&&(n=Dl(n));let{pathname:h="/",search:y="",hash:g="",state:x=null,key:v="default",unstable_mask:S}=n,_=j.useMemo(()=>{let N=Aa(h,f);return N==null?null:{location:{pathname:N,search:y,hash:g,state:x,key:v,unstable_mask:S},navigationType:a}},[f,h,y,g,x,v,a,S]);return Ei(_!=null,`<Router basename="${f}"> is not able to match the URL "${h}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:j.createElement(si.Provider,{value:d},j.createElement(gc.Provider,{children:t,value:_}))}function zT({children:e,location:t}){return ET(ap(e),t)}function ap(e,t=[]){let n=[];return j.Children.forEach(e,(a,s)=>{if(!j.isValidElement(a))return;let o=[...t,s];if(a.type===j.Fragment){n.push.apply(n,ap(a.props.children,o));return}Ct(a.type===zn,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ct(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=ap(a.props.children,o)),n.push(c)}),n}var of="get",cf="application/x-www-form-urlencoded";function Mf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function BT(e){return Mf(e)&&e.tagName.toLowerCase()==="button"}function UT(e){return Mf(e)&&e.tagName.toLowerCase()==="form"}function $T(e){return Mf(e)&&e.tagName.toLowerCase()==="input"}function FT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function PT(e,t){return e.button===0&&(!t||t==="_self")&&!FT(e)}function rp(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function qT(e,t){let n=rp(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var Hu=null;function HT(){if(Hu===null)try{new FormData(document.createElement("form"),0),Hu=!1}catch{Hu=!0}return Hu}var KT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function dm(e){return e!=null&&!KT.has(e)?(Ei(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${cf}"`),null):e}function GT(e,t){let n,a,s,o,c;if(UT(e)){let f=e.getAttribute("action");a=f?Aa(f,t):null,n=e.getAttribute("method")||of,s=dm(e.getAttribute("enctype"))||cf,o=new FormData(e)}else if(BT(e)||$T(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 d=e.getAttribute("formaction")||f.getAttribute("action");if(a=d?Aa(d,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||of,s=dm(e.getAttribute("formenctype"))||dm(f.getAttribute("enctype"))||cf,o=new FormData(f,e),!HT()){let{name:h,type:y,value:g}=e;if(y==="image"){let x=h?`${h}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else h&&o.append(h,g)}}else{if(Mf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=of,a=null,s=cf,c=e}return o&&s==="text/plain"&&(c=o,o=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function zp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function GE(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Aa(s.pathname,t)==="/"?s.pathname=`${yf(t)}/_root.${a}`:s.pathname=`${yf(s.pathname)}.${a}`,s}async function QT(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function YT(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 VT(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let c=await QT(o,n);return c.links?c.links():[]}return[]}));return JT(a.flat(1).filter(YT).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Pv(e,t,n,a,s,o){let c=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,f=(d,h)=>{var y;return n[h].pathname!==d.pathname||((y=n[h].route.path)==null?void 0:y.endsWith("*"))&&n[h].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,h)=>c(d,h)||f(d,h)):o==="data"?t.filter((d,h)=>{var g;let y=a.routes[d.route.id];if(!y||!y.hasLoader)return!1;if(c(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let x=d.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function XT(e,t,{includeHydrateFallback:n}={}){return ZT(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function ZT(e){return[...new Set(e)]}function WT(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function JT(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(WT(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function Bp(){let e=j.useContext(Ll);return zp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function eC(){let e=j.useContext(Rf);return zp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Up=j.createContext(void 0);Up.displayName="FrameworkContext";function $p(){let e=j.useContext(Up);return zp(e,"You must render this element inside a <HydratedRouter> element"),e}function tC(e,t){let n=j.useContext(Up),[a,s]=j.useState(!1),[o,c]=j.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:y,onTouchStart:g}=t,x=j.useRef(null);j.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let _=w=>{w.forEach(R=>{c(R.isIntersecting)})},N=new IntersectionObserver(_,{threshold:.5});return x.current&&N.observe(x.current),()=>{N.disconnect()}}},[e]),j.useEffect(()=>{if(a){let _=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(_)}}},[a]);let v=()=>{s(!0)},S=()=>{s(!1),c(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Ho(f,v),onBlur:Ho(d,S),onMouseEnter:Ho(h,v),onMouseLeave:Ho(y,S),onTouchStart:Ho(g,v)}]:[!1,x,{}]}function Ho(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function nC({page:e,...t}){let n=uT(),{router:a}=Bp(),s=j.useMemo(()=>OE(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?j.createElement(aC,{page:e,matches:s,...t}):j.createElement(rC,{page:e,matches:s,...t}):null}function iC(e){let{manifest:t,routeModules:n}=$p(),[a,s]=j.useState([]);return j.useEffect(()=>{let o=!1;return VT(e,t,n).then(c=>{o||s(c)}),()=>{o=!0}},[e,t,n]),a}function aC({page:e,matches:t,...n}){let a=Di(),{future:s}=$p(),{basename:o}=Bp(),c=j.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=GE(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),d=!1,h=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?d=!0:h.push(y.route.id);return d&&h.length>0&&f.searchParams.set("_routes",h.join(",")),[f.pathname+f.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return j.createElement(j.Fragment,null,c.map(f=>j.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...n})))}function rC({page:e,matches:t,...n}){let a=Di(),{future:s,manifest:o,routeModules:c}=$p(),{basename:f}=Bp(),{loaderData:d,matches:h}=eC(),y=j.useMemo(()=>Pv(e,t,h,o,a,"data"),[e,t,h,o,a]),g=j.useMemo(()=>Pv(e,t,h,o,a,"assets"),[e,t,h,o,a]),x=j.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let _=new Set,N=!1;if(t.forEach(R=>{var D;let A=o.routes[R.route.id];!A||!A.hasLoader||(!y.some(F=>F.route.id===R.route.id)&&R.route.id in d&&((D=c[R.route.id])!=null&&D.shouldRevalidate)||A.hasClientLoader?N=!0:_.add(R.route.id))}),_.size===0)return[];let w=GE(e,f,s.unstable_trailingSlashAwareDataRequests,"data");return N&&_.size>0&&w.searchParams.set("_routes",t.filter(R=>_.has(R.route.id)).map(R=>R.route.id).join(",")),[w.pathname+w.search]},[f,s.unstable_trailingSlashAwareDataRequests,d,a,o,y,t,e,c]),v=j.useMemo(()=>XT(g,o),[g,o]),S=iC(g);return j.createElement(j.Fragment,null,x.map(_=>j.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...n})),v.map(_=>j.createElement("link",{key:_,rel:"modulepreload",href:_,...n})),S.map(({key:_,link:N})=>j.createElement("link",{key:_,nonce:n.nonce,...N,crossOrigin:N.crossOrigin??n.crossOrigin})))}function sC(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var lC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{lC&&(window.__reactRouterVersion="7.14.2")}catch{}function oC({basename:e,children:t,unstable_useTransitions:n,window:a}){let s=j.useRef();s.current==null&&(s.current=zk({window:a,v5Compat:!0}));let o=s.current,[c,f]=j.useState({action:o.action,location:o.location}),d=j.useCallback(h=>{n===!1?f(h):j.startTransition(()=>f(h))},[n]);return j.useLayoutEffect(()=>o.listen(d),[o,d]),j.createElement(IT,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:n})}var QE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ji=j.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:c,unstable_mask:f,state:d,target:h,to:y,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:v,...S},_){let{basename:N,navigator:w,unstable_useTransitions:R}=j.useContext(si),A=typeof y=="string"&&QE.test(y),D=LE(y,N);y=D.to;let F=bT(y,{relative:s}),M=Di(),q=null;if(f){let Q=Of(f,[],M.unstable_mask?M.unstable_mask.pathname:"/",!0);N!=="/"&&(Q.pathname=Q.pathname==="/"?N:Ri([N,Q.pathname])),q=w.createHref(Q)}let[U,J,C]=tC(a,S),P=fC(y,{replace:c,unstable_mask:f,state:d,target:h,preventScrollReset:g,relative:s,viewTransition:x,unstable_defaultShouldRevalidate:v,unstable_useTransitions:R});function Y(Q){t&&t(Q),Q.defaultPrevented||P(Q)}let le=!(D.isExternal||o),H=j.createElement("a",{...S,...C,href:(le?q:void 0)||D.absoluteURL||F,onClick:le?Y:t,ref:sC(_,J),target:h,"data-discover":!A&&n==="render"?"true":void 0});return U&&!A?j.createElement(j.Fragment,null,H,j.createElement(nC,{page:F})):H});ji.displayName="Link";var YE=j.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:c,viewTransition:f,children:d,...h},y){let g=bc(c,{relative:h.relative}),x=Di(),v=j.useContext(Rf),{navigator:S,basename:_}=j.useContext(si),N=v!=null&&gC(g)&&f===!0,w=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,R=x.pathname,A=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(R=R.toLowerCase(),A=A?A.toLowerCase():null,w=w.toLowerCase()),A&&_&&(A=Aa(A,_)||A);const D=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let F=R===w||!s&&R.startsWith(w)&&R.charAt(D)==="/",M=A!=null&&(A===w||!s&&A.startsWith(w)&&A.charAt(w.length)==="/"),q={isActive:F,isPending:M,isTransitioning:N},U=F?t:void 0,J;typeof a=="function"?J=a(q):J=[a,F?"active":null,M?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let C=typeof o=="function"?o(q):o;return j.createElement(ji,{...h,"aria-current":U,className:J,ref:y,style:C,to:c,viewTransition:f},typeof d=="function"?d(q):d)});YE.displayName="NavLink";var cC=j.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:c=of,action:f,onSubmit:d,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:x,...v},S)=>{let{unstable_useTransitions:_}=j.useContext(si),N=mC(),w=pC(f,{relative:h}),R=c.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&QE.test(f),D=F=>{if(d&&d(F),F.defaultPrevented)return;F.preventDefault();let M=F.nativeEvent.submitter,q=(M==null?void 0:M.getAttribute("formmethod"))||c,U=()=>N(M||F.currentTarget,{fetcherKey:t,method:q,navigate:n,replace:s,state:o,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:x});_&&n!==!1?j.startTransition(()=>U()):U()};return j.createElement("form",{ref:S,method:R,action:w,onSubmit:a?d:D,...v,"data-discover":!A&&e==="render"?"true":void 0})});cC.displayName="Form";function uC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function VE(e){let t=j.useContext(Ll);return Ct(t,uC(e)),t}function fC(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h}={}){let y=_r(),g=Di(),x=bc(e,{relative:c});return j.useCallback(v=>{if(PT(v,t)){v.preventDefault();let S=n!==void 0?n:rc(g)===rc(x),_=()=>y(e,{replace:S,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d});h?j.startTransition(()=>_()):_()}},[g,y,x,n,a,s,t,e,o,c,f,d,h])}function jf(e){Ei(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=j.useRef(rp(e)),n=j.useRef(!1),a=Di(),s=j.useMemo(()=>qT(a.search,n.current?null:t.current),[a.search]),o=_r(),c=j.useCallback((f,d)=>{const h=rp(typeof f=="function"?f(new URLSearchParams(s)):f);n.current=!0,o("?"+h,d)},[o,s]);return[s,c]}var dC=0,hC=()=>`__${String(++dC)}__`;function mC(){let{router:e}=VE("useSubmit"),{basename:t}=j.useContext(si),n=OT(),a=e.fetch,s=e.navigate;return j.useCallback(async(o,c={})=>{let{action:f,method:d,encType:h,formData:y,body:g}=GT(o,t);if(c.navigate===!1){let x=c.fetcherKey||hC();await a(x,n,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||h,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,n])}function pC(e,{relative:t}={}){let{basename:n}=j.useContext(si),a=j.useContext(_i);Ct(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...bc(e||".",{relative:t})},c=Di();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),d=f.getAll("index");if(d.some(y=>y==="")){f.delete("index"),d.filter(g=>g).forEach(g=>f.append("index",g));let y=f.toString();o.search=y?`?${y}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Ri([n,o.pathname])),rc(o)}function gC(e,{relative:t}={}){let n=j.useContext(BE);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=VE("useViewTransitionState"),s=bc(e,{relative:t});if(!n.isTransitioning)return!1;let o=Aa(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Aa(n.nextLocation.pathname,a)||n.nextLocation.pathname;return bf(s.pathname,c)!=null||bf(s.pathname,o)!=null}/**
61
+ * @license lucide-react v0.544.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 bC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),qv=e=>{const t=yC(e);return t.charAt(0).toUpperCase()+t.slice(1)},XE=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),xC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
66
+ * @license lucide-react v0.544.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 vC={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.544.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 EC=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...vC,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:XE("lucide",s),...!o&&!xC(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,y])=>j.createElement(h,y)),...Array.isArray(o)?o:[o]]));/**
76
+ * @license lucide-react v0.544.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 Re=(e,t)=>{const n=j.forwardRef(({className:a,...s},o)=>j.createElement(EC,{ref:o,iconNode:t,className:XE(`lucide-${bC(qv(e))}`,`lucide-${e}`,a),...s}));return n.displayName=qv(e),n};/**
81
+ * @license lucide-react v0.544.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 SC=[["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"}]],Df=Re("activity",SC);/**
86
+ * @license lucide-react v0.544.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 _C=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ZE=Re("arrow-left",_C);/**
91
+ * @license lucide-react v0.544.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 wC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],NC=Re("check",wC);/**
96
+ * @license lucide-react v0.544.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 kC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fp=Re("chevron-down",kC);/**
101
+ * @license lucide-react v0.544.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 TC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],WE=Re("chevron-right",TC);/**
106
+ * @license lucide-react v0.544.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 CC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],AC=Re("chevron-up",CC);/**
111
+ * @license lucide-react v0.544.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 OC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Pp=Re("circle-alert",OC);/**
116
+ * @license lucide-react v0.544.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 RC=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],MC=Re("circle-check-big",RC);/**
121
+ * @license lucide-react v0.544.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 jC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],qp=Re("circle-check",jC);/**
126
+ * @license lucide-react v0.544.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 DC=[["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"}]],LC=Re("circle-x",DC);/**
131
+ * @license lucide-react v0.544.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 IC=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zC=Re("clock",IC);/**
136
+ * @license lucide-react v0.544.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 BC=[["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"}]],JE=Re("download",BC);/**
141
+ * @license lucide-react v0.544.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 UC=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],Hv=Re("file-code",UC);/**
146
+ * @license lucide-react v0.544.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 $C=[["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"}]],Hp=Re("file-text",$C);/**
151
+ * @license lucide-react v0.544.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 FC=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],PC=Re("flame",FC);/**
156
+ * @license lucide-react v0.544.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 qC=[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],HC=Re("folder-git-2",qC);/**
161
+ * @license lucide-react v0.544.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 KC=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],GC=Re("funnel",KC);/**
166
+ * @license lucide-react v0.544.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 QC=[["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"}]],YC=Re("git-branch",QC);/**
171
+ * @license lucide-react v0.544.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 VC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],XC=Re("globe",VC);/**
176
+ * @license lucide-react v0.544.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 ZC=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],WC=Re("history",ZC);/**
181
+ * @license lucide-react v0.544.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 JC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],eA=Re("info",JC);/**
186
+ * @license lucide-react v0.544.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 tA=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],nA=Re("kanban",tA);/**
191
+ * @license lucide-react v0.544.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 iA=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],aA=Re("layout-grid",iA);/**
196
+ * @license lucide-react v0.544.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 rA=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],sA=Re("link",rA);/**
201
+ * @license lucide-react v0.544.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 lA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Zt=Re("loader-circle",lA);/**
206
+ * @license lucide-react v0.544.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 oA=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Kv=Re("message-circle",oA);/**
211
+ * @license lucide-react v0.544.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:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],uA=Re("message-square",cA);/**
216
+ * @license lucide-react v0.544.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 fA=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],dA=Re("pause",fA);/**
221
+ * @license lucide-react v0.544.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 hA=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],Kp=Re("pen-line",hA);/**
226
+ * @license lucide-react v0.544.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 mA=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Gp=Re("play",mA);/**
231
+ * @license lucide-react v0.544.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 pA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zi=Re("plus",pA);/**
236
+ * @license lucide-react v0.544.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 gA=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],e1=Re("radio",gA);/**
241
+ * @license lucide-react v0.544.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 bA=[["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"}]],hs=Re("refresh-cw",bA);/**
246
+ * @license lucide-react v0.544.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 yA=[["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"}]],Lf=Re("rotate-ccw",yA);/**
251
+ * @license lucide-react v0.544.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 xA=[["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"}]],If=Re("save",xA);/**
256
+ * @license lucide-react v0.544.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 vA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],xf=Re("search",vA);/**
261
+ * @license lucide-react v0.544.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 EA=[["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"}]],SA=Re("send",EA);/**
266
+ * @license lucide-react v0.544.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 _A=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],t1=Re("settings",_A);/**
271
+ * @license lucide-react v0.544.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 wA=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],NA=Re("skull",wA);/**
276
+ * @license lucide-react v0.544.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 kA=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],TA=Re("snowflake",kA);/**
281
+ * @license lucide-react v0.544.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 CA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],n1=Re("square",CA);/**
286
+ * @license lucide-react v0.544.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 AA=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Qp=Re("terminal",AA);/**
291
+ * @license lucide-react v0.544.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 OA=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],RA=Re("timer-reset",OA);/**
296
+ * @license lucide-react v0.544.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 MA=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],yc=Re("trash-2",MA);/**
301
+ * @license lucide-react v0.544.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 jA=[["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"}]],DA=Re("triangle-alert",jA);/**
306
+ * @license lucide-react v0.544.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 LA=[["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"}]],i1=Re("users",LA);/**
311
+ * @license lucide-react v0.544.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 IA=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],a1=Re("workflow",IA);/**
316
+ * @license lucide-react v0.544.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 zA=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],BA=Re("wrench",zA);/**
321
+ * @license lucide-react v0.544.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 UA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Er=Re("x",UA);/**
326
+ * @license lucide-react v0.544.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 $A=[["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"}]],Yp=Re("zap",$A),FA=[{to:"/chat",label:"对话",icon:uA},{to:"/projects",label:"项目",icon:aA},{to:"/board",label:"看板",icon:nA},{to:"/workers",label:"Workers",icon:i1},{to:"/logs",label:"Logs",icon:Hp},{to:"/skills",label:"Skills",icon:XC},{to:"/system",label:"系统",icon:t1}];function PA(){return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"font-[family-name:var(--font-heading)] font-bold text-lg px-3 pt-2 pb-4 flex items-center gap-3 text-[var(--color-text)]",children:[m.jsx("span",{className:"w-5 h-5 rounded-md bg-[var(--color-accent-mint)] border-2 border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]"}),"SPS Console",m.jsx("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] font-normal",children:"v0.44"})]}),m.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":"主导航",children:FA.map(e=>{const t=e.icon;return m.jsxs(YE,{to:e.to,className:({isActive:n})=>["flex items-center gap-3 px-3 py-2.5 rounded-xl font-semibold text-sm cursor-pointer transition-transform duration-150","border-2 border-transparent",n?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] font-bold":"text-[var(--color-text)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)] hover:shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px"].join(" "),children:[m.jsx(t,{size:18,strokeWidth:2.5}),e.label]},e.to)})})]})}class qA extends Error{constructor(t,n,a){super(n),this.status=t,this.detail=a,this.name="ApiError"}}async function Bt(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok){let n;try{n=await t.json()}catch{n=await t.text()}throw new qA(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}function r1(){return Bt("/api/system/info")}function HA(){return Bt("/api/system/env")}function KA(){return Bt("/api/system/doctor/all")}function GA(){return Bt("/api/system/env/raw")}async function QA(e,t){const n=await fetch("/api/system/env",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,etag:t})});if(!n.ok){const a=await n.text(),s=new Error(`${n.status}: ${a}`);throw s.status=n.status,s}return n.json()}function YA(){return Bt("/api/system/latest-version")}async function VA(){const e=await fetch("/api/system/upgrade",{method:"POST"});if(!e.ok&&e.status!==409)throw new Error(`${e.status}: ${await e.text()}`);return e.json()}function zl(){return Bt("/api/projects")}function XA(e){return Bt(`/api/projects/${encodeURIComponent(e)}`)}async function ZA(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.text();throw new Error(`${t.status}: ${n}`)}return t.json()}function WA(e){return Bt(`/api/projects/${encodeURIComponent(e)}/conf`)}async function JA(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/conf`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,etag:n})});if(!a.ok){const s=await a.text(),o=new Error(`${a.status}: ${s}`);throw o.status=a.status,o}return a.json()}async function e2(e,t={}){const n=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}return n.json()}function t2(e){return Bt(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function n2(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipeline`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipeline:t})});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}return n.json()}function i2(e,t){return Bt(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function a2(e,t,n,a){const s=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n,etag:a})});if(!s.ok){const o=await s.text(),c=new Error(`${s.status}: ${o}`);throw c.status=s.status,c}return s.json()}async function r2(e,t,n="blank"){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,template:n})});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return a.json()}async function s2(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function l2(){var f;const e=dt({queryKey:["system-info"],queryFn:r1,refetchInterval:3e4}),t=dt({queryKey:["projects"],queryFn:zl,refetchInterval:1e4}),n=c2(),a=!e.isError,s=((f=t.data)==null?void 0:f.data)??[],o=s.filter(d=>d.pipelineStatus==="running").length,c=s.reduce((d,h)=>d+h.workers.active,0);return m.jsxs("div",{className:"h-10 flex items-center gap-3 px-6 font-[family-name:var(--font-mono)] text-[11px] text-[var(--color-text-muted)]",children:[m.jsx("span",{className:"nb-status",style:{background:a?"var(--color-running-bg)":"var(--color-crashed-bg)",color:a?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:a?"server":"offline"}),m.jsx(o2,{state:n}),m.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),m.jsxs("span",{className:"flex items-center gap-1",title:"活跃 pipeline 数",children:[m.jsx(Df,{size:10,strokeWidth:2.5}),m.jsx("span",{className:"font-bold text-[var(--color-text)]",children:o})," pipeline"]}),m.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),m.jsxs("span",{className:"flex items-center gap-1",title:"活跃 worker 数",children:[m.jsx(e1,{size:10,strokeWidth:2.5}),m.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," worker"]}),m.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),m.jsxs("span",{children:["localhost:",window.location.port]}),e.data&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),m.jsxs("span",{children:["v",e.data.version]}),m.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),m.jsxs("span",{children:["node ",e.data.nodeVersion]})]})]})}function o2({state:e}){return e==="open"?m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:"SSE"}):e==="connecting"?m.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:"SSE·connect"}):m.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[m.jsx(Pp,{size:9,strokeWidth:2.5}),"SSE·down"]})}function c2(){const[e,t]=j.useState("connecting"),n=j.useRef(null);return j.useEffect(()=>{const a=new EventSource("/stream/heartbeat");return n.current=a,a.addEventListener("server.heartbeat",()=>t("open")),a.addEventListener("error",()=>t("closed")),a.addEventListener("open",()=>t("open")),()=>{a.close(),n.current=null}},[]),e}function u2(){return m.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] min-h-screen",children:[m.jsx("aside",{className:"row-span-1 row-start-1 border-r-[3px] border-[var(--color-text)] bg-[var(--color-bg)] p-4 flex flex-col",children:m.jsx(PA,{})}),m.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:m.jsx(LT,{})}),m.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:m.jsx(l2,{})})]})}function sp(e,t){try{const n=JSON.stringify({message:(e instanceof Error?e.message:String(e)).slice(0,1e3),stack:(e instanceof Error?e.stack??"":"").slice(0,4e3),url:typeof window<"u"?window.location.href:"",ua:typeof navigator<"u"?navigator.userAgent:"",ts:new Date().toISOString(),context:t==null?void 0:t.slice(0,200)});fetch("/api/system/client-errors",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0}).catch(()=>{})}catch{}}function f2(){typeof window>"u"||(window.addEventListener("error",e=>{sp(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;sp(t instanceof Error?t:String(t),"unhandledrejection")}))}class d2 extends j.Component{constructor(){super(...arguments);mv(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,a){var s;sp(n,`ErrorBoundary: ${((s=a.componentStack)==null?void 0:s.slice(0,200))??""}`),console.error("[ErrorBoundary]",n,a)}render(){return this.state.error?m.jsx("div",{className:"p-6",children:m.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"💥 UI 崩了"}),m.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),m.jsxs("details",{className:"text-xs mb-4",children:[m.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),m.jsx("pre",{className:"mt-2 font-[family-name:var(--font-mono)] overflow-auto max-h-60 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md p-3",children:this.state.error.stack??"(no stack)"})]}),m.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:"刷新页面"})]})}):this.props.children}}function h2(){const e=_r(),{data:t,isLoading:n,isError:a,error:s,refetch:o}=dt({queryKey:["projects"],queryFn:zl});return m.jsxs("div",{className:"flex flex-col gap-6 max-w-6xl",children:[m.jsxs("header",{className:"flex items-center justify-between",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"项目 🎯"}),m.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:t?`${t.data.length} 个本机项目`:n?"加载中…":"点击刷新重试"})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>o(),type:"button",children:[m.jsx(Df,{size:16,strokeWidth:2.5}),"刷新"]}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>e("/projects/new"),"aria-label":"新建项目",children:[m.jsx(Zi,{size:16,strokeWidth:3}),"新建项目"]})]})]}),n&&m.jsx(g2,{}),a&&m.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:"加载失败"}),m.jsx("p",{className:"text-sm text-[var(--color-text)]",children:s instanceof Error?s.message:String(s)}),m.jsx("button",{className:"nb-btn mt-4",onClick:()=>o(),type:"button",children:"重试"})]}),t&&t.data.length===0&&m.jsx(b2,{}),t&&t.data.length>0&&m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.data.map(c=>m.jsx(m2,{project:c},c.name))})]})}function m2({project:e}){const t=e.pipelineStatus==="running";return m.jsxs(ji,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),m.jsx(p2,{status:e.pipelineStatus})]}),e.repoDir&&m.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),m.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm mt-4 pt-3 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[m.jsx(hm,{label:"cards",value:e.cards.total,accent:"purple"}),m.jsx(hm,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),m.jsx(hm,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function hm({label:e,value:t,accent:n}){const a={purple:"var(--color-accent-purple)",yellow:"var(--color-accent-yellow)",mint:"var(--color-accent-mint)",idle:"var(--color-bg-cream)"};return m.jsxs("div",{className:"flex flex-col items-center justify-center py-2 rounded-lg border-2 border-[var(--color-text)]",style:{background:a[n]},children:[m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),m.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function p2({status:e}){const t={running:{bg:"var(--color-running-bg)",label:"running"},idle:{bg:"var(--color-idle-bg)",label:"idle"},stopping:{bg:"var(--color-stuck-bg)",label:"stopping"},error:{bg:"var(--color-crashed-bg)",label:"error"}},{bg:n,label:a}=t[e],s=e==="running"?"var(--color-running)":e==="error"?"var(--color-crashed)":e==="stopping"?"var(--color-stuck)":"var(--color-idle)";return m.jsx("span",{className:"nb-status",style:{background:n,color:s},children:a})}function g2(){return m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>m.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[m.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),m.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),m.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function b2(){return m.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[m.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center",children:m.jsx(i1,{size:32,strokeWidth:2.5})}),m.jsxs("div",{className:"flex-1",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"还没有项目 ✨"}),m.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:["运行 ",m.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded-md font-[family-name:var(--font-mono)]",children:"sps project init <name>"})," 创建第一个项目。"]}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[m.jsx(Zi,{size:16,strokeWidth:3}),"新建项目"]})]})]})}function y2({title:e,body:t,confirm:n,onConfirm:a,onCancel:s,danger:o}){return j.useEffect(()=>{const c=f=>{f.key==="Escape"&&s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),m.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",onClick:s,children:m.jsxs("div",{onClick:c=>c.stopPropagation(),className:"nb-card max-w-md w-full",children:[m.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),m.jsxs("div",{className:"flex gap-3 justify-end",children:[m.jsx("button",{className:"nb-btn",onClick:s,type:"button",children:"取消"}),m.jsx("button",{className:o?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await a()},type:"button",children:n})]})]})})}const s1=j.createContext(null);function x2({children:e}){const[t,n]=j.useState(null),a=j.useCallback(c=>new Promise(f=>{n({kind:"confirm",opts:c,resolve:d=>{n(null),f(d)}})}),[]),s=j.useCallback(c=>new Promise(f=>{n({kind:"alert",opts:c,resolve:()=>{n(null),f()}})}),[]),o=j.useCallback(c=>new Promise(f=>{n({kind:"prompt",opts:c,resolve:d=>{n(null),f(d)}})}),[]);return m.jsxs(s1.Provider,{value:{confirm:a,alert:s,prompt:o},children:[e,(t==null?void 0:t.kind)==="confirm"&&m.jsx(y2,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"确定",danger:t.opts.danger,onConfirm:()=>t.resolve(!0),onCancel:()=>t.resolve(!1)}),(t==null?void 0:t.kind)==="alert"&&m.jsx(v2,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"知道了",onClose:()=>t.resolve()}),(t==null?void 0:t.kind)==="prompt"&&m.jsx(E2,{title:t.opts.title,body:t.opts.body,placeholder:t.opts.placeholder,defaultValue:t.opts.defaultValue,confirm:t.opts.confirm??"确定",cancel:t.opts.cancel??"取消",onConfirm:c=>t.resolve(c),onCancel:()=>t.resolve(null)})]})}function qn(){const e=j.useContext(s1);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function v2({title:e,body:t,confirm:n,onClose:a}){return j.useEffect(()=>{const s=o=>{(o.key==="Escape"||o.key==="Enter")&&a()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",onClick:a,children:m.jsxs("div",{onClick:s=>s.stopPropagation(),className:"nb-card max-w-md w-full",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),m.jsx("div",{className:"flex gap-3 justify-end",children:m.jsx("button",{className:"nb-btn nb-btn-primary",onClick:a,type:"button",autoFocus:!0,children:n})})]})})}function E2({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:o,onConfirm:c,onCancel:f}){const[d,h]=j.useState(a??""),y=j.useRef(null);j.useEffect(()=>{var v,S;(v=y.current)==null||v.focus(),(S=y.current)==null||S.select();const x=_=>{_.key==="Escape"&&f()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[f]);const g=()=>{const x=d.trim();x&&c(x)};return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",onClick:f,children:m.jsxs("div",{onClick:x=>x.stopPropagation(),className:"nb-card max-w-md w-full",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),m.jsx("input",{ref:y,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:d,onChange:x=>h(x.target.value),onKeyDown:x=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&(x.preventDefault(),g())}}),m.jsxs("div",{className:"flex gap-3 justify-end",children:[m.jsx("button",{className:"nb-btn",onClick:f,type:"button",children:o}),m.jsx("button",{className:"nb-btn nb-btn-primary",onClick:g,type:"button",disabled:!d.trim(),children:s})]})]})})}function S2(){const e=_r(),t=Tn(),{alert:n}=qn(),[a,s]=j.useState({name:"",projectDir:"",mergeBranch:"main",maxWorkers:"1"}),o=Pn({mutationFn:d=>ZA(d),onSuccess:d=>{t.invalidateQueries({queryKey:["projects"]}),e(`/projects/${encodeURIComponent(d.name)}`)},onError:d=>{n({title:"创建失败",body:d instanceof Error?d.message:String(d)})}}),c=/^[a-zA-Z0-9_-]+$/.test(a.name),f=c&&a.projectDir.trim()!==""&&!o.isPending;return m.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[m.jsxs("header",{className:"flex items-center gap-3",children:[m.jsxs("button",{type:"button",onClick:()=>e("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[m.jsx(ZE,{size:14,strokeWidth:3}),"返回"]}),m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:"新建项目"})]}),m.jsx("div",{className:"nb-card",children:m.jsxs("form",{onSubmit:d=>{d.preventDefault(),f&&o.mutate(a)},className:"flex flex-col gap-5",children:[m.jsxs(Yr,{label:"项目名",hint:"只能用字母、数字、下划线、连字符。例如 acme-web",children:[m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如: acme-web",value:a.name,onChange:d=>s({...a,name:d.target.value}),autoFocus:!0,required:!0}),a.name&&!c&&m.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:"名称只能包含 a-z A-Z 0-9 _ -"})]}),m.jsx(Yr,{label:"Git 仓库路径",hint:"本机绝对路径,如 /home/coral/code/acme",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"/home/coral/code/acme",value:a.projectDir,onChange:d=>s({...a,projectDir:d.target.value}),required:!0})}),m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsx(Yr,{label:"合并分支",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.mergeBranch,onChange:d=>s({...a,mergeBranch:d.target.value})})}),m.jsx(Yr,{label:"最大 Worker 数",children:m.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.maxWorkers,onChange:d=>s({...a,maxWorkers:d.target.value})})})]}),m.jsxs("div",{className:"pt-2 border-t-2 border-[var(--color-text)] border-dashed",children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:"可选配置"}),m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(Yr,{label:"Git 远程项目路径",hint:"如 user/repo,空则跳过 Git API",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"user/repo",value:a.gitlabProject??"",onChange:d=>s({...a,gitlabProject:d.target.value})})}),a.gitlabProject&&m.jsx(Yr,{label:"GitLab 项目 ID",hint:"数字,GitHub 用户可留空",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"42",value:a.gitlabProjectId??"",onChange:d=>s({...a,gitlabProjectId:d.target.value})})}),m.jsx(Yr,{label:"Matrix 房间 ID",hint:"空则使用全局配置",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"!abc:matrix.example.com",value:a.matrixRoomId??"",onChange:d=>s({...a,matrixRoomId:d.target.value})})})]})]}),m.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[m.jsx("button",{type:"button",className:"nb-btn",onClick:()=>e("/projects"),disabled:o.isPending,children:"取消"}),m.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!f,"aria-label":"创建项目",children:o.isPending?m.jsxs(m.Fragment,{children:[m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}),"创建中…"]}):m.jsxs(m.Fragment,{children:[m.jsx(Zi,{size:14,strokeWidth:3}),"创建"]})})]})]})})]})}function Yr({label:e,hint:t,children:n}){return m.jsxs("label",{className:"flex flex-col gap-1.5",children:[m.jsx("span",{className:"text-sm font-bold",children:e}),n,t&&m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const Vp=Symbol.for("yaml.alias"),lp=Symbol.for("yaml.document"),vr=Symbol.for("yaml.map"),l1=Symbol.for("yaml.pair"),Xi=Symbol.for("yaml.scalar"),Bl=Symbol.for("yaml.seq"),Si=Symbol.for("yaml.node.type"),wr=e=>!!e&&typeof e=="object"&&e[Si]===Vp,ms=e=>!!e&&typeof e=="object"&&e[Si]===lp,Ul=e=>!!e&&typeof e=="object"&&e[Si]===vr,At=e=>!!e&&typeof e=="object"&&e[Si]===l1,vt=e=>!!e&&typeof e=="object"&&e[Si]===Xi,$l=e=>!!e&&typeof e=="object"&&e[Si]===Bl;function Mt(e){if(e&&typeof e=="object")switch(e[Si]){case vr:case Bl:return!0}return!1}function jt(e){if(e&&typeof e=="object")switch(e[Si]){case Vp:case vr:case Xi:case Bl:return!0}return!1}const o1=e=>(vt(e)||Mt(e))&&!!e.anchor,Fn=Symbol("break visit"),c1=Symbol("skip children"),Vi=Symbol("remove node");function ps(e,t){const n=u1(t);ms(e)?ul(null,e.contents,n,Object.freeze([e]))===Vi&&(e.contents=null):ul(null,e,n,Object.freeze([]))}ps.BREAK=Fn;ps.SKIP=c1;ps.REMOVE=Vi;function ul(e,t,n,a){const s=f1(e,t,n,a);if(jt(s)||At(s))return d1(e,a,s),ul(e,s,n,a);if(typeof s!="symbol"){if(Mt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=ul(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Fn)return Fn;c===Vi&&(t.items.splice(o,1),o-=1)}}}else if(At(t)){a=Object.freeze(a.concat(t));const o=ul("key",t.key,n,a);if(o===Fn)return Fn;o===Vi&&(t.key=null);const c=ul("value",t.value,n,a);if(c===Fn)return Fn;c===Vi&&(t.value=null)}}return s}async function zf(e,t){const n=u1(t);ms(e)?await fl(null,e.contents,n,Object.freeze([e]))===Vi&&(e.contents=null):await fl(null,e,n,Object.freeze([]))}zf.BREAK=Fn;zf.SKIP=c1;zf.REMOVE=Vi;async function fl(e,t,n,a){const s=await f1(e,t,n,a);if(jt(s)||At(s))return d1(e,a,s),fl(e,s,n,a);if(typeof s!="symbol"){if(Mt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=await fl(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Fn)return Fn;c===Vi&&(t.items.splice(o,1),o-=1)}}}else if(At(t)){a=Object.freeze(a.concat(t));const o=await fl("key",t.key,n,a);if(o===Fn)return Fn;o===Vi&&(t.key=null);const c=await fl("value",t.value,n,a);if(c===Fn)return Fn;c===Vi&&(t.value=null)}}return s}function u1(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function f1(e,t,n,a){var s,o,c,f,d;if(typeof n=="function")return n(e,t,a);if(Ul(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if($l(t))return(o=n.Seq)==null?void 0:o.call(n,e,t,a);if(At(t))return(c=n.Pair)==null?void 0:c.call(n,e,t,a);if(vt(t))return(f=n.Scalar)==null?void 0:f.call(n,e,t,a);if(wr(t))return(d=n.Alias)==null?void 0:d.call(n,e,t,a)}function d1(e,t,n){const a=t[t.length-1];if(Mt(a))a.items[e]=n;else if(At(a))e==="key"?a.key=n:a.value=n;else if(ms(a))a.contents=n;else{const s=wr(a)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const _2={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},w2=e=>e.replace(/[!,[\]{}]/g,t=>_2[t]);class Nn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Nn.defaultYaml,t),this.tags=Object.assign({},Nn.defaultTags,n)}clone(){const t=new Nn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Nn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Nn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Nn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Nn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Nn.defaultTags),this.atNextDocument=!1);const a=t.trim().split(/[ \t]+/),s=a.shift();switch(s){case"%TAG":{if(a.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),a.length<2))return!1;const[o,c]=a;return this.tags[o]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,a.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[o]=a;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const c=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,c),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const c=t.slice(2,-1);return c==="!"||c==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),c)}const[,a,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const o=this.tags[a];if(o)try{return o+decodeURIComponent(s)}catch(c){return n(String(c)),null}return a==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,a]of Object.entries(this.tags))if(t.startsWith(a))return n+w2(t.substring(a.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],a=Object.entries(this.tags);let s;if(t&&a.length>0&&jt(t.contents)){const o={};ps(t.contents,(c,f)=>{jt(f)&&f.tag&&(o[f.tag]=!0)}),s=Object.keys(o)}else s=[];for(const[o,c]of a)o==="!!"&&c==="tag:yaml.org,2002:"||(!t||s.some(f=>f.startsWith(c)))&&n.push(`%TAG ${o} ${c}`);return n.join(`
331
+ `)}}Nn.defaultYaml={explicit:!1,version:"1.2"};Nn.defaultTags={"!!":"tag:yaml.org,2002:"};function h1(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function m1(e){const t=new Set;return ps(e,{Value(n,a){a.anchor&&t.add(a.anchor)}}),t}function p1(e,t){for(let n=1;;++n){const a=`${e}${n}`;if(!t.has(a))return a}}function N2(e,t){const n=[],a=new Map;let s=null;return{onAnchor:o=>{n.push(o),s??(s=m1(e));const c=p1(t,s);return s.add(c),c},setAnchors:()=>{for(const o of n){const c=a.get(o);if(typeof c=="object"&&c.anchor&&(vt(c.node)||Mt(c.node)))c.node.anchor=c.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:a}}function dl(e,t,n,a){if(a&&typeof a=="object")if(Array.isArray(a))for(let s=0,o=a.length;s<o;++s){const c=a[s],f=dl(e,a,String(s),c);f===void 0?delete a[s]:f!==c&&(a[s]=f)}else if(a instanceof Map)for(const s of Array.from(a.keys())){const o=a.get(s),c=dl(e,a,s,o);c===void 0?a.delete(s):c!==o&&a.set(s,c)}else if(a instanceof Set)for(const s of Array.from(a)){const o=dl(e,a,s,s);o===void 0?a.delete(s):o!==s&&(a.delete(s),a.add(o))}else for(const[s,o]of Object.entries(a)){const c=dl(e,a,s,o);c===void 0?delete a[s]:c!==o&&(a[s]=c)}return e.call(t,n,a)}function vi(e,t,n){if(Array.isArray(e))return e.map((a,s)=>vi(a,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!o1(e))return e.toJSON(t,n);const a={aliasCount:0,count:1,res:void 0};n.anchors.set(e,a),n.onCreate=o=>{a.res=o,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class Xp{constructor(t){Object.defineProperty(this,Si,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:a,onAnchor:s,reviver:o}={}){if(!ms(t))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},f=vi(this,"",c);if(typeof s=="function")for(const{count:d,res:h}of c.anchors.values())s(h,d);return typeof o=="function"?dl(o,{"":f},"",f):f}}class Bf extends Xp{constructor(t){super(Vp),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let a;n!=null&&n.aliasResolveCache?a=n.aliasResolveCache:(a=[],ps(t,{Node:(o,c)=>{(wr(c)||o1(c))&&a.push(c)}}),n&&(n.aliasResolveCache=a));let s;for(const o of a){if(o===this)break;o.anchor===this.source&&(s=o)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:a,doc:s,maxAliasCount:o}=n,c=this.resolve(s,n);if(!c){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=a.get(c);if(f||(vi(c,null,n),f=a.get(c)),(f==null?void 0:f.res)===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=uf(s,c,a)),f.count*f.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(t,n,a){const s=`*${this.source}`;if(t){if(h1(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${s} `}return s}}function uf(e,t,n){if(wr(t)){const a=t.resolve(e),s=n&&a&&n.get(a);return s?s.count*s.aliasCount:0}else if(Mt(t)){let a=0;for(const s of t.items){const o=uf(e,s,n);o>a&&(a=o)}return a}else if(At(t)){const a=uf(e,t.key,n),s=uf(e,t.value,n);return Math.max(a,s)}return 1}const g1=e=>!e||typeof e!="function"&&typeof e!="object";class Le extends Xp{constructor(t){super(Xi),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:vi(this.value,t,n)}toString(){return String(this.value)}}Le.BLOCK_FOLDED="BLOCK_FOLDED";Le.BLOCK_LITERAL="BLOCK_LITERAL";Le.PLAIN="PLAIN";Le.QUOTE_DOUBLE="QUOTE_DOUBLE";Le.QUOTE_SINGLE="QUOTE_SINGLE";const k2="tag:yaml.org,2002:";function T2(e,t,n){if(t){const a=n.filter(o=>o.tag===t),s=a.find(o=>!o.format)??a[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find(a=>{var s;return((s=a.identify)==null?void 0:s.call(a,e))&&!a.format})}function sc(e,t,n){var g,x,v;if(ms(e)&&(e=e.contents),jt(e))return e;if(At(e)){const S=(x=(g=n.schema[vr]).createNode)==null?void 0:x.call(g,n.schema,null,n);return S.items.push(e),S}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:a,onAnchor:s,onTagObj:o,schema:c,sourceObjects:f}=n;let d;if(a&&e&&typeof e=="object"){if(d=f.get(e),d)return d.anchor??(d.anchor=s(e)),new Bf(d.anchor);d={anchor:null,node:null},f.set(e,d)}t!=null&&t.startsWith("!!")&&(t=k2+t.slice(2));let h=T2(e,t,c.tags);if(!h){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const S=new Le(e);return d&&(d.node=S),S}h=e instanceof Map?c[vr]:Symbol.iterator in Object(e)?c[Bl]:c[vr]}o&&(o(h),delete n.onTagObj);const y=h!=null&&h.createNode?h.createNode(n.schema,e,n):typeof((v=h==null?void 0:h.nodeClass)==null?void 0:v.from)=="function"?h.nodeClass.from(n.schema,e,n):new Le(e);return t?y.tag=t:h.default||(y.tag=h.tag),d&&(d.node=y),y}function vf(e,t,n){let a=n;for(let s=t.length-1;s>=0;--s){const o=t[s];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const c=[];c[o]=a,a=c}else a=new Map([[o,a]])}return sc(a,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Wo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class b1 extends Xp{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(a=>jt(a)||At(a)?a.clone(t):a),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Wo(t))this.add(n);else{const[a,...s]=t,o=this.get(a,!0);if(Mt(o))o.addIn(s,n);else if(o===void 0&&this.schema)this.set(a,vf(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}deleteIn(t){const[n,...a]=t;if(a.length===0)return this.delete(n);const s=this.get(n,!0);if(Mt(s))return s.deleteIn(a);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${a}`)}getIn(t,n){const[a,...s]=t,o=this.get(a,!0);return s.length===0?!n&&vt(o)?o.value:o:Mt(o)?o.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!At(n))return!1;const a=n.value;return a==null||t&&vt(a)&&a.value==null&&!a.commentBefore&&!a.comment&&!a.tag})}hasIn(t){const[n,...a]=t;if(a.length===0)return this.has(n);const s=this.get(n,!0);return Mt(s)?s.hasIn(a):!1}setIn(t,n){const[a,...s]=t;if(s.length===0)this.set(a,n);else{const o=this.get(a,!0);if(Mt(o))o.setIn(s,n);else if(o===void 0&&this.schema)this.set(a,vf(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}}const C2=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function ka(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Wr=(e,t,n)=>e.endsWith(`
332
+ `)?ka(n,t):n.includes(`
333
+ `)?`
334
+ `+ka(n,t):(e.endsWith(" ")?"":" ")+n,y1="flow",op="block",ff="quoted";function Uf(e,t,n="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:o=20,onFold:c,onOverflow:f}={}){if(!s||s<0)return e;s<o&&(o=0);const d=Math.max(1+o,1+s-t.length);if(e.length<=d)return e;const h=[],y={};let g=s-t.length;typeof a=="number"&&(a>s-Math.max(2,o)?h.push(0):g=s-a);let x,v,S=!1,_=-1,N=-1,w=-1;n===op&&(_=Gv(e,_,t.length),_!==-1&&(g=_+d));for(let A;A=e[_+=1];){if(n===ff&&A==="\\"){switch(N=_,e[_+1]){case"x":_+=3;break;case"u":_+=5;break;case"U":_+=9;break;default:_+=1}w=_}if(A===`
335
+ `)n===op&&(_=Gv(e,_,t.length)),g=_+t.length+d,x=void 0;else{if(A===" "&&v&&v!==" "&&v!==`
336
+ `&&v!==" "){const D=e[_+1];D&&D!==" "&&D!==`
337
+ `&&D!==" "&&(x=_)}if(_>=g)if(x)h.push(x),g=x+d,x=void 0;else if(n===ff){for(;v===" "||v===" ";)v=A,A=e[_+=1],S=!0;const D=_>w+1?_-2:N-1;if(y[D])return e;h.push(D),y[D]=!0,g=D+d,x=void 0}else S=!0}v=A}if(S&&f&&f(),h.length===0)return e;c&&c();let R=e.slice(0,h[0]);for(let A=0;A<h.length;++A){const D=h[A],F=h[A+1]||e.length;D===0?R=`
338
+ ${t}${e.slice(0,F)}`:(n===ff&&y[D]&&(R+=`${e[D]}\\`),R+=`
339
+ ${t}${e.slice(D+1,F)}`)}return R}function Gv(e,t,n){let a=t,s=t+1,o=e[s];for(;o===" "||o===" ";)if(t<s+n)o=e[++t];else{do o=e[++t];while(o&&o!==`
340
+ `);a=t,s=t+1,o=e[s]}return a}const $f=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ff=e=>/^(%|---|\.\.\.)/m.test(e);function A2(e,t,n){if(!t||t<0)return!1;const a=t-n,s=e.length;if(s<=a)return!1;for(let o=0,c=0;o<s;++o)if(e[o]===`
341
+ `){if(o-c>a)return!0;if(c=o+1,s-c<=a)return!1}return!0}function Jo(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:a}=t,s=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Ff(e)?" ":"");let c="",f=0;for(let d=0,h=n[d];h;h=n[++d])if(h===" "&&n[d+1]==="\\"&&n[d+2]==="n"&&(c+=n.slice(f,d)+"\\ ",d+=1,f=d,h="\\"),h==="\\")switch(n[d+1]){case"u":{c+=n.slice(f,d);const y=n.substr(d+2,4);switch(y){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:y.substr(0,2)==="00"?c+="\\x"+y.substr(2):c+=n.substr(d,6)}d+=5,f=d+1}break;case"n":if(a||n[d+2]==='"'||n.length<s)d+=1;else{for(c+=n.slice(f,d)+`
342
+
343
+ `;n[d+2]==="\\"&&n[d+3]==="n"&&n[d+4]!=='"';)c+=`
344
+ `,d+=2;c+=o,n[d+2]===" "&&(c+="\\"),d+=1,f=d+1}break;default:d+=1}return c=f?c+n.slice(f):n,a?c:Uf(c,o,ff,$f(t,!1))}function cp(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
345
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Jo(e,t);const n=t.indent||(Ff(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
346
+ ${n}`)+"'";return t.implicitKey?a:Uf(a,n,y1,$f(t,!1))}function hl(e,t){const{singleQuote:n}=t.options;let a;if(n===!1)a=Jo;else{const s=e.includes('"'),o=e.includes("'");s&&!o?a=cp:o&&!s?a=Jo:a=n?cp:Jo}return a(e,t)}let up;try{up=new RegExp(`(^|(?<!
347
+ ))
348
+ +(?!
349
+ |$)`,"g")}catch{up=/\n+(?!\n|$)/g}function df({comment:e,type:t,value:n},a,s,o){const{blockQuote:c,commentString:f,lineWidth:d}=a.options;if(!c||/\n[\t ]+$/.test(n))return hl(n,a);const h=a.indent||(a.forceBlockIndent||Ff(n)?" ":""),y=c==="literal"?!0:c==="folded"||t===Le.BLOCK_FOLDED?!1:t===Le.BLOCK_LITERAL?!0:!A2(n,d,h.length);if(!n)return y?`|
350
+ `:`>
351
+ `;let g,x;for(x=n.length;x>0;--x){const F=n[x-1];if(F!==`
352
+ `&&F!==" "&&F!==" ")break}let v=n.substring(x);const S=v.indexOf(`
353
+ `);S===-1?g="-":n===v||S!==v.length-1?(g="+",o&&o()):g="",v&&(n=n.slice(0,-v.length),v[v.length-1]===`
354
+ `&&(v=v.slice(0,-1)),v=v.replace(up,`$&${h}`));let _=!1,N,w=-1;for(N=0;N<n.length;++N){const F=n[N];if(F===" ")_=!0;else if(F===`
355
+ `)w=N;else break}let R=n.substring(0,w<N?w+1:N);R&&(n=n.substring(R.length),R=R.replace(/\n+/g,`$&${h}`));let D=(_?h?"2":"1":"")+g;if(e&&(D+=" "+f(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!y){const F=n.replace(/\n+/g,`
356
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let M=!1;const q=$f(a,!0);c!=="folded"&&t!==Le.BLOCK_FOLDED&&(q.onOverflow=()=>{M=!0});const U=Uf(`${R}${F}${v}`,h,op,q);if(!M)return`>${D}
357
+ ${h}${U}`}return n=n.replace(/\n+/g,`$&${h}`),`|${D}
358
+ ${h}${R}${n}${v}`}function O2(e,t,n,a){const{type:s,value:o}=e,{actualString:c,implicitKey:f,indent:d,indentStep:h,inFlow:y}=t;if(f&&o.includes(`
359
+ `)||y&&/[[\]{},]/.test(o))return hl(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||y||!o.includes(`
360
+ `)?hl(o,t):df(e,t,n,a);if(!f&&!y&&s!==Le.PLAIN&&o.includes(`
361
+ `))return df(e,t,n,a);if(Ff(o)){if(d==="")return t.forceBlockIndent=!0,df(e,t,n,a);if(f&&d===h)return hl(o,t)}const g=o.replace(/\n+/g,`$&
362
+ ${d}`);if(c){const x=_=>{var N;return _.default&&_.tag!=="tag:yaml.org,2002:str"&&((N=_.test)==null?void 0:N.test(g))},{compat:v,tags:S}=t.doc.schema;if(S.some(x)||v!=null&&v.some(x))return hl(o,t)}return f?g:Uf(g,d,y1,$f(t,!1))}function xc(e,t,n,a){const{implicitKey:s,inFlow:o}=t,c=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:f}=e;f!==Le.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(f=Le.QUOTE_DOUBLE);const d=y=>{switch(y){case Le.BLOCK_FOLDED:case Le.BLOCK_LITERAL:return s||o?hl(c.value,t):df(c,t,n,a);case Le.QUOTE_DOUBLE:return Jo(c.value,t);case Le.QUOTE_SINGLE:return cp(c.value,t);case Le.PLAIN:return O2(c,t,n,a);default:return null}};let h=d(f);if(h===null){const{defaultKeyType:y,defaultStringType:g}=t.options,x=s&&y||g;if(h=d(x),h===null)throw new Error(`Unsupported default string type ${x}`)}return h}function x1(e,t){const n=Object.assign({blockQuote:!0,commentString:C2,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let a;switch(n.collectionStyle){case"block":a=!1;break;case"flow":a=!0;break;default:a=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:a,options:n}}function R2(e,t){var s;if(t.tag){const o=e.filter(c=>c.tag===t.tag);if(o.length>0)return o.find(c=>c.format===t.format)??o[0]}let n,a;if(vt(t)){a=t.value;let o=e.filter(c=>{var f;return(f=c.identify)==null?void 0:f.call(c,a)});if(o.length>1){const c=o.filter(f=>f.test);c.length>0&&(o=c)}n=o.find(c=>c.format===t.format)??o.find(c=>!c.format)}else a=t,n=e.find(o=>o.nodeClass&&a instanceof o.nodeClass);if(!n){const o=((s=a==null?void 0:a.constructor)==null?void 0:s.name)??(a===null?"null":typeof a);throw new Error(`Tag not resolved for ${o} value`)}return n}function M2(e,t,{anchors:n,doc:a}){if(!a.directives)return"";const s=[],o=(vt(e)||Mt(e))&&e.anchor;o&&h1(o)&&(n.add(o),s.push(`&${o}`));const c=e.tag??(t.default?null:t.tag);return c&&s.push(a.directives.tagString(c)),s.join(" ")}function Al(e,t,n,a){var d;if(At(e))return e.toString(t,n,a);if(wr(e)){if(t.doc.directives)return e.toString(t);if((d=t.resolvedAliases)!=null&&d.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const o=jt(e)?e:t.doc.createNode(e,{onTagObj:h=>s=h});s??(s=R2(t.doc.schema.tags,o));const c=M2(o,s,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const f=typeof s.stringify=="function"?s.stringify(o,t,n,a):vt(o)?xc(o,t,n,a):o.toString(t,n,a);return c?vt(o)||f[0]==="{"||f[0]==="["?`${c} ${f}`:`${c}
363
+ ${t.indent}${f}`:f}function j2({key:e,value:t},n,a,s){const{allNullValues:o,doc:c,indent:f,indentStep:d,options:{commentString:h,indentSeq:y,simpleKeys:g}}=n;let x=jt(e)&&e.comment||null;if(g){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(Mt(e)||!jt(e)&&typeof e=="object"){const q="With simple keys, collection cannot be used as a key value";throw new Error(q)}}let v=!g&&(!e||x&&t==null&&!n.inFlow||Mt(e)||(vt(e)?e.type===Le.BLOCK_FOLDED||e.type===Le.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!v&&(g||!o),indent:f+d});let S=!1,_=!1,N=Al(e,n,()=>S=!0,()=>_=!0);if(!v&&!n.inFlow&&N.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(n.inFlow){if(o||t==null)return S&&a&&a(),N===""?"?":v?`? ${N}`:N}else if(o&&!g||t==null&&v)return N=`? ${N}`,x&&!S?N+=Wr(N,n.indent,h(x)):_&&s&&s(),N;S&&(x=null),v?(x&&(N+=Wr(N,n.indent,h(x))),N=`? ${N}
364
+ ${f}:`):(N=`${N}:`,x&&(N+=Wr(N,n.indent,h(x))));let w,R,A;jt(t)?(w=!!t.spaceBefore,R=t.commentBefore,A=t.comment):(w=!1,R=null,A=null,t&&typeof t=="object"&&(t=c.createNode(t))),n.implicitKey=!1,!v&&!x&&vt(t)&&(n.indentAtStart=N.length+1),_=!1,!y&&d.length>=2&&!n.inFlow&&!v&&$l(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let D=!1;const F=Al(t,n,()=>D=!0,()=>_=!0);let M=" ";if(x||w||R){if(M=w?`
365
+ `:"",R){const q=h(R);M+=`
366
+ ${ka(q,n.indent)}`}F===""&&!n.inFlow?M===`
367
+ `&&A&&(M=`
368
+
369
+ `):M+=`
370
+ ${n.indent}`}else if(!v&&Mt(t)){const q=F[0],U=F.indexOf(`
371
+ `),J=U!==-1,C=n.inFlow??t.flow??t.items.length===0;if(J||!C){let P=!1;if(J&&(q==="&"||q==="!")){let Y=F.indexOf(" ");q==="&"&&Y!==-1&&Y<U&&F[Y+1]==="!"&&(Y=F.indexOf(" ",Y+1)),(Y===-1||U<Y)&&(P=!0)}P||(M=`
372
+ ${n.indent}`)}}else(F===""||F[0]===`
373
+ `)&&(M="");return N+=M+F,n.inFlow?D&&a&&a():A&&!D?N+=Wr(N,n.indent,h(A)):_&&s&&s(),N}function v1(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Ku="<<",Ta={identify:e=>e===Ku||typeof e=="symbol"&&e.description===Ku,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Le(Symbol(Ku)),{addToJSMap:E1}),stringify:()=>Ku},D2=(e,t)=>(Ta.identify(t)||vt(t)&&(!t.type||t.type===Le.PLAIN)&&Ta.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Ta.tag&&n.default));function E1(e,t,n){if(n=e&&wr(n)?n.resolve(e.doc):n,$l(n))for(const a of n.items)mm(e,t,a);else if(Array.isArray(n))for(const a of n)mm(e,t,a);else mm(e,t,n)}function mm(e,t,n){const a=e&&wr(n)?n.resolve(e.doc):n;if(!Ul(a))throw new Error("Merge sources must be maps or map aliases");const s=a.toJSON(null,e,Map);for(const[o,c]of s)t instanceof Map?t.has(o)||t.set(o,c):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0});return t}function S1(e,t,{key:n,value:a}){if(jt(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(D2(e,n))E1(e,t,a);else{const s=vi(n,"",e);if(t instanceof Map)t.set(s,vi(a,s,e));else if(t instanceof Set)t.add(s);else{const o=L2(n,s,e),c=vi(a,o,e);o in t?Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[o]=c}}return t}function L2(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(jt(e)&&(n!=null&&n.doc)){const a=x1(n.doc,{});a.anchors=new Set;for(const o of n.anchors.keys())a.anchors.add(o.anchor);a.inFlow=!0,a.inStringifyKey=!0;const s=e.toString(a);if(!n.mapKeyWarned){let o=JSON.stringify(s);o.length>40&&(o=o.substring(0,36)+'..."'),v1(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function Zp(e,t,n){const a=sc(e,void 0,n),s=sc(t,void 0,n);return new gn(a,s)}class gn{constructor(t,n=null){Object.defineProperty(this,Si,{value:l1}),this.key=t,this.value=n}clone(t){let{key:n,value:a}=this;return jt(n)&&(n=n.clone(t)),jt(a)&&(a=a.clone(t)),new gn(n,a)}toJSON(t,n){const a=n!=null&&n.mapAsMap?new Map:{};return S1(n,a,this)}toString(t,n,a){return t!=null&&t.doc?j2(this,t,n,a):JSON.stringify(this)}}function _1(e,t,n){return(t.inFlow??e.flow?z2:I2)(e,t,n)}function I2({comment:e,items:t},n,{blockItemPrefix:a,flowChars:s,itemIndent:o,onChompKeep:c,onComment:f}){const{indent:d,options:{commentString:h}}=n,y=Object.assign({},n,{indent:o,type:null});let g=!1;const x=[];for(let S=0;S<t.length;++S){const _=t[S];let N=null;if(jt(_))!g&&_.spaceBefore&&x.push(""),Ef(n,x,_.commentBefore,g),_.comment&&(N=_.comment);else if(At(_)){const R=jt(_.key)?_.key:null;R&&(!g&&R.spaceBefore&&x.push(""),Ef(n,x,R.commentBefore,g))}g=!1;let w=Al(_,y,()=>N=null,()=>g=!0);N&&(w+=Wr(w,o,h(N))),g&&N&&(g=!1),x.push(a+w)}let v;if(x.length===0)v=s.start+s.end;else{v=x[0];for(let S=1;S<x.length;++S){const _=x[S];v+=_?`
374
+ ${d}${_}`:`
375
+ `}}return e?(v+=`
376
+ `+ka(h(e),d),f&&f()):g&&c&&c(),v}function z2({items:e},t,{flowChars:n,itemIndent:a}){const{indent:s,indentStep:o,flowCollectionPadding:c,options:{commentString:f}}=t;a+=o;const d=Object.assign({},t,{indent:a,inFlow:!0,type:null});let h=!1,y=0;const g=[];for(let S=0;S<e.length;++S){const _=e[S];let N=null;if(jt(_))_.spaceBefore&&g.push(""),Ef(t,g,_.commentBefore,!1),_.comment&&(N=_.comment);else if(At(_)){const R=jt(_.key)?_.key:null;R&&(R.spaceBefore&&g.push(""),Ef(t,g,R.commentBefore,!1),R.comment&&(h=!0));const A=jt(_.value)?_.value:null;A?(A.comment&&(N=A.comment),A.commentBefore&&(h=!0)):_.value==null&&(R!=null&&R.comment)&&(N=R.comment)}N&&(h=!0);let w=Al(_,d,()=>N=null);h||(h=g.length>y||w.includes(`
377
+ `)),S<e.length-1?w+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(h||(h=g.reduce((R,A)=>R+A.length+2,2)+(w.length+2)>t.options.lineWidth)),h&&(w+=",")),N&&(w+=Wr(w,a,f(N))),g.push(w),y=g.length}const{start:x,end:v}=n;if(g.length===0)return x+v;if(!h){const S=g.reduce((_,N)=>_+N.length+2,2);h=t.options.lineWidth>0&&S>t.options.lineWidth}if(h){let S=x;for(const _ of g)S+=_?`
378
+ ${o}${s}${_}`:`
379
+ `;return`${S}
380
+ ${s}${v}`}else return`${x}${c}${g.join(" ")}${c}${v}`}function Ef({indent:e,options:{commentString:t}},n,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){const o=ka(t(a),e);n.push(o.trimStart())}}function Jr(e,t){const n=vt(t)?t.value:t;for(const a of e)if(At(a)&&(a.key===t||a.key===n||vt(a.key)&&a.key.value===n))return a}class ai extends b1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(vr,t),this.items=[]}static from(t,n,a){const{keepUndefined:s,replacer:o}=a,c=new this(t),f=(d,h)=>{if(typeof o=="function")h=o.call(n,d,h);else if(Array.isArray(o)&&!o.includes(d))return;(h!==void 0||s)&&c.items.push(Zp(d,h,a))};if(n instanceof Map)for(const[d,h]of n)f(d,h);else if(n&&typeof n=="object")for(const d of Object.keys(n))f(d,n[d]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,n){var c;let a;At(t)?a=t:!t||typeof t!="object"||!("key"in t)?a=new gn(t,t==null?void 0:t.value):a=new gn(t.key,t.value);const s=Jr(this.items,a.key),o=(c=this.schema)==null?void 0:c.sortMapEntries;if(s){if(!n)throw new Error(`Key ${a.key} already set`);vt(s.value)&&g1(a.value)?s.value.value=a.value:s.value=a.value}else if(o){const f=this.items.findIndex(d=>o(a,d)<0);f===-1?this.items.push(a):this.items.splice(f,0,a)}else this.items.push(a)}delete(t){const n=Jr(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const a=Jr(this.items,t),s=a==null?void 0:a.value;return(!n&&vt(s)?s.value:s)??void 0}has(t){return!!Jr(this.items,t)}set(t,n){this.add(new gn(t,n),!0)}toJSON(t,n,a){const s=a?new a:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(s);for(const o of this.items)S1(n,s,o);return s}toString(t,n,a){if(!t)return JSON.stringify(this);for(const s of this.items)if(!At(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),_1(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const Fl={collection:"map",default:!0,nodeClass:ai,tag:"tag:yaml.org,2002:map",resolve(e,t){return Ul(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>ai.from(e,t,n)};class Sr extends b1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Bl,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Gu(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const a=Gu(t);if(typeof a!="number")return;const s=this.items[a];return!n&&vt(s)?s.value:s}has(t){const n=Gu(t);return typeof n=="number"&&n<this.items.length}set(t,n){const a=Gu(t);if(typeof a!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[a];vt(s)&&g1(n)?s.value=n:this.items[a]=n}toJSON(t,n){const a=[];n!=null&&n.onCreate&&n.onCreate(a);let s=0;for(const o of this.items)a.push(vi(o,String(s++),n));return a}toString(t,n,a){return t?_1(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:a,onComment:n}):JSON.stringify(this)}static from(t,n,a){const{replacer:s}=a,o=new this(t);if(n&&Symbol.iterator in Object(n)){let c=0;for(let f of n){if(typeof s=="function"){const d=n instanceof Set?f:String(c++);f=s.call(n,d,f)}o.items.push(sc(f,void 0,a))}}return o}}function Gu(e){let t=vt(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const Pl={collection:"seq",default:!0,nodeClass:Sr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return $l(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Sr.from(e,t,n)},Pf={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,a){return t=Object.assign({actualString:!0},t),xc(e,t,n,a)}},qf={identify:e=>e==null,createNode:()=>new Le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Le(null),stringify:({source:e},t)=>typeof e=="string"&&qf.test.test(e)?e:t.options.nullStr},Wp={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Le(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&Wp.test.test(e)){const a=e[0]==="t"||e[0]==="T";if(t===a)return e}return t?n.options.trueStr:n.options.falseStr}};function Li({format:e,minFractionDigits:t,tag:n,value:a}){if(typeof a=="bigint")return String(a);const s=typeof a=="number"?a:Number(a);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(a,-0)?"-0":JSON.stringify(a);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let c=o.indexOf(".");c<0&&(c=o.length,o+=".");let f=t-(o.length-c-1);for(;f-- >0;)o+="0"}return o}const w1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Li},N1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Li(e)}},k1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Le(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Li},Hf=e=>typeof e=="bigint"||Number.isInteger(e),Jp=(e,t,n,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),n);function T1(e,t,n){const{value:a}=e;return Hf(a)&&a>=0?n+a.toString(t):Li(e)}const C1={identify:e=>Hf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>Jp(e,2,8,n),stringify:e=>T1(e,8,"0o")},A1={identify:Hf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Jp(e,0,10,n),stringify:Li},O1={identify:e=>Hf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Jp(e,2,16,n),stringify:e=>T1(e,16,"0x")},B2=[Fl,Pl,Pf,qf,Wp,C1,A1,O1,w1,N1,k1];function Qv(e){return typeof e=="bigint"||Number.isInteger(e)}const Qu=({value:e})=>JSON.stringify(e),U2=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Qu},{identify:e=>e==null,createNode:()=>new Le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Qu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Qu},{identify:Qv,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Qv(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Qu}],$2={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},F2=[Fl,Pl].concat(U2,$2),eg={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),a=new Uint8Array(n.length);for(let s=0;s<n.length;++s)a[s]=n.charCodeAt(s);return a}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},a,s,o){if(!n)return"";const c=n;let f;if(typeof btoa=="function"){let d="";for(let h=0;h<c.length;++h)d+=String.fromCharCode(c[h]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Le.BLOCK_LITERAL),t!==Le.QUOTE_DOUBLE){const d=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),h=Math.ceil(f.length/d),y=new Array(h);for(let g=0,x=0;g<h;++g,x+=d)y[g]=f.substr(x,d);f=y.join(t===Le.BLOCK_LITERAL?`
381
+ `:" ")}return xc({comment:e,type:t,value:f},a,s,o)}};function R1(e,t){if($l(e))for(let n=0;n<e.items.length;++n){let a=e.items[n];if(!At(a)){if(Ul(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");const s=a.items[0]||new gn(new Le(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
382
+ ${s.key.commentBefore}`:a.commentBefore),a.comment){const o=s.value??s.key;o.comment=o.comment?`${a.comment}
383
+ ${o.comment}`:a.comment}a=s}e.items[n]=At(a)?a:new gn(a)}}else t("Expected a sequence for this tag");return e}function M1(e,t,n){const{replacer:a}=n,s=new Sr(e);s.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let c of t){typeof a=="function"&&(c=a.call(t,String(o++),c));let f,d;if(Array.isArray(c))if(c.length===2)f=c[0],d=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const h=Object.keys(c);if(h.length===1)f=h[0],d=c[f];else throw new TypeError(`Expected tuple with one key, not ${h.length} keys`)}else f=c;s.items.push(Zp(f,d,n))}return s}const tg={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:R1,createNode:M1};class ml extends Sr{constructor(){super(),this.add=ai.prototype.add.bind(this),this.delete=ai.prototype.delete.bind(this),this.get=ai.prototype.get.bind(this),this.has=ai.prototype.has.bind(this),this.set=ai.prototype.set.bind(this),this.tag=ml.tag}toJSON(t,n){if(!n)return super.toJSON(t);const a=new Map;n!=null&&n.onCreate&&n.onCreate(a);for(const s of this.items){let o,c;if(At(s)?(o=vi(s.key,"",n),c=vi(s.value,o,n)):o=vi(s,"",n),a.has(o))throw new Error("Ordered maps must not include duplicate keys");a.set(o,c)}return a}static from(t,n,a){const s=M1(t,n,a),o=new this;return o.items=s.items,o}}ml.tag="tag:yaml.org,2002:omap";const ng={collection:"seq",identify:e=>e instanceof Map,nodeClass:ml,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=R1(e,t),a=[];for(const{key:s}of n.items)vt(s)&&(a.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):a.push(s.value));return Object.assign(new ml,n)},createNode:(e,t,n)=>ml.from(e,t,n)};function j1({value:e,source:t},n){return t&&(e?D1:L1).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const D1={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Le(!0),stringify:j1},L1={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Le(!1),stringify:j1},P2={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Li},q2={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Li(e)}},H2={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Le(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const a=e.substring(n+1).replace(/_/g,"");a[a.length-1]==="0"&&(t.minFractionDigits=a.length)}return t},stringify:Li},vc=e=>typeof e=="bigint"||Number.isInteger(e);function Kf(e,t,n,{intAsBigInt:a}){const s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),a){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const c=BigInt(e);return s==="-"?BigInt(-1)*c:c}const o=parseInt(e,n);return s==="-"?-1*o:o}function ig(e,t,n){const{value:a}=e;if(vc(a)){const s=a.toString(t);return a<0?"-"+n+s.substr(1):n+s}return Li(e)}const K2={identify:vc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Kf(e,2,2,n),stringify:e=>ig(e,2,"0b")},G2={identify:vc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Kf(e,1,8,n),stringify:e=>ig(e,8,"0")},Q2={identify:vc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Kf(e,0,10,n),stringify:Li},Y2={identify:vc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Kf(e,2,16,n),stringify:e=>ig(e,16,"0x")};class pl extends ai{constructor(t){super(t),this.tag=pl.tag}add(t){let n;At(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new gn(t.key,null):n=new gn(t,null),Jr(this.items,n.key)||this.items.push(n)}get(t,n){const a=Jr(this.items,t);return!n&&At(a)?vt(a.key)?a.key.value:a.key:a}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const a=Jr(this.items,t);a&&!n?this.items.splice(this.items.indexOf(a),1):!a&&n&&this.items.push(new gn(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,a){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,a);throw new Error("Set items must all have null values")}static from(t,n,a){const{replacer:s}=a,o=new this(t);if(n&&Symbol.iterator in Object(n))for(let c of n)typeof s=="function"&&(c=s.call(n,c,c)),o.items.push(Zp(c,null,a));return o}}pl.tag="tag:yaml.org,2002:set";const ag={collection:"map",identify:e=>e instanceof Set,nodeClass:pl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>pl.from(e,t,n),resolve(e,t){if(Ul(e)){if(e.hasAllNullValues(!0))return Object.assign(new pl,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function rg(e,t){const n=e[0],a=n==="-"||n==="+"?e.substring(1):e,s=c=>t?BigInt(c):Number(c),o=a.replace(/_/g,"").split(":").reduce((c,f)=>c*s(60)+s(f),s(0));return n==="-"?s(-1)*o:o}function I1(e){let{value:t}=e,n=c=>c;if(typeof t=="bigint")n=c=>BigInt(c);else if(isNaN(t)||!isFinite(t))return Li(e);let a="";t<0&&(a="-",t*=n(-1));const s=n(60),o=[t%s];return t<60?o.unshift(0):(t=(t-o[0])/s,o.unshift(t%s),t>=60&&(t=(t-o[0])/s,o.unshift(t))),a+o.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const z1={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>rg(e,n),stringify:I1},B1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>rg(e,!1),stringify:I1},Gf={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Gf.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,a,s,o,c,f]=t.map(Number),d=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(n,a-1,s,o||0,c||0,f||0,d);const y=t[8];if(y&&y!=="Z"){let g=rg(y,!1);Math.abs(g)<30&&(g*=60),h-=6e4*g}return new Date(h)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Yv=[Fl,Pl,Pf,qf,D1,L1,K2,G2,Q2,Y2,P2,q2,H2,eg,Ta,ng,tg,ag,z1,B1,Gf],Vv=new Map([["core",B2],["failsafe",[Fl,Pl,Pf]],["json",F2],["yaml11",Yv],["yaml-1.1",Yv]]),Xv={binary:eg,bool:Wp,float:k1,floatExp:N1,floatNaN:w1,floatTime:B1,int:A1,intHex:O1,intOct:C1,intTime:z1,map:Fl,merge:Ta,null:qf,omap:ng,pairs:tg,seq:Pl,set:ag,timestamp:Gf},V2={"tag:yaml.org,2002:binary":eg,"tag:yaml.org,2002:merge":Ta,"tag:yaml.org,2002:omap":ng,"tag:yaml.org,2002:pairs":tg,"tag:yaml.org,2002:set":ag,"tag:yaml.org,2002:timestamp":Gf};function pm(e,t,n){const a=Vv.get(t);if(a&&!e)return n&&!a.includes(Ta)?a.concat(Ta):a.slice();let s=a;if(!s)if(Array.isArray(e))s=[];else{const o=Array.from(Vv.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)s=s.concat(o);else typeof e=="function"&&(s=e(s.slice()));return n&&(s=s.concat(Ta)),s.reduce((o,c)=>{const f=typeof c=="string"?Xv[c]:c;if(!f){const d=JSON.stringify(c),h=Object.keys(Xv).map(y=>JSON.stringify(y)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${h}`)}return o.includes(f)||o.push(f),o},[])}const X2=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let U1=class $1{constructor({compat:t,customTags:n,merge:a,resolveKnownTags:s,schema:o,sortMapEntries:c,toStringDefaults:f}){this.compat=Array.isArray(t)?pm(t,"compat"):t?pm(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=s?V2:{},this.tags=pm(n,this.name,a),this.toStringOptions=f??null,Object.defineProperty(this,vr,{value:Fl}),Object.defineProperty(this,Xi,{value:Pf}),Object.defineProperty(this,Bl,{value:Pl}),this.sortMapEntries=typeof c=="function"?c:c===!0?X2:null}clone(){const t=Object.create($1.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Z2(e,t){var d;const n=[];let a=t.directives===!0;if(t.directives!==!1&&e.directives){const h=e.directives.toString(e);h?(n.push(h),a=!0):e.directives.docStart&&(a=!0)}a&&n.push("---");const s=x1(e,t),{commentString:o}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const h=o(e.commentBefore);n.unshift(ka(h,""))}let c=!1,f=null;if(e.contents){if(jt(e.contents)){if(e.contents.spaceBefore&&a&&n.push(""),e.contents.commentBefore){const g=o(e.contents.commentBefore);n.push(ka(g,""))}s.forceBlockIndent=!!e.comment,f=e.contents.comment}const h=f?void 0:()=>c=!0;let y=Al(e.contents,s,()=>f=null,h);f&&(y+=Wr(y,"",o(f))),(y[0]==="|"||y[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${y}`:n.push(y)}else n.push(Al(e.contents,s));if((d=e.directives)!=null&&d.docEnd)if(e.comment){const h=o(e.comment);h.includes(`
384
+ `)?(n.push("..."),n.push(ka(h,""))):n.push(`... ${h}`)}else n.push("...");else{let h=e.comment;h&&c&&(h=h.replace(/^\n+/,"")),h&&((!c||f)&&n[n.length-1]!==""&&n.push(""),n.push(ka(o(h),"")))}return n.join(`
385
+ `)+`
386
+ `}class ql{constructor(t,n,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Si,{value:lp});let s=null;typeof n=="function"||Array.isArray(n)?s=n:a===void 0&&n&&(a=n,n=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},a);this.options=o;let{version:c}=o;a!=null&&a._directives?(this.directives=a._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new Nn({version:c}),this.setSchema(c,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){const t=Object.create(ql.prototype,{[Si]:{value:lp}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=jt(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){il(this.contents)&&this.contents.add(t)}addIn(t,n){il(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const a=m1(this);t.anchor=!n||a.has(n)?p1(n||"a",a):n}return new Bf(t.anchor)}createNode(t,n,a){let s;if(typeof n=="function")t=n.call({"":t},"",t),s=n;else if(Array.isArray(n)){const N=R=>typeof R=="number"||R instanceof String||R instanceof Number,w=n.filter(N).map(String);w.length>0&&(n=n.concat(w)),s=n}else a===void 0&&n&&(a=n,n=void 0);const{aliasDuplicateObjects:o,anchorPrefix:c,flow:f,keepUndefined:d,onTagObj:h,tag:y}=a??{},{onAnchor:g,setAnchors:x,sourceObjects:v}=N2(this,c||"a"),S={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:g,onTagObj:h,replacer:s,schema:this.schema,sourceObjects:v},_=sc(t,y,S);return f&&Mt(_)&&(_.flow=!0),x(),_}createPair(t,n,a={}){const s=this.createNode(t,null,a),o=this.createNode(n,null,a);return new gn(s,o)}delete(t){return il(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Wo(t)?this.contents==null?!1:(this.contents=null,!0):il(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Mt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Wo(t)?!n&&vt(this.contents)?this.contents.value:this.contents:Mt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Mt(this.contents)?this.contents.has(t):!1}hasIn(t){return Wo(t)?this.contents!==void 0:Mt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=vf(this.schema,[t],n):il(this.contents)&&this.contents.set(t,n)}setIn(t,n){Wo(t)?this.contents=n:this.contents==null?this.contents=vf(this.schema,Array.from(t),n):il(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let a;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Nn({version:"1.1"}),a={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Nn({version:t}),a={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,a=null;break;default:{const s=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(a)this.schema=new U1(Object.assign(a,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:a,maxAliasCount:s,onAnchor:o,reviver:c}={}){const f={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},d=vi(this.contents,n??"",f);if(typeof o=="function")for(const{count:h,res:y}of f.anchors.values())o(y,h);return typeof c=="function"?dl(c,{"":d},"",d):d}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Z2(this,t)}}function il(e){if(Mt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class sg extends Error{constructor(t,n,a,s){super(),this.name=t,this.code=a,this.message=s,this.pos=n}}class es extends sg{constructor(t,n,a){super("YAMLParseError",t,n,a)}}class F1 extends sg{constructor(t,n,a){super("YAMLWarning",t,n,a)}}const Sf=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(f=>t.linePos(f));const{line:a,col:s}=n.linePos[0];n.message+=` at line ${a}, column ${s}`;let o=s-1,c=e.substring(t.lineStarts[a-1],t.lineStarts[a]).replace(/[\n\r]+$/,"");if(o>=60&&c.length>80){const f=Math.min(o-39,c.length-79);c="…"+c.substring(f),o-=f-1}if(c.length>80&&(c=c.substring(0,79)+"…"),a>1&&/^ *$/.test(c.substring(0,o))){let f=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);f.length>80&&(f=f.substring(0,79)+`…
387
+ `),c=f+c}if(/[^ ]/.test(c)){let f=1;const d=n.linePos[1];(d==null?void 0:d.line)===a&&d.col>s&&(f=Math.max(1,Math.min(d.col-s,80-o)));const h=" ".repeat(o)+"^".repeat(f);n.message+=`:
388
+
389
+ ${c}
390
+ ${h}
391
+ `}};function Ol(e,{flow:t,indicator:n,next:a,offset:s,onError:o,parentIndent:c,startOnNewline:f}){let d=!1,h=f,y=f,g="",x="",v=!1,S=!1,_=null,N=null,w=null,R=null,A=null,D=null,F=null;for(const U of e)switch(S&&(U.type!=="space"&&U.type!=="newline"&&U.type!=="comma"&&o(U.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),_&&(h&&U.type!=="comment"&&U.type!=="newline"&&o(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),_=null),U.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&U.source.includes(" ")&&(_=U),y=!0;break;case"comment":{y||o(U,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const J=U.source.substring(1)||" ";g?g+=x+J:g=J,x="",h=!1;break}case"newline":h?g?g+=U.source:(!D||n!=="seq-item-ind")&&(d=!0):x+=U.source,h=!0,v=!0,(N||w)&&(R=U),y=!0;break;case"anchor":N&&o(U,"MULTIPLE_ANCHORS","A node can have at most one anchor"),U.source.endsWith(":")&&o(U.offset+U.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),N=U,F??(F=U.offset),h=!1,y=!1,S=!0;break;case"tag":{w&&o(U,"MULTIPLE_TAGS","A node can have at most one tag"),w=U,F??(F=U.offset),h=!1,y=!1,S=!0;break}case n:(N||w)&&o(U,"BAD_PROP_ORDER",`Anchors and tags must be after the ${U.source} indicator`),D&&o(U,"UNEXPECTED_TOKEN",`Unexpected ${U.source} in ${t??"collection"}`),D=U,h=n==="seq-item-ind"||n==="explicit-key-ind",y=!1;break;case"comma":if(t){A&&o(U,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),A=U,h=!1,y=!1;break}default:o(U,"UNEXPECTED_TOKEN",`Unexpected ${U.type} token`),h=!1,y=!1}const M=e[e.length-1],q=M?M.offset+M.source.length:s;return S&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&o(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),_&&(h&&_.indent<=c||(a==null?void 0:a.type)==="block-map"||(a==null?void 0:a.type)==="block-seq")&&o(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:A,found:D,spaceBefore:d,comment:g,hasNewline:v,anchor:N,tag:w,newlineAfterProp:R,end:q,start:F??q}}function lc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
392
+ `))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(lc(t.key)||lc(t.value))return!0}return!1;default:return!0}}function fp(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&lc(t)&&n(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function P1(e,t,n){const{uniqueKeys:a}=e.options;if(a===!1)return!1;const s=typeof a=="function"?a:(o,c)=>o===c||vt(o)&&vt(c)&&o.value===c.value;return t.some(o=>s(o.key,n))}const Zv="All mapping items must start at the same column";function W2({composeNode:e,composeEmptyNode:t},n,a,s,o){var y;const c=(o==null?void 0:o.nodeClass)??ai,f=new c(n.schema);n.atRoot&&(n.atRoot=!1);let d=a.offset,h=null;for(const g of a.items){const{start:x,key:v,sep:S,value:_}=g,N=Ol(x,{indicator:"explicit-key-ind",next:v??(S==null?void 0:S[0]),offset:d,onError:s,parentIndent:a.indent,startOnNewline:!0}),w=!N.found;if(w){if(v&&(v.type==="block-seq"?s(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==a.indent&&s(d,"BAD_INDENT",Zv)),!N.anchor&&!N.tag&&!S){h=N.end,N.comment&&(f.comment?f.comment+=`
393
+ `+N.comment:f.comment=N.comment);continue}(N.newlineAfterProp||lc(v))&&s(v??x[x.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=N.found)==null?void 0:y.indent)!==a.indent&&s(d,"BAD_INDENT",Zv);n.atKey=!0;const R=N.end,A=v?e(n,v,N,s):t(n,R,x,null,N,s);n.schema.compat&&fp(a.indent,v,s),n.atKey=!1,P1(n,f.items,A)&&s(R,"DUPLICATE_KEY","Map keys must be unique");const D=Ol(S??[],{indicator:"map-value-ind",next:_,offset:A.range[2],onError:s,parentIndent:a.indent,startOnNewline:!v||v.type==="block-scalar"});if(d=D.end,D.found){w&&((_==null?void 0:_.type)==="block-map"&&!D.hasNewline&&s(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&N.start<D.found.offset-1024&&s(A.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const F=_?e(n,_,D,s):t(n,d,S,null,D,s);n.schema.compat&&fp(a.indent,_,s),d=F.range[2];const M=new gn(A,F);n.options.keepSourceTokens&&(M.srcToken=g),f.items.push(M)}else{w&&s(A.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),D.comment&&(A.comment?A.comment+=`
394
+ `+D.comment:A.comment=D.comment);const F=new gn(A);n.options.keepSourceTokens&&(F.srcToken=g),f.items.push(F)}}return h&&h<d&&s(h,"IMPOSSIBLE","Map comment with trailing content"),f.range=[a.offset,d,h??d],f}function J2({composeNode:e,composeEmptyNode:t},n,a,s,o){const c=(o==null?void 0:o.nodeClass)??Sr,f=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=a.offset,h=null;for(const{start:y,value:g}of a.items){const x=Ol(y,{indicator:"seq-item-ind",next:g,offset:d,onError:s,parentIndent:a.indent,startOnNewline:!0});if(!x.found)if(x.anchor||x.tag||g)(g==null?void 0:g.type)==="block-seq"?s(x.end,"BAD_INDENT","All sequence items must start at the same column"):s(d,"MISSING_CHAR","Sequence item without - indicator");else{h=x.end,x.comment&&(f.comment=x.comment);continue}const v=g?e(n,g,x,s):t(n,x.end,y,null,x,s);n.schema.compat&&fp(a.indent,g,s),d=v.range[2],f.items.push(v)}return f.range=[a.offset,d,h??d],f}function Ec(e,t,n,a){let s="";if(e){let o=!1,c="";for(const f of e){const{source:d,type:h}=f;switch(h){case"space":o=!0;break;case"comment":{n&&!o&&a(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const y=d.substring(1)||" ";s?s+=c+y:s=y,c="";break}case"newline":s&&(c+=d),o=!0;break;default:a(f,"UNEXPECTED_TOKEN",`Unexpected ${h} at node end`)}t+=d.length}}return{comment:s,offset:t}}const gm="Block collections are not allowed within flow collections",bm=e=>e&&(e.type==="block-map"||e.type==="block-seq");function eO({composeNode:e,composeEmptyNode:t},n,a,s,o){var N;const c=a.start.source==="{",f=c?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(c?ai:Sr),h=new d(n.schema);h.flow=!0;const y=n.atRoot;y&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let g=a.offset+a.start.source.length;for(let w=0;w<a.items.length;++w){const R=a.items[w],{start:A,key:D,sep:F,value:M}=R,q=Ol(A,{flow:f,indicator:"explicit-key-ind",next:D??(F==null?void 0:F[0]),offset:g,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!q.found){if(!q.anchor&&!q.tag&&!F&&!M){w===0&&q.comma?s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):w<a.items.length-1&&s(q.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),q.comment&&(h.comment?h.comment+=`
395
+ `+q.comment:h.comment=q.comment),g=q.end;continue}!c&&n.options.strict&&lc(D)&&s(D,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(w===0)q.comma&&s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(q.comma||s(q.start,"MISSING_CHAR",`Missing , between ${f} items`),q.comment){let U="";e:for(const J of A)switch(J.type){case"comma":case"space":break;case"comment":U=J.source.substring(1);break e;default:break e}if(U){let J=h.items[h.items.length-1];At(J)&&(J=J.value??J.key),J.comment?J.comment+=`
396
+ `+U:J.comment=U,q.comment=q.comment.substring(U.length+1)}}if(!c&&!F&&!q.found){const U=M?e(n,M,q,s):t(n,q.end,F,null,q,s);h.items.push(U),g=U.range[2],bm(M)&&s(U.range,"BLOCK_IN_FLOW",gm)}else{n.atKey=!0;const U=q.end,J=D?e(n,D,q,s):t(n,U,A,null,q,s);bm(D)&&s(J.range,"BLOCK_IN_FLOW",gm),n.atKey=!1;const C=Ol(F??[],{flow:f,indicator:"map-value-ind",next:M,offset:J.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(C.found){if(!c&&!q.found&&n.options.strict){if(F)for(const le of F){if(le===C.found)break;if(le.type==="newline"){s(le,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}q.start<C.found.offset-1024&&s(C.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else M&&("source"in M&&((N=M.source)==null?void 0:N[0])===":"?s(M,"MISSING_CHAR",`Missing space after : in ${f}`):s(C.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const P=M?e(n,M,C,s):C.found?t(n,C.end,F,null,C,s):null;P?bm(M)&&s(P.range,"BLOCK_IN_FLOW",gm):C.comment&&(J.comment?J.comment+=`
397
+ `+C.comment:J.comment=C.comment);const Y=new gn(J,P);if(n.options.keepSourceTokens&&(Y.srcToken=R),c){const le=h;P1(n,le.items,J)&&s(U,"DUPLICATE_KEY","Map keys must be unique"),le.items.push(Y)}else{const le=new ai(n.schema);le.flow=!0,le.items.push(Y);const H=(P??J).range;le.range=[J.range[0],H[1],H[2]],h.items.push(le)}g=P?P.range[2]:C.end}}const x=c?"}":"]",[v,...S]=a.end;let _=g;if((v==null?void 0:v.source)===x)_=v.offset+v.source.length;else{const w=f[0].toUpperCase()+f.substring(1),R=y?`${w} must end with a ${x}`:`${w} in block collection must be sufficiently indented and end with a ${x}`;s(g,y?"MISSING_CHAR":"BAD_INDENT",R),v&&v.source.length!==1&&S.unshift(v)}if(S.length>0){const w=Ec(S,_,n.options.strict,s);w.comment&&(h.comment?h.comment+=`
398
+ `+w.comment:h.comment=w.comment),h.range=[a.offset,_,w.offset]}else h.range=[a.offset,_,_];return h}function ym(e,t,n,a,s,o){const c=n.type==="block-map"?W2(e,t,n,a,o):n.type==="block-seq"?J2(e,t,n,a,o):eO(e,t,n,a,o),f=c.constructor;return s==="!"||s===f.tagName?(c.tag=f.tagName,c):(s&&(c.tag=s),c)}function tO(e,t,n,a,s){var x;const o=a.tag,c=o?t.directives.tagName(o.source,v=>s(o,"TAG_RESOLVE_FAILED",v)):null;if(n.type==="block-seq"){const{anchor:v,newlineAfterProp:S}=a,_=v&&o?v.offset>o.offset?v:o:v??o;_&&(!S||S.offset<_.offset)&&s(_,"MISSING_CHAR","Missing newline after block sequence props")}const f=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!c||c==="!"||c===ai.tagName&&f==="map"||c===Sr.tagName&&f==="seq")return ym(e,t,n,s,c);let d=t.schema.tags.find(v=>v.tag===c&&v.collection===f);if(!d){const v=t.schema.knownTags[c];if((v==null?void 0:v.collection)===f)t.schema.tags.push(Object.assign({},v,{default:!1})),d=v;else return v?s(o,"BAD_COLLECTION_TYPE",`${v.tag} used for ${f} collection, but expects ${v.collection??"scalar"}`,!0):s(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),ym(e,t,n,s,c)}const h=ym(e,t,n,s,c,d),y=((x=d.resolve)==null?void 0:x.call(d,h,v=>s(o,"TAG_RESOLVE_FAILED",v),t.options))??h,g=jt(y)?y:new Le(y);return g.range=h.range,g.tag=c,d!=null&&d.format&&(g.format=d.format),g}function q1(e,t,n){const a=t.offset,s=nO(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};const o=s.mode===">"?Le.BLOCK_FOLDED:Le.BLOCK_LITERAL,c=t.source?iO(t.source):[];let f=c.length;for(let _=c.length-1;_>=0;--_){const N=c[_][1];if(N===""||N==="\r")f=_;else break}if(f===0){const _=s.chomp==="+"&&c.length>0?`
399
+ `.repeat(Math.max(1,c.length-1)):"";let N=a+s.length;return t.source&&(N+=t.source.length),{value:_,type:o,comment:s.comment,range:[a,N,N]}}let d=t.indent+s.indent,h=t.offset+s.length,y=0;for(let _=0;_<f;++_){const[N,w]=c[_];if(w===""||w==="\r")s.indent===0&&N.length>d&&(d=N.length);else{N.length<d&&n(h+N.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(d=N.length),y=_,d===0&&!e.atRoot&&n(h,"BAD_INDENT","Block scalar values in collections must be indented");break}h+=N.length+w.length+1}for(let _=c.length-1;_>=f;--_)c[_][0].length>d&&(f=_+1);let g="",x="",v=!1;for(let _=0;_<y;++_)g+=c[_][0].slice(d)+`
400
+ `;for(let _=y;_<f;++_){let[N,w]=c[_];h+=N.length+w.length+1;const R=w[w.length-1]==="\r";if(R&&(w=w.slice(0,-1)),w&&N.length<d){const D=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(h-w.length-(R?2:1),"BAD_INDENT",D),N=""}o===Le.BLOCK_LITERAL?(g+=x+N.slice(d)+w,x=`
401
+ `):N.length>d||w[0]===" "?(x===" "?x=`
402
+ `:!v&&x===`
403
+ `&&(x=`
404
+
405
+ `),g+=x+N.slice(d)+w,x=`
406
+ `,v=!0):w===""?x===`
407
+ `?g+=`
408
+ `:x=`
409
+ `:(g+=x+w,x=" ",v=!1)}switch(s.chomp){case"-":break;case"+":for(let _=f;_<c.length;++_)g+=`
410
+ `+c[_][0].slice(d);g[g.length-1]!==`
411
+ `&&(g+=`
412
+ `);break;default:g+=`
413
+ `}const S=a+s.length+t.source.length;return{value:g,type:o,comment:s.comment,range:[a,S,S]}}function nO({offset:e,props:t},n,a){if(t[0].type!=="block-scalar-header")return a(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],o=s[0];let c=0,f="",d=-1;for(let x=1;x<s.length;++x){const v=s[x];if(!f&&(v==="-"||v==="+"))f=v;else{const S=Number(v);!c&&S?c=S:d===-1&&(d=e+x)}}d!==-1&&a(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let h=!1,y="",g=s.length;for(let x=1;x<t.length;++x){const v=t[x];switch(v.type){case"space":h=!0;case"newline":g+=v.source.length;break;case"comment":n&&!h&&a(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),g+=v.source.length,y=v.source.substring(1);break;case"error":a(v,"UNEXPECTED_TOKEN",v.message),g+=v.source.length;break;default:{const S=`Unexpected token in block scalar header: ${v.type}`;a(v,"UNEXPECTED_TOKEN",S);const _=v.source;_&&typeof _=="string"&&(g+=_.length)}}}return{mode:o,indent:c,chomp:f,comment:y,length:g}}function iO(e){const t=e.split(/\n( *)/),n=t[0],a=n.match(/^( *)/),o=[a!=null&&a[1]?[a[1],n.slice(a[1].length)]:["",n]];for(let c=1;c<t.length;c+=2)o.push([t[c],t[c+1]]);return o}function H1(e,t,n){const{offset:a,type:s,source:o,end:c}=e;let f,d;const h=(x,v,S)=>n(a+x,v,S);switch(s){case"scalar":f=Le.PLAIN,d=aO(o,h);break;case"single-quoted-scalar":f=Le.QUOTE_SINGLE,d=rO(o,h);break;case"double-quoted-scalar":f=Le.QUOTE_DOUBLE,d=sO(o,h);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[a,a+o.length,a+o.length]}}const y=a+o.length,g=Ec(c,y,t,n);return{value:d,type:f,comment:g.comment,range:[a,y,g.offset]}}function aO(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),K1(e)}function rO(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),K1(e.slice(1,-1)).replace(/''/g,"'")}function K1(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
414
+ `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
415
+ `,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let a=t.exec(e);if(!a)return e;let s=a[1],o=" ",c=t.lastIndex;for(n.lastIndex=c;a=n.exec(e);)a[1]===""?o===`
416
+ `?s+=o:o=`
417
+ `:(s+=o+a[1],o=" "),c=n.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=c,a=f.exec(e),s+o+((a==null?void 0:a[1])??"")}function sO(e,t){let n="";for(let a=1;a<e.length-1;++a){const s=e[a];if(!(s==="\r"&&e[a+1]===`
418
+ `))if(s===`
419
+ `){const{fold:o,offset:c}=lO(e,a);n+=o,a=c}else if(s==="\\"){let o=e[++a];const c=oO[o];if(c)n+=c;else if(o===`
420
+ `)for(o=e[a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="\r"&&e[a+1]===`
421
+ `)for(o=e[++a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];n+=cO(e,a+1,f,t),a+=f}else{const f=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),n+=f}}else if(s===" "||s===" "){const o=a;let c=e[a+1];for(;c===" "||c===" ";)c=e[++a+1];c!==`
422
+ `&&!(c==="\r"&&e[a+2]===`
423
+ `)&&(n+=a>o?e.slice(o,a+1):s)}else n+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function lO(e,t){let n="",a=e[t+1];for(;(a===" "||a===" "||a===`
424
+ `||a==="\r")&&!(a==="\r"&&e[t+2]!==`
425
+ `);)a===`
426
+ `&&(n+=`
427
+ `),t+=1,a=e[t+1];return n||(n=" "),{fold:n,offset:t}}const oO={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
428
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function cO(e,t,n,a){const s=e.substr(t,n),c=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(c)){const f=e.substr(t-2,n+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(c)}function G1(e,t,n,a){const{value:s,type:o,comment:c,range:f}=t.type==="block-scalar"?q1(e,t,a):H1(t,e.options.strict,a),d=n?e.directives.tagName(n.source,g=>a(n,"TAG_RESOLVE_FAILED",g)):null;let h;e.options.stringKeys&&e.atKey?h=e.schema[Xi]:d?h=uO(e.schema,s,d,n,a):t.type==="scalar"?h=fO(e,s,t,a):h=e.schema[Xi];let y;try{const g=h.resolve(s,x=>a(n??t,"TAG_RESOLVE_FAILED",x),e.options);y=vt(g)?g:new Le(g)}catch(g){const x=g instanceof Error?g.message:String(g);a(n??t,"TAG_RESOLVE_FAILED",x),y=new Le(s)}return y.range=f,y.source=s,o&&(y.type=o),d&&(y.tag=d),h.format&&(y.format=h.format),c&&(y.comment=c),y}function uO(e,t,n,a,s){var f;if(n==="!")return e[Xi];const o=[];for(const d of e.tags)if(!d.collection&&d.tag===n)if(d.default&&d.test)o.push(d);else return d;for(const d of o)if((f=d.test)!=null&&f.test(t))return d;const c=e.knownTags[n];return c&&!c.collection?(e.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(s(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Xi])}function fO({atKey:e,directives:t,schema:n},a,s,o){const c=n.tags.find(f=>{var d;return(f.default===!0||e&&f.default==="key")&&((d=f.test)==null?void 0:d.test(a))})||n[Xi];if(n.compat){const f=n.compat.find(d=>{var h;return d.default&&((h=d.test)==null?void 0:h.test(a))})??n[Xi];if(c.tag!==f.tag){const d=t.tagString(c.tag),h=t.tagString(f.tag),y=`Value may be parsed as either ${d} or ${h}`;o(s,"TAG_RESOLVE_FAILED",y,!0)}}return c}function dO(e,t,n){if(t){n??(n=t.length);for(let a=n-1;a>=0;--a){let s=t[a];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++a];(s==null?void 0:s.type)==="space";)e+=s.source.length,s=t[++a];break}}return e}const hO={composeNode:Q1,composeEmptyNode:lg};function Q1(e,t,n,a){const s=e.atKey,{spaceBefore:o,comment:c,anchor:f,tag:d}=n;let h,y=!0;switch(t.type){case"alias":h=mO(e,t,a),(f||d)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":h=G1(e,t,d,a),f&&(h.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{h=tO(hO,e,t,n,a),f&&(h.anchor=f.source.substring(1))}catch(g){const x=g instanceof Error?g.message:String(g);a(t,"RESOURCE_EXHAUSTION",x)}break;default:{const g=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;a(t,"UNEXPECTED_TOKEN",g),y=!1}}return h??(h=lg(e,t.offset,void 0,null,n,a)),f&&h.anchor===""&&a(f,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!vt(h)||typeof h.value!="string"||h.tag&&h.tag!=="tag:yaml.org,2002:str")&&a(d??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(h.spaceBefore=!0),c&&(t.type==="scalar"&&t.source===""?h.comment=c:h.commentBefore=c),e.options.keepSourceTokens&&y&&(h.srcToken=t),h}function lg(e,t,n,a,{spaceBefore:s,comment:o,anchor:c,tag:f,end:d},h){const y={type:"scalar",offset:dO(t,n,a),indent:-1,source:""},g=G1(e,y,f,h);return c&&(g.anchor=c.source.substring(1),g.anchor===""&&h(c,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(g.spaceBefore=!0),o&&(g.comment=o,g.range[2]=d),g}function mO({options:e},{offset:t,source:n,end:a},s){const o=new Bf(n.substring(1));o.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+n.length,f=Ec(a,c,e.strict,s);return o.range=[t,c,f.offset],f.comment&&(o.comment=f.comment),o}function pO(e,t,{offset:n,start:a,value:s,end:o},c){const f=Object.assign({_directives:t},e),d=new ql(void 0,f),h={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},y=Ol(a,{indicator:"doc-start",next:s??(o==null?void 0:o[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});y.found&&(d.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!y.hasNewline&&c(y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=s?Q1(h,s,y,c):lg(h,y.end,a,null,y,c);const g=d.contents.range[2],x=Ec(o,g,!1,c);return x.comment&&(d.comment=x.comment),d.range=[n,g,x.offset],d}function Ko(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function Wv(e){var s;let t="",n=!1,a=!1;for(let o=0;o<e.length;++o){const c=e[o];switch(c[0]){case"#":t+=(t===""?"":a?`
429
+
430
+ `:`
431
+ `)+(c.substring(1)||" "),n=!0,a=!1;break;case"%":((s=e[o+1])==null?void 0:s[0])!=="#"&&(o+=1),n=!1;break;default:n||(a=!0),n=!1}}return{comment:t,afterEmptyLine:a}}class og{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,a,s,o)=>{const c=Ko(n);o?this.warnings.push(new F1(c,a,s)):this.errors.push(new es(c,a,s))},this.directives=new Nn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:a,afterEmptyLine:s}=Wv(this.prelude);if(a){const o=t.contents;if(n)t.comment=t.comment?`${t.comment}
432
+ ${a}`:a;else if(s||t.directives.docStart||!o)t.commentBefore=a;else if(Mt(o)&&!o.flow&&o.items.length>0){let c=o.items[0];At(c)&&(c=c.key);const f=c.commentBefore;c.commentBefore=f?`${a}
433
+ ${f}`:a}else{const c=o.commentBefore;o.commentBefore=c?`${a}
434
+ ${c}`:a}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Wv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,a=-1){for(const s of t)yield*this.next(s);yield*this.end(n,a)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,a,s)=>{const o=Ko(t);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",a,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=pO(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,a=new es(Ko(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(a):this.doc.errors.push(a);break}case"doc-end":{if(!this.doc){const a="Unexpected doc-end without preceding document";this.errors.push(new es(Ko(t),"UNEXPECTED_TOKEN",a));break}this.doc.directives.docEnd=!0;const n=Ec(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const a=this.doc.comment;this.doc.comment=a?`${a}
435
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new es(Ko(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const a=Object.assign({_directives:this.directives},this.options),s=new ql(void 0,a);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}function gO(e,t=!0,n){if(e){const a=(s,o,c)=>{const f=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(f,o,c);else throw new es([f,f+1],o,c)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return H1(e,t,a);case"block-scalar":return q1({options:{strict:t}},e,a)}}return null}function bO(e,t){const{implicitKey:n=!1,indent:a,inFlow:s=!1,offset:o=-1,type:c="PLAIN"}=t,f=xc({type:c,value:e},{implicitKey:n,indent:a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),d=t.end??[{type:"newline",offset:-1,indent:a,source:`
436
+ `}];switch(f[0]){case"|":case">":{const h=f.indexOf(`
437
+ `),y=f.substring(0,h),g=f.substring(h+1)+`
438
+ `,x=[{type:"block-scalar-header",offset:o,indent:a,source:y}];return Y1(x,d)||x.push({type:"newline",offset:-1,indent:a,source:`
439
+ `}),{type:"block-scalar",offset:o,indent:a,props:x,source:g}}case'"':return{type:"double-quoted-scalar",offset:o,indent:a,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:a,source:f,end:d};default:return{type:"scalar",offset:o,indent:a,source:f,end:d}}}function yO(e,t,n={}){let{afterKey:a=!1,implicitKey:s=!1,inFlow:o=!1,type:c}=n,f="indent"in e?e.indent:null;if(a&&typeof f=="number"&&(f+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const h=e.props[0];if(h.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=h.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const d=xc({type:c,value:t},{implicitKey:s||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":xO(e,d);break;case'"':xm(e,d,"double-quoted-scalar");break;case"'":xm(e,d,"single-quoted-scalar");break;default:xm(e,d,"scalar")}}function xO(e,t){const n=t.indexOf(`
440
+ `),a=t.substring(0,n),s=t.substring(n+1)+`
441
+ `;if(e.type==="block-scalar"){const o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=a,e.source=s}else{const{offset:o}=e,c="indent"in e?e.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:c,source:a}];Y1(f,"end"in e?e.end:void 0)||f.push({type:"newline",offset:-1,indent:c,source:`
442
+ `});for(const d of Object.keys(e))d!=="type"&&d!=="offset"&&delete e[d];Object.assign(e,{type:"block-scalar",indent:c,props:f,source:s})}}function Y1(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function xm(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const a=e.props.slice(1);let s=t.length;e.props[0].type==="block-scalar-header"&&(s-=e.props[0].source.length);for(const o of a)o.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:a});break}case"block-map":case"block-seq":{const s={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
443
+ `};delete e.items,Object.assign(e,{type:n,source:t,end:[s]});break}default:{const a="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(e))o!=="type"&&o!=="offset"&&delete e[o];Object.assign(e,{type:n,indent:a,source:t,end:s})}}}const vO=e=>"type"in e?_f(e):hf(e);function _f(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=_f(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=hf(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=hf(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=hf(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function hf({start:e,key:t,sep:n,value:a}){let s="";for(const o of e)s+=o.source;if(t&&(s+=_f(t)),n)for(const o of n)s+=o.source;return a&&(s+=_f(a)),s}const dp=Symbol("break visit"),EO=Symbol("skip children"),V1=Symbol("remove item");function fs(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),X1(Object.freeze([]),e,t)}fs.BREAK=dp;fs.SKIP=EO;fs.REMOVE=V1;fs.itemAtPath=(e,t)=>{let n=e;for(const[a,s]of t){const o=n==null?void 0:n[a];if(o&&"items"in o)n=o.items[s];else return}return n};fs.parentCollection=(e,t)=>{const n=fs.itemAtPath(e,t.slice(0,-1)),a=t[t.length-1][0],s=n==null?void 0:n[a];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function X1(e,t,n){let a=n(t,e);if(typeof a=="symbol")return a;for(const s of["key","value"]){const o=t[s];if(o&&"items"in o){for(let c=0;c<o.items.length;++c){const f=X1(Object.freeze(e.concat([[s,c]])),o.items[c],n);if(typeof f=="number")c=f-1;else{if(f===dp)return dp;f===V1&&(o.items.splice(c,1),c-=1)}}typeof a=="function"&&s==="key"&&(a=a(t,e))}}return typeof a=="function"?a(t,e):a}const Qf="\uFEFF",Yf="",Vf="",oc="",SO=e=>!!e&&"items"in e,_O=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function wO(e){switch(e){case Qf:return"<BOM>";case Yf:return"<DOC>";case Vf:return"<FLOW_END>";case oc:return"<SCALAR>";default:return JSON.stringify(e)}}function Z1(e){switch(e){case Qf:return"byte-order-mark";case Yf:return"doc-mode";case Vf:return"flow-error-end";case oc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
444
+ `:case`\r
445
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const NO=Object.freeze(Object.defineProperty({__proto__:null,BOM:Qf,DOCUMENT:Yf,FLOW_END:Vf,SCALAR:oc,createScalarToken:bO,isCollection:SO,isScalar:_O,prettyToken:wO,resolveAsScalar:gO,setScalarValue:yO,stringify:vO,tokenType:Z1,visit:fs},Symbol.toStringTag,{value:"Module"}));function Ai(e){switch(e){case void 0:case" ":case`
446
+ `:case"\r":case" ":return!0;default:return!1}}const Jv=new Set("0123456789ABCDEFabcdef"),kO=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Yu=new Set(",[]{}"),TO=new Set(` ,[]{}
447
+ \r `),vm=e=>!e||TO.has(e);class W1{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let a=this.next??"stream";for(;a&&(n||this.hasChars(1));)a=yield*this.parseNext(a)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
448
+ `?!0:n==="\r"?this.buffer[t+1]===`
449
+ `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let a=0;for(;n===" ";)n=this.buffer[++a+t];if(n==="\r"){const s=this.buffer[a+t+1];if(s===`
450
+ `||!s&&!this.atEnd)return t+a+1}return n===`
451
+ `||a>=this.indentNext||!n&&!this.atEnd?t+a:-1}if(n==="-"||n==="."){const a=this.buffer.substr(t,3);if((a==="---"||a==="...")&&Ai(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
452
+ `,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Qf&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,a=t.indexOf("#");for(;a!==-1;){const o=t[a-1];if(o===" "||o===" "){n=a-1;break}else a=t.indexOf("#",a+1)}for(;;){const o=t[n-1];if(o===" "||o===" ")n-=1;else break}const s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Yf,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&Ai(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ai(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Ai(n)){const a=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=a,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(vm),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,a=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=a=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((a!==-1&&a<this.indentNext&&s[0]!=="#"||a===0&&(s.startsWith("---")||s.startsWith("..."))&&Ai(s[3]))&&!(a===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield Vf,yield*this.parseLineStart();let o=0;for(;s[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),s[o]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(vm),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||Ai(c)||c===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let o=0;for(;this.buffer[n-1-o]==="\\";)o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}const a=this.buffer.substring(0,n);let s=a.indexOf(`
453
+ `,this.pos);if(s!==-1){for(;s!==-1;){const o=this.continueScalar(s+1);if(o===-1)break;s=a.indexOf(`
454
+ `,o)}s!==-1&&(n=s-(a[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Ai(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,a;e:for(let o=this.pos;a=this.buffer[o];++o)switch(a){case" ":n+=1;break;case`
455
+ `:t=o,n=0;break;case"\r":{const c=this.buffer[o+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
456
+ `)break}default:break e}if(!a&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(t+1);if(o===-1)break;t=this.buffer.indexOf(`
457
+ `,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let s=t+1;for(a=this.buffer[s];a===" ";)a=this.buffer[++s];if(a===" "){for(;a===" "||a===" "||a==="\r"||a===`
458
+ `;)a=this.buffer[++s];t=s-1}else if(!this.blockScalarKeep)do{let o=t-1,c=this.buffer[o];c==="\r"&&(c=this.buffer[--o]);const f=o;for(;c===" ";)c=this.buffer[--o];if(c===`
459
+ `&&o>=this.pos&&o+1+n>f)t=o;else break}while(!0);return yield oc,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,a=this.pos-1,s;for(;s=this.buffer[++a];)if(s===":"){const o=this.buffer[a+1];if(Ai(o)||t&&Yu.has(o))break;n=a}else if(Ai(s)){let o=this.buffer[a+1];if(s==="\r"&&(o===`
460
+ `?(a+=1,s=`
461
+ `,o=this.buffer[a+1]):n=a),o==="#"||t&&Yu.has(o))break;if(s===`
462
+ `){const c=this.continueScalar(a+1);if(c===-1)break;a=Math.max(a,c-2)}}else{if(t&&Yu.has(s))break;n=a}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield oc,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const a=this.buffer.slice(this.pos,t);return a?(yield a,this.pos+=a.length,a.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(vm))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(Ai(n)||t&&Yu.has(n))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!Ai(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(kO.has(n))n=this.buffer[++t];else if(n==="%"&&Jv.has(this.buffer[t+1])&&Jv.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
463
+ `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
464
+ `?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,a;do a=this.buffer[++n];while(a===" "||t&&a===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(t){let n=this.pos,a=this.buffer[n];for(;!t(a);)a=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class J1{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,a=this.lineStarts.length;for(;n<a;){const o=n+a>>1;this.lineStarts[o]<t?n=o+1:a=o}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const s=this.lineStarts[n-1];return{line:n,col:t-s+1}}}}function cr(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function e0(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function eS(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Vu(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function al(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function t0(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!cr(t.start,"explicit-key-ind")&&!cr(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,eS(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class cg{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new W1,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const a of this.lexer.lex(t,n))yield*this.next(a);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=Z1(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const a=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:a,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const a=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in a?a.indent:0:n.type==="flow-collection"&&a.type==="document"&&(n.indent=0),n.type==="flow-collection"&&t0(n),a.type){case"document":a.value=n;break;case"block-scalar":a.props.push(n);break;case"block-map":{const s=a.items[a.items.length-1];if(s.value){a.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=a.items[a.items.length-1];s.value?a.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=a.items[a.items.length-1];!s||s.value?a.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((a.type==="document"||a.type==="block-map"||a.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&e0(s.start)===-1&&(n.indent===0||s.start.every(o=>o.type!=="comment"||o.indent<n.indent))&&(a.type==="document"?a.end=s.start:a.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{e0(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const n=Vu(this.peek(2)),a=al(n);let s;t.end?(s=t.end,s.push(this.sourceToken),delete t.end):s=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
465
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
466
+ `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0,o=Array.isArray(s)?s[s.length-1]:void 0;(o==null?void 0:o.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],o=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const s=!this.onKeyLine&&this.indent===t.indent,o=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(o&&n.sep&&!n.value){const f=[];for(let d=0;d<n.sep.length;++d){const h=n.sep[d];switch(h.type){case"newline":f.push(d);break;case"space":break;case"comment":h.indent>t.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(c=n.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(c.push(this.sourceToken),t.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):o||n.value?(c.push(this.sourceToken),t.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(cr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(eS(n.key)&&!cr(n.sep,"newline")){const f=al(n.start),d=n.key,h=n.sep;h.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:h}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(cr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const f=al(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:c,key:null,sep:[this.sourceToken]}):cr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||n.value?(t.items.push({start:c,key:f,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(f):(Object.assign(n,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(t);if(f){if(f.type==="block-seq"){if(!n.explicitKey&&n.sep&&!cr(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&t.items.push({start:c});this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0,o=Array.isArray(s)?s[s.length-1]:void 0;(o==null?void 0:o.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],o=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||cr(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const s=this.startBlockValue(t);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let a;do yield*this.pop(),a=this.peek(1);while((a==null?void 0:a.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const a=this.startBlockValue(t);a?this.stack.push(a):(yield*this.pop(),yield*this.step())}else{const a=this.peek(2);if(a.type==="block-map"&&(this.type==="map-value-ind"&&a.indent===t.indent||this.type==="newline"&&!a.items[a.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&a.type!=="flow-collection"){const s=Vu(a),o=al(s);t0(t);const c=t.end.splice(1,t.end.length);c.push(this.sourceToken);const f={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
467
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
468
+ `,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Vu(t),a=al(n);return a.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Vu(t),a=al(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(a=>a.type==="newline"||a.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function tS(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new J1||null,prettyErrors:t}}function CO(e,t={}){const{lineCounter:n,prettyErrors:a}=tS(t),s=new cg(n==null?void 0:n.addNewLine),o=new og(t),c=Array.from(o.compose(s.parse(e)));if(a&&n)for(const f of c)f.errors.forEach(Sf(e,n)),f.warnings.forEach(Sf(e,n));return c.length>0?c:Object.assign([],{empty:!0},o.streamInfo())}function nS(e,t={}){const{lineCounter:n,prettyErrors:a}=tS(t),s=new cg(n==null?void 0:n.addNewLine),o=new og(t);let c=null;for(const f of o.compose(s.parse(e),!0,e.length))if(!c)c=f;else if(c.options.logLevel!=="silent"){c.errors.push(new es(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&n&&(c.errors.forEach(Sf(e,n)),c.warnings.forEach(Sf(e,n))),c}function AO(e,t,n){let a;typeof t=="function"?a=t:n===void 0&&t&&typeof t=="object"&&(n=t);const s=nS(e,n);if(!s)return null;if(s.warnings.forEach(o=>v1(s.options.logLevel,o)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:a},n))}function OO(e,t,n){let a=null;if(typeof t=="function"||Array.isArray(t)?a=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(e===void 0){const{keepUndefined:s}=n??t??{};if(!s)return}return ms(e)&&!a?e.toString(n):new ql(e,a,n).toString(n)}const n0=Object.freeze(Object.defineProperty({__proto__:null,Alias:Bf,CST:NO,Composer:og,Document:ql,Lexer:W1,LineCounter:J1,Pair:gn,Parser:cg,Scalar:Le,Schema:U1,YAMLError:sg,YAMLMap:ai,YAMLParseError:es,YAMLSeq:Sr,YAMLWarning:F1,isAlias:wr,isCollection:Mt,isDocument:ms,isMap:Ul,isNode:jt,isPair:At,isScalar:vt,isSeq:$l,parse:AO,parseAllDocuments:CO,parseDocument:nS,stringify:OO,visit:ps,visitAsync:zf},Symbol.toStringTag,{value:"Module"}));function RO({projectName:e,file:t,onClose:n,onSaved:a}){const s=Tn(),{alert:o}=qn(),{data:c,isLoading:f,isError:d,error:h,refetch:y}=dt({queryKey:["pipeline-file",e,t],queryFn:()=>i2(e,t)}),[g,x]=j.useState("structured"),[v,S]=j.useState(null),[_,N]=j.useState(null);j.useEffect(()=>{c&&v===null&&(S(c.content),N(c.etag),c.parseError&&x("yaml"))},[c,v]),j.useEffect(()=>{const M=q=>{q.key==="Escape"&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n]);const w=Pn({mutationFn:()=>{if(v===null||_===null)throw new Error("no draft");return a2(e,t,v,_)},onSuccess:M=>{N(M.etag),s.invalidateQueries({queryKey:["pipeline-file",e,t]}),s.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:M=>{const q=M.status;o({title:q===409?"文件已被其他地方修改":q===422?"YAML 语法错":"保存失败",body:M instanceof Error?M.message:String(M)})}}),R=v!==null&&c&&v!==c.content,{parsed:A,parseError:D}=j.useMemo(()=>{if(v===null)return{parsed:null,parseError:null};try{return{parsed:n0.parse(v)??{},parseError:null}}catch(M){return{parsed:null,parseError:M instanceof Error?M.message:String(M)}}},[v]),F=M=>{try{const q=n0.stringify(M,{lineWidth:0});S(q)}catch(q){o({title:"YAML 序列化失败",body:q instanceof Error?q.message:String(q)})}};return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:n,children:m.jsxs("div",{onClick:M=>M.stopPropagation(),className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[m.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[m.jsxs("div",{children:[m.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[m.jsx(Hv,{size:20,strokeWidth:2.5}),m.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(c==null?void 0:c.isActive)&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:"active"})]}),m.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,_&&` · etag ${_}`]})]}),m.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"关闭",children:m.jsx(Er,{size:14,strokeWidth:3})})]}),f&&m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),d&&m.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",h instanceof Error?h.message:String(h)]}),c&&v!==null&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[m.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[m.jsxs("button",{type:"button",onClick:()=>x("structured"),"aria-pressed":g==="structured",disabled:!!D,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",g==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",D?"opacity-50 cursor-not-allowed":""].join(" "),title:D??void 0,children:[m.jsx(Hp,{size:11,strokeWidth:2.5}),"结构化"]}),m.jsxs("button",{type:"button",onClick:()=>x("yaml"),"aria-pressed":g==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",g==="yaml"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[m.jsx(Hv,{size:11,strokeWidth:2.5}),"原始 YAML"]})]}),D&&m.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[m.jsx(Pp,{size:12,strokeWidth:2.5}),"YAML parse: ",D]}),(c==null?void 0:c.isActive)&&m.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:"⚠ 这是当前激活的 pipeline,保存后下一轮 tick 生效"})]}),m.jsxs("div",{className:"flex-1 overflow-auto",children:[g==="structured"&&A&&m.jsx(MO,{parsed:A,onChange:F}),g==="yaml"&&m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:v,onChange:M=>S(M.target.value),spellCheck:!1,"aria-label":"pipeline YAML 编辑器"})]}),m.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:R?m.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● 未保存"}):w.isSuccess?m.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[m.jsx(qp,{size:12,strokeWidth:2.5})," 已保存"]}):"无变化"}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{S(null),y()},disabled:w.isPending,type:"button",children:"重新加载"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>w.mutate(),disabled:!R||w.isPending,type:"button","aria-label":"保存 pipeline",children:[w.isPending?m.jsx(Zt,{size:13,strokeWidth:3,className:"animate-spin"}):m.jsx(If,{size:13,strokeWidth:3}),"保存"]})]})]})]})]})})}function MO({parsed:e,onChange:t}){const n=e.stages??[],a=d=>{t({...e,stages:d})},s=()=>{a([...n,{name:`stage-${n.length+1}`,on_complete:"move_card Done"}])},o=d=>{a(n.filter((h,y)=>y!==d))},c=(d,h)=>{const y=[...n],g=d+h;g<0||g>=y.length||([y[d],y[g]]=[y[g],y[d]],a(y))},f=(d,h)=>{a(n.map((y,g)=>g===d?{...y,...h}:y))};return m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[m.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[m.jsx("span",{className:"font-bold",children:"mode:"}),m.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:d=>t({...e,mode:d.target.value}),children:[m.jsx("option",{value:"project",children:"project"}),m.jsx("option",{value:"steps",children:"steps"})]})]}),m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"project = 事件驱动流水线(默认) · steps = 顺序脚本"})]}),m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center justify-between mb-2",children:[m.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:["Stages (",n.length,")"]}),m.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:s,"aria-label":"添加 stage",children:[m.jsx(Zi,{size:11,strokeWidth:3})," 添加 stage"]})]}),n.length===0?m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:'还没 stage。点"添加 stage"开始。'}):m.jsx("div",{className:"flex flex-col gap-3",children:n.map((d,h)=>m.jsx(jO,{stage:d,index:h,total:n.length,onChange:y=>f(h,y),onRemove:()=>o(h),onMoveUp:()=>c(h,-1),onMoveDown:()=>c(h,1)},h))})]})]})}function jO({stage:e,index:t,total:n,onChange:a,onRemove:s,onMoveUp:o,onMoveDown:c}){const f=e.on_fail??{};return m.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&m.jsx("code",{className:"ml-2 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:e.name})]}),m.jsxs("div",{className:"flex gap-1",children:[m.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":"上移",children:m.jsx(AC,{size:12,strokeWidth:3})}),m.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:c,disabled:t===n-1,"aria-label":"下移",children:m.jsx(Fp,{size:12,strokeWidth:3})}),m.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:s,"aria-label":"删除 stage",children:m.jsx(yc,{size:12,strokeWidth:3})})]})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[m.jsx(sr,{label:"name",hint:"stage 唯一名",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:d=>a({name:d.target.value}),placeholder:"develop"})}),m.jsx(sr,{label:"profile",hint:"skill 画像,可空",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:d=>a({profile:d.target.value||void 0}),placeholder:"fullstack"})}),m.jsx(sr,{label:"card_state",hint:"本 stage 期间卡片状态",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:d=>a({card_state:d.target.value||void 0}),placeholder:"Inprogress"})}),m.jsx(sr,{label:"timeout",hint:"可选,如 30m 2h",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:d=>a({timeout:d.target.value||void 0}),placeholder:"2h"})}),m.jsx(sr,{label:"trigger",hint:"触发条件,可空走默认",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:d=>a({trigger:d.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),m.jsx(sr,{label:"on_complete",hint:"成功后动作",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:d=>a({on_complete:d.target.value}),placeholder:"move_card Done"})})]}),m.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[m.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),m.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[m.jsx(sr,{label:"action",hint:"失败时动作,如 label NEEDS-FIX",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.action??"",onChange:d=>a({on_fail:{...f,action:d.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),m.jsx(sr,{label:"comment",hint:"写进卡片的注释",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.comment??"",onChange:d=>a({on_fail:{...f,comment:d.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),m.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[m.jsx("input",{type:"checkbox",checked:f.halt??!0,onChange:d=>a({on_fail:{...f,halt:d.target.checked}})}),m.jsx("span",{className:"font-bold",children:"halt"}),m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(失败后停流水线;去掉则继续下一张卡)"})]})]})]})}function sr({label:e,hint:t,children:n}){return m.jsxs("label",{className:"flex flex-col gap-1",children:[m.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),n,t&&m.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function DO({onCancel:e,onCreate:t,hasActive:n,hasSample:a,isPending:s}){const[o,c]=j.useState(""),[f,d]=j.useState("blank");j.useEffect(()=>{const v=S=>{S.key==="Escape"&&e()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e]);const h=o.trim(),y=h.endsWith(".yaml")?h:h?`${h}.yaml`:"",g=y&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(y),x=()=>{!g||s||t(y,f)};return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",onClick:e,children:m.jsxs("div",{onClick:v=>v.stopPropagation(),className:"nb-card max-w-md w-full",children:[m.jsxs("header",{className:"flex items-start justify-between mb-4",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"新建 pipeline"}),m.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":"关闭",children:m.jsx(Er,{size:14,strokeWidth:3})})]}),m.jsxs("form",{onSubmit:v=>{v.preventDefault(),x()},className:"flex flex-col gap-4",children:[m.jsxs("label",{className:"flex flex-col gap-1.5",children:[m.jsx("span",{className:"text-sm font-bold",children:"文件名"}),m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如 ci",value:o,onChange:v=>c(v.target.value),autoFocus:!0}),m.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["实际会保存为 ",m.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:y||"xxx.yaml"}),"。 只允许 a-z A-Z 0-9 _ -;已有同名文件会 409 报错。"]})]}),m.jsxs("fieldset",{className:"flex flex-col gap-2",children:[m.jsx("legend",{className:"text-sm font-bold mb-1",children:"初始内容"}),m.jsx(Em,{value:"blank",current:f,label:"空白模板",desc:"最简 1 stage (develop → Done)",onSelect:d}),m.jsx(Em,{value:"sample",current:f,label:"教学模板",desc:"从 sample.yaml.example 复制(带注释,讲解所有字段)",onSelect:d,disabled:!a,disabledReason:"sample.yaml.example 不存在"}),m.jsx(Em,{value:"active",current:f,label:"复制当前活动的",desc:"从 project.yaml 复制(基于目前的配置改)",onSelect:d,disabled:!n,disabledReason:"project.yaml 不存在"})]}),m.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[m.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:s,children:"取消"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!g||s,"aria-label":"创建 pipeline",children:[s?m.jsx(Zt,{size:13,strokeWidth:3,className:"animate-spin"}):m.jsx(Zi,{size:13,strokeWidth:3}),"创建"]})]})]})]})})}function Em({value:e,current:t,label:n,desc:a,onSelect:s,disabled:o,disabledReason:c}){const f=t===e;return m.jsxs("label",{className:["flex items-start gap-2 p-2 rounded-lg border-2 cursor-pointer",o?"border-[var(--color-border-light)] opacity-50 cursor-not-allowed":f?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"border-[var(--color-border-light)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[m.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:f,disabled:o,onChange:()=>s(e),className:"mt-1 flex-shrink-0"}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:"text-sm font-bold",children:n}),m.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:o?c:a})]})]})}function LO(){var o;const{name:e=""}=PE(),t=_r(),[n,a]=j.useState("overview"),s=dt({queryKey:["project",e],queryFn:()=>XA(e),enabled:!!e});return m.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[m.jsxs("header",{className:"flex items-center gap-3",children:[m.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[m.jsx(ZE,{size:14,strokeWidth:3}),"返回"]}),m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:e}),m.jsx(ji,{to:`/board?project=${encodeURIComponent(e)}`,className:"nb-btn nb-btn-mint",children:"看板"})]}),m.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[m.jsx(Xu,{current:n,value:"overview",onSelect:a,icon:HC,children:"概览"}),m.jsx(Xu,{current:n,value:"config",onSelect:a,icon:t1,children:"配置"}),m.jsx(Xu,{current:n,value:"pipelines",onSelect:a,icon:a1,children:"Pipelines"}),m.jsx(Xu,{current:n,value:"danger",onSelect:a,icon:yc,children:"危险操作"})]}),n==="overview"&&m.jsx(IO,{name:e,data:s.data,loading:s.isLoading}),n==="config"&&m.jsx(zO,{name:e}),n==="pipelines"&&m.jsx(BO,{name:e}),n==="danger"&&m.jsx(UO,{name:e,repoDir:((o=s.data)==null?void 0:o.repoDir)??null})]})}function Xu({current:e,value:t,onSelect:n,icon:a,children:s}){const o=e===t;return m.jsxs("button",{type:"button",onClick:()=>n(t),"aria-current":o?"page":void 0,className:["nb-btn",o?"nb-btn-primary":""].join(" "),style:{padding:"6px 14px",fontSize:13},children:[m.jsx(a,{size:13,strokeWidth:2.5}),s]})}function IO({name:e,data:t,loading:n}){return n?m.jsx("div",{className:"nb-card",children:m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):t?m.jsx("div",{className:"nb-card",children:m.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[m.jsx("dt",{className:"font-bold",children:"仓库路径"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),m.jsx("dt",{className:"font-bold",children:"PM 后端"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),m.jsx("dt",{className:"font-bold",children:"Agent"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),m.jsx("dt",{className:"font-bold",children:"卡片"}),m.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.cards.total," 张 · ",t.cards.inprogress," 进行中 · ",t.cards.done," 完成"]}),m.jsx("dt",{className:"font-bold",children:"Worker"}),m.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.workers.total," 个(",t.workers.active," 活跃)"]}),m.jsx("dt",{className:"font-bold",children:"Pipeline"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),m.jsx("dt",{className:"font-bold",children:"最近活动"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):m.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:m.jsxs("p",{children:["项目 ",e," 不存在或无法读取。"]})})}function zO({name:e}){const t=Tn(),{alert:n}=qn(),{data:a,isLoading:s,isError:o,error:c,refetch:f}=dt({queryKey:["project-conf",e],queryFn:()=>WA(e)}),[d,h]=j.useState(null),[y,g]=j.useState(null);j.useEffect(()=>{a&&d===null&&(h(a.content),g(a.etag))},[a,d]);const x=d!==null&&a!==void 0&&d!==a.content,v=Pn({mutationFn:()=>{if(d===null||y===null)throw new Error("no draft");return JA(e,d,y)},onSuccess:S=>{g(S.etag),t.invalidateQueries({queryKey:["project-conf",e]}),t.invalidateQueries({queryKey:["project",e]})},onError:S=>{const _=S.status;n({title:_===409?"配置已被其他地方修改":"保存失败",body:_===409?'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。':S instanceof Error?S.message:String(S)})}});return s?m.jsx("div",{className:"nb-card",children:m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):o?m.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:m.jsxs("p",{children:["加载失败: ",c instanceof Error?c.message:String(c)]})}):m.jsxs("div",{className:"nb-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsxs("div",{children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:m.jsxs("code",{className:"font-[family-name:var(--font-mono)] text-sm bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:["~/.coral/projects/",e,"/conf"]})}),y&&m.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",y]})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{h(null),f()},disabled:v.isPending,"aria-label":"重新加载",children:[m.jsx(hs,{size:13,strokeWidth:2.5}),"重新加载"]}),m.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>v.mutate(),disabled:!x||v.isPending,"aria-label":"保存配置",children:[v.isPending?m.jsx(Zt,{size:13,strokeWidth:3,className:"animate-spin"}):v.isSuccess&&!x?m.jsx(NC,{size:13,strokeWidth:3}):m.jsx(If,{size:13,strokeWidth:3}),"保存"]})]})]}),m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:d??"",onChange:S=>h(S.target.value),spellCheck:!1,"aria-label":"conf 文件编辑器"}),x&&m.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:"● 未保存的修改"})]})}function BO({name:e}){const t=Tn(),{confirm:n,alert:a}=qn(),{data:s,isLoading:o}=dt({queryKey:["project-pipelines",e],queryFn:()=>t2(e)}),[c,f]=j.useState(null),[d,h]=j.useState(!1),y=Pn({mutationFn:S=>n2(e,S),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:S=>{a({title:"切换失败",body:S instanceof Error?S.message:String(S)})}}),g=Pn({mutationFn:S=>s2(e,S),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:S=>{a({title:"删除失败",body:S instanceof Error?S.message:String(S)})}}),x=Pn({mutationFn:S=>r2(e,S.name,S.template),onSuccess:S=>{t.invalidateQueries({queryKey:["project-pipelines",e]}),h(!1),f(S.name)},onError:S=>{a({title:"创建失败",body:S instanceof Error?S.message:String(S)})}});if(o)return m.jsx("div",{className:"nb-card",children:m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})});const v=[];s!=null&&s.active&&v.push({name:s.active,isActive:!0});for(const S of(s==null?void 0:s.available)??[])v.push({name:S.name,isActive:!1});return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"nb-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:"Pipelines"}),m.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>h(!0),disabled:x.isPending,"aria-label":"新建 pipeline",children:[m.jsx(Zi,{size:12,strokeWidth:3}),"新建 pipeline"]})]}),v.length===0?m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:'还没有 pipeline 文件。点"新建 pipeline"开始。'}):m.jsx("ul",{className:"flex flex-col gap-2",children:v.map(S=>m.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[m.jsx(a1,{size:16,strokeWidth:2.5}),m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:S.name}),S.isActive&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"active"}),m.jsxs("div",{className:"flex gap-1",children:[m.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>f(S.name),"aria-label":`编辑 ${S.name}`,children:[m.jsx(Kp,{size:11,strokeWidth:2.5}),"编辑"]}),!S.isActive&&m.jsxs(m.Fragment,{children:[m.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await n({title:`切换到 ${S.name}`,body:`当前 project.yaml 会被 ${S.name} 的内容覆盖。继续?`,confirm:"切换"})&&y.mutate(S.name)},disabled:y.isPending,"aria-label":`切换到 ${S.name}`,children:"切换"}),m.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await n({title:`删除 ${S.name}`,body:"这个 pipeline 文件会被永久删除。",confirm:"删除",danger:!0})&&g.mutate(S.name)},disabled:g.isPending,"aria-label":`删除 ${S.name}`,children:m.jsx(yc,{size:11,strokeWidth:2.5})})]})]})]},S.name))})]}),c&&m.jsx(RO,{projectName:e,file:c,onClose:()=>f(null),onSaved:()=>{t.invalidateQueries({queryKey:["project-pipelines",e]})}}),d&&m.jsx(DO,{hasActive:!!(s!=null&&s.active),hasSample:!0,isPending:x.isPending,onCancel:()=>h(!1),onCreate:(S,_)=>x.mutate({name:S,template:_})})]})}function UO({name:e,repoDir:t}){const n=_r(),a=Tn(),{alert:s}=qn(),[o,c]=j.useState(""),[f,d]=j.useState(!0),h=Pn({mutationFn:()=>e2(e,{includeClaudeDir:f}),onSuccess:y=>{a.invalidateQueries({queryKey:["projects"]});const g=y.claudeRemoved.filter(x=>x.ok).map(x=>x.path);s({title:"已删除",body:g.length>0?`项目已删除。同时清理了:
469
+ ${g.join(`
470
+ `)}`:"项目已删除。"}).then(()=>n("/projects"))},onError:y=>{s({title:"删除失败",body:y instanceof Error?y.message:String(y)})}});return m.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:"删除项目"}),m.jsxs("p",{className:"text-sm mb-4",children:["这会清理 ",m.jsxs("code",{className:"font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-1.5 py-0.5 rounded",children:["~/.coral/projects/",e,"/"]}),"(包括所有卡片、runtime、logs)。"]}),t&&m.jsxs("label",{className:"flex items-start gap-2 mb-4 p-3 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg cursor-pointer",children:[m.jsx("input",{type:"checkbox",checked:f,onChange:y=>d(y.target.checked),className:"mt-0.5"}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:"text-sm font-bold",children:"同时清理 repo 的 .claude/"}),m.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:"repo 本身不动,只清这个目录。"})]})]}),m.jsx("div",{className:"mb-4",children:m.jsxs("label",{className:"flex flex-col gap-1.5",children:[m.jsxs("span",{className:"text-sm font-bold",children:["输入项目名 ",m.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e})," 确认:"]}),m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:o,onChange:y=>c(y.target.value),placeholder:e})]})}),m.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:o!==e||h.isPending,onClick:()=>h.mutate(),"aria-label":"永久删除项目",children:[h.isPending?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(yc,{size:14,strokeWidth:3}),"永久删除"]})]})}function ug(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return Bt(`/api/skills${t}`)}function $O(e){return Bt(`/api/skills/${encodeURIComponent(e)}`)}function FO(e,t){return Bt(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function Xf(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function PO(e,t){return Xf(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function qO(e,t){return fetch(`/api/skills/${encodeURIComponent(e)}/link?project=${encodeURIComponent(t)}`,{method:"DELETE"}).then(n=>{if(!n.ok)throw new Error(`${n.status}`);return n.json()})}function HO(e,t){return Xf(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function KO(e,t){return Xf(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function GO(){return Xf("/api/skills/sync")}function QO({project:e,isPending:t,onCancel:n,onCreate:a}){var N;const[s,o]=j.useState(""),[c,f]=j.useState(""),[d,h]=j.useState(new Set),y=dt({queryKey:["skills-all",e],queryFn:()=>ug(e)});j.useEffect(()=>{const w=R=>{R.key==="Escape"&&n()};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[n]);const x=s.trim().length>0&&s.trim().length<=200&&!t,v=w=>{const R=new Set(d);R.has(w)?R.delete(w):R.add(w),h(R)},S=()=>{x&&a({title:s.trim(),description:c.trim(),skills:[...d]})},_=((N=y.data)==null?void 0:N.data)??[];return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:n,children:m.jsxs("div",{onClick:w=>w.stopPropagation(),className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[m.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:"新建卡片"}),m.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"关闭",children:m.jsx(Er,{size:14,strokeWidth:3})})]}),m.jsxs("form",{onSubmit:w=>{w.preventDefault(),S()},className:"flex flex-col gap-4 overflow-auto",children:[m.jsxs("label",{className:"flex flex-col gap-1.5",children:[m.jsx("span",{className:"text-sm font-bold",children:"标题 *"}),m.jsx("input",{type:"text",className:"nb-input w-full",placeholder:"例如:接入 GitHub OAuth 登录",value:s,onChange:w=>o(w.target.value),maxLength:200,autoFocus:!0,required:!0}),m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"写简短明了的目标(<200 字符)"})]}),m.jsxs("label",{className:"flex flex-col gap-1.5",children:[m.jsx("span",{className:"text-sm font-bold",children:"描述"}),m.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:"用户故事、需求、验收标准、参考资料… Claude 启动时会读这里的内容",value:c,onChange:w=>f(w.target.value)}),m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"支持 markdown。空的话就只有 title,Claude 只能靠 title 推断要做啥。"})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx("span",{className:"text-sm font-bold",children:"Skills"}),m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"勾选哪些 skill 会被加载(走 frontmatter `skills:`)。不选也行,Worker 默认加载项目级 skills。"}),y.isLoading&&m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),y.isError&&m.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["skill 列表加载失败,不影响创建:",y.error instanceof Error?y.error.message:String(y.error)]}),_.length>0&&m.jsx("div",{className:"flex flex-wrap gap-2",children:_.map(w=>{const R=d.has(w.name);return m.jsx("button",{type:"button",onClick:()=>v(w.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",R?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),"aria-pressed":R,children:w.name},w.name)})}),d.size>0&&m.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["已选 ",d.size," 个:",[...d].join(", ")]})]})]}),m.jsxs("div",{className:"flex gap-2 justify-end mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[m.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:n,disabled:t,type:"button",children:"取消"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:S,disabled:!x,type:"button","aria-label":"创建卡片",children:[t?m.jsx(Zt,{size:13,strokeWidth:3,className:"animate-spin"}):m.jsx(Zi,{size:13,strokeWidth:3}),"创建"]})]})]})})}function YO(e){return Bt(`/api/projects/${encodeURIComponent(e)}/cards`)}function VO(e,t){return Bt(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function Hl(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const a=await n.text();throw new Error(`${n.status} ${n.statusText}: ${a}`)}return n.json().catch(()=>({}))}function XO(e,t){return Hl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}function ZO(e,t){return Hl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function WO(e,t){const n=typeof t=="string"?{title:t}:t;return Hl(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function JO(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:n})});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}}async function eR(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return a.json()}function tR(e){return Hl(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function nR(e){return Hl(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function iR(e,t){return Hl(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function iS(e){const t=Tn();j.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",d.project]}),d.card&&t.setQueryData(["card",d.project,d.seq],{...t.getQueryData(["card",d.project,d.seq])??{},...d.card}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["workers",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["pipeline-status",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return a.addEventListener("card.created",s),a.addEventListener("card.updated",s),a.addEventListener("card.deleted",s),a.addEventListener("worker.updated",o),a.addEventListener("worker.added",o),a.addEventListener("worker.deleted",o),a.addEventListener("pipeline.status",c),()=>a.close()},[e,t])}const aR=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),rR=new Set(["frontend","backend","mobile","database","devops"]),sR=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),lR=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function oR(e){return aR.has(e)?"lang":rR.has(e)?"end":sR.has(e)?"persona":lR.has(e)?"workflow":"other"}const cR={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function aS({name:e}){const t=cR[oR(e)];return m.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function rS({label:e,kind:t="default"}){const n=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return m.jsx("span",{className:"nb-badge",style:{background:n},children:e})}function uR({card:e,onClick:t,done:n,draggable:a}){const s=e.labels.some(o=>o.startsWith("STARTED-"))&&!n;return m.jsxs("article",{onClick:t,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),t())},draggable:a,onDragStart:o=>{o.dataTransfer.setData("application/x-sps-card-seq",String(e.seq)),o.dataTransfer.effectAllowed="move"},tabIndex:0,role:"button","aria-label":`Card #${e.seq}: ${e.title}`,className:["bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl p-3","shadow-[3px_3px_0_var(--color-text)] cursor-pointer","transition-[transform,box-shadow] duration-[180ms] ease-out","hover:-translate-x-0.5 hover:-translate-y-0.5 hover:shadow-[5px_5px_0_var(--color-text)]","focus:outline-none focus-visible:ring-[3px] focus-visible:ring-offset-2 focus-visible:ring-[var(--color-text)]",n?"opacity-60":"",a?"active:cursor-grabbing":""].join(" "),children:[m.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[m.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-[11px] px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full",children:["#",e.seq]}),s&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),m.jsx("p",{className:`font-bold text-sm leading-5 mb-2 line-clamp-2 ${n?"line-through decoration-2":""}`,children:e.title}),(e.skills.length>0||e.labels.length>0)&&m.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(o=>m.jsx(aS,{name:o},o)),e.labels.filter(o=>o==="NEEDS-FIX").map(o=>m.jsx(rS,{label:o,kind:"warn"},o))]}),m.jsxs("div",{className:"pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)] flex items-center gap-2 text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-subtle)]",children:[m.jsx("span",{children:fR(e.updatedAt??e.createdAt)}),e.branch&&m.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function fR(e){if(!e)return"—";const t=new Date(e),n=Date.now()-t.getTime();return n<6e4?"刚才":n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleDateString()}function dR({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const[o,c]=j.useState(!1);return m.jsxs("div",{className:["flex flex-col gap-2 p-3 rounded-2xl border-[3px] min-h-[340px]","transition-all",o?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:f=>{!s||!f.dataTransfer.types.includes("application/x-sps-card-seq")||(f.preventDefault(),f.dataTransfer.dropEffect="move",o||c(!0))},onDragLeave:()=>c(!1),onDrop:f=>{if(c(!1),!s)return;const d=f.dataTransfer.getData("application/x-sps-card-seq"),h=Number.parseInt(d,10);Number.isFinite(h)&&(f.preventDefault(),s(h))},children:[m.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 border-b-2 border-[var(--color-text)]",children:[m.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[n.length===0&&m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),n.map(f=>m.jsx(uR,{card:f,onClick:()=>a(f),done:e==="Done",draggable:!!s},f.seq))]})]})}function Sm(e){const t=e.split(`
471
+ `),n=t.findIndex(s=>/^##\s+描述\s*$/.test(s));if(n===-1)return"";let a=t.length;for(let s=n+1;s<t.length;s++)if(/^##\s+/.test(t[s]??"")){a=s;break}return t.slice(n+1,a).join(`
472
+ `).trim()}function hR({project:e,seq:t,onClose:n,onChanged:a}){const s=Tn(),{confirm:o,alert:c}=qn(),{data:f,isLoading:d,isError:h,error:y,refetch:g}=dt({queryKey:["card",e,t],queryFn:()=>VO(e,t)}),[x,v]=j.useState(!1),[S,_]=j.useState(""),[N,w]=j.useState(""),[R,A]=j.useState(new Set),[D,F]=j.useState([]),[M,q]=j.useState(""),U=dt({queryKey:["skills-all",e],queryFn:()=>ug(e),enabled:x});j.useEffect(()=>{x&&f&&(_(f.title),w(Sm(f.body)),A(new Set(f.skills)),F([...f.labels]))},[x,f]),j.useEffect(()=>{const H=Q=>{Q.key==="Escape"&&(x?v(!1):n())};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[n,x]);const J=Pn({mutationFn:()=>{if(!f)throw new Error("no data");const H={},Q=S.trim();Q&&Q!==f.title&&(H.title=Q);const G=Sm(f.body);N!==G&&(H.description=N);const oe=[...R].sort(),Z=[...f.skills].sort();return JSON.stringify(oe)!==JSON.stringify(Z)&&(H.skills=oe),JSON.stringify(D)!==JSON.stringify(f.labels)&&(H.labels=D),Object.keys(H).length===0?Promise.resolve({ok:!0,noop:!0}):eR(e,t,H)},onSuccess:()=>{s.invalidateQueries({queryKey:["card",e,t]}),s.invalidateQueries({queryKey:["cards",e]}),v(!1),a()},onError:H=>{c({title:"保存失败",body:H instanceof Error?H.message:String(H)})}}),C=j.useMemo(()=>{if(!x||!f)return!1;if(S.trim()!==f.title||N!==Sm(f.body))return!0;const H=[...R].sort(),Q=[...f.skills].sort();return JSON.stringify(H)!==JSON.stringify(Q)||JSON.stringify(D)!==JSON.stringify(f.labels)},[x,f,S,N,R,D]),P=H=>{const Q=new Set(R);Q.has(H)?Q.delete(H):Q.add(H),A(Q)},Y=()=>{const H=M.trim();if(H){if(D.includes(H)){q("");return}F([...D,H]),q("")}},le=H=>{F(D.filter(Q=>Q!==H))};return m.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"card-modal-title",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:n,children:m.jsxs("div",{onClick:H=>H.stopPropagation(),className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[m.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[m.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full",children:["#",t]}),(f==null?void 0:f.state)&&m.jsx("span",{className:"font-[family-name:var(--font-mono)] text-xs px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full font-semibold",children:f.state}),x&&m.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:"⚠ 编辑中"})]}),x?m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:S,onChange:H=>_(H.target.value),maxLength:200,"aria-label":"卡片标题"}):m.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:(f==null?void 0:f.title)??"加载中…"})]}),m.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!x&&f&&m.jsxs("button",{onClick:()=>v(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":"编辑卡片",children:[m.jsx(Kp,{size:12,strokeWidth:2.5})," 编辑"]}),m.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:m.jsx(Er,{size:14,strokeWidth:3})})]})]}),d&&m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),h&&m.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",y instanceof Error?y.message:String(y)]}),f&&m.jsxs("div",{className:"flex flex-col gap-4",children:[f.branch&&!x&&m.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[m.jsx(YC,{size:14}),m.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:f.branch})]}),x?m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),U.isLoading&&m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),U.data&&U.data.data.length>0&&m.jsx("div",{className:"flex flex-wrap gap-1.5",children:U.data.data.map(H=>{const Q=R.has(H.name);return m.jsx("button",{type:"button",onClick:()=>P(H.name),"aria-pressed":Q,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",Q?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:H.name},H.name)})})]}),m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),m.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[D.map(H=>m.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-accent-yellow)] border-2 border-[var(--color-text)] rounded-full",children:[H,m.jsx("button",{type:"button",onClick:()=>le(H),className:"hover:text-[var(--color-crashed)]","aria-label":`删除 ${H}`,children:m.jsx(Er,{size:10,strokeWidth:3})})]},H)),m.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:"+ 添加 label",value:M,onChange:H=>q(H.target.value),onKeyDown:H=>{H.key==="Enter"&&!H.nativeEvent.isComposing&&(H.preventDefault(),Y())}}),M&&m.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:Y,"aria-label":"添加 label",children:m.jsx(Zi,{size:10,strokeWidth:3})})]}),m.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖"})]})]}):(f.skills.length>0||f.labels.length>0)&&m.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.skills.map(H=>m.jsx(aS,{name:H},H)),f.labels.map(H=>m.jsx(rS,{label:H,kind:H==="NEEDS-FIX"?"warn":"default"},H))]}),f.checklist.total>0&&m.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[m.jsxs("div",{className:"flex items-center justify-between mb-2",children:[m.jsxs("span",{className:"font-bold text-sm",children:["检查清单 ",f.checklist.done,"/",f.checklist.total]}),m.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:m.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${f.checklist.percent}%`}})})]}),m.jsx("ul",{className:"text-sm space-y-1",children:f.checklist.items.map((H,Q)=>m.jsxs("li",{className:`flex items-start gap-2 ${H.done?"opacity-60 line-through":""}`,children:[m.jsx("span",{children:H.done?"✓":"○"}),m.jsx("span",{children:H.text})]},Q))})]}),x?m.jsxs("div",{children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"描述"}),m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:N,onChange:H=>w(H.target.value),"aria-label":"卡片描述"}),m.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:'只替换 "## 描述" 段的内容;检查清单和日志段不动。'})]}):f.body&&m.jsxs("div",{children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"正文"}),m.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:f.body.trim()||"(空)"})]}),m.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end",children:x?m.jsxs(m.Fragment,{children:[m.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{v(!1),g()},disabled:J.isPending,children:"取消"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>J.mutate(),disabled:!C||!S.trim()||J.isPending,"aria-label":"保存卡片修改",children:[J.isPending?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(If,{size:14,strokeWidth:3}),"保存"]})]}):m.jsxs(m.Fragment,{children:[m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:async()=>{try{await ZO(e,t),a()}catch(H){c({title:"启动 worker 失败",body:H instanceof Error?H.message:String(H)})}},children:[m.jsx(Gp,{size:14,strokeWidth:3}),"启动 worker"]}),m.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await o({title:`重置卡片 #${t}`,body:"卡片状态会回到初始,已做的 checklist 会清空。",confirm:"重置",danger:!0}))try{await XO(e,t),a(),n()}catch(Q){c({title:"重置失败",body:Q instanceof Error?Q.message:String(Q)})}},children:[m.jsx(Lf,{size:14,strokeWidth:2.5}),"重置卡片"]})]})})]})]})})}function sS({current:e,onChange:t}){const[n,a]=j.useState(!1),s=j.useRef(null),{data:o}=dt({queryKey:["projects"],queryFn:zl});return j.useEffect(()=>{const c=f=>{var d;(d=s.current)!=null&&d.contains(f.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),m.jsxs("div",{className:"relative",ref:s,children:[m.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>a(c=>!c),children:[e,m.jsx(Fp,{size:14,strokeWidth:2.5})]}),n&&o&&m.jsx("div",{className:"absolute right-0 mt-2 z-20 min-w-[200px] bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[5px_5px_0_var(--color-text)] overflow-hidden",children:o.data.map(c=>m.jsxs("button",{type:"button",onClick:()=>{t(c.name),a(!1)},className:["w-full text-left px-4 py-2 text-sm font-semibold",c.name===e?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[m.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:c.name}),m.jsxs("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:[c.cards.total," cards"]})]},c.name))})]})}const mR=[{state:"Planning",label:"Planning",bg:"var(--color-accent-purple)"},{state:"Backlog",label:"Backlog",bg:"var(--color-bg-cream)"},{state:"Todo",label:"Todo",bg:"var(--color-accent-yellow)"},{state:"Inprogress",label:"Inprogress",bg:"var(--color-secondary)"},{state:"QA",label:"QA / Review",bg:"var(--color-accent-pink)"},{state:"Done",label:"Done",bg:"var(--color-accent-mint)"}],lS="sps-console:last-board-project";function pR(){if(typeof window>"u")return null;try{return localStorage.getItem(lS)}catch{return null}}function gR(e){if(!(typeof window>"u"))try{localStorage.setItem(lS,e)}catch{}}function bR(){var Q,G,oe;const[e,t]=jf(),n=e.get("project"),[a,s]=j.useState(null),[o,c]=j.useState(""),[f,d]=j.useState(()=>new Set),[h,y]=j.useState(()=>new Set),{confirm:g,alert:x}=qn();iS(n);const v=dt({queryKey:["projects"],queryFn:zl}),S=dt({queryKey:["cards",n],queryFn:()=>YO(n??""),enabled:!!n}),_=Tn(),N=()=>{_.invalidateQueries({queryKey:["cards",n]}),_.invalidateQueries({queryKey:["projects"]}),_.invalidateQueries({queryKey:["pipeline-status",n]})},w=Z=>{t({project:Z})};j.useEffect(()=>{var pe;if(n){gR(n);return}const Z=pR();Z&&((pe=v.data)!=null&&pe.data.some(O=>O.name===Z))&&t({project:Z},{replace:!0})},[n,v.data,t]);const R=Pn({mutationFn:()=>tR(n),onSuccess:()=>{N()},onError:Z=>{x({title:"启动 pipeline 失败",body:Z instanceof Error?Z.message:String(Z)})}}),A=Pn({mutationFn:()=>nR(n),onSuccess:()=>N(),onError:Z=>{x({title:"停止 pipeline 失败",body:Z instanceof Error?Z.message:String(Z)})}}),D=Pn({mutationFn:()=>iR(n,{all:!0}),onSuccess:()=>N(),onError:Z=>{x({title:"重置失败",body:Z instanceof Error?Z.message:String(Z)})}}),[F,M]=j.useState(!1),q=Pn({mutationFn:Z=>WO(n,Z),onSuccess:()=>{N(),M(!1)},onError:Z=>{x({title:"新建卡片失败",body:Z instanceof Error?Z.message:String(Z)})}}),U=Pn({mutationFn:({seq:Z,state:pe})=>JO(n,Z,pe),onMutate:async({seq:Z,state:pe})=>{await _.cancelQueries({queryKey:["cards",n]});const O=_.getQueryData(["cards",n]);return O&&_.setQueryData(["cards",n],{...O,data:O.data.map(L=>L.seq===Z?{...L,state:pe}:L)}),{prev:O}},onError:(Z,pe,O)=>{O!=null&&O.prev&&_.setQueryData(["cards",n],O.prev),x({title:"移动卡片失败",body:Z instanceof Error?Z.message:String(Z)})},onSettled:()=>{_.invalidateQueries({queryKey:["cards",n]})}}),J=((Q=S.data)==null?void 0:Q.data)??[],{allSkills:C,allLabels:P}=j.useMemo(()=>{const Z=new Set,pe=new Set;for(const O of J){for(const L of O.skills)Z.add(L);for(const L of O.labels)pe.add(L)}return{allSkills:[...Z].sort(),allLabels:[...pe].sort()}},[J]);if(!n)return m.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"看板"}),m.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"选择一个项目 🎯"}),m.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:"看板按项目分。挑一个开始:"}),m.jsx("div",{className:"flex flex-wrap gap-2",children:(G=v.data)==null?void 0:G.data.map(Z=>m.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>w(Z.name),type:"button",children:Z.name},Z.name))})]})]});const Y=J.filter(Z=>{if(o){const pe=o.toLowerCase();if(!(Z.title.toLowerCase().includes(pe)||Z.skills.some(L=>L.toLowerCase().includes(pe))||Z.labels.some(L=>L.toLowerCase().includes(pe))))return!1}return!(f.size>0&&!Z.skills.some(O=>f.has(O))||h.size>0&&!Z.labels.some(O=>h.has(O)))}),le=(oe=v.data)==null?void 0:oe.data.find(Z=>Z.name===n),H=(le==null?void 0:le.pipelineStatus)==="running";return m.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[m.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"看板 ✨"}),m.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:le?`${le.name} · ${le.cards.total} cards · ${le.workers.active} workers 活跃`:"加载中…"})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsx(sS,{current:n,onChange:w}),m.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:()=>R.mutate(),disabled:H||R.isPending,type:"button","aria-label":"启动 pipeline",title:H?"pipeline 正在运行":"启动 pipeline",children:[R.isPending?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(Gp,{size:14,strokeWidth:3}),"启动"]}),m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:()=>A.mutate(),disabled:!H||A.isPending,type:"button","aria-label":"停止 pipeline",title:H?"停止 pipeline":"pipeline 未在运行",children:[A.isPending?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(n1,{size:14,strokeWidth:3}),"停止"]}),m.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await g({title:"重置整个流水线",body:"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。",confirm:"重置全部",danger:!0})&&D.mutate()},disabled:D.isPending,children:[D.isPending?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(Lf,{size:14,strokeWidth:2.5}),"重置"]}),m.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>M(!0),disabled:q.isPending,children:[q.isPending?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(Zi,{size:14,strokeWidth:3}),"新卡片"]})]})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsxs("div",{className:"relative flex-1 max-w-md",children:[m.jsx(xf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),m.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索标题 / skill / label…",value:o,onChange:Z=>c(Z.target.value),"aria-label":"搜索卡片"})]}),m.jsx(i0,{label:"skill",options:C,selected:f,onChange:d}),m.jsx(i0,{label:"label",options:P,selected:h,onChange:y}),(o||f.size>0||h.size>0)&&m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{c(""),d(new Set),y(new Set)},type:"button","aria-label":"清空筛选",children:[m.jsx(Er,{size:11,strokeWidth:3}),"清空"]}),m.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[m.jsx(GC,{size:12}),Y.length," / ",J.length]})]}),S.isError&&m.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[m.jsx("p",{className:"font-semibold",children:"加载卡片失败"}),m.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:S.error instanceof Error?S.error.message:String(S.error)})]}),!S.isError&&m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6 gap-3",children:mR.map(Z=>m.jsx(dR,{label:Z.label,bg:Z.bg,cards:Y.filter(yR(Z.state)),onCardClick:pe=>s(pe.seq),onDropCard:pe=>U.mutate({seq:pe,state:Z.state})},Z.state))}),a!==null&&m.jsx(hR,{project:n,seq:a,onClose:()=>s(null),onChanged:N}),F&&m.jsx(QO,{project:n,isPending:q.isPending,onCancel:()=>M(!1),onCreate:Z=>q.mutate(Z)})]})}function yR(e){return t=>e==="QA"?t.state==="QA"||t.state==="Review":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function i0({label:e,options:t,selected:n,onChange:a}){const[s,o]=j.useState(!1),c=j.useRef(null);j.useEffect(()=>{if(!s)return;const y=x=>{var v;(v=c.current)!=null&&v.contains(x.target)||o(!1)},g=x=>{x.key==="Escape"&&o(!1)};return window.addEventListener("click",y),window.addEventListener("keydown",g),()=>{window.removeEventListener("click",y),window.removeEventListener("keydown",g)}},[s]);const f=y=>{const g=new Set(n);g.has(y)?g.delete(y):g.add(y),a(g)},d=t.length===0,h=n.size;return m.jsxs("div",{ref:c,className:"relative",children:[m.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!d&&o(y=>!y),disabled:d,"aria-haspopup":"listbox","aria-expanded":s,"aria-label":`按 ${e} 筛选`,children:[e,h>0&&m.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:h}),m.jsx(Fp,{size:11,strokeWidth:3,className:["transition-transform",s?"rotate-180":""].join(" ")})]}),s&&m.jsxs("div",{role:"listbox",className:"absolute left-0 top-full mt-2 z-20 min-w-[200px] max-h-64 overflow-auto nb-card p-2",style:{padding:8},children:[t.map(y=>{const g=n.has(y);return m.jsxs("label",{className:["flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer text-sm font-[family-name:var(--font-mono)]",g?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[m.jsx("input",{type:"checkbox",checked:g,onChange:()=>f(y),className:"flex-shrink-0"}),m.jsx("span",{className:"truncate",children:y})]},y)}),h>0&&m.jsx("button",{type:"button",className:"w-full mt-2 pt-2 border-t-2 border-dashed border-[var(--color-text)] text-xs font-bold text-[var(--color-crashed)] text-center",onClick:()=>a(new Set),children:"清空选择"})]})]})}function xR(){return Bt("/api/workers/all")}function vR(e){return Bt(`/api/projects/${encodeURIComponent(e)}/workers`)}function ER(e,t){return Bt(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function oS(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function Rl(e,t){return oS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function fg(e,t,n){return oS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function SR(){const[e,t]=jf(),n=e.get("project");iS(n);const a=Tn(),[s,o]=j.useState(null),{data:c,isLoading:f,isError:d,error:h,refetch:y}=dt({queryKey:["workers",n],queryFn:()=>vR(n??""),enabled:!!n,refetchInterval:5e3});if(!n)return m.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-accent-yellow)]",children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"Workers 👷"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["在 URL 上加 ",m.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"?project=xx"}),",或从",m.jsx(ji,{to:"/projects",className:"underline font-semibold",children:" 项目列表"})," 打开看板后跳转。"]})]});const g=(c==null?void 0:c.data)??[],x=g.filter(_=>_.state==="running").length,v=g.filter(_=>_.state==="stuck").length,S=g.filter(_=>_.state==="crashed").length;return m.jsxs("div",{className:"flex flex-col gap-4 max-w-6xl",children:[m.jsxs("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Workers 👷"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[g.length," 个 slot · ",x," running · ",v," stuck · ",S," crashed"]})]}),m.jsxs("div",{className:"flex gap-3 items-center",children:[m.jsx(sS,{current:n,onChange:_=>t({project:_})}),m.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>y(),type:"button",children:[m.jsx(Lf,{size:14,strokeWidth:2.5})," 刷新"]})]})]}),f&&m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),d&&m.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:m.jsxs("p",{className:"font-semibold",children:["加载失败: ",h instanceof Error?h.message:String(h)]})}),!f&&g.length===0&&m.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"当前没有 worker slot。启动一次 pipeline 就会出现。"})}),g.length>0&&m.jsx("div",{className:"nb-card p-0 overflow-hidden",children:m.jsxs("table",{className:"w-full text-sm",children:[m.jsx("thead",{children:m.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[m.jsx(Vr,{w:"70px",children:"Slot"}),m.jsx(Vr,{children:"Card"}),m.jsx(Vr,{w:"110px",children:"Status"}),m.jsx(Vr,{w:"90px",children:"Stage"}),m.jsx(Vr,{w:"90px",children:"PID"}),m.jsx(Vr,{w:"120px",children:"Runtime"}),m.jsx(Vr,{w:"260px",right:!0,children:"Action"})]})}),m.jsx("tbody",{children:g.map(_=>m.jsx(_R,{project:n,worker:_,onChange:()=>a.invalidateQueries({queryKey:["workers",n]}),onDetail:()=>o(_.slot)},_.slot))})]})}),s!==null&&m.jsx(wR,{project:n,slot:s,onClose:()=>o(null),onChange:()=>a.invalidateQueries({queryKey:["workers",n]})})]})}function Vr({children:e,w:t,right:n}){return m.jsx("th",{className:["px-4 py-3 text-left font-[family-name:var(--font-heading)] font-bold text-[12px] uppercase tracking-wider text-[var(--color-text-muted)]",n?"text-right":""].join(" "),style:t?{width:t}:void 0,children:e})}function _R({project:e,worker:t,onChange:n,onDetail:a}){const{confirm:s,alert:o}=qn(),c=t.state==="idle",f=t.state==="crashed"||t.state==="stuck";return m.jsxs("tr",{className:"border-b border-dashed border-[var(--color-border-light)] last:border-0 hover:bg-[var(--color-accent-yellow)] transition-colors",children:[m.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] font-bold",children:t.slot}),m.jsx("td",{className:"px-4 py-3",children:t.card?m.jsxs("span",{className:"font-semibold",children:[m.jsxs("span",{className:"inline-block px-2 py-0.5 text-xs bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full font-[family-name:var(--font-mono)] mr-2",children:["#",t.card.seq]}),t.card.title]}):m.jsx("em",{className:"text-[var(--color-text-subtle)]",children:"— 空闲 —"})}),m.jsx("td",{className:"px-4 py-3",children:m.jsx(cS,{state:t.state})}),m.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:t.stage||"—"}),m.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:t.pid??"—"}),m.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:uS(t.runtimeMs)}),m.jsxs("td",{className:"px-4 py-3 text-right space-x-2",children:[m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:a,type:"button","aria-label":`查看 worker-${t.slot} 详情`,children:[m.jsx(eA,{size:12,strokeWidth:2.5})," 详情"]}),f&&t.card&&m.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await s({title:`重启 worker-${t.slot}`,body:`先杀掉当前进程,然后重新 launch 到卡 #${t.card.seq}。`,confirm:"重启"})){try{await Rl(e,t.slot)}catch{}try{await fg(e,t.slot,t.card.seq),n()}catch(h){o({title:"重启失败",body:h instanceof Error?h.message:String(h)})}}},type:"button",children:[m.jsx(hs,{size:12,strokeWidth:2.5})," 重启"]}),!c&&m.jsxs(m.Fragment,{children:[m.jsxs(ji,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"nb-btn",style:{display:"inline-flex",padding:"4px 10px",fontSize:11},children:[m.jsx(Qp,{size:12,strokeWidth:2.5})," log"]}),m.jsxs("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await s({title:`终止 worker-${t.slot}`,body:"当前任务会被强制中断,未保存的工作可能丢失。",confirm:"终止",danger:!0})&&(await Rl(e,t.slot),n())},type:"button",children:[m.jsx(Yp,{size:12,strokeWidth:2.5})," 终止"]})]})]})]})}function wR({project:e,slot:t,onClose:n,onChange:a}){const{confirm:s,alert:o}=qn(),{data:c,isLoading:f,isError:d,error:h,refetch:y}=dt({queryKey:["worker-detail",e,t],queryFn:()=>ER(e,t),refetchInterval:3e3});return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:n,children:m.jsxs("div",{onClick:g=>g.stopPropagation(),className:"nb-card mt-8 w-full max-w-3xl",children:[m.jsxs("header",{className:"flex items-center justify-between mb-3",children:[m.jsxs("div",{children:[m.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:["worker-",t]}),m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-0.5",children:e})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>y(),type:"button","aria-label":"刷新",children:[m.jsx(Lf,{size:12,strokeWidth:2.5})," 刷新"]}),m.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"关闭",children:"✕"})]})]}),f&&m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),d&&m.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",h instanceof Error?h.message:String(h)]}),c&&m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:m.jsxs("dl",{className:"grid grid-cols-[130px_1fr] gap-y-2 text-sm",children:[m.jsx("dt",{className:"font-bold",children:"状态"}),m.jsx("dd",{children:m.jsx(cS,{state:c.state})}),m.jsx("dt",{className:"font-bold",children:"PID"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:c.pid??"—"}),m.jsx("dt",{className:"font-bold",children:"Card"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:c.card?`#${c.card.seq} · ${c.card.title}`:"—"}),m.jsx("dt",{className:"font-bold",children:"Stage"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:c.stage??"—"}),m.jsx("dt",{className:"font-bold",children:"Runtime"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:uS(c.runtimeMs)}),m.jsx("dt",{className:"font-bold",children:"Marker"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs text-[var(--color-text-muted)] break-all",children:c.markerPath}),m.jsx("dt",{className:"font-bold",children:"Marker 更新"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:c.markerUpdatedAt?`${new Date(c.markerUpdatedAt).toLocaleString()} (${NR(c.markerUpdatedAt)})`:"—"})]})}),m.jsxs("div",{children:[m.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:["最近 ",c.recentLogs.length," 行日志"]}),c.recentLogs.length===0?m.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:["没找到带 worker-",t," 标签的日志。去 Logs 页看全量。"]}):m.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-64 overflow-auto whitespace-pre-wrap break-words",children:c.recentLogs.map(g=>`${g.ts??""} [${g.level}] ${g.msg}`).join(`
473
+ `)}),m.jsx(ji,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t}`,className:"inline-block mt-2 text-xs underline text-[var(--color-running)]",children:"查看完整 log →"})]}),m.jsxs("div",{className:"flex gap-2 justify-end border-t-2 border-dashed border-[var(--color-text)] pt-3",children:[(c.state==="crashed"||c.state==="stuck")&&c.card&&m.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{if(await s({title:`重启 worker-${t}`,body:`先杀掉当前进程,重新 launch 到卡 #${c.card.seq}。`,confirm:"重启"})){try{await Rl(e,t)}catch{}try{await fg(e,t,c.card.seq),a(),y()}catch(x){o({title:"重启失败",body:x instanceof Error?x.message:String(x)})}}},type:"button",children:[m.jsx(hs,{size:14,strokeWidth:2.5})," 重启"]}),c.state!=="idle"&&m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:async()=>{if(await s({title:`终止 worker-${t}`,body:"当前任务会被强制中断。",confirm:"终止",danger:!0}))try{await Rl(e,t),a(),y()}catch(x){o({title:"终止失败",body:x instanceof Error?x.message:String(x)})}},type:"button",children:[m.jsx(Yp,{size:14,strokeWidth:3})," 终止"]}),c.state==="running"&&m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin self-center text-[var(--color-running)]"})]})]})]})})}function NR(e){const t=Date.now()-new Date(e).getTime();return t<6e4?`${Math.floor(t/1e3)}s 前`:t<36e5?`${Math.floor(t/6e4)}m 前`:`${Math.floor(t/36e5)}h 前`}function cS({state:e}){const t={running:{bg:"var(--color-running-bg)",color:"var(--color-running)"},starting:{bg:"var(--color-secondary)",color:"var(--color-text)"},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)"},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)"}},{bg:n,color:a}=t[e];return m.jsx("span",{className:"nb-status",style:{background:n,color:a},children:e})}function uS(e){if(e==null||e<=0)return"—";const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60,o=c=>c.toString().padStart(2,"0");return n>0?`${o(n)}:${o(a)}:${o(s)}`:`${o(a)}:${o(s)}`}function kR(){var f;const e=Tn(),[t,n]=j.useState(null),a=dt({queryKey:["workers-agg"],queryFn:xR,refetchInterval:5e3});j.useEffect(()=>{if(!a.data)return;const d=a.data.capacity.map(y=>y.project),h=[];for(const y of d){const g=new EventSource(`/stream/projects/${encodeURIComponent(y)}`),x=()=>{e.invalidateQueries({queryKey:["workers-agg"]})};g.addEventListener("worker.updated",x),g.addEventListener("worker.added",x),g.addEventListener("worker.deleted",x),g.addEventListener("card.updated",x),h.push(g)}return()=>{for(const y of h)y.close()}},[(f=a.data)==null?void 0:f.capacity.map(d=>d.project).join(","),e]);const s=j.useMemo(()=>{var h,y;return[...((h=a.data)==null?void 0:h.alerts)??[],...((y=a.data)==null?void 0:y.active)??[]]},[a.data]),o=t&&s.find(d=>d.project===t.project&&d.slot===t.slot),c=j.useMemo(()=>{if(!a.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const d={projects:a.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const h of a.data.capacity)d.running+=h.running,d.starting+=h.starting,d.stuck+=h.stuck,d.crashed+=h.crashed,d.idle+=h.idle;return d},[a.data]);return m.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[m.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Workers 👷"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:["跨 ",c.projects," 项目 · ",c.running," 跑 · ",c.starting," 启动 ·"," ",m.jsxs("span",{className:"text-[var(--color-stuck)]",children:[c.stuck," 卡"]})," ·"," ",m.jsxs("span",{className:"text-[var(--color-crashed)]",children:[c.crashed," 崩"]})," · ",c.idle," 闲"]})]}),m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a.refetch(),disabled:a.isFetching,type:"button","aria-label":"刷新",children:[a.isFetching?m.jsx(Zt,{size:12,strokeWidth:3,className:"animate-spin"}):m.jsx(hs,{size:12,strokeWidth:2.5}),"刷新"]})]}),m.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[m.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[a.isLoading&&m.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"加载中…"}),a.isError&&m.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:m.jsxs("p",{children:["加载失败: ",a.error instanceof Error?a.error.message:String(a.error)]})}),a.data&&m.jsxs(m.Fragment,{children:[m.jsx(TR,{alerts:a.data.alerts,selected:t,onSelect:(d,h)=>n({project:d,slot:h})}),m.jsx(CR,{active:a.data.active,selected:t,onSelect:(d,h)=>n({project:d,slot:h})}),m.jsx(AR,{capacity:a.data.capacity})]})]}),m.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:o?m.jsx(MR,{worker:o,onChange:()=>e.invalidateQueries({queryKey:["workers-agg"]})}):m.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:m.jsxs("div",{children:[m.jsx(Df,{size:32,className:"mx-auto mb-3 text-[var(--color-text-subtle)]",strokeWidth:2}),m.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"点击左侧的 worker 查看详情"})]})})})]})]})}function TR({alerts:e,selected:t,onSelect:n}){return e.length===0?m.jsxs("div",{className:"nb-card bg-[var(--color-running-bg)] flex items-center gap-3",children:[m.jsx(qp,{size:18,strokeWidth:2.5,className:"text-[var(--color-running)]"}),m.jsx("span",{className:"text-sm font-bold text-[var(--color-running)]",children:"全部 worker 健康"})]}):m.jsxs("section",{children:[m.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2 text-[var(--color-crashed)]",children:[m.jsx(DA,{size:14,strokeWidth:2.5}),"Alerts (",e.length,")"]}),m.jsx("div",{className:"flex flex-col gap-2",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return m.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[m.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[m.jsx(dg,{state:a.state}),m.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[a.project,"/worker-",a.slot]}),a.card&&m.jsxs("span",{className:"truncate",children:["#",a.card.seq," ",a.card.title]}),m.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1",children:[m.jsx(zC,{size:10,strokeWidth:2.5}),hg(a.runtimeMs)]})]}),a.markerUpdatedAt&&m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:a.state==="crashed"?"PID 已死。":`marker 停 ${mg(a.markerUpdatedAt)}。`})]},`${a.project}-${a.slot}`)})})]})}function CR({active:e,selected:t,onSelect:n}){return e.length===0?m.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"没有 worker 在运行。"})}):m.jsxs("section",{children:[m.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2",children:[m.jsx(Df,{size:14,strokeWidth:2.5}),"Active (",e.length,")"]}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return m.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="starting"?"bg-[var(--color-secondary)]":"bg-[var(--color-running-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[m.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[m.jsx(dg,{state:a.state}),m.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm flex-1 truncate",children:[a.project,"/worker-",a.slot]}),m.jsx("span",{className:`text-xs font-[family-name:var(--font-mono)] ${jR(a.runtimeMs)}`,children:hg(a.runtimeMs)})]}),a.card&&m.jsxs("div",{className:"text-sm font-semibold mb-1 truncate",children:["#",a.card.seq," · ",a.card.title]}),m.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-2 mb-1",children:[a.stage&&m.jsxs("span",{children:["stage: ",a.stage]}),a.markerUpdatedAt&&m.jsxs("span",{className:"ml-auto",children:["marker ",mg(a.markerUpdatedAt)]})]}),a.lastLogLine&&m.jsxs("div",{className:"text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded px-2 py-1 mt-2 truncate",children:[m.jsx(Qp,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function AR({capacity:e}){return e.length===0?null:m.jsxs("section",{children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2",children:"Capacity"}),m.jsx("div",{className:"nb-card p-0 overflow-hidden",children:m.jsxs("table",{className:"w-full text-sm",children:[m.jsx("thead",{children:m.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[m.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"项目"}),m.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"占用"}),m.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"running"}),m.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"其它"}),m.jsx("th",{className:"px-3 py-2"})]})}),m.jsx("tbody",{children:e.map(t=>{const n=t.running+t.starting+t.stuck+t.crashed;return m.jsxs("tr",{className:"border-b border-dashed border-[var(--color-border-light)] last:border-0 hover:bg-[var(--color-accent-yellow)]",children:[m.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:t.project}),m.jsx("td",{className:"px-3 py-2",children:m.jsx(OR,{total:t.total,cap:t})}),m.jsxs("td",{className:"px-3 py-2 text-right font-[family-name:var(--font-mono)]",children:[m.jsx("span",{className:"text-[var(--color-running)] font-bold",children:t.running}),m.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",t.total]})]}),m.jsxs("td",{className:"px-3 py-2 text-right text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:[t.starting>0&&m.jsxs("span",{className:"mr-2",children:["starting ",t.starting]}),t.stuck>0&&m.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",t.stuck]}),t.crashed>0&&m.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",t.crashed]}),n===0&&m.jsx("span",{children:"idle"})]}),m.jsx("td",{className:"px-3 py-2 text-right",children:m.jsx(ji,{to:`/workers?project=${encodeURIComponent(t.project)}`,className:"text-xs underline text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"详情 →"})})]},t.project)})})]})})]})}function OR({total:e,cap:t}){const n=[];for(let a=0;a<t.crashed;a++)n.push("crashed");for(let a=0;a<t.stuck;a++)n.push("stuck");for(let a=0;a<t.starting;a++)n.push("starting");for(let a=0;a<t.running;a++)n.push("running");for(let a=0;a<t.idle;a++)n.push("idle");return m.jsxs("div",{className:"flex gap-1 items-center",children:[n.map((a,s)=>m.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-[var(--color-text)]",style:{background:RR(a)},title:a},s)),m.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] ml-2 font-[family-name:var(--font-mono)]",children:[e," slot",e!==1?"s":""]})]})}function RR(e){switch(e){case"running":return"var(--color-running-bg)";case"starting":return"var(--color-secondary)";case"stuck":return"var(--color-stuck-bg)";case"crashed":return"var(--color-crashed-bg)";default:return"var(--color-idle-bg)"}}function MR({worker:e,onChange:t}){const{confirm:n,alert:a}=qn(),s=e.state==="crashed"||e.state==="stuck";return m.jsxs("div",{className:"flex flex-col h-full",children:[m.jsxs("div",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] flex items-center gap-2",children:[m.jsx(dg,{state:e.state}),m.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold truncate",children:[e.project,"/worker-",e.slot]})]}),m.jsxs("div",{className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[e.card?m.jsxs("div",{children:[m.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1",children:"当前卡片"}),m.jsxs("div",{className:"text-sm font-semibold break-words",children:["#",e.card.seq," · ",e.card.title]})]}):m.jsx("div",{className:"text-sm text-[var(--color-text-muted)] italic",children:"slot 空闲,没有当前卡片。"}),m.jsxs("dl",{className:"grid grid-cols-[100px_1fr] gap-y-2 text-sm",children:[m.jsx("dt",{className:"font-bold",children:"Stage"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.stage??"—"}),m.jsx("dt",{className:"font-bold",children:"PID"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.pid??"—"}),m.jsx("dt",{className:"font-bold",children:"Runtime"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:hg(e.runtimeMs)}),m.jsx("dt",{className:"font-bold",children:"Started"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:e.startedAt?new Date(e.startedAt).toLocaleString():"—"}),m.jsx("dt",{className:"font-bold",children:"Marker"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:e.markerUpdatedAt?mg(e.markerUpdatedAt):"—"})]}),e.lastLogLine&&m.jsxs("div",{children:[m.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 flex items-center gap-1",children:[m.jsx(Qp,{size:10,strokeWidth:2.5}),"最近日志"]}),m.jsxs("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 whitespace-pre-wrap break-words",children:[e.lastLogLine.ts&&m.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[e.lastLogLine.ts,`
474
+ `]}),e.lastLogLine.msg]}),m.jsx(ji,{to:`/logs?project=${encodeURIComponent(e.project)}&worker=${e.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:"查看完整 log →"})]})]}),m.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] flex gap-2 justify-end flex-wrap",children:[m.jsx(ji,{to:`/board?project=${encodeURIComponent(e.project)}${e.card?`&card=${e.card.seq}`:""}`,className:"nb-btn",style:{padding:"4px 10px",fontSize:11},children:"看板"}),s&&e.card&&m.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await n({title:`重启 worker-${e.slot}`,body:`先杀进程,再重新 launch 到 #${e.card.seq}`,confirm:"重启"})){try{await Rl(e.project,e.slot)}catch{}try{await fg(e.project,e.slot,e.card.seq),t()}catch(c){a({title:"重启失败",body:c instanceof Error?c.message:String(c)})}}},children:[m.jsx(RA,{size:11,strokeWidth:2.5})," 重启"]}),e.state!=="idle"&&m.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await n({title:`终止 worker-${e.slot}`,body:"当前任务强制中断。",confirm:"终止",danger:!0}))try{await Rl(e.project,e.slot),t()}catch(c){a({title:"终止失败",body:c instanceof Error?c.message:String(c)})}},children:[m.jsx(Yp,{size:11,strokeWidth:2.5})," 终止"]})]})]})}function dg({state:e}){const n={running:{bg:"var(--color-running-bg)",color:"var(--color-running)",label:"running"},starting:{bg:"var(--color-secondary)",color:"var(--color-text)",label:"starting",icon:m.jsx(Zt,{size:9,strokeWidth:3,className:"animate-spin"})},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)",label:"stuck"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)",label:"crashed",icon:m.jsx(NA,{size:9,strokeWidth:2.5})},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)",label:"idle"}}[e];return m.jsxs("span",{className:"nb-status inline-flex items-center gap-1",style:{background:n.bg,color:n.color},children:[n.icon,n.label]})}function hg(e){if(e==null||e<=0)return"—";const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n}h ${a}m`:a>0?`${a}m ${s}s`:`${s}s`}function jR(e){if(e==null||e<=0)return"text-[var(--color-text-muted)]";const t=e/6e4;return t<10?"text-[var(--color-running)]":t<60?"text-[var(--color-stuck)]":"text-[var(--color-crashed)]"}function mg(e){const t=Date.now()-new Date(e).getTime();return t<1e4?`${Math.floor(t/1e3)}s 前`:t<6e4?`${Math.floor(t/1e3)}s 前`:t<36e5?`${Math.floor(t/6e4)}m 前`:`${Math.floor(t/36e5)}h 前`}function DR(e){const t=new URLSearchParams;return e.project&&t.set("project",e.project),e.worker&&t.set("worker",e.worker),t.set("limit",String(e.limit)),e.since&&t.set("since",e.since),Bt(`/api/logs?${t}`)}function LR(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const IR=["error","warn","info","debug"],zR=["error","warn","info"];function BR(){var U,J;const[e,t]=jf(),n=e.get("project"),a=e.get("worker")??"",[s,o]=j.useState([]),[c,f]=j.useState(!1),[d,h]=j.useState(!0),[y,g]=j.useState(()=>new Set(zR)),[x,v]=j.useState(""),[S,_]=j.useState("live"),[N,w]=j.useState(()=>{const C=new Date(Date.now()-36e5),P=Y=>String(Y).padStart(2,"0");return`${C.getFullYear()}-${P(C.getMonth()+1)}-${P(C.getDate())}T${P(C.getHours())}:${P(C.getMinutes())}`}),R=j.useRef(null),A=!n,D=dt({queryKey:["projects"],queryFn:zl}),{data:F,refetch:M}=dt({queryKey:["logs",n??"agg",a,S,S==="history"?N:"live"],queryFn:()=>DR({project:n||void 0,worker:a||void 0,limit:S==="history"?2e3:500,since:S==="history"?new Date(N).toISOString():void 0}),refetchInterval:A&&S==="live"?5e3:!1});j.useEffect(()=>{F!=null&&F.data&&o(F.data)},[F]),j.useEffect(()=>{if(!n||S!=="live")return;const C=LR({project:n,worker:a||void 0}),P=new EventSource(C);return P.addEventListener("log.line",Y=>{if(!c)try{const le=JSON.parse(Y.data);o(H=>{const Q=[...H,le];return Q.length>5e3&&Q.splice(0,Q.length-5e3),Q})}catch{}}),()=>P.close()},[n,a,c,S]),j.useEffect(()=>{if(!d)return;const C=R.current;C&&(C.scrollTop=C.scrollHeight)},[s,d]);const q=j.useMemo(()=>{const C=x.toLowerCase();return s.filter(P=>!(!y.has(P.level)||C&&!P.msg.toLowerCase().includes(C)))},[s,y,x]);return m.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[m.jsxs("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Logs 📜"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[A?`全部项目(${((U=D.data)==null?void 0:U.data.length)??0})`:n,a&&` · worker-${a}`," · ",A&&S==="live"?"5s 轮询":"tail -f"," · ",s.length," lines",c&&m.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:"⏸ PAUSED"})]})]}),m.jsx("div",{className:"flex gap-3 items-center",children:m.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:n??"",onChange:C=>{const P=C.target.value;t(P?{project:P}:{})},"aria-label":"筛选项目",children:[m.jsx("option",{value:"",children:"全部项目"}),(J=D.data)==null?void 0:J.data.map(C=>m.jsx("option",{value:C.name,children:C.name},C.name))]})})]}),m.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[m.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[m.jsxs("button",{type:"button",onClick:()=>_("live"),"aria-pressed":S==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",S==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[m.jsx(e1,{size:11,strokeWidth:2.5}),"实时"]}),m.jsxs("button",{type:"button",onClick:()=>_("history"),"aria-pressed":S==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",S==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[m.jsx(WC,{size:11,strokeWidth:2.5}),"历史"]})]}),S==="history"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:N,onChange:C=>w(C.target.value),"aria-label":"查询起始时间"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>M(),type:"button","aria-label":"查询",children:[m.jsx(xf,{size:11,strokeWidth:3}),"查询"]})]}),m.jsxs("div",{className:"relative flex-1 max-w-md",children:[m.jsx(xf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),m.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"过滤关键字…",value:x,onChange:C=>v(C.target.value),"aria-label":"过滤日志"})]}),m.jsx("div",{className:"flex items-center gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:IR.map(C=>m.jsx(UR,{level:C,enabled:y.has(C),onToggle:()=>{g(P=>{const Y=new Set(P);return Y.has(C)?Y.delete(C):Y.add(C),Y})}},C))}),m.jsxs("div",{className:"ml-auto flex gap-2",children:[S==="live"&&m.jsxs(m.Fragment,{children:[m.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>h(C=>!C),type:"button",children:d?"✓ Auto-scroll":"Auto-scroll"}),m.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(C=>!C),type:"button",children:c?m.jsxs(m.Fragment,{children:[m.jsx(Gp,{size:12,strokeWidth:3})," Resume"]}):m.jsxs(m.Fragment,{children:[m.jsx(dA,{size:12,strokeWidth:3})," Pause"]})})]}),m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const C=new Blob([q.map(le=>le.raw).join(`
475
+ `)],{type:"text/plain"}),P=URL.createObjectURL(C),Y=document.createElement("a");Y.href=P,Y.download=`${n}-log-${Date.now()}.log`,Y.click(),URL.revokeObjectURL(P)},type:"button",children:[m.jsx(JE,{size:12,strokeWidth:2.5})," Export"]})]})]}),m.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[m.jsxs("div",{className:"px-4 py-2 bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)] flex items-center justify-between font-[family-name:var(--font-mono)] text-xs",children:[m.jsx("span",{className:"text-[var(--color-text-muted)]",children:(F==null?void 0:F.file)??"~/.coral/projects/.../logs/*.log"}),S==="live"?m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):m.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),m.jsxs("div",{ref:R,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:C=>{const P=C.currentTarget;!(P.scrollHeight-P.scrollTop-P.clientHeight<40)&&d&&h(!1)},children:[q.map((C,P)=>m.jsx($R,{line:C},P)),q.length===0&&m.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"没有匹配的日志"})]})]})]})}function UR({level:e,enabled:t,onToggle:n}){const a={error:"var(--color-crashed-bg)",warn:"var(--color-stuck-bg)",info:"var(--color-secondary)",debug:"var(--color-accent-purple)"},s={error:"var(--color-crashed)",warn:"var(--color-stuck)",info:"var(--color-text)",debug:"var(--color-text)"};return m.jsx("button",{type:"button",onClick:n,"aria-pressed":t,className:["px-3 py-0.5 rounded-full font-[family-name:var(--font-mono)] text-[10px] font-bold tracking-widest cursor-pointer",t?"border-[1.5px] border-[var(--color-text)]":"text-[var(--color-text-subtle)]"].join(" "),style:t?{background:a[e],color:s[e]}:{},children:e.toUpperCase()})}function $R({line:e}){var a;const t={error:"bg-[var(--color-crashed)] text-[var(--color-text)]",warn:"bg-[var(--color-stuck)] text-[var(--color-text)]",info:"bg-[var(--color-secondary)] text-[var(--color-text)]",debug:"",trace:""},n=!!e.project;return m.jsxs("div",{className:["grid gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",n?"grid-cols-[100px_90px_60px_1fr]":"grid-cols-[100px_60px_1fr]"].join(" "),children:[m.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((a=e.ts.split("T")[1])==null?void 0:a.replace("Z",""))??e.ts:"--"}),n&&m.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),m.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),m.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function FR(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const PR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HR={};function a0(e,t){return(HR.jsx?qR:PR).test(e)}const KR=/[ \t\n\f\r]/g;function GR(e){return typeof e=="object"?e.type==="text"?r0(e.value):!1:r0(e)}function r0(e){return e.replace(KR,"")===""}class Sc{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}Sc.prototype.normal={};Sc.prototype.property={};Sc.prototype.space=void 0;function fS(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new Sc(n,a,t)}function hp(e){return e.toLowerCase()}class Hn{constructor(t,n){this.attribute=n,this.property=t}}Hn.prototype.attribute="";Hn.prototype.booleanish=!1;Hn.prototype.boolean=!1;Hn.prototype.commaOrSpaceSeparated=!1;Hn.prototype.commaSeparated=!1;Hn.prototype.defined=!1;Hn.prototype.mustUseProperty=!1;Hn.prototype.number=!1;Hn.prototype.overloadedBoolean=!1;Hn.prototype.property="";Hn.prototype.spaceSeparated=!1;Hn.prototype.space=void 0;let QR=0;const $e=gs(),Xt=gs(),mp=gs(),ue=gs(),St=gs(),gl=gs(),ni=gs();function gs(){return 2**++QR}const pp=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Xt,commaOrSpaceSeparated:ni,commaSeparated:gl,number:ue,overloadedBoolean:mp,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),_m=Object.keys(pp);class pg extends Hn{constructor(t,n,a,s){let o=-1;if(super(t,n),s0(this,"space",s),typeof a=="number")for(;++o<_m.length;){const c=_m[o];s0(this,_m[o],(a&pp[c])===pp[c])}}}pg.prototype.defined=!0;function s0(e,t,n){n&&(e[t]=n)}function Kl(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new pg(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[hp(a)]=a,n[hp(o.attribute)]=a}return new Sc(t,n,e.space)}const dS=Kl({properties:{ariaActiveDescendant:null,ariaAtomic:Xt,ariaAutoComplete:null,ariaBusy:Xt,ariaChecked:Xt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:St,ariaCurrent:null,ariaDescribedBy:St,ariaDetails:null,ariaDisabled:Xt,ariaDropEffect:St,ariaErrorMessage:null,ariaExpanded:Xt,ariaFlowTo:St,ariaGrabbed:Xt,ariaHasPopup:null,ariaHidden:Xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:St,ariaLevel:ue,ariaLive:null,ariaModal:Xt,ariaMultiLine:Xt,ariaMultiSelectable:Xt,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:Xt,ariaReadOnly:Xt,ariaRelevant:null,ariaRequired:Xt,ariaRoleDescription:St,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:Xt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hS(e,t){return t in e?e[t]:t}function mS(e,t){return hS(e,t.toLowerCase())}const YR=Kl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gl,acceptCharset:St,accessKey:St,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:St,autoFocus:$e,autoPlay:$e,blocking:St,capture:null,charSet:null,checked:$e,cite:null,className:St,cols:ue,colSpan:null,content:null,contentEditable:Xt,controls:$e,controlsList:St,coords:ue|gl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:mp,draggable:Xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:St,height:ue,hidden:mp,high:ue,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:St,itemRef:St,itemScope:$e,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,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:$e,optimum:ue,pattern:null,ping:St,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:St,required:$e,reversed:$e,rows:ue,rowSpan:ue,sandbox:St,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:Xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Xt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:Xt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:mS}),VR=Kl({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",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:ni,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:St,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:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,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:gl,g2:gl,glyphName:gl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:ni,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ni,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ni,rev:ni,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ni,requiredFeatures:ni,requiredFonts:ni,requiredFormats:ni,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:ni,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ni,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ni,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hS}),pS=Kl({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()}}),gS=Kl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mS}),bS=Kl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),XR={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"},ZR=/[A-Z]/g,l0=/-[a-z]/g,WR=/^data[-\w.:]+$/i;function JR(e,t){const n=hp(t);let a=t,s=Hn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&WR.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(l0,tM);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!l0.test(o)){let c=o.replace(ZR,eM);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=pg}return new s(a,t)}function eM(e){return"-"+e.toLowerCase()}function tM(e){return e.charAt(1).toUpperCase()}const nM=fS([dS,YR,pS,gS,bS],"html"),gg=fS([dS,VR,pS,gS,bS],"svg");function iM(e){return e.join(" ").trim()}var rl={},wm,o0;function aM(){if(o0)return wm;o0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
476
+ `,h="/",y="*",g="",x="comment",v="declaration";function S(N,w){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];w=w||{};var R=1,A=1;function D(H){var Q=H.match(t);Q&&(R+=Q.length);var G=H.lastIndexOf(d);A=~G?H.length-G:A+H.length}function F(){var H={line:R,column:A};return function(Q){return Q.position=new M(H),J(),Q}}function M(H){this.start=H,this.end={line:R,column:A},this.source=w.source}M.prototype.content=N;function q(H){var Q=new Error(w.source+":"+R+":"+A+": "+H);if(Q.reason=H,Q.filename=w.source,Q.line=R,Q.column=A,Q.source=N,!w.silent)throw Q}function U(H){var Q=H.exec(N);if(Q){var G=Q[0];return D(G),N=N.slice(G.length),Q}}function J(){U(n)}function C(H){var Q;for(H=H||[];Q=P();)Q!==!1&&H.push(Q);return H}function P(){var H=F();if(!(h!=N.charAt(0)||y!=N.charAt(1))){for(var Q=2;g!=N.charAt(Q)&&(y!=N.charAt(Q)||h!=N.charAt(Q+1));)++Q;if(Q+=2,g===N.charAt(Q-1))return q("End of comment missing");var G=N.slice(2,Q-2);return A+=2,D(G),N=N.slice(Q),A+=2,H({type:x,comment:G})}}function Y(){var H=F(),Q=U(a);if(Q){if(P(),!U(s))return q("property missing ':'");var G=U(o),oe=H({type:v,property:_(Q[0].replace(e,g)),value:G?_(G[0].replace(e,g)):g});return U(c),oe}}function le(){var H=[];C(H);for(var Q;Q=Y();)Q!==!1&&(H.push(Q),C(H));return H}return J(),le()}function _(N){return N?N.replace(f,g):g}return wm=S,wm}var c0;function rM(){if(c0)return rl;c0=1;var e=rl&&rl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(rl,"__esModule",{value:!0}),rl.default=n;const t=e(aM());function n(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),f=typeof s=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:y}=d;f?s(h,y,d):y&&(o=o||{},o[h]=y)}),o}return rl}var Go={},u0;function sM(){if(u0)return Go;u0=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},c=function(h,y){return y.toUpperCase()},f=function(h,y){return"".concat(y,"-")},d=function(h,y){return y===void 0&&(y={}),o(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(s,f):h=h.replace(a,f),h.replace(t,c))};return Go.camelCase=d,Go}var Qo,f0;function lM(){if(f0)return Qo;f0=1;var e=Qo&&Qo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(rM()),n=sM();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(f,d){f&&d&&(c[(0,n.camelCase)(f,o)]=d)}),c}return a.default=a,Qo=a,Qo}var oM=lM();const cM=kp(oM),yS=xS("end"),bg=xS("start");function xS(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function uM(e){const t=bg(e),n=yS(e);if(t&&n)return{start:t,end:n}}function ec(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?d0(e.position):"start"in e||"end"in e?d0(e):"line"in e||"column"in e?gp(e):""}function gp(e){return h0(e&&e.line)+":"+h0(e&&e.column)}function d0(e){return gp(e&&e.start)+"-"+gp(e&&e.end)}function h0(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",o={},c=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const d=a.indexOf(":");d===-1?o.ruleId=a:(o.source=a.slice(0,d),o.ruleId=a.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=ec(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="";bn.prototype.name="";bn.prototype.reason="";bn.prototype.message="";bn.prototype.stack="";bn.prototype.column=void 0;bn.prototype.line=void 0;bn.prototype.ancestors=void 0;bn.prototype.cause=void 0;bn.prototype.fatal=void 0;bn.prototype.place=void 0;bn.prototype.ruleId=void 0;bn.prototype.source=void 0;const yg={}.hasOwnProperty,fM=new Map,dM=/[A-Z]/g,hM=new Set(["table","tbody","thead","tfoot","tr"]),mM=new Set(["td","th"]),vS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pM(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=_M(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=SM(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?gg:nM,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=ES(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function ES(e,t,n){if(t.type==="element")return gM(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return bM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xM(e,t,n);if(t.type==="mdxjsEsm")return yM(e,t);if(t.type==="root")return vM(e,t,n);if(t.type==="text")return EM(e,t)}function gM(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=gg,e.schema=s),e.ancestors.push(t);const o=_S(e,t.tagName,!1),c=wM(e,t);let f=vg(e,t);return hM.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!GR(d):!0})),SS(e,c,o,t),xg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function bM(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}cc(e,t.position)}function yM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cc(e,t.position)}function xM(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=gg,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:_S(e,t.name,!0),c=NM(e,t),f=vg(e,t);return SS(e,c,o,t),xg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function vM(e,t,n){const a={};return xg(a,vg(e,t)),e.create(t,e.Fragment,a,n)}function EM(e,t){return t.value}function SS(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function xg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function SM(e,t,n){return a;function a(s,o,c,f){const h=Array.isArray(c.children)?n:t;return f?h(o,c,f):h(o,c)}}function _M(e,t){return n;function n(a,s,o,c){const f=Array.isArray(o.children),d=bg(a);return t(s,o,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function wM(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&yg.call(t.properties,s)){const o=kM(e,s,t.properties[s]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&mM.has(t.tagName)?a=f:n[c]=f}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function NM(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else cc(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else cc(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function vg(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:fM;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=s.get(d)||0;c=d+"-"+h,s.set(d,h+1)}}const f=ES(e,o,c);f!==void 0&&n.push(f)}return n}function kM(e,t,n){const a=JR(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?FR(n):iM(n)),a.property==="style"){let s=typeof n=="object"?n:TM(e,String(n));return e.stylePropertyNameCase==="css"&&(s=CM(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?XR[a.property]||a.property:a.attribute,n]}}function TM(e,t){try{return cM(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=vS+"#cannot-parse-style-attribute",s}}function _S(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,c;for(;++o<s.length;){const f=a0(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}a=c}else a=a0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return yg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);cc(e)}function cc(e,t){const n=new bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=vS+"#cannot-handle-mdx-estrees-without-createevaluater",n}function CM(e){const t={};let n;for(n in e)yg.call(e,n)&&(t[AM(n)]=e[n]);return t}function AM(e){let t=e.replace(dM,OM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function OM(e){return"-"+e.toLowerCase()}const Nm={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"]},RM={};function Eg(e,t){const n=RM,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return wS(e,a,s)}function wS(e,t,n){if(MM(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return m0(e.children,t,n)}return Array.isArray(e)?m0(e,t,n):""}function m0(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=wS(e[s],t,n);return a.join("")}function MM(e){return!!(e&&typeof e=="object")}const p0=document.createElement("i");function Sg(e){const t="&"+e+";";p0.innerHTML=t;const n=p0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ri(e,t,n,a){const s=e.length;let o=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)c=Array.from(a),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function xi(e,t){return e.length>0?(ri(e,e.length,0,t),e):t}const g0={}.hasOwnProperty;function NS(e){const t={};let n=-1;for(;++n<e.length;)jM(t,e[n]);return t}function jM(e,t){let n;for(n in t){const s=(g0.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){g0.call(s,c)||(s[c]=[]);const f=o[c];DM(s[c],Array.isArray(f)?f:f?[f]:[])}}}function DM(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);ri(e,0,0,a)}function kS(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn=Nr(/[A-Za-z]/),pn=Nr(/[\dA-Za-z]/),LM=Nr(/[#-'*+\--9=?A-Z^-~]/);function wf(e){return e!==null&&(e<32||e===127)}const bp=Nr(/\d/),IM=Nr(/[\dA-Fa-f]/),zM=Nr(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function xt(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Zf=Nr(new RegExp("\\p{P}|\\p{S}","u")),ds=Nr(/\s/);function Nr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Gl(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let c="";if(o===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(n+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),s=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+s+1,c=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function Je(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(d){return Ge(d)?(e.enter(n),f(d)):t(d)}function f(d){return Ge(d)&&o++<s?(e.consume(d),f):(e.exit(n),t(d))}}const BM={tokenize:UM};function UM(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Je(e,t,"linePrefix")}function s(f){return e.enter("paragraph"),o(f)}function o(f){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Te(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const $M={tokenize:FM},b0={tokenize:PM};function FM(e){const t=this,n=[];let a=0,s,o,c;return f;function f(A){if(a<n.length){const D=n[a];return t.containerState=D[1],e.attempt(D[0].continuation,d,h)(A)}return h(A)}function d(A){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const D=t.events.length;let F=D,M;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){M=t.events[F][1].end;break}w(a);let q=D;for(;q<t.events.length;)t.events[q][1].end={...M},q++;return ri(t.events,F+1,0,t.events.slice(D)),t.events.length=q,h(A)}return f(A)}function h(A){if(a===n.length){if(!s)return x(A);if(s.currentConstruct&&s.currentConstruct.concrete)return S(A);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(b0,y,g)(A)}function y(A){return s&&R(),w(a),x(A)}function g(A){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,S(A)}function x(A){return t.containerState={},e.attempt(b0,v,S)(A)}function v(A){return a++,n.push([t.currentConstruct,t.containerState]),x(A)}function S(A){if(A===null){s&&R(),w(0),e.consume(A);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),_(A)}function _(A){if(A===null){N(e.exit("chunkFlow"),!0),w(0),e.consume(A);return}return Te(A)?(e.consume(A),N(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(A),_)}function N(A,D){const F=t.sliceStream(A);if(D&&F.push(null),A.previous=o,o&&(o.next=A),o=A,s.defineSkip(A.start),s.write(F),t.parser.lazy[A.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<c&&(!s.events[M][1].end||s.events[M][1].end.offset>c))return;const q=t.events.length;let U=q,J,C;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(J){C=t.events[U][1].end;break}J=!0}for(w(a),M=q;M<t.events.length;)t.events[M][1].end={...C},M++;ri(t.events,U+1,0,t.events.slice(q)),t.events.length=M}}function w(A){let D=n.length;for(;D-- >A;){const F=n[D];t.containerState=F[1],F[0].exit.call(t,e)}n.length=A}function R(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function PM(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ml(e){if(e===null||xt(e)||ds(e))return 1;if(Zf(e))return 2}function Wf(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!a.includes(o)&&(t=o(t,n),a.push(o))}return t}const yp={name:"attention",resolveAll:qM,tokenize:HM};function qM(e,t){let n=-1,a,s,o,c,f,d,h,y;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[a][1].end},x={...e[n][1].start};y0(g,-d),y0(x,d),c={type:d>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:d>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[n][1].start={...f.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=xi(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=xi(h,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),h=xi(h,Wf(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=xi(h,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(y=2,h=xi(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):y=0,ri(e,a-1,n-a+3,h),n=a+h.length-y-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function HM(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Ml(a);let o;return c;function c(d){return o=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===o)return e.consume(d),f;const h=e.exit("attentionSequence"),y=Ml(d),g=!y||y===2&&s||n.includes(d),x=!s||s===2&&y||n.includes(a);return h._open=!!(o===42?g:g&&(s||!x)),h._close=!!(o===42?x:x&&(y||!g)),t(d)}}function y0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const KM={name:"autolink",tokenize:GM};function GM(e,t,n){let a=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return kn(v)?(e.consume(v),c):v===64?n(v):h(v)}function c(v){return v===43||v===45||v===46||pn(v)?(a=1,f(v)):h(v)}function f(v){return v===58?(e.consume(v),a=0,d):(v===43||v===45||v===46||pn(v))&&a++<32?(e.consume(v),f):(a=0,h(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||wf(v)?n(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),y):LM(v)?(e.consume(v),h):n(v)}function y(v){return pn(v)?g(v):n(v)}function g(v){return v===46?(e.consume(v),a=0,y):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):x(v)}function x(v){if((v===45||pn(v))&&a++<63){const S=v===45?x:g;return e.consume(v),S}return n(v)}}const _c={partial:!0,tokenize:QM};function QM(e,t,n){return a;function a(o){return Ge(o)?Je(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||Te(o)?t(o):n(o)}}const TS={continuation:{tokenize:VM},exit:XM,name:"blockQuote",tokenize:YM};function YM(e,t,n){const a=this;return s;function s(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return n(c)}function o(c){return Ge(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function VM(e,t,n){const a=this;return s;function s(c){return Ge(c)?Je(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(TS,t,n)(c)}}function XM(e){e.exit("blockQuote")}const CS={name:"characterEscape",tokenize:ZM};function ZM(e,t,n){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return zM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const AS={name:"characterReference",tokenize:WM};function WM(e,t,n){const a=this;let s=0,o,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,c=pn,y(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=IM,y):(e.enter("characterReferenceValue"),o=7,c=bp,y(g))}function y(g){if(g===59&&s){const x=e.exit("characterReferenceValue");return c===pn&&!Sg(a.sliceSerialize(x))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&s++<o?(e.consume(g),y):n(g)}}const x0={partial:!0,tokenize:ej},v0={concrete:!0,name:"codeFenced",tokenize:JM};function JM(e,t,n){const a=this,s={partial:!0,tokenize:F};let o=0,c=0,f;return d;function d(M){return h(M)}function h(M){const q=a.events[a.events.length-1];return o=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(M)}function y(M){return M===f?(c++,e.consume(M),y):c<3?n(M):(e.exit("codeFencedFenceSequence"),Ge(M)?Je(e,g,"whitespace")(M):g(M))}function g(M){return M===null||Te(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(x0,_,D)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(M))}function x(M){return M===null||Te(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Ge(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,v,"whitespace")(M)):M===96&&M===f?n(M):(e.consume(M),x)}function v(M){return M===null||Te(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(M))}function S(M){return M===null||Te(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===f?n(M):(e.consume(M),S)}function _(M){return e.attempt(s,D,N)(M)}function N(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),w}function w(M){return o>0&&Ge(M)?Je(e,R,"linePrefix",o+1)(M):R(M)}function R(M){return M===null||Te(M)?e.check(x0,_,D)(M):(e.enter("codeFlowValue"),A(M))}function A(M){return M===null||Te(M)?(e.exit("codeFlowValue"),R(M)):(e.consume(M),A)}function D(M){return e.exit("codeFenced"),t(M)}function F(M,q,U){let J=0;return C;function C(Q){return M.enter("lineEnding"),M.consume(Q),M.exit("lineEnding"),P}function P(Q){return M.enter("codeFencedFence"),Ge(Q)?Je(M,Y,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):Y(Q)}function Y(Q){return Q===f?(M.enter("codeFencedFenceSequence"),le(Q)):U(Q)}function le(Q){return Q===f?(J++,M.consume(Q),le):J>=c?(M.exit("codeFencedFenceSequence"),Ge(Q)?Je(M,H,"whitespace")(Q):H(Q)):U(Q)}function H(Q){return Q===null||Te(Q)?(M.exit("codeFencedFence"),q(Q)):U(Q)}}}function ej(e,t,n){const a=this;return s;function s(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const km={name:"codeIndented",tokenize:nj},tj={partial:!0,tokenize:ij};function nj(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),Je(e,o,"linePrefix",5)(h)}function o(h){const y=a.events[a.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(h):n(h)}function c(h){return h===null?d(h):Te(h)?e.attempt(tj,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Te(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function ij(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):Je(e,o,"linePrefix",5)(c)}function o(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Te(c)?s(c):n(c)}}const aj={name:"codeText",previous:sj,resolve:rj,tokenize:lj};function rj(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function sj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function lj(e,t,n){let a=0,s,o;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(o=e.enter("codeTextSequence"),s=0,y(g)):Te(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Te(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function y(g){return g===96?(e.consume(g),s++,y):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(o.type="codeTextData",h(g))}}class oj{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Yo(this.left,a),o.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),Yo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Yo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Yo(this.left,n.reverse())}}}function Yo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function OS(e){const t={};let n=-1,a,s,o,c,f,d,h;const y=new oj(e);for(;++n<y.length;){for(;n in t;)n=t[n];if(a=y.get(n),n&&a[1].type==="chunkFlow"&&y.get(n-1)[1].type==="listItemPrefix"&&(d=a[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,cj(y,n)),n=t[n],h=!0);else if(a[1]._container){for(o=n,s=void 0;o--;)if(c=y.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(y.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...y.get(s)[1].start},f=y.slice(s,n),f.unshift(a),y.splice(s,n-s+1,f))}}return ri(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function cj(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const o=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],h={};let y,g,x=-1,v=n,S=0,_=0;const N=[_];for(;v;){for(;e.get(++s)[1]!==v;);o.push(s),v._tokenizer||(y=a.sliceStream(v),v.next||y.push(null),g&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=v,v=v.next}for(v=n;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(_=x+1,N.push(_),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):N.pop(),x=N.length;x--;){const w=f.slice(N[x],N[x+1]),R=o.pop();d.push([R,R+w.length-1]),e.splice(R,2,w)}for(d.reverse(),x=-1;++x<d.length;)h[S+d[x][0]]=S+d[x][1],S+=d[x][1]-d[x][0]-1;return h}const uj={resolve:dj,tokenize:hj},fj={partial:!0,tokenize:mj};function dj(e){return OS(e),e}function hj(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?o(f):Te(f)?e.check(fj,c,o)(f):(e.consume(f),s)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function mj(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Je(e,o,"linePrefix")}function o(c){if(c===null||Te(c))return n(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function RS(e,t,n,a,s,o,c,f,d){const h=d||Number.POSITIVE_INFINITY;let y=0;return g;function g(w){return w===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(w),e.exit(o),x):w===null||w===32||w===41||wf(w)?n(w):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),_(w))}function x(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(w))}function v(w){return w===62?(e.exit("chunkString"),e.exit(f),x(w)):w===null||w===60||Te(w)?n(w):(e.consume(w),w===92?S:v)}function S(w){return w===60||w===62||w===92?(e.consume(w),v):v(w)}function _(w){return!y&&(w===null||w===41||xt(w))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(w)):y<h&&w===40?(e.consume(w),y++,_):w===41?(e.consume(w),y--,_):w===null||w===32||w===40||wf(w)?n(w):(e.consume(w),w===92?N:_)}function N(w){return w===40||w===41||w===92?(e.consume(w),_):_(w)}}function MS(e,t,n,a,s,o){const c=this;let f=0,d;return h;function h(v){return e.enter(a),e.enter(s),e.consume(v),e.exit(s),e.enter(o),y}function y(v){return f>999||v===null||v===91||v===93&&!d||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?n(v):v===93?(e.exit(o),e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):Te(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||Te(v)||f++>999?(e.exit("chunkString"),y(v)):(e.consume(v),d||(d=!Ge(v)),v===92?x:g)}function x(v){return v===91||v===92||v===93?(e.consume(v),f++,g):g(v)}}function jS(e,t,n,a,s,o){let c;return f;function f(x){return x===34||x===39||x===40?(e.enter(a),e.enter(s),e.consume(x),e.exit(s),c=x===40?41:x,d):n(x)}function d(x){return x===c?(e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):(e.enter(o),h(x))}function h(x){return x===c?(e.exit(o),d(c)):x===null?n(x):Te(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===c||x===null||Te(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?g:y)}function g(x){return x===c||x===92?(e.consume(x),y):y(x)}}function tc(e,t){let n;return a;function a(s){return Te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Ge(s)?Je(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const pj={name:"definition",tokenize:bj},gj={partial:!0,tokenize:yj};function bj(e,t,n){const a=this;let s;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return MS.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return s=Mi(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return xt(v)?tc(e,h)(v):h(v)}function h(v){return RS(e,y,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return e.attempt(gj,g,g)(v)}function g(v){return Ge(v)?Je(e,x,"whitespace")(v):x(v)}function x(v){return v===null||Te(v)?(e.exit("definition"),a.parser.defined.push(s),t(v)):n(v)}}function yj(e,t,n){return a;function a(f){return xt(f)?tc(e,s)(f):n(f)}function s(f){return jS(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return Ge(f)?Je(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Te(f)?t(f):n(f)}}const xj={name:"hardBreakEscape",tokenize:vj};function vj(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Te(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Ej={name:"headingAtx",resolve:Sj,tokenize:_j};function Sj(e,t){let n=e.length-2,a=3,s,o;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},o={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},ri(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function _j(e,t,n){let a=0;return s;function s(y){return e.enter("atxHeading"),o(y)}function o(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&a++<6?(e.consume(y),c):y===null||xt(y)?(e.exit("atxHeadingSequence"),f(y)):n(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),d(y)):y===null||Te(y)?(e.exit("atxHeading"),t(y)):Ge(y)?Je(e,f,"whitespace")(y):(e.enter("atxHeadingText"),h(y))}function d(y){return y===35?(e.consume(y),d):(e.exit("atxHeadingSequence"),f(y))}function h(y){return y===null||y===35||xt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),h)}}const wj=["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"],E0=["pre","script","style","textarea"],Nj={concrete:!0,name:"htmlFlow",resolveTo:Cj,tokenize:Aj},kj={partial:!0,tokenize:Rj},Tj={partial:!0,tokenize:Oj};function Cj(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 Aj(e,t,n){const a=this;let s,o,c,f,d;return h;function h(T){return y(T)}function y(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),g}function g(T){return T===33?(e.consume(T),x):T===47?(e.consume(T),o=!0,_):T===63?(e.consume(T),s=3,a.interrupt?t:O):kn(T)?(e.consume(T),c=String.fromCharCode(T),N):n(T)}function x(T){return T===45?(e.consume(T),s=2,v):T===91?(e.consume(T),s=5,f=0,S):kn(T)?(e.consume(T),s=4,a.interrupt?t:O):n(T)}function v(T){return T===45?(e.consume(T),a.interrupt?t:O):n(T)}function S(T){const he="CDATA[";return T===he.charCodeAt(f++)?(e.consume(T),f===he.length?a.interrupt?t:Y:S):n(T)}function _(T){return kn(T)?(e.consume(T),c=String.fromCharCode(T),N):n(T)}function N(T){if(T===null||T===47||T===62||xt(T)){const he=T===47,Ne=c.toLowerCase();return!he&&!o&&E0.includes(Ne)?(s=1,a.interrupt?t(T):Y(T)):wj.includes(c.toLowerCase())?(s=6,he?(e.consume(T),w):a.interrupt?t(T):Y(T)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(T):o?R(T):A(T))}return T===45||pn(T)?(e.consume(T),c+=String.fromCharCode(T),N):n(T)}function w(T){return T===62?(e.consume(T),a.interrupt?t:Y):n(T)}function R(T){return Ge(T)?(e.consume(T),R):C(T)}function A(T){return T===47?(e.consume(T),C):T===58||T===95||kn(T)?(e.consume(T),D):Ge(T)?(e.consume(T),A):C(T)}function D(T){return T===45||T===46||T===58||T===95||pn(T)?(e.consume(T),D):F(T)}function F(T){return T===61?(e.consume(T),M):Ge(T)?(e.consume(T),F):A(T)}function M(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),d=T,q):Ge(T)?(e.consume(T),M):U(T)}function q(T){return T===d?(e.consume(T),d=null,J):T===null||Te(T)?n(T):(e.consume(T),q)}function U(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||xt(T)?F(T):(e.consume(T),U)}function J(T){return T===47||T===62||Ge(T)?A(T):n(T)}function C(T){return T===62?(e.consume(T),P):n(T)}function P(T){return T===null||Te(T)?Y(T):Ge(T)?(e.consume(T),P):n(T)}function Y(T){return T===45&&s===2?(e.consume(T),G):T===60&&s===1?(e.consume(T),oe):T===62&&s===4?(e.consume(T),L):T===63&&s===3?(e.consume(T),O):T===93&&s===5?(e.consume(T),pe):Te(T)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(kj,te,le)(T)):T===null||Te(T)?(e.exit("htmlFlowData"),le(T)):(e.consume(T),Y)}function le(T){return e.check(Tj,H,te)(T)}function H(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Q}function Q(T){return T===null||Te(T)?le(T):(e.enter("htmlFlowData"),Y(T))}function G(T){return T===45?(e.consume(T),O):Y(T)}function oe(T){return T===47?(e.consume(T),c="",Z):Y(T)}function Z(T){if(T===62){const he=c.toLowerCase();return E0.includes(he)?(e.consume(T),L):Y(T)}return kn(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),Z):Y(T)}function pe(T){return T===93?(e.consume(T),O):Y(T)}function O(T){return T===62?(e.consume(T),L):T===45&&s===2?(e.consume(T),O):Y(T)}function L(T){return T===null||Te(T)?(e.exit("htmlFlowData"),te(T)):(e.consume(T),L)}function te(T){return e.exit("htmlFlow"),t(T)}}function Oj(e,t,n){const a=this;return s;function s(c){return Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):n(c)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function Rj(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(_c,t,n)}}const Mj={name:"htmlText",tokenize:jj};function jj(e,t,n){const a=this;let s,o,c;return f;function f(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),F):O===63?(e.consume(O),A):kn(O)?(e.consume(O),U):n(O)}function h(O){return O===45?(e.consume(O),y):O===91?(e.consume(O),o=0,S):kn(O)?(e.consume(O),R):n(O)}function y(O){return O===45?(e.consume(O),v):n(O)}function g(O){return O===null?n(O):O===45?(e.consume(O),x):Te(O)?(c=g,oe(O)):(e.consume(O),g)}function x(O){return O===45?(e.consume(O),v):g(O)}function v(O){return O===62?G(O):O===45?x(O):g(O)}function S(O){const L="CDATA[";return O===L.charCodeAt(o++)?(e.consume(O),o===L.length?_:S):n(O)}function _(O){return O===null?n(O):O===93?(e.consume(O),N):Te(O)?(c=_,oe(O)):(e.consume(O),_)}function N(O){return O===93?(e.consume(O),w):_(O)}function w(O){return O===62?G(O):O===93?(e.consume(O),w):_(O)}function R(O){return O===null||O===62?G(O):Te(O)?(c=R,oe(O)):(e.consume(O),R)}function A(O){return O===null?n(O):O===63?(e.consume(O),D):Te(O)?(c=A,oe(O)):(e.consume(O),A)}function D(O){return O===62?G(O):A(O)}function F(O){return kn(O)?(e.consume(O),M):n(O)}function M(O){return O===45||pn(O)?(e.consume(O),M):q(O)}function q(O){return Te(O)?(c=q,oe(O)):Ge(O)?(e.consume(O),q):G(O)}function U(O){return O===45||pn(O)?(e.consume(O),U):O===47||O===62||xt(O)?J(O):n(O)}function J(O){return O===47?(e.consume(O),G):O===58||O===95||kn(O)?(e.consume(O),C):Te(O)?(c=J,oe(O)):Ge(O)?(e.consume(O),J):G(O)}function C(O){return O===45||O===46||O===58||O===95||pn(O)?(e.consume(O),C):P(O)}function P(O){return O===61?(e.consume(O),Y):Te(O)?(c=P,oe(O)):Ge(O)?(e.consume(O),P):J(O)}function Y(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,le):Te(O)?(c=Y,oe(O)):Ge(O)?(e.consume(O),Y):(e.consume(O),H)}function le(O){return O===s?(e.consume(O),s=void 0,Q):O===null?n(O):Te(O)?(c=le,oe(O)):(e.consume(O),le)}function H(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||xt(O)?J(O):(e.consume(O),H)}function Q(O){return O===47||O===62||xt(O)?J(O):n(O)}function G(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function oe(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Z}function Z(O){return Ge(O)?Je(e,pe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):pe(O)}function pe(O){return e.enter("htmlTextData"),c(O)}}const _g={name:"labelEnd",resolveAll:zj,resolveTo:Bj,tokenize:Uj},Dj={tokenize:$j},Lj={tokenize:Fj},Ij={tokenize:Pj};function zj(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&ri(e,0,e.length,n),e}function Bj(e,t){let n=e.length,a=0,s,o,c,f;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=xi(f,e.slice(o+1,o+a+3)),f=xi(f,[["enter",y,t]]),f=xi(f,Wf(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),f=xi(f,[["exit",y,t],e[c-2],e[c-1],["exit",h,t]]),f=xi(f,e.slice(c+1)),f=xi(f,[["exit",d,t]]),ri(e,o,e.length,f),e}function Uj(e,t,n){const a=this;let s=a.events.length,o,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return f;function f(x){return o?o._inactive?g(x):(c=a.parser.defined.includes(Mi(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(Dj,y,c?y:g)(x):x===91?e.attempt(Lj,y,c?h:g)(x):c?y(x):g(x)}function h(x){return e.attempt(Ij,y,g)(x)}function y(x){return t(x)}function g(x){return o._balanced=!0,n(x)}}function $j(e,t,n){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return xt(g)?tc(e,o)(g):o(g)}function o(g){return g===41?y(g):RS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return xt(g)?tc(e,d)(g):y(g)}function f(g){return n(g)}function d(g){return g===34||g===39||g===40?jS(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function h(g){return xt(g)?tc(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function Fj(e,t,n){const a=this;return s;function s(f){return MS.call(a,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return a.parser.defined.includes(Mi(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function Pj(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const qj={name:"labelStartImage",resolveAll:_g.resolveAll,tokenize:Hj};function Hj(e,t,n){const a=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):n(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const Kj={name:"labelStartLink",resolveAll:_g.resolveAll,tokenize:Gj};function Gj(e,t,n){const a=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const Tm={name:"lineEnding",tokenize:Qj};function Qj(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const mf={name:"thematicBreak",tokenize:Yj};function Yj(e,t,n){let a=0,s;return o;function o(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,f(h)}function f(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):a>=3&&(h===null||Te(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),a++,d):(e.exit("thematicBreakSequence"),Ge(h)?Je(e,f,"whitespace")(h):f(h))}}const Bn={continuation:{tokenize:Wj},exit:eD,name:"list",tokenize:Zj},Vj={partial:!0,tokenize:tD},Xj={partial:!0,tokenize:Jj};function Zj(e,t,n){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(v){const S=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:bp(v)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(mf,n,h)(v):h(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return bp(v)&&++c<10?(e.consume(v),d):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(_c,a.interrupt?n:y,e.attempt(Vj,x,g))}function y(v){return a.containerState.initialBlankLine=!0,o++,x(v)}function g(v){return Ge(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):n(v)}function x(v){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function Wj(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(_c,s,o);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Je(e,t,"listItemIndent",a.containerState.size+1)(f)}function o(f){return a.containerState.furtherBlankLines||!Ge(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(Xj,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Je(e,e.attempt(Bn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function Jj(e,t,n){const a=this;return Je(e,s,"listItemIndent",a.containerState.size+1);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):n(o)}}function eD(e){e.exit(this.containerState.type)}function tD(e,t,n){const a=this;return Je(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!Ge(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const S0={name:"setextUnderline",resolveTo:nD,tokenize:iD};function nD(e,t){let n=e.length,a,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function iD(e,t,n){const a=this;let s;return o;function o(h){let y=a.events.length,g;for(;y--;)if(a.events[y][1].type!=="lineEnding"&&a.events[y][1].type!=="linePrefix"&&a.events[y][1].type!=="content"){g=a.events[y][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),s=h,c(h)):n(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===s?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ge(h)?Je(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Te(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const aD={tokenize:rD};function rD(e){const t=this,n=e.attempt(_c,a,e.attempt(this.parser.constructs.flowInitial,s,Je(e,e.attempt(this.parser.constructs.flow,s,e.attempt(uj,s)),"linePrefix")));return n;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sD={resolveAll:LS()},lD=DS("string"),oD=DS("text");function DS(e){return{resolveAll:LS(e==="text"?cD:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,c,f);return c;function c(y){return h(y)?o(y):f(y)}function f(y){if(y===null){n.consume(y);return}return n.enter("data"),n.consume(y),d}function d(y){return h(y)?(n.exit("data"),o(y)):(n.consume(y),d)}function h(y){if(y===null)return!0;const g=s[y];let x=-1;if(g)for(;++x<g.length;){const v=g[x];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function LS(e){return t;function t(n,a){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,a):n}}function cD(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let o=s.length,c=-1,f=0,d;for(;o--;){const h=s[o];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const h={type:n===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const uD={42:Bn,43:Bn,45:Bn,48:Bn,49:Bn,50:Bn,51:Bn,52:Bn,53:Bn,54:Bn,55:Bn,56:Bn,57:Bn,62:TS},fD={91:pj},dD={[-2]:km,[-1]:km,32:km},hD={35:Ej,42:mf,45:[S0,mf],60:Nj,61:S0,95:mf,96:v0,126:v0},mD={38:AS,92:CS},pD={[-5]:Tm,[-4]:Tm,[-3]:Tm,33:qj,38:AS,42:yp,60:[KM,Mj],91:Kj,92:[xj,CS],93:_g,95:yp,96:aj},gD={null:[yp,sD]},bD={null:[42,95]},yD={null:[]},xD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bD,contentInitial:fD,disable:yD,document:uD,flow:hD,flowInitial:dD,insideSpan:gD,string:mD,text:pD},Symbol.toStringTag,{value:"Module"}));function vD(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let c=[],f=[];const d={attempt:q(F),check:q(M),consume:R,enter:A,exit:D,interrupt:q(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:_,events:[],now:S,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:g};let y=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function g(P){return c=xi(c,P),N(),c[c.length-1]!==null?[]:(U(t,0),h.events=Wf(o,h.events,h),h.events)}function x(P,Y){return SD(v(P),Y)}function v(P){return ED(c,P)}function S(){const{_bufferIndex:P,_index:Y,line:le,column:H,offset:Q}=a;return{_bufferIndex:P,_index:Y,line:le,column:H,offset:Q}}function _(P){s[P.line]=P.column,C()}function N(){let P;for(;a._index<c.length;){const Y=c[a._index];if(typeof Y=="string")for(P=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===P&&a._bufferIndex<Y.length;)w(Y.charCodeAt(a._bufferIndex));else w(Y)}}function w(P){y=y(P)}function R(P){Te(P)?(a.line++,a.column=1,a.offset+=P===-3?2:1,C()):P!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=P}function A(P,Y){const le=Y||{};return le.type=P,le.start=S(),h.events.push(["enter",le,h]),f.push(le),le}function D(P){const Y=f.pop();return Y.end=S(),h.events.push(["exit",Y,h]),Y}function F(P,Y){U(P,Y.from)}function M(P,Y){Y.restore()}function q(P,Y){return le;function le(H,Q,G){let oe,Z,pe,O;return Array.isArray(H)?te(H):"tokenize"in H?te([H]):L(H);function L(ve){return Fe;function Fe(st){const it=st!==null&&ve[st],Wt=st!==null&&ve.null,Kn=[...Array.isArray(it)?it:it?[it]:[],...Array.isArray(Wt)?Wt:Wt?[Wt]:[]];return te(Kn)(st)}}function te(ve){return oe=ve,Z=0,ve.length===0?G:T(ve[Z])}function T(ve){return Fe;function Fe(st){return O=J(),pe=ve,ve.partial||(h.currentConstruct=ve),ve.name&&h.parser.constructs.disable.null.includes(ve.name)?Ne():ve.tokenize.call(Y?Object.assign(Object.create(h),Y):h,d,he,Ne)(st)}}function he(ve){return P(pe,O),Q}function Ne(ve){return O.restore(),++Z<oe.length?T(oe[Z]):G}}}function U(P,Y){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ri(h.events,Y,h.events.length-Y,P.resolve(h.events.slice(Y),h)),P.resolveTo&&(h.events=P.resolveTo(h.events,h))}function J(){const P=S(),Y=h.previous,le=h.currentConstruct,H=h.events.length,Q=Array.from(f);return{from:H,restore:G};function G(){a=P,h.previous=Y,h.currentConstruct=le,h.events.length=H,f=Q,C()}}function C(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function ED(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(a,o)];else{if(c=e.slice(n,s),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function SD(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const o=e[n];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
477
+ `;break}case-3:{c=`\r
478
+ `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,a.push(c)}return a.join("")}function _D(e){const a={constructs:NS([xD,...(e||{}).extensions||[]]),content:s(BM),defined:[],document:s($M),flow:s(aD),lazy:{},string:s(lD),text:s(oD)};return a;function s(o){return c;function c(f){return vD(a,o,f)}}}function wD(e){for(;!OS(e););return e}const _0=/[\0\t\n\r]/g;function ND(){let e=1,t="",n=!0,a;return s;function s(o,c,f){const d=[];let h,y,g,x,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),g=0,t="",n&&(o.charCodeAt(0)===65279&&g++,n=void 0);g<o.length;){if(_0.lastIndex=g,h=_0.exec(o),x=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(x),!h){t=o.slice(g);break}if(v===10&&g===x&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),g<x&&(d.push(o.slice(g,x)),e+=x-g),v){case 0:{d.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,d.push(-2);e++<y;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}g=x+1}return f&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const kD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TD(e){return e.replace(kD,CD)}function CD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return kS(n.slice(o?2:1),o?16:10)}return Sg(n)||e}const IS={}.hasOwnProperty;function AD(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),OD(n)(wD(_D(n).document().write(ND()(e,t,!0))))}function OD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(zi),autolinkProtocol:J,autolinkEmail:J,atxHeading:o(Ii),blockQuote:o(Wt),characterEscape:J,characterReference:J,codeFenced:o(Kn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Kn,c),codeText:o(Ji,c),codeTextData:J,data:J,codeFlowValue:J,definition:o(Ra),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Gn),hardBreakEscape:o(Xe),hardBreakTrailing:o(Xe),htmlFlow:o(wi,c),htmlFlowData:J,htmlText:o(wi,c),htmlTextData:J,image:o(li),label:c,link:o(zi),listItem:o(kr),listItemValue:x,listOrdered:o(ea,g),listUnordered:o(ea),paragraph:o(Ql),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Ii),strong:o(ys),thematicBreak:o(xs)},exit:{atxHeading:d(),atxHeadingSequence:F,autolink:d(),autolinkEmail:it,autolinkProtocol:st,blockQuote:d(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:ve,characterReference:Fe,codeFenced:d(N),codeFencedFence:_,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:C,codeIndented:d(w),codeText:d(Q),codeTextData:C,data:C,definition:d(),definitionDestinationString:D,definitionLabelString:R,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(Y),hardBreakTrailing:d(Y),htmlFlow:d(le),htmlFlowData:C,htmlText:d(H),htmlTextData:C,image:d(oe),label:pe,labelText:Z,lineEnding:P,link:d(G),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:he,resourceDestinationString:O,resourceTitleString:L,resource:te,setextHeading:d(U),setextHeadingLineSequence:q,setextHeadingText:M,strong:d(),thematicBreak:d()}};zS(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ne){let fe={type:"root",children:[]};const Ce={stack:[fe],tokenStack:[],config:t,enter:f,exit:h,buffer:c,resume:y,data:n},Pe=[];let et=-1;for(;++et<ne.length;)if(ne[et][1].type==="listOrdered"||ne[et][1].type==="listUnordered")if(ne[et][0]==="enter")Pe.push(et);else{const yn=Pe.pop();et=s(ne,yn,et)}for(et=-1;++et<ne.length;){const yn=t[ne[et][0]];IS.call(yn,ne[et][1].type)&&yn[ne[et][1].type].call(Object.assign({sliceSerialize:ne[et][2].sliceSerialize},Ce),ne[et][1])}if(Ce.tokenStack.length>0){const yn=Ce.tokenStack[Ce.tokenStack.length-1];(yn[1]||w0).call(Ce,void 0,yn[0])}for(fe.position={start:lr(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:lr(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et<t.transforms.length;)fe=t.transforms[et](fe)||fe;return fe}function s(ne,fe,Ce){let Pe=fe-1,et=-1,yn=!1,Ni,an,Dt,un;for(;++Pe<=Ce;){const lt=ne[Pe];switch(lt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{lt[0]==="enter"?et++:et--,un=void 0;break}case"lineEndingBlank":{lt[0]==="enter"&&(Ni&&!un&&!et&&!Dt&&(Dt=Pe),un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:un=void 0}if(!et&&lt[0]==="enter"&&lt[1].type==="listItemPrefix"||et===-1&&lt[0]==="exit"&&(lt[1].type==="listUnordered"||lt[1].type==="listOrdered")){if(Ni){let Bi=Pe;for(an=void 0;Bi--;){const xn=ne[Bi];if(xn[1].type==="lineEnding"||xn[1].type==="lineEndingBlank"){if(xn[0]==="exit")continue;an&&(ne[an][1].type="lineEndingBlank",yn=!0),xn[1].type="lineEnding",an=Bi}else if(!(xn[1].type==="linePrefix"||xn[1].type==="blockQuotePrefix"||xn[1].type==="blockQuotePrefixWhitespace"||xn[1].type==="blockQuoteMarker"||xn[1].type==="listItemIndent"))break}Dt&&(!an||Dt<an)&&(Ni._spread=!0),Ni.end=Object.assign({},an?ne[an][1].start:lt[1].end),ne.splice(an||Pe,0,["exit",Ni,lt[2]]),Pe++,Ce++}if(lt[1].type==="listItemPrefix"){const Bi={type:"listItem",_spread:!1,start:Object.assign({},lt[1].start),end:void 0};Ni=Bi,ne.splice(Pe,0,["enter",Bi,lt[2]]),Pe++,Ce++,Dt=void 0,un=!0}}}return ne[fe][1]._spread=yn,Ce}function o(ne,fe){return Ce;function Ce(Pe){f.call(this,ne(Pe),Pe),fe&&fe.call(this,Pe)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ne,fe,Ce){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([fe,Ce||void 0]),ne.position={start:lr(fe.start),end:void 0}}function d(ne){return fe;function fe(Ce){ne&&ne.call(this,Ce),h.call(this,Ce)}}function h(ne,fe){const Ce=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==ne.type&&(fe?fe.call(this,ne,Pe[0]):(Pe[1]||w0).call(this,ne,Pe[0]));else throw new Error("Cannot close `"+ne.type+"` ("+ec({start:ne.start,end:ne.end})+"): it’s not open");Ce.position.end=lr(ne.end)}function y(){return Eg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x(ne){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=ne}function S(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=ne}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ne.replace(/(\r?\n|\r)$/g,"")}function R(ne){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Mi(this.sliceSerialize(ne)).toLowerCase()}function A(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ne}function D(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ne}function F(ne){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Ce=this.sliceSerialize(ne).length;fe.depth=Ce}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function q(ne){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function J(ne){const Ce=this.stack[this.stack.length-1].children;let Pe=Ce[Ce.length-1];(!Pe||Pe.type!=="text")&&(Pe=Ot(),Pe.position={start:lr(ne.start),end:void 0},Ce.push(Pe)),this.stack.push(Pe)}function C(ne){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ne),fe.position.end=lr(ne.end)}function P(ne){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=fe.children[fe.children.length-1];Ce.position.end=lr(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(J.call(this,ne),C.call(this,ne))}function Y(){this.data.atHardBreak=!0}function le(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ne}function H(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ne}function Q(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ne}function G(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=fe,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function oe(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=fe,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function Z(ne){const fe=this.sliceSerialize(ne),Ce=this.stack[this.stack.length-2];Ce.label=TD(fe),Ce.identifier=Mi(fe).toLowerCase()}function pe(){const ne=this.stack[this.stack.length-1],fe=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Pe=ne.children;Ce.children=Pe}else Ce.alt=fe}function O(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ne}function L(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ne}function te(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function he(ne){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Mi(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function Ne(ne){this.data.characterReferenceType=ne.type}function ve(ne){const fe=this.sliceSerialize(ne),Ce=this.data.characterReferenceType;let Pe;Ce?(Pe=kS(fe,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=Sg(fe);const et=this.stack[this.stack.length-1];et.value+=Pe}function Fe(ne){const fe=this.stack.pop();fe.position.end=lr(ne.end)}function st(ne){C.call(this,ne);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ne)}function it(ne){C.call(this,ne);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ne)}function Wt(){return{type:"blockquote",children:[]}}function Kn(){return{type:"code",lang:null,meta:null,value:""}}function Ji(){return{type:"inlineCode",value:""}}function Ra(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Gn(){return{type:"emphasis",children:[]}}function Ii(){return{type:"heading",depth:0,children:[]}}function Xe(){return{type:"break"}}function wi(){return{type:"html",value:""}}function li(){return{type:"image",title:null,url:"",alt:null}}function zi(){return{type:"link",title:null,url:"",children:[]}}function ea(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function kr(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function Ql(){return{type:"paragraph",children:[]}}function ys(){return{type:"strong",children:[]}}function Ot(){return{type:"text",value:""}}function xs(){return{type:"thematicBreak"}}}function lr(e){return{line:e.line,column:e.column,offset:e.offset}}function zS(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?zS(e,a):RD(e,a)}}function RD(e,t){let n;for(n in t)if(IS.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function w0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ec({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ec({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ec({start:t.start,end:t.end})+") is still open")}function MD(e){const t=this;t.parser=n;function n(a){return AD(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function jD(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function DD(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
479
+ `}]}function LD(e,t){const n=t.value?t.value+`
480
+ `:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function ID(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zD(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BD(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Gl(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(a,f);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function UD(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $D(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function BS(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function FD(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return BS(e,t);const s={src:Gl(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function PD(e,t){const n={src:Gl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function qD(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function HD(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return BS(e,t);const s={href:Gl(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function KD(e,t){const n={href:Gl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function GD(e,t,n){const a=e.all(t),s=n?QD(n):US(t),o={},c=[];if(typeof t.checked=="boolean"){const y=a[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},a.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:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const y=a[f];(s||f!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
481
+ `}),y.type==="element"&&y.tagName==="p"&&!s?c.push(...y.children):c.push(y)}const d=a[a.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
482
+ `});const h={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,h),e.applyData(t,h)}function QD(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=US(n[a])}return t}function US(e){const t=e.spread;return t??e.children.length>1}function YD(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function VD(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XD(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ZD(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WD(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),s.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=bg(t.children[1]),d=yS(t.children[t.children.length-1]);f&&d&&(c.position={start:f,end:d}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function JD(e,t,n){const a=n?n.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,f=c?c.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const g=t.children[d],x={},v=c?c[d]:void 0;v&&(x.align=v);let S={type:"element",tagName:o,properties:x,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),h.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,y),e.applyData(t,y)}function eL(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const N0=9,k0=32;function tL(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const o=[];for(;a;)o.push(T0(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(T0(t.slice(s),s>0,!1)),o.join("")}function T0(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===N0||o===k0;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===N0||o===k0;)s--,o=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function nL(e,t){const n={type:"text",value:tL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function iL(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const aL={blockquote:jD,break:DD,code:LD,delete:ID,emphasis:zD,footnoteReference:BD,heading:UD,html:$D,imageReference:FD,image:PD,inlineCode:qD,linkReference:HD,link:KD,listItem:GD,list:YD,paragraph:VD,root:XD,strong:ZD,table:WD,tableCell:eL,tableRow:JD,text:nL,thematicBreak:iL,toml:Zu,yaml:Zu,definition:Zu,footnoteDefinition:Zu};function Zu(){}const $S=-1,Jf=0,nc=1,Nf=2,wg=3,Ng=4,kg=5,Tg=6,FS=7,PS=8,C0=typeof self=="object"?self:globalThis,rL=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),a=s=>{if(e.has(s))return e.get(s);const[o,c]=t[s];switch(o){case Jf:case $S:return n(c,s);case nc:{const f=n([],s);for(const d of c)f.push(a(d));return f}case Nf:{const f=n({},s);for(const[d,h]of c)f[a(d)]=a(h);return f}case wg:return n(new Date(c),s);case Ng:{const{source:f,flags:d}=c;return n(new RegExp(f,d),s)}case kg:{const f=n(new Map,s);for(const[d,h]of c)f.set(a(d),a(h));return f}case Tg:{const f=n(new Set,s);for(const d of c)f.add(a(d));return f}case FS:{const{name:f,message:d}=c;return n(new C0[f](d),s)}case PS:return n(BigInt(c),s);case"BigInt":return n(Object(BigInt(c)),s);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return n(new DataView(f),c)}}return n(new C0[o](c),s)};return a},A0=e=>rL(new Map,e)(0),sl="",{toString:sL}={},{keys:lL}=Object,Vo=e=>{const t=typeof e;if(t!=="object"||!e)return[Jf,t];const n=sL.call(e).slice(8,-1);switch(n){case"Array":return[nc,sl];case"Object":return[Nf,sl];case"Date":return[wg,sl];case"RegExp":return[Ng,sl];case"Map":return[kg,sl];case"Set":return[Tg,sl];case"DataView":return[nc,n]}return n.includes("Array")?[nc,n]:n.includes("Error")?[FS,n]:[Nf,n]},Wu=([e,t])=>e===Jf&&(t==="function"||t==="symbol"),oL=(e,t,n,a)=>{const s=(c,f)=>{const d=a.push(c)-1;return n.set(f,d),d},o=c=>{if(n.has(c))return n.get(c);let[f,d]=Vo(c);switch(f){case Jf:{let y=c;switch(d){case"bigint":f=PS,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);y=null;break;case"undefined":return s([$S],c)}return s([f,y],c)}case nc:{if(d){let x=c;return d==="DataView"?x=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(c)),s([d,[...x]],c)}const y=[],g=s([f,y],c);for(const x of c)y.push(o(x));return g}case Nf:{if(d)switch(d){case"BigInt":return s([d,c.toString()],c);case"Boolean":case"Number":case"String":return s([d,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const y=[],g=s([f,y],c);for(const x of lL(c))(e||!Wu(Vo(c[x])))&&y.push([o(x),o(c[x])]);return g}case wg:return s([f,c.toISOString()],c);case Ng:{const{source:y,flags:g}=c;return s([f,{source:y,flags:g}],c)}case kg:{const y=[],g=s([f,y],c);for(const[x,v]of c)(e||!(Wu(Vo(x))||Wu(Vo(v))))&&y.push([o(x),o(v)]);return g}case Tg:{const y=[],g=s([f,y],c);for(const x of c)(e||!Wu(Vo(x)))&&y.push(o(x));return g}}const{message:h}=c;return s([f,{name:d,message:h}],c)};return o},O0=(e,{json:t,lossy:n}={})=>{const a=[];return oL(!(t||n),!!t,new Map,a)(e),a},kf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?A0(O0(e,t)):structuredClone(e):(e,t)=>A0(O0(e,t));function cL(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function uL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function fL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||cL,a=e.options.footnoteBackLabel||uL,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const y=e.all(h),g=String(h.identifier).toUpperCase(),x=Gl(g.toLowerCase());let v=0;const S=[],_=e.footnoteCounts.get(g);for(;_!==void 0&&++v<=_;){S.length>0&&S.push({type:"text",value:" "});let R=typeof n=="string"?n:n(d,v);typeof R=="string"&&(R={type:"text",value:R}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(d,v),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const N=y[y.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const R=N.children[N.children.length-1];R&&R.type==="text"?R.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...S)}else y.push(...S);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(y,!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:o,properties:{...kf(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
483
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
484
+ `}]}}const wc=(function(e){if(e==null)return pL;if(typeof e=="function")return ed(e);if(typeof e=="object")return Array.isArray(e)?dL(e):hL(e);if(typeof e=="string")return mL(e);throw new Error("Expected function, string, or object as test")});function dL(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=wc(e[n]);return ed(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function hL(e){const t=e;return ed(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function mL(e){return ed(t);function t(n){return n&&n.type===e}}function ed(e){return t;function t(n,a,s){return!!(gL(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function pL(){return!0}function gL(e){return e!==null&&typeof e=="object"&&"type"in e}const qS=[],bL=!0,xp=!1,yL="skip";function HS(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const o=wc(s),c=a?-1:1;f(e,void 0,[])();function f(d,h,y){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const v=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=qS,S,_,N;if((!t||o(d,h,y[y.length-1]||void 0))&&(v=xL(n(d,y)),v[0]===xp))return v;if("children"in d&&d.children){const w=d;if(w.children&&v[0]!==yL)for(_=(a?w.children.length:-1)+c,N=y.concat(w);_>-1&&_<w.children.length;){const R=w.children[_];if(S=f(R,_,N)(),S[0]===xp)return S;_=typeof S[1]=="number"?S[1]:_+c}}return v}}}function xL(e){return Array.isArray(e)?e:typeof e=="number"?[bL,e]:e==null?qS:[e]}function td(e,t,n,a){let s,o,c;typeof t=="function"&&typeof n!="function"?(o=void 0,c=t,s=n):(o=t,c=n,s=a),HS(e,o,f,s);function f(d,h){const y=h[h.length-1],g=y?y.children.indexOf(d):void 0;return c(d,g,y)}}const vp={}.hasOwnProperty,vL={};function EL(e,t){const n=t||vL,a=new Map,s=new Map,o=new Map,c={...aL,...n.handlers},f={all:h,applyData:_L,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:d,options:n,patch:SL,wrap:NL};return td(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?a:s,x=String(y.identifier).toUpperCase();g.has(x)||g.set(x,y)}}),f;function d(y,g){const x=y.type,v=f.handlers[x];if(vp.call(f.handlers,x)&&v)return v(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in y){const{children:_,...N}=y,w=kf(N);return w.children=f.all(y),w}return kf(y)}return(f.options.unknownHandler||wL)(f,y,g)}function h(y){const g=[];if("children"in y){const x=y.children;let v=-1;for(;++v<x.length;){const S=f.one(x[v],y);if(S){if(v&&x[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=R0(S.value)),!Array.isArray(S)&&S.type==="element")){const _=S.children[0];_&&_.type==="text"&&(_.value=R0(_.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function SL(e,t){e.position&&(t.position=uM(e))}function _L(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const c="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:c}}n.type==="element"&&o&&Object.assign(n.properties,kf(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function wL(e,t){const n=t.data||{},a="value"in t&&!(vp.call(n,"hProperties")||vp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function NL(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
485
+ `});++a<e.length;)a&&n.push({type:"text",value:`
486
+ `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
487
+ `}),n}function R0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function M0(e,t){const n=EL(e,t),a=n.one(e,void 0),s=fL(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
488
+ `},s),o}function kL(e,t){return e&&"run"in e?async function(n,a){const s=M0(n,{file:a,...t});await e.run(s,a)}:function(n,a){return M0(n,{file:a,...e||t})}}function j0(e){if(e)throw e}var Cm,D0;function TL(){if(D0)return Cm;D0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var y=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!g)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},c=function(h,y){n&&y.name==="__proto__"?n(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},f=function(h,y){if(y==="__proto__")if(e.call(h,y)){if(a)return a(h,y).value}else return;return h[y]};return Cm=function d(){var h,y,g,x,v,S,_=arguments[0],N=1,w=arguments.length,R=!1;for(typeof _=="boolean"&&(R=_,_=arguments[1]||{},N=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});N<w;++N)if(h=arguments[N],h!=null)for(y in h)g=f(_,y),x=f(h,y),_!==x&&(R&&x&&(o(x)||(v=s(x)))?(v?(v=!1,S=g&&s(g)?g:[]):S=g&&o(g)?g:{},c(_,{name:y,newValue:d(R,S,x)})):typeof x<"u"&&c(_,{name:y,newValue:x}));return _},Cm}var CL=TL();const Am=kp(CL);function Ep(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 AL(){const e=[],t={run:n,use:a};return t;function n(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(d,...h){const y=e[++o];let g=-1;if(d){c(d);return}for(;++g<s.length;)(h[g]===null||h[g]===void 0)&&(h[g]=s[g]);s=h,y?OL(y,f)(...h):c(null,...h)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function OL(e,t){let n;return a;function a(...c){const f=e.length>c.length;let d;f&&c.push(s);try{d=e.apply(this,c)}catch(h){const y=h;if(f&&n)throw y;return s(y)}f||(d&&d.then&&typeof d.then=="function"?d.then(o,s):d instanceof Error?s(d):o(d))}function s(c,...f){n||(n=!0,t(c,...f))}function o(c){s(null,c)}}const Ki={basename:RL,dirname:ML,extname:jL,join:DL,sep:"/"};function RL(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Nc(e);let n=0,a=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else a<0&&(o=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else c<0&&(o=!0,c=s+1),f>-1&&(e.codePointAt(s)===t.codePointAt(f--)?f<0&&(a=s):(f=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function ML(e){if(Nc(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function jL(e){Nc(e);let t=e.length,n=-1,a=0,s=-1,o=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),f===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function DL(...e){let t=-1,n;for(;++t<e.length;)Nc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":LL(n)}function LL(e){Nc(e);const t=e.codePointAt(0)===47;let n=IL(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function IL(e,t){let n="",a=0,s=-1,o=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",a=0):(n=n.slice(0,d),a=n.length-1-n.lastIndexOf("/")),s=c,o=0;continue}}else if(n.length>0){n="",a=0,s=c,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),a=c-s-1;s=c,o=0}else f===46&&o>-1?o++:o=-1}return n}function Nc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const zL={cwd:BL};function BL(){return"/"}function Sp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function UL(e){if(typeof e=="string")e=new URL(e);else if(!Sp(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 $L(e)}function $L(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Om=["history","path","basename","stem","extname","dirname"];class KS{constructor(t){let n;t?Sp(t)?n={path:t}:typeof t=="string"||FL(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":zL.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Om.length;){const o=Om[a];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)Om.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ki.basename(this.path):void 0}set basename(t){Mm(t,"basename"),Rm(t,"basename"),this.path=Ki.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ki.dirname(this.path):void 0}set dirname(t){L0(this.basename,"dirname"),this.path=Ki.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ki.extname(this.path):void 0}set extname(t){if(Rm(t,"extname"),L0(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=Ki.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Sp(t)&&(t=UL(t)),Mm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ki.basename(this.path,this.extname):void 0}set stem(t){Mm(t,"stem"),Rm(t,"stem"),this.path=Ki.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new bn(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rm(e,t){if(e&&e.includes(Ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ki.sep+"`")}function Mm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function L0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function FL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PL=(function(e){const a=this.constructor.prototype,s=a[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),qL={}.hasOwnProperty;class Cg extends PL{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=AL()}copy(){const t=new Cg;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Am(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Lm("data",this.frozen),this.namespace[t]=n,this):qL.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Lm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ju(t),a=this.parser||this.Parser;return jm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),jm("process",this.parser||this.Parser),Dm("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,c){const f=Ju(t),d=a.parse(f);a.run(d,f,function(y,g,x){if(y||!g||!x)return h(y);const v=g,S=a.stringify(v,x);GL(S)?x.value=S:x.result=S,h(y,x)});function h(y,g){y||!g?c(y):o?o(g):n(void 0,g)}}}processSync(t){let n=!1,a;return this.freeze(),jm("processSync",this.parser||this.Parser),Dm("processSync",this.compiler||this.Compiler),this.process(t,s),z0("processSync","process",n),a;function s(o,c){n=!0,j0(o),a=c}}run(t,n,a){I0(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?o(void 0,a):new Promise(o);function o(c,f){const d=Ju(n);s.run(t,d,h);function h(y,g,x){const v=g||t;y?f(y):c?c(v):a(void 0,v,x)}}}runSync(t,n){let a=!1,s;return this.run(t,n,o),z0("runSync","run",a),s;function o(c,f){j0(c),s=f,a=!0}}stringify(t,n){this.freeze();const a=Ju(n),s=this.compiler||this.Compiler;return Dm("stringify",s),I0(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(Lm("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...g]=h;d(y,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(s.settings=Am(!0,s.settings,h.settings))}function f(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const g=h[y];o(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,y){let g=-1,x=-1;for(;++g<a.length;)if(a[g][0]===h){x=g;break}if(x===-1)a.push([h,...y]);else if(y.length>0){let[v,...S]=y;const _=a[x][1];Ep(_)&&Ep(v)&&(v=Am(!0,_,v)),a[x]=[h,v,...S]}}}}const HL=new Cg().freeze();function jm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Lm(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 I0(e){if(!Ep(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function z0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ju(e){return KL(e)?e:new KS(e)}function KL(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function GL(e){return typeof e=="string"||QL(e)}function QL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const YL="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",B0=[],U0={allowDangerousHtml:!0},VL=/^(https?|ircs?|mailto|xmpp)$/i,XL=[{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 Ag(e){const t=ZL(e),n=WL(e);return JL(t.runSync(t.parse(n),n),e)}function ZL(e){const t=e.rehypePlugins||B0,n=e.remarkPlugins||B0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...U0}:U0;return HL().use(MD).use(n).use(kL,a).use(t)}function WL(e){const t=e.children||"",n=new KS;return typeof t=="string"&&(n.value=t),n}function JL(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||e3;for(const y of XL)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+YL+y.id,void 0);return td(e,h),pM(e,{Fragment:m.Fragment,components:s,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function h(y,g,x){if(y.type==="raw"&&x&&typeof g=="number")return c?x.children.splice(g,1):x.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let v;for(v in Nm)if(Object.hasOwn(Nm,v)&&Object.hasOwn(y.properties,v)){const S=y.properties[v],_=Nm[v];(_===null||_.includes(y.tagName))&&(y.properties[v]=d(String(S||""),v,y))}}if(y.type==="element"){let v=n?!n.includes(y.tagName):o?o.includes(y.tagName):!1;if(!v&&a&&typeof g=="number"&&(v=!a(y,g,x)),v&&x&&typeof g=="number")return f&&y.children?x.children.splice(g,1,...y.children):x.children.splice(g,1),g}}}function e3(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||a!==-1&&t>a||VL.test(e.slice(0,t))?e:""}function $0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(t);for(;s!==-1;)a++,s=n.indexOf(t,s+t.length);return a}function t3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function n3(e,t,n){const s=wc((n||{}).ignore||[]),o=i3(t);let c=-1;for(;++c<o.length;)HS(e,"text",f);function f(h,y){let g=-1,x;for(;++g<y.length;){const v=y[g],S=x?x.children:void 0;if(s(v,S?S.indexOf(v):void 0,x))return;x=v}if(x)return d(h,y)}function d(h,y){const g=y[y.length-1],x=o[c][0],v=o[c][1];let S=0;const N=g.children.indexOf(h);let w=!1,R=[];x.lastIndex=0;let A=x.exec(h.value);for(;A;){const D=A.index,F={index:A.index,input:A.input,stack:[...y,h]};let M=v(...A,F);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?x.lastIndex=D+1:(S!==D&&R.push({type:"text",value:h.value.slice(S,D)}),Array.isArray(M)?R.push(...M):M&&R.push(M),S=D+A[0].length,w=!0),!x.global)break;A=x.exec(h.value)}return w?(S<h.value.length&&R.push({type:"text",value:h.value.slice(S)}),g.children.splice(N,1,...R)):R=[h],N+R.length}}function i3(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<n.length;){const s=n[a];t.push([a3(s[0]),r3(s[1])])}return t}function a3(e){return typeof e=="string"?new RegExp(t3(e),"g"):e}function r3(e){return typeof e=="function"?e:function(){return e}}const Im="phrasing",zm=["autolink","link","image","label"];function s3(){return{transforms:[h3],enter:{literalAutolink:o3,literalAutolinkEmail:Bm,literalAutolinkHttp:Bm,literalAutolinkWww:Bm},exit:{literalAutolink:d3,literalAutolinkEmail:f3,literalAutolinkHttp:c3,literalAutolinkWww:u3}}}function l3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Im,notInConstruct:zm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Im,notInConstruct:zm},{character:":",before:"[ps]",after:"\\/",inConstruct:Im,notInConstruct:zm}]}}function o3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Bm(e){this.config.enter.autolinkProtocol.call(this,e)}function c3(e){this.config.exit.autolinkProtocol.call(this,e)}function u3(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 f3(e){this.config.exit.autolinkEmail.call(this,e)}function d3(e){this.exit(e)}function h3(e){n3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,m3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),p3]],{ignore:["link","linkReference"]})}function m3(e,t,n,a,s){let o="";if(!GS(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!g3(n)))return!1;const c=b3(n+a);if(!c[0])return!1;const f={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function p3(e,t,n,a){return!GS(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function g3(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 b3(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const s=$0(e,"(");let o=$0(e,")");for(;a!==-1&&s>o;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),o++;return[e,n]}function GS(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ds(n)||Zf(n))&&(!t||n!==47)}QS.peek=k3;function y3(){this.buffer()}function x3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function v3(){this.buffer()}function E3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function S3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _3(e){this.exit(e)}function w3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function N3(e){this.exit(e)}function k3(){return"["}function QS(e,t,n,a){const s=n.createTracker(a);let o=s.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),f(),c(),o+=s.move("]"),o}function T3(){return{enter:{gfmFootnoteCallString:y3,gfmFootnoteCall:x3,gfmFootnoteDefinitionLabelString:v3,gfmFootnoteDefinition:E3},exit:{gfmFootnoteCallString:S3,gfmFootnoteCall:_3,gfmFootnoteDefinitionLabelString:w3,gfmFootnoteDefinition:N3}}}function C3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:QS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,o,c){const f=o.createTracker(c);let d=f.move("[^");const h=o.enter("footnoteDefinition"),y=o.enter("label");return d+=f.move(o.safe(o.associationId(a),{before:d,after:"]"})),y(),d+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),d+=f.move((t?`
489
+ `:" ")+o.indentLines(o.containerFlow(a,f.current()),t?YS:A3))),h(),d}}function A3(e,t,n){return t===0?e:YS(e,t,n)}function YS(e,t,n){return(n?"":" ")+e}const O3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];VS.peek=L3;function R3(){return{canContainEols:["delete"],enter:{strikethrough:j3},exit:{strikethrough:D3}}}function M3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:O3}],handlers:{delete:VS}}}function j3(e){this.enter({type:"delete",children:[]},e)}function D3(e){this.exit(e)}function VS(e,t,n,a){const s=n.createTracker(a),o=n.enter("strikethrough");let c=s.move("~~");return c+=n.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),o(),c}function L3(){return"~"}function I3(e){return e.length}function z3(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||I3,o=[],c=[],f=[],d=[];let h=0,y=-1;for(;++y<e.length;){const _=[],N=[];let w=-1;for(e[y].length>h&&(h=e[y].length);++w<e[y].length;){const R=B3(e[y][w]);if(n.alignDelimiters!==!1){const A=s(R);N[w]=A,(d[w]===void 0||A>d[w])&&(d[w]=A)}_.push(R)}c[y]=_,f[y]=N}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<h;)o[g]=F0(a[g]);else{const _=F0(a);for(;++g<h;)o[g]=_}g=-1;const x=[],v=[];for(;++g<h;){const _=o[g];let N="",w="";_===99?(N=":",w=":"):_===108?N=":":_===114&&(w=":");let R=n.alignDelimiters===!1?1:Math.max(1,d[g]-N.length-w.length);const A=N+"-".repeat(R)+w;n.alignDelimiters!==!1&&(R=N.length+R+w.length,R>d[g]&&(d[g]=R),v[g]=R),x[g]=A}c.splice(1,0,x),f.splice(1,0,v),y=-1;const S=[];for(;++y<c.length;){const _=c[y],N=f[y];g=-1;const w=[];for(;++g<h;){const R=_[g]||"";let A="",D="";if(n.alignDelimiters!==!1){const F=d[g]-(N[g]||0),M=o[g];M===114?A=" ".repeat(F):M===99?F%2?(A=" ".repeat(F/2+.5),D=" ".repeat(F/2-.5)):(A=" ".repeat(F/2),D=A):D=" ".repeat(F)}n.delimiterStart!==!1&&!g&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||g)&&w.push(" "),n.alignDelimiters!==!1&&w.push(A),w.push(R),n.alignDelimiters!==!1&&w.push(D),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&w.push("|")}S.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return S.join(`
490
+ `)}function B3(e){return e==null?"":String(e)}function F0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function U3(e,t,n,a){const s=n.enter("blockquote"),o=n.createTracker(a);o.move("> "),o.shift(2);const c=n.indentLines(n.containerFlow(e,o.current()),$3);return s(),c}function $3(e,t,n){return">"+(n?"":" ")+e}function F3(e,t){return P0(e,t.inConstruct,!0)&&!P0(e,t.notInConstruct,!1)}function P0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function q0(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
491
+ `&&F3(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
492
+ `}function P3(e,t){const n=String(e);let a=n.indexOf(t),s=a,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++o>c&&(c=o):o=1,s=a+t.length,a=n.indexOf(t,s);return c}function q3(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 H3(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 K3(e,t,n,a){const s=H3(n),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(q3(e,n)){const g=n.enter("codeIndented"),x=n.indentLines(o,G3);return g(),x}const f=n.createTracker(a),d=s.repeat(Math.max(P3(o,s)+1,3)),h=n.enter("codeFenced");let y=f.move(d);if(e.lang){const g=n.enter(`codeFencedLang${c}`);y+=f.move(n.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${c}`);y+=f.move(" "),y+=f.move(n.safe(e.meta,{before:y,after:`
493
+ `,encode:["`"],...f.current()})),g()}return y+=f.move(`
494
+ `),o&&(y+=f.move(o+`
495
+ `)),y+=f.move(d),h(),y}function G3(e,t,n){return(n?"":" ")+e}function Og(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 Q3(e,t,n,a){const s=Og(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let f=n.enter("label");const d=n.createTracker(a);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":`
496
+ `,...d.current()}))),f(),e.title&&(f=n.enter(`title${o}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),f()),c(),h}function Y3(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 uc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Tf(e,t,n){const a=Ml(e),s=Ml(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}XS.peek=V3;function XS(e,t,n,a){const s=Y3(n),o=n.enter("emphasis"),c=n.createTracker(a),f=c.move(s);let d=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=d.charCodeAt(0),y=Tf(a.before.charCodeAt(a.before.length-1),h,s);y.inside&&(d=uc(h)+d.slice(1));const g=d.charCodeAt(d.length-1),x=Tf(a.after.charCodeAt(0),g,s);x.inside&&(d=d.slice(0,-1)+uc(g));const v=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+d+v}function V3(e,t,n){return n.options.emphasis||"*"}function X3(e,t){let n=!1;return td(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,xp}),!!((!e.depth||e.depth<3)&&Eg(e)&&(t.options.setext||n))}function Z3(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if(X3(e,n)){const y=n.enter("headingSetext"),g=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
497
+ `,after:`
498
+ `});return g(),y(),x+`
499
+ `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
500
+ `))+1))}const c="#".repeat(s),f=n.enter("headingAtx"),d=n.enter("phrasing");o.move(c+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
501
+ `,...o.current()});return/^[\t ]/.test(h)&&(h=uc(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,n.options.closeAtx&&(h+=" "+c),d(),f(),h}ZS.peek=W3;function ZS(e){return e.value||""}function W3(){return"<"}WS.peek=J3;function WS(e,t,n,a){const s=Og(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let f=n.enter("label");const d=n.createTracker(a);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=n.enter(`title${o}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),f()),h+=d.move(")"),c(),h}function J3(){return"!"}JS.peek=eI;function JS(e,t,n,a){const s=e.referenceType,o=n.enter("imageReference");let c=n.enter("label");const f=n.createTracker(a);let d=f.move("![");const h=n.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const y=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...f.current()});return c(),n.stack=y,o(),s==="full"||!h||h!==g?d+=f.move(g+"]"):s==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function eI(){return"!"}e_.peek=tI;function e_(e,t,n){let a=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<n.unsafe.length;){const c=n.unsafe[o],f=n.compilePattern(c);let d;if(c.atBreak)for(;d=f.exec(a);){let h=d.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(d.index+1)}}return s+a+s}function tI(){return"`"}function t_(e,t){const n=Eg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}n_.peek=nI;function n_(e,t,n,a){const s=Og(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,d;if(t_(e,n)){const y=n.stack;n.stack=[],f=n.enter("autolink");let g=c.move("<");return g+=c.move(n.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),n.stack=y,g}f=n.enter("link"),d=n.enter("label");let h=c.move("[");return h+=c.move(n.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(n.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(d=n.enter("destinationRaw"),h+=c.move(n.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=c.move(" "+s),h+=c.move(n.safe(e.title,{before:h,after:s,...c.current()})),h+=c.move(s),d()),h+=c.move(")"),f(),h}function nI(e,t,n){return t_(e,n)?"<":"["}i_.peek=iI;function i_(e,t,n,a){const s=e.referenceType,o=n.enter("linkReference");let c=n.enter("label");const f=n.createTracker(a);let d=f.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const y=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...f.current()});return c(),n.stack=y,o(),s==="full"||!h||h!==g?d+=f.move(g+"]"):s==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function iI(){return"["}function Rg(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 aI(e){const t=Rg(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function rI(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 a_(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 sI(e,t,n,a){const s=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?rI(n):Rg(n);const f=e.ordered?c==="."?")":".":aI(n);let d=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),a_(n)===c&&y){let g=-1;for(;++g<e.children.length;){const x=e.children[g];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(c=f),n.bulletCurrent=c;const h=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=o,s(),h}function lI(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 oI(e,t,n,a){const s=lI(n);let o=n.bulletCurrent||Rg(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=n.createTracker(a);f.move(o+" ".repeat(c-o.length)),f.shift(c);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,f.current()),y);return d(),h;function y(g,x,v){return x?(v?"":" ".repeat(c))+g:(v?o:o+" ".repeat(c-o.length))+g}}function cI(e,t,n,a){const s=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),s(),c}const uI=wc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function fI(e,t,n,a){return(e.children.some(function(c){return uI(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function dI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}r_.peek=hI;function r_(e,t,n,a){const s=dI(n),o=n.enter("strong"),c=n.createTracker(a),f=c.move(s+s);let d=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=d.charCodeAt(0),y=Tf(a.before.charCodeAt(a.before.length-1),h,s);y.inside&&(d=uc(h)+d.slice(1));const g=d.charCodeAt(d.length-1),x=Tf(a.after.charCodeAt(0),g,s);x.inside&&(d=d.slice(0,-1)+uc(g));const v=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+d+v}function hI(e,t,n){return n.options.strong||"*"}function mI(e,t,n,a){return n.safe(e.value,a)}function pI(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 gI(e,t,n){const a=(a_(n)+(n.options.ruleSpaces?" ":"")).repeat(pI(n));return n.options.ruleSpaces?a.slice(0,-1):a}const s_={blockquote:U3,break:q0,code:K3,definition:Q3,emphasis:XS,hardBreak:q0,heading:Z3,html:ZS,image:WS,imageReference:JS,inlineCode:e_,link:n_,linkReference:i_,list:sI,listItem:oI,paragraph:cI,root:fI,strong:r_,text:mI,thematicBreak:gI};function bI(){return{enter:{table:yI,tableData:H0,tableHeader:H0,tableRow:vI},exit:{codeText:EI,table:xI,tableData:Um,tableHeader:Um,tableRow:Um}}}function yI(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function xI(e){this.exit(e),this.data.inTable=void 0}function vI(e){this.enter({type:"tableRow",children:[]},e)}function Um(e){this.exit(e)}function H0(e){this.enter({type:"tableCell",children:[]},e)}function EI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,SI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function SI(e,t){return t==="|"?t:e}function _I(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
502
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:d,tableRow:f}};function c(v,S,_,N){return h(y(v,_,N),v.align)}function f(v,S,_,N){const w=g(v,_,N),R=h([w]);return R.slice(0,R.indexOf(`
503
+ `))}function d(v,S,_,N){const w=_.enter("tableCell"),R=_.enter("phrasing"),A=_.containerPhrasing(v,{...N,before:o,after:o});return R(),w(),A}function h(v,S){return z3(v,{align:S,alignDelimiters:a,padding:n,stringLength:s})}function y(v,S,_){const N=v.children;let w=-1;const R=[],A=S.enter("table");for(;++w<N.length;)R[w]=g(N[w],S,_);return A(),R}function g(v,S,_){const N=v.children;let w=-1;const R=[],A=S.enter("tableRow");for(;++w<N.length;)R[w]=d(N[w],v,S,_);return A(),R}function x(v,S,_){let N=s_.inlineCode(v,S,_);return _.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function wI(){return{exit:{taskListCheckValueChecked:K0,taskListCheckValueUnchecked:K0,paragraph:kI}}}function NI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:TI}}}function K0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function kI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const a=n.children[0];if(a&&a.type==="text"){const s=t.children;let o=-1,c;for(;++o<s.length;){const f=s[o];if(f.type==="paragraph"){c=f;break}}c===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function TI(e,t,n,a){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);o&&f.move(c);let d=s_.listItem(e,t,n,{...a,...f.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(y){return y+c}}function CI(){return[s3(),T3(),R3(),bI(),wI()]}function AI(e){return{extensions:[l3(),C3(e),M3(),_I(e),NI()]}}const OI={tokenize:II,partial:!0},l_={tokenize:zI,partial:!0},o_={tokenize:BI,partial:!0},c_={tokenize:UI,partial:!0},RI={tokenize:$I,partial:!0},u_={name:"wwwAutolink",tokenize:DI,previous:d_},f_={name:"protocolAutolink",tokenize:LI,previous:h_},Oa={name:"emailAutolink",tokenize:jI,previous:m_},Wi={};function MI(){return{text:Wi}}let Xr=48;for(;Xr<123;)Wi[Xr]=Oa,Xr++,Xr===58?Xr=65:Xr===91&&(Xr=97);Wi[43]=Oa;Wi[45]=Oa;Wi[46]=Oa;Wi[95]=Oa;Wi[72]=[Oa,f_];Wi[104]=[Oa,f_];Wi[87]=[Oa,u_];Wi[119]=[Oa,u_];function jI(e,t,n){const a=this;let s,o;return c;function c(g){return!_p(g)||!m_.call(a,a.previous)||Mg(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return _p(g)?(e.consume(g),f):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(RI,y,h)(g):g===45||g===95||pn(g)?(o=!0,e.consume(g),d):y(g)}function h(g){return e.consume(g),s=!0,d}function y(g){return o&&s&&kn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function DI(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!d_.call(a,a.previous)||Mg(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(OI,e.attempt(l_,e.attempt(o_,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function LI(e,t,n){const a=this;let s="",o=!1;return c;function c(g){return(g===72||g===104)&&h_.call(a,a.previous)&&!Mg(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):n(g)}function f(g){if(kn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),o?h:(o=!0,d)):n(g)}function h(g){return g===null||wf(g)||xt(g)||ds(g)||Zf(g)?n(g):e.attempt(l_,e.attempt(o_,y),n)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function II(e,t,n){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),s):c===46&&a===3?(e.consume(c),o):n(c)}function o(c){return c===null?n(c):t(c)}}function zI(e,t,n){let a,s,o;return c;function c(h){return h===46||h===95?e.check(c_,d,f)(h):h===null||xt(h)||ds(h)||h!==45&&Zf(h)?d(h):(o=!0,e.consume(h),c)}function f(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),c}function d(h){return s||a||!o?n(h):t(h)}}function BI(e,t){let n=0,a=0;return s;function s(c){return c===40?(n++,e.consume(c),s):c===41&&a<n?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(c_,t,o)(c):c===null||xt(c)||ds(c)?t(c):(e.consume(c),s)}function o(c){return c===41&&a++,e.consume(c),s}}function UI(e,t,n){return a;function a(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),a):f===38?(e.consume(f),o):f===93?(e.consume(f),s):f===60||f===null||xt(f)||ds(f)?t(f):n(f)}function s(f){return f===null||f===40||f===91||xt(f)||ds(f)?t(f):a(f)}function o(f){return kn(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),a):kn(f)?(e.consume(f),c):n(f)}}function $I(e,t,n){return a;function a(o){return e.consume(o),s}function s(o){return pn(o)?n(o):t(o)}}function d_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xt(e)}function h_(e){return!kn(e)}function m_(e){return!(e===47||_p(e))}function _p(e){return e===43||e===45||e===46||e===95||pn(e)}function Mg(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const FI={tokenize:VI,partial:!0};function PI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:GI,continuation:{tokenize:QI},exit:YI}},text:{91:{name:"gfmFootnoteCall",tokenize:KI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:qI,resolveTo:HI}}}}function qI(e,t,n){const a=this;let s=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const d=a.events[s][1];if(d.type==="labelImage"){c=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!c||!c._balanced)return n(d);const h=Mi(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function HI(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function KI(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(o>999||g===93&&!c||g===null||g===91||xt(g))return n(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(Mi(a.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return xt(g)||(c=!0),o++,e.consume(g),g===92?y:h}function y(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function GI(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,f;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):n(S)}function y(S){if(c>999||S===93&&!f||S===null||S===91||xt(S))return n(S);if(S===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return o=Mi(a.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return xt(S)||(f=!0),c++,e.consume(S),S===92?g:y}function g(S){return S===91||S===92||S===93?(e.consume(S),c++,y):y(S)}function x(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(o)||s.push(o),Je(e,v,"gfmFootnoteDefinitionWhitespace")):n(S)}function v(S){return t(S)}}function QI(e,t,n){return e.check(_c,t,e.attempt(FI,t,n))}function YI(e){e.exit("gfmFootnoteDefinition")}function VI(e,t,n){const a=this;return Je(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):n(o)}}function XI(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,f){let d=-1;for(;++d<c.length;)if(c[d][0]==="enter"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._close){let h=d;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[d][1].end.offset-c[d][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[d][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[d][1].end)},g={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[d][1].start)},x=[["enter",y,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",g,f]],v=f.parser.constructs.insideSpan.null;v&&ri(x,x.length,0,Wf(v,c.slice(h+1,d),f)),ri(x,x.length,0,[["exit",g,f],["enter",c[d][1],f],["exit",c[d][1],f],["exit",y,f]]),ri(c,h-1,d-h+3,x),d=h+x.length-2;break}}for(d=-1;++d<c.length;)c[d][1].type==="strikethroughSequenceTemporary"&&(c[d][1].type="data");return c}function o(c,f,d){const h=this.previous,y=this.events;let g=0;return x;function x(S){return h===126&&y[y.length-1][1].type!=="characterEscape"?d(S):(c.enter("strikethroughSequenceTemporary"),v(S))}function v(S){const _=Ml(h);if(S===126)return g>1?d(S):(c.consume(S),g++,v);if(g<2&&!n)return d(S);const N=c.exit("strikethroughSequenceTemporary"),w=Ml(S);return N._open=!w||w===2&&!!_,N._close=!_||_===2&&!!w,f(S)}}}class ZI{constructor(){this.map=[]}add(t,n,a){WI(this,t,n,a)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const o of s)t.push(o);s=a.pop()}this.map.length=0}}function WI(e,t,n,a){let s=0;if(!(n===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...a);return}s+=1}e.map.push([t,n,a])}}function JI(e,t){let n=!1;const a=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function ez(){return{flow:{null:{name:"table",tokenize:tz,resolveAll:nz}}}}function tz(e,t,n){const a=this;let s=0,o=0,c;return f;function f(C){let P=a.events.length-1;for(;P>-1;){const H=a.events[P][1].type;if(H==="lineEnding"||H==="linePrefix")P--;else break}const Y=P>-1?a.events[P][1].type:null,le=Y==="tableHead"||Y==="tableRow"?M:d;return le===M&&a.parser.lazy[a.now().line]?n(C):le(C)}function d(C){return e.enter("tableHead"),e.enter("tableRow"),h(C)}function h(C){return C===124||(c=!0,o+=1),y(C)}function y(C){return C===null?n(C):Te(C)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),v):n(C):Ge(C)?Je(e,y,"whitespace")(C):(o+=1,c&&(c=!1,s+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(C)))}function g(C){return C===null||C===124||xt(C)?(e.exit("data"),y(C)):(e.consume(C),C===92?x:g)}function x(C){return C===92||C===124?(e.consume(C),g):g(C)}function v(C){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(C):(e.enter("tableDelimiterRow"),c=!1,Ge(C)?Je(e,S,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):S(C))}function S(C){return C===45||C===58?N(C):C===124?(c=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),_):F(C)}function _(C){return Ge(C)?Je(e,N,"whitespace")(C):N(C)}function N(C){return C===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),w):C===45?(o+=1,w(C)):C===null||Te(C)?D(C):F(C)}function w(C){return C===45?(e.enter("tableDelimiterFiller"),R(C)):F(C)}function R(C){return C===45?(e.consume(C),R):C===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(C))}function A(C){return Ge(C)?Je(e,D,"whitespace")(C):D(C)}function D(C){return C===124?S(C):C===null||Te(C)?!c||s!==o?F(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):F(C)}function F(C){return n(C)}function M(C){return e.enter("tableRow"),q(C)}function q(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),q):C===null||Te(C)?(e.exit("tableRow"),t(C)):Ge(C)?Je(e,q,"whitespace")(C):(e.enter("data"),U(C))}function U(C){return C===null||C===124||xt(C)?(e.exit("data"),q(C)):(e.consume(C),C===92?J:U)}function J(C){return C===92||C===124?(e.consume(C),U):U(C)}}function nz(e,t){let n=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,d=0,h,y,g;const x=new ZI;for(;++n<e.length;){const v=e[n],S=v[1];v[0]==="enter"?S.type==="tableHead"?(f=!1,d!==0&&(G0(x,t,d,h,y),y=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(a=!0,g=void 0,o=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",y,t]])),s=S.type==="tableDelimiterRow"?2:y?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],g=ef(x,t,o,s,void 0,g),o=[0,0,0,0]),c[2]=n)):S.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],g=ef(x,t,o,s,void 0,g)),o=c,c=[o[1],n,0,0])):S.type==="tableHead"?(f=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,o[1]!==0?(c[0]=c[1],g=ef(x,t,o,s,n,g)):c[1]!==0&&(g=ef(x,t,c,s,n,g)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=n)}for(d!==0&&G0(x,t,d,h,y),x.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=JI(t.events,n))}return e}function ef(e,t,n,a,s,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(o.end=Object.assign({},ll(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const d=ll(t.events,n[1]);if(o={type:c,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=ll(t.events,n[2]),y=ll(t.events,n[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},y)};if(e.add(n[2],0,[["enter",g,t]]),a!==2){const x=t.events[n[2]],v=t.events[n[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,_=n[3]-n[2]-1;e.add(S,_,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(o.end=Object.assign({},ll(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function G0(e,t,n,a,s){const o=[],c=ll(t.events,n);s&&(s.end=Object.assign({},c),o.push(["exit",s,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(n+1,0,o)}function ll(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const iz={name:"tasklistCheck",tokenize:rz};function az(){return{text:{91:iz}}}function rz(e,t,n){const a=this;return s;function s(d){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return xt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),c):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),c):n(d)}function c(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(d)}function f(d){return Te(d)?t(d):Ge(d)?e.check({tokenize:sz},t,n)(d):n(d)}}function sz(e,t,n){return Je(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function lz(e){return NS([MI(),PI(),XI(e),ez(),az()])}const oz={};function jg(e){const t=this,n=e||oz,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(lz(n)),o.push(CI()),c.push(AI(n))}const Q0=(function(e,t,n){const a=wc(n);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(a(e.children[t],t,e))return e.children[t]}),bs=(function(e){if(e==null)return fz;if(typeof e=="string")return uz(e);if(typeof e=="object")return cz(e);if(typeof e=="function")return Dg(e);throw new Error("Expected function, string, or array as `test`")});function cz(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=bs(e[n]);return Dg(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function uz(e){return Dg(t);function t(n){return n.tagName===e}}function Dg(e){return t;function t(n,a,s){return!!(dz(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function fz(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function dz(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Y0=/\n/g,V0=/[\t ]+/g,wp=bs("br"),X0=bs(vz),hz=bs("p"),Z0=bs("tr"),mz=bs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",xz,Ez]),p_=bs(["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 pz(e,t){const n=t||{},a="children"in e?e.children:[],s=p_(e),o=y_(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...b_(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...g_(a[f],e,{whitespace:o,breakBefore:f?void 0:s,breakAfter:f<a.length-1?wp(a[f+1]):s}));const d=[];let h;for(f=-1;++f<c.length;){const y=c[f];typeof y=="number"?h!==void 0&&y>h&&(h=y):y&&(h!==void 0&&h>-1&&d.push(`
504
+ `.repeat(h)||" "),h=-1,d.push(y))}return d.join("")}function g_(e,t,n){return e.type==="element"?gz(e,t,n):e.type==="text"?n.whitespace==="normal"?b_(e,n):bz(e):[]}function gz(e,t,n){const a=y_(e,n),s=e.children||[];let o=-1,c=[];if(mz(e))return c;let f,d;for(wp(e)||Z0(e)&&Q0(t,e,Z0)?d=`
505
+ `:hz(e)?(f=2,d=2):p_(e)&&(f=1,d=1);++o<s.length;)c=c.concat(g_(s[o],e,{whitespace:a,breakBefore:o?void 0:f,breakAfter:o<s.length-1?wp(s[o+1]):d}));return X0(e)&&Q0(t,e,X0)&&c.push(" "),f&&c.unshift(f),d&&c.push(d),c}function b_(e,t){const n=String(e.value),a=[],s=[];let o=0;for(;o<=n.length;){Y0.lastIndex=o;const d=Y0.exec(n),h=d&&"index"in d?d.index:n.length;a.push(yz(n.slice(o,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,h===n.length?t.breakAfter:!0)),o=h+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(s.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&s.push(f),s.push(a[c]),f=0):(c===0||c===a.length-1)&&s.push(0);return s}function bz(e){return[String(e.value)]}function yz(e,t,n){const a=[];let s=0,o;for(;s<e.length;){V0.lastIndex=s;const c=V0.exec(e);o=c?c.index:e.length,!s&&!o&&c&&!t&&a.push(""),s!==o&&a.push(e.slice(s,o)),s=c?o+c[0].length:o}return s!==o&&!n&&a.push(""),a.join(" ")}function y_(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function xz(e){return!!(e.properties||{}).hidden}function vz(e){return e.tagName==="td"||e.tagName==="th"}function Ez(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function Sz(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[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})"/})]},y={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:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",S=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],N=["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"],D={type:_,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},F={className:"function.dispatch",relevance:0,keywords:{_hint:w},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:M.concat([{begin:/\(/,end:/\)/,keywords:D,contains:M.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,U,F,M,[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:D,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function _z(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"]},n=Sz(e),a=n.keywords;return a.type=[...a.type,...t.type],a.literal=[...a.literal,...t.literal],a.built_in=[...a.built_in,...t.built_in],a._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function wz(e){const t=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(f);const d={match:/\\"/},h={className:"string",begin:/'/,end:/'/},y={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),S={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},_=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],N=["true","false"],w={match:/(\/[a-z._-]+)+/},R=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],A=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],D=["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"],F=["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:_,literal:N,built_in:[...R,...A,"set","shopt",...D,...F]},contains:[v,e.SHEBANG(),S,g,o,c,w,f,d,h,y,n]}}function Nz(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="("+a+"|"+t.optional(s)+"[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})"/})]},y={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:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",N={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,n,e.C_BLOCK_COMMENT_MODE,y,h],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:N,contains:w.concat([{begin:/\(/,end:/\)/,keywords:N,contains:w.concat(["self"]),relevance:0}]),relevance:0},A={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:N,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:N,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:N,disableAutodetect:!0,illegal:"</",contains:[].concat(R,A,w,[g,{begin:e.IDENT_RE+"::",keywords:N},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:h,keywords:N}}}function kz(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[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})"/})]},y={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:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",S=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],N=["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"],D={type:_,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},F={className:"function.dispatch",relevance:0,keywords:{_hint:w},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:M.concat([{begin:/\(/,end:/\)/,keywords:D,contains:M.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,U,F,M,[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:D,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Tz(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],s=["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"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:s.concat(o),built_in:t,literal:a},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={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},y={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=e.inherit(y,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:c},v=e.inherit(x,{illegal:/\n/}),S={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},_={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},N=e.inherit(_,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});x.contains=[_,S,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],v.contains=[N,S,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const w={variants:[h,_,S,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},R={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},A=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",D={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},w,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,R,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,R,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:"("+A+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,R],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[w,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},D]}}const Cz=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_-]*/}}),Az=["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"],Oz=["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"],Rz=[...Az,...Oz],Mz=["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(),jz=["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(),Dz=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Lz=["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 Iz(e){const t=e.regex,n=Cz(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",o=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,a,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+jz.join("|")+")"},{begin:":(:)?("+Dz.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Lz.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.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}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Mz.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Rz.join("|")+")\\b"}]}}function zz(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 Bz(e){const o={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:o,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:o,illegal:/["']/}]}]}}function Uz(e){const t=e.regex,n=/[_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(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function $z(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[a,o,s,c,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,y=/'[^']*'/,g=t.either(d,h,y),x=t.concat(g,"(\\s*\\.\\s*",g,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:x,className:"attr",starts:{end:/$/,contains:[a,f,o,s,c,n]}}]}}var ol="[0-9](_*[0-9])*",tf=`\\.(${ol})`,nf="[0-9a-fA-F](_*[0-9a-fA-F])*",W0={className:"number",variants:[{begin:`(\\b(${ol})((${tf})|\\.)?|(${tf}))[eE][+-]?(${ol})[fFdD]?\\b`},{begin:`\\b(${ol})((${tf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${tf})[fFdD]?\\b`},{begin:`\\b(${ol})[fFdD]\\b`},{begin:`\\b0[xX]((${nf})\\.?|(${nf})?\\.(${nf}))[pP][+-]?(${ol})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${nf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function x_(e,t,n){return n===-1?"":e.replace(t,a=>x_(e,t,n-1))}function Fz(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+x_("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={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:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},y={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,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+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,W0,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},W0,h]}}const J0="[A-Za-z$_][0-9A-Za-z$_]*",Pz=["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"],qz=["true","false","null","undefined","NaN","Infinity"],v_=["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"],E_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],S_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Hz=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Kz=[].concat(S_,v_,E_);function Gz(e){const t=e.regex,n=(Z,{after:pe})=>{const O="</"+Z[0].slice(1);return Z.input.indexOf(O,pe)!==-1},a=J0,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,pe)=>{const O=Z[0].length+Z.index,L=Z.input[O];if(L==="<"||L===","){pe.ignoreMatch();return}L===">"&&(n(Z,{after:O})||pe.ignoreMatch());let te;const T=Z.input.substring(O);if(te=T.match(/^\s*=/)){pe.ignoreMatch();return}if((te=T.match(/^\s+extends\s+/))&&te.index===0){pe.ignoreMatch();return}}},f={$pattern:J0,keyword:Pz,literal:qz,built_in:Kz,"variable.language":Hz},d="[0-9](_?[0-9])*",h=`\\.(${d})`,y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${y})((${h})|\\.)?|(${h}))[eE][+-]?(${d})\\b`},{begin:`\\b(${y})\\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},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},R={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:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,_,N,{match:/\$\d+/},g];x.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const D=[].concat(R,x.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},q={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},U={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:{_:[...v_,...E_]}},J={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Y(Z){return t.concat("(?!",Z.join("|"),")")}const le={match:t.concat(/\b/,Y([...S_,"super","import"].map(Z=>`${Z}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},H={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},G="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(G)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),J,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,_,N,R,{match:/\$\d+/},g,U,{scope:"attr",match:a+t.lookahead(":"),relevance:0},oe,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin:G,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},H,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},le,P,q,Q,{match:/\$[(.]/}]}}function Qz(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],s={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var cl="[0-9](_*[0-9])*",af=`\\.(${cl})`,rf="[0-9a-fA-F](_*[0-9a-fA-F])*",Yz={className:"number",variants:[{begin:`(\\b(${cl})((${af})|\\.)?|(${af}))[eE][+-]?(${cl})[fFdD]?\\b`},{begin:`\\b(${cl})((${af})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${af})[fFdD]?\\b`},{begin:`\\b(${cl})[fFdD]\\b`},{begin:`\\b0[xX]((${rf})\\.?|(${rf})?\\.(${rf}))[pP][+-]?(${cl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${rf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Vz(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"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,s]}]};s.contains.push(c);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},h=Yz,y=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),g={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},x=g;return x.variants[1].contains=[g],g.variants[1].contains=[x],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,y,n,a,f,d,{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,y],relevance:0},e.C_LINE_COMMENT_MODE,y,f,d,c,e.C_NUMBER_MODE]},y]},{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,d]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
506
+ `},h]}}const Xz=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_-]*/}}),Zz=["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"],Wz=["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"],Jz=[...Zz,...Wz],e4=["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(),__=["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(),w_=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),t4=["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(),n4=__.concat(w_).sort().reverse();function i4(e){const t=Xz(e),n=n4,a="and or not only",s="[\\w-]+",o="("+s+"|@\\{"+s+"\\})",c=[],f=[],d=function(A){return{className:"string",begin:"~?"+A+".*?"+A}},h=function(A,D,F){return{className:A,begin:D,relevance:F}},y={$pattern:/[a-z-]+/,keyword:a,attribute:e4.join(" ")},g={begin:"\\(",end:"\\)",contains:f,keywords:y,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,g,h("variable","@@?"+s,10),h("variable","@\\{"+s+"\\}"),h("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const x=f.concat({begin:/\{/,end:/\}/,contains:c}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},S={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+t4.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},_={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:y,returnEnd:!0,contains:f,relevance:0}},N={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:x}},w={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,h("keyword","all\\b"),h("variable","@\\{"+s+"\\}"),{begin:"\\b("+Jz.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,h("selector-tag",o,0),h("selector-id","#"+o),h("selector-class","\\."+o,0),h("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+__.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+w_.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:x},{begin:"!important"},t.FUNCTION_DISPATCH]},R={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[w]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,_,N,R,S,w,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function a4(e){const t="\\[=*\\[",n="\\]=*\\]",a={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[a],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:s.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:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[a],relevance:5}])}}function r4(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={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,n]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,a,s,o,c]}}function s4(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},s={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}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,d={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}/}]},y={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=e.inherit(h,{contains:[]}),x=e.inherit(y,{contains:[]});h.contains.push(x),y.contains.push(g);let v=[n,d];return[h,y,g,x].forEach(w=>{w.contains=w.contains.concat(v)}),v=v.concat(h,y),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},n,o,h,y,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},s,a,d,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function l4(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+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:n,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"]},d={$pattern:n,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:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function o4(e){const t=e.regex,n=["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"],a=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},c={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={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},y=[e.BACKSLASH_ESCAPE,o,d],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(_,N,w="\\1")=>{const R=w==="\\1"?w:t.concat(w,N);return t.concat(t.concat("(?:",_,")"),N,/(?:\\.|[^\\\/])*?/,R,/(?:\\.|[^\\\/])*?/,w,a)},v=(_,N,w)=>t.concat(t.concat("(?:",_,")"),N,/(?:\\.|[^\\\/])*?/,w,a),S=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:y,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:x("s|tr|y",t.either(...g,{capture:!0}))},{begin:x("s|tr|y","\\(","\\)")},{begin:x("s|tr|y","\\[","\\]")},{begin:x("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",t.either(...g,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("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 o.contains=S,c.contains=S,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:S}}function c4(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),c={scope:"variable",match:"\\$+"+a},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=e.inherit(e.APOS_STRING_MODE,{illegal:null}),y=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(H,Q)=>{Q.data._beginMatch=H[1]||H[2]},"on:end":(H,Q)=>{Q.data._beginMatch!==H[1]&&Q.ignoreMatch()}},x=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
507
+ ]`,S={scope:"string",variants:[y,h,g,x]},_={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},N=["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"],R=["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"],D={keyword:w,literal:(H=>{const Q=[];return H.forEach(G=>{Q.push(G),G.toLowerCase()===G?Q.push(G.toUpperCase()):Q.push(G.toLowerCase())}),Q})(N),built_in:R},F=H=>H.map(Q=>Q.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",F(R).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},q=t.concat(a,"\\b(?!\\()"),U={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),q],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),q],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},J={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},C={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[J,c,U,e.C_BLOCK_COMMENT_MODE,S,_,M]},P={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",F(w).join("\\b|"),"|",F(R).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[C]};C.contains.push(P);const Y=[J,U,e.C_BLOCK_COMMENT_MODE,S,_,M],le={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:N,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:N,keyword:["new","array"]},contains:["self",...Y]},...Y,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:D,contains:[le,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,P,U,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},M,{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:D,contains:["self",le,c,U,e.C_BLOCK_COMMENT_MODE,S,_]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},S,_]}}function u4(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 f4(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function d4(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["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:a,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"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},y={begin:/\{\{/,relevance:0},g={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,y,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,y,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,y,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,y,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",v=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,S=`\\b|${a.join("|")}`,_={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${v}))[eE][+-]?(${x})[jJ]?(?=${S})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${S})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${S})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${S})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${S})`},{begin:`\\b(${x})[jJ](?=${S})`}]},N={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",d,_,g,e.HASH_COMMENT_MODE]}]};return h.contains=[g,_,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[d,_,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,N,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[_,w,g]}]}}function h4(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function m4(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=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]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,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:n},{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:[s,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[o,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function p4(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(a,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},h=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],y={className:"subst",begin:/#\{/,end:/\}/,keywords:c},g={className:"string",contains:[e.BACKSLASH_ESCAPE,y],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,y]})]}]},x="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",S={className:"number",relevance:0,variants:[{begin:`\\b(${x})(\\.(${v}))?([eE][+-]?(${v})|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"}]},_={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},M=[g,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[_]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:n}],relevance:0},S,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,y],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(d,h),relevance:0}].concat(d,h);y.contains=M,_.contains=M;const C=[{begin:/^\s*=>/,starts:{end:"$",contains:M}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:M}}];return h.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(C).concat(h).concat(M)}}function g4(e){const t=e.regex,n=/(r#)?/,a=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["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!"],y=["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:y,keyword:f,literal:d,built_in:h},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:h,type:y}},{className:"punctuation",begin:"->"},o]}}const b4=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_-]*/}}),y4=["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"],x4=["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"],v4=[...y4,...x4],E4=["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(),S4=["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(),_4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),w4=["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 N4(e){const t=b4(e),n=_4,a=S4,s="@[a-z-]+",o="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("+v4.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+w4.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:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:E4.join(" ")},contains:[{begin:s,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 k4(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function T4(e){const t=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["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"],y=["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"],x=["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"],v=y,S=[...h,...d].filter(F=>!y.includes(F)),_={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},N={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},w={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function R(F){return t.concat(/\b/,t.either(...F.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:R(x),relevance:0};function D(F,{exceptions:M,when:q}={}){const U=q;return M=M||[],F.map(J=>J.match(/\|\d+$/)||M.includes(J)?J:U(J)?`${J}|0`:J)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:D(S,{when:F=>F.length<3}),literal:o,type:f,built_in:g},contains:[{scope:"type",match:R(c)},A,w,_,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,N]}}function N_(e){return e?typeof e=="string"?e:e.source:null}function Xo(e){return gt("(?=",e,")")}function gt(...e){return e.map(n=>N_(n)).join("")}function C4(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function _n(...e){return"("+(C4(e).capture?"":"?:")+e.map(a=>N_(a)).join("|")+")"}const Lg=e=>gt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),A4=["Protocol","Type"].map(Lg),eE=["init","self"].map(Lg),O4=["Any","Self"],$m=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],tE=["false","nil","true"],R4=["assignment","associativity","higherThan","left","lowerThan","none","right"],M4=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],nE=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],k_=_n(/[/=\-+!*%<>&|^~?]/,/[\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]/),T_=_n(k_,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Fm=gt(k_,T_,"*"),C_=_n(/[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]/),Cf=_n(C_,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Hi=gt(C_,Cf,"*"),sf=gt(/[A-Z]/,Cf,"*"),j4=["attached","autoclosure",gt(/convention\(/,_n("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",gt(/objc\(/,Hi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],D4=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function L4(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,_n(...A4,...eE)],className:{2:"keyword"}},o={match:gt(/\./,_n(...$m)),relevance:0},c=$m.filter(Xe=>typeof Xe=="string").concat(["_|0"]),f=$m.filter(Xe=>typeof Xe!="string").concat(O4).map(Lg),d={variants:[{className:"keyword",match:_n(...f,...eE)}]},h={$pattern:_n(/\b\w+/,/#\w+/),keyword:c.concat(M4),literal:tE},y=[s,o,d],g={match:gt(/\./,_n(...nE)),relevance:0},x={className:"built_in",match:gt(/\b/,_n(...nE),/(?=\()/)},v=[g,x],S={match:/->/,relevance:0},_={className:"operator",relevance:0,variants:[{match:Fm},{match:`\\.(\\.|${T_})+`}]},N=[S,_],w="([0-9]_*)+",R="([0-9a-fA-F]_*)+",A={className:"number",relevance:0,variants:[{match:`\\b(${w})(\\.(${w}))?([eE][+-]?(${w}))?\\b`},{match:`\\b0x(${R})(\\.(${R}))?([pP][+-]?(${w}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},D=(Xe="")=>({className:"subst",variants:[{match:gt(/\\/,Xe,/[0\\tnr"']/)},{match:gt(/\\/,Xe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),F=(Xe="")=>({className:"subst",match:gt(/\\/,Xe,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(Xe="")=>({className:"subst",label:"interpol",begin:gt(/\\/,Xe,/\(/),end:/\)/}),q=(Xe="")=>({begin:gt(Xe,/"""/),end:gt(/"""/,Xe),contains:[D(Xe),F(Xe),M(Xe)]}),U=(Xe="")=>({begin:gt(Xe,/"/),end:gt(/"/,Xe),contains:[D(Xe),M(Xe)]}),J={className:"string",variants:[q(),q("#"),q("##"),q("###"),U(),U("#"),U("##"),U("###")]},C=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],P={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:C},Y=Xe=>{const wi=gt(Xe,/\//),li=gt(/\//,Xe);return{begin:wi,end:li,contains:[...C,{scope:"comment",begin:`#(?!.*${li})`,end:/$/}]}},le={scope:"regexp",variants:[Y("###"),Y("##"),Y("#"),P]},H={match:gt(/`/,Hi,/`/)},Q={className:"variable",match:/\$\d+/},G={className:"variable",match:`\\$${Cf}+`},oe=[H,Q,G],Z={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:D4,contains:[...N,A,J]}]}},pe={scope:"keyword",match:gt(/@/,_n(...j4),Xo(_n(/\(/,/\s+/)))},O={scope:"meta",match:gt(/@/,Hi)},L=[Z,pe,O],te={match:Xo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:gt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Cf,"+")},{className:"type",match:sf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:gt(/\s+&\s+/,Xo(sf)),relevance:0}]},T={begin:/</,end:/>/,keywords:h,contains:[...a,...y,...L,S,te]};te.contains.push(T);const he={match:gt(Hi,/\s*:/),keywords:"_|0",relevance:0},Ne={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",he,...a,le,...y,...v,...N,A,J,...oe,...L,te]},ve={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,te]},Fe={begin:_n(Xo(gt(Hi,/\s*:/)),Xo(gt(Hi,/\s+/,Hi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Hi}]},st={begin:/\(/,end:/\)/,keywords:h,contains:[Fe,...a,...y,...N,A,J,...L,te,Ne],endsParent:!0,illegal:/["']/},it={match:[/(func|macro)/,/\s+/,_n(H.match,Hi,Fm)],className:{1:"keyword",3:"title.function"},contains:[ve,st,t],illegal:[/\[/,/%/]},Wt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ve,st,t],illegal:/\[|%/},Kn={match:[/operator/,/\s+/,Fm],className:{1:"keyword",3:"title"}},Ji={begin:[/precedencegroup/,/\s+/,sf],className:{1:"keyword",3:"title"},contains:[te],keywords:[...R4,...tE],end:/}/},Ra={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Gn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ii={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Hi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[ve,...y,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:sf},...y],relevance:0}]};for(const Xe of J.variants){const wi=Xe.contains.find(zi=>zi.label==="interpol");wi.keywords=h;const li=[...y,...v,...N,A,J,...oe];wi.contains=[...li,{begin:/\(/,end:/\)/,contains:["self",...li]}]}return{name:"Swift",keywords:h,contains:[...a,it,Wt,Ra,Gn,Ii,Kn,Ji,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},le,...y,...v,...N,A,J,...oe,...L,te,Ne]}}const Af="[A-Za-z$_][0-9A-Za-z$_]*",A_=["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"],O_=["true","false","null","undefined","NaN","Infinity"],R_=["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"],M_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],j_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],D_=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],L_=[].concat(j_,R_,M_);function I4(e){const t=e.regex,n=(Z,{after:pe})=>{const O="</"+Z[0].slice(1);return Z.input.indexOf(O,pe)!==-1},a=Af,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,pe)=>{const O=Z[0].length+Z.index,L=Z.input[O];if(L==="<"||L===","){pe.ignoreMatch();return}L===">"&&(n(Z,{after:O})||pe.ignoreMatch());let te;const T=Z.input.substring(O);if(te=T.match(/^\s*=/)){pe.ignoreMatch();return}if((te=T.match(/^\s+extends\s+/))&&te.index===0){pe.ignoreMatch();return}}},f={$pattern:Af,keyword:A_,literal:O_,built_in:L_,"variable.language":D_},d="[0-9](_?[0-9])*",h=`\\.(${d})`,y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${y})((${h})|\\.)?|(${h}))[eE][+-]?(${d})\\b`},{begin:`\\b(${y})\\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},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},R={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:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,_,N,{match:/\$\d+/},g];x.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const D=[].concat(R,x.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},q={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},U={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:{_:[...R_,...M_]}},J={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Y(Z){return t.concat("(?!",Z.join("|"),")")}const le={match:t.concat(/\b/,Y([...j_,"super","import"].map(Z=>`${Z}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},H={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},G="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(G)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),J,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,_,N,R,{match:/\$\d+/},g,U,{scope:"attr",match:a+t.lookahead(":"),relevance:0},oe,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin:G,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},H,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},le,P,q,Q,{match:/\$[(.]/}]}}function z4(e){const t=e.regex,n=I4(e),a=Af,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Af,keyword:A_.concat(d),literal:O_,built_in:L_.concat(s),"variable.language":D_},y={className:"meta",begin:"@"+a},g=(_,N,w)=>{const R=_.contains.findIndex(A=>A.label===N);if(R===-1)throw new Error("can not find mode to replace");_.contains.splice(R,1,w)};Object.assign(n.keywords,h),n.exports.PARAMS_CONTAINS.push(y);const x=n.contains.find(_=>_.scope==="attr"),v=Object.assign({},x,{match:t.concat(a,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,x,v]),n.contains=n.contains.concat([y,o,c,v]),g(n,"shebang",e.SHEBANG()),g(n,"use_strict",f);const S=n.contains.find(_=>_.label==="func.def");return S.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function B4(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,s),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,s),/ +/,t.either(c,f),/ *#/)}]},h={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},y={className:"label",begin:/^\w+:/},g=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),x=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:[n,a,d,h,y,g,x,{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:[x]}]}}function U4(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),a=["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"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={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:a},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,s,e.QUOTE_STRING_MODE,d,h,f]}}function $4(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(o,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{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:[o,d,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,d,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{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(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:h}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function F4(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={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"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},S={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},_={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},N=[a,{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+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{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}},x,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},S,_,o,c],w=[...N];return w.pop(),w.push(f),v.contains=w,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:N}}const P4={arduino:_z,bash:wz,c:Nz,cpp:kz,csharp:Tz,css:Iz,diff:zz,go:Bz,graphql:Uz,ini:$z,java:Fz,javascript:Gz,json:Qz,kotlin:Vz,less:i4,lua:a4,makefile:r4,markdown:s4,objectivec:l4,perl:o4,php:c4,"php-template":u4,plaintext:f4,python:d4,"python-repl":h4,r:m4,ruby:p4,rust:g4,scss:N4,shell:k4,sql:T4,swift:L4,typescript:z4,vbnet:B4,wasm:U4,xml:$4,yaml:F4};var Pm,iE;function q4(){if(iE)return Pm;iE=1;function e(B){return B instanceof Map?B.clear=B.delete=B.set=function(){throw new Error("map is read-only")}:B instanceof Set&&(B.add=B.clear=B.delete=function(){throw new Error("set is read-only")}),Object.freeze(B),Object.getOwnPropertyNames(B).forEach(ae=>{const me=B[ae],je=typeof me;(je==="object"||je==="function")&&!Object.isFrozen(me)&&e(me)}),B}class t{constructor(ae){ae.data===void 0&&(ae.data={}),this.data=ae.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(B){return B.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(B,...ae){const me=Object.create(null);for(const je in B)me[je]=B[je];return ae.forEach(function(je){for(const _t in je)me[_t]=je[_t]}),me}const s="</span>",o=B=>!!B.scope,c=(B,{prefix:ae})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const me=B.split(".");return[`${ae}${me.shift()}`,...me.map((je,_t)=>`${je}${"_".repeat(_t+1)}`)].join(" ")}return`${ae}${B}`};class f{constructor(ae,me){this.buffer="",this.classPrefix=me.classPrefix,ae.walk(this)}addText(ae){this.buffer+=n(ae)}openNode(ae){if(!o(ae))return;const me=c(ae.scope,{prefix:this.classPrefix});this.span(me)}closeNode(ae){o(ae)&&(this.buffer+=s)}value(){return this.buffer}span(ae){this.buffer+=`<span class="${ae}">`}}const d=(B={})=>{const ae={children:[]};return Object.assign(ae,B),ae};class h{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ae){this.top.children.push(ae)}openNode(ae){const me=d({scope:ae});this.add(me),this.stack.push(me)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ae){return this.constructor._walk(ae,this.rootNode)}static _walk(ae,me){return typeof me=="string"?ae.addText(me):me.children&&(ae.openNode(me),me.children.forEach(je=>this._walk(ae,je)),ae.closeNode(me)),ae}static _collapse(ae){typeof ae!="string"&&ae.children&&(ae.children.every(me=>typeof me=="string")?ae.children=[ae.children.join("")]:ae.children.forEach(me=>{h._collapse(me)}))}}class y extends h{constructor(ae){super(),this.options=ae}addText(ae){ae!==""&&this.add(ae)}startScope(ae){this.openNode(ae)}endScope(){this.closeNode()}__addSublanguage(ae,me){const je=ae.root;me&&(je.scope=`language:${me}`),this.add(je)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(B){return B?typeof B=="string"?B:B.source:null}function x(B){return _("(?=",B,")")}function v(B){return _("(?:",B,")*")}function S(B){return _("(?:",B,")?")}function _(...B){return B.map(me=>g(me)).join("")}function N(B){const ae=B[B.length-1];return typeof ae=="object"&&ae.constructor===Object?(B.splice(B.length-1,1),ae):{}}function w(...B){return"("+(N(B).capture?"":"?:")+B.map(je=>g(je)).join("|")+")"}function R(B){return new RegExp(B.toString()+"|").exec("").length-1}function A(B,ae){const me=B&&B.exec(ae);return me&&me.index===0}const D=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function F(B,{joinWith:ae}){let me=0;return B.map(je=>{me+=1;const _t=me;let bt=g(je),xe="";for(;bt.length>0;){const be=D.exec(bt);if(!be){xe+=bt;break}xe+=bt.substring(0,be.index),bt=bt.substring(be.index+be[0].length),be[0][0]==="\\"&&be[1]?xe+="\\"+String(Number(be[1])+_t):(xe+=be[0],be[0]==="("&&me++)}return xe}).map(je=>`(${je})`).join(ae)}const M=/\b\B/,q="[a-zA-Z]\\w*",U="[a-zA-Z_]\\w*",J="\\b\\d+(\\.\\d+)?",C="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",Y="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",le=(B={})=>{const ae=/^#![ ]*\//;return B.binary&&(B.begin=_(ae,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:ae,end:/$/,relevance:0,"on:begin":(me,je)=>{me.index!==0&&je.ignoreMatch()}},B)},H={begin:"\\\\[\\s\\S]",relevance:0},Q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[H]},G={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[H]},oe={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/},Z=function(B,ae,me={}){const je=a({scope:"comment",begin:B,end:ae,contains:[]},me);je.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 _t=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 je.contains.push({begin:_(/[ ]+/,"(",_t,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),je},pe=Z("//","$"),O=Z("/\\*","\\*/"),L=Z("#","$"),te={scope:"number",begin:J,relevance:0},T={scope:"number",begin:C,relevance:0},he={scope:"number",begin:P,relevance:0},Ne={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[H,{begin:/\[/,end:/\]/,relevance:0,contains:[H]}]},ve={scope:"title",begin:q,relevance:0},Fe={scope:"title",begin:U,relevance:0},st={begin:"\\.\\s*"+U,relevance:0};var Wt=Object.freeze({__proto__:null,APOS_STRING_MODE:Q,BACKSLASH_ESCAPE:H,BINARY_NUMBER_MODE:he,BINARY_NUMBER_RE:P,COMMENT:Z,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:pe,C_NUMBER_MODE:T,C_NUMBER_RE:C,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(ae,me)=>{me.data._beginMatch=ae[1]},"on:end":(ae,me)=>{me.data._beginMatch!==ae[1]&&me.ignoreMatch()}})},HASH_COMMENT_MODE:L,IDENT_RE:q,MATCH_NOTHING_RE:M,METHOD_GUARD:st,NUMBER_MODE:te,NUMBER_RE:J,PHRASAL_WORDS_MODE:oe,QUOTE_STRING_MODE:G,REGEXP_MODE:Ne,RE_STARTERS_RE:Y,SHEBANG:le,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:U,UNDERSCORE_TITLE_MODE:Fe});function Kn(B,ae){B.input[B.index-1]==="."&&ae.ignoreMatch()}function Ji(B,ae){B.className!==void 0&&(B.scope=B.className,delete B.className)}function Ra(B,ae){ae&&B.beginKeywords&&(B.begin="\\b("+B.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",B.__beforeBegin=Kn,B.keywords=B.keywords||B.beginKeywords,delete B.beginKeywords,B.relevance===void 0&&(B.relevance=0))}function Gn(B,ae){Array.isArray(B.illegal)&&(B.illegal=w(...B.illegal))}function Ii(B,ae){if(B.match){if(B.begin||B.end)throw new Error("begin & end are not supported with match");B.begin=B.match,delete B.match}}function Xe(B,ae){B.relevance===void 0&&(B.relevance=1)}const wi=(B,ae)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const me=Object.assign({},B);Object.keys(B).forEach(je=>{delete B[je]}),B.keywords=me.keywords,B.begin=_(me.beforeMatch,x(me.begin)),B.starts={relevance:0,contains:[Object.assign(me,{endsParent:!0})]},B.relevance=0,delete me.beforeMatch},li=["of","and","for","in","not","or","if","then","parent","list","value"],zi="keyword";function ea(B,ae,me=zi){const je=Object.create(null);return typeof B=="string"?_t(me,B.split(" ")):Array.isArray(B)?_t(me,B):Object.keys(B).forEach(function(bt){Object.assign(je,ea(B[bt],ae,bt))}),je;function _t(bt,xe){ae&&(xe=xe.map(be=>be.toLowerCase())),xe.forEach(function(be){const Me=be.split("|");je[Me[0]]=[bt,kr(Me[0],Me[1])]})}}function kr(B,ae){return ae?Number(ae):Ql(B)?0:1}function Ql(B){return li.includes(B.toLowerCase())}const ys={},Ot=B=>{console.error(B)},xs=(B,...ae)=>{console.log(`WARN: ${B}`,...ae)},ne=(B,ae)=>{ys[`${B}/${ae}`]||(console.log(`Deprecated as of ${B}. ${ae}`),ys[`${B}/${ae}`]=!0)},fe=new Error;function Ce(B,ae,{key:me}){let je=0;const _t=B[me],bt={},xe={};for(let be=1;be<=ae.length;be++)xe[be+je]=_t[be],bt[be+je]=!0,je+=R(ae[be-1]);B[me]=xe,B[me]._emit=bt,B[me]._multi=!0}function Pe(B){if(Array.isArray(B.begin)){if(B.skip||B.excludeBegin||B.returnBegin)throw Ot("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),fe;if(typeof B.beginScope!="object"||B.beginScope===null)throw Ot("beginScope must be object"),fe;Ce(B,B.begin,{key:"beginScope"}),B.begin=F(B.begin,{joinWith:""})}}function et(B){if(Array.isArray(B.end)){if(B.skip||B.excludeEnd||B.returnEnd)throw Ot("skip, excludeEnd, returnEnd not compatible with endScope: {}"),fe;if(typeof B.endScope!="object"||B.endScope===null)throw Ot("endScope must be object"),fe;Ce(B,B.end,{key:"endScope"}),B.end=F(B.end,{joinWith:""})}}function yn(B){B.scope&&typeof B.scope=="object"&&B.scope!==null&&(B.beginScope=B.scope,delete B.scope)}function Ni(B){yn(B),typeof B.beginScope=="string"&&(B.beginScope={_wrap:B.beginScope}),typeof B.endScope=="string"&&(B.endScope={_wrap:B.endScope}),Pe(B),et(B)}function an(B){function ae(xe,be){return new RegExp(g(xe),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(be?"g":""))}class me{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(be,Me){Me.position=this.position++,this.matchIndexes[this.matchAt]=Me,this.regexes.push([Me,be]),this.matchAt+=R(be)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const be=this.regexes.map(Me=>Me[1]);this.matcherRe=ae(F(be,{joinWith:"|"}),!0),this.lastIndex=0}exec(be){this.matcherRe.lastIndex=this.lastIndex;const Me=this.matcherRe.exec(be);if(!Me)return null;const Ut=Me.findIndex((ta,Es)=>Es>0&&ta!==void 0),kt=this.matchIndexes[Ut];return Me.splice(0,Ut),Object.assign(Me,kt)}}class je{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(be){if(this.multiRegexes[be])return this.multiRegexes[be];const Me=new me;return this.rules.slice(be).forEach(([Ut,kt])=>Me.addRule(Ut,kt)),Me.compile(),this.multiRegexes[be]=Me,Me}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(be,Me){this.rules.push([be,Me]),Me.type==="begin"&&this.count++}exec(be){const Me=this.getMatcher(this.regexIndex);Me.lastIndex=this.lastIndex;let Ut=Me.exec(be);if(this.resumingScanAtSamePosition()&&!(Ut&&Ut.index===this.lastIndex)){const kt=this.getMatcher(0);kt.lastIndex=this.lastIndex+1,Ut=kt.exec(be)}return Ut&&(this.regexIndex+=Ut.position+1,this.regexIndex===this.count&&this.considerAll()),Ut}}function _t(xe){const be=new je;return xe.contains.forEach(Me=>be.addRule(Me.begin,{rule:Me,type:"begin"})),xe.terminatorEnd&&be.addRule(xe.terminatorEnd,{type:"end"}),xe.illegal&&be.addRule(xe.illegal,{type:"illegal"}),be}function bt(xe,be){const Me=xe;if(xe.isCompiled)return Me;[Ji,Ii,Ni,wi].forEach(kt=>kt(xe,be)),B.compilerExtensions.forEach(kt=>kt(xe,be)),xe.__beforeBegin=null,[Ra,Gn,Xe].forEach(kt=>kt(xe,be)),xe.isCompiled=!0;let Ut=null;return typeof xe.keywords=="object"&&xe.keywords.$pattern&&(xe.keywords=Object.assign({},xe.keywords),Ut=xe.keywords.$pattern,delete xe.keywords.$pattern),Ut=Ut||/\w+/,xe.keywords&&(xe.keywords=ea(xe.keywords,B.case_insensitive)),Me.keywordPatternRe=ae(Ut,!0),be&&(xe.begin||(xe.begin=/\B|\b/),Me.beginRe=ae(Me.begin),!xe.end&&!xe.endsWithParent&&(xe.end=/\B|\b/),xe.end&&(Me.endRe=ae(Me.end)),Me.terminatorEnd=g(Me.end)||"",xe.endsWithParent&&be.terminatorEnd&&(Me.terminatorEnd+=(xe.end?"|":"")+be.terminatorEnd)),xe.illegal&&(Me.illegalRe=ae(xe.illegal)),xe.contains||(xe.contains=[]),xe.contains=[].concat(...xe.contains.map(function(kt){return un(kt==="self"?xe:kt)})),xe.contains.forEach(function(kt){bt(kt,Me)}),xe.starts&&bt(xe.starts,be),Me.matcher=_t(Me),Me}if(B.compilerExtensions||(B.compilerExtensions=[]),B.contains&&B.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return B.classNameAliases=a(B.classNameAliases||{}),bt(B)}function Dt(B){return B?B.endsWithParent||Dt(B.starts):!1}function un(B){return B.variants&&!B.cachedVariants&&(B.cachedVariants=B.variants.map(function(ae){return a(B,{variants:null},ae)})),B.cachedVariants?B.cachedVariants:Dt(B)?a(B,{starts:B.starts?a(B.starts):null}):Object.isFrozen(B)?a(B):B}var lt="11.11.1";class Bi extends Error{constructor(ae,me){super(ae),this.name="HTMLInjectionError",this.html=me}}const xn=n,kc=a,Tr=Symbol("nomatch"),vs=7,Cr=function(B){const ae=Object.create(null),me=Object.create(null),je=[];let _t=!0;const bt="Could not find the language '{}', did you forget to load/include a language module?",xe={disableAutodetect:!0,name:"Plain text",contains:[]};let be={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:y};function Me(ce){return be.noHighlightRe.test(ce)}function Ut(ce){let _e=ce.className+" ";_e+=ce.parentNode?ce.parentNode.className:"";const qe=be.languageDetectRe.exec(_e);if(qe){const ot=vn(qe[1]);return ot||(xs(bt.replace("{}",qe[1])),xs("Falling back to no-highlight mode for this block.",ce)),ot?qe[1]:"no-highlight"}return _e.split(/\s+/).find(ot=>Me(ot)||vn(ot))}function kt(ce,_e,qe){let ot="",Ft="";typeof _e=="object"?(ot=ce,qe=_e.ignoreIllegals,Ft=_e.language):(ne("10.7.0","highlight(lang, code, ...args) has been deprecated."),ne("10.7.0",`Please use highlight(code, options) instead.
508
+ https://github.com/highlightjs/highlight.js/issues/2277`),Ft=ce,ot=_e),qe===void 0&&(qe=!0);const dn={code:ot,language:Ft};Or("before:highlight",dn);const Qn=dn.result?dn.result:ta(dn.language,dn.code,qe);return Qn.code=dn.code,Or("after:highlight",Qn),Qn}function ta(ce,_e,qe,ot){const Ft=Object.create(null);function dn(de,Ee){return de.keywords[Ee]}function Qn(){if(!Oe.keywords){Kt.addText(ct);return}let de=0;Oe.keywordPatternRe.lastIndex=0;let Ee=Oe.keywordPatternRe.exec(ct),Ie="";for(;Ee;){Ie+=ct.substring(de,Ee.index);const Qe=rn.case_insensitive?Ee[0].toLowerCase():Ee[0],Rt=dn(Oe,Qe);if(Rt){const[oi,Jl]=Rt;if(Kt.addText(Ie),Ie="",Ft[Qe]=(Ft[Qe]||0)+1,Ft[Qe]<=vs&&(La+=Jl),oi.startsWith("_"))Ie+=Ee[0];else{const jc=rn.classNameAliases[oi]||oi;Yn(Ee[0],jc)}}else Ie+=Ee[0];de=Oe.keywordPatternRe.lastIndex,Ee=Oe.keywordPatternRe.exec(ct)}Ie+=ct.substring(de),Kt.addText(Ie)}function An(){if(ct==="")return;let de=null;if(typeof Oe.subLanguage=="string"){if(!ae[Oe.subLanguage]){Kt.addText(ct);return}de=ta(Oe.subLanguage,ct,!0,Mc[Oe.subLanguage]),Mc[Oe.subLanguage]=de._top}else de=Ss(ct,Oe.subLanguage.length?Oe.subLanguage:null);Oe.relevance>0&&(La+=de.relevance),Kt.__addSublanguage(de._emitter,de.language)}function Et(){Oe.subLanguage!=null?An():Qn(),ct=""}function Yn(de,Ee){de!==""&&(Kt.startScope(Ee),Kt.addText(de),Kt.endScope())}function Oc(de,Ee){let Ie=1;const Qe=Ee.length-1;for(;Ie<=Qe;){if(!de._emit[Ie]){Ie++;continue}const Rt=rn.classNameAliases[de[Ie]]||de[Ie],oi=Ee[Ie];Rt?Yn(oi,Rt):(ct=oi,Qn(),ct=""),Ie++}}function ws(de,Ee){return de.scope&&typeof de.scope=="string"&&Kt.openNode(rn.classNameAliases[de.scope]||de.scope),de.beginScope&&(de.beginScope._wrap?(Yn(ct,rn.classNameAliases[de.beginScope._wrap]||de.beginScope._wrap),ct=""):de.beginScope._multi&&(Oc(de.beginScope,Ee),ct="")),Oe=Object.create(de,{parent:{value:Oe}}),Oe}function Xl(de,Ee,Ie){let Qe=A(de.endRe,Ie);if(Qe){if(de["on:end"]){const Rt=new t(de);de["on:end"](Ee,Rt),Rt.isMatchIgnored&&(Qe=!1)}if(Qe){for(;de.endsParent&&de.parent;)de=de.parent;return de}}if(de.endsWithParent)return Xl(de.parent,Ee,Ie)}function Ns(de){return Oe.matcher.regexIndex===0?(ct+=de[0],1):(Ia=!0,0)}function nd(de){const Ee=de[0],Ie=de.rule,Qe=new t(Ie),Rt=[Ie.__beforeBegin,Ie["on:begin"]];for(const oi of Rt)if(oi&&(oi(de,Qe),Qe.isMatchIgnored))return Ns(Ee);return Ie.skip?ct+=Ee:(Ie.excludeBegin&&(ct+=Ee),Et(),!Ie.returnBegin&&!Ie.excludeBegin&&(ct=Ee)),ws(Ie,de),Ie.returnBegin?0:Ee.length}function On(de){const Ee=de[0],Ie=_e.substring(de.index),Qe=Xl(Oe,de,Ie);if(!Qe)return Tr;const Rt=Oe;Oe.endScope&&Oe.endScope._wrap?(Et(),Yn(Ee,Oe.endScope._wrap)):Oe.endScope&&Oe.endScope._multi?(Et(),Oc(Oe.endScope,de)):Rt.skip?ct+=Ee:(Rt.returnEnd||Rt.excludeEnd||(ct+=Ee),Et(),Rt.excludeEnd&&(ct=Ee));do Oe.scope&&Kt.closeNode(),!Oe.skip&&!Oe.subLanguage&&(La+=Oe.relevance),Oe=Oe.parent;while(Oe!==Qe.parent);return Qe.starts&&ws(Qe.starts,de),Rt.returnEnd?0:Ee.length}function Zl(){const de=[];for(let Ee=Oe;Ee!==rn;Ee=Ee.parent)Ee.scope&&de.unshift(Ee.scope);de.forEach(Ee=>Kt.openNode(Ee))}let Rr={};function ks(de,Ee){const Ie=Ee&&Ee[0];if(ct+=de,Ie==null)return Et(),0;if(Rr.type==="begin"&&Ee.type==="end"&&Rr.index===Ee.index&&Ie===""){if(ct+=_e.slice(Ee.index,Ee.index+1),!_t){const Qe=new Error(`0 width match regex (${ce})`);throw Qe.languageName=ce,Qe.badRule=Rr.rule,Qe}return 1}if(Rr=Ee,Ee.type==="begin")return nd(Ee);if(Ee.type==="illegal"&&!qe){const Qe=new Error('Illegal lexeme "'+Ie+'" for mode "'+(Oe.scope||"<unnamed>")+'"');throw Qe.mode=Oe,Qe}else if(Ee.type==="end"){const Qe=On(Ee);if(Qe!==Tr)return Qe}if(Ee.type==="illegal"&&Ie==="")return ct+=`
509
+ `,1;if(Wl>1e5&&Wl>Ee.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ct+=Ie,Ie.length}const rn=vn(ce);if(!rn)throw Ot(bt.replace("{}",ce)),new Error('Unknown language: "'+ce+'"');const Rc=an(rn);let Ts="",Oe=ot||Rc;const Mc={},Kt=new be.__emitter(be);Zl();let ct="",La=0,aa=0,Wl=0,Ia=!1;try{if(rn.__emitTokens)rn.__emitTokens(_e,Kt);else{for(Oe.matcher.considerAll();;){Wl++,Ia?Ia=!1:Oe.matcher.considerAll(),Oe.matcher.lastIndex=aa;const de=Oe.matcher.exec(_e);if(!de)break;const Ee=_e.substring(aa,de.index),Ie=ks(Ee,de);aa=de.index+Ie}ks(_e.substring(aa))}return Kt.finalize(),Ts=Kt.toHTML(),{language:ce,value:Ts,relevance:La,illegal:!1,_emitter:Kt,_top:Oe}}catch(de){if(de.message&&de.message.includes("Illegal"))return{language:ce,value:xn(_e),illegal:!0,relevance:0,_illegalBy:{message:de.message,index:aa,context:_e.slice(aa-100,aa+100),mode:de.mode,resultSoFar:Ts},_emitter:Kt};if(_t)return{language:ce,value:xn(_e),illegal:!1,relevance:0,errorRaised:de,_emitter:Kt,_top:Oe};throw de}}function Es(ce){const _e={value:xn(ce),illegal:!1,relevance:0,_top:xe,_emitter:new be.__emitter(be)};return _e._emitter.addText(ce),_e}function Ss(ce,_e){_e=_e||be.languages||Object.keys(ae);const qe=Es(ce),ot=_e.filter(vn).filter(ja).map(Et=>ta(Et,ce,!1));ot.unshift(qe);const Ft=ot.sort((Et,Yn)=>{if(Et.relevance!==Yn.relevance)return Yn.relevance-Et.relevance;if(Et.language&&Yn.language){if(vn(Et.language).supersetOf===Yn.language)return 1;if(vn(Yn.language).supersetOf===Et.language)return-1}return 0}),[dn,Qn]=Ft,An=dn;return An.secondBest=Qn,An}function Ui(ce,_e,qe){const ot=_e&&me[_e]||qe;ce.classList.add("hljs"),ce.classList.add(`language-${ot}`)}function $t(ce){let _e=null;const qe=Ut(ce);if(Me(qe))return;if(Or("before:highlightElement",{el:ce,language:qe}),ce.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ce);return}if(ce.children.length>0&&(be.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(ce)),be.throwUnescapedHTML))throw new Bi("One of your code blocks includes unescaped HTML.",ce.innerHTML);_e=ce;const ot=_e.textContent,Ft=qe?kt(ot,{language:qe,ignoreIllegals:!0}):Ss(ot);ce.innerHTML=Ft.value,ce.dataset.highlighted="yes",Ui(ce,qe,Ft.language),ce.result={language:Ft.language,re:Ft.relevance,relevance:Ft.relevance},Ft.secondBest&&(ce.secondBest={language:Ft.secondBest.language,relevance:Ft.secondBest.relevance}),Or("after:highlightElement",{el:ce,result:Ft,text:ot})}function fn(ce){be=kc(be,ce)}const Ma=()=>{_s(),ne("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Yl(){_s(),ne("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Tc=!1;function _s(){function ce(){_s()}if(document.readyState==="loading"){Tc||window.addEventListener("DOMContentLoaded",ce,!1),Tc=!0;return}document.querySelectorAll(be.cssSelector).forEach($t)}function Cc(ce,_e){let qe=null;try{qe=_e(B)}catch(ot){if(Ot("Language definition for '{}' could not be registered.".replace("{}",ce)),_t)Ot(ot);else throw ot;qe=xe}qe.name||(qe.name=ce),ae[ce]=qe,qe.rawDefinition=_e.bind(null,B),qe.aliases&&na(qe.aliases,{languageName:ce})}function Ar(ce){delete ae[ce];for(const _e of Object.keys(me))me[_e]===ce&&delete me[_e]}function Vl(){return Object.keys(ae)}function vn(ce){return ce=(ce||"").toLowerCase(),ae[ce]||ae[me[ce]]}function na(ce,{languageName:_e}){typeof ce=="string"&&(ce=[ce]),ce.forEach(qe=>{me[qe.toLowerCase()]=_e})}function ja(ce){const _e=vn(ce);return _e&&!_e.disableAutodetect}function Da(ce){ce["before:highlightBlock"]&&!ce["before:highlightElement"]&&(ce["before:highlightElement"]=_e=>{ce["before:highlightBlock"](Object.assign({block:_e.el},_e))}),ce["after:highlightBlock"]&&!ce["after:highlightElement"]&&(ce["after:highlightElement"]=_e=>{ce["after:highlightBlock"](Object.assign({block:_e.el},_e))})}function Ht(ce){Da(ce),je.push(ce)}function Ac(ce){const _e=je.indexOf(ce);_e!==-1&&je.splice(_e,1)}function Or(ce,_e){const qe=ce;je.forEach(function(ot){ot[qe]&&ot[qe](_e)})}function ia(ce){return ne("10.7.0","highlightBlock will be removed entirely in v12.0"),ne("10.7.0","Please use highlightElement now."),$t(ce)}Object.assign(B,{highlight:kt,highlightAuto:Ss,highlightAll:_s,highlightElement:$t,highlightBlock:ia,configure:fn,initHighlighting:Ma,initHighlightingOnLoad:Yl,registerLanguage:Cc,unregisterLanguage:Ar,listLanguages:Vl,getLanguage:vn,registerAliases:na,autoDetection:ja,inherit:kc,addPlugin:Ht,removePlugin:Ac}),B.debugMode=function(){_t=!1},B.safeMode=function(){_t=!0},B.versionString=lt,B.regex={concat:_,lookahead:x,either:w,optional:S,anyNumberOfTimes:v};for(const ce in Wt)typeof Wt[ce]=="object"&&e(Wt[ce]);return Object.assign(B,Wt),B},Cn=Cr({});return Cn.newInstance=()=>Cr({}),Pm=Cn,Cn.HighlightJS=Cn,Cn.default=Cn,Pm}var H4=q4();const K4=kp(H4),aE={},G4="hljs-";function Q4(e){const t=K4.newInstance();return e&&o(e),{highlight:n,highlightAuto:a,listLanguages:s,register:o,registerAlias:c,registered:f};function n(d,h,y){const g=y||aE,x=typeof g.prefix=="string"?g.prefix:G4;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:Y4,classPrefix:x});const v=t.highlight(h,{ignoreIllegals:!0,language:d});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const S=v._emitter.root,_=S.data;return _.language=v.language,_.relevance=v.relevance,S}function a(d,h){const g=(h||aE).subset||s();let x=-1,v=0,S;for(;++x<g.length;){const _=g[x];if(!t.getLanguage(_))continue;const N=n(_,d,h);N.data&&N.data.relevance!==void 0&&N.data.relevance>v&&(v=N.data.relevance,S=N)}return S||{type:"root",children:[],data:{language:void 0,relevance:v}}}function s(){return t.listLanguages()}function o(d,h){if(typeof d=="string")t.registerLanguage(d,h);else{let y;for(y in d)Object.hasOwn(d,y)&&t.registerLanguage(y,d[y])}}function c(d,h){if(typeof d=="string")t.registerAliases(typeof h=="string"?h:[...h],{languageName:d});else{let y;for(y in d)if(Object.hasOwn(d,y)){const g=d[y];t.registerAliases(typeof g=="string"?g:[...g],{languageName:y})}}}function f(d){return!!t.getLanguage(d)}}class Y4{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 n=this.stack[this.stack.length-1],a=n.children[n.children.length-1];a&&a.type==="text"?a.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const a=this.stack[this.stack.length-1],s=t.root.children;n?a.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):a.children.push(...s)}openNode(t){const n=this,a=t.split(".").map(function(c,f){return f?c+"_".repeat(f):n.options.classPrefix+c}),s=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:a},children:[]};s.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const V4={};function Ig(e){const t=e||V4,n=t.aliases,a=t.detect||!1,s=t.languages||P4,o=t.plainText,c=t.prefix,f=t.subset;let d="hljs";const h=Q4(s);if(n&&h.registerAlias(n),c){const y=c.indexOf("-");d=y===-1?c:c.slice(0,y)}return function(y,g){td(y,"element",function(x,v,S){if(x.tagName!=="code"||!S||S.type!=="element"||S.tagName!=="pre")return;const _=X4(x);if(_===!1||!_&&!a||_&&o&&o.includes(_))return;Array.isArray(x.properties.className)||(x.properties.className=[]),x.properties.className.includes(d)||x.properties.className.unshift(d);const N=pz(x,{whitespace:"pre"});let w;try{w=_?h.highlight(_,N,{prefix:c}):h.highlightAuto(N,{prefix:c,subset:f})}catch(R){const A=R;if(_&&/Unknown language/.test(A.message)){g.message("Cannot highlight as `"+_+"`, it’s not registered",{ancestors:[S,x],cause:A,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw A}!_&&w.data&&w.data.language&&x.properties.className.push("language-"+w.data.language),w.children.length>0&&(x.children=w.children)})}}function X4(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let a;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!a&&s.slice(0,5)==="lang-"&&(a=s.slice(5)),!a&&s.slice(0,9)==="language-"&&(a=s.slice(9))}return a}function Z4({name:e,projects:t,onClose:n,onChange:a}){const{confirm:s}=qn(),{data:o,isLoading:c,isError:f,error:d,refetch:h}=dt({queryKey:["skill",e],queryFn:()=>$O(e)});j.useEffect(()=>{const _=N=>{N.key==="Escape"&&n()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[n]);const y=async _=>{await PO(e,_),h(),a()},g=async _=>{await s({title:`从 ${_} 移除 ${e}`,body:"skill 链接会被解除,项目后续运行时将无法使用该 skill。",confirm:"移除",danger:!0})&&(await qO(e,_),h(),a())},x=async _=>{await HO(e,_),h(),a()},v=async _=>{await s({title:`解冻 ${e} @ ${_}`,body:"本地对这个 skill 的改动会被覆盖,回到最新共享版本。",confirm:"解冻",danger:!0})&&(await KO(e,_),h(),a())},S=new Map(((o==null?void 0:o.linkedProjects)??[]).map(_=>[_.project,_.state]));return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:n,children:m.jsxs("div",{onClick:_=>_.stopPropagation(),className:"nb-card mt-8 w-full max-w-4xl",children:[m.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[m.jsxs("div",{children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),o&&m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[o.category," · ",o.origin||"local"]})]}),m.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:m.jsx(Er,{size:16,strokeWidth:3})})]}),c&&m.jsx("p",{children:"加载中…"}),f&&m.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",d instanceof Error?d.message:String(d)]}),o&&m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-3 uppercase tracking-wider",children:"项目链接状态"}),m.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(_=>{const N=S.get(_);return m.jsxs("div",{className:"flex items-center justify-between gap-3 p-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:_}),N==="linked"&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),N==="frozen"&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!N&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-idle-bg)",color:"var(--color-idle)"},children:"absent"})]}),m.jsxs("div",{className:"flex gap-2",children:[!N&&m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>y(_),type:"button",children:[m.jsx(sA,{size:11})," link"]}),N==="linked"&&m.jsxs(m.Fragment,{children:[m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(_),type:"button",children:[m.jsx(TA,{size:11})," freeze"]}),m.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>g(_),type:"button",children:"unlink"})]}),N==="frozen"&&m.jsxs(m.Fragment,{children:[m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(_),type:"button",children:[m.jsx(PC,{size:11})," unfreeze"]}),m.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>g(_),type:"button",children:"unlink"})]})]})]},_)}),t.length===0&&m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"还没有任何项目。先去创建一个项目。"})]})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"SKILL.md 预览"}),m.jsx("div",{className:"prose-chat bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-80 overflow-auto text-sm",children:o.body?m.jsx(Ag,{remarkPlugins:[jg],rehypePlugins:[Ig],children:o.body}):m.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),o.references.length>0&&m.jsxs("div",{children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),m.jsx("ul",{className:"flex flex-col gap-2",children:o.references.map(_=>m.jsx(W4,{skillName:e,file:_.name,lines:_.lines},_.name))})]})]})]})})}function W4({skillName:e,file:t,lines:n}){const[a,s]=j.useState(!1),{data:o,isLoading:c,isError:f,error:d}=dt({queryKey:["skill-ref",e,t],queryFn:()=>FO(e,t),enabled:a,staleTime:1/0});return m.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[m.jsxs("button",{type:"button",onClick:()=>s(h=>!h),"aria-label":`${a?"收起":"展开"} ${t}`,"aria-expanded":a,className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[m.jsx(WE,{size:12,strokeWidth:3,className:["transition-transform",a?"rotate-90":""].join(" ")}),m.jsx(Hp,{size:12,strokeWidth:2.5}),m.jsx("span",{className:"flex-1 text-left font-bold",children:t}),m.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[n," lines"]})]}),a&&m.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[c&&m.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"加载中…"}),f&&m.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["加载失败: ",d instanceof Error?d.message:String(d)]}),o&&m.jsx("div",{className:"prose-chat text-sm",children:m.jsx(Ag,{remarkPlugins:[jg],rehypePlugins:[Ig],children:o.content})})]})]})}const J4=[{value:"all",label:"全部"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],eB={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function tB(){var x;const[e,t]=j.useState("all"),[n,a]=j.useState(""),[s,o]=j.useState(null),c=Tn(),{data:f,isLoading:d}=dt({queryKey:["skills"],queryFn:()=>ug()}),h=dt({queryKey:["projects"],queryFn:zl}),y=j.useMemo(()=>((f==null?void 0:f.data)??[]).filter(S=>!(e!=="all"&&S.category!==e||n&&!S.name.toLowerCase().includes(n.toLowerCase()))),[f,e,n]),g=j.useMemo(()=>{const v=(f==null?void 0:f.data)??[],S={all:v.length};for(const _ of v)S[_.category]=(S[_.category]??0)+1;return S},[f]);return m.jsxs("div",{className:"flex flex-col gap-4 max-w-6xl",children:[m.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:d?"加载中…":`${(f==null?void 0:f.data.length)??0} 个 user-level skill`})]}),m.jsx("div",{className:"flex gap-3 items-center",children:m.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await GO(),c.invalidateQueries({queryKey:["skills"]})},type:"button",children:[m.jsx(hs,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsxs("div",{className:"relative flex-1 max-w-md",children:[m.jsx(xf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),m.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索 skill…",value:n,onChange:v=>a(v.target.value),"aria-label":"搜索 skill"})]}),m.jsx("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:J4.map(v=>m.jsxs("button",{type:"button",onClick:()=>t(v.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",e===v.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[v.label," ",g[v.value]]},v.value))})]}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-4",children:y.map(v=>{var S;return m.jsx(nB,{skill:v,projectCount:((S=h.data)==null?void 0:S.data.length)??0,onOpen:()=>o(v.name)},v.name)})}),s&&m.jsx(Z4,{name:s,projects:((x=h.data)==null?void 0:x.data.map(v=>v.name))??[],onClose:()=>o(null),onChange:()=>c.invalidateQueries({queryKey:["skills"]})})]})}function nB({skill:e,projectCount:t,onOpen:n}){const a=eB[e.category];return m.jsxs("article",{onClick:n,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n())},tabIndex:0,role:"button","aria-label":`Open ${e.name}`,className:"nb-card nb-card-interactive flex flex-col gap-3",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),m.jsx("span",{className:"nb-badge text-[10px]",style:{background:a},children:e.category})]}),m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),m.jsxs("div",{className:"flex items-center justify-between text-xs font-[family-name:var(--font-mono)] pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[m.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),m.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function iB(){var o;const e=dt({queryKey:["system-info"],queryFn:r1}),t=dt({queryKey:["system-env"],queryFn:HA}),n=dt({queryKey:["doctor"],queryFn:KA}),[a,s]=j.useState(!1);return m.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[m.jsx("header",{children:m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),m.jsx(aB,{current:(o=e.data)==null?void 0:o.version}),m.jsxs("section",{className:"nb-card",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"运行时"}),e.data?m.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[m.jsx("dt",{className:"font-bold",children:"Node"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.nodeVersion}),m.jsx("dt",{className:"font-bold",children:"Platform"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.platform}),m.jsx("dt",{className:"font-bold",children:"PID"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.pid??"—"}),m.jsx("dt",{className:"font-bold",children:"Uptime"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:sB(e.data.uptimeMs)})]}):m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})]}),m.jsxs("section",{className:"nb-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:["全局配置 ",m.jsx("code",{className:"text-sm font-[family-name:var(--font-mono)] font-normal bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"~/.coral/env"})]}),a?m.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 编辑模式"}):m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>s(!0),type:"button","aria-label":"编辑 env 文件",children:[m.jsx(Kp,{size:12,strokeWidth:2.5})," 编辑"]})]}),a?m.jsx(rB,{onClose:()=>{s(!1),t.refetch()}}):t.data&&t.data.exists?m.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:t.data.entries.map(c=>m.jsxs("div",{className:"contents",children:[m.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[c.masked&&m.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),c.key]}),m.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:c.value})]},c.key))}):m.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:['env 文件不存在。点"编辑"或者终端运行 ',m.jsx("code",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded font-[family-name:var(--font-mono)]",children:"sps setup"}),"。"]})]}),m.jsxs("section",{className:"nb-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"项目健康检查"}),m.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>n.refetch(),type:"button",children:[m.jsx(hs,{size:12,strokeWidth:2.5}),"重跑"]})]}),n.data&&n.data.data.length>0?m.jsx("ul",{className:"flex flex-col gap-2",children:n.data.data.map(c=>m.jsxs("li",{className:"flex items-center gap-3 px-3 py-2 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[c.ok?m.jsx(MC,{size:16,className:"text-[var(--color-running)]",strokeWidth:2.5}):m.jsx(Pp,{size:16,className:"text-[var(--color-stuck)]",strokeWidth:2.5}),m.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:c.project}),c.issues.length>0?m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:c.issues.join("; ")}):m.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"})]},c.project))}):m.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:"还没有项目。"})]})]})}function aB({current:e}){const{confirm:t,alert:n}=qn(),[a,s]=j.useState(!1),[o,c]=j.useState(null),f=dt({queryKey:["latest-version"],queryFn:YA,enabled:!1}),d=async()=>{var y;if(await t({title:"升级 sps-cli",body:`当前 ${e},升级到 ${(y=f.data)==null?void 0:y.latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。`,confirm:"升级"})){s(!0),c(null);try{const g=await VA();c(g.output),g.ok?n({title:"升级完成",body:'请手动 `pkill -f "sps console"` 再重新启动以生效。'}):n({title:"升级失败",body:g.output.slice(-500)})}catch(g){c(g.message),n({title:"升级失败",body:g.message})}finally{s(!1)}}};return m.jsxs("section",{className:"nb-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"版本"}),m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f.refetch(),disabled:f.isFetching||!e,type:"button","aria-label":"检查最新版本",children:[f.isFetching?m.jsx(Zt,{size:12,strokeWidth:3,className:"animate-spin"}):m.jsx(hs,{size:12,strokeWidth:2.5}),"检查更新"]})]}),m.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[m.jsx("dt",{className:"font-bold",children:"sps-cli (当前)"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),f.data&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{className:"font-bold",children:"npm (最新)"}),m.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[f.data.latest,f.data.upToDate?m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"最新"}):m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:d,disabled:a,type:"button","aria-label":"升级到最新版本",children:[a?m.jsx(Zt,{size:11,strokeWidth:3,className:"animate-spin"}):m.jsx(JE,{size:11,strokeWidth:2.5}),"升级"]})]})]}),f.isError&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{className:"font-bold",children:"检查"}),m.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:f.error instanceof Error?f.error.message:String(f.error)})]})]}),o&&m.jsx("pre",{className:"mt-3 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-40 overflow-auto whitespace-pre-wrap",children:o})]})}function rB({onClose:e}){const t=Tn(),{alert:n}=qn(),a=dt({queryKey:["system-env-raw"],queryFn:GA}),[s,o]=j.useState(null),[c,f]=j.useState(null);j.useEffect(()=>{a.data&&s===null&&(o(a.data.content),f(a.data.etag))},[a.data,s]);const d=s!==null&&a.data&&s!==a.data.content,h=Pn({mutationFn:()=>{if(s===null)throw new Error("no draft");return QA(s,c??"")},onSuccess:()=>{t.invalidateQueries({queryKey:["system-env"]}),t.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:y=>{const g=y.status;n({title:g===409?"env 被其他地方修改了":"保存失败",body:g===409?"请点取消后重开编辑。":y instanceof Error?y.message:String(y)})}});return a.isLoading?m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}):m.jsxs("div",{children:[m.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:"⚠ 文件包含凭证明文。保存时保持 0600 权限。"}),m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:s??"",onChange:y=>o(y.target.value),spellCheck:!1,"aria-label":"env 文件编辑器"}),m.jsxs("div",{className:"flex items-center justify-between mt-3",children:[m.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[c?`etag: ${c}`:"",d?" · ● 未保存":""]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:h.isPending,type:"button",children:[m.jsx(Er,{size:12,strokeWidth:3})," 取消"]}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>h.mutate(),disabled:!d||h.isPending,type:"button","aria-label":"保存 env",children:[h.isPending?m.jsx(Zt,{size:12,strokeWidth:3,className:"animate-spin"}):m.jsx(If,{size:12,strokeWidth:3}),"保存"]})]})]})]})}function sB(e){const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n}h ${a}m ${s}s`:a>0?`${a}m ${s}s`:`${s}s`}function lB(){return Bt("/api/chat/sessions")}function oB(e){return Bt(`/api/chat/sessions/${e}`)}async function rE(e={}){const t=await fetch("/api/chat/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return await t.json()}async function cB(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function uB(e,t){const n=await fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return await n.json()}async function fB(e){const t=await fetch(`/api/chat/sessions/${e}/interrupt`,{method:"POST"});if(!t.ok&&t.status!==204)throw new Error(`${t.status}: ${await t.text()}`)}function dB(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return Bt(`/api/chat/sessions/${e}/messages${n}`)}function sE(){var R,A,D,F,M,q;const{sessionId:e}=PE(),t=_r(),n=Tn(),{confirm:a,alert:s}=qn(),o=dt({queryKey:["chat-sessions"],queryFn:lB}),c=dt({queryKey:["chat-session",e],queryFn:()=>oB(e??""),enabled:!!e}),[f,d]=j.useState(null),[h,y]=j.useState(""),[g,x]=j.useState(!1),v=j.useRef(null);j.useEffect(()=>{if(!e)return;const U=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let J=!0;return U.addEventListener("open",()=>{if(J){J=!1;return}const C=n.getQueryData(["chat-session",e]),P=C!=null&&C.messages.length?C.messages[C.messages.length-1].ts:void 0;dB(e,P).then(Y=>{Y.data.length!==0&&n.setQueryData(["chat-session",e],le=>{if(!le)return le;const H=new Set(le.messages.map(G=>G.id)),Q=Y.data.filter(G=>!H.has(G.id));return Q.length===0?le:{...le,messages:[...le.messages,...Q],lastMessageAt:Q[Q.length-1].ts,messageCount:le.messageCount+Q.length}})}).catch(()=>{})}),U.addEventListener("chat.message",C=>{try{const P=JSON.parse(C.data);n.setQueryData(["chat-session",e],Y=>{if(!Y||Y.messages.some(Q=>Q.id===P.message.id))return Y;const H=Y.messages.findIndex(Q=>Q.role==="user"&&Q.id.startsWith("optim-")&&Q.content===P.message.content);if(H>=0){const Q=[...Y.messages];return Q[H]=P.message,{...Y,messages:Q}}return{...Y,messages:[...Y.messages,P.message]}})}catch{}}),U.addEventListener("chat.message.pending",C=>{try{const P=JSON.parse(C.data);d({id:P.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),U.addEventListener("chat.message.chunk.text",C=>{try{const P=JSON.parse(C.data);d(Y=>{if(!Y||Y.id!==P.assistantId)return Y;const le=[...Y.blocks],H=le[le.length-1];return H&&H.type==="text"?le[le.length-1]={...H,target:H.target+P.text}:le.push({type:"text",target:P.text,displayed:""}),{...Y,blocks:le}})}catch{}}),U.addEventListener("chat.message.chunk.tool_use",C=>{try{const P=JSON.parse(C.data);d(Y=>!Y||Y.id!==P.assistantId?Y:{...Y,blocks:[...Y.blocks,{type:"tool_use",id:P.id,title:P.title,kind:P.kind,status:P.status}]})}catch{}}),U.addEventListener("chat.message.chunk.tool_update",C=>{try{const P=JSON.parse(C.data);d(Y=>!Y||Y.id!==P.assistantId?Y:{...Y,blocks:Y.blocks.map(le=>le.type==="tool_use"&&le.id===P.id?{...le,status:P.status}:le)})}catch{}}),U.addEventListener("chat.message.complete",C=>{try{const P=JSON.parse(C.data);d(Y=>Y&&Y.id===P.assistantId?{...Y,done:!0,finalMessage:P.message}:Y)}catch{}}),()=>U.close()},[e,n]),j.useEffect(()=>{if(!f)return;const U=f.blocks.reduce((C,P)=>P.type==="text"?C+(P.target.length-P.displayed.length):C,0);if(U<=0){if(f.done&&f.finalMessage){const C=f.finalMessage;n.setQueryData(["chat-session",e],P=>!P||P.messages.some(Y=>Y.id===C.id)?P:{...P,messages:[...P.messages,C],lastMessageAt:C.ts,messageCount:P.messageCount+1}),n.invalidateQueries({queryKey:["chat-sessions"]}),d(null),x(!1)}return}const J=setTimeout(()=>{d(C=>{if(!C)return C;let P=Math.max(1,Math.ceil(U/40));const Y=C.blocks.map(le=>{if(le.type!=="text"||P<=0)return le;const H=le.target.length-le.displayed.length;if(H<=0)return le;const Q=Math.min(H,P);return P-=Q,{...le,displayed:le.target.slice(0,le.displayed.length+Q)}});return{...C,blocks:Y}})},25);return()=>clearTimeout(J)},[f,n,e]),j.useEffect(()=>{const U=v.current;U&&(U.scrollTop=U.scrollHeight)},[c.data,f]);const S=j.useCallback(async()=>{const U=await rE();n.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${U.id}`)},[n,t]),_=j.useCallback(async()=>{const U=h.trim();if(!U||g)return;let J=e;if(!J){const P=await rE();n.invalidateQueries({queryKey:["chat-sessions"]}),J=P.id,t(`/chat/${J}`,{replace:!0})}const C={id:`optim-${Date.now()}`,role:"user",content:U,ts:new Date().toISOString(),status:"complete"};n.setQueryData(["chat-session",J],P=>P?{...P,messages:[...P.messages,C],lastMessageAt:C.ts,messageCount:P.messageCount+1}:{id:J,createdAt:C.ts,lastMessageAt:C.ts,title:U.slice(0,60),project:null,messageCount:1,messages:[C]}),y(""),x(!0);try{await uB(J,U)}catch(P){x(!1),console.error("sendMessage failed",P),s({title:"发送失败",body:P instanceof Error?P.message:String(P)})}},[h,g,e,n,t,s]),N=j.useCallback(async U=>{await a({title:"删除对话",body:"对话记录会永久删除,不可恢复。",confirm:"删除",danger:!0})&&(await cB(U),n.invalidateQueries({queryKey:["chat-sessions"]}),e===U&&t("/chat"))},[n,e,t,a]),w=j.useCallback(async()=>{if(e)try{await fB(e)}catch(U){s({title:"中断失败",body:U instanceof Error?U.message:String(U)})}},[e,s]);return m.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[m.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[m.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:S,type:"button",children:[m.jsx(Zi,{size:14,strokeWidth:3}),"新建对话"]}),m.jsxs("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:["历史 ",((R=o.data)==null?void 0:R.data.length)??0]}),m.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((A=o.data)==null?void 0:A.data)??[]).map(U=>m.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",e===U.id?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[m.jsxs("button",{type:"button","aria-label":`打开对话 ${U.title}`,onClick:()=>t(`/chat/${U.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[m.jsx(Kv,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("p",{className:"text-sm font-semibold truncate",children:U.title}),m.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[U.messageCount," msg · ",B_(U.lastMessageAt??U.createdAt)]})]})]}),m.jsx("button",{type:"button","aria-label":"删除对话",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:J=>{J.stopPropagation(),N(U.id)},children:m.jsx(yc,{size:12})})]},U.id)),(((D=o.data)==null?void 0:D.data)??[]).length===0&&m.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:"还没对话。点上面新建。"})]})]}),m.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:e?m.jsxs(m.Fragment,{children:[m.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((F=c.data)==null?void 0:F.title)??"新对话"}),m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:e})]}),m.jsxs("div",{ref:v,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((M=c.data)==null?void 0:M.messages)??[]).map(U=>m.jsx(hB,{msg:U},U.id)),f&&m.jsx(mB,{pending:f}),!c.isLoading&&(((q=c.data)==null?void 0:q.messages)??[]).length===0&&!f&&!g&&m.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行"})]}),m.jsx("div",{className:"border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)]",children:m.jsxs("div",{className:"flex gap-2 items-end",children:[m.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:"说点什么… (Enter 发送,Shift+Enter 换行)",rows:2,value:h,onChange:U=>y(U.target.value),onKeyDown:U=>{U.key==="Enter"&&!U.shiftKey&&!U.nativeEvent.isComposing&&(U.preventDefault(),_())},"aria-label":"消息输入"}),f?m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:w,type:"button","aria-label":"中断生成",children:[m.jsx(n1,{size:14,strokeWidth:3}),"中断"]}):m.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:_,disabled:!h.trim()||g,type:"button","aria-label":"发送",children:[g?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(SA,{size:14,strokeWidth:3}),"发送"]})]})})]}):m.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:m.jsxs("div",{className:"text-center max-w-md",children:[m.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center mx-auto mb-4",children:m.jsx(Kv,{size:32,strokeWidth:2.5})}),m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"对话 💬"}),m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。'}),m.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:"Enter 发送 · Shift+Enter 换行 · 内容流式返回"})]})})})]})}function hB({msg:e}){const t=e.role==="user",n=e.role==="error",a=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}];return m.jsx("div",{className:t?"self-end max-w-3xl":"self-start max-w-3xl",children:m.jsxs("div",{className:["nb-card",t?"bg-[var(--color-secondary)]":n?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[m.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[t?"你":n?"错误":"assistant",m.jsx("span",{className:"font-normal",children:"·"}),m.jsx("span",{className:"font-normal",children:B_(e.ts)})]}),m.jsx("div",{className:"flex flex-col gap-2",children:a.map((s,o)=>m.jsx(pB,{block:s},o))}),e.truncated&&m.jsx("p",{className:"mt-3 px-3 py-2 bg-[var(--color-stuck-bg)] border-2 border-[var(--color-stuck)] rounded-lg text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 输出超过 10MB,已截断"})]})})}function mB({pending:e}){const t=(()=>{for(let n=e.blocks.length-1;n>=0;n--)if(e.blocks[n].type==="text")return n;return-1})();return m.jsx("div",{className:"self-start max-w-3xl",children:m.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[m.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",m.jsx("span",{className:"font-normal",children:"·"}),m.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[m.jsx(Zt,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"…"}),e.blocks.map((n,a)=>{if(n.type==="text"){const s=a===t;return m.jsxs("div",{className:"relative",children:[m.jsx(I_,{text:n.displayed}),s&&m.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},a)}return m.jsx(z_,{tool:n},a)})]})]})})}function pB({block:e}){return e.type==="text"?m.jsx(I_,{text:e.text}):m.jsx(z_,{tool:e})}function I_({text:e}){return e?m.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:m.jsx(Ag,{remarkPlugins:[jg],rehypePlugins:[Ig],children:e})}):null}function z_({tool:e}){const[t,n]=j.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return m.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[m.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[m.jsx(WE,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),m.jsx(BA,{size:12,strokeWidth:2.5}),m.jsx("span",{className:"font-bold",children:e.kind}),m.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),o&&m.jsx(Zt,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),a&&m.jsx(qp,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),s&&m.jsx(LC,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&m.jsxs("div",{className:"px-3 py-2 text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] border-t-2 border-[var(--color-text)]",children:[m.jsxs("div",{children:["id: ",m.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),m.jsxs("div",{children:["status: ",m.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function B_(e){if(!e)return"";const t=new Date(e),n=Date.now()-t.getTime();return n<6e4?"刚才":n<36e5?`${Math.floor(n/6e4)}m`:n<864e5?`${Math.floor(n/36e5)}h`:t.toLocaleDateString()}function gB(){return m.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:"404 · 页面不存在"}),m.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:"没找到这个页面。可能是链接过期了。"}),m.jsx(ji,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:"返回首页"})]})}function bB(){const[e]=jf();return e.get("project")?m.jsx(SR,{}):m.jsx(kR,{})}function yB(){return m.jsx(d2,{children:m.jsx(zT,{children:m.jsxs(zn,{element:m.jsx(u2,{}),children:[m.jsx(zn,{index:!0,element:m.jsx(DT,{to:"/projects",replace:!0})}),m.jsx(zn,{path:"/projects",element:m.jsx(h2,{})}),m.jsx(zn,{path:"/projects/new",element:m.jsx(S2,{})}),m.jsx(zn,{path:"/projects/:name",element:m.jsx(LO,{})}),m.jsx(zn,{path:"/board",element:m.jsx(bR,{})}),m.jsx(zn,{path:"/workers",element:m.jsx(bB,{})}),m.jsx(zn,{path:"/logs",element:m.jsx(BR,{})}),m.jsx(zn,{path:"/skills",element:m.jsx(tB,{})}),m.jsx(zn,{path:"/system",element:m.jsx(iB,{})}),m.jsx(zn,{path:"/chat",element:m.jsx(sE,{})}),m.jsx(zn,{path:"/chat/:sessionId",element:m.jsx(sE,{})}),m.jsx(zn,{path:"*",element:m.jsx(gB,{})})]})})})}f2();const xB=new wk({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),U_=document.getElementById("root");if(!U_)throw new Error("#root not found");JN.createRoot(U_).render(m.jsx(j.StrictMode,{children:m.jsx(Nk,{client:xB,children:m.jsx(oC,{children:m.jsx(x2,{children:m.jsx(yB,{})})})})}));