@coralai/sps-cli 0.49.7 → 0.49.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/console-assets/assets/index-BCbDtBOW.css +10 -0
- package/dist/console-assets/assets/index-Cdv5XMyV.js +509 -0
- package/dist/console-assets/index.html +2 -2
- package/dist/console-server/index.d.ts.map +1 -1
- package/dist/console-server/index.js +2 -1
- package/dist/console-server/index.js.map +1 -1
- package/dist/console-server/routes/workers.d.ts +11 -0
- package/dist/console-server/routes/workers.d.ts.map +1 -1
- package/dist/console-server/routes/workers.js +133 -7
- package/dist/console-server/routes/workers.js.map +1 -1
- package/dist/console-server/watchers/cardWatcher.d.ts +10 -0
- package/dist/console-server/watchers/cardWatcher.d.ts.map +1 -1
- package/dist/console-server/watchers/cardWatcher.js +26 -6
- package/dist/console-server/watchers/cardWatcher.js.map +1 -1
- package/dist/console-server/watchers/markerWatcher.d.ts.map +1 -1
- package/dist/console-server/watchers/markerWatcher.js +13 -5
- package/dist/console-server/watchers/markerWatcher.js.map +1 -1
- package/package.json +1 -1
- package/dist/console-assets/assets/index-Ct85CE4h.js +0 -488
- package/dist/console-assets/assets/index-DzQeUId_.css +0 -10
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
var PN=Object.defineProperty;var mv=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 pv=(e,t,n)=>qN(e,typeof t!="symbol"?t+"":t,n),im=(e,t,n)=>t.has(e)||mv("Cannot "+n);var B=(e,t,n)=>(im(e,t,"read from private field"),n?n.call(e):t.get(e)),we=(e,t,n)=>t.has(e)?mv("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 B(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:{}},Fo={};/**
|
|
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 gv;function HN(){if(gv)return Fo;gv=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 Fo.Fragment=t,Fo.jsx=n,Fo.jsxs=n,Fo}var bv;function KN(){return bv||(bv=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 yv;function GN(){if(yv)return De;yv=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(j){return j===null||typeof j!="object"?null:(j=x&&j[x]||j["@@iterator"],typeof j=="function"?j:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,N={};function w(j,te,C){this.props=j,this.context=te,this.refs=N,this.updater=C||S}w.prototype.isReactComponent={},w.prototype.setState=function(j,te){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,te,"setState")},w.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function R(){}R.prototype=w.prototype;function A(j,te,C){this.props=j,this.context=te,this.refs=N,this.updater=C||S}var D=A.prototype=new R;D.constructor=A,_(D,w.prototype),D.isPureReactComponent=!0;var P=Array.isArray;function T(){}var F={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function W(j,te,C){var he=C.ref;return{$$typeof:e,type:j,key:te,ref:he!==void 0?he:null,props:C}}function L(j,te){return W(j.type,te,j.props)}function G(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function J(j){var te={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(C){return te[C]})}var oe=/\/+/g;function H(j,te){return typeof j=="object"&&j!==null&&j.key!=null?J(""+j.key):te.toString(36)}function Q(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(T,T):(j.status="pending",j.then(function(te){j.status==="pending"&&(j.status="fulfilled",j.value=te)},function(te){j.status==="pending"&&(j.status="rejected",j.reason=te)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function K(j,te,C,he,Ne){var ve=typeof j;(ve==="undefined"||ve==="boolean")&&(j=null);var Fe=!1;if(j===null)Fe=!0;else switch(ve){case"bigint":case"string":case"number":Fe=!0;break;case"object":switch(j.$$typeof){case e:case t:Fe=!0;break;case y:return Fe=j._init,K(Fe(j._payload),te,C,he,Ne)}}if(Fe)return Ne=Ne(j),Fe=he===""?"."+H(j,0):he,P(Ne)?(C="",Fe!=null&&(C=Fe.replace(oe,"$&/")+"/"),K(Ne,te,C,"",function(Wt){return Wt})):Ne!=null&&(G(Ne)&&(Ne=L(Ne,C+(Ne.key==null||j&&j.key===Ne.key?"":(""+Ne.key).replace(oe,"$&/")+"/")+Fe)),te.push(Ne)),1;Fe=0;var st=he===""?".":he+":";if(P(j))for(var it=0;it<j.length;it++)he=j[it],ve=st+H(he,it),Fe+=K(he,te,C,ve,Ne);else if(it=v(j),typeof it=="function")for(j=it.call(j),it=0;!(he=j.next()).done;)he=he.value,ve=st+H(he,it++),Fe+=K(he,te,C,ve,Ne);else if(ve==="object"){if(typeof j.then=="function")return K(Q(j),te,C,he,Ne);throw te=String(j),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return Fe}function le(j,te,C){if(j==null)return j;var he=[],Ne=0;return K(j,he,"","",function(ve){return te.call(C,ve,Ne++)}),he}function X(j){if(j._status===-1){var te=j._result;te=te(),te.then(function(C){(j._status===0||j._status===-1)&&(j._status=1,j._result=C)},function(C){(j._status===0||j._status===-1)&&(j._status=2,j._result=C)}),j._status===-1&&(j._status=0,j._result=te)}if(j._status===1)return j._result.default;throw j._result}var pe=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},O={map:le,forEach:function(j,te,C){le(j,function(){te.apply(this,arguments)},C)},count:function(j){var te=0;return le(j,function(){te++}),te},toArray:function(j){return le(j,function(te){return te})||[]},only:function(j){if(!G(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};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=F,De.__COMPILER_RUNTIME={__proto__:null,c:function(j){return F.H.useMemoCache(j)}},De.cache=function(j){return function(){return j.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(j,te,C){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var he=_({},j.props),Ne=j.key;if(te!=null)for(ve in te.key!==void 0&&(Ne=""+te.key),te)!I.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=C;else if(1<ve){for(var Fe=Array(ve),st=0;st<ve;st++)Fe[st]=arguments[st+2];he.children=Fe}return W(j.type,Ne,he)},De.createContext=function(j){return j={$$typeof:c,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:o,_context:j},j},De.createElement=function(j,te,C){var he,Ne={},ve=null;if(te!=null)for(he in te.key!==void 0&&(ve=""+te.key),te)I.call(te,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(Ne[he]=te[he]);var Fe=arguments.length-2;if(Fe===1)Ne.children=C;else if(1<Fe){for(var st=Array(Fe),it=0;it<Fe;it++)st[it]=arguments[it+2];Ne.children=st}if(j&&j.defaultProps)for(he in Fe=j.defaultProps,Fe)Ne[he]===void 0&&(Ne[he]=Fe[he]);return W(j,ve,Ne)},De.createRef=function(){return{current:null}},De.forwardRef=function(j){return{$$typeof:f,render:j}},De.isValidElement=G,De.lazy=function(j){return{$$typeof:y,_payload:{_status:-1,_result:j},_init:X}},De.memo=function(j,te){return{$$typeof:h,type:j,compare:te===void 0?null:te}},De.startTransition=function(j){var te=F.T,C={};F.T=C;try{var he=j(),Ne=F.S;Ne!==null&&Ne(C,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(T,pe)}catch(ve){pe(ve)}finally{te!==null&&C.types!==null&&(te.types=C.types),F.T=te}},De.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},De.use=function(j){return F.H.use(j)},De.useActionState=function(j,te,C){return F.H.useActionState(j,te,C)},De.useCallback=function(j,te){return F.H.useCallback(j,te)},De.useContext=function(j){return F.H.useContext(j)},De.useDebugValue=function(){},De.useDeferredValue=function(j,te){return F.H.useDeferredValue(j,te)},De.useEffect=function(j,te){return F.H.useEffect(j,te)},De.useEffectEvent=function(j){return F.H.useEffectEvent(j)},De.useId=function(){return F.H.useId()},De.useImperativeHandle=function(j,te,C){return F.H.useImperativeHandle(j,te,C)},De.useInsertionEffect=function(j,te){return F.H.useInsertionEffect(j,te)},De.useLayoutEffect=function(j,te){return F.H.useLayoutEffect(j,te)},De.useMemo=function(j,te){return F.H.useMemo(j,te)},De.useOptimistic=function(j,te){return F.H.useOptimistic(j,te)},De.useReducer=function(j,te,C){return F.H.useReducer(j,te,C)},De.useRef=function(j){return F.H.useRef(j)},De.useState=function(j){return F.H.useState(j)},De.useSyncExternalStore=function(j,te,C){return F.H.useSyncExternalStore(j,te,C)},De.useTransition=function(){return F.H.useTransition()},De.version="19.2.5",De}var xv;function Tp(){return xv||(xv=1,rm.exports=GN()),rm.exports}var M=Tp(),sm={exports:{}},Po={},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 vv;function QN(){return vv||(vv=1,(function(e){function t(K,le){var X=K.length;K.push(le);e:for(;0<X;){var pe=X-1>>>1,O=K[pe];if(0<s(O,le))K[pe]=le,K[X]=O,X=pe;else break e}}function n(K){return K.length===0?null:K[0]}function a(K){if(K.length===0)return null;var le=K[0],X=K.pop();if(X!==le){K[0]=X;e:for(var pe=0,O=K.length,j=O>>>1;pe<j;){var te=2*(pe+1)-1,C=K[te],he=te+1,Ne=K[he];if(0>s(C,X))he<O&&0>s(Ne,C)?(K[pe]=Ne,K[he]=X,pe=he):(K[pe]=C,K[te]=X,pe=te);else if(he<O&&0>s(Ne,X))K[pe]=Ne,K[he]=X,pe=he;else break e}}return le}function s(K,le){var X=K.sortIndex-le.sortIndex;return X!==0?X:K.id-le.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(K){for(var le=n(h);le!==null;){if(le.callback===null)a(h);else if(le.startTime<=K)a(h),le.sortIndex=le.expirationTime,t(d,le);else break;le=n(h)}}function P(K){if(_=!1,D(K),!S)if(n(d)!==null)S=!0,T||(T=!0,J());else{var le=n(h);le!==null&&Q(P,le.startTime-K)}}var T=!1,F=-1,I=5,W=-1;function L(){return N?!0:!(e.unstable_now()-W<I)}function G(){if(N=!1,T){var K=e.unstable_now();W=K;var le=!0;try{e:{S=!1,_&&(_=!1,R(F),F=-1),v=!0;var X=x;try{t:{for(D(K),g=n(d);g!==null&&!(g.expirationTime>K&&L());){var pe=g.callback;if(typeof pe=="function"){g.callback=null,x=g.priorityLevel;var O=pe(g.expirationTime<=K);if(K=e.unstable_now(),typeof O=="function"){g.callback=O,D(K),le=!0;break t}g===n(d)&&a(d),D(K)}else a(d);g=n(d)}if(g!==null)le=!0;else{var j=n(h);j!==null&&Q(P,j.startTime-K),le=!1}}break e}finally{g=null,x=X,v=!1}le=void 0}}finally{le?J():T=!1}}}var J;if(typeof A=="function")J=function(){A(G)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,H=oe.port2;oe.port1.onmessage=G,J=function(){H.postMessage(null)}}else J=function(){w(G,0)};function Q(K,le){F=w(function(){K(e.unstable_now())},le)}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(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(K){switch(x){case 1:case 2:case 3:var le=3;break;default:le=x}var X=x;x=le;try{return K()}finally{x=X}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(K,le){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var X=x;x=K;try{return le()}finally{x=X}},e.unstable_scheduleCallback=function(K,le,X){var pe=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?pe+X:pe):X=pe,K){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=X+O,K={id:y++,callback:le,priorityLevel:K,startTime:X,expirationTime:O,sortIndex:-1},X>pe?(K.sortIndex=X,t(h,K),n(d)===null&&K===n(h)&&(_?(R(F),F=-1):_=!0,Q(P,X-pe))):(K.sortIndex=O,t(d,K),S||v||(S=!0,T||(T=!0,J()))),K},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(K){var le=x;return function(){var X=x;x=le;try{return K.apply(this,arguments)}finally{x=X}}}})(om)),om}var Ev;function YN(){return Ev||(Ev=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 Sv;function VN(){if(Sv)return hn;Sv=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 _v;function XN(){if(_v)return cm.exports;_v=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 wv;function ZN(){if(wv)return Po;wv=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"),P=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function J(i){return i===null||typeof i!="object"?null:(i=G&&i[G]||i["@@iterator"],typeof i=="function"?i:null)}var oe=Symbol.for("react.client.reference");function H(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===oe?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 P:return"Suspense";case T:return"SuspenseList";case W: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 F:return r=i.displayName||null,r!==null?r:H(i.type)||"Memo";case I:r=i._payload,i=i._init;try{return H(i(r))}catch{}}return null}var Q=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},pe=[],O=-1;function j(i){return{current:i}}function te(i){0>O||(i.current=pe[O],pe[O]=null,O--)}function C(i,r){O++,pe[O]=i.current,i.current=r}var he=j(null),Ne=j(null),ve=j(null),Fe=j(null);function st(i,r){switch(C(ve,r),C(Ne,i),C(he,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?zx(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=zx(r),i=Bx(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}te(he),C(he,i)}function it(){te(he),te(Ne),te(ve)}function Wt(i){i.memoizedState!==null&&C(Fe,i);var r=he.current,l=Bx(r,i.type);r!==l&&(C(Ne,i),C(he,l))}function Kn(i){Ne.current===i&&(te(he),te(Ne)),Fe.current===i&&(te(Fe),zo._currentValue=X)}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 Z=ee}Reflect.construct(i,[],se)}else{try{se.call()}catch(ee){Z=ee}i.call(se.prototype)}}else{try{throw Error()}catch(ee){Z=ee}(se=i())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(ee){if(ee&&Z&&typeof ee.stack=="string")return[ee.stack,Z.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 z=E.split(`
|
|
44
|
+
`),V=k.split(`
|
|
45
|
+
`);for(p=u=0;u<z.length&&!z[u].includes("DetermineComponentFrameRoot");)u++;for(;p<V.length&&!V[p].includes("DetermineComponentFrameRoot");)p++;if(u===z.length||p===V.length)for(u=z.length-1,p=V.length-1;1<=u&&0<=p&&z[u]!==V[p];)p--;for(;1<=u&&0<=p;u--,p--)if(z[u]!==V[p]){if(u!==1||p!==1)do if(u--,p--,0>p||z[u]!==V[p]){var ie=`
|
|
46
|
+
`+z[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,Gl=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 U(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,z=i.expirationTimes,V=i.hiddenUpdates;for(l=E&~l;0<l;){var ie=31-lt(l),se=1<<ie;k[ie]=0,z[ie]=-1;var Z=V[ie];if(Z!==null)for(V[ie]=null,ie=0;ie<Z.length;ie++){var ee=Z[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=le.p;return i!==0?i:(i=window.event,i===void 0?32:lv(i.type))}function Ss(i,r){var l=le.p;try{return le.p=i,r()}finally{le.p=l}}var Ui=Math.random().toString(36).slice(2),$t="__reactFiber$"+Ui,fn="__reactProps$"+Ui,Ma="__reactContainer$"+Ui,Ql="__reactEvents$"+Ui,Tc="__reactListeners$"+Ui,_s="__reactHandles$"+Ui,Cc="__reactResources$"+Ui,Ar="__reactMarker$"+Ui;function Yl(i){delete i[$t],delete i[fn],delete i[Ql],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=Kx(i);i!==null;){if(l=i[$t])return l;i=Kx(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 Vl(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 Xl(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"]]),Zl=/^[\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 Zl.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(Xl(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));Xl(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&&Vl(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 Wl=!1;function jc(i,r,l){if(Wl)return i(r,l);Wl=!0;try{var u=i(r);return u}finally{if(Wl=!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 Jl(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 eo={};Object.defineProperty(eo,"passive",{get:function(){id=!0}}),window.addEventListener("test",eo,eo),window.removeEventListener("test",eo,eo)}catch{id=!1}var za=null,ad=null,Dc=null;function Bg(){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 Ug(){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:Ug,this.isPropagationStopped=Ug,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),to=g({},Mr,{view:0,detail:0}),$_=Rn(to),rd,sd,no,Bc=g({},to,{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!==no&&(no&&i.type==="mousemove"?(rd=i.screenX-no.screenX,sd=i.screenY-no.screenY):sd=rd=0,no=i),rd)},movementY:function(i){return"movementY"in i?i.movementY:sd}}),$g=Rn(Bc),F_=g({},Bc,{dataTransfer:0}),P_=Rn(F_),q_=g({},to,{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}),Fg=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({},to,{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}),Pg=Rn(tw),nw=g({},to,{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,io=null;ra&&"documentMode"in document&&(io=document.documentMode);var fw=ra&&"TextEvent"in window&&!io,qg=ra&&(!cd||io&&8<io&&11>=io),Hg=" ",Kg=!1;function Gg(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 Qg(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 Qg(r);case"keypress":return r.which!==32?null:(Kg=!0,Hg);case"textInput":return i=r.data,i===Hg&&Kg?null:i;default:return null}}function hw(i,r){if(Cs)return i==="compositionend"||!cd&&Gg(i,r)?(i=Bg(),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 qg&&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 Yg(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!mw[i.type]:r==="textarea"}function Vg(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 ao=null,ro=null;function pw(i){Rx(i,0)}function Uc(i){var r=ja(i);if(Vl(r))return i}function Xg(i,r){if(i==="change")return r}var Zg=!1;if(ra){var ud;if(ra){var fd="oninput"in document;if(!fd){var Wg=document.createElement("div");Wg.setAttribute("oninput","return;"),fd=typeof Wg.oninput=="function"}ud=fd}else ud=!1;Zg=ud&&(!document.documentMode||9<document.documentMode)}function Jg(){ao&&(ao.detachEvent("onpropertychange",eb),ro=ao=null)}function eb(i){if(i.propertyName==="value"&&Uc(ro)){var r=[];Vg(r,ro,i,Ie(i)),jc(pw,r)}}function gw(i,r,l){i==="focusin"?(Jg(),ao=r,ro=l,ao.attachEvent("onpropertychange",eb)):i==="focusout"&&Jg()}function bw(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Uc(ro)}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 so(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 tb(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function nb(i,r){var l=tb(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=tb(l)}}function ib(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?ib(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function ab(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,lo=null,md=!1;function rb(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}),lo&&so(lo,u)||(lo=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={},sb={};ra&&(sb=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 sb)return pd[i]=r[l];return i}var lb=Dr("animationend"),ob=Dr("animationiteration"),cb=Dr("animationstart"),Sw=Dr("transitionrun"),_w=Dr("transitionstart"),ww=Dr("transitioncancel"),ub=Dr("transitionend"),fb=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){fb.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&&db(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 db(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<Oo)throw Oo=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 hb(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 W:return i=Xn(31,l,r,p),i.elementType=W,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 P:return i=Xn(13,l,r,p),i.elementType=P,i.lanes=b,i;case T:return i=Xn(19,l,r,p),i.elementType=T,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 F:E=14;break e;case I: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 mb(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 pb=new WeakMap;function ui(i,r){if(typeof i=="object"&&i!==null){var l=pb.get(i);return l!==void 0?l:(r={value:i,source:r,stack:li(r)},pb.set(i,r),r)}return{value:i,source:r,stack:li(r)}}var js=[],Ds=0,Kc=null,oo=0,fi=[],di=0,Ba=null,$i=1,Fi="";function la(i,r){js[Ds++]=oo,js[Ds++]=Kc,Kc=i,oo=r}function gb(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),gb(i,1,0))}function _d(i){for(;i===Kc;)Kc=js[--Ds],js[Ds]=null,oo=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 bb(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 co(ui(r,i)),wd}function yb(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<Mo.length;l++)Ke(Mo[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||Lx(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 xb(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 xb(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),xb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));wt=Hx(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));wt=Hx(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 co(i){Ua===null?Ua=[i]:Ua.push(i)}var kd=j(null),Br=null,oa=null;function Fa(i,r,l){C(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 z=0;z<r.length;z++)if(k.context===r[z]){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(zo):i=[zo])}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 vb(Br,i)}function Qc(i,r){return Br===null&&Ur(i),vb(i,r)}function vb(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 uo(i){i.refCount--,i.refCount===0&&Tw(Cw,function(){i.controller.abort()})}var fo=null,Od=0,zs=0,Bs=null;function Aw(i,r){if(fo===null){var l=fo=[];Od=0,zs=jh(),Bs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Od++,r.then(Eb,Eb),r}function Eb(){if(--Od===0&&fo!==null){Bs!==null&&(Bs.status="fulfilled");var i=fo;fo=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 Sb=K.S;K.S=function(i,r){rx=Ot(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&Aw(i,r),Sb!==null&&Sb(i,r)};var $r=j(null);function Rd(){var i=$r.current;return i!==null?i:yt.pooledCache}function Yc(i,r){r===null?C($r,$r.current):C($r,r.pool)}function _b(){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 wb(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Nb(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,Tb(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,Tb(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 kb(){if(Pr===null)throw Error(a(459));var i=Pr;return Pr=null,i}function Tb(i){if(i===Us||i===Vc)throw Error(a(483))}var $s=null,ho=0;function Zc(i){var r=ho;return ho+=1,$s===null&&($s=[]),Nb($s,i,r)}function mo(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 Cb(i){function r(q,$){if(i){var Y=q.deletions;Y===null?(q.deletions=[$],q.flags|=16):Y.push($)}}function l(q,$){if(!i)return null;for(;$!==null;)r(q,$),$=$.sibling;return null}function u(q){for(var $=new Map;q!==null;)q.key!==null?$.set(q.key,q):$.set(q.index,q),q=q.sibling;return $}function p(q,$){return q=sa(q,$),q.index=0,q.sibling=null,q}function b(q,$,Y){return q.index=Y,i?(Y=q.alternate,Y!==null?(Y=Y.index,Y<$?(q.flags|=67108866,$):Y):(q.flags|=67108866,$)):(q.flags|=1048576,$)}function E(q){return i&&q.alternate===null&&(q.flags|=67108866),q}function k(q,$,Y,re){return $===null||$.tag!==6?($=vd(Y,q.mode,re),$.return=q,$):($=p($,Y),$.return=q,$)}function z(q,$,Y,re){var ke=Y.type;return ke===_?ie(q,$,Y.props.children,re,Y.key):$!==null&&($.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===I&&Fr(ke)===$.type)?($=p($,Y.props),mo($,Y),$.return=q,$):($=Hc(Y.type,Y.key,Y.props,null,q.mode,re),mo($,Y),$.return=q,$)}function V(q,$,Y,re){return $===null||$.tag!==4||$.stateNode.containerInfo!==Y.containerInfo||$.stateNode.implementation!==Y.implementation?($=Ed(Y,q.mode,re),$.return=q,$):($=p($,Y.children||[]),$.return=q,$)}function ie(q,$,Y,re,ke){return $===null||$.tag!==7?($=Ir(Y,q.mode,re,ke),$.return=q,$):($=p($,Y),$.return=q,$)}function se(q,$,Y){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=vd(""+$,q.mode,Y),$.return=q,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return Y=Hc($.type,$.key,$.props,null,q.mode,Y),mo(Y,$),Y.return=q,Y;case S:return $=Ed($,q.mode,Y),$.return=q,$;case I:return $=Fr($),se(q,$,Y)}if(Q($)||J($))return $=Ir($,q.mode,Y,null),$.return=q,$;if(typeof $.then=="function")return se(q,Zc($),Y);if($.$$typeof===A)return se(q,Qc(q,$),Y);Wc(q,$)}return null}function Z(q,$,Y,re){var ke=$!==null?$.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return ke!==null?null:k(q,$,""+Y,re);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:return Y.key===ke?z(q,$,Y,re):null;case S:return Y.key===ke?V(q,$,Y,re):null;case I:return Y=Fr(Y),Z(q,$,Y,re)}if(Q(Y)||J(Y))return ke!==null?null:ie(q,$,Y,re,null);if(typeof Y.then=="function")return Z(q,$,Zc(Y),re);if(Y.$$typeof===A)return Z(q,$,Qc(q,Y),re);Wc(q,Y)}return null}function ee(q,$,Y,re,ke){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return q=q.get(Y)||null,k($,q,""+re,ke);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case v:return q=q.get(re.key===null?Y:re.key)||null,z($,q,re,ke);case S:return q=q.get(re.key===null?Y:re.key)||null,V($,q,re,ke);case I:return re=Fr(re),ee(q,$,Y,re,ke)}if(Q(re)||J(re))return q=q.get(Y)||null,ie($,q,re,ke,null);if(typeof re.then=="function")return ee(q,$,Y,Zc(re),ke);if(re.$$typeof===A)return ee(q,$,Y,Qc($,re),ke);Wc($,re)}return null}function ye(q,$,Y,re){for(var ke=null,tt=null,Se=$,Be=$=0,Ve=null;Se!==null&&Be<Y.length;Be++){Se.index>Be?(Ve=Se,Se=null):Ve=Se.sibling;var nt=Z(q,Se,Y[Be],re);if(nt===null){Se===null&&(Se=Ve);break}i&&Se&&nt.alternate===null&&r(q,Se),$=b(nt,$,Be),tt===null?ke=nt:tt.sibling=nt,tt=nt,Se=Ve}if(Be===Y.length)return l(q,Se),Ze&&la(q,Be),ke;if(Se===null){for(;Be<Y.length;Be++)Se=se(q,Y[Be],re),Se!==null&&($=b(Se,$,Be),tt===null?ke=Se:tt.sibling=Se,tt=Se);return Ze&&la(q,Be),ke}for(Se=u(Se);Be<Y.length;Be++)Ve=ee(Se,q,Be,Y[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(q,rr)}),Ze&&la(q,Be),ke}function Ae(q,$,Y,re){if(Y==null)throw Error(a(151));for(var ke=null,tt=null,Se=$,Be=$=0,Ve=null,nt=Y.next();Se!==null&&!nt.done;Be++,nt=Y.next()){Se.index>Be?(Ve=Se,Se=null):Ve=Se.sibling;var rr=Z(q,Se,nt.value,re);if(rr===null){Se===null&&(Se=Ve);break}i&&Se&&rr.alternate===null&&r(q,Se),$=b(rr,$,Be),tt===null?ke=rr:tt.sibling=rr,tt=rr,Se=Ve}if(nt.done)return l(q,Se),Ze&&la(q,Be),ke;if(Se===null){for(;!nt.done;Be++,nt=Y.next())nt=se(q,nt.value,re),nt!==null&&($=b(nt,$,Be),tt===null?ke=nt:tt.sibling=nt,tt=nt);return Ze&&la(q,Be),ke}for(Se=u(Se);!nt.done;Be++,nt=Y.next())nt=ee(Se,q,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(q,FN)}),Ze&&la(q,Be),ke}function mt(q,$,Y,re){if(typeof Y=="object"&&Y!==null&&Y.type===_&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:e:{for(var ke=Y.key;$!==null;){if($.key===ke){if(ke=Y.type,ke===_){if($.tag===7){l(q,$.sibling),re=p($,Y.props.children),re.return=q,q=re;break e}}else if($.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===I&&Fr(ke)===$.type){l(q,$.sibling),re=p($,Y.props),mo(re,Y),re.return=q,q=re;break e}l(q,$);break}else r(q,$);$=$.sibling}Y.type===_?(re=Ir(Y.props.children,q.mode,re,Y.key),re.return=q,q=re):(re=Hc(Y.type,Y.key,Y.props,null,q.mode,re),mo(re,Y),re.return=q,q=re)}return E(q);case S:e:{for(ke=Y.key;$!==null;){if($.key===ke)if($.tag===4&&$.stateNode.containerInfo===Y.containerInfo&&$.stateNode.implementation===Y.implementation){l(q,$.sibling),re=p($,Y.children||[]),re.return=q,q=re;break e}else{l(q,$);break}else r(q,$);$=$.sibling}re=Ed(Y,q.mode,re),re.return=q,q=re}return E(q);case I:return Y=Fr(Y),mt(q,$,Y,re)}if(Q(Y))return ye(q,$,Y,re);if(J(Y)){if(ke=J(Y),typeof ke!="function")throw Error(a(150));return Y=ke.call(Y),Ae(q,$,Y,re)}if(typeof Y.then=="function")return mt(q,$,Zc(Y),re);if(Y.$$typeof===A)return mt(q,$,Qc(q,Y),re);Wc(q,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,$!==null&&$.tag===6?(l(q,$.sibling),re=p($,Y),re.return=q,q=re):(l(q,$),re=vd(Y,q.mode,re),re.return=q,q=re),E(q)):l(q,$)}return function(q,$,Y,re){try{ho=0;var ke=mt(q,$,Y,re);return $s=null,ke}catch(Se){if(Se===Us||Se===Vc)throw Se;var tt=Xn(29,Se,null,q.mode);return tt.lanes=re,tt.return=q,tt}finally{}}}var qr=Cb(!0),Ab=Cb(!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),db(i,null,l),r}return Pc(i,u,r,l),qc(i)}function po(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 go(){if(Id){var i=Bs;if(i!==null)throw i}}function bo(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 z=k,V=z.next;z.next=null,E===null?b=V:E.next=V,E=z;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,k=ie.lastBaseUpdate,k!==E&&(k===null?ie.firstBaseUpdate=V:k.next=V,ie.lastBaseUpdate=z))}if(b!==null){var se=p.baseState;E=0,ie=V=z=null,k=b;do{var Z=k.lane&-536870913,ee=Z!==k.lane;if(ee?(Ye&Z)===Z:(u&Z)===Z){Z!==0&&Z===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;Z=r;var mt=l;switch(Ae.tag){case 1:if(ye=Ae.payload,typeof ye=="function"){se=ye.call(mt,se,Z);break e}se=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ae.payload,Z=typeof ye=="function"?ye.call(mt,se,Z):ye,Z==null)break e;se=g({},se,Z);break e;case 2:Pa=!0}}Z=k.callback,Z!==null&&(i.flags|=64,ee&&(i.flags|=8192),ee=p.callbacks,ee===null?p.callbacks=[Z]:ee.push(Z))}else ee={lane:Z,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ie===null?(V=ie=ee,z=se):ie=ie.next=ee,E|=Z;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&&(z=se),p.baseState=z,p.firstBaseUpdate=V,p.lastBaseUpdate=ie,b===null&&(p.shared.lanes=0),Va|=E,i.lanes=E,i.memoizedState=se}}function Ob(i,r){if(typeof i!="function")throw Error(a(191,i));i.call(r)}function Rb(i,r){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)Ob(l[i],r)}var Fs=j(null),Jc=j(0);function Mb(i,r){i=ya,C(Jc,i),C(Fs,r),ya=i|r.baseLanes}function zd(){C(Jc,ya),C(Fs,Fs.current)}function Bd(){ya=Jc.current,te(Fs),te(Jc)}var Zn=j(null),mi=null;function Ka(i){var r=i.alternate;C(Pt,Pt.current&1),C(Zn,i),mi===null&&(r===null||Fs.current!==null||r.memoizedState!==null)&&(mi=i)}function Ud(i){C(Pt,Pt.current),C(Zn,i),mi===null&&(mi=i)}function jb(i){i.tag===22?(C(Pt,Pt.current),C(Zn,i),mi===null&&(mi=i)):Ga()}function Ga(){C(Pt,Pt.current),C(Zn,Zn.current)}function Wn(i){te(Zn),mi===i&&(mi=null),te(Pt)}var Pt=j(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,dt=null,Qt=null,tu=!1,Ps=!1,Hr=!1,nu=0,yo=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,K.H=i===null||i.memoizedState===null?gy:nh,Hr=!1,b=l(u,p),Hr=!1,Ps&&(b=Lb(r,l,u,p)),Db(i),b}function Db(i){K.H=Eo;var r=dt!==null&&dt.next!==null;if(ua=0,Qt=dt=ze=null,tu=!1,yo=0,qs=null,r)throw Error(a(300));i===null||Yt||(i=i.dependencies,i!==null&&Gc(i)&&(Yt=!0))}function Lb(i,r,l,u){ze=i;var p=0;do{if(Ps&&(qs=null),yo=0,Ps=!1,25<=p)throw Error(a(301));if(p+=1,Qt=dt=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}K.H=by,b=r(l,u)}while(Ps);return b}function Mw(){var i=K.H,r=i.useState()[0];return r=typeof r.then=="function"?xo(r):r,i=i.useState()[0],(dt!==null?dt.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=dt=ze=null,Ps=!1,yo=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(dt===null){var i=ze.alternate;i=i!==null?i.memoizedState:null}else i=dt.next;var r=Qt===null?ze.memoizedState:Qt.next;if(r!==null)Qt=r,dt=i;else{if(i===null)throw ze.alternate===null?Error(a(467)):Error(a(310));dt=i,i={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.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 xo(i){var r=yo;return yo+=1,qs===null&&(qs=[]),i=Nb(qs,i,r),r=ze,(Qt===null?r.memoizedState:Qt.next)===null&&(r=r.alternate,K.H=r===null||r.memoizedState===null?gy:nh),i}function au(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return xo(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]=L;return r.index++,l}function fa(i,r){return typeof r=="function"?r(i):r}function ru(i){var r=qt();return Gd(r,dt,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,z=null,V=r,ie=!1;do{var se=V.lane&-536870913;if(se!==V.lane?(Ye&se)===se:(ua&se)===se){var Z=V.revertLane;if(Z===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),se===zs&&(ie=!0);else if((ua&Z)===Z){V=V.next,Z===zs&&(ie=!0);continue}else se={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},z===null?(k=z=se,E=b):z=z.next=se,ze.lanes|=Z,Va|=Z;se=V.action,Hr&&l(b,se),b=V.hasEagerState?V.eagerState:l(b,se)}else Z={lane:se,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},z===null?(k=z=Z,E=b):z=z.next=Z,ze.lanes|=se,Va|=se;V=V.next}while(V!==null&&V!==r);if(z===null?E=b:z.next=k,!Vn(b,i.memoizedState)&&(Yt=!0,ie&&(l=Bs,l!==null)))throw l;i.memoizedState=b,i.baseState=E,i.baseQueue=z,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 Ib(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((dt||p).memoizedState,l);if(E&&(p.memoizedState=l,Yt=!0),p=p.queue,Xd(Ub.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},Bb.bind(null,u,p,l,r),null),yt===null)throw Error(a(349));b||(ua&127)!==0||zb(u,r,l)}return l}function zb(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 Bb(i,r,l,u){r.value=l,r.getSnapshot=u,$b(r)&&Fb(i)}function Ub(i,r,l){return l(function(){$b(r)&&Fb(i)})}function $b(i){var r=i.getSnapshot;i=i.value;try{var l=r();return!Vn(i,l)}catch{return!0}}function Fb(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 Pb(i,r,l,u){return i.baseState=l,Gd(i,dt,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)}};K.T!==null?l(!0):b.isTransition=!1,u(b),l=r.pending,l===null?(b.next=r.pending=b,qb(r,b)):(b.next=l.next,r.pending=l.next=b)}}function qb(i,r){var l=r.action,u=r.payload,p=i.state;if(r.isTransition){var b=K.T,E={};K.T=E;try{var k=l(p,u),z=K.S;z!==null&&z(E,k),Hb(i,r,k)}catch(V){Vd(i,r,V)}finally{b!==null&&E.types!==null&&(b.types=E.types),K.T=b}}else try{b=l(p,u),Hb(i,r,b)}catch(V){Vd(i,r,V)}}function Hb(i,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Kb(i,r,u)},function(u){return Vd(i,r,u)}):Kb(i,r,l)}function Kb(i,r,l){r.status="fulfilled",r.value=l,Gb(r),i.state=l,r=i.pending,r!==null&&(l=r.next,l===r?i.pending=null:(l=l.next,r.next=l,qb(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,Gb(r),r=r.next;while(r!==u)}i.action=null}function Gb(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function Qb(i,r){return r}function Yb(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:Qb,lastRenderedState:r},l.queue=u,l=hy.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 Vb(i){var r=qt();return Xb(r,dt,i)}function Xb(i,r,l){if(r=Gd(i,r,Qb)[0],i=ru(fa)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=xo(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 Zb(i){var r=qt(),l=dt;if(l!==null)return Xb(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 Wb(){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;dt!==null&&u!==null&&$d(u,dt.memoizedState.deps)?p.memoizedState=Hs(r,b,l,u):(ze.flags|=i,p.memoizedState=Hs(1|r,b,l,u))}function Jb(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 ey(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 ty(i,r){return lu(4,2,i,r)}function ny(i,r){return lu(4,4,i,r)}function iy(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 ay(i,r,l){l=l!=null?l.concat([i]):null,lu(4,4,iy.bind(null,r,i),l)}function Zd(){}function ry(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 sy(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=lx(),ze.lanes|=i,Va|=i,l)}function ly(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=lx(),ze.lanes|=i,Va|=i,r)}function oy(i,r,l,u,p){var b=le.p;le.p=b!==0&&8>b?b:8;var E=K.T,k={};K.T=k,th(i,!1,r,l);try{var z=p(),V=K.S;if(V!==null&&V(k,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ie=Ow(z,u);vo(i,r,ie,ti(i))}else vo(i,r,u,ti(i))}catch(se){vo(i,r,{then:function(){},status:"rejected",reason:se},ti())}finally{le.p=b,E!==null&&k.types!==null&&(E.types=k.types),K.T=E}}function Iw(){}function Jd(i,r,l,u){if(i.tag!==5)throw Error(a(476));var p=cy(i).queue;oy(i,p,r,X,l===null?Iw:function(){return uy(i),l(u)})}function cy(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:X},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 uy(i){var r=cy(i);r.next===null&&(r=i.alternate.memoizedState),vo(i,r.next.queue,{},ti())}function eh(){return ln(zo)}function fy(){return qt().memoizedState}function dy(){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),po(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)?my(r,l):(l=yd(i,r,l,u),l!==null&&(In(l,i,u),py(l,r,u)))}function hy(i,r,l){var u=ti();vo(i,r,l,u)}function vo(i,r,l,u){var p={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ou(i))my(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),py(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 my(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 py(i,r,l){if((l&4194048)!==0){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,Me(i,l)}}var Eo={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};Eo.useEffectEvent=Lt;var gy={readContext:ln,use:au,useCallback:function(i,r){return En().memoizedState=[i,r===void 0?null:r],i},useContext:ln,useEffect:Jb,useImperativeHandle:function(i,r,l){l=l!=null?l.concat([i]):null,su(4194308,4,iy.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=hy.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=oy.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||zb(u,r,l)}p.memoizedState=l;var b={value:l,getSnapshot:r};return p.queue=b,Jb(Ub.bind(null,u,b,i),[i]),u.flags|=2048,Hs(9,{destroy:void 0},Bb.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:Yb,useActionState:Yb,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:ry,useContext:ln,useEffect:Xd,useImperativeHandle:ay,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:sy,useReducer:ru,useRef:Wb,useState:function(){return ru(fa)},useDebugValue:Zd,useDeferredValue:function(i,r){var l=qt();return ly(l,dt.memoizedState,i,r)},useTransition:function(){var i=ru(fa)[0],r=qt().memoizedState;return[typeof i=="boolean"?i:xo(i),r]},useSyncExternalStore:Ib,useId:fy,useHostTransitionStatus:eh,useFormState:Vb,useActionState:Vb,useOptimistic:function(i,r){var l=qt();return Pb(l,dt,i,r)},useMemoCache:Kd,useCacheRefresh:dy};nh.useEffectEvent=ey;var by={readContext:ln,use:au,useCallback:ry,useContext:ln,useEffect:Xd,useImperativeHandle:ay,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:sy,useReducer:Qd,useRef:Wb,useState:function(){return Qd(fa)},useDebugValue:Zd,useDeferredValue:function(i,r){var l=qt();return dt===null?Wd(l,i,r):ly(l,dt.memoizedState,i,r)},useTransition:function(){var i=Qd(fa)[0],r=qt().memoizedState;return[typeof i=="boolean"?i:xo(i),r]},useSyncExternalStore:Ib,useId:fy,useHostTransitionStatus:eh,useFormState:Zb,useActionState:Zb,useOptimistic:function(i,r){var l=qt();return dt!==null?Pb(l,dt,i,r):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:Kd,useCacheRefresh:dy};by.useEffectEvent=ey;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),po(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),po(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),po(r,i,l))}};function yy(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?!so(l,u)||!so(p,b):!0}function xy(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 vy(i){$c(i)}function Ey(i){console.error(i)}function Sy(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 _y(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 wy(i){return i=qa(i),i.tag=3,i}function Ny(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(){_y(r,l,u)}}var E=l.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(i.callback=function(){_y(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}),co(ui(i,l)))):(u!==wd&&(r=Error(a(423),{cause:u}),co(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),Ao===null?Ao=[b]:Ao.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=wy(p),Ny(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?Ab(r,null,l,u):qr(r,i.child,l,u)}function ky(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 Ty(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,Cy(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:so,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 Cy(i,r,l,u,p){if(i!==null){var b=i.memoizedProps;if(so(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 Ay(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 Oy(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?Mb(r,b):zd(),jb(r);else return u=r.lanes=536870912,Oy(i,r,b!==null?b.baseLanes|l:l,l,u)}else b!==null?(Yc(r,b.cachePool),Mb(r,b),Ga(),r.memoizedState=null):(i!==null&&Yc(r,null),zd(),Ga());return on(i,r,p,l),r.child}function So(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Oy(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(),jb(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 Ry(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,So(null,i);if(Ud(r),(i=wt)?(i=qx(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=mb(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=Ry(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=Ry(i,r,l)}else i=b.treeContext,wt=pi(E.nextSibling),sn=r,Ze=!0,Ua=null,hi=!1,i!==null&&bb(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 My(i,r,l,u,p,b){return Ur(r),r.updateQueue=null,l=Lb(r,u,l,p),Db(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 jy(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),bo(r,u,b,p),go(),b.state=r.memoizedState),typeof b.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){b=r.stateNode;var k=r.memoizedProps,z=Kr(l,k);b.props=z;var V=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||V!==E)&&xy(r,b,u,E),Pa=!1;var Z=r.memoizedState;b.state=Z,bo(r,u,b,p),go(),V=r.memoizedState,k||Z!==V||Pa?(typeof se=="function"&&(ih(r,l,se,u),V=r.memoizedState),(z=Pa||yy(r,l,z,u,Z,V,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=V),b.props=u,b.state=V,b.context=E,u=z):(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,Z=b.context,V=l.contextType,z=Ms,typeof V=="object"&&V!==null&&(z=ln(V)),k=l.getDerivedStateFromProps,(V=typeof k=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==se||Z!==z)&&xy(r,b,u,z),Pa=!1,Z=r.memoizedState,b.state=Z,bo(r,u,b,p),go();var ee=r.memoizedState;E!==se||Z!==ee||Pa||i!==null&&i.dependencies!==null&&Gc(i.dependencies)?(typeof k=="function"&&(ih(r,l,k,u),ee=r.memoizedState),(ie=Pa||yy(r,l,ie,u,Z,ee,z)||i!==null&&i.dependencies!==null&&Gc(i.dependencies))?(V||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,ee,z),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,ee,z)),typeof b.componentDidUpdate=="function"&&(r.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&Z===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&Z===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=ee),b.props=u,b.state=ee,b.context=z,u=ie):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&Z===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&Z===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 Dy(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:_b()}}function uh(i,r,l){return i=i!==null?i.childLanes&~l:0,r&&(i|=ei),i}function Ly(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=qx(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=mb(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,So(null,u)):(Ka(r),fh(r,k))}var z=i.memoizedState;if(z!==null&&(k=z.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=So(null,u));else if(Ka(r),Gh(k)){if(E=k.nextSibling&&k.nextSibling.dataset,E)var V=E.dgst;E=V,u=Error(a(419)),u.stack="",u.digest=E,co({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!==z.retryLane))throw z.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=z.treeContext,wt=pi(k.nextSibling),sn=r,Ze=!0,Ua=null,hi=!1,i!==null&&bb(r,i),r=fh(r,u.children),r.flags|=4096);return r}return p?(Ga(),k=u.fallback,p=r.mode,z=i.child,V=z.sibling,u=sa(z,{mode:"hidden",children:u.children}),u.subtreeFlags=z.subtreeFlags&65011712,V!==null?k=sa(V,k):(k=Ir(k,p,l,null),k.flags|=2),k.return=r,u.return=r,u.sibling=k,r.child=u,So(null,u),u=r.child,k=i.child.memoizedState,k===null?k=ch(l):(p=k.cachePool,p!==null?(z=Gt._currentValue,p=p.parent!==z?{parent:z,pool:z}:p):p=_b(),k={baseLanes:k.baseLanes|l,cachePool:p}),u.memoizedState=k,u.childLanes=uh(i,E,l),r.memoizedState=oh,So(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 Iy(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 zy(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,C(Pt,E),on(i,r,u,l),u=Ze?oo:0,!k&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Iy(i,l,r);else if(i.tag===19)Iy(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?Ly(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 zy(i,r,l);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),C(Pt,Pt.current),u)break;return null;case 22:return r.lanes=0,Ay(i,r,l,r.pendingProps);case 24:Fa(r,Gt,i.memoizedState.cache)}return da(i,r,l)}function By(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&&gb(r,oo,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=jy(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=ky(null,r,i,u,l);break e}else if(p===F){r.tag=14,r=Ty(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),jy(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),bo(r,u,null,l);var E=r.memoizedState;if(u=E.cache,Fa(r,Gt,u),u!==b.cache&&Cd(r,[Gt],l,!0),go(),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=Dy(i,r,u,l);break e}else if(u!==p){p=ui(Error(a(424)),r),co(p),r=Dy(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=Ab(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=Vx(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=Vx(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return Wt(r),i===null&&Ze&&(u=r.stateNode=Gx(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),zo._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 Ly(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 ky(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 Ty(i,r,r.type,r.pendingProps,l);case 15:return Cy(i,r,r.type,r.pendingProps,l);case 19:return zy(i,r,l);case 31:return $w(i,r,l);case 22:return Ay(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),bo(r,null,null,l),go()),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(fx())i.flags|=8192;else throw Pr=Xc,Md}else i.flags&=-16777217}function Uy(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!ev(r))if(fx())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 _o(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),Uy(r,b)):(Nt(r),ph(r,p,null,u,l))):b?b!==i.memoizedState?(ha(r),Nt(r),Uy(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)?yb(r):(i=Gx(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))yb(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||Lx(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)_o(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,_o(u,!1),i=b.updateQueue,r.updateQueue=i,hu(r,i),r.subtreeFlags=0,i=l,l=r.child;l!==null;)hb(l,i),l=l.sibling;return C(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,_o(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),_o(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,_o(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,C(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 $y(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 wo(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 z=l,V=k;try{V()}catch(ie){ft(p,z,ie)}}}u=u.next}while(u!==b)}}catch(ie){ft(r,r.return,ie)}}function Fy(i){var r=i.updateQueue;if(r!==null){var l=i.stateNode;try{Rb(r,l)}catch(u){ft(i,i.return,u)}}}function Py(i,r,l){l.props=Kr(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(u){ft(i,r,u)}}function No(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 qy(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 Hy(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||Hy(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 Ky(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,Gy=typeof WeakSet=="function"?WeakSet:Set,tn=null;function Hw(i,r){if(i=i.containerInfo,$h=Lu,i=ab(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,z=-1,V=0,ie=0,se=i,Z=null;t:for(;;){for(var ee;se!==l||p!==0&&se.nodeType!==3||(k=E+p),se!==b||u!==0&&se.nodeType!==3||(z=E+u),se.nodeType===3&&(E+=se.nodeValue.length),(ee=se.firstChild)!==null;)Z=se,se=ee;for(;;){if(se===i)break t;if(Z===l&&++V===p&&(k=E),Z===b&&++ie===u&&(z=E),(ee=se.nextSibling)!==null)break;se=Z,Z=se.parentNode}se=ee}l=k===-1||z===-1?null:{start:k,end:z}}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 Qy(i,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:ga(i,l),u&4&&wo(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&&Fy(l),u&512&&No(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{Rb(i,r)}catch(E){ft(l,l.return,E)}}break;case 27:r===null&&u&4&&Ky(l);case 26:case 5:ga(i,l),r===null&&u&4&&qy(l),u&512&&No(l,l.return);break;case 12:ga(i,l);break;case 31:ga(i,l),u&4&&Xy(i,l);break;case 13:ga(i,l),u&4&&Zy(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 Yy(i){var r=i.alternate;r!==null&&(i.alternate=null,Yy(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&Yl(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;)Vy(i,r,l),l=l.sibling}function Vy(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),Do(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,Fx(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),nl(i)):Fx(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"&&Py(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 Xy(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 Zy(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 Gy),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new Gy),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));Vy(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;)Wy(r,i),r=r.sibling}var Ti=null;function Wy(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),wo(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=Wx("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=Wx("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 Jx(p,i.type,i.stateNode);else i.stateNode=Zx(p,u,i.memoizedProps);else b!==u?(b===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):b.count--,u===null?Jx(p,i.type,i.stateNode):Zx(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,Jy(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 z=l!==null&&l.memoizedState!==null,V=ma,ie=Vt;if(ma=V||p,Vt=ie||z,jn(r,i),Vt=ie,ma=V,Dn(i),u&8192)e:for(r=i.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(l===null||z||ma||Vt||Gr(i)),l=null,r=i;;){if(r.tag===5||r.tag===26){if(l===null){z=l=r;try{if(b=z.stateNode,p)E=b.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{k=z.stateNode;var se=z.memoizedProps.style,Z=se!=null&&se.hasOwnProperty("display")?se.display:null;k.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(ye){ft(z,z.return,ye)}}}else if(r.tag===6){if(l===null){z=r;try{z.stateNode.nodeValue=p?"":z.memoizedProps}catch(ye){ft(z,z.return,ye)}}}else if(r.tag===18){if(l===null){z=r;try{var ee=z.stateNode;p?Px(ee,!0):Px(z.stateNode,!1)}catch(ye){ft(z,z.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(Hy(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 z=l.stateNode.containerInfo,V=bh(i);yh(i,V,z);break;default:throw Error(a(161))}}catch(ie){ft(i,i.return,ie)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function Jy(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;Jy(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;)Qy(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"&&Py(r,r.return,l),Gr(r);break;case 27:Do(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),wo(4,b);break;case 1:if(ba(p,b,l),u=b,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(V){ft(u,u.return,V)}if(u=b,p=u.updateQueue,p!==null){var k=u.stateNode;try{var z=p.shared.hiddenCallbacks;if(z!==null)for(p.shared.hiddenCallbacks=null,p=0;p<z.length;p++)Ob(z[p],k)}catch(V){ft(u,u.return,V)}}l&&E&64&&Fy(b),No(b,b.return);break;case 27:Ky(b);case 26:case 5:ba(p,b,l),l&&u===null&&E&4&&qy(b),No(b,b.return);break;case 12:ba(p,b,l);break;case 31:ba(p,b,l),l&&E&4&&Xy(p,b);break;case 13:ba(p,b,l),l&&E&4&&Zy(p,b);break;case 22:b.memoizedState===null&&ba(p,b,l),No(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&&uo(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&&uo(i))}function Ci(i,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ex(i,r,l,u),r=r.sibling}function ex(i,r,l,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Ci(i,r,l,u),p&2048&&wo(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&&uo(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(z){ft(r,r.return,z)}}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):ko(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,z=u,V=E.flags;switch(E.tag){case 0:case 11:case 15:Ks(b,E,k,z,p),wo(8,E);break;case 23:break;case 22:var ie=E.stateNode;E.memoizedState!==null?ie._visibility&2?Ks(b,E,k,z,p):ko(b,E):(ie._visibility|=2,Ks(b,E,k,z,p)),p&&V&2048&&vh(E.alternate,E);break;case 24:Ks(b,E,k,z,p),p&&V&2048&&Eh(E.alternate,E);break;default:Ks(b,E,k,z,p)}r=r.sibling}}function ko(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:ko(l,u),p&2048&&vh(u.alternate,u);break;case 24:ko(l,u),p&2048&&Eh(u.alternate,u);break;default:ko(l,u)}r=r.sibling}}var To=8192;function Gs(i,r,l){if(i.subtreeFlags&To)for(i=i.child;i!==null;)tx(i,r,l),i=i.sibling}function tx(i,r,l){switch(i.tag){case 26:Gs(i,r,l),i.flags&To&&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=To,To=16777216,Gs(i,r,l),To=u):Gs(i,r,l));break;default:Gs(i,r,l)}}function nx(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 Co(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,ax(u,i)}nx(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)ix(i),i=i.sibling}function ix(i){switch(i.tag){case 0:case 11:case 15:Co(i),i.flags&2048&&Qa(9,i,i.return);break;case 3:Co(i);break;case 12:Co(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)):Co(i);break;default:Co(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,ax(u,i)}nx(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 ax(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:uo(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(Yy(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,Ao=null,Ln=null,wh=!1,bu=0,rx=0,yu=1/0,xu=null,Xa=null,Jt=0,Za=null,Vs=null,xa=0,Nh=0,kh=null,sx=null,Oo=0,Th=null;function ti(){return(at&2)!==0&&Ye!==0?Ye&-Ye:K.T!==null?jh():Es()}function lx(){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 ox(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=Ao;var z=k.current.memoizedState.isDehydrated;if(z&&(Xs(k,E).flags|=256),E=Ah(k,E,!1),E!==2){if(Sh&&!z){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),U(u,0,!0)!==0)break e;xa=r,u.timeoutHandle=Ux(cx.bind(null,u,l,Ln,xu,wh,r,ei,Qr,Ys,Ya,b,"Throttled",-0,0),p);break e}cx(u,l,Ln,xu,wh,r,ei,Qr,Ys,Ya,b,null,-0,0)}}break}while(!0);qi(i)}function cx(i,r,l,u,p,b,E,k,z,V,ie,se,Z,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},tx(r,b,se);var ye=(b&62914560)===b?bu-Ot():(b&4194048)===b?rx-Ot():0;if(ye=MN(se,ye),ye!==null){xa=b,i.cancelPendingCommit=ye(bx.bind(null,i,r,b,l,u,p,E,k,z,ie,se,null,Z,ee)),Wa(i,b,E,!V);return}}bx(i,r,b,l,u,p,E,k,z)}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?(Ro(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,ho=0,i=He;for(;i!==null;)$y(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=Ao=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 ux(i,r){ze=null,K.H=Eo,r===Us||r===Vc?(r=kb(),ut=3):r===Md?(r=kb(),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 fx(){var i=Zn.current;return i===null?!0:(Ye&4194048)===Ye?mi===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?i===mi:!1}function dx(){var i=K.H;return K.H=Eo,i===null?Eo:i}function hx(){var i=K.A;return K.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=dx(),b=hx();(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,z=Jn;switch(ut){case 8:Ch(),E=6;break e;case 3:case 2:case 9:case 6:Zn.current===null&&(r=!0);var V=ut;if(ut=0,Jn=null,Zs(i,k,z,V),l&&Qs){E=0;break e}break;default:V=ut,ut=0,Jn=null,Zs(i,k,z,V)}}Vw(),E=It;break}catch(ie){ux(i,ie)}while(!0);return r&&i.shellSuspendCounter++,oa=Br=null,at=u,K.H=p,K.A=b,He===null&&(yt=null,Ye=0,Fc()),E}function Vw(){for(;He!==null;)mx(He)}function Xw(i,r){var l=at;at|=2;var u=dx(),p=hx();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(wb(b)){ut=0,Jn=null,px(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:wb(b)?(ut=0,Jn=null,px(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?ev(E):k.stateNode.complete){ut=0,Jn=null;var z=k.sibling;if(z!==null)He=z;else{var V=k.return;V!==null?(He=V,Su(V)):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){ux(i,ie)}while(!0);return oa=Br=null,K.H=u,K.A=p,at=l,He!==null?0:(yt=null,Ye=0,Fc(),It)}function Zw(){for(;He!==null&&!Gl();)mx(He)}function mx(i){var r=By(i.alternate,i,ya);i.memoizedProps=i.pendingProps,r===null?Su(i):He=r}function px(i){var r=i,l=r.alternate;switch(r.tag){case 15:case 0:r=My(l,r,r.pendingProps,r.type,void 0,Ye);break;case 11:r=My(l,r,r.pendingProps,r.type.render,r.ref,Ye);break;case 5:Hd(r);default:$y(l,r),r=He=hb(r,ya),r=By(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,ho=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))),gx(r,i)):Su(r)}function Su(i){var r=i;do{if((r.flags&32768)!==0){gx(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 gx(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 bx(i,r,l,u,p,b,E,k,z){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,z),i===yt&&(He=yt=null,Ye=0),Vs=r,Za=i,xa=l,Nh=b,kh=p,sx=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,tN(Ce,function(){return Sx(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=K.T,K.T=null,p=le.p,le.p=2,E=at,at|=4;try{Hw(i,r,l)}finally{at=E,le.p=p,K.T=u}}Jt=1,yx(),xx(),vx()}}function yx(){if(Jt===1){Jt=0;var i=Za,r=Vs,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=K.T,K.T=null;var u=le.p;le.p=2;var p=at;at|=4;try{Wy(r,i);var b=Fh,E=ab(i.containerInfo),k=b.focusedElem,z=b.selectionRange;if(E!==k&&k&&k.ownerDocument&&ib(k.ownerDocument.documentElement,k)){if(z!==null&&dd(k)){var V=z.start,ie=z.end;if(ie===void 0&&(ie=V),"selectionStart"in k)k.selectionStart=V,k.selectionEnd=Math.min(ie,k.value.length);else{var se=k.ownerDocument||document,Z=se&&se.defaultView||window;if(Z.getSelection){var ee=Z.getSelection(),ye=k.textContent.length,Ae=Math.min(z.start,ye),mt=z.end===void 0?Ae:Math.min(z.end,ye);!ee.extend&&Ae>mt&&(E=mt,mt=Ae,Ae=E);var q=nb(k,Ae),$=nb(k,mt);if(q&&$&&(ee.rangeCount!==1||ee.anchorNode!==q.node||ee.anchorOffset!==q.offset||ee.focusNode!==$.node||ee.focusOffset!==$.offset)){var Y=se.createRange();Y.setStart(q.node,q.offset),ee.removeAllRanges(),Ae>mt?(ee.addRange(Y),ee.extend($.node,$.offset)):(Y.setEnd($.node,$.offset),ee.addRange(Y))}}}}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,le.p=u,K.T=l}}i.current=r,Jt=2}}function xx(){if(Jt===2){Jt=0;var i=Za,r=Vs,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=K.T,K.T=null;var u=le.p;le.p=2;var p=at;at|=4;try{Qy(i,r.alternate,r)}finally{at=p,le.p=u,K.T=l}}Jt=3}}function vx(){if(Jt===4||Jt===3){Jt=0,ys();var i=Za,r=Vs,l=xa,u=sx;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Jt=5:(Jt=0,Vs=Za=null,Ex(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=K.T,p=le.p,le.p=2,K.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{K.T=r,le.p=p}}(xa&3)!==0&&_u(),qi(i),p=i.pendingLanes,(l&261930)!==0&&(p&42)!==0?i===Th?Oo++:(Oo=0,Th=i):Oo=0,Ro(0)}}function Ex(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,uo(r)))}function _u(){return yx(),xx(),vx(),Sx()}function Sx(){if(Jt!==5)return!1;var i=Za,r=Nh;Nh=0;var l=ta(xa),u=K.T,p=le.p;try{le.p=32>l?32:l,K.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,ix(b.current),ex(b,b.current,E,l),at=k,Ro(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(an,b)}catch{}return!0}finally{le.p=p,K.T=u,Ex(i,r)}}function _x(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)_x(i,i,l);else for(;r!==null;){if(r.tag===3){_x(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=wy(2),u=Ha(r,l,2),u!==null&&(Ny(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 wx(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),wx(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),wx(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 Ro(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,Cx(u,b))}else b=Ye,b=U(u,u===yt?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||ae(u,b)||(l=!0,Cx(u,b));u=u.next}while(l);Mh=!1}}function nN(){Nx()}function Nx(){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=kx(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||Ro(i),Ja!==0&&(Ja=0)}function kx(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,z=p[E];z===-1?((k&l)===0||(k&u)!==0)&&(p[E]=me(k,r)):z<=r&&(i.expiredLanes|=k),b&=~k}if(r=yt,l=Ye,l=U(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=Tx.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 Tx(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=U(i,i===yt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(ox(i,u,r),kx(i,Ot()),i.callbackNode!=null&&i.callbackNode===l?Tx.bind(null,i):null)}function Cx(i,r){if(_u())return null;ox(i,r,!0)}function iN(){pN(function(){(at&6)!==0?ea(ne,nN):Nx()})}function jh(){if(Ja===0){var i=zs;i===0&&(i=Tr,Tr<<=1,(Tr&261888)===0&&(Tr=256)),Ja=i}return Ja}function Ax(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ia(""+i)}function Ox(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=Ax((p[fn]||null).action),E=u.submitter;E&&(r=(r=E[fn]||null)?Ax(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 z=E?Ox(p,E):new FormData(p);Jd(l,{pending:!0,data:z,method:p.method,action:b},null,z)}}else typeof b=="function"&&(k.preventDefault(),z=E?Ox(p,E):new FormData(p),Jd(l,{pending:!0,data:z,method:p.method,action:b},b,z))},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(lb,"onAnimationEnd"),ki(ob,"onAnimationIteration"),ki(cb,"onAnimationStart"),ki("dblclick","onDoubleClick"),ki("focusin","onFocus"),ki("focusout","onBlur"),ki(Sw,"onTransitionRun"),ki(_w,"onTransitionStart"),ki(ww,"onTransitionCancel"),ki(ub,"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 Mo="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(Mo));function Rx(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],z=k.instance,V=k.currentTarget;if(k=k.listener,z!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=V;try{b(p)}catch(ie){$c(ie)}p.currentTarget=null,b=z}else for(E=0;E<u.length;E++){if(k=u[E],z=k.instance,V=k.currentTarget,k=k.listener,z!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=V;try{b(p)}catch(ie){$c(ie)}p.currentTarget=null,b=z}}}}function Ke(i,r){var l=r[Ql];l===void 0&&(l=r[Ql]=new Set);var u=i+"__bubble";l.has(u)||(Mx(r,i,2,!1),l.add(u))}function Ih(i,r,l){var u=0;r&&(u|=4),Mx(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 Mx(i,r,l,u){switch(lv(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 z=E.tag;if((z===3||z===4)&&E.stateNode.containerInfo===p)return;E=E.return}for(;k!==null;){if(E=vn(k),E===null)return;if(z=E.tag,z===5||z===6||z===26||z===27){u=b=E;continue e}k=k.parentNode}}u=u.return}jc(function(){var V=b,ie=Ie(l),se=[];e:{var Z=fb.get(i);if(Z!==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=$g;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 lb:case ob:case cb:ee=K_;break;case ub: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=Pg;break;case"toggle":case"beforetoggle":ee=cw}var Ae=(r&4)!==0,mt=!Ae&&(i==="scroll"||i==="scrollend"),q=Ae?Z!==null?Z+"Capture":null:Z;Ae=[];for(var $=V,Y;$!==null;){var re=$;if(Y=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||Y===null||q===null||(re=Jl($,q),re!=null&&Ae.push(jo($,re,Y))),mt)break;$=$.return}0<Ae.length&&(Z=new ee(Z,ye,null,l,ie),se.push({event:Z,listeners:Ae}))}}if((r&7)===0){e:{if(Z=i==="mouseover"||i==="pointerover",ee=i==="mouseout"||i==="pointerout",Z&&l!==Ee&&(ye=l.relatedTarget||l.fromElement)&&(vn(ye)||ye[Ma]))break e;if((ee||Z)&&(Z=ie.window===ie?ie:(Z=ie.ownerDocument)?Z.defaultView||Z.parentWindow:window,ee?(ye=l.relatedTarget||l.toElement,ee=V,ye=ye?vn(ye):null,ye!==null&&(mt=o(ye),Ae=ye.tag,ye!==mt||Ae!==5&&Ae!==27&&Ae!==6)&&(ye=null)):(ee=null,ye=V),ee!==ye)){if(Ae=$g,re="onMouseLeave",q="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Ae=Pg,re="onPointerLeave",q="onPointerEnter",$="pointer"),mt=ee==null?Z:ja(ee),Y=ye==null?Z:ja(ye),Z=new Ae(re,$+"leave",ee,l,ie),Z.target=mt,Z.relatedTarget=Y,re=null,vn(ie)===V&&(Ae=new Ae(q,$+"enter",ye,l,ie),Ae.target=Y,Ae.relatedTarget=mt,re=Ae),mt=re,ee&&ye)t:{for(Ae=oN,q=ee,$=ye,Y=0,re=q;re;re=Ae(re))Y++;re=0;for(var ke=$;ke;ke=Ae(ke))re++;for(;0<Y-re;)q=Ae(q),Y--;for(;0<re-Y;)$=Ae($),re--;for(;Y--;){if(q===$||$!==null&&q===$.alternate){Ae=q;break t}q=Ae(q),$=Ae($)}Ae=null}else Ae=null;ee!==null&&jx(se,Z,ee,Ae,!1),ye!==null&&mt!==null&&jx(se,mt,ye,Ae,!0)}}e:{if(Z=V?ja(V):window,ee=Z.nodeName&&Z.nodeName.toLowerCase(),ee==="select"||ee==="input"&&Z.type==="file")var tt=Xg;else if(Yg(Z))if(Zg)tt=xw;else{tt=bw;var Se=gw}else ee=Z.nodeName,!ee||ee.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?V&&La(V.elementType)&&(tt=Xg):tt=yw;if(tt&&(tt=tt(i,V))){Vg(se,tt,l,ie);break e}Se&&Se(i,Z,V),i==="focusout"&&V&&Z.type==="number"&&V.memoizedProps.value!=null&&ks(Z,"number",Z.value)}switch(Se=V?ja(V):window,i){case"focusin":(Yg(Se)||Se.contentEditable==="true")&&(As=Se,hd=V,lo=null);break;case"focusout":lo=hd=As=null;break;case"mousedown":md=!0;break;case"contextmenu":case"mouseup":case"dragend":md=!1,rb(se,l,ie);break;case"selectionchange":if(Ew)break;case"keydown":case"keyup":rb(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?Gg(i,l)&&(Ve="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ve="onCompositionStart");Ve&&(qg&&l.locale!=="ko"&&(Cs||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Cs&&(Be=Bg()):(za=ie,ad="value"in za?za.value:za.textContent,Cs=!0)),Se=Tu(V,Ve),0<Se.length&&(Ve=new Fg(Ve,i,null,l,ie),se.push({event:Ve,listeners:Se}),Be?Ve.data=Be:(Be=Qg(l),Be!==null&&(Ve.data=Be)))),(Be=fw?dw(i,l):hw(i,l))&&(Ve=Tu(V,"onBeforeInput"),0<Ve.length&&(Se=new Fg("onBeforeInput","beforeinput",null,l,ie),se.push({event:Se,listeners:Ve}),Se.data=Be)),aN(se,i,V,l,ie)}Rx(se,r)})}function jo(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=Jl(i,l),p!=null&&u.unshift(jo(i,p,b)),p=Jl(i,r),p!=null&&u.push(jo(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 jx(i,r,l,u,p){for(var b=r._reactName,E=[];l!==null&&l!==u;){var k=l,z=k.alternate,V=k.stateNode;if(k=k.tag,z!==null&&z===u)break;k!==5&&k!==26&&k!==27||V===null||(z=V,p?(V=Jl(l,b),V!=null&&E.unshift(jo(l,V,z))):p||(V=Jl(l,b),V!=null&&E.push(jo(l,V,z)))),l=l.return}E.length!==0&&i.push({event:r,listeners:E})}var cN=/\r\n?/g,uN=/\u0000|\uFFFD/g;function Dx(i){return(typeof i=="string"?i:""+i).replace(cN,`
|
|
49
|
+
`).replace(uN,"")}function Lx(i,r){return r=Dx(r),Dx(i)===r}function ht(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"&&ht(i,r,"name",p.name,p,null),ht(i,r,"formEncType",p.formEncType,p,null),ht(i,r,"formMethod",p.formMethod,p,null),ht(i,r,"formTarget",p.formTarget,p,null)):(ht(i,r,"encType",p.encType,p,null),ht(i,r,"method",p.method,p,null),ht(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:ht(i,r,b,E,l,null)}}p&&ht(i,r,"srcSet",l.srcSet,l,null),u&&ht(i,r,"src",l.src,l,null);return;case"input":Ke("invalid",i);var k=b=E=p=null,z=null,V=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":z=ie;break;case"defaultChecked":V=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:ht(i,r,u,ie,l,null)}}Rr(i,b,k,z,V,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:ht(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:ht(i,r,E,k,l,null)}Ts(i,u,p,b);return;case"option":for(z in l)if(l.hasOwnProperty(z)&&(u=l[z],u!=null))switch(z){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:ht(i,r,z,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<Mo.length;u++)Ke(Mo[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(V in l)if(l.hasOwnProperty(V)&&(u=l[V],u!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:ht(i,r,V,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&&ht(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,z=null,V=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":z=se;default:u.hasOwnProperty(ee)||ht(i,r,ee,null,u,se)}}for(var Z in u){var ee=u[Z];if(se=l[Z],u.hasOwnProperty(Z)&&(ee!=null||se!=null))switch(Z){case"type":b=ee;break;case"name":p=ee;break;case"checked":V=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&&ht(i,r,Z,ee,u,se)}}Xl(i,E,k,z,V,ie,b,p);return;case"select":ee=E=k=Z=null;for(b in l)if(z=l[b],l.hasOwnProperty(b)&&z!=null)switch(b){case"value":break;case"multiple":ee=z;default:u.hasOwnProperty(b)||ht(i,r,b,null,u,z)}for(p in u)if(b=u[p],z=l[p],u.hasOwnProperty(p)&&(b!=null||z!=null))switch(p){case"value":Z=b;break;case"defaultValue":k=b;break;case"multiple":E=b;default:b!==z&&ht(i,r,p,b,u,z)}r=k,l=E,u=ee,Z!=null?rn(i,!!l,Z,!1):!!u!=!!l&&(r!=null?rn(i,!!l,r,!0):rn(i,!!l,l?[]:"",!1));return;case"textarea":ee=Z=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:ht(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":Z=p;break;case"defaultValue":ee=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==b&&ht(i,r,E,p,u,b)}Rc(i,Z,ee);return;case"option":for(var ye in l)if(Z=l[ye],l.hasOwnProperty(ye)&&Z!=null&&!u.hasOwnProperty(ye))switch(ye){case"selected":i.selected=!1;break;default:ht(i,r,ye,null,u,Z)}for(z in u)if(Z=u[z],ee=l[z],u.hasOwnProperty(z)&&Z!==ee&&(Z!=null||ee!=null))switch(z){case"selected":i.selected=Z&&typeof Z!="function"&&typeof Z!="symbol";break;default:ht(i,r,z,Z,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)Z=l[Ae],l.hasOwnProperty(Ae)&&Z!=null&&!u.hasOwnProperty(Ae)&&ht(i,r,Ae,null,u,Z);for(V in u)if(Z=u[V],ee=l[V],u.hasOwnProperty(V)&&Z!==ee&&(Z!=null||ee!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,r));break;default:ht(i,r,V,Z,u,ee)}return;default:if(La(r)){for(var mt in l)Z=l[mt],l.hasOwnProperty(mt)&&Z!==void 0&&!u.hasOwnProperty(mt)&&Uh(i,r,mt,void 0,u,Z);for(ie in u)Z=u[ie],ee=l[ie],!u.hasOwnProperty(ie)||Z===ee||Z===void 0&&ee===void 0||Uh(i,r,ie,Z,u,ee);return}}for(var q in l)Z=l[q],l.hasOwnProperty(q)&&Z!=null&&!u.hasOwnProperty(q)&&ht(i,r,q,null,u,Z);for(se in u)Z=u[se],ee=l[se],!u.hasOwnProperty(se)||Z===ee||Z==null&&ee==null||ht(i,r,se,Z,u,ee)}function Ix(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&&Ix(E)){for(E=0,k=p.responseEnd,u+=1;u<l.length;u++){var z=l[u],V=z.startTime;if(V>k)break;var ie=z.transferSize,se=z.initiatorType;ie&&Ix(se)&&(z=z.responseEnd,E+=ie*(z<k?1:(k-V)/(z-V)))}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 zx(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 Bx(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 Ux=typeof setTimeout=="function"?setTimeout:void 0,mN=typeof clearTimeout=="function"?clearTimeout:void 0,$x=typeof Promise=="function"?Promise:void 0,pN=typeof queueMicrotask=="function"?queueMicrotask:typeof $x<"u"?function(i){return $x.resolve(null).then(i).catch(gN)}:Ux;function gN(i){setTimeout(function(){throw i})}function er(i){return i==="head"}function Fx(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")Do(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Do(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"&&Do(i.ownerDocument.body);l=p}while(l);nl(r)}function Px(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),Yl(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 qx(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 Hx(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 Kx(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 Gx(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 Do(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);Yl(i)}var gi=new Map,Qx=new Set;function Au(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var va=le.d;le.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"?uy(r):va.r(i)}var Js=typeof document>"u"?null:document;function Yx(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+'"]'),Qx.has(p)||(Qx.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),Yx("dns-prefetch",i,null)}function _N(i,r){va.C(i,r),Yx("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(Lo(b))||r==="script"&&u.querySelector(Io(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(Io(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(Lo(b)))k.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":r},l),(l=gi.get(b))&&Yh(i,l);var z=E=u.createElement("link");Ht(z),cn(z,"link",i),z._p=new Promise(function(V,ie){z.onload=V,z.onerror=ie}),z.addEventListener("load",function(){k.loading|=1}),z.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(Io(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(Io(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 Vx(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(Lo(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 Lo(i){return'link[rel="stylesheet"]['+i+"]"}function Xx(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 Io(i){return"script[async]"+i}function Zx(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(Lo(p));if(b)return r.state.loading|=4,r.instance=b,Ht(b),b;u=Xx(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,z){E.onload=k,E.onerror=z}),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(Io(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 Wx(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 Jx(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 ev(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(Lo(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=Xx(u),(p=gi.get(p))&&Yh(u,p),b=b.createElement("link"),Ht(b);var E=b;E._p=new Promise(function(k,z){E.onload=k,E.onerror=z}),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 zo={$$typeof:A,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function DN(i,r,l,u,p,b,E,k,z){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=z,this.incompleteTransitions=new Map}function tv(i,r,l,u,p,b,E,k,z,V,ie,se){return i=new DN(i,r,l,E,z,V,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 nv(i){return i?(i=Ms,i):Ms}function iv(i,r,l,u,p,b){p=nv(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),po(l,i,r))}function av(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){av(i,r),(i=i.alternate)&&av(i,r)}function rv(i){if(i.tag===13||i.tag===31){var r=Lr(i,67108864);r!==null&&In(r,i,67108864),Zh(i,67108864)}}function sv(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=K.T;K.T=null;var b=le.p;try{le.p=2,Wh(i,r,l,u)}finally{le.p=b,K.T=p}}function IN(i,r,l,u){var p=K.T;K.T=null;var b=le.p;try{le.p=8,Wh(i,r,l,u)}finally{le.p=b,K.T=p}}function Wh(i,r,l,u){if(Lu){var p=Jh(u);if(p===null)Bh(i,r,u,Iu,l),ov(i,u);else if(BN(p,i,r,l,u))u.stopPropagation();else if(ov(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 z=1<<31-lt(E);k.entanglements[1]|=z,E&=~z}qi(b),(at&6)===0&&(yu=Ot()+500,Ro(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 lv(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,Bo=new Map,Uo=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 ov(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":Bo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uo.delete(r.pointerId)}}function $o(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&&rv(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=$o(tr,i,r,l,u,p),!0;case"dragenter":return nr=$o(nr,i,r,l,u,p),!0;case"mouseover":return ir=$o(ir,i,r,l,u,p),!0;case"pointerover":var b=p.pointerId;return Bo.set(b,$o(Bo.get(b)||null,i,r,l,u,p)),!0;case"gotpointercapture":return b=p.pointerId,Uo.set(b,$o(Uo.get(b)||null,i,r,l,u,p)),!0}return!1}function cv(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(){sv(l)});return}}else if(r===31){if(r=f(l),r!==null){i.blockedOn=r,Ss(i.priority,function(){sv(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&&rv(r),i.blockedOn=l,!1;r.shift()}return!0}function uv(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),Bo.forEach(uv),Uo.forEach(uv)}function Bu(i,r){i.blockedOn===r&&(i.blockedOn=null,tm||(tm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,UN)))}var Uu=null;function fv(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(z){return Bu(z,i)}tr!==null&&Bu(tr,i),nr!==null&&Bu(nr,i),ir!==null&&Bu(ir,i),Bo.forEach(r),Uo.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);)cv(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||fv(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),fv(l)}}}function dv(){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();iv(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;iv(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&&cv(i)}};var hv=t.version;if(hv!=="19.2.5")throw Error(a(527,hv,"19.2.5"));le.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:K,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 Po.createRoot=function(i,r){if(!s(i))throw Error(a(299));var l=!1,u="",p=vy,b=Ey,E=Sy;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=tv(i,1,!1,null,null,l,u,null,p,b,E,dv),i[Ma]=r.current,zh(i),new nm(r)},Po.hydrateRoot=function(i,r,l){if(!s(i))throw Error(a(299));var u=!1,p="",b=vy,E=Ey,k=Sy,z=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&&(z=l.formState)),r=tv(i,1,!0,r,l??null,u,p,z,b,E,k,dv),r.context=nv(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)},Po.version="19.2.5",Po}var Nv;function WN(){if(Nv)return sm.exports;Nv=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,oE,ek=(oE=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(){B(this,ur)||this.setEventListener(B(this,bl))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,ur))==null||t.call(this),ge(this,ur,void 0))}setEventListener(t){var n;ge(this,bl,t),(n=B(this,ur))==null||n.call(this),ge(this,ur,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){B(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 B(this,ts)=="boolean"?B(this,ts):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ts=new WeakMap,ur=new WeakMap,bl=new WeakMap,oE),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,cE,nk=(cE=class{constructor(){we(this,fr,tk);we(this,Np,!1)}setTimeoutProvider(e){ge(this,fr,e)}setTimeout(e,t){return B(this,fr).setTimeout(e,t)}clearTimeout(e){B(this,fr).clearTimeout(e)}setInterval(e,t){return B(this,fr).setInterval(e,t)}clearInterval(e){B(this,fr).clearInterval(e)}},fr=new WeakMap,Np=new WeakMap,cE),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 xE(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 kv(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(!nc(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 Tv(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(!nc(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 nc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nc(e[n],t[n])):!1}var sk=Object.prototype.hasOwnProperty;function vE(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=Cv(e)&&Cv(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=vE(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 Cv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hm(e){if(!Av(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Av(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Av(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?vE(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 EE(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 ic=(()=>{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,uE,hk=(uE=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(){B(this,dr)||this.setEventListener(B(this,xl))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,dr))==null||t.call(this),ge(this,dr,void 0))}setEventListener(t){var n;ge(this,xl,t),(n=B(this,dr))==null||n.call(this),ge(this,dr,t(this.setOnline.bind(this)))}setOnline(t){B(this,yl)!==t&&(ge(this,yl,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return B(this,yl)}},yl=new WeakMap,dr=new WeakMap,xl=new WeakMap,uE),gf=new hk;function mk(e){return Math.min(1e3*2**e,3e4)}function SE(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 _E(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=()=>SE(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 T;if(o())return;const R=e.retry??(ic.isServer()?0:3),A=e.retryDelay??mk,D=typeof A=="function"?A(n,w):A,P=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,w);if(t||!P){x(w);return}n++,(T=e.onFail)==null||T.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,fE,wE=(fE=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??(ic.isServer()?1/0:300*1e3))}clearGcTimeout(){B(this,ns)!==void 0&&(Zr.clearTimeout(B(this,ns)),ge(this,ns,void 0))}},ns=new WeakMap,fE),is,vl,bi,as,nn,uc,rs,ii,NE,Ea,dE,pk=(dE=class extends wE{constructor(t){super();we(this,ii);we(this,is);we(this,vl);we(this,bi);we(this,as);we(this,nn);we(this,uc);we(this,rs);ge(this,rs,!1),ge(this,uc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,as,t.client),ge(this,bi,B(this,as).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,is,Rv(this.options)),this.state=t.state??B(this,is),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=B(this,nn))==null?void 0:t.promise}setOptions(t){if(this.options={...B(this,uc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Rv(this.options);n.data!==void 0&&(this.setState(Ov(n.data,n.dataUpdatedAt)),ge(this,is,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&B(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=B(this,nn))==null?void 0:a.promise;return(s=B(this,nn))==null||s.cancel(t),n?n.then(wn).catch(wn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return B(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:!xE(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=B(this,nn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=B(this,nn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),B(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||(B(this,nn)&&(B(this,rs)||Ue(this,ii,NE).call(this)?B(this,nn).cancel({revert:!0}):B(this,nn).cancelRetry()),this.scheduleGc()),B(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=B(this,nn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(B(this,nn))return B(this,nn).continueRetry(),B(this,nn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(P=>P.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=EE(this.options,n),T=(()=>{const F={client:B(this,as),queryKey:this.queryKey,meta:this.meta};return s(F),F})();return ge(this,rs,!1),this.options.persister?this.options.persister(D,T,this):D(T)},f=(()=>{const D={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:B(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,_E({initialPromise:n==null?void 0:n.initialPromise,fn:f.fetchFn,onCancel:D=>{D instanceof Qm&&D.revert&&this.setState({...B(this,vl),fetchStatus:"idle"}),a.abort()},onFail:(D,P)=>{Ue(this,ii,Ea).call(this,{type:"failed",failureCount:D,error:P})},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 B(this,nn).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(v=(x=B(this,bi).config).onSuccess)==null||v.call(x,D,this),(_=(S=B(this,bi).config).onSettled)==null||_.call(S,D,this.state.error,this),D}catch(D){if(D instanceof Qm){if(D.silent)return B(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=B(this,bi).config).onError)==null||w.call(N,D,this),(A=(R=B(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,uc=new WeakMap,rs=new WeakMap,ii=new WeakSet,NE=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,...kE(a.data,this.options),fetchMeta:t.meta??null};case"success":const s={...a,...Ov(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()}),B(this,bi).notify({query:this,type:"updated",action:t})})},dE);function kE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:SE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ov(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Rv(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,fc,Sn,ss,El,Sa,hr,dc,Sl,_l,ls,os,mr,wl,rt,Xo,Ym,Vm,Xm,Zm,Wm,Jm,ep,TE,hE,gk=(hE=class extends jl{constructor(t,n){super();we(this,rt);we(this,Un);we(this,We);we(this,fc);we(this,Sn);we(this,ss);we(this,El);we(this,Sa);we(this,hr);we(this,dc);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&&(B(this,We).addObserver(this),Mv(B(this,We),this.options)?Ue(this,rt,Xo).call(this):this.updateResult(),Ue(this,rt,Zm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return tp(B(this,We),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return tp(B(this,We),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,rt,Wm).call(this),Ue(this,rt,Jm).call(this),B(this,We).removeObserver(this)}setOptions(t){const n=this.options,a=B(this,We);if(this.options=B(this,Un).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,B(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),B(this,We).setOptions(this.options),n._defaulted&&!pf(this.options,n)&&B(this,Un).getQueryCache().notify({type:"observerOptionsUpdated",query:B(this,We),observer:this});const s=this.hasListeners();s&&jv(B(this,We),a,this.options,n)&&Ue(this,rt,Xo).call(this),this.updateResult(),s&&(B(this,We)!==a||yi(this.options.enabled,B(this,We))!==yi(n.enabled,B(this,We))||xr(this.options.staleTime,B(this,We))!==xr(n.staleTime,B(this,We)))&&Ue(this,rt,Ym).call(this);const o=Ue(this,rt,Vm).call(this);s&&(B(this,We)!==a||yi(this.options.enabled,B(this,We))!==yi(n.enabled,B(this,We))||o!==B(this,mr))&&Ue(this,rt,Xm).call(this,o)}getOptimisticResult(t){const n=B(this,Un).getQueryCache().build(B(this,Un),t),a=this.createResult(n,t);return yk(this,a)&&(ge(this,Sn,a),ge(this,El,this.options),ge(this,ss,B(this,We).state)),a}getCurrentResult(){return B(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&&B(this,Sa).status==="pending"&&B(this,Sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){B(this,wl).add(t)}getCurrentQuery(){return B(this,We)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=B(this,Un).defaultQueryOptions(t),a=B(this,Un).getQueryCache().build(B(this,Un),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return Ue(this,rt,Xo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),B(this,Sn)))}createResult(t,n){var W;const a=B(this,We),s=this.options,o=B(this,Sn),c=B(this,ss),f=B(this,El),h=t!==a?t.state:B(this,fc),{state:y}=t;let g={...y},x=!1,v;if(n._optimisticResults){const L=this.hasListeners(),G=!L&&Mv(t,n),J=L&&jv(t,a,n,s);(G||J)&&(g={...g,...kE(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 L;o!=null&&o.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(L=o.data,w=!0):L=typeof n.placeholderData=="function"?n.placeholderData((W=B(this,_l))==null?void 0:W.state.data,B(this,_l)):n.placeholderData,L!==void 0&&(N="success",v=Km(o==null?void 0:o.data,L,n),x=!0)}if(n.select&&v!==void 0&&!w)if(o&&v===(c==null?void 0:c.data)&&n.select===B(this,dc))v=B(this,Sl);else try{ge(this,dc,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(L){ge(this,hr,L)}B(this,hr)&&(S=B(this,hr),v=B(this,Sl),_=Date.now(),N="error");const R=g.fetchStatus==="fetching",A=N==="pending",D=N==="error",P=A&&R,T=v!==void 0,I={status:N,fetchStatus:g.fetchStatus,isPending:A,isSuccess:N==="success",isError:D,isInitialLoading:P,isLoading:P,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&&!T,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:D&&T,isStale:Mp(t,n),refetch:this.refetch,promise:B(this,Sa),isEnabled:yi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=I.data!==void 0,G=I.status==="error"&&!L,J=Q=>{G?Q.reject(I.error):L&&Q.resolve(I.data)},oe=()=>{const Q=ge(this,Sa,I.promise=Gm());J(Q)},H=B(this,Sa);switch(H.status){case"pending":t.queryHash===a.queryHash&&J(H);break;case"fulfilled":(G||I.data!==H.value)&&oe();break;case"rejected":(!G||I.error!==H.reason)&&oe();break}}return I}updateResult(){const t=B(this,Sn),n=this.createResult(B(this,We),this.options);if(ge(this,ss,B(this,We).state),ge(this,El,this.options),B(this,ss).data!==void 0&&ge(this,_l,B(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&&!B(this,wl).size)return!0;const c=new Set(o??B(this,wl));return this.options.throwOnError&&c.add("error"),Object.keys(B(this,Sn)).some(f=>{const d=f;return B(this,Sn)[d]!==t[d]&&c.has(d)})};Ue(this,rt,TE).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,rt,Zm).call(this)}},Un=new WeakMap,We=new WeakMap,fc=new WeakMap,Sn=new WeakMap,ss=new WeakMap,El=new WeakMap,Sa=new WeakMap,hr=new WeakMap,dc=new WeakMap,Sl=new WeakMap,_l=new WeakMap,ls=new WeakMap,os=new WeakMap,mr=new WeakMap,wl=new WeakMap,rt=new WeakSet,Xo=function(t){Ue(this,rt,ep).call(this);let n=B(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,B(this,We));if(ic.isServer()||B(this,Sn).isStale||!qm(t))return;const a=xE(B(this,Sn).dataUpdatedAt,t)+1;ge(this,ls,Zr.setTimeout(()=>{B(this,Sn).isStale||this.updateResult()},a))},Vm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(B(this,We)):this.options.refetchInterval)??!1},Xm=function(t){Ue(this,rt,Jm).call(this),ge(this,mr,t),!(ic.isServer()||yi(this.options.enabled,B(this,We))===!1||!qm(B(this,mr))||B(this,mr)===0)&&ge(this,os,Zr.setInterval(()=>{(this.options.refetchIntervalInBackground||Cp.isFocused())&&Ue(this,rt,Xo).call(this)},B(this,mr)))},Zm=function(){Ue(this,rt,Ym).call(this),Ue(this,rt,Xm).call(this,Ue(this,rt,Vm).call(this))},Wm=function(){B(this,ls)!==void 0&&(Zr.clearTimeout(B(this,ls)),ge(this,ls,void 0))},Jm=function(){B(this,os)!==void 0&&(Zr.clearInterval(B(this,os)),ge(this,os,void 0))},ep=function(){const t=B(this,Un).getQueryCache().build(B(this,Un),this.options);if(t===B(this,We))return;const n=B(this,We);ge(this,We,t),ge(this,fc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},TE=function(t){en.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(B(this,Sn))}),B(this,Un).getQueryCache().notify({query:B(this,We),type:"observerResultsUpdated"})})},hE);function bk(e,t){return yi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Mv(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 jv(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 Dv(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=EE(t.options,t.fetchOptions),R=async(A,D,P)=>{if(_)return Promise.reject();if(D==null&&A.pages.length)return Promise.resolve(A);const F=(()=>{const G={client:t.client,queryKey:t.queryKey,pageParam:D,direction:P?"backward":"forward",meta:t.options.meta};return N(G),G})(),I=await w(F),{maxPages:W}=t.options,L=P?ck:ok;return{pages:L(A.pages,I,W),pageParams:L(A.pageParams,D,W)}};if(s&&o.length){const A=s==="backward",D=A?xk:Lv,P={pages:o,pageParams:c},T=D(a,P);f=await R(P,T,A)}else{const A=e??o.length;do{const D=d===0?c[0]??a.initialPageParam:Lv(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 Lv(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 hc,Gi,mn,cs,Qi,or,mE,vk=(mE=class extends wE{constructor(t){super();we(this,Qi);we(this,hc);we(this,Gi);we(this,mn);we(this,cs);ge(this,hc,t.client),this.mutationId=t.mutationId,ge(this,mn,t.mutationCache),ge(this,Gi,[]),this.state=t.state||CE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){B(this,Gi).includes(t)||(B(this,Gi).push(t),this.clearGcTimeout(),B(this,mn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,Gi,B(this,Gi).filter(n=>n!==t)),this.scheduleGc(),B(this,mn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){B(this,Gi).length||(this.state.status==="pending"?this.scheduleGc():B(this,mn).remove(this))}continue(){var t;return((t=B(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,P,T,F;const n=()=>{Ue(this,Qi,or).call(this,{type:"continue"})},a={client:B(this,hc),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,cs,_E({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(I,W)=>{Ue(this,Qi,or).call(this,{type:"failed",failureCount:I,error:W})},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:()=>B(this,mn).canRun(this)}));const s=this.state.status==="pending",o=!B(this,cs).canStart();try{if(s)n();else{Ue(this,Qi,or).call(this,{type:"pending",variables:t,isPaused:o}),B(this,mn).config.onMutate&&await B(this,mn).config.onMutate(t,this,a);const W=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,a));W!==this.state.context&&Ue(this,Qi,or).call(this,{type:"pending",context:W,variables:t,isPaused:o})}const I=await B(this,cs).start();return await((h=(d=B(this,mn).config).onSuccess)==null?void 0:h.call(d,I,t,this.state.context,this,a)),await((g=(y=this.options).onSuccess)==null?void 0:g.call(y,I,t,this.state.context,a)),await((v=(x=B(this,mn).config).onSettled)==null?void 0:v.call(x,I,null,this.state.variables,this.state.context,this,a)),await((_=(S=this.options).onSettled)==null?void 0:_.call(S,I,null,t,this.state.context,a)),Ue(this,Qi,or).call(this,{type:"success",data:I}),I}catch(I){try{await((w=(N=B(this,mn).config).onError)==null?void 0:w.call(N,I,t,this.state.context,this,a))}catch(W){Promise.reject(W)}try{await((A=(R=this.options).onError)==null?void 0:A.call(R,I,t,this.state.context,a))}catch(W){Promise.reject(W)}try{await((P=(D=B(this,mn).config).onSettled)==null?void 0:P.call(D,void 0,I,this.state.variables,this.state.context,this,a))}catch(W){Promise.reject(W)}try{await((F=(T=this.options).onSettled)==null?void 0:F.call(T,void 0,I,t,this.state.context,a))}catch(W){Promise.reject(W)}throw Ue(this,Qi,or).call(this,{type:"error",error:I}),I}finally{B(this,mn).runNext(this)}}},hc=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(()=>{B(this,Gi).forEach(a=>{a.onMutationUpdate(t)}),B(this,mn).notify({mutation:this,type:"updated",action:t})})},mE);function CE(){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,mc,pE,Ek=(pE=class extends jl{constructor(t={}){super();we(this,_a);we(this,Oi);we(this,mc);this.config=t,ge(this,_a,new Set),ge(this,Oi,new Map),ge(this,mc,0)}build(t,n,a){const s=new vk({client:t,mutationCache:this,mutationId:++Pu(this,mc)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){B(this,_a).add(t);const n=qu(t);if(typeof n=="string"){const a=B(this,Oi).get(n);a?a.push(t):B(this,Oi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(B(this,_a).delete(t)){const n=qu(t);if(typeof n=="string"){const a=B(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&&B(this,Oi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=qu(t);if(typeof n=="string"){const a=B(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=B(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(()=>{B(this,_a).forEach(t=>{this.notify({type:"removed",mutation:t})}),B(this,_a).clear(),B(this,Oi).clear()})}getAll(){return Array.from(B(this,_a))}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Tv(n,a))}findAll(t={}){return this.getAll().filter(n=>Tv(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,mc=new WeakMap,pE);function qu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var wa,pr,$n,Na,Ca,lf,np,gE,Sk=(gE=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=B(this,wa).defaultMutationOptions(n),pf(this.options,a)||B(this,wa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:B(this,$n),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&us(a.mutationKey)!==us(this.options.mutationKey)?this.reset():((s=B(this,$n))==null?void 0:s.state.status)==="pending"&&B(this,$n).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=B(this,$n))==null||n.removeObserver(this)}onMutationUpdate(n){Ue(this,Ca,lf).call(this),Ue(this,Ca,np).call(this,n)}getCurrentResult(){return B(this,pr)}reset(){var n;(n=B(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=B(this,$n))==null||s.removeObserver(this),ge(this,$n,B(this,wa).getMutationCache().build(B(this,wa),this.options)),B(this,$n).addObserver(this),B(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=B(this,$n))==null?void 0:a.state)??CE();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(B(this,Na)&&this.hasListeners()){const g=B(this,pr).variables,x=B(this,pr).context,v={client:B(this,wa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=B(this,Na)).onSuccess)==null||s.call(a,n.data,g,x,v)}catch(S){Promise.reject(S)}try{(c=(o=B(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=B(this,Na)).onError)==null||d.call(f,n.error,g,x,v)}catch(S){Promise.reject(S)}try{(y=(h=B(this,Na)).onSettled)==null||y.call(h,void 0,n.error,g,x,v)}catch(S){Promise.reject(S)}}}this.listeners.forEach(g=>{g(B(this,pr))})})},gE),Yi,bE,_k=(bE=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){B(this,Yi).has(t.queryHash)||(B(this,Yi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=B(this,Yi).get(t.queryHash);n&&(t.destroy(),n===t&&B(this,Yi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){en.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return B(this,Yi).get(t)}getAll(){return[...B(this,Yi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>kv(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>kv(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,bE),zt,gr,br,Nl,kl,yr,Tl,Cl,yE,wk=(yE=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)._++,B(this,yr)===1&&(ge(this,Tl,Cp.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,zt).onFocus())})),ge(this,Cl,gf.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,zt).onOnline())})))}unmount(){var e,t;Pu(this,yr)._--,B(this,yr)===0&&((e=B(this,Tl))==null||e.call(this),ge(this,Tl,void 0),(t=B(this,Cl))==null||t.call(this),ge(this,Cl,void 0))}isFetching(e){return B(this,zt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return B(this,gr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=B(this,zt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=B(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 B(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=B(this,zt).get(a.queryHash),o=s==null?void 0:s.state.data,c=rk(t,o);if(c!==void 0)return B(this,zt).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return en.batch(()=>B(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=B(this,zt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=B(this,zt);en.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=B(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(()=>B(this,zt).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(wn).catch(wn)}invalidateQueries(e,t={}){return en.batch(()=>(B(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(()=>B(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=B(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=Dv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(wn).catch(wn)}ensureInfiniteQueryData(e){return e.behavior=Dv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gf.isOnline()?B(this,gr).resumePausedMutations():Promise.resolve()}getQueryCache(){return B(this,zt)}getMutationCache(){return B(this,gr)}getDefaultOptions(){return B(this,br)}setDefaultOptions(e){ge(this,br,e)}setQueryDefaults(e,t){B(this,Nl).set(us(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...B(this,Nl).values()],n={};return t.forEach(a=>{nc(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){B(this,kl).set(us(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...B(this,kl).values()],n={};return t.forEach(a=>{nc(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...B(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:{...B(this,br).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){B(this,zt).clear(),B(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,yE),AE=M.createContext(void 0),Tn=e=>{const t=M.useContext(AE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Nk=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(AE.Provider,{value:e,children:t})),OE=M.createContext(!1),kk=()=>M.useContext(OE);OE.Provider;function Tk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ck=M.createContext(Tk()),Ak=()=>M.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=>{M.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,Iv=(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]=M.useState(()=>new t(o,c)),y=h.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(N=>{const w=g?h.subscribe(en.batchCalls(N)):wn;return h.updateResult(),w},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),M.useEffect(()=>{h.setOptions(c)},[c,h]),Lk(c,y))throw Iv(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&&!ic.isServer()&&Dk(y,a)){const N=d?Iv(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 gt(e,t){return Ik(e,gk)}function Pn(e,t){const n=Tn(),[a]=M.useState(()=>new Sk(n,e));M.useEffect(()=>{a.setOptions(e)},[a,e]);const s=M.useSyncExternalStore(M.useCallback(c=>a.subscribe(en.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=M.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 zv="popstate";function Bv(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:ac(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 Uv(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 ac({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=Bv(N)?N:ip(_.location,N,w);h=y()+1;let A=Uv(R,h),D=_.createHref(R.unstable_mask||R);try{c.pushState(A,"",D)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;s.location.assign(D)}o&&d&&d({action:f,location:_.location,delta:1})}function v(N,w){f="REPLACE";let R=Bv(N)?N:ip(_.location,N,w);h=y();let A=Uv(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(zv,g),d=N,()=>{s.removeEventListener(zv,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:ac(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function RE(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=ME(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 ME(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}".`),ME(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 jE(c.path))o(c,f,!0,h)}),t}function jE(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=jE(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,$v=e=>e==="*";function Vk(e,t){let n=e.split("/"),a=n.length;return n.some($v)&&(a+=Yk),t&&(a+=Kk),n.filter(s=>!$v(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=DE(n),n.startsWith("/")?o=Fv(n.substring(1),"/"):o=Fv(n,t)):o=t,{pathname:o,search:aT(a),hash:rT(s)}}function Fv(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 DE=e=>e.replace(/\/\/+/g,"/"),Ri=e=>DE(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 LE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function IE(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(LE)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 zE=["POST","PUT","PATCH","DELETE"];new Set(zE);var cT=["GET",...zE];new Set(cT);var Ll=M.createContext(null);Ll.displayName="DataRouter";var Rf=M.createContext(null);Rf.displayName="DataRouterState";var BE=M.createContext(!1);function uT(){return M.useContext(BE)}var UE=M.createContext({isTransitioning:!1});UE.displayName="ViewTransition";var fT=M.createContext(new Map);fT.displayName="Fetchers";var dT=M.createContext(null);dT.displayName="Await";var si=M.createContext(null);si.displayName="Navigation";var pc=M.createContext(null);pc.displayName="Location";var _i=M.createContext({outlet:null,matches:[],isDataRoute:!1});_i.displayName="Route";var Dp=M.createContext(null);Dp.displayName="RouteError";var $E="REACT_ROUTER_ERROR",hT="REDIRECT",mT="ROUTE_ERROR_RESPONSE";function pT(e){if(e.startsWith(`${$E}:${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(`${$E}:${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}=M.useContext(si),{hash:s,pathname:o,search:c}=gc(e,{relative:t}),f=o;return n!=="/"&&(f=o==="/"?n:Ri([n,o])),a.createHref({pathname:f,search:c,hash:s})}function Il(){return M.useContext(pc)!=null}function Di(){return Ct(Il(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(pc).location}var FE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function PE(e){M.useContext(si).static||M.useLayoutEffect(e)}function _r(){let{isDataRoute:e}=M.useContext(_i);return e?MT():yT()}function yT(){Ct(Il(),"useNavigate() may be used only in the context of a <Router> component.");let e=M.useContext(Ll),{basename:t,navigator:n}=M.useContext(si),{matches:a}=M.useContext(_i),{pathname:s}=Di(),o=JSON.stringify(jp(a)),c=M.useRef(!1);return PE(()=>{c.current=!0}),M.useCallback((d,h={})=>{if(Ei(c.current,FE),!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=M.createContext(null);function vT(e){let t=M.useContext(_i).outlet;return M.useMemo(()=>t&&M.createElement(xT.Provider,{value:e},t),[t,e])}function qE(){let{matches:e}=M.useContext(_i),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function gc(e,{relative:t}={}){let{matches:n}=M.useContext(_i),{pathname:a}=Di(),s=JSON.stringify(jp(n));return M.useMemo(()=>Of(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function ET(e,t){return HE(e,t)}function HE(e,t,n){var N;Ct(Il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=M.useContext(si),{matches:s}=M.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||"";GE(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=RE(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&&_?M.createElement(pc.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=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:o},"ErrorBoundary")," or"," ",M.createElement("code",{style:o},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),n?M.createElement("pre",{style:s},n):null,c)}var _T=M.createElement(ST,null),KE=class extends M.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?M.createElement(_i.Provider,{value:this.props.routeContext},M.createElement(Dp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?M.createElement(wT,{error:e},t):t}};KE.contextType=BE;var fm=new WeakMap;function wT({children:e,error:t}){let{basename:n}=M.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=IE(a.location,n);if(LE&&!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 M.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function NT({routeContext:e,match:t,children:n}){let a=M.useContext(Ll);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),M.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?(GE("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=M.createElement(g.route.Component,null):g.route.element?A=g.route.element:A=y,M.createElement(NT,{match:g,routeContext:{outlet:y,matches:w,isDataRoute:a!=null},children:A})};return a&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?M.createElement(KE,{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=M.useContext(Ll);return Ct(t,Lp(e)),t}function CT(e){let t=M.useContext(Rf);return Ct(t,Lp(e)),t}function AT(e){let t=M.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=M.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=M.useRef(!1);return PE(()=>{n.current=!0}),M.useCallback(async(s,o={})=>{Ei(n.current,FE),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var Pv={};function GE(e,t,n){!t&&!Pv[e]&&(Pv[e]=!0,Ei(!1,n))}M.memo(jT);function jT({routes:e,future:t,state:n,isStatic:a,onError:s}){return HE(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}=M.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}=M.useContext(_i),{pathname:c}=Di(),f=_r(),d=Of(e,jp(o),c,a==="path"),h=JSON.stringify(d);return M.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=M.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,_=M.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:M.createElement(si.Provider,{value:d},M.createElement(pc.Provider,{children:t,value:_}))}function zT({children:e,location:t}){return ET(ap(e),t)}function ap(e,t=[]){let n=[];return M.Children.forEach(e,(a,s)=>{if(!M.isValidElement(a))return;let o=[...t,s];if(a.type===M.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 QE(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 qv(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=M.useContext(Ll);return zp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function eC(){let e=M.useContext(Rf);return zp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Up=M.createContext(void 0);Up.displayName="FrameworkContext";function $p(){let e=M.useContext(Up);return zp(e,"You must render this element inside a <HydratedRouter> element"),e}function tC(e,t){let n=M.useContext(Up),[a,s]=M.useState(!1),[o,c]=M.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:y,onTouchStart:g}=t,x=M.useRef(null);M.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]),M.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:qo(f,v),onBlur:qo(d,S),onMouseEnter:qo(h,v),onMouseLeave:qo(y,S),onTouchStart:qo(g,v)}]:[!1,x,{}]}function qo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function nC({page:e,...t}){let n=uT(),{router:a}=Bp(),s=M.useMemo(()=>RE(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?M.createElement(aC,{page:e,matches:s,...t}):M.createElement(rC,{page:e,matches:s,...t}):null}function iC(e){let{manifest:t,routeModules:n}=$p(),[a,s]=M.useState([]);return M.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=M.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=QE(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 M.createElement(M.Fragment,null,c.map(f=>M.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=M.useMemo(()=>qv(e,t,h,o,a,"data"),[e,t,h,o,a]),g=M.useMemo(()=>qv(e,t,h,o,a,"assets"),[e,t,h,o,a]),x=M.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(P=>P.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=QE(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=M.useMemo(()=>XT(g,o),[g,o]),S=iC(g);return M.createElement(M.Fragment,null,x.map(_=>M.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...n})),v.map(_=>M.createElement("link",{key:_,rel:"modulepreload",href:_,...n})),S.map(({key:_,link:N})=>M.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=M.useRef();s.current==null&&(s.current=zk({window:a,v5Compat:!0}));let o=s.current,[c,f]=M.useState({action:o.action,location:o.location}),d=M.useCallback(h=>{n===!1?f(h):M.startTransition(()=>f(h))},[n]);return M.useLayoutEffect(()=>o.listen(d),[o,d]),M.createElement(IT,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:n})}var YE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ji=M.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}=M.useContext(si),A=typeof y=="string"&&YE.test(y),D=IE(y,N);y=D.to;let P=bT(y,{relative:s}),T=Di(),F=null;if(f){let Q=Of(f,[],T.unstable_mask?T.unstable_mask.pathname:"/",!0);N!=="/"&&(Q.pathname=Q.pathname==="/"?N:Ri([N,Q.pathname])),F=w.createHref(Q)}let[I,W,L]=tC(a,S),G=fC(y,{replace:c,unstable_mask:f,state:d,target:h,preventScrollReset:g,relative:s,viewTransition:x,unstable_defaultShouldRevalidate:v,unstable_useTransitions:R});function J(Q){t&&t(Q),Q.defaultPrevented||G(Q)}let oe=!(D.isExternal||o),H=M.createElement("a",{...S,...L,href:(oe?F:void 0)||D.absoluteURL||P,onClick:oe?J:t,ref:sC(_,W),target:h,"data-discover":!A&&n==="render"?"true":void 0});return I&&!A?M.createElement(M.Fragment,null,H,M.createElement(nC,{page:P})):H});ji.displayName="Link";var VE=M.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=gc(c,{relative:h.relative}),x=Di(),v=M.useContext(Rf),{navigator:S,basename:_}=M.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 P=R===w||!s&&R.startsWith(w)&&R.charAt(D)==="/",T=A!=null&&(A===w||!s&&A.startsWith(w)&&A.charAt(w.length)==="/"),F={isActive:P,isPending:T,isTransitioning:N},I=P?t:void 0,W;typeof a=="function"?W=a(F):W=[a,P?"active":null,T?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let L=typeof o=="function"?o(F):o;return M.createElement(ji,{...h,"aria-current":I,className:W,ref:y,style:L,to:c,viewTransition:f},typeof d=="function"?d(F):d)});VE.displayName="NavLink";var cC=M.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:_}=M.useContext(si),N=mC(),w=pC(f,{relative:h}),R=c.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&YE.test(f),D=P=>{if(d&&d(P),P.defaultPrevented)return;P.preventDefault();let T=P.nativeEvent.submitter,F=(T==null?void 0:T.getAttribute("formmethod"))||c,I=()=>N(T||P.currentTarget,{fetcherKey:t,method:F,navigate:n,replace:s,state:o,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:x});_&&n!==!1?M.startTransition(()=>I()):I()};return M.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 XE(e){let t=M.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=gc(e,{relative:c});return M.useCallback(v=>{if(PT(v,t)){v.preventDefault();let S=n!==void 0?n:ac(g)===ac(x),_=()=>y(e,{replace:S,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d});h?M.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=M.useRef(rp(e)),n=M.useRef(!1),a=Di(),s=M.useMemo(()=>qT(a.search,n.current?null:t.current),[a.search]),o=_r(),c=M.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}=XE("useSubmit"),{basename:t}=M.useContext(si),n=OT(),a=e.fetch,s=e.navigate;return M.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}=M.useContext(si),a=M.useContext(_i);Ct(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...gc(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])),ac(o)}function gC(e,{relative:t}={}){let n=M.useContext(UE);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=XE("useViewTransitionState"),s=gc(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()),Hv=e=>{const t=yC(e);return t.charAt(0).toUpperCase()+t.slice(1)},ZE=(...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=M.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...f},d)=>M.createElement("svg",{ref:d,...vC,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:ZE("lucide",s),...!o&&!xC(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,y])=>M.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=M.forwardRef(({className:a,...s},o)=>M.createElement(EC,{ref:o,iconNode:t,className:ZE(`lucide-${bC(Hv(e))}`,`lucide-${e}`,a),...s}));return n.displayName=Hv(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"}]],WE=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"}]],JE=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"}]],e1=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"}]],Kv=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"}]],Gv=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"}]],t1=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"}]],n1=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"}]],i1=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"}]],bc=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"}]],a1=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"}]],r1=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:a1},{to:"/logs",label:"Logs",icon:Hp},{to:"/skills",label:"Skills",icon:XC},{to:"/system",label:"系统",icon:n1}];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(VE,{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 s1(){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 yc(){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=gt({queryKey:["system-info"],queryFn:s1,refetchInterval:3e4}),t=gt({queryKey:["projects"],queryFn:yc,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(t1,{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]=M.useState("connecting"),n=M.useRef(null);return M.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 M.Component{constructor(){super(...arguments);pv(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}=gt({queryKey:["projects"],queryFn:yc});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(a1,{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 M.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 l1=M.createContext(null);function x2({children:e}){const[t,n]=M.useState(null),a=M.useCallback(c=>new Promise(f=>{n({kind:"confirm",opts:c,resolve:d=>{n(null),f(d)}})}),[]),s=M.useCallback(c=>new Promise(f=>{n({kind:"alert",opts:c,resolve:()=>{n(null),f()}})}),[]),o=M.useCallback(c=>new Promise(f=>{n({kind:"prompt",opts:c,resolve:d=>{n(null),f(d)}})}),[]);return m.jsxs(l1.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=M.useContext(l1);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function v2({title:e,body:t,confirm:n,onClose:a}){return M.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]=M.useState(a??""),y=M.useRef(null);M.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]=M.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(WE,{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"),o1=Symbol.for("yaml.pair"),Xi=Symbol.for("yaml.scalar"),zl=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,Bl=e=>!!e&&typeof e=="object"&&e[Si]===vr,At=e=>!!e&&typeof e=="object"&&e[Si]===o1,vt=e=>!!e&&typeof e=="object"&&e[Si]===Xi,Ul=e=>!!e&&typeof e=="object"&&e[Si]===zl;function Mt(e){if(e&&typeof e=="object")switch(e[Si]){case vr:case zl:return!0}return!1}function jt(e){if(e&&typeof e=="object")switch(e[Si]){case Vp:case vr:case Xi:case zl:return!0}return!1}const c1=e=>(vt(e)||Mt(e))&&!!e.anchor,Fn=Symbol("break visit"),u1=Symbol("skip children"),Vi=Symbol("remove node");function ps(e,t){const n=f1(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=u1;ps.REMOVE=Vi;function ul(e,t,n,a){const s=d1(e,t,n,a);if(jt(s)||At(s))return h1(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=f1(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=u1;zf.REMOVE=Vi;async function fl(e,t,n,a){const s=await d1(e,t,n,a);if(jt(s)||At(s))return h1(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 f1(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 d1(e,t,n,a){var s,o,c,f,d;if(typeof n=="function")return n(e,t,a);if(Bl(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if(Ul(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 h1(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 m1(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 p1(e){const t=new Set;return ps(e,{Value(n,a){a.anchor&&t.add(a.anchor)}}),t}function g1(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=p1(e));const c=g1(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||!c1(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)||c1(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(m1(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 b1=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 rc(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[zl]: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 rc(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 Zo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class y1 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(Zo(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,x1="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&&(_=Qv(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&&(_=Qv(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],P=h[A+1]||e.length;D===0?R=`
|
|
338
|
+
${t}${e.slice(0,P)}`:(n===ff&&y[D]&&(R+=`${e[D]}\\`),R+=`
|
|
339
|
+
${t}${e.slice(D+1,P)}`)}return R}function Qv(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 Wo(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 Wo(e,t);const n=t.indent||(Ff(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
346
|
+
${n}`)+"'";return t.implicitKey?a:Uf(a,n,x1,$f(t,!1))}function hl(e,t){const{singleQuote:n}=t.options;let a;if(n===!1)a=Wo;else{const s=e.includes('"'),o=e.includes("'");s&&!o?a=cp:o&&!s?a=Wo:a=n?cp:Wo}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 P=n[x-1];if(P!==`
|
|
352
|
+
`&&P!==" "&&P!==" ")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 P=n[N];if(P===" ")_=!0;else if(P===`
|
|
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 P=n.replace(/\n+/g,`
|
|
356
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let T=!1;const F=$f(a,!0);c!=="folded"&&t!==Le.BLOCK_FOLDED&&(F.onOverflow=()=>{T=!0});const I=Uf(`${R}${P}${v}`,h,op,F);if(!T)return`>${D}
|
|
357
|
+
${h}${I}`}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,x1,$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 Wo(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 v1(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&&m1(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 F="With simple keys, collection cannot be used as a key value";throw new Error(F)}}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&&Ul(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let D=!1;const P=Al(t,n,()=>D=!0,()=>_=!0);let T=" ";if(x||w||R){if(T=w?`
|
|
365
|
+
`:"",R){const F=h(R);T+=`
|
|
366
|
+
${ka(F,n.indent)}`}P===""&&!n.inFlow?T===`
|
|
367
|
+
`&&A&&(T=`
|
|
368
|
+
|
|
369
|
+
`):T+=`
|
|
370
|
+
${n.indent}`}else if(!v&&Mt(t)){const F=P[0],I=P.indexOf(`
|
|
371
|
+
`),W=I!==-1,L=n.inFlow??t.flow??t.items.length===0;if(W||!L){let G=!1;if(W&&(F==="&"||F==="!")){let J=P.indexOf(" ");F==="&"&&J!==-1&&J<I&&P[J+1]==="!"&&(J=P.indexOf(" ",J+1)),(J===-1||I<J)&&(G=!0)}G||(T=`
|
|
372
|
+
${n.indent}`)}}else(P===""||P[0]===`
|
|
373
|
+
`)&&(T="");return N+=T+P,n.inFlow?D&&a&&a():A&&!D?N+=Wr(N,n.indent,h(A)):_&&s&&s(),N}function E1(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:S1}),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 S1(e,t,n){if(n=e&&wr(n)?n.resolve(e.doc):n,Ul(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(!Bl(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 _1(e,t,{key:n,value:a}){if(jt(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(D2(e,n))S1(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=v1(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)+'..."'),E1(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=rc(e,void 0,n),s=rc(t,void 0,n);return new gn(a,s)}class gn{constructor(t,n=null){Object.defineProperty(this,Si,{value:o1}),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 _1(n,a,this)}toString(t,n,a){return t!=null&&t.doc?j2(this,t,n,a):JSON.stringify(this)}}function w1(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 y1{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)&&b1(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)_1(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})),w1(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const $l={collection:"map",default:!0,nodeClass:ai,tag:"tag:yaml.org,2002:map",resolve(e,t){return Bl(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>ai.from(e,t,n)};class Sr extends y1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(zl,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)&&b1(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?w1(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(rc(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 Fl={collection:"seq",default:!0,nodeClass:Sr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Ul(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 N1={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},k1={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)}},T1={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 C1(e,t,n){const{value:a}=e;return Hf(a)&&a>=0?n+a.toString(t):Li(e)}const A1={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=>C1(e,8,"0o")},O1={identify:Hf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Jp(e,0,10,n),stringify:Li},R1={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=>C1(e,16,"0x")},B2=[$l,Fl,Pf,qf,Wp,A1,O1,R1,N1,k1,T1];function Yv(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:Yv,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})=>Yv(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=[$l,Fl].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 M1(e,t){if(Ul(e))for(let n=0;n<e.items.length;++n){let a=e.items[n];if(!At(a)){if(Bl(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 j1(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:M1,createNode:j1};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=j1(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=M1(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 D1({value:e,source:t},n){return t&&(e?L1:I1).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const L1={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:D1},I1={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:D1},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(Bl(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 z1(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 B1={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:z1},U1={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:z1},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$/,""))??""},Vv=[$l,Fl,Pf,qf,L1,I1,K2,G2,Q2,Y2,P2,q2,H2,eg,Ta,ng,tg,ag,B1,U1,Gf],Xv=new Map([["core",B2],["failsafe",[$l,Fl,Pf]],["json",F2],["yaml11",Vv],["yaml-1.1",Vv]]),Zv={binary:eg,bool:Wp,float:T1,floatExp:k1,floatNaN:N1,floatTime:U1,int:O1,intHex:R1,intOct:A1,intTime:B1,map:$l,merge:Ta,null:qf,omap:ng,pairs:tg,seq:Fl,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=Xv.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(Xv.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"?Zv[c]:c;if(!f){const d=JSON.stringify(c),h=Object.keys(Zv).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 $1=class F1{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:$l}),Object.defineProperty(this,Xi,{value:Pf}),Object.defineProperty(this,zl,{value:Fl}),this.sortMapEntries=typeof c=="function"?c:c===!0?X2:null}clone(){const t=Object.create(F1.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=v1(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 Pl{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(Pl.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=p1(this);t.anchor=!n||a.has(n)?g1(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},_=rc(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 Zo(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 Zo(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 Zo(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){Zo(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 $1(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 P1 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,P=null;for(const I of e)switch(S&&(I.type!=="space"&&I.type!=="newline"&&I.type!=="comma"&&o(I.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),_&&(h&&I.type!=="comment"&&I.type!=="newline"&&o(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),_=null),I.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&I.source.includes(" ")&&(_=I),y=!0;break;case"comment":{y||o(I,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const W=I.source.substring(1)||" ";g?g+=x+W:g=W,x="",h=!1;break}case"newline":h?g?g+=I.source:(!D||n!=="seq-item-ind")&&(d=!0):x+=I.source,h=!0,v=!0,(N||w)&&(R=I),y=!0;break;case"anchor":N&&o(I,"MULTIPLE_ANCHORS","A node can have at most one anchor"),I.source.endsWith(":")&&o(I.offset+I.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),N=I,P??(P=I.offset),h=!1,y=!1,S=!0;break;case"tag":{w&&o(I,"MULTIPLE_TAGS","A node can have at most one tag"),w=I,P??(P=I.offset),h=!1,y=!1,S=!0;break}case n:(N||w)&&o(I,"BAD_PROP_ORDER",`Anchors and tags must be after the ${I.source} indicator`),D&&o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.source} in ${t??"collection"}`),D=I,h=n==="seq-item-ind"||n==="explicit-key-ind",y=!1;break;case"comma":if(t){A&&o(I,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),A=I,h=!1,y=!1;break}default:o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.type} token`),h=!1,y=!1}const T=e[e.length-1],F=T?T.offset+T.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:F,start:P??F}}function sc(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(sc(t.key)||sc(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==="}")&&sc(t)&&n(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function q1(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 Wv="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",Wv)),!N.anchor&&!N.tag&&!S){h=N.end,N.comment&&(f.comment?f.comment+=`
|
|
393
|
+
`+N.comment:f.comment=N.comment);continue}(N.newlineAfterProp||sc(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",Wv);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,q1(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 P=_?e(n,_,D,s):t(n,d,S,null,D,s);n.schema.compat&&fp(a.indent,_,s),d=P.range[2];const T=new gn(A,P);n.options.keepSourceTokens&&(T.srcToken=g),f.items.push(T)}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 P=new gn(A);n.options.keepSourceTokens&&(P.srcToken=g),f.items.push(P)}}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:P,value:T}=R,F=Ol(A,{flow:f,indicator:"explicit-key-ind",next:D??(P==null?void 0:P[0]),offset:g,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!F.found){if(!F.anchor&&!F.tag&&!P&&!T){w===0&&F.comma?s(F.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):w<a.items.length-1&&s(F.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),F.comment&&(h.comment?h.comment+=`
|
|
395
|
+
`+F.comment:h.comment=F.comment),g=F.end;continue}!c&&n.options.strict&&sc(D)&&s(D,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(w===0)F.comma&&s(F.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(F.comma||s(F.start,"MISSING_CHAR",`Missing , between ${f} items`),F.comment){let I="";e:for(const W of A)switch(W.type){case"comma":case"space":break;case"comment":I=W.source.substring(1);break e;default:break e}if(I){let W=h.items[h.items.length-1];At(W)&&(W=W.value??W.key),W.comment?W.comment+=`
|
|
396
|
+
`+I:W.comment=I,F.comment=F.comment.substring(I.length+1)}}if(!c&&!P&&!F.found){const I=T?e(n,T,F,s):t(n,F.end,P,null,F,s);h.items.push(I),g=I.range[2],bm(T)&&s(I.range,"BLOCK_IN_FLOW",gm)}else{n.atKey=!0;const I=F.end,W=D?e(n,D,F,s):t(n,I,A,null,F,s);bm(D)&&s(W.range,"BLOCK_IN_FLOW",gm),n.atKey=!1;const L=Ol(P??[],{flow:f,indicator:"map-value-ind",next:T,offset:W.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(L.found){if(!c&&!F.found&&n.options.strict){if(P)for(const oe of P){if(oe===L.found)break;if(oe.type==="newline"){s(oe,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}F.start<L.found.offset-1024&&s(L.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else T&&("source"in T&&((N=T.source)==null?void 0:N[0])===":"?s(T,"MISSING_CHAR",`Missing space after : in ${f}`):s(L.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const G=T?e(n,T,L,s):L.found?t(n,L.end,P,null,L,s):null;G?bm(T)&&s(G.range,"BLOCK_IN_FLOW",gm):L.comment&&(W.comment?W.comment+=`
|
|
397
|
+
`+L.comment:W.comment=L.comment);const J=new gn(W,G);if(n.options.keepSourceTokens&&(J.srcToken=R),c){const oe=h;q1(n,oe.items,W)&&s(I,"DUPLICATE_KEY","Map keys must be unique"),oe.items.push(J)}else{const oe=new ai(n.schema);oe.flow=!0,oe.items.push(J);const H=(G??W).range;oe.range=[W.range[0],H[1],H[2]],h.items.push(oe)}g=G?G.range[2]:L.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 H1(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 K1(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}`),G1(e)}function rO(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),G1(e.slice(1,-1)).replace(/''/g,"'")}function G1(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 Q1(e,t,n,a){const{value:s,type:o,comment:c,range:f}=t.type==="block-scalar"?H1(e,t,a):K1(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:Y1,composeEmptyNode:lg};function Y1(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=Q1(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=Q1(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 Pl(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?Y1(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 Ho(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 Jv(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=Ho(n);o?this.warnings.push(new P1(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}=Jv(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:Jv(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=Ho(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(Ho(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(Ho(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(Ho(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 Pl(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 K1(e,t,a);case"block-scalar":return H1({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 V1(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}];V1(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 V1(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"),X1=Symbol("remove item");function fs(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),Z1(Object.freeze([]),e,t)}fs.BREAK=dp;fs.SKIP=EO;fs.REMOVE=X1;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 Z1(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=Z1(Object.freeze(e.concat([[s,c]])),o.items[c],n);if(typeof f=="number")c=f-1;else{if(f===dp)return dp;f===X1&&(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="",lc="",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 lc:return"<SCALAR>";default:return JSON.stringify(e)}}function W1(e){switch(e){case Qf:return"byte-order-mark";case Yf:return"doc-mode";case Vf:return"flow-error-end";case lc: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:lc,createScalarToken:bO,isCollection:SO,isScalar:_O,prettyToken:wO,resolveAsScalar:gO,setScalarValue:yO,stringify:vO,tokenType:W1,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 e0=new Set("0123456789ABCDEFabcdef"),kO=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Yu=new Set(",[]{}"),TO=new Set(` ,[]{}
|
|
447
|
+
\r `),vm=e=>!e||TO.has(e);class J1{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 lc,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 lc,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==="%"&&e0.has(this.buffer[t+1])&&e0.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 eS{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 t0(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 tS(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 n0(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,tS(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 J1,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=W1(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"&&n0(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&&t0(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":{t0(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(tS(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);n0(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 nS(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new eS||null,prettyErrors:t}}function CO(e,t={}){const{lineCounter:n,prettyErrors:a}=nS(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 iS(e,t={}){const{lineCounter:n,prettyErrors:a}=nS(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=iS(e,n);if(!s)return null;if(s.warnings.forEach(o=>E1(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 Pl(e,a,n).toString(n)}const i0=Object.freeze(Object.defineProperty({__proto__:null,Alias:Bf,CST:NO,Composer:og,Document:Pl,Lexer:J1,LineCounter:eS,Pair:gn,Parser:cg,Scalar:Le,Schema:$1,YAMLError:sg,YAMLMap:ai,YAMLParseError:es,YAMLSeq:Sr,YAMLWarning:P1,isAlias:wr,isCollection:Mt,isDocument:ms,isMap:Bl,isNode:jt,isPair:At,isScalar:vt,isSeq:Ul,parse:AO,parseAllDocuments:CO,parseDocument:iS,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}=gt({queryKey:["pipeline-file",e,t],queryFn:()=>i2(e,t)}),[g,x]=M.useState("structured"),[v,S]=M.useState(null),[_,N]=M.useState(null);M.useEffect(()=>{c&&v===null&&(S(c.content),N(c.etag),c.parseError&&x("yaml"))},[c,v]),M.useEffect(()=>{const T=F=>{F.key==="Escape"&&n()};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[n]);const w=Pn({mutationFn:()=>{if(v===null||_===null)throw new Error("no draft");return a2(e,t,v,_)},onSuccess:T=>{N(T.etag),s.invalidateQueries({queryKey:["pipeline-file",e,t]}),s.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:T=>{const F=T.status;o({title:F===409?"文件已被其他地方修改":F===422?"YAML 语法错":"保存失败",body:T instanceof Error?T.message:String(T)})}}),R=v!==null&&c&&v!==c.content,{parsed:A,parseError:D}=M.useMemo(()=>{if(v===null)return{parsed:null,parseError:null};try{return{parsed:i0.parse(v)??{},parseError:null}}catch(T){return{parsed:null,parseError:T instanceof Error?T.message:String(T)}}},[v]),P=T=>{try{const F=i0.stringify(T,{lineWidth:0});S(F)}catch(F){o({title:"YAML 序列化失败",body:F instanceof Error?F.message:String(F)})}};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:T=>T.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(Kv,{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(Kv,{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:P}),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:T=>S(T.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(bc,{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]=M.useState(""),[f,d]=M.useState("blank");M.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=""}=qE(),t=_r(),[n,a]=M.useState("overview"),s=gt({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(WE,{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:n1,children:"配置"}),m.jsx(Xu,{current:n,value:"pipelines",onSelect:a,icon:r1,children:"Pipelines"}),m.jsx(Xu,{current:n,value:"danger",onSelect:a,icon:bc,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}=gt({queryKey:["project-conf",e],queryFn:()=>WA(e)}),[d,h]=M.useState(null),[y,g]=M.useState(null);M.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}=gt({queryKey:["project-pipelines",e],queryFn:()=>t2(e)}),[c,f]=M.useState(null),[d,h]=M.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(r1,{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(bc,{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]=M.useState(""),[f,d]=M.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(bc,{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]=M.useState(""),[c,f]=M.useState(""),[d,h]=M.useState(new Set),y=gt({queryKey:["skills-all",e],queryFn:()=>ug(e)});M.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 ql(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 ql(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}function ZO(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function WO(e,t){const n=typeof t=="string"?{title:t}:t;return ql(`/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 ql(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function nR(e){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function iR(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function aS(e){const t=Tn();M.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 rS({name:e}){const t=cR[oR(e)];return m.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function sS({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(rS,{name:o},o)),e.labels.filter(o=>o==="NEEDS-FIX").map(o=>m.jsx(sS,{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]=M.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}=gt({queryKey:["card",e,t],queryFn:()=>VO(e,t)}),[x,v]=M.useState(!1),[S,_]=M.useState(""),[N,w]=M.useState(""),[R,A]=M.useState(new Set),[D,P]=M.useState([]),[T,F]=M.useState(""),I=gt({queryKey:["skills-all",e],queryFn:()=>ug(e),enabled:x});M.useEffect(()=>{x&&f&&(_(f.title),w(Sm(f.body)),A(new Set(f.skills)),P([...f.labels]))},[x,f]),M.useEffect(()=>{const H=Q=>{Q.key==="Escape"&&(x?v(!1):n())};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[n,x]);const W=Pn({mutationFn:()=>{if(!f)throw new Error("no data");const H={},Q=S.trim();Q&&Q!==f.title&&(H.title=Q);const K=Sm(f.body);N!==K&&(H.description=N);const le=[...R].sort(),X=[...f.skills].sort();return JSON.stringify(le)!==JSON.stringify(X)&&(H.skills=le),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)})}}),L=M.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]),G=H=>{const Q=new Set(R);Q.has(H)?Q.delete(H):Q.add(H),A(Q)},J=()=>{const H=T.trim();if(H){if(D.includes(H)){F("");return}P([...D,H]),F("")}},oe=H=>{P(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"}),I.isLoading&&m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),I.data&&I.data.data.length>0&&m.jsx("div",{className:"flex flex-wrap gap-1.5",children:I.data.data.map(H=>{const Q=R.has(H.name);return m.jsx("button",{type:"button",onClick:()=>G(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:()=>oe(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:T,onChange:H=>F(H.target.value),onKeyDown:H=>{H.key==="Enter"&&!H.nativeEvent.isComposing&&(H.preventDefault(),J())}}),T&&m.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:J,"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(rS,{name:H},H)),f.labels.map(H=>m.jsx(sS,{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:W.isPending,children:"取消"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>W.mutate(),disabled:!L||!S.trim()||W.isPending,"aria-label":"保存卡片修改",children:[W.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 fg({current:e,onChange:t}){const[n,a]=M.useState(!1),s=M.useRef(null),{data:o}=gt({queryKey:["projects"],queryFn:yc});return M.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,K,le;const[e,t]=jf(),n=e.get("project"),[a,s]=M.useState(null),[o,c]=M.useState(""),[f,d]=M.useState(()=>new Set),[h,y]=M.useState(()=>new Set),{confirm:g,alert:x}=qn();aS(n);const v=gt({queryKey:["projects"],queryFn:yc}),S=gt({queryKey:["cards",n],queryFn:()=>YO(n??""),enabled:!!n}),_=Tn(),N=()=>{_.invalidateQueries({queryKey:["cards",n]}),_.invalidateQueries({queryKey:["projects"]}),_.invalidateQueries({queryKey:["pipeline-status",n]})},w=X=>{t({project:X})};M.useEffect(()=>{var pe;if(n){gR(n);return}const X=pR();X&&((pe=v.data)!=null&&pe.data.some(O=>O.name===X))&&t({project:X},{replace:!0})},[n,v.data,t]);const R=Pn({mutationFn:()=>tR(n),onSuccess:()=>{N()},onError:X=>{x({title:"启动 pipeline 失败",body:X instanceof Error?X.message:String(X)})}}),A=Pn({mutationFn:()=>nR(n),onSuccess:()=>N(),onError:X=>{x({title:"停止 pipeline 失败",body:X instanceof Error?X.message:String(X)})}}),D=Pn({mutationFn:()=>iR(n,{all:!0}),onSuccess:()=>N(),onError:X=>{x({title:"重置失败",body:X instanceof Error?X.message:String(X)})}}),[P,T]=M.useState(!1),F=Pn({mutationFn:X=>WO(n,X),onSuccess:()=>{N(),T(!1)},onError:X=>{x({title:"新建卡片失败",body:X instanceof Error?X.message:String(X)})}}),I=Pn({mutationFn:({seq:X,state:pe})=>JO(n,X,pe),onMutate:async({seq:X,state:pe})=>{await _.cancelQueries({queryKey:["cards",n]});const O=_.getQueryData(["cards",n]);return O&&_.setQueryData(["cards",n],{...O,data:O.data.map(j=>j.seq===X?{...j,state:pe}:j)}),{prev:O}},onError:(X,pe,O)=>{O!=null&&O.prev&&_.setQueryData(["cards",n],O.prev),x({title:"移动卡片失败",body:X instanceof Error?X.message:String(X)})},onSettled:()=>{_.invalidateQueries({queryKey:["cards",n]})}}),W=((Q=S.data)==null?void 0:Q.data)??[],{allSkills:L,allLabels:G}=M.useMemo(()=>{const X=new Set,pe=new Set;for(const O of W){for(const j of O.skills)X.add(j);for(const j of O.labels)pe.add(j)}return{allSkills:[...X].sort(),allLabels:[...pe].sort()}},[W]);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:(K=v.data)==null?void 0:K.data.map(X=>m.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>w(X.name),type:"button",children:X.name},X.name))})]})]});const J=W.filter(X=>{if(o){const pe=o.toLowerCase();if(!(X.title.toLowerCase().includes(pe)||X.skills.some(j=>j.toLowerCase().includes(pe))||X.labels.some(j=>j.toLowerCase().includes(pe))))return!1}return!(f.size>0&&!X.skills.some(O=>f.has(O))||h.size>0&&!X.labels.some(O=>h.has(O)))}),oe=(le=v.data)==null?void 0:le.data.find(X=>X.name===n),H=(oe==null?void 0:oe.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:oe?`${oe.name} · ${oe.cards.total} cards · ${oe.workers.active} workers 活跃`:"加载中…"})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsx(fg,{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(i1,{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:()=>T(!0),disabled:F.isPending,children:[F.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:X=>c(X.target.value),"aria-label":"搜索卡片"})]}),m.jsx(a0,{label:"skill",options:L,selected:f,onChange:d}),m.jsx(a0,{label:"label",options:G,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}),J.length," / ",W.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(X=>m.jsx(dR,{label:X.label,bg:X.bg,cards:J.filter(yR(X.state)),onCardClick:pe=>s(pe.seq),onDropCard:pe=>I.mutate({seq:pe,state:X.state})},X.state))}),a!==null&&m.jsx(hR,{project:n,seq:a,onClose:()=>s(null),onChanged:N}),P&&m.jsx(QO,{project:n,isPending:F.isPending,onCancel:()=>T(!1),onCreate:X=>F.mutate(X)})]})}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 a0({label:e,options:t,selected:n,onChange:a}){const[s,o]=M.useState(!1),c=M.useRef(null);M.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 dg(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");aS(n);const a=Tn(),[s,o]=M.useState(null),{data:c,isLoading:f,isError:d,error:h,refetch:y}=gt({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(fg,{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 dg(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}=gt({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 dg(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]=M.useState(null),a=gt({queryKey:["workers-agg"],queryFn:xR,refetchInterval:5e3});M.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=M.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=M.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:"grid grid-cols-1 xl:grid-cols-[1fr_360px] gap-4 h-[calc(100vh-140px)]",children:[m.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[m.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3 sticky top-0 bg-[var(--color-bg)] z-10 pb-2",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}),"刷新"]})]}),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 sticky top-0 self-start 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(hg,{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}),mg(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 停 ${pg(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(hg,{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:mg(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 ",pg(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(hg,{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:mg(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?pg(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 dg(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 hg({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 mg(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 pg(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({project:e.project});return 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(){const[e,t]=jf(),n=e.get("project"),a=e.get("worker")??"",[s,o]=M.useState([]),[c,f]=M.useState(!1),[d,h]=M.useState(!0),[y,g]=M.useState(()=>new Set(zR)),[x,v]=M.useState(""),[S,_]=M.useState("live"),[N,w]=M.useState(()=>{const T=new Date(Date.now()-36e5),F=I=>String(I).padStart(2,"0");return`${T.getFullYear()}-${F(T.getMonth()+1)}-${F(T.getDate())}T${F(T.getHours())}:${F(T.getMinutes())}`}),R=M.useRef(null),{data:A,refetch:D}=gt({queryKey:["logs",n,a,S,S==="history"?N:"live"],queryFn:()=>DR({project:n??"",worker:a||void 0,limit:S==="history"?2e3:500,since:S==="history"?new Date(N).toISOString():void 0}),enabled:!!n});M.useEffect(()=>{A!=null&&A.data&&o(A.data)},[A]),M.useEffect(()=>{if(!n||S!=="live")return;const T=LR({project:n,worker:a||void 0}),F=new EventSource(T);return F.addEventListener("log.line",I=>{if(!c)try{const W=JSON.parse(I.data);o(L=>{const G=[...L,W];return G.length>5e3&&G.splice(0,G.length-5e3),G})}catch{}}),()=>F.close()},[n,a,c,S]),M.useEffect(()=>{if(!d)return;const T=R.current;T&&(T.scrollTop=T.scrollHeight)},[s,d]);const P=M.useMemo(()=>{const T=x.toLowerCase();return s.filter(F=>!(!y.has(F.level)||T&&!F.msg.toLowerCase().includes(T)))},[s,y,x]);return n?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:[n,a&&` · worker-${a}`," · 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.jsx(fg,{current:n,onChange:T=>t({project:T})})})]}),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(t1,{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:T=>w(T.target.value),"aria-label":"查询起始时间"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>D(),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:T=>v(T.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(T=>m.jsx(UR,{level:T,enabled:y.has(T),onToggle:()=>{g(F=>{const I=new Set(F);return I.has(T)?I.delete(T):I.add(T),I})}},T))}),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(T=>!T),type:"button",children:d?"✓ Auto-scroll":"Auto-scroll"}),m.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(T=>!T),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 T=new Blob([P.map(W=>W.raw).join(`
|
|
475
|
+
`)],{type:"text/plain"}),F=URL.createObjectURL(T),I=document.createElement("a");I.href=F,I.download=`${n}-log-${Date.now()}.log`,I.click(),URL.revokeObjectURL(F)},type:"button",children:[m.jsx(e1,{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:(A==null?void 0:A.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:T=>{const F=T.currentTarget;!(F.scrollHeight-F.scrollTop-F.clientHeight<40)&&d&&h(!1)},children:[P.map((T,F)=>m.jsx($R,{line:T},F)),P.length===0&&m.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"没有匹配的日志"})]})]})]}):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:"Logs 📜"}),m.jsxs("p",{className:"text-sm",children:["需要 ",m.jsx("code",{children:"?project=xx"}),"。"]})]})}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 n;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:""};return m.jsxs("div",{className:"grid grid-cols-[100px_60px_1fr] gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",children:[m.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((n=e.ts.split("T")[1])==null?void 0:n.replace("Z",""))??e.ts:"--"}),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 r0(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"?s0(e.value):!1:s0(e)}function s0(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 gg extends Hn{constructor(t,n,a,s){let o=-1;if(super(t,n),l0(this,"space",s),typeof a=="number")for(;++o<_m.length;){const c=_m[o];l0(this,_m[o],(a&pp[c])===pp[c])}}}gg.prototype.defined=!0;function l0(e,t,n){n&&(e[t]=n)}function Hl(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new gg(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=Hl({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=Hl({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=Hl({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=Hl({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=Hl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mS}),bS=Hl({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,o0=/-[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(o0,tM);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!o0.test(o)){let c=o.replace(ZR,eM);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=gg}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"),bg=fS([dS,VR,pS,gS,bS],"svg");function iM(e){return e.join(" ").trim()}var rl={},wm,c0;function aM(){if(c0)return wm;c0=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 K=H.lastIndexOf(d);A=~K?H.length-K:A+H.length}function P(){var H={line:R,column:A};return function(Q){return Q.position=new T(H),W(),Q}}function T(H){this.start=H,this.end={line:R,column:A},this.source=w.source}T.prototype.content=N;function F(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 I(H){var Q=H.exec(N);if(Q){var K=Q[0];return D(K),N=N.slice(K.length),Q}}function W(){I(n)}function L(H){var Q;for(H=H||[];Q=G();)Q!==!1&&H.push(Q);return H}function G(){var H=P();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 F("End of comment missing");var K=N.slice(2,Q-2);return A+=2,D(K),N=N.slice(Q),A+=2,H({type:x,comment:K})}}function J(){var H=P(),Q=I(a);if(Q){if(G(),!I(s))return F("property missing ':'");var K=I(o),le=H({type:v,property:_(Q[0].replace(e,g)),value:K?_(K[0].replace(e,g)):g});return I(c),le}}function oe(){var H=[];L(H);for(var Q;Q=J();)Q!==!1&&(H.push(Q),L(H));return H}return W(),oe()}function _(N){return N?N.replace(f,g):g}return wm=S,wm}var u0;function rM(){if(u0)return rl;u0=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 Ko={},f0;function sM(){if(f0)return Ko;f0=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.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 Ko.camelCase=d,Ko}var Go,d0;function lM(){if(d0)return Go;d0=1;var e=Go&&Go.__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,Go=a,Go}var oM=lM();const cM=kp(oM),yS=xS("end"),yg=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=yg(e),n=yS(e);if(t&&n)return{start:t,end:n}}function Jo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?h0(e.position):"start"in e||"end"in e?h0(e):"line"in e||"column"in e?gp(e):""}function gp(e){return m0(e&&e.line)+":"+m0(e&&e.column)}function h0(e){return gp(e&&e.start)+"-"+gp(e&&e.end)}function m0(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=Jo(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 xg={}.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"?bg: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=bg,e.schema=s),e.ancestors.push(t);const o=_S(e,t.tagName,!1),c=wM(e,t);let f=Eg(e,t);return hM.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!GR(d):!0})),SS(e,c,o,t),vg(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)}oc(e,t.position)}function yM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);oc(e,t.position)}function xM(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=bg,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:_S(e,t.name,!0),c=NM(e,t),f=Eg(e,t);return SS(e,c,o,t),vg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function vM(e,t,n){const a={};return vg(a,Eg(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 vg(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=yg(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"&&xg.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 oc(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 oc(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function Eg(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=r0(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=r0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return xg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);oc(e)}function oc(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)xg.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 Sg(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 p0(e.children,t,n)}return Array.isArray(e)?p0(e,t,n):""}function p0(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 g0=document.createElement("i");function _g(e){const t="&"+e+";";g0.innerHTML=t;const n=g0.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 b0={}.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=(b0.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){b0.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 Kl(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},y0={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 P=D,T;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){T=t.events[P][1].end;break}w(a);let F=D;for(;F<t.events.length;)t.events[F][1].end={...T},F++;return ri(t.events,P+1,0,t.events.slice(D)),t.events.length=F,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(y0,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(y0,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 P=t.sliceStream(A);if(D&&P.push(null),A.previous=o,o&&(o.next=A),o=A,s.defineSkip(A.start),s.write(P),t.parser.lazy[A.start.line]){let T=s.events.length;for(;T--;)if(s.events[T][1].start.offset<c&&(!s.events[T][1].end||s.events[T][1].end.offset>c))return;const F=t.events.length;let I=F,W,L;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(W){L=t.events[I][1].end;break}W=!0}for(w(a),T=F;T<t.events.length;)t.events[T][1].end={...L},T++;ri(t.events,I+1,0,t.events.slice(F)),t.events.length=T}}function w(A){let D=n.length;for(;D-- >A;){const P=n[D];t.containerState=P[1],P[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};x0(g,-d),x0(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 x0(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&&!_g(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 v0={partial:!0,tokenize:ej},E0={concrete:!0,name:"codeFenced",tokenize:JM};function JM(e,t,n){const a=this,s={partial:!0,tokenize:P};let o=0,c=0,f;return d;function d(T){return h(T)}function h(T){const F=a.events[a.events.length-1];return o=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,f=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(T)}function y(T){return T===f?(c++,e.consume(T),y):c<3?n(T):(e.exit("codeFencedFenceSequence"),Ge(T)?Je(e,g,"whitespace")(T):g(T))}function g(T){return T===null||Te(T)?(e.exit("codeFencedFence"),a.interrupt?t(T):e.check(v0,_,D)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(T))}function x(T){return T===null||Te(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(T)):Ge(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,v,"whitespace")(T)):T===96&&T===f?n(T):(e.consume(T),x)}function v(T){return T===null||Te(T)?g(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(T))}function S(T){return T===null||Te(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(T)):T===96&&T===f?n(T):(e.consume(T),S)}function _(T){return e.attempt(s,D,N)(T)}function N(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),w}function w(T){return o>0&&Ge(T)?Je(e,R,"linePrefix",o+1)(T):R(T)}function R(T){return T===null||Te(T)?e.check(v0,_,D)(T):(e.enter("codeFlowValue"),A(T))}function A(T){return T===null||Te(T)?(e.exit("codeFlowValue"),R(T)):(e.consume(T),A)}function D(T){return e.exit("codeFenced"),t(T)}function P(T,F,I){let W=0;return L;function L(Q){return T.enter("lineEnding"),T.consume(Q),T.exit("lineEnding"),G}function G(Q){return T.enter("codeFencedFence"),Ge(Q)?Je(T,J,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):J(Q)}function J(Q){return Q===f?(T.enter("codeFencedFenceSequence"),oe(Q)):I(Q)}function oe(Q){return Q===f?(W++,T.consume(Q),oe):W>=c?(T.exit("codeFencedFenceSequence"),Ge(Q)?Je(T,H,"whitespace")(Q):H(Q)):I(Q)}function H(Q){return Q===null||Te(Q)?(T.exit("codeFencedFence"),F(Q)):I(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&&Qo(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),Qo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Qo(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);Qo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Qo(this.left,n.reverse())}}}function Qo(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 ec(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)?ec(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)?ec(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"],S0=["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(C){return y(C)}function y(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),g}function g(C){return C===33?(e.consume(C),x):C===47?(e.consume(C),o=!0,_):C===63?(e.consume(C),s=3,a.interrupt?t:O):kn(C)?(e.consume(C),c=String.fromCharCode(C),N):n(C)}function x(C){return C===45?(e.consume(C),s=2,v):C===91?(e.consume(C),s=5,f=0,S):kn(C)?(e.consume(C),s=4,a.interrupt?t:O):n(C)}function v(C){return C===45?(e.consume(C),a.interrupt?t:O):n(C)}function S(C){const he="CDATA[";return C===he.charCodeAt(f++)?(e.consume(C),f===he.length?a.interrupt?t:J:S):n(C)}function _(C){return kn(C)?(e.consume(C),c=String.fromCharCode(C),N):n(C)}function N(C){if(C===null||C===47||C===62||xt(C)){const he=C===47,Ne=c.toLowerCase();return!he&&!o&&S0.includes(Ne)?(s=1,a.interrupt?t(C):J(C)):wj.includes(c.toLowerCase())?(s=6,he?(e.consume(C),w):a.interrupt?t(C):J(C)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(C):o?R(C):A(C))}return C===45||pn(C)?(e.consume(C),c+=String.fromCharCode(C),N):n(C)}function w(C){return C===62?(e.consume(C),a.interrupt?t:J):n(C)}function R(C){return Ge(C)?(e.consume(C),R):L(C)}function A(C){return C===47?(e.consume(C),L):C===58||C===95||kn(C)?(e.consume(C),D):Ge(C)?(e.consume(C),A):L(C)}function D(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),D):P(C)}function P(C){return C===61?(e.consume(C),T):Ge(C)?(e.consume(C),P):A(C)}function T(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),d=C,F):Ge(C)?(e.consume(C),T):I(C)}function F(C){return C===d?(e.consume(C),d=null,W):C===null||Te(C)?n(C):(e.consume(C),F)}function I(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||xt(C)?P(C):(e.consume(C),I)}function W(C){return C===47||C===62||Ge(C)?A(C):n(C)}function L(C){return C===62?(e.consume(C),G):n(C)}function G(C){return C===null||Te(C)?J(C):Ge(C)?(e.consume(C),G):n(C)}function J(C){return C===45&&s===2?(e.consume(C),K):C===60&&s===1?(e.consume(C),le):C===62&&s===4?(e.consume(C),j):C===63&&s===3?(e.consume(C),O):C===93&&s===5?(e.consume(C),pe):Te(C)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(kj,te,oe)(C)):C===null||Te(C)?(e.exit("htmlFlowData"),oe(C)):(e.consume(C),J)}function oe(C){return e.check(Tj,H,te)(C)}function H(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),Q}function Q(C){return C===null||Te(C)?oe(C):(e.enter("htmlFlowData"),J(C))}function K(C){return C===45?(e.consume(C),O):J(C)}function le(C){return C===47?(e.consume(C),c="",X):J(C)}function X(C){if(C===62){const he=c.toLowerCase();return S0.includes(he)?(e.consume(C),j):J(C)}return kn(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),X):J(C)}function pe(C){return C===93?(e.consume(C),O):J(C)}function O(C){return C===62?(e.consume(C),j):C===45&&s===2?(e.consume(C),O):J(C)}function j(C){return C===null||Te(C)?(e.exit("htmlFlowData"),te(C)):(e.consume(C),j)}function te(C){return e.exit("htmlFlow"),t(C)}}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),P):O===63?(e.consume(O),A):kn(O)?(e.consume(O),I):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,le(O)):(e.consume(O),g)}function x(O){return O===45?(e.consume(O),v):g(O)}function v(O){return O===62?K(O):O===45?x(O):g(O)}function S(O){const j="CDATA[";return O===j.charCodeAt(o++)?(e.consume(O),o===j.length?_:S):n(O)}function _(O){return O===null?n(O):O===93?(e.consume(O),N):Te(O)?(c=_,le(O)):(e.consume(O),_)}function N(O){return O===93?(e.consume(O),w):_(O)}function w(O){return O===62?K(O):O===93?(e.consume(O),w):_(O)}function R(O){return O===null||O===62?K(O):Te(O)?(c=R,le(O)):(e.consume(O),R)}function A(O){return O===null?n(O):O===63?(e.consume(O),D):Te(O)?(c=A,le(O)):(e.consume(O),A)}function D(O){return O===62?K(O):A(O)}function P(O){return kn(O)?(e.consume(O),T):n(O)}function T(O){return O===45||pn(O)?(e.consume(O),T):F(O)}function F(O){return Te(O)?(c=F,le(O)):Ge(O)?(e.consume(O),F):K(O)}function I(O){return O===45||pn(O)?(e.consume(O),I):O===47||O===62||xt(O)?W(O):n(O)}function W(O){return O===47?(e.consume(O),K):O===58||O===95||kn(O)?(e.consume(O),L):Te(O)?(c=W,le(O)):Ge(O)?(e.consume(O),W):K(O)}function L(O){return O===45||O===46||O===58||O===95||pn(O)?(e.consume(O),L):G(O)}function G(O){return O===61?(e.consume(O),J):Te(O)?(c=G,le(O)):Ge(O)?(e.consume(O),G):W(O)}function J(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,oe):Te(O)?(c=J,le(O)):Ge(O)?(e.consume(O),J):(e.consume(O),H)}function oe(O){return O===s?(e.consume(O),s=void 0,Q):O===null?n(O):Te(O)?(c=oe,le(O)):(e.consume(O),oe)}function H(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||xt(O)?W(O):(e.consume(O),H)}function Q(O){return O===47||O===62||xt(O)?W(O):n(O)}function K(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function le(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),X}function X(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 wg={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)?ec(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)?ec(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)?ec(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:wg.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:wg.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 _0={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:[_0,mf],60:Nj,61:_0,95:mf,96:E0,126:E0},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:wg,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:F(P),check:F(T),consume:R,enter:A,exit:D,interrupt:F(T,{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(G){return c=xi(c,G),N(),c[c.length-1]!==null?[]:(I(t,0),h.events=Wf(o,h.events,h),h.events)}function x(G,J){return SD(v(G),J)}function v(G){return ED(c,G)}function S(){const{_bufferIndex:G,_index:J,line:oe,column:H,offset:Q}=a;return{_bufferIndex:G,_index:J,line:oe,column:H,offset:Q}}function _(G){s[G.line]=G.column,L()}function N(){let G;for(;a._index<c.length;){const J=c[a._index];if(typeof J=="string")for(G=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===G&&a._bufferIndex<J.length;)w(J.charCodeAt(a._bufferIndex));else w(J)}}function w(G){y=y(G)}function R(G){Te(G)?(a.line++,a.column=1,a.offset+=G===-3?2:1,L()):G!==-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=G}function A(G,J){const oe=J||{};return oe.type=G,oe.start=S(),h.events.push(["enter",oe,h]),f.push(oe),oe}function D(G){const J=f.pop();return J.end=S(),h.events.push(["exit",J,h]),J}function P(G,J){I(G,J.from)}function T(G,J){J.restore()}function F(G,J){return oe;function oe(H,Q,K){let le,X,pe,O;return Array.isArray(H)?te(H):"tokenize"in H?te([H]):j(H);function j(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 le=ve,X=0,ve.length===0?K:C(ve[X])}function C(ve){return Fe;function Fe(st){return O=W(),pe=ve,ve.partial||(h.currentConstruct=ve),ve.name&&h.parser.constructs.disable.null.includes(ve.name)?Ne():ve.tokenize.call(J?Object.assign(Object.create(h),J):h,d,he,Ne)(st)}}function he(ve){return G(pe,O),Q}function Ne(ve){return O.restore(),++X<le.length?C(le[X]):K}}}function I(G,J){G.resolveAll&&!o.includes(G)&&o.push(G),G.resolve&&ri(h.events,J,h.events.length-J,G.resolve(h.events.slice(J),h)),G.resolveTo&&(h.events=G.resolveTo(h.events,h))}function W(){const G=S(),J=h.previous,oe=h.currentConstruct,H=h.events.length,Q=Array.from(f);return{from:H,restore:K};function K(){a=G,h.previous=J,h.currentConstruct=oe,h.events.length=H,f=Q,L()}}function L(){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 w0=/[\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(w0.lastIndex=g,h=w0.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 _g(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:W,autolinkEmail:W,atxHeading:o(Ii),blockQuote:o(Wt),characterEscape:W,characterReference:W,codeFenced:o(Kn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Kn,c),codeText:o(Ji,c),codeTextData:W,data:W,codeFlowValue:W,definition:o(Ra),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Gn),hardBreakEscape:o(Xe),hardBreakTrailing:o(Xe),htmlFlow:o(wi,c),htmlFlowData:W,htmlText:o(wi,c),htmlTextData:W,image:o(li),label:c,link:o(zi),listItem:o(kr),listItemValue:x,listOrdered:o(ea,g),listUnordered:o(ea),paragraph:o(Gl),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Ii),strong:o(ys),thematicBreak:o(xs)},exit:{atxHeading:d(),atxHeadingSequence:P,autolink:d(),autolinkEmail:it,autolinkProtocol:st,blockQuote:d(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:ve,characterReference:Fe,codeFenced:d(N),codeFencedFence:_,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:L,codeIndented:d(w),codeText:d(Q),codeTextData:L,data:L,definition:d(),definitionDestinationString:D,definitionLabelString:R,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(J),hardBreakTrailing:d(J),htmlFlow:d(oe),htmlFlowData:L,htmlText:d(H),htmlTextData:L,image:d(le),label:pe,labelText:X,lineEnding:G,link:d(K),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:he,resourceDestinationString:O,resourceTitleString:j,resource:te,setextHeading:d(I),setextHeadingLineSequence:F,setextHeadingText:T,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]||N0).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&<[0]==="enter"&<[1].type==="listItemPrefix"||et===-1&<[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]||N0).call(this,ne,Pe[0]));else throw new Error("Cannot close `"+ne.type+"` ("+Jo({start:ne.start,end:ne.end})+"): it’s not open");Ce.position.end=lr(ne.end)}function y(){return Sg(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 P(ne){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Ce=this.sliceSerialize(ne).length;fe.depth=Ce}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function F(ne){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function W(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 L(ne){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ne),fe.position.end=lr(ne.end)}function G(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)&&(W.call(this,ne),L.call(this,ne))}function J(){this.data.atHardBreak=!0}function oe(){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 K(){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 le(){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 X(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 j(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ne}function te(){this.data.inReference=void 0}function C(){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=_g(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){L.call(this,ne);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ne)}function it(ne){L.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 Gl(){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 N0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Jo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Jo({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=Kl(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:Kl(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:Kl(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:Kl(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:Kl(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=yg(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 k0=9,T0=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(C0(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(C0(t.slice(s),s>0,!1)),o.join("")}function C0(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===k0||o===T0;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===k0||o===T0;)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,tc=1,Nf=2,Ng=3,kg=4,Tg=5,Cg=6,FS=7,PS=8,A0=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 tc:{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 Ng:return n(new Date(c),s);case kg:{const{source:f,flags:d}=c;return n(new RegExp(f,d),s)}case Tg:{const f=n(new Map,s);for(const[d,h]of c)f.set(a(d),a(h));return f}case Cg:{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 A0[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 A0[o](c),s)};return a},O0=e=>rL(new Map,e)(0),sl="",{toString:sL}={},{keys:lL}=Object,Yo=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[tc,sl];case"Object":return[Nf,sl];case"Date":return[Ng,sl];case"RegExp":return[kg,sl];case"Map":return[Tg,sl];case"Set":return[Cg,sl];case"DataView":return[tc,n]}return n.includes("Array")?[tc,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]=Yo(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 tc:{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(Yo(c[x])))&&y.push([o(x),o(c[x])]);return g}case Ng:return s([f,c.toISOString()],c);case kg:{const{source:y,flags:g}=c;return s([f,{source:y,flags:g}],c)}case Tg:{const y=[],g=s([f,y],c);for(const[x,v]of c)(e||!(Wu(Yo(x))||Wu(Yo(v))))&&y.push([o(x),o(v)]);return g}case Cg:{const y=[],g=s([f,y],c);for(const x of c)(e||!Wu(Yo(x)))&&y.push(o(x));return g}}const{message:h}=c;return s([f,{name:d,message:h}],c)};return o},R0=(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)?O0(R0(e,t)):structuredClone(e):(e,t)=>O0(R0(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=Kl(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=M0(S.value)),!Array.isArray(S)&&S.type==="element")){const _=S.children[0];_&&_.type==="text"&&(_.value=M0(_.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 M0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function j0(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=j0(n,{file:a,...t});await e.run(s,a)}:function(n,a){return j0(n,{file:a,...e||t})}}function D0(e){if(e)throw e}var Cm,L0;function TL(){if(L0)return Cm;L0=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){I0(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"),I0(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 I0(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 Ag 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 Ag;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),B0("processSync","process",n),a;function s(o,c){n=!0,D0(o),a=c}}run(t,n,a){z0(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),B0("runSync","run",a),s;function o(c,f){D0(c),s=f,a=!0}}stringify(t,n){this.freeze();const a=Ju(n),s=this.compiler||this.Compiler;return Dm("stringify",s),z0(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 Ag().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 z0(e){if(!Ep(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function B0(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",U0=[],$0={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 Og(e){const t=ZL(e),n=WL(e);return JL(t.runSync(t.parse(n),n),e)}function ZL(e){const t=e.rehypePlugins||U0,n=e.remarkPlugins||U0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$0}:$0;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 F0(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,P={index:A.index,input:A.input,stack:[...y,h]};let T=v(...A,P);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?x.lastIndex=D+1:(S!==D&&R.push({type:"text",value:h.value.slice(S,D)}),Array.isArray(T)?R.push(...T):T&&R.push(T),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=F0(e,"(");let o=F0(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]=P0(a[g]);else{const _=P0(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 P=d[g]-(N[g]||0),T=o[g];T===114?A=" ".repeat(P):T===99?P%2?(A=" ".repeat(P/2+.5),D=" ".repeat(P/2-.5)):(A=" ".repeat(P/2),D=A):D=" ".repeat(P)}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 P0(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 q0(e,t.inConstruct,!0)&&!q0(e,t.notInConstruct,!1)}function q0(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 H0(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 Rg(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=Rg(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 cc(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=cc(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)+cc(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)&&Sg(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=cc(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=Rg(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=Sg(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=Rg(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 Mg(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=Mg(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):Mg(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||Mg(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=cc(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)+cc(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:H0,code:K3,definition:Q3,emphasis:XS,hardBreak:H0,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:K0,tableHeader:K0,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 K0(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:G0,taskListCheckValueUnchecked:G0,paragraph:kI}}}function NI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:TI}}}function G0(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)||jg(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)||jg(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)&&!jg(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 jg(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(L){let G=a.events.length-1;for(;G>-1;){const H=a.events[G][1].type;if(H==="lineEnding"||H==="linePrefix")G--;else break}const J=G>-1?a.events[G][1].type:null,oe=J==="tableHead"||J==="tableRow"?T:d;return oe===T&&a.parser.lazy[a.now().line]?n(L):oe(L)}function d(L){return e.enter("tableHead"),e.enter("tableRow"),h(L)}function h(L){return L===124||(c=!0,o+=1),y(L)}function y(L){return L===null?n(L):Te(L)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),v):n(L):Ge(L)?Je(e,y,"whitespace")(L):(o+=1,c&&(c=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(L)))}function g(L){return L===null||L===124||xt(L)?(e.exit("data"),y(L)):(e.consume(L),L===92?x:g)}function x(L){return L===92||L===124?(e.consume(L),g):g(L)}function v(L){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(L):(e.enter("tableDelimiterRow"),c=!1,Ge(L)?Je(e,S,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):S(L))}function S(L){return L===45||L===58?N(L):L===124?(c=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),_):P(L)}function _(L){return Ge(L)?Je(e,N,"whitespace")(L):N(L)}function N(L){return L===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),w):L===45?(o+=1,w(L)):L===null||Te(L)?D(L):P(L)}function w(L){return L===45?(e.enter("tableDelimiterFiller"),R(L)):P(L)}function R(L){return L===45?(e.consume(L),R):L===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(L))}function A(L){return Ge(L)?Je(e,D,"whitespace")(L):D(L)}function D(L){return L===124?S(L):L===null||Te(L)?!c||s!==o?P(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):P(L)}function P(L){return n(L)}function T(L){return e.enter("tableRow"),F(L)}function F(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),F):L===null||Te(L)?(e.exit("tableRow"),t(L)):Ge(L)?Je(e,F,"whitespace")(L):(e.enter("data"),I(L))}function I(L){return L===null||L===124||xt(L)?(e.exit("data"),F(L)):(e.consume(L),L===92?W:I)}function W(L){return L===92||L===124?(e.consume(L),I):I(L)}}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&&(Q0(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&&Q0(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 Q0(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 Dg(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 Y0=(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 Lg(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 Lg(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 Lg(t);function t(n){return n.tagName===e}}function Lg(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 V0=/\n/g,X0=/[\t ]+/g,wp=bs("br"),Z0=bs(vz),hz=bs("p"),W0=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)||W0(e)&&Y0(t,e,W0)?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 Z0(e)&&Y0(t,e,Z0)&&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;){V0.lastIndex=o;const d=V0.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;){X0.lastIndex=s;const c=X0.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},P={className:"function.dispatch",relevance:0,keywords:{_hint:w},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},T=[P,g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],F={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:T.concat([{begin:/\(/,end:/\)/,keywords:D,contains:T.concat(["self"]),relevance:0}]),relevance:0},I={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(F,I,P,T,[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"],P=["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,...P]},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},P={className:"function.dispatch",relevance:0,keywords:{_hint:w},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},T=[P,g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],F={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:T.concat([{begin:/\(/,end:/\)/,keywords:D,contains:T.concat(["self"]),relevance:0}]),relevance:0},I={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(F,I,P,T,[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])*",J0={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,J0,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},J0,h]}}const eE="[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=(X,{after:pe})=>{const O="</"+X[0].slice(1);return X.input.indexOf(O,pe)!==-1},a=eE,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(X,pe)=>{const O=X[0].length+X.index,j=X.input[O];if(j==="<"||j===","){pe.ignoreMatch();return}j===">"&&(n(X,{after:O})||pe.ignoreMatch());let te;const C=X.input.substring(O);if(te=C.match(/^\s*=/)){pe.ignoreMatch();return}if((te=C.match(/^\s+extends\s+/))&&te.index===0){pe.ignoreMatch();return}}},f={$pattern:eE,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),P=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:P},F={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"}}]},I={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_]}},W={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},G={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(X){return t.concat("(?!",X.join("|"),")")}const oe={match:t.concat(/\b/,J([...S_,"super","import"].map(X=>`${X}\\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:/\(\)/},T]},K="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",le={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(K)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:P,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),W,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,_,N,R,{match:/\$\d+/},g,I,{scope:"attr",match:a+t.lookahead(":"),relevance:0},le,{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:K,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:P}]}]},{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"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,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:[T]},oe,G,F,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,P){return{className:A,begin:D,relevance:P}},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(K=>{Q.push(K),K.toLowerCase()===K?Q.push(K.toUpperCase()):Q.push(K.toLowerCase())}),Q})(N),built_in:R},P=H=>H.map(Q=>Q.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",P(R).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},F=t.concat(a,"\\b(?!\\()"),I={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),F],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),F],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"}}]},W={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[W,c,I,e.C_BLOCK_COMMENT_MODE,S,_,T]},G={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",P(w).join("\\b|"),"|",P(R).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(G);const J=[W,I,e.C_BLOCK_COMMENT_MODE,S,_,T],oe={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",...J]},...J,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:D,contains:[oe,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,G,I,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},T,{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",oe,c,I,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}]},T=[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=T,_.contains=T;const L=[{begin:/^\s*=>/,starts:{end:"$",contains:T}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:T}}];return h.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(h).concat(T)}}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(P=>!y.includes(P)),_={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(P){return t.concat(/\b/,t.either(...P.map(T=>T.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:R(x),relevance:0};function D(P,{exceptions:T,when:F}={}){const I=F;return T=T||[],P.map(W=>W.match(/\|\d+$/)||T.includes(W)?W:I(W)?`${W}|0`:W)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:D(S,{when:P=>P.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 Vo(e){return pt("(?=",e,")")}function pt(...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 Ig=e=>pt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),A4=["Protocol","Type"].map(Ig),tE=["init","self"].map(Ig),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"],nE=["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"],iE=["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=pt(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=pt(C_,Cf,"*"),sf=pt(/[A-Z]/,Cf,"*"),j4=["attached","autoclosure",pt(/convention\(/,_n("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",pt(/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,...tE)],className:{2:"keyword"}},o={match:pt(/\./,_n(...$m)),relevance:0},c=$m.filter(Xe=>typeof Xe=="string").concat(["_|0"]),f=$m.filter(Xe=>typeof Xe!="string").concat(O4).map(Ig),d={variants:[{className:"keyword",match:_n(...f,...tE)}]},h={$pattern:_n(/\b\w+/,/#\w+/),keyword:c.concat(M4),literal:nE},y=[s,o,d],g={match:pt(/\./,_n(...iE)),relevance:0},x={className:"built_in",match:pt(/\b/,_n(...iE),/(?=\()/)},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:pt(/\\/,Xe,/[0\\tnr"']/)},{match:pt(/\\/,Xe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),P=(Xe="")=>({className:"subst",match:pt(/\\/,Xe,/[\t ]*(?:[\r\n]|\r\n)/)}),T=(Xe="")=>({className:"subst",label:"interpol",begin:pt(/\\/,Xe,/\(/),end:/\)/}),F=(Xe="")=>({begin:pt(Xe,/"""/),end:pt(/"""/,Xe),contains:[D(Xe),P(Xe),T(Xe)]}),I=(Xe="")=>({begin:pt(Xe,/"/),end:pt(/"/,Xe),contains:[D(Xe),T(Xe)]}),W={className:"string",variants:[F(),F("#"),F("##"),F("###"),I(),I("#"),I("##"),I("###")]},L=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],G={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},J=Xe=>{const wi=pt(Xe,/\//),li=pt(/\//,Xe);return{begin:wi,end:li,contains:[...L,{scope:"comment",begin:`#(?!.*${li})`,end:/$/}]}},oe={scope:"regexp",variants:[J("###"),J("##"),J("#"),G]},H={match:pt(/`/,Hi,/`/)},Q={className:"variable",match:/\$\d+/},K={className:"variable",match:`\\$${Cf}+`},le=[H,Q,K],X={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:D4,contains:[...N,A,W]}]}},pe={scope:"keyword",match:pt(/@/,_n(...j4),Vo(_n(/\(/,/\s+/)))},O={scope:"meta",match:pt(/@/,Hi)},j=[X,pe,O],te={match:Vo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:pt(/(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:pt(/\s+&\s+/,Vo(sf)),relevance:0}]},C={begin:/</,end:/>/,keywords:h,contains:[...a,...y,...j,S,te]};te.contains.push(C);const he={match:pt(Hi,/\s*:/),keywords:"_|0",relevance:0},Ne={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",he,...a,oe,...y,...v,...N,A,W,...le,...j,te]},ve={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,te]},Fe={begin:_n(Vo(pt(Hi,/\s*:/)),Vo(pt(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,W,...j,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,...nE],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 W.variants){const wi=Xe.contains.find(zi=>zi.label==="interpol");wi.keywords=h;const li=[...y,...v,...N,A,W,...le];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},oe,...y,...v,...N,A,W,...le,...j,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=(X,{after:pe})=>{const O="</"+X[0].slice(1);return X.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:(X,pe)=>{const O=X[0].length+X.index,j=X.input[O];if(j==="<"||j===","){pe.ignoreMatch();return}j===">"&&(n(X,{after:O})||pe.ignoreMatch());let te;const C=X.input.substring(O);if(te=C.match(/^\s*=/)){pe.ignoreMatch();return}if((te=C.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),P=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:P},F={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"}}]},I={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_]}},W={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},G={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(X){return t.concat("(?!",X.join("|"),")")}const oe={match:t.concat(/\b/,J([...j_,"super","import"].map(X=>`${X}\\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:/\(\)/},T]},K="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",le={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(K)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:P,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),W,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,_,N,R,{match:/\$\d+/},g,I,{scope:"attr",match:a+t.lookahead(":"),relevance:0},le,{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:K,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:P}]}]},{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"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,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:[T]},oe,G,F,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,aE;function q4(){if(aE)return Pm;aE=1;function e(U){return U instanceof Map?U.clear=U.delete=U.set=function(){throw new Error("map is read-only")}:U instanceof Set&&(U.add=U.clear=U.delete=function(){throw new Error("set is read-only")}),Object.freeze(U),Object.getOwnPropertyNames(U).forEach(ae=>{const me=U[ae],je=typeof me;(je==="object"||je==="function")&&!Object.isFrozen(me)&&e(me)}),U}class t{constructor(ae){ae.data===void 0&&(ae.data={}),this.data=ae.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(U){return U.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(U,...ae){const me=Object.create(null);for(const je in U)me[je]=U[je];return ae.forEach(function(je){for(const _t in je)me[_t]=je[_t]}),me}const s="</span>",o=U=>!!U.scope,c=(U,{prefix:ae})=>{if(U.startsWith("language:"))return U.replace("language:","language-");if(U.includes(".")){const me=U.split(".");return[`${ae}${me.shift()}`,...me.map((je,_t)=>`${je}${"_".repeat(_t+1)}`)].join(" ")}return`${ae}${U}`};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=(U={})=>{const ae={children:[]};return Object.assign(ae,U),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(U){return U?typeof U=="string"?U:U.source:null}function x(U){return _("(?=",U,")")}function v(U){return _("(?:",U,")*")}function S(U){return _("(?:",U,")?")}function _(...U){return U.map(me=>g(me)).join("")}function N(U){const ae=U[U.length-1];return typeof ae=="object"&&ae.constructor===Object?(U.splice(U.length-1,1),ae):{}}function w(...U){return"("+(N(U).capture?"":"?:")+U.map(je=>g(je)).join("|")+")"}function R(U){return new RegExp(U.toString()+"|").exec("").length-1}function A(U,ae){const me=U&&U.exec(ae);return me&&me.index===0}const D=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function P(U,{joinWith:ae}){let me=0;return U.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 T=/\b\B/,F="[a-zA-Z]\\w*",I="[a-zA-Z_]\\w*",W="\\b\\d+(\\.\\d+)?",L="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",G="\\b(0b[01]+)",J="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",oe=(U={})=>{const ae=/^#![ ]*\//;return U.binary&&(U.begin=_(ae,/.*\b/,U.binary,/\b.*/)),a({scope:"meta",begin:ae,end:/$/,relevance:0,"on:begin":(me,je)=>{me.index!==0&&je.ignoreMatch()}},U)},H={begin:"\\\\[\\s\\S]",relevance:0},Q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[H]},K={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[H]},le={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/},X=function(U,ae,me={}){const je=a({scope:"comment",begin:U,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=X("//","$"),O=X("/\\*","\\*/"),j=X("#","$"),te={scope:"number",begin:W,relevance:0},C={scope:"number",begin:L,relevance:0},he={scope:"number",begin:G,relevance:0},Ne={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[H,{begin:/\[/,end:/\]/,relevance:0,contains:[H]}]},ve={scope:"title",begin:F,relevance:0},Fe={scope:"title",begin:I,relevance:0},st={begin:"\\.\\s*"+I,relevance:0};var Wt=Object.freeze({__proto__:null,APOS_STRING_MODE:Q,BACKSLASH_ESCAPE:H,BINARY_NUMBER_MODE:he,BINARY_NUMBER_RE:G,COMMENT:X,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:pe,C_NUMBER_MODE:C,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(U){return Object.assign(U,{"on:begin":(ae,me)=>{me.data._beginMatch=ae[1]},"on:end":(ae,me)=>{me.data._beginMatch!==ae[1]&&me.ignoreMatch()}})},HASH_COMMENT_MODE:j,IDENT_RE:F,MATCH_NOTHING_RE:T,METHOD_GUARD:st,NUMBER_MODE:te,NUMBER_RE:W,PHRASAL_WORDS_MODE:le,QUOTE_STRING_MODE:K,REGEXP_MODE:Ne,RE_STARTERS_RE:J,SHEBANG:oe,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:I,UNDERSCORE_TITLE_MODE:Fe});function Kn(U,ae){U.input[U.index-1]==="."&&ae.ignoreMatch()}function Ji(U,ae){U.className!==void 0&&(U.scope=U.className,delete U.className)}function Ra(U,ae){ae&&U.beginKeywords&&(U.begin="\\b("+U.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",U.__beforeBegin=Kn,U.keywords=U.keywords||U.beginKeywords,delete U.beginKeywords,U.relevance===void 0&&(U.relevance=0))}function Gn(U,ae){Array.isArray(U.illegal)&&(U.illegal=w(...U.illegal))}function Ii(U,ae){if(U.match){if(U.begin||U.end)throw new Error("begin & end are not supported with match");U.begin=U.match,delete U.match}}function Xe(U,ae){U.relevance===void 0&&(U.relevance=1)}const wi=(U,ae)=>{if(!U.beforeMatch)return;if(U.starts)throw new Error("beforeMatch cannot be used with starts");const me=Object.assign({},U);Object.keys(U).forEach(je=>{delete U[je]}),U.keywords=me.keywords,U.begin=_(me.beforeMatch,x(me.begin)),U.starts={relevance:0,contains:[Object.assign(me,{endsParent:!0})]},U.relevance=0,delete me.beforeMatch},li=["of","and","for","in","not","or","if","then","parent","list","value"],zi="keyword";function ea(U,ae,me=zi){const je=Object.create(null);return typeof U=="string"?_t(me,U.split(" ")):Array.isArray(U)?_t(me,U):Object.keys(U).forEach(function(bt){Object.assign(je,ea(U[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(U,ae){return ae?Number(ae):Gl(U)?0:1}function Gl(U){return li.includes(U.toLowerCase())}const ys={},Ot=U=>{console.error(U)},xs=(U,...ae)=>{console.log(`WARN: ${U}`,...ae)},ne=(U,ae)=>{ys[`${U}/${ae}`]||(console.log(`Deprecated as of ${U}. ${ae}`),ys[`${U}/${ae}`]=!0)},fe=new Error;function Ce(U,ae,{key:me}){let je=0;const _t=U[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]);U[me]=xe,U[me]._emit=bt,U[me]._multi=!0}function Pe(U){if(Array.isArray(U.begin)){if(U.skip||U.excludeBegin||U.returnBegin)throw Ot("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),fe;if(typeof U.beginScope!="object"||U.beginScope===null)throw Ot("beginScope must be object"),fe;Ce(U,U.begin,{key:"beginScope"}),U.begin=P(U.begin,{joinWith:""})}}function et(U){if(Array.isArray(U.end)){if(U.skip||U.excludeEnd||U.returnEnd)throw Ot("skip, excludeEnd, returnEnd not compatible with endScope: {}"),fe;if(typeof U.endScope!="object"||U.endScope===null)throw Ot("endScope must be object"),fe;Ce(U,U.end,{key:"endScope"}),U.end=P(U.end,{joinWith:""})}}function yn(U){U.scope&&typeof U.scope=="object"&&U.scope!==null&&(U.beginScope=U.scope,delete U.scope)}function Ni(U){yn(U),typeof U.beginScope=="string"&&(U.beginScope={_wrap:U.beginScope}),typeof U.endScope=="string"&&(U.endScope={_wrap:U.endScope}),Pe(U),et(U)}function an(U){function ae(xe,be){return new RegExp(g(xe),"m"+(U.case_insensitive?"i":"")+(U.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(P(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)),U.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,U.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(U.compilerExtensions||(U.compilerExtensions=[]),U.contains&&U.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return U.classNameAliases=a(U.classNameAliases||{}),bt(U)}function Dt(U){return U?U.endsWithParent||Dt(U.starts):!1}function un(U){return U.variants&&!U.cachedVariants&&(U.cachedVariants=U.variants.map(function(ae){return a(U,{variants:null},ae)})),U.cachedVariants?U.cachedVariants:Dt(U)?a(U,{starts:U.starts?a(U.starts):null}):Object.isFrozen(U)?a(U):U}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(U){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,Wl]=Rt;if(Kt.addText(Ie),Ie="",Ft[Qe]=(Ft[Qe]||0)+1,Ft[Qe]<=vs&&(La+=Wl),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 Vl(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 Vl(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=Vl(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 Xl(){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(Zl>1e5&&Zl>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);Xl();let ct="",La=0,aa=0,Zl=0,Ia=!1;try{if(rn.__emitTokens)rn.__emitTokens(_e,Kt);else{for(Oe.matcher.considerAll();;){Zl++,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 Ql(){_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(U)}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,U),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 Yl(){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(U,{highlight:kt,highlightAuto:Ss,highlightAll:_s,highlightElement:$t,highlightBlock:ia,configure:fn,initHighlighting:Ma,initHighlightingOnLoad:Ql,registerLanguage:Cc,unregisterLanguage:Ar,listLanguages:Yl,getLanguage:vn,registerAliases:na,autoDetection:ja,inherit:kc,addPlugin:Ht,removePlugin:Ac}),U.debugMode=function(){_t=!1},U.safeMode=function(){_t=!0},U.versionString=lt,U.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(U,Wt),U},Cn=Cr({});return Cn.newInstance=()=>Cr({}),Pm=Cn,Cn.HighlightJS=Cn,Cn.default=Cn,Pm}var H4=q4();const K4=kp(H4),rE={},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||rE,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||rE).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 zg(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}=gt({queryKey:["skill",e],queryFn:()=>$O(e)});M.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(Og,{remarkPlugins:[Dg],rehypePlugins:[zg],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]=M.useState(!1),{data:o,isLoading:c,isError:f,error:d}=gt({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(JE,{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(Og,{remarkPlugins:[Dg],rehypePlugins:[zg],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]=M.useState("all"),[n,a]=M.useState(""),[s,o]=M.useState(null),c=Tn(),{data:f,isLoading:d}=gt({queryKey:["skills"],queryFn:()=>ug()}),h=gt({queryKey:["projects"],queryFn:yc}),y=M.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=M.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 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=gt({queryKey:["system-info"],queryFn:s1}),t=gt({queryKey:["system-env"],queryFn:HA}),n=gt({queryKey:["doctor"],queryFn:KA}),[a,s]=M.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]=M.useState(!1),[o,c]=M.useState(null),f=gt({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(e1,{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=gt({queryKey:["system-env-raw"],queryFn:GA}),[s,o]=M.useState(null),[c,f]=M.useState(null);M.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 sE(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 lE(){var R,A,D,P,T,F;const{sessionId:e}=qE(),t=_r(),n=Tn(),{confirm:a,alert:s}=qn(),o=gt({queryKey:["chat-sessions"],queryFn:lB}),c=gt({queryKey:["chat-session",e],queryFn:()=>oB(e??""),enabled:!!e}),[f,d]=M.useState(null),[h,y]=M.useState(""),[g,x]=M.useState(!1),v=M.useRef(null);M.useEffect(()=>{if(!e)return;const I=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let W=!0;return I.addEventListener("open",()=>{if(W){W=!1;return}const L=n.getQueryData(["chat-session",e]),G=L!=null&&L.messages.length?L.messages[L.messages.length-1].ts:void 0;dB(e,G).then(J=>{J.data.length!==0&&n.setQueryData(["chat-session",e],oe=>{if(!oe)return oe;const H=new Set(oe.messages.map(K=>K.id)),Q=J.data.filter(K=>!H.has(K.id));return Q.length===0?oe:{...oe,messages:[...oe.messages,...Q],lastMessageAt:Q[Q.length-1].ts,messageCount:oe.messageCount+Q.length}})}).catch(()=>{})}),I.addEventListener("chat.message",L=>{try{const G=JSON.parse(L.data);n.setQueryData(["chat-session",e],J=>{if(!J||J.messages.some(Q=>Q.id===G.message.id))return J;const H=J.messages.findIndex(Q=>Q.role==="user"&&Q.id.startsWith("optim-")&&Q.content===G.message.content);if(H>=0){const Q=[...J.messages];return Q[H]=G.message,{...J,messages:Q}}return{...J,messages:[...J.messages,G.message]}})}catch{}}),I.addEventListener("chat.message.pending",L=>{try{const G=JSON.parse(L.data);d({id:G.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),I.addEventListener("chat.message.chunk.text",L=>{try{const G=JSON.parse(L.data);d(J=>{if(!J||J.id!==G.assistantId)return J;const oe=[...J.blocks],H=oe[oe.length-1];return H&&H.type==="text"?oe[oe.length-1]={...H,target:H.target+G.text}:oe.push({type:"text",target:G.text,displayed:""}),{...J,blocks:oe}})}catch{}}),I.addEventListener("chat.message.chunk.tool_use",L=>{try{const G=JSON.parse(L.data);d(J=>!J||J.id!==G.assistantId?J:{...J,blocks:[...J.blocks,{type:"tool_use",id:G.id,title:G.title,kind:G.kind,status:G.status}]})}catch{}}),I.addEventListener("chat.message.chunk.tool_update",L=>{try{const G=JSON.parse(L.data);d(J=>!J||J.id!==G.assistantId?J:{...J,blocks:J.blocks.map(oe=>oe.type==="tool_use"&&oe.id===G.id?{...oe,status:G.status}:oe)})}catch{}}),I.addEventListener("chat.message.complete",L=>{try{const G=JSON.parse(L.data);d(J=>J&&J.id===G.assistantId?{...J,done:!0,finalMessage:G.message}:J)}catch{}}),()=>I.close()},[e,n]),M.useEffect(()=>{if(!f)return;const I=f.blocks.reduce((L,G)=>G.type==="text"?L+(G.target.length-G.displayed.length):L,0);if(I<=0){if(f.done&&f.finalMessage){const L=f.finalMessage;n.setQueryData(["chat-session",e],G=>!G||G.messages.some(J=>J.id===L.id)?G:{...G,messages:[...G.messages,L],lastMessageAt:L.ts,messageCount:G.messageCount+1}),n.invalidateQueries({queryKey:["chat-sessions"]}),d(null),x(!1)}return}const W=setTimeout(()=>{d(L=>{if(!L)return L;let G=Math.max(1,Math.ceil(I/40));const J=L.blocks.map(oe=>{if(oe.type!=="text"||G<=0)return oe;const H=oe.target.length-oe.displayed.length;if(H<=0)return oe;const Q=Math.min(H,G);return G-=Q,{...oe,displayed:oe.target.slice(0,oe.displayed.length+Q)}});return{...L,blocks:J}})},25);return()=>clearTimeout(W)},[f,n,e]),M.useEffect(()=>{const I=v.current;I&&(I.scrollTop=I.scrollHeight)},[c.data,f]);const S=M.useCallback(async()=>{const I=await sE();n.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${I.id}`)},[n,t]),_=M.useCallback(async()=>{const I=h.trim();if(!I||g)return;let W=e;if(!W){const G=await sE();n.invalidateQueries({queryKey:["chat-sessions"]}),W=G.id,t(`/chat/${W}`,{replace:!0})}const L={id:`optim-${Date.now()}`,role:"user",content:I,ts:new Date().toISOString(),status:"complete"};n.setQueryData(["chat-session",W],G=>G?{...G,messages:[...G.messages,L],lastMessageAt:L.ts,messageCount:G.messageCount+1}:{id:W,createdAt:L.ts,lastMessageAt:L.ts,title:I.slice(0,60),project:null,messageCount:1,messages:[L]}),y(""),x(!0);try{await uB(W,I)}catch(G){x(!1),console.error("sendMessage failed",G),s({title:"发送失败",body:G instanceof Error?G.message:String(G)})}},[h,g,e,n,t,s]),N=M.useCallback(async I=>{await a({title:"删除对话",body:"对话记录会永久删除,不可恢复。",confirm:"删除",danger:!0})&&(await cB(I),n.invalidateQueries({queryKey:["chat-sessions"]}),e===I&&t("/chat"))},[n,e,t,a]),w=M.useCallback(async()=>{if(e)try{await fB(e)}catch(I){s({title:"中断失败",body:I instanceof Error?I.message:String(I)})}},[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(I=>m.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",e===I.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":`打开对话 ${I.title}`,onClick:()=>t(`/chat/${I.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[m.jsx(Gv,{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:I.title}),m.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[I.messageCount," msg · ",B_(I.lastMessageAt??I.createdAt)]})]})]}),m.jsx("button",{type:"button","aria-label":"删除对话",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:W=>{W.stopPropagation(),N(I.id)},children:m.jsx(bc,{size:12})})]},I.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:((P=c.data)==null?void 0:P.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:[(((T=c.data)==null?void 0:T.messages)??[]).map(I=>m.jsx(hB,{msg:I},I.id)),f&&m.jsx(mB,{pending:f}),!c.isLoading&&(((F=c.data)==null?void 0:F.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:I=>y(I.target.value),onKeyDown:I=>{I.key==="Enter"&&!I.shiftKey&&!I.nativeEvent.isComposing&&(I.preventDefault(),_())},"aria-label":"消息输入"}),f?m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:w,type:"button","aria-label":"中断生成",children:[m.jsx(i1,{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(Gv,{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(Og,{remarkPlugins:[Dg],rehypePlugins:[zg],children:e})}):null}function z_({tool:e}){const[t,n]=M.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(JE,{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(lE,{})}),m.jsx(zn,{path:"/chat/:sessionId",element:m.jsx(lE,{})}),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(M.StrictMode,{children:m.jsx(Nk,{client:xB,children:m.jsx(oC,{children:m.jsx(x2,{children:m.jsx(yB,{})})})})}));
|