@coralai/sps-cli 0.50.2 → 0.50.3

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.
@@ -14,7 +14,7 @@ var qN=Object.defineProperty;var mv=e=>{throw TypeError(e)};var HN=(e,t,n)=>t in
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var yv;function QN(){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(L){return L===null||typeof L!="object"?null:(L=x&&L[x]||L["@@iterator"],typeof L=="function"?L:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function _(L,te,T){this.props=L,this.context=te,this.refs=N,this.updater=T||S}_.prototype.isReactComponent={},_.prototype.setState=function(L,te){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,te,"setState")},_.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function R(){}R.prototype=_.prototype;function A(L,te,T){this.props=L,this.context=te,this.refs=N,this.updater=T||S}var D=A.prototype=new R;D.constructor=A,w(D,_.prototype),D.isPureReactComponent=!0;var F=Array.isArray;function M(){}var H={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function J(L,te,T){var he=T.ref;return{$$typeof:e,type:L,key:te,ref:he!==void 0?he:null,props:T}}function C(L,te){return J(L.type,te,L.props)}function P(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function Y(L){var te={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(T){return te[T]})}var le=/\/+/g;function q(L,te){return typeof L=="object"&&L!==null&&L.key!=null?Y(""+L.key):te.toString(36)}function Q(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(M,M):(L.status="pending",L.then(function(te){L.status==="pending"&&(L.status="fulfilled",L.value=te)},function(te){L.status==="pending"&&(L.status="rejected",L.reason=te)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function K(L,te,T,he,Ne){var ve=typeof L;(ve==="undefined"||ve==="boolean")&&(L=null);var Fe=!1;if(L===null)Fe=!0;else switch(ve){case"bigint":case"string":case"number":Fe=!0;break;case"object":switch(L.$$typeof){case e:case t:Fe=!0;break;case y:return Fe=L._init,K(Fe(L._payload),te,T,he,Ne)}}if(Fe)return Ne=Ne(L),Fe=he===""?"."+q(L,0):he,F(Ne)?(T="",Fe!=null&&(T=Fe.replace(le,"$&/")+"/"),K(Ne,te,T,"",function(Wt){return Wt})):Ne!=null&&(P(Ne)&&(Ne=C(Ne,T+(Ne.key==null||L&&L.key===Ne.key?"":(""+Ne.key).replace(le,"$&/")+"/")+Fe)),te.push(Ne)),1;Fe=0;var st=he===""?".":he+":";if(F(L))for(var it=0;it<L.length;it++)he=L[it],ve=st+q(he,it),Fe+=K(he,te,T,ve,Ne);else if(it=v(L),typeof it=="function")for(L=it.call(L),it=0;!(he=L.next()).done;)he=he.value,ve=st+q(he,it++),Fe+=K(he,te,T,ve,Ne);else if(ve==="object"){if(typeof L.then=="function")return K(Q(L),te,T,he,Ne);throw te=String(L),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return Fe}function oe(L,te,T){if(L==null)return L;var he=[],Ne=0;return K(L,he,"","",function(ve){return te.call(T,ve,Ne++)}),he}function Z(L){if(L._status===-1){var te=L._result;te=te(),te.then(function(T){(L._status===0||L._status===-1)&&(L._status=1,L._result=T)},function(T){(L._status===0||L._status===-1)&&(L._status=2,L._result=T)}),L._status===-1&&(L._status=0,L._result=te)}if(L._status===1)return L._result.default;throw L._result}var pe=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},O={map:oe,forEach:function(L,te,T){oe(L,function(){te.apply(this,arguments)},T)},count:function(L){var te=0;return oe(L,function(){te++}),te},toArray:function(L){return oe(L,function(te){return te})||[]},only:function(L){if(!P(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return De.Activity=g,De.Children=O,De.Component=_,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=H,De.__COMPILER_RUNTIME={__proto__:null,c:function(L){return H.H.useMemoCache(L)}},De.cache=function(L){return function(){return L.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(L,te,T){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var he=w({},L.props),Ne=L.key;if(te!=null)for(ve in te.key!==void 0&&(Ne=""+te.key),te)!U.call(te,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&te.ref===void 0||(he[ve]=te[ve]);var ve=arguments.length-2;if(ve===1)he.children=T;else if(1<ve){for(var Fe=Array(ve),st=0;st<ve;st++)Fe[st]=arguments[st+2];he.children=Fe}return J(L.type,Ne,he)},De.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},De.createElement=function(L,te,T){var he,Ne={},ve=null;if(te!=null)for(he in te.key!==void 0&&(ve=""+te.key),te)U.call(te,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(Ne[he]=te[he]);var Fe=arguments.length-2;if(Fe===1)Ne.children=T;else if(1<Fe){for(var st=Array(Fe),it=0;it<Fe;it++)st[it]=arguments[it+2];Ne.children=st}if(L&&L.defaultProps)for(he in Fe=L.defaultProps,Fe)Ne[he]===void 0&&(Ne[he]=Fe[he]);return J(L,ve,Ne)},De.createRef=function(){return{current:null}},De.forwardRef=function(L){return{$$typeof:f,render:L}},De.isValidElement=P,De.lazy=function(L){return{$$typeof:y,_payload:{_status:-1,_result:L},_init:Z}},De.memo=function(L,te){return{$$typeof:h,type:L,compare:te===void 0?null:te}},De.startTransition=function(L){var te=H.T,T={};H.T=T;try{var he=L(),Ne=H.S;Ne!==null&&Ne(T,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(M,pe)}catch(ve){pe(ve)}finally{te!==null&&T.types!==null&&(te.types=T.types),H.T=te}},De.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},De.use=function(L){return H.H.use(L)},De.useActionState=function(L,te,T){return H.H.useActionState(L,te,T)},De.useCallback=function(L,te){return H.H.useCallback(L,te)},De.useContext=function(L){return H.H.useContext(L)},De.useDebugValue=function(){},De.useDeferredValue=function(L,te){return H.H.useDeferredValue(L,te)},De.useEffect=function(L,te){return H.H.useEffect(L,te)},De.useEffectEvent=function(L){return H.H.useEffectEvent(L)},De.useId=function(){return H.H.useId()},De.useImperativeHandle=function(L,te,T){return H.H.useImperativeHandle(L,te,T)},De.useInsertionEffect=function(L,te){return H.H.useInsertionEffect(L,te)},De.useLayoutEffect=function(L,te){return H.H.useLayoutEffect(L,te)},De.useMemo=function(L,te){return H.H.useMemo(L,te)},De.useOptimistic=function(L,te){return H.H.useOptimistic(L,te)},De.useReducer=function(L,te,T){return H.H.useReducer(L,te,T)},De.useRef=function(L){return H.H.useRef(L)},De.useState=function(L){return H.H.useState(L)},De.useSyncExternalStore=function(L,te,T){return H.H.useSyncExternalStore(L,te,T)},De.useTransition=function(){return H.H.useTransition()},De.version="19.2.5",De}var xv;function Ap(){return xv||(xv=1,sm.exports=QN()),sm.exports}var j=Ap(),lm={exports:{}},Ho={},om={exports:{}},cm={};/**
17
+ */var yv;function QN(){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(L){return L===null||typeof L!="object"?null:(L=x&&L[x]||L["@@iterator"],typeof L=="function"?L:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function _(L,te,T){this.props=L,this.context=te,this.refs=N,this.updater=T||S}_.prototype.isReactComponent={},_.prototype.setState=function(L,te){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,te,"setState")},_.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function R(){}R.prototype=_.prototype;function A(L,te,T){this.props=L,this.context=te,this.refs=N,this.updater=T||S}var D=A.prototype=new R;D.constructor=A,w(D,_.prototype),D.isPureReactComponent=!0;var F=Array.isArray;function M(){}var H={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function J(L,te,T){var he=T.ref;return{$$typeof:e,type:L,key:te,ref:he!==void 0?he:null,props:T}}function C(L,te){return J(L.type,te,L.props)}function P(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function Y(L){var te={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(T){return te[T]})}var le=/\/+/g;function q(L,te){return typeof L=="object"&&L!==null&&L.key!=null?Y(""+L.key):te.toString(36)}function Q(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(M,M):(L.status="pending",L.then(function(te){L.status==="pending"&&(L.status="fulfilled",L.value=te)},function(te){L.status==="pending"&&(L.status="rejected",L.reason=te)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function K(L,te,T,he,Ne){var ve=typeof L;(ve==="undefined"||ve==="boolean")&&(L=null);var Fe=!1;if(L===null)Fe=!0;else switch(ve){case"bigint":case"string":case"number":Fe=!0;break;case"object":switch(L.$$typeof){case e:case t:Fe=!0;break;case y:return Fe=L._init,K(Fe(L._payload),te,T,he,Ne)}}if(Fe)return Ne=Ne(L),Fe=he===""?"."+q(L,0):he,F(Ne)?(T="",Fe!=null&&(T=Fe.replace(le,"$&/")+"/"),K(Ne,te,T,"",function(Zt){return Zt})):Ne!=null&&(P(Ne)&&(Ne=C(Ne,T+(Ne.key==null||L&&L.key===Ne.key?"":(""+Ne.key).replace(le,"$&/")+"/")+Fe)),te.push(Ne)),1;Fe=0;var st=he===""?".":he+":";if(F(L))for(var it=0;it<L.length;it++)he=L[it],ve=st+q(he,it),Fe+=K(he,te,T,ve,Ne);else if(it=v(L),typeof it=="function")for(L=it.call(L),it=0;!(he=L.next()).done;)he=he.value,ve=st+q(he,it++),Fe+=K(he,te,T,ve,Ne);else if(ve==="object"){if(typeof L.then=="function")return K(Q(L),te,T,he,Ne);throw te=String(L),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return Fe}function oe(L,te,T){if(L==null)return L;var he=[],Ne=0;return K(L,he,"","",function(ve){return te.call(T,ve,Ne++)}),he}function Z(L){if(L._status===-1){var te=L._result;te=te(),te.then(function(T){(L._status===0||L._status===-1)&&(L._status=1,L._result=T)},function(T){(L._status===0||L._status===-1)&&(L._status=2,L._result=T)}),L._status===-1&&(L._status=0,L._result=te)}if(L._status===1)return L._result.default;throw L._result}var pe=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},O={map:oe,forEach:function(L,te,T){oe(L,function(){te.apply(this,arguments)},T)},count:function(L){var te=0;return oe(L,function(){te++}),te},toArray:function(L){return oe(L,function(te){return te})||[]},only:function(L){if(!P(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return De.Activity=g,De.Children=O,De.Component=_,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=H,De.__COMPILER_RUNTIME={__proto__:null,c:function(L){return H.H.useMemoCache(L)}},De.cache=function(L){return function(){return L.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(L,te,T){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var he=w({},L.props),Ne=L.key;if(te!=null)for(ve in te.key!==void 0&&(Ne=""+te.key),te)!U.call(te,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&te.ref===void 0||(he[ve]=te[ve]);var ve=arguments.length-2;if(ve===1)he.children=T;else if(1<ve){for(var Fe=Array(ve),st=0;st<ve;st++)Fe[st]=arguments[st+2];he.children=Fe}return J(L.type,Ne,he)},De.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},De.createElement=function(L,te,T){var he,Ne={},ve=null;if(te!=null)for(he in te.key!==void 0&&(ve=""+te.key),te)U.call(te,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(Ne[he]=te[he]);var Fe=arguments.length-2;if(Fe===1)Ne.children=T;else if(1<Fe){for(var st=Array(Fe),it=0;it<Fe;it++)st[it]=arguments[it+2];Ne.children=st}if(L&&L.defaultProps)for(he in Fe=L.defaultProps,Fe)Ne[he]===void 0&&(Ne[he]=Fe[he]);return J(L,ve,Ne)},De.createRef=function(){return{current:null}},De.forwardRef=function(L){return{$$typeof:f,render:L}},De.isValidElement=P,De.lazy=function(L){return{$$typeof:y,_payload:{_status:-1,_result:L},_init:Z}},De.memo=function(L,te){return{$$typeof:h,type:L,compare:te===void 0?null:te}},De.startTransition=function(L){var te=H.T,T={};H.T=T;try{var he=L(),Ne=H.S;Ne!==null&&Ne(T,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(M,pe)}catch(ve){pe(ve)}finally{te!==null&&T.types!==null&&(te.types=T.types),H.T=te}},De.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},De.use=function(L){return H.H.use(L)},De.useActionState=function(L,te,T){return H.H.useActionState(L,te,T)},De.useCallback=function(L,te){return H.H.useCallback(L,te)},De.useContext=function(L){return H.H.useContext(L)},De.useDebugValue=function(){},De.useDeferredValue=function(L,te){return H.H.useDeferredValue(L,te)},De.useEffect=function(L,te){return H.H.useEffect(L,te)},De.useEffectEvent=function(L){return H.H.useEffectEvent(L)},De.useId=function(){return H.H.useId()},De.useImperativeHandle=function(L,te,T){return H.H.useImperativeHandle(L,te,T)},De.useInsertionEffect=function(L,te){return H.H.useInsertionEffect(L,te)},De.useLayoutEffect=function(L,te){return H.H.useLayoutEffect(L,te)},De.useMemo=function(L,te){return H.H.useMemo(L,te)},De.useOptimistic=function(L,te){return H.H.useOptimistic(L,te)},De.useReducer=function(L,te,T){return H.H.useReducer(L,te,T)},De.useRef=function(L){return H.H.useRef(L)},De.useState=function(L){return H.H.useState(L)},De.useSyncExternalStore=function(L,te,T){return H.H.useSyncExternalStore(L,te,T)},De.useTransition=function(){return H.H.useTransition()},De.version="19.2.5",De}var xv;function Ap(){return xv||(xv=1,sm.exports=QN()),sm.exports}var j=Ap(),lm={exports:{}},Ho={},om={exports:{}},cm={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -38,15 +38,15 @@ var qN=Object.defineProperty;var mv=e=>{throw TypeError(e)};var HN=(e,t,n)=>t in
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var _v;function WN(){if(_v)return Ho;_v=1;var e=VN(),t=Ap(),n=ZN();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"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),C=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function Y(i){return i===null||typeof i!="object"?null:(i=P&&i[P]||i["@@iterator"],typeof i=="function"?i:null)}var le=Symbol.for("react.client.reference");function q(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===le?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case _:return"Profiler";case N:return"StrictMode";case F:return"Suspense";case M:return"SuspenseList";case J:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case A:return i.displayName||"Context";case R:return(i._context.displayName||"Context")+".Consumer";case D:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case H:return r=i.displayName||null,r!==null?r:q(i.type)||"Memo";case U:r=i._payload,i=i._init;try{return q(i(r))}catch{}}return null}var Q=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},pe=[],O=-1;function L(i){return{current:i}}function te(i){0>O||(i.current=pe[O],pe[O]=null,O--)}function T(i,r){O++,pe[O]=i.current,i.current=r}var he=L(null),Ne=L(null),ve=L(null),Fe=L(null);function st(i,r){switch(T(ve,r),T(Ne,i),T(he,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?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),T(he,i)}function it(){te(he),te(Ne),te(ve)}function Wt(i){i.memoizedState!==null&&T(Fe,i);var r=he.current,l=Bx(r,i.type);r!==l&&(T(Ne,i),T(he,l))}function Kn(i){Ne.current===i&&(te(he),te(Ne)),Fe.current===i&&(te(Fe),Uo._currentValue=Z)}var Ji,Ra;function Gn(i){if(Ji===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Ji=r&&r[1]||"",Ra=-1<l.stack.indexOf(`
41
+ */var _v;function WN(){if(_v)return Ho;_v=1;var e=VN(),t=Ap(),n=ZN();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"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),C=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function Y(i){return i===null||typeof i!="object"?null:(i=P&&i[P]||i["@@iterator"],typeof i=="function"?i:null)}var le=Symbol.for("react.client.reference");function q(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===le?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case _:return"Profiler";case N:return"StrictMode";case F:return"Suspense";case M:return"SuspenseList";case J:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case A:return i.displayName||"Context";case R:return(i._context.displayName||"Context")+".Consumer";case D:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case H:return r=i.displayName||null,r!==null?r:q(i.type)||"Memo";case U:r=i._payload,i=i._init;try{return q(i(r))}catch{}}return null}var Q=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},pe=[],O=-1;function L(i){return{current:i}}function te(i){0>O||(i.current=pe[O],pe[O]=null,O--)}function T(i,r){O++,pe[O]=i.current,i.current=r}var he=L(null),Ne=L(null),ve=L(null),Fe=L(null);function st(i,r){switch(T(ve,r),T(Ne,i),T(he,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?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),T(he,i)}function it(){te(he),te(Ne),te(ve)}function Zt(i){i.memoizedState!==null&&T(Fe,i);var r=he.current,l=Bx(r,i.type);r!==l&&(T(Ne,i),T(he,l))}function Kn(i){Ne.current===i&&(te(he),te(Ne)),Fe.current===i&&(te(Fe),Uo._currentValue=Z)}var Ji,Ra;function Gn(i){if(Ji===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Ji=r&&r[1]||"",Ra=-1<l.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
43
  `+Ji+i+Ra}var Ii=!1;function Xe(i,r){if(!i||Ii)return"";Ii=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(ee){var W=ee}Reflect.construct(i,[],se)}else{try{se.call()}catch(ee){W=ee}i.call(se.prototype)}}else{try{throw Error()}catch(ee){W=ee}(se=i())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(ee){if(ee&&W&&typeof ee.stack=="string")return[ee.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),E=b[0],k=b[1];if(E&&k){var I=E.split(`
44
44
  `),X=k.split(`
45
45
  `);for(p=u=0;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;for(;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;if(u===I.length||p===X.length)for(u=I.length-1,p=X.length-1;1<=u&&0<=p&&I[u]!==X[p];)p--;for(;1<=u&&0<=p;u--,p--)if(I[u]!==X[p]){if(u!==1||p!==1)do if(u--,p--,0>p||I[u]!==X[p]){var ie=`
46
46
  `+I[u].replace(" at new "," at ");return i.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",i.displayName)),ie}while(1<=u&&0<=p);break}}}finally{Ii=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?Gn(l):""}function _i(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+=_i(i,l),l=i,i=i.return;while(i);return r}catch(u){return`
47
47
  Error generating stack: `+u.message+`
48
- `+u.stack}}var zi=Object.prototype.hasOwnProperty,ea=e.unstable_scheduleCallback,kr=e.unstable_cancelCallback,Yl=e.unstable_shouldYield,ys=e.unstable_requestPaint,Ot=e.unstable_now,xs=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,fe=e.unstable_UserBlockingPriority,Ce=e.unstable_NormalPriority,Pe=e.unstable_LowPriority,et=e.unstable_IdlePriority,yn=e.log,Ni=e.unstable_setDisableYieldValue,an=null,Dt=null;function un(i){if(typeof yn=="function"&&Ni(i),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(an,i)}catch{}}var lt=Math.clz32?Math.clz32:kc,Bi=Math.log,xn=Math.LN2;function kc(i){return i>>>=0,i===0?32:31-(Bi(i)/xn|0)|0}var Tr=256,vs=262144,Cr=4194304;function Cn(i){var r=i&42;if(r!==0)return r;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function B(i,r,l){var u=i.pendingLanes;if(u===0)return 0;var p=0,b=i.suspendedLanes,E=i.pingedLanes;i=i.warmLanes;var k=u&134217727;return k!==0?(u=k&~b,u!==0?p=Cn(u):(E&=k,E!==0?p=Cn(E):l||(l=k&~i,l!==0&&(p=Cn(l))))):(k=u&~b,k!==0?p=Cn(k):E!==0?p=Cn(E):l||(l=u&~i,l!==0&&(p=Cn(l)))),p===0?0:r!==0&&r!==p&&(r&b)===0&&(b=p&-p,l=r&-r,b>=l||b===32&&(l&4194048)!==0)?r:p}function ae(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function me(i,r){switch(i){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function je(){var i=Cr;return Cr<<=1,(Cr&62914560)===0&&(Cr=4194304),i}function wt(i){for(var r=[],l=0;31>l;l++)r.push(i);return r}function bt(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function xe(i,r,l,u,p,b){var E=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var k=i.entanglements,I=i.expirationTimes,X=i.hiddenUpdates;for(l=E&~l;0<l;){var ie=31-lt(l),se=1<<ie;k[ie]=0,I[ie]=-1;var W=X[ie];if(W!==null)for(X[ie]=null,ie=0;ie<W.length;ie++){var ee=W[ie];ee!==null&&(ee.lane&=-536870913)}l&=~se}u!==0&&be(i,u,0),b!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=b&~(E&~r))}function be(i,r,l){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-lt(r);i.entangledLanes|=r,i.entanglements[u]=i.entanglements[u]|1073741824|l&261930}function Me(i,r){var l=i.entangledLanes|=r;for(i=i.entanglements;l;){var u=31-lt(l),p=1<<u;p&r|i[u]&r&&(i[u]|=r),l&=~p}}function Ut(i,r){var l=r&-r;return l=(l&42)!==0?1:kt(l),(l&(i.suspendedLanes|r))!==0?0:l}function kt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ta(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Es(){var i=oe.p;return i!==0?i:(i=window.event,i===void 0?32:lv(i.type))}function Ss(i,r){var l=oe.p;try{return oe.p=i,r()}finally{oe.p=l}}var Ui=Math.random().toString(36).slice(2),$t="__reactFiber$"+Ui,fn="__reactProps$"+Ui,Ma="__reactContainer$"+Ui,Vl="__reactEvents$"+Ui,Tc="__reactListeners$"+Ui,ws="__reactHandles$"+Ui,Cc="__reactResources$"+Ui,Ar="__reactMarker$"+Ui;function Xl(i){delete i[$t],delete i[fn],delete i[Vl],delete i[Tc],delete i[ws]}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 we=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:we.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 _s(i){if(!i._valueTracker){var r=Yn(i)?"checked":"value";i._valueTracker=Oc(i,r,""+i[r])}}function Zl(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 id=/[\n"\\]/g;function On(i){return i.replace(id,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Wl(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)){_s(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),_s(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),_s(i)}function Re(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"]]),Jl=/^[\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 Jl.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(Wl(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));Wl(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&&Zl(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 eo=!1;function jc(i,r,l){if(eo)return i(r,l);eo=!0;try{var u=i(r);return u}finally{if(eo=!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 to(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"),ad=!1;if(ra)try{var no={};Object.defineProperty(no,"passive",{get:function(){ad=!0}}),window.addEventListener("test",no,no),window.removeEventListener("test",no,no)}catch{ad=!1}var za=null,rd=null,Dc=null;function Bg(){if(Dc)return Dc;var i,r=rd,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),io=g({},Mr,{view:0,detail:0}),Fw=Rn(io),sd,ld,ao,Bc=g({},io,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cd,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!==ao&&(ao&&i.type==="mousemove"?(sd=i.screenX-ao.screenX,ld=i.screenY-ao.screenY):ld=sd=0,ao=i),sd)},movementY:function(i){return"movementY"in i?i.movementY:ld}}),$g=Rn(Bc),Pw=g({},Bc,{dataTransfer:0}),qw=Rn(Pw),Hw=g({},io,{relatedTarget:0}),od=Rn(Hw),Kw=g({},Mr,{animationName:0,elapsedTime:0,pseudoElement:0}),Gw=Rn(Kw),Qw=g({},Mr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Yw=Rn(Qw),Vw=g({},Mr,{data:0}),Fg=Rn(Vw),Xw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zw={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"},Ww={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jw(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=Ww[i])?!!r[i]:!1}function cd(){return Jw}var e_=g({},io,{key:function(i){if(i.key){var r=Xw[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"?Zw[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cd,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}}),t_=Rn(e_),n_=g({},Bc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pg=Rn(n_),i_=g({},io,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cd}),a_=Rn(i_),r_=g({},Mr,{propertyName:0,elapsedTime:0,pseudoElement:0}),s_=Rn(r_),l_=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}),o_=Rn(l_),c_=g({},Mr,{newState:0,oldState:0}),u_=Rn(c_),f_=[9,13,27,32],ud=ra&&"CompositionEvent"in window,ro=null;ra&&"documentMode"in document&&(ro=document.documentMode);var d_=ra&&"TextEvent"in window&&!ro,qg=ra&&(!ud||ro&&8<ro&&11>=ro),Hg=" ",Kg=!1;function Gg(i,r){switch(i){case"keyup":return f_.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 h_(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 m_(i,r){if(Cs)return i==="compositionend"||!ud&&Gg(i,r)?(i=Bg(),Dc=rd=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 p_={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"?!!p_[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 so=null,lo=null;function g_(i){Rx(i,0)}function Uc(i){var r=ja(i);if(Zl(r))return i}function Xg(i,r){if(i==="change")return r}var Zg=!1;if(ra){var fd;if(ra){var dd="oninput"in document;if(!dd){var Wg=document.createElement("div");Wg.setAttribute("oninput","return;"),dd=typeof Wg.oninput=="function"}fd=dd}else fd=!1;Zg=fd&&(!document.documentMode||9<document.documentMode)}function Jg(){so&&(so.detachEvent("onpropertychange",eb),lo=so=null)}function eb(i){if(i.propertyName==="value"&&Uc(lo)){var r=[];Vg(r,lo,i,Ie(i)),jc(g_,r)}}function b_(i,r,l){i==="focusin"?(Jg(),so=r,lo=l,so.attachEvent("onpropertychange",eb)):i==="focusout"&&Jg()}function y_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Uc(lo)}function x_(i,r){if(i==="click")return Uc(r)}function v_(i,r){if(i==="input"||i==="change")return Uc(r)}function E_(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Vn=typeof Object.is=="function"?Object.is:E_;function oo(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 hd(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 S_=ra&&"documentMode"in document&&11>=document.documentMode,As=null,md=null,co=null,pd=!1;function rb(i,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;pd||As==null||As!==Ns(u)||(u=As,"selectionStart"in u&&hd(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}),co&&oo(co,u)||(co=u,u=Tu(md,"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")},gd={},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(gd[i])return gd[i];if(!Os[i])return i;var r=Os[i],l;for(l in r)if(r.hasOwnProperty(l)&&l in sb)return gd[i]=r[l];return i}var lb=Dr("animationend"),ob=Dr("animationiteration"),cb=Dr("animationstart"),w_=Dr("transitionrun"),__=Dr("transitionstart"),N_=Dr("transitioncancel"),ub=Dr("transitionend"),fb=new Map,bd="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(" ");bd.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,yd=0;function Fc(){for(var i=Rs,r=yd=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,yd|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function xd(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<Mo)throw Mo=0,Ch=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 k_(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 k_(i,r,l,u)}function vd(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")vd(i)&&(E=1);else if(typeof i=="string")E=RN(i,l,he.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case J:return i=Xn(31,l,r,p),i.elementType=J,i.lanes=b,i;case w:return Ir(l.children,p,b,r);case N:E=8,p|=24;break;case _:return i=Xn(12,l,r,p|2),i.elementType=_,i.lanes=b,i;case F:return i=Xn(13,l,r,p),i.elementType=F,i.lanes=b,i;case M:return i=Xn(19,l,r,p),i.elementType=M,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case A:E=10;break e;case R:E=9;break e;case D:E=11;break e;case H:E=14;break e;case U:E=16,u=null;break e}E=29,l=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Xn(E,l,r,p),r.elementType=i,r.type=u,r.lanes=b,r}function Ir(i,r,l,u){return i=Xn(7,i,u,r),i.lanes=l,i}function Ed(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 Sd(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,uo=0,fi=[],di=0,Ba=null,$i=1,Fi="";function la(i,r){js[Ds++]=uo,js[Ds++]=Kc,Kc=i,uo=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 wd(i){i.return!==null&&(la(i,1),gb(i,1,0))}function _d(i){for(;i===Kc;)Kc=js[--Ds],js[Ds]=null,uo=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,_t=null,Ze=!1,Ua=null,hi=!1,Nd=Error(a(519));function $a(i){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fo(ui(r,i)),Nd}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<Do.length;l++)Ke(Do[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")||qh(i.type,i.memoizedProps)),l=!l),l&&_t&&$a(i),xb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));_t=Hx(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));_t=Hx(i)}else r===27?(r=_t,er(i.type)?(i=Yh,Yh=null,_t=i):_t=r):_t=sn?pi(i.stateNode.nextSibling):null;return!0}function zr(){_t=sn=null,Ze=!1}function kd(){var i=Ua;return i!==null&&(Ln===null?Ln=i:Ln.push.apply(Ln,i),Ua=null),i}function fo(i){Ua===null?Ua=[i]:Ua.push(i)}var Td=L(null),Br=null,oa=null;function Fa(i,r,l){T(Td,r._currentValue),r._currentValue=l}function ca(i){i._currentValue=Td.current,te(Td)}function Cd(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 Ad(i,r,l,u){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var b=p.dependencies;if(b!==null){var E=p.child;b=b.firstContext;e:for(;b!==null;){var k=b;b=p;for(var I=0;I<r.length;I++)if(k.context===r[I]){b.lanes|=l,k=b.alternate,k!==null&&(k.lanes|=l),Cd(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),Cd(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(Uo):i=[Uo])}p=p.return}i!==null&&Ad(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 T_=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()})}},C_=e.unstable_scheduleCallback,A_=e.unstable_NormalPriority,Gt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Od(){return{controller:new T_,data:new Map,refCount:0}}function ho(i){i.refCount--,i.refCount===0&&C_(A_,function(){i.controller.abort()})}var mo=null,Rd=0,zs=0,Bs=null;function O_(i,r){if(mo===null){var l=mo=[];Rd=0,zs=Dh(),Bs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Rd++,r.then(Eb,Eb),r}function Eb(){if(--Rd===0&&mo!==null){Bs!==null&&(Bs.status="fulfilled");var i=mo;mo=null,zs=0,Bs=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function R_(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"&&O_(i,r),Sb!==null&&Sb(i,r)};var $r=L(null);function Md(){var i=$r.current;return i!==null?i:yt.pooledCache}function Yc(i,r){r===null?T($r,$r.current):T($r,r.pool)}function wb(){var i=Md();return i===null?null:{parent:Gt._currentValue,pool:i}}var Us=Error(a(460)),jd=Error(a(474)),Vc=Error(a(542)),Xc={then:function(){}};function _b(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,po=0;function Zc(i){var r=po;return po+=1,$s===null&&($s=[]),Nb($s,i,r)}function go(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(G,$){if(i){var V=G.deletions;V===null?(G.deletions=[$],G.flags|=16):V.push($)}}function l(G,$){if(!i)return null;for(;$!==null;)r(G,$),$=$.sibling;return null}function u(G){for(var $=new Map;G!==null;)G.key!==null?$.set(G.key,G):$.set(G.index,G),G=G.sibling;return $}function p(G,$){return G=sa(G,$),G.index=0,G.sibling=null,G}function b(G,$,V){return G.index=V,i?(V=G.alternate,V!==null?(V=V.index,V<$?(G.flags|=67108866,$):V):(G.flags|=67108866,$)):(G.flags|=1048576,$)}function E(G){return i&&G.alternate===null&&(G.flags|=67108866),G}function k(G,$,V,re){return $===null||$.tag!==6?($=Ed(V,G.mode,re),$.return=G,$):($=p($,V),$.return=G,$)}function I(G,$,V,re){var ke=V.type;return ke===w?ie(G,$,V.props.children,re,V.key):$!==null&&($.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===U&&Fr(ke)===$.type)?($=p($,V.props),go($,V),$.return=G,$):($=Hc(V.type,V.key,V.props,null,G.mode,re),go($,V),$.return=G,$)}function X(G,$,V,re){return $===null||$.tag!==4||$.stateNode.containerInfo!==V.containerInfo||$.stateNode.implementation!==V.implementation?($=Sd(V,G.mode,re),$.return=G,$):($=p($,V.children||[]),$.return=G,$)}function ie(G,$,V,re,ke){return $===null||$.tag!==7?($=Ir(V,G.mode,re,ke),$.return=G,$):($=p($,V),$.return=G,$)}function se(G,$,V){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Ed(""+$,G.mode,V),$.return=G,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return V=Hc($.type,$.key,$.props,null,G.mode,V),go(V,$),V.return=G,V;case S:return $=Sd($,G.mode,V),$.return=G,$;case U:return $=Fr($),se(G,$,V)}if(Q($)||Y($))return $=Ir($,G.mode,V,null),$.return=G,$;if(typeof $.then=="function")return se(G,Zc($),V);if($.$$typeof===A)return se(G,Qc(G,$),V);Wc(G,$)}return null}function W(G,$,V,re){var ke=$!==null?$.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return ke!==null?null:k(G,$,""+V,re);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case v:return V.key===ke?I(G,$,V,re):null;case S:return V.key===ke?X(G,$,V,re):null;case U:return V=Fr(V),W(G,$,V,re)}if(Q(V)||Y(V))return ke!==null?null:ie(G,$,V,re,null);if(typeof V.then=="function")return W(G,$,Zc(V),re);if(V.$$typeof===A)return W(G,$,Qc(G,V),re);Wc(G,V)}return null}function ee(G,$,V,re,ke){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return G=G.get(V)||null,k($,G,""+re,ke);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case v:return G=G.get(re.key===null?V:re.key)||null,I($,G,re,ke);case S:return G=G.get(re.key===null?V:re.key)||null,X($,G,re,ke);case U:return re=Fr(re),ee(G,$,V,re,ke)}if(Q(re)||Y(re))return G=G.get(V)||null,ie($,G,re,ke,null);if(typeof re.then=="function")return ee(G,$,V,Zc(re),ke);if(re.$$typeof===A)return ee(G,$,V,Qc($,re),ke);Wc($,re)}return null}function ye(G,$,V,re){for(var ke=null,tt=null,Se=$,Be=$=0,Ve=null;Se!==null&&Be<V.length;Be++){Se.index>Be?(Ve=Se,Se=null):Ve=Se.sibling;var nt=W(G,Se,V[Be],re);if(nt===null){Se===null&&(Se=Ve);break}i&&Se&&nt.alternate===null&&r(G,Se),$=b(nt,$,Be),tt===null?ke=nt:tt.sibling=nt,tt=nt,Se=Ve}if(Be===V.length)return l(G,Se),Ze&&la(G,Be),ke;if(Se===null){for(;Be<V.length;Be++)Se=se(G,V[Be],re),Se!==null&&($=b(Se,$,Be),tt===null?ke=Se:tt.sibling=Se,tt=Se);return Ze&&la(G,Be),ke}for(Se=u(Se);Be<V.length;Be++)Ve=ee(Se,G,Be,V[Be],re),Ve!==null&&(i&&Ve.alternate!==null&&Se.delete(Ve.key===null?Be:Ve.key),$=b(Ve,$,Be),tt===null?ke=Ve:tt.sibling=Ve,tt=Ve);return i&&Se.forEach(function(rr){return r(G,rr)}),Ze&&la(G,Be),ke}function Ae(G,$,V,re){if(V==null)throw Error(a(151));for(var ke=null,tt=null,Se=$,Be=$=0,Ve=null,nt=V.next();Se!==null&&!nt.done;Be++,nt=V.next()){Se.index>Be?(Ve=Se,Se=null):Ve=Se.sibling;var rr=W(G,Se,nt.value,re);if(rr===null){Se===null&&(Se=Ve);break}i&&Se&&rr.alternate===null&&r(G,Se),$=b(rr,$,Be),tt===null?ke=rr:tt.sibling=rr,tt=rr,Se=Ve}if(nt.done)return l(G,Se),Ze&&la(G,Be),ke;if(Se===null){for(;!nt.done;Be++,nt=V.next())nt=se(G,nt.value,re),nt!==null&&($=b(nt,$,Be),tt===null?ke=nt:tt.sibling=nt,tt=nt);return Ze&&la(G,Be),ke}for(Se=u(Se);!nt.done;Be++,nt=V.next())nt=ee(Se,G,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(PN){return r(G,PN)}),Ze&&la(G,Be),ke}function pt(G,$,V,re){if(typeof V=="object"&&V!==null&&V.type===w&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case v:e:{for(var ke=V.key;$!==null;){if($.key===ke){if(ke=V.type,ke===w){if($.tag===7){l(G,$.sibling),re=p($,V.props.children),re.return=G,G=re;break e}}else if($.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===U&&Fr(ke)===$.type){l(G,$.sibling),re=p($,V.props),go(re,V),re.return=G,G=re;break e}l(G,$);break}else r(G,$);$=$.sibling}V.type===w?(re=Ir(V.props.children,G.mode,re,V.key),re.return=G,G=re):(re=Hc(V.type,V.key,V.props,null,G.mode,re),go(re,V),re.return=G,G=re)}return E(G);case S:e:{for(ke=V.key;$!==null;){if($.key===ke)if($.tag===4&&$.stateNode.containerInfo===V.containerInfo&&$.stateNode.implementation===V.implementation){l(G,$.sibling),re=p($,V.children||[]),re.return=G,G=re;break e}else{l(G,$);break}else r(G,$);$=$.sibling}re=Sd(V,G.mode,re),re.return=G,G=re}return E(G);case U:return V=Fr(V),pt(G,$,V,re)}if(Q(V))return ye(G,$,V,re);if(Y(V)){if(ke=Y(V),typeof ke!="function")throw Error(a(150));return V=ke.call(V),Ae(G,$,V,re)}if(typeof V.then=="function")return pt(G,$,Zc(V),re);if(V.$$typeof===A)return pt(G,$,Qc(G,V),re);Wc(G,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,$!==null&&$.tag===6?(l(G,$.sibling),re=p($,V),re.return=G,G=re):(l(G,$),re=Ed(V,G.mode,re),re.return=G,G=re),E(G)):l(G,$)}return function(G,$,V,re){try{po=0;var ke=pt(G,$,V,re);return $s=null,ke}catch(Se){if(Se===Us||Se===Vc)throw Se;var tt=Xn(29,Se,null,G.mode);return tt.lanes=re,tt.return=G,tt}finally{}}}var qr=Cb(!0),Ab=Cb(!1),Pa=!1;function Dd(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ld(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 bo(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 Id(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 zd=!1;function yo(){if(zd){var i=Bs;if(i!==null)throw i}}function xo(i,r,l,u){zd=!1;var p=i.updateQueue;Pa=!1;var b=p.firstBaseUpdate,E=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var I=k,X=I.next;I.next=null,E===null?b=X:E.next=X,E=I;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,k=ie.lastBaseUpdate,k!==E&&(k===null?ie.firstBaseUpdate=X:k.next=X,ie.lastBaseUpdate=I))}if(b!==null){var se=p.baseState;E=0,ie=X=I=null,k=b;do{var W=k.lane&-536870913,ee=W!==k.lane;if(ee?(Ye&W)===W:(u&W)===W){W!==0&&W===zs&&(zd=!0),ie!==null&&(ie=ie.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var ye=i,Ae=k;W=r;var pt=l;switch(Ae.tag){case 1:if(ye=Ae.payload,typeof ye=="function"){se=ye.call(pt,se,W);break e}se=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ae.payload,W=typeof ye=="function"?ye.call(pt,se,W):ye,W==null)break e;se=g({},se,W);break e;case 2:Pa=!0}}W=k.callback,W!==null&&(i.flags|=64,ee&&(i.flags|=8192),ee=p.callbacks,ee===null?p.callbacks=[W]:ee.push(W))}else ee={lane:W,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ie===null?(X=ie=ee,I=se):ie=ie.next=ee,E|=W;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;ee=k,k=ee.next,ee.next=null,p.lastBaseUpdate=ee,p.shared.pending=null}}while(!0);ie===null&&(I=se),p.baseState=I,p.firstBaseUpdate=X,p.lastBaseUpdate=ie,b===null&&(p.shared.lanes=0),Va|=E,i.lanes=E,i.memoizedState=se}}function 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=L(null),Jc=L(0);function Mb(i,r){i=ya,T(Jc,i),T(Fs,r),ya=i|r.baseLanes}function Bd(){T(Jc,ya),T(Fs,Fs.current)}function Ud(){ya=Jc.current,te(Fs),te(Jc)}var Zn=L(null),mi=null;function Ka(i){var r=i.alternate;T(Pt,Pt.current&1),T(Zn,i),mi===null&&(r===null||Fs.current!==null||r.memoizedState!==null)&&(mi=i)}function $d(i){T(Pt,Pt.current),T(Zn,i),mi===null&&(mi=i)}function jb(i){i.tag===22?(T(Pt,Pt.current),T(Zn,i),mi===null&&(mi=i)):Ga()}function Ga(){T(Pt,Pt.current),T(Zn,Zn.current)}function Wn(i){te(Zn),mi===i&&(mi=null),te(Pt)}var Pt=L(0);function eu(i){for(var r=i;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Gh(l)||Qh(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ua=0,ze=null,ht=null,Qt=null,tu=!1,Ps=!1,Hr=!1,nu=0,vo=0,qs=null,M_=0;function Lt(){throw Error(a(321))}function Fd(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 Pd(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:ih,Hr=!1,b=l(u,p),Hr=!1,Ps&&(b=Lb(r,l,u,p)),Db(i),b}function Db(i){K.H=wo;var r=ht!==null&&ht.next!==null;if(ua=0,Qt=ht=ze=null,tu=!1,vo=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),vo=0,Ps=!1,25<=p)throw Error(a(301));if(p+=1,Qt=ht=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}K.H=by,b=r(l,u)}while(Ps);return b}function j_(){var i=K.H,r=i.useState()[0];return r=typeof r.then=="function"?Eo(r):r,i=i.useState()[0],(ht!==null?ht.memoizedState:null)!==i&&(ze.flags|=1024),r}function qd(){var i=nu!==0;return nu=0,i}function Hd(i,r,l){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~l}function Kd(i){if(tu){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}tu=!1}ua=0,Qt=ht=ze=null,Ps=!1,vo=nu=0,qs=null}function En(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?ze.memoizedState=Qt=i:Qt=Qt.next=i,Qt}function qt(){if(ht===null){var i=ze.alternate;i=i!==null?i.memoizedState:null}else i=ht.next;var r=Qt===null?ze.memoizedState:Qt.next;if(r!==null)Qt=r,ht=i;else{if(i===null)throw ze.alternate===null?Error(a(467)):Error(a(310));ht=i,i={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Qt===null?ze.memoizedState=Qt=i:Qt=Qt.next=i}return Qt}function iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Eo(i){var r=vo;return vo+=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:ih),i}function au(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Eo(i);if(i.$$typeof===A)return ln(i)}throw Error(a(438,String(i)))}function Gd(i){var r=null,l=ze.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=iu(),ze.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(i),u=0;u<i;u++)l[u]=C;return r.index++,l}function fa(i,r){return typeof r=="function"?r(i):r}function ru(i){var r=qt();return Qd(r,ht,i)}function Qd(i,r,l){var u=i.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var p=i.baseQueue,b=u.pending;if(b!==null){if(p!==null){var E=p.next;p.next=b.next,b.next=E}r.baseQueue=p=b,u.pending=null}if(b=i.baseState,p===null)i.memoizedState=b;else{r=p.next;var k=E=null,I=null,X=r,ie=!1;do{var se=X.lane&-536870913;if(se!==X.lane?(Ye&se)===se:(ua&se)===se){var W=X.revertLane;if(W===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),se===zs&&(ie=!0);else if((ua&W)===W){X=X.next,W===zs&&(ie=!0);continue}else se={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(k=I=se,E=b):I=I.next=se,ze.lanes|=W,Va|=W;se=X.action,Hr&&l(b,se),b=X.hasEagerState?X.eagerState:l(b,se)}else W={lane:se,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(k=I=W,E=b):I=I.next=W,ze.lanes|=se,Va|=se;X=X.next}while(X!==null&&X!==r);if(I===null?E=b:I.next=k,!Vn(b,i.memoizedState)&&(Yt=!0,ie&&(l=Bs,l!==null)))throw l;i.memoizedState=b,i.baseState=E,i.baseQueue=I,u.lastRenderedState=b}return p===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function Yd(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((ht||p).memoizedState,l);if(E&&(p.memoizedState=l,Yt=!0),p=p.queue,Zd(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 Vd(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,Qd(i,ht,typeof u=="function"?u:fa)}function D_(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),I=K.S;I!==null&&I(E,k),Hb(i,r,k)}catch(X){Xd(i,r,X)}finally{b!==null&&E.types!==null&&(b.types=E.types),K.T=b}}else try{b=l(p,u),Hb(i,r,b)}catch(X){Xd(i,r,X)}}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 Xd(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 Xd(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(_t){t:{for(var p=_t,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){_t=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=Vd(!1),b=nh.bind(null,ze,!1,u.queue),u=En(),p={state:r,dispatch:null,action:i,pending:null},u.queue=p,l=D_.bind(null,ze,p,b,l),p.dispatch=l,u.memoizedState=i,[r,l,!1]}function Vb(i){var r=qt();return Xb(r,ht,i)}function Xb(i,r,l){if(r=Qd(i,r,Qb)[0],i=ru(fa)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Eo(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},L_.bind(null,p,l),null)),[u,b,i]}function L_(i,r){i.action=r}function Zb(i){var r=qt(),l=ht;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;ht!==null&&u!==null&&Fd(u,ht.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 Zd(i,r){lu(2048,8,i,r)}function I_(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 I_({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 Wd(){}function ry(i,r){var l=qt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&Fd(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&&Fd(r,u[1]))return u[0];if(u=i(),Hr){un(!0);try{i()}finally{un(!1)}}return l.memoizedState=[u,r],u}function Jd(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=Jd(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=oe.p;oe.p=b!==0&&8>b?b:8;var E=K.T,k={};K.T=k,nh(i,!1,r,l);try{var I=p(),X=K.S;if(X!==null&&X(k,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ie=R_(I,u);So(i,r,ie,ti(i))}else So(i,r,u,ti(i))}catch(se){So(i,r,{then:function(){},status:"rejected",reason:se},ti())}finally{oe.p=b,E!==null&&k.types!==null&&(E.types=k.types),K.T=E}}function z_(){}function eh(i,r,l,u){if(i.tag!==5)throw Error(a(476));var p=cy(i).queue;oy(i,p,r,Z,l===null?z_:function(){return uy(i),l(u)})}function cy(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:Z},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:l},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function uy(i){var r=cy(i);r.next===null&&(r=i.alternate.memoizedState),So(i,r.next.queue,{},ti())}function th(){return ln(Uo)}function fy(){return qt().memoizedState}function dy(){return qt().memoizedState}function B_(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),bo(u,r,l)),r={cache:Od()},i.payload=r;return}r=r.return}}function U_(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=xd(i,r,l,u),l!==null&&(In(l,i,u),py(l,r,u)))}function hy(i,r,l){var u=ti();So(i,r,l,u)}function So(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=xd(i,r,p,u),l!==null)return In(l,i,u),py(l,r,u),!0}return!1}function nh(i,r,l,u){if(u={lane:2,revertLane:Dh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ou(i)){if(r)throw Error(a(479))}else r=xd(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 wo={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};wo.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=U_.bind(null,ze,i),[u.memoizedState,i]},useRef:function(i){var r=En();return i={current:i},r.memoizedState=i},useState:function(i){i=Vd(i);var r=i.queue,l=hy.bind(null,ze,r);return r.dispatch=l,[i.memoizedState,l]},useDebugValue:Wd,useDeferredValue:function(i,r){var l=En();return Jd(l,i,r)},useTransition:function(){var i=Vd(!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=M_++,r="_"+r+"r_"+l.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:th,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=nh.bind(null,ze,!0,l),l.dispatch=r,[i,r]},useMemoCache:Gd,useCacheRefresh:function(){return En().memoizedState=B_.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)}}},ih={readContext:ln,use:au,useCallback:ry,useContext:ln,useEffect:Zd,useImperativeHandle:ay,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:sy,useReducer:ru,useRef:Wb,useState:function(){return ru(fa)},useDebugValue:Wd,useDeferredValue:function(i,r){var l=qt();return ly(l,ht.memoizedState,i,r)},useTransition:function(){var i=ru(fa)[0],r=qt().memoizedState;return[typeof i=="boolean"?i:Eo(i),r]},useSyncExternalStore:Ib,useId:fy,useHostTransitionStatus:th,useFormState:Vb,useActionState:Vb,useOptimistic:function(i,r){var l=qt();return Pb(l,ht,i,r)},useMemoCache:Gd,useCacheRefresh:dy};ih.useEffectEvent=ey;var by={readContext:ln,use:au,useCallback:ry,useContext:ln,useEffect:Zd,useImperativeHandle:ay,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:sy,useReducer:Yd,useRef:Wb,useState:function(){return Yd(fa)},useDebugValue:Wd,useDeferredValue:function(i,r){var l=qt();return ht===null?Jd(l,i,r):ly(l,ht.memoizedState,i,r)},useTransition:function(){var i=Yd(fa)[0],r=qt().memoizedState;return[typeof i=="boolean"?i:Eo(i),r]},useSyncExternalStore:Ib,useId:fy,useHostTransitionStatus:th,useFormState:Zb,useActionState:Zb,useOptimistic:function(i,r){var l=qt();return ht!==null?Pb(l,ht,i,r):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:Gd,useCacheRefresh:dy};by.useEffectEvent=ey;function ah(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 rh={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),bo(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),bo(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),bo(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?!oo(l,u)||!oo(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&&rh.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 wy(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 sh(i,r,l){return l=qa(l),l.tag=3,l.payload={element:null},l.callback=function(){cu(i,r)},l}function _y(i){return i=qa(i),i.tag=3,i}function 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(){wy(r,l,u)}}var E=l.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(i.callback=function(){wy(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 $_(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),Rh(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)),Rh(i,u,p)),!1}throw Error(a(435,l.tag))}return Rh(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!==Nd&&(i=Error(a(422),{cause:u}),fo(ui(i,l)))):(u!==Nd&&(r=Error(a(423),{cause:u}),fo(ui(r,l))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,u=ui(u,l),p=sh(i.stateNode,u,p),Id(i,p),It!==4&&(It=2)),!1;var b=Error(a(520),{cause:u});if(b=ui(b,l),Ro===null?Ro=[b]:Ro.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=sh(l.stateNode,u,i),Id(l,i),!1;case 1:if(r=l.type,b=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Xa===null||!Xa.has(b))))return l.flags|=65536,p&=-p,l.lanes|=p,p=_y(p),Ny(p,i,l,u),Id(l,p),!1}l=l.return}while(l!==null);return!1}var lh=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=Pd(i,r,l,E,b,p),k=qd(),i!==null&&!Yt?(Hd(i,r,p),da(i,r,p)):(Ze&&k&&wd(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"&&!vd(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,!ph(i,p)){var E=b.memoizedProps;if(l=l.compare,l=l!==null?l:oo,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(oo(b,u)&&i.ref===r.ref)if(Yt=!1,r.pendingProps=u=b,ph(i,p))(i.flags&131072)!==0&&(Yt=!0);else return r.lanes=i.lanes,da(i,r,p)}return oh(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):Bd(),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),Bd(),Ga());return on(i,r,p,l),r.child}function _o(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Oy(i,r,l,u,p){var b=Md();return b=b===null?null:{parent:Gt._currentValue,pool:b},r.memoizedState={baseLanes:l,cachePool:b},i!==null&&Yc(r,null),Bd(),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 F_(i,r,l){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(Ze){if(u.mode==="hidden")return i=uu(r,u),r.lanes=536870912,_o(null,i);if($d(r),(i=_t)?(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,_t=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($d(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),lh;Eu(),r=Ry(i,r,l)}else i=b.treeContext,_t=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 oh(i,r,l,u,p){return Ur(r),l=Pd(i,r,l,u,void 0,p),u=qd(),i!==null&&!Yt?(Hd(i,r,p),da(i,r,p)):(Ze&&u&&wd(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=qd(),i!==null&&!Yt?(Hd(i,r,b),da(i,r,b)):(Ze&&u&&wd(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=rh,r.stateNode=b,b._reactInternals=r,b=r.stateNode,b.props=u,b.state=r.memoizedState,b.refs={},Dd(r),E=l.contextType,b.context=typeof E=="object"&&E!==null?ln(E):Ms,b.state=r.memoizedState,E=l.getDerivedStateFromProps,typeof E=="function"&&(ah(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&&rh.enqueueReplaceState(b,b.state,null),xo(r,u,b,p),yo(),b.state=r.memoizedState),typeof b.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){b=r.stateNode;var k=r.memoizedProps,I=Kr(l,k);b.props=I;var X=b.context,ie=l.contextType;E=Ms,typeof ie=="object"&&ie!==null&&(E=ln(ie));var se=l.getDerivedStateFromProps;ie=typeof se=="function"||typeof b.getSnapshotBeforeUpdate=="function",k=r.pendingProps!==k,ie||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(k||X!==E)&&xy(r,b,u,E),Pa=!1;var W=r.memoizedState;b.state=W,xo(r,u,b,p),yo(),X=r.memoizedState,k||W!==X||Pa?(typeof se=="function"&&(ah(r,l,se,u),X=r.memoizedState),(I=Pa||yy(r,l,I,u,W,X,E))?(ie||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(r.flags|=4194308)):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=X),b.props=u,b.state=X,b.context=E,u=I):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{b=r.stateNode,Ld(i,r),E=r.memoizedProps,ie=Kr(l,E),b.props=ie,se=r.pendingProps,W=b.context,X=l.contextType,I=Ms,typeof X=="object"&&X!==null&&(I=ln(X)),k=l.getDerivedStateFromProps,(X=typeof k=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==se||W!==I)&&xy(r,b,u,I),Pa=!1,W=r.memoizedState,b.state=W,xo(r,u,b,p),yo();var ee=r.memoizedState;E!==se||W!==ee||Pa||i!==null&&i.dependencies!==null&&Gc(i.dependencies)?(typeof k=="function"&&(ah(r,l,k,u),ee=r.memoizedState),(ie=Pa||yy(r,l,ie,u,W,ee,I)||i!==null&&i.dependencies!==null&&Gc(i.dependencies))?(X||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,ee,I),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,ee,I)),typeof b.componentDidUpdate=="function"&&(r.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=ee),b.props=u,b.state=ee,b.context=I,u=ie):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),u=!1)}return b=u,fu(i,r),u=(r.flags&128)!==0,b||u?(b=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:b.render(),r.flags|=1,i!==null&&u?(r.child=qr(r,i.child,null,p),r.child=qr(r,null,l,p)):on(i,r,l,p),r.memoizedState=b.state,i=r.child):i=da(i,r,p),i}function Dy(i,r,l,u){return zr(),r.flags|=256,on(i,r,l,u),r.child}var ch={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uh(i){return{baseLanes:i,cachePool:wb()}}function fh(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=_t)?(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,_t=null)):i=null,i===null)throw $a(r);return Qh(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=uh(l),u.childLanes=fh(i,E,l),r.memoizedState=ch,_o(null,u)):(Ka(r),dh(r,k))}var I=i.memoizedState;if(I!==null&&(k=I.dehydrated,k!==null)){if(b)r.flags&256?(Ka(r),r.flags&=-257,r=hh(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=uh(l),u.childLanes=fh(i,E,l),r.memoizedState=ch,r=_o(null,u));else if(Ka(r),Qh(k)){if(E=k.nextSibling&&k.nextSibling.dataset,E)var X=E.dgst;E=X,u=Error(a(419)),u.stack="",u.digest=E,fo({value:u,source:null,stack:null}),r=hh(i,r,l)}else if(Yt||Is(i,r,l,!1),E=(l&i.childLanes)!==0,Yt||E){if(E=yt,E!==null&&(u=Ut(E,l),u!==0&&u!==I.retryLane))throw I.retryLane=u,Lr(i,u),In(E,i,u),lh;Gh(k)||Eu(),r=hh(i,r,l)}else Gh(k)?(r.flags|=192,r.child=i.child,r=null):(i=I.treeContext,_t=pi(k.nextSibling),sn=r,Ze=!0,Ua=null,hi=!1,i!==null&&bb(r,i),r=dh(r,u.children),r.flags|=4096);return r}return p?(Ga(),k=u.fallback,p=r.mode,I=i.child,X=I.sibling,u=sa(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,X!==null?k=sa(X,k):(k=Ir(k,p,l,null),k.flags|=2),k.return=r,u.return=r,u.sibling=k,r.child=u,_o(null,u),u=r.child,k=i.child.memoizedState,k===null?k=uh(l):(p=k.cachePool,p!==null?(I=Gt._currentValue,p=p.parent!==I?{parent:I,pool:I}:p):p=wb(),k={baseLanes:k.baseLanes|l,cachePool:p}),u.memoizedState=k,u.childLanes=fh(i,E,l),r.memoizedState=ch,_o(i.child,u)):(Ka(r),l=i.child,i=l.sibling,l=sa(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,i!==null&&(E=r.deletions,E===null?(r.deletions=[i],r.flags|=16):E.push(i)),r.child=l,r.memoizedState=null,l)}function dh(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 hh(i,r,l){return qr(r,i.child,null,l),i=dh(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),Cd(i.return,r,l)}function mh(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,T(Pt,E),on(i,r,u,l),u=Ze?uo: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),mh(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}mh(r,!0,l,null,b,u);break;case"together":mh(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 ph(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Gc(i)))}function P_(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,$d(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),T(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(!ph(i,l)&&(r.flags&128)===0)return Yt=!1,P_(i,r,l);Yt=(i.flags&131072)!==0}else Yt=!1,Ze&&(r.flags&1048576)!==0&&gb(r,uo,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")vd(i)?(u=Kr(i,u),r.tag=1,r=jy(null,r,i,u,l)):(r.tag=0,r=oh(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===H){r.tag=14,r=Ty(null,r,i,u,l);break e}}throw r=q(i)||i,Error(a(306,r,""))}}return r;case 0:return oh(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,Ld(i,r),xo(r,u,null,l);var E=r.memoizedState;if(u=E.cache,Fa(r,Gt,u),u!==b.cache&&Ad(r,[Gt],l,!0),yo(),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),fo(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(_t=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=_t,er(r.type)?(Yh=p,_t=pi(u.firstChild)):_t=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=_t)&&(u=yN(u,r.type,r.pendingProps,hi),u!==null?(r.stateNode=u,sn=r,_t=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,qh(p,b)?u=null:E!==null&&qh(p,E)&&(r.flags|=32),r.memoizedState!==null&&(p=Pd(i,r,j_,null,null,l),Uo._currentValue=p),fu(i,r),on(i,r,u,l),r.child;case 6:return i===null&&Ze&&((i=l=_t)&&(l=xN(l,r.pendingProps,hi),l!==null?(r.stateNode=l,sn=r,_t=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 F_(i,r,l);case 22:return Ay(i,r,l,r.pendingProps);case 24:return Ur(r),u=ln(Gt),i===null?(p=Md(),p===null&&(p=yt,b=Od(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=l),p=b),r.memoizedState={parent:u,cache:p},Dd(r),Fa(r,Gt,p)):((i.lanes&l)!==0&&(Ld(i,r),xo(r,null,null,l),yo()),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&&Ad(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 gh(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,jd}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,jd}function hu(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?je():536870912,i.lanes|=r,Ys|=r)}function No(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 q_(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,kd())),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),gh(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),gh(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),gh(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=kd(),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=kd(),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&&Bh(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)No(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,No(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 T(Pt,Pt.current&1|2),Ze&&la(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&Ot()>yu&&(r.flags|=128,p=!0,No(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),No(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,No(u,!1),r.lanes=4194304);u.isBackwards?(b.sibling=r.child,r.child=b):(i=u.last,i!==null?i.sibling=b:r.child=b,u.last=b)}return u.tail!==null?(i=u.tail,u.rendering=i,u.tail=i.sibling,u.renderingStartTime=Ot(),i.sibling=null,l=Pt.current,T(Pt,p?l&1|2:l&1),Ze&&la(r,u.treeForkCount),i):(Nt(r),null);case 22:case 23:return Wn(r),Ud(),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 H_(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),Ud(),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),Ud(),i!==null&&te($r);break;case 24:ca(Gt)}}function ko(i,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&i)===i){u=void 0;var b=l.create,E=l.inst;u=b(),E.destroy=u}l=l.next}while(l!==p)}}catch(k){ft(r,r.return,k)}}function Qa(i,r,l){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&i)===i){var E=u.inst,k=E.destroy;if(k!==void 0){E.destroy=void 0,p=r;var I=l,X=k;try{X()}catch(ie){ft(p,I,ie)}}}u=u.next}while(u!==b)}}catch(ie){ft(r,r.return,ie)}}function 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 To(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 bh(i,r,l){try{var u=i.stateNode;dN(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 yh(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 xh(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(xh(i,r,l),i=i.sibling;i!==null;)xh(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,vh=!1,Gy=typeof WeakSet=="function"?WeakSet:Set,tn=null;function K_(i,r){if(i=i.containerInfo,Fh=Lu,i=ab(i),hd(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var p=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{l.nodeType,b.nodeType}catch{l=null;break e}var E=0,k=-1,I=-1,X=0,ie=0,se=i,W=null;t:for(;;){for(var ee;se!==l||p!==0&&se.nodeType!==3||(k=E+p),se!==b||u!==0&&se.nodeType!==3||(I=E+u),se.nodeType===3&&(E+=se.nodeValue.length),(ee=se.firstChild)!==null;)W=se,se=ee;for(;;){if(se===i)break t;if(W===l&&++X===p&&(k=E),W===b&&++ie===u&&(I=E),(ee=se.nextSibling)!==null)break;se=W,W=se.parentNode}se=ee}l=k===-1||I===-1?null:{start:k,end:I}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ph={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)Kh(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Kh(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&&ko(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&&To(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&&To(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=eN.bind(null,l),vN(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&&Xl(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),Io(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 G_(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=G_(i);r.forEach(function(u){if(!l.has(u)){l.add(u);var p=tN.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),ko(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&&bh(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&&bh(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{Re(p,"")}catch(ye){ft(i,i.return,ye)}}u&4&&i.stateNode!=null&&(p=i.memoizedProps,bh(i,p,l!==null?l.memoizedProps:p)),u&1024&&(vh=!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)}vh&&(vh=!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 I=l!==null&&l.memoizedState!==null,X=ma,ie=Vt;if(ma=X||p,Vt=ie||I,jn(r,i),Vt=ie,ma=X,Dn(i),u&8192)e:for(r=i.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(l===null||I||ma||Vt||Gr(i)),l=null,r=i;;){if(r.tag===5||r.tag===26){if(l===null){I=l=r;try{if(b=I.stateNode,p)E=b.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{k=I.stateNode;var se=I.memoizedProps.style,W=se!=null&&se.hasOwnProperty("display")?se.display:null;k.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(ye){ft(I,I.return,ye)}}}else if(r.tag===6){if(l===null){I=r;try{I.stateNode.nodeValue=p?"":I.memoizedProps}catch(ye){ft(I,I.return,ye)}}}else if(r.tag===18){if(l===null){I=r;try{var ee=I.stateNode;p?Px(ee,!0):Px(I.stateNode,!1)}catch(ye){ft(I,I.return,ye)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===i)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=i.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,pu(i,l))));break;case 19:jn(r,i),Dn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,pu(i,u)));break;case 30:break;case 21:break;default:jn(r,i),Dn(i)}}function Dn(i){var r=i.flags;if(r&2){try{for(var l,u=i.return;u!==null;){if(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=yh(i);mu(i,b,p);break;case 5:var E=l.stateNode;l.flags&32&&(Re(E,""),l.flags&=-33);var k=yh(i);mu(i,k,E);break;case 3:case 4:var I=l.stateNode.containerInfo,X=yh(i);xh(i,X,I);break;default:throw Error(a(161))}}catch(ie){ft(i,i.return,ie)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function 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:Io(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),ko(4,b);break;case 1:if(ba(p,b,l),u=b,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(X){ft(u,u.return,X)}if(u=b,p=u.updateQueue,p!==null){var k=u.stateNode;try{var I=p.shared.hiddenCallbacks;if(I!==null)for(p.shared.hiddenCallbacks=null,p=0;p<I.length;p++)Ob(I[p],k)}catch(X){ft(u,u.return,X)}}l&&E&64&&Fy(b),To(b,b.return);break;case 27:Ky(b);case 26:case 5:ba(p,b,l),l&&u===null&&E&4&&qy(b),To(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),To(b,b.return);break;case 30:break;default:ba(p,b,l)}r=r.sibling}}function Eh(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&&ho(l))}function Sh(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&ho(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&&ko(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&&ho(i)));break;case 12:if(p&2048){Ci(i,r,l,u),i=r.stateNode;try{var b=r.memoizedProps,E=b.id,k=b.onPostCommit;typeof k=="function"&&k(E,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(I){ft(r,r.return,I)}}else Ci(i,r,l,u);break;case 31:Ci(i,r,l,u);break;case 13:Ci(i,r,l,u);break;case 23:break;case 22:b=r.stateNode,E=r.alternate,r.memoizedState!==null?b._visibility&2?Ci(i,r,l,u):Co(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&&Eh(E,r);break;case 24:Ci(i,r,l,u),p&2048&&Sh(r.alternate,r);break;default:Ci(i,r,l,u)}}function Ks(i,r,l,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var b=i,E=r,k=l,I=u,X=E.flags;switch(E.tag){case 0:case 11:case 15:Ks(b,E,k,I,p),ko(8,E);break;case 23:break;case 22:var ie=E.stateNode;E.memoizedState!==null?ie._visibility&2?Ks(b,E,k,I,p):Co(b,E):(ie._visibility|=2,Ks(b,E,k,I,p)),p&&X&2048&&Eh(E.alternate,E);break;case 24:Ks(b,E,k,I,p),p&&X&2048&&Sh(E.alternate,E);break;default:Ks(b,E,k,I,p)}r=r.sibling}}function Co(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:Co(l,u),p&2048&&Eh(u.alternate,u);break;case 24:Co(l,u),p&2048&&Sh(u.alternate,u);break;default:Co(l,u)}r=r.sibling}}var Ao=8192;function Gs(i,r,l){if(i.subtreeFlags&Ao)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&Ao&&i.memoizedState!==null&&MN(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=Ao,Ao=16777216,Gs(i,r,l),Ao=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 Oo(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:Oo(i),i.flags&2048&&Qa(9,i,i.return);break;case 3:Oo(i);break;case 12:Oo(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)):Oo(i);break;default:Oo(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:ho(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 Q_={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}},Y_=typeof WeakMap=="function"?WeakMap:Map,at=0,yt=null,He=null,Ye=0,ut=0,Jn=null,Ya=!1,Qs=!1,wh=!1,ya=0,It=0,Va=0,Qr=0,_h=0,ei=0,Ys=0,Ro=null,Ln=null,Nh=!1,bu=0,rx=0,yu=1/0,xu=null,Xa=null,Jt=0,Za=null,Vs=null,xa=0,kh=0,Th=null,sx=null,Mo=0,Ch=null;function ti(){return(at&2)!==0&&Ye!==0?Ye&-Ye:K.T!==null?Dh():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?Z_(i,r):Oh(i,r,!0),b=u;do{if(p===0){Qs&&!u&&Wa(i,r,0,!1);break}else{if(l=i.current.alternate,b&&!V_(l)){p=Oh(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=Ro;var I=k.current.memoizedState.isDehydrated;if(I&&(Xs(k,E).flags|=256),E=Oh(k,E,!1),E!==2){if(wh&&!I){k.errorRecoveryDisabledLanes|=b,Qr|=b,p=4;break e}b=Ln,Ln=p,b!==null&&(Ln===null?Ln=b:Ln.push.apply(Ln,b))}p=E}if(b=!1,p!==2)continue}}if(p===1){Xs(i,0),Wa(i,r,0,!0);break}e:{switch(u=i,b=p,b){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Wa(u,r,ei,!Ya);break e;case 2:Ln=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(p=bu+300-Ot(),10<p)){if(Wa(u,r,ei,!Ya),B(u,0,!0)!==0)break e;xa=r,u.timeoutHandle=Ux(cx.bind(null,u,l,Ln,xu,Nh,r,ei,Qr,Ys,Ya,b,"Throttled",-0,0),p);break e}cx(u,l,Ln,xu,Nh,r,ei,Qr,Ys,Ya,b,null,-0,0)}}break}while(!0);qi(i)}function cx(i,r,l,u,p,b,E,k,I,X,ie,se,W,ee){if(i.timeoutHandle=-1,se=r.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:de},tx(r,b,se);var ye=(b&62914560)===b?bu-Ot():(b&4194048)===b?rx-Ot():0;if(ye=jN(se,ye),ye!==null){xa=b,i.cancelPendingCommit=ye(bx.bind(null,i,r,b,l,u,p,E,k,I,ie,se,null,W,ee)),Wa(i,b,E,!X);return}}bx(i,r,b,l,u,p,E,k,I)}function V_(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?(jo(0),!1):!0}function Ah(){if(He!==null){if(ut===0)var i=He.return;else i=He,oa=Br=null,Kd(i),$s=null,po=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,pN(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),xa=0,Ah(),yt=i,He=l=sa(i.current,null),Ye=r,ut=0,Jn=null,Ya=!1,Qs=ae(i,r),wh=!1,Ys=ei=_h=Qr=Va=It=0,Ln=Ro=null,Nh=!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=wo,r===Us||r===Vc?(r=kb(),ut=3):r===jd?(r=kb(),ut=4):ut=r===lh?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=wo,i===null?wo:i}function hx(){var i=K.A;return K.A=Q_,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 Oh(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,I=Jn;switch(ut){case 8:Ah(),E=6;break e;case 3:case 2:case 9:case 6:Zn.current===null&&(r=!0);var X=ut;if(ut=0,Jn=null,Zs(i,k,I,X),l&&Qs){E=0;break e}break;default:X=ut,ut=0,Jn=null,Zs(i,k,I,X)}}X_(),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 X_(){for(;He!==null;)mx(He)}function Z_(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(_b(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:_b(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 I=k.sibling;if(I!==null)He=I;else{var X=k.return;X!==null?(He=X,Su(X)):He=null}break t}}ut=0,Jn=null,Zs(i,r,b,5);break;case 6:ut=0,Jn=null,Zs(i,r,b,6);break;case 8:Ah(),It=6;break e;default:throw Error(a(462))}}W_();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 W_(){for(;He!==null&&!Yl();)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:Kd(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,Kd(r),$s=null,po=0;var p=r.return;try{if($_(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=q_(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=H_(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,I){i.cancelPendingCommit=null;do wu();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|=yd,xe(i,l,b,E,k,I),i===yt&&(He=yt=null,Ye=0),Vs=r,Za=i,xa=l,kh=b,Th=p,sx=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,nN(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=oe.p,oe.p=2,E=at,at|=4;try{K_(i,r,l)}finally{at=E,oe.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=oe.p;oe.p=2;var p=at;at|=4;try{Wy(r,i);var b=Ph,E=ab(i.containerInfo),k=b.focusedElem,I=b.selectionRange;if(E!==k&&k&&k.ownerDocument&&ib(k.ownerDocument.documentElement,k)){if(I!==null&&hd(k)){var X=I.start,ie=I.end;if(ie===void 0&&(ie=X),"selectionStart"in k)k.selectionStart=X,k.selectionEnd=Math.min(ie,k.value.length);else{var se=k.ownerDocument||document,W=se&&se.defaultView||window;if(W.getSelection){var ee=W.getSelection(),ye=k.textContent.length,Ae=Math.min(I.start,ye),pt=I.end===void 0?Ae:Math.min(I.end,ye);!ee.extend&&Ae>pt&&(E=pt,pt=Ae,Ae=E);var G=nb(k,Ae),$=nb(k,pt);if(G&&$&&(ee.rangeCount!==1||ee.anchorNode!==G.node||ee.anchorOffset!==G.offset||ee.focusNode!==$.node||ee.focusOffset!==$.offset)){var V=se.createRange();V.setStart(G.node,G.offset),ee.removeAllRanges(),Ae>pt?(ee.addRange(V),ee.extend($.node,$.offset)):(V.setEnd($.node,$.offset),ee.addRange(V))}}}}for(se=[],ee=k;ee=ee.parentNode;)ee.nodeType===1&&se.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<se.length;k++){var re=se[k];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Lu=!!Fh,Ph=Fh=null}finally{at=p,oe.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=oe.p;oe.p=2;var p=at;at|=4;try{Qy(i,r.alternate,r)}finally{at=p,oe.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=oe.p,oe.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,oe.p=p}}(xa&3)!==0&&wu(),qi(i),p=i.pendingLanes,(l&261930)!==0&&(p&42)!==0?i===Ch?Mo++:(Mo=0,Ch=i):Mo=0,jo(0)}}function Ex(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,ho(r)))}function wu(){return yx(),xx(),vx(),Sx()}function Sx(){if(Jt!==5)return!1;var i=Za,r=kh;kh=0;var l=ta(xa),u=K.T,p=oe.p;try{oe.p=32>l?32:l,K.T=null,l=Th,Th=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,jo(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(an,b)}catch{}return!0}finally{oe.p=p,K.T=u,Ex(i,r)}}function wx(i,r,l){r=ui(l,r),r=sh(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)wx(i,i,l);else for(;r!==null;){if(r.tag===3){wx(r,i,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Xa===null||!Xa.has(u))){i=ui(l,i),l=_y(2),u=Ha(r,l,2),u!==null&&(Ny(l,u,r,i),bt(u,2),qi(u));break}}r=r.return}}function Rh(i,r,l){var u=i.pingCache;if(u===null){u=i.pingCache=new Y_;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)||(wh=!0,p.add(l),i=J_.bind(null,i,r,l),r.then(i,i))}function J_(i,r,l){var u=i.pingCache;u!==null&&u.delete(r),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,yt===i&&(Ye&l)===l&&(It===4||It===3&&(Ye&62914560)===Ye&&300>Ot()-bu?(at&2)===0&&Xs(i,0):_h|=l,Ys===Ye&&(Ys=0)),qi(i)}function _x(i,r){r===0&&(r=je()),i=Lr(i,r),i!==null&&(bt(i,r),qi(i))}function eN(i){var r=i.memoizedState,l=0;r!==null&&(l=r.retryLane),_x(i,l)}function tN(i,r){var l=0;switch(i.tag){case 31:case 13:var u=i.stateNode,p=i.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=i.stateNode;break;case 22:u=i.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),_x(i,l)}function nN(i,r){return ea(i,r)}var _u=null,Ws=null,Mh=!1,Nu=!1,jh=!1,Ja=0;function qi(i){i!==Ws&&i.next===null&&(Ws===null?_u=Ws=i:Ws=Ws.next=i),Nu=!0,Mh||(Mh=!0,aN())}function jo(i,r){if(!jh&&Nu){jh=!0;do for(var l=!1,u=_u;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=B(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);jh=!1}}function iN(){Nx()}function Nx(){Nu=Mh=!1;var i=0;Ja!==0&&mN()&&(i=Ja);for(var r=Ot(),l=null,u=_u;u!==null;){var p=u.next,b=kx(u,r);b===0?(u.next=null,l===null?_u=p:l.next=p,p===null&&(Ws=l)):(l=u,(i!==0||(b&3)!==0)&&(Nu=!0)),u=p}Jt!==0&&Jt!==5||jo(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,I=p[E];I===-1?((k&l)===0||(k&u)!==0)&&(p[E]=me(k,r)):I<=r&&(i.expiredLanes|=k),b&=~k}if(r=yt,l=Ye,l=B(i,i===r?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,l===0||i===r&&(ut===2||ut===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&kr(u),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||ae(i,l)){if(r=l&-l,r===i.callbackPriority)return r;switch(u!==null&&kr(u),ta(l)){case 2:case 8:l=fe;break;case 32:l=Ce;break;case 268435456:l=et;break;default:l=Ce}return u=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(wu()&&i.callbackNode!==l)return null;var u=Ye;return u=B(i,i===yt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(ox(i,u,r),kx(i,Ot()),i.callbackNode!=null&&i.callbackNode===l?Tx.bind(null,i):null)}function Cx(i,r){if(wu())return null;ox(i,r,!0)}function aN(){gN(function(){(at&6)!==0?ea(ne,iN):Nx()})}function Dh(){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 rN(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 I=E?Ox(p,E):new FormData(p);eh(l,{pending:!0,data:I,method:p.method,action:b},null,I)}}else typeof b=="function"&&(k.preventDefault(),I=E?Ox(p,E):new FormData(p),eh(l,{pending:!0,data:I,method:p.method,action:b},b,I))},currentTarget:p}]})}}for(var Lh=0;Lh<bd.length;Lh++){var Ih=bd[Lh],sN=Ih.toLowerCase(),lN=Ih[0].toUpperCase()+Ih.slice(1);ki(sN,"on"+lN)}ki(lb,"onAnimationEnd"),ki(ob,"onAnimationIteration"),ki(cb,"onAnimationStart"),ki("dblclick","onDoubleClick"),ki("focusin","onFocus"),ki("focusout","onBlur"),ki(w_,"onTransitionRun"),ki(__,"onTransitionStart"),ki(N_,"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 Do="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(" "),oN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Do));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],I=k.instance,X=k.currentTarget;if(k=k.listener,I!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=X;try{b(p)}catch(ie){$c(ie)}p.currentTarget=null,b=I}else for(E=0;E<u.length;E++){if(k=u[E],I=k.instance,X=k.currentTarget,k=k.listener,I!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=X;try{b(p)}catch(ie){$c(ie)}p.currentTarget=null,b=I}}}}function Ke(i,r){var l=r[Vl];l===void 0&&(l=r[Vl]=new Set);var u=i+"__bubble";l.has(u)||(Mx(r,i,2,!1),l.add(u))}function zh(i,r,l){var u=0;r&&(u|=4),Mx(l,i,u,r)}var ku="_reactListening"+Math.random().toString(36).slice(2);function Bh(i){if(!i[ku]){i[ku]=!0,Ac.forEach(function(l){l!=="selectionchange"&&(oN.has(l)||zh(l,!1,i),zh(l,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[ku]||(r[ku]=!0,zh("selectionchange",!1,r))}}function Mx(i,r,l,u){switch(lv(r)){case 2:var p=IN;break;case 8:p=zN;break;default:p=Jh}l=p.bind(null,r,l,i),p=void 0,!ad||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 Uh(i,r,l,u,p){var b=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var E=u.tag;if(E===3||E===4){var k=u.stateNode.containerInfo;if(k===p)break;if(E===4)for(E=u.return;E!==null;){var I=E.tag;if((I===3||I===4)&&E.stateNode.containerInfo===p)return;E=E.return}for(;k!==null;){if(E=vn(k),E===null)return;if(I=E.tag,I===5||I===6||I===26||I===27){u=b=E;continue e}k=k.parentNode}}u=u.return}jc(function(){var X=b,ie=Ie(l),se=[];e:{var W=fb.get(i);if(W!==void 0){var ee=zc,ye=i;switch(i){case"keypress":if(Lc(l)===0)break e;case"keydown":case"keyup":ee=t_;break;case"focusin":ye="focus",ee=od;break;case"focusout":ye="blur",ee=od;break;case"beforeblur":case"afterblur":ee=od;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=qw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=a_;break;case lb:case ob:case cb:ee=Gw;break;case ub:ee=s_;break;case"scroll":case"scrollend":ee=Fw;break;case"wheel":ee=o_;break;case"copy":case"cut":case"paste":ee=Yw;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=u_}var Ae=(r&4)!==0,pt=!Ae&&(i==="scroll"||i==="scrollend"),G=Ae?W!==null?W+"Capture":null:W;Ae=[];for(var $=X,V;$!==null;){var re=$;if(V=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||V===null||G===null||(re=to($,G),re!=null&&Ae.push(Lo($,re,V))),pt)break;$=$.return}0<Ae.length&&(W=new ee(W,ye,null,l,ie),se.push({event:W,listeners:Ae}))}}if((r&7)===0){e:{if(W=i==="mouseover"||i==="pointerover",ee=i==="mouseout"||i==="pointerout",W&&l!==Ee&&(ye=l.relatedTarget||l.fromElement)&&(vn(ye)||ye[Ma]))break e;if((ee||W)&&(W=ie.window===ie?ie:(W=ie.ownerDocument)?W.defaultView||W.parentWindow:window,ee?(ye=l.relatedTarget||l.toElement,ee=X,ye=ye?vn(ye):null,ye!==null&&(pt=o(ye),Ae=ye.tag,ye!==pt||Ae!==5&&Ae!==27&&Ae!==6)&&(ye=null)):(ee=null,ye=X),ee!==ye)){if(Ae=$g,re="onMouseLeave",G="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Ae=Pg,re="onPointerLeave",G="onPointerEnter",$="pointer"),pt=ee==null?W:ja(ee),V=ye==null?W:ja(ye),W=new Ae(re,$+"leave",ee,l,ie),W.target=pt,W.relatedTarget=V,re=null,vn(ie)===X&&(Ae=new Ae(G,$+"enter",ye,l,ie),Ae.target=V,Ae.relatedTarget=pt,re=Ae),pt=re,ee&&ye)t:{for(Ae=cN,G=ee,$=ye,V=0,re=G;re;re=Ae(re))V++;re=0;for(var ke=$;ke;ke=Ae(ke))re++;for(;0<V-re;)G=Ae(G),V--;for(;0<re-V;)$=Ae($),re--;for(;V--;){if(G===$||$!==null&&G===$.alternate){Ae=G;break t}G=Ae(G),$=Ae($)}Ae=null}else Ae=null;ee!==null&&jx(se,W,ee,Ae,!1),ye!==null&&pt!==null&&jx(se,pt,ye,Ae,!0)}}e:{if(W=X?ja(X):window,ee=W.nodeName&&W.nodeName.toLowerCase(),ee==="select"||ee==="input"&&W.type==="file")var tt=Xg;else if(Yg(W))if(Zg)tt=v_;else{tt=y_;var Se=b_}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?X&&La(X.elementType)&&(tt=Xg):tt=x_;if(tt&&(tt=tt(i,X))){Vg(se,tt,l,ie);break e}Se&&Se(i,W,X),i==="focusout"&&X&&W.type==="number"&&X.memoizedProps.value!=null&&ks(W,"number",W.value)}switch(Se=X?ja(X):window,i){case"focusin":(Yg(Se)||Se.contentEditable==="true")&&(As=Se,md=X,co=null);break;case"focusout":co=md=As=null;break;case"mousedown":pd=!0;break;case"contextmenu":case"mouseup":case"dragend":pd=!1,rb(se,l,ie);break;case"selectionchange":if(S_)break;case"keydown":case"keyup":rb(se,l,ie)}var Be;if(ud)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,rd="value"in za?za.value:za.textContent,Cs=!0)),Se=Tu(X,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=d_?h_(i,l):m_(i,l))&&(Ve=Tu(X,"onBeforeInput"),0<Ve.length&&(Se=new Fg("onBeforeInput","beforeinput",null,l,ie),se.push({event:Se,listeners:Ve}),Se.data=Be)),rN(se,i,X,l,ie)}Rx(se,r)})}function Lo(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=to(i,l),p!=null&&u.unshift(Lo(i,p,b)),p=to(i,r),p!=null&&u.push(Lo(i,p,b))),i.tag===3)return u;i=i.return}return[]}function cN(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,I=k.alternate,X=k.stateNode;if(k=k.tag,I!==null&&I===u)break;k!==5&&k!==26&&k!==27||X===null||(I=X,p?(X=to(l,b),X!=null&&E.unshift(Lo(l,X,I))):p||(X=to(l,b),X!=null&&E.push(Lo(l,X,I)))),l=l.return}E.length!==0&&i.push({event:r,listeners:E})}var uN=/\r\n?/g,fN=/\u0000|\uFFFD/g;function Dx(i){return(typeof i=="string"?i:""+i).replace(uN,`
49
- `).replace(fN,"")}function Lx(i,r){return r=Dx(r),Dx(i)===r}function mt(i,r,l,u,p,b){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Re(i,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Re(i,""+u);break;case"className":Qn(i,"class",u);break;case"tabIndex":Qn(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Qn(i,l,u);break;case"style":ct(i,u,b);break;case"data":if(r!=="object"){Qn(i,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){i.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=Ia(""+u),i.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){i.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(l==="formAction"?(r!=="input"&&mt(i,r,"name",p.name,p,null),mt(i,r,"formEncType",p.formEncType,p,null),mt(i,r,"formMethod",p.formMethod,p,null),mt(i,r,"formTarget",p.formTarget,p,null)):(mt(i,r,"encType",p.encType,p,null),mt(i,r,"method",p.method,p,null),mt(i,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=Ia(""+u),i.setAttribute(l,u);break;case"onClick":u!=null&&(i.onclick=de);break;case"onScroll":u!=null&&Ke("scroll",i);break;case"onScrollEnd":u!=null&&Ke("scrollend",i);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"multiple":i.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":i.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){i.removeAttribute("xlink:href");break}l=Ia(""+u),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""+u):i.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":u===!0?i.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,u):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?i.setAttribute(l,u):i.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?i.removeAttribute(l):i.setAttribute(l,u);break;case"popover":Ke("beforetoggle",i),Ke("toggle",i),dn(i,"popover",u);break;case"xlinkActuate":An(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":An(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":An(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":An(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":An(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":An(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":An(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":An(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":An(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":dn(i,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=aa.get(l)||l,dn(i,l,u))}}function $h(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"?Re(i,u):(typeof u=="number"||typeof u=="bigint")&&Re(i,""+u);break;case"onScroll":u!=null&&Ke("scroll",i);break;case"onScrollEnd":u!=null&&Ke("scrollend",i);break;case"onClick":u!=null&&(i.onclick=de);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Or.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),r=l.slice(2,p?l.length-7:void 0),b=i[fn]||null,b=b!=null?b[l]:null,typeof b=="function"&&i.removeEventListener(r,b,p),typeof u=="function")){typeof b!="function"&&b!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(r,u,p);break e}l in i?i[l]=u:u===!0?i.setAttribute(l,""):dn(i,l,u)}}}function cn(i,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",i),Ke("load",i);var u=!1,p=!1,b;for(b in l)if(l.hasOwnProperty(b)){var E=l[b];if(E!=null)switch(b){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,b,E,l,null)}}p&&mt(i,r,"srcSet",l.srcSet,l,null),u&&mt(i,r,"src",l.src,l,null);return;case"input":Ke("invalid",i);var k=b=E=p=null,I=null,X=null;for(u in l)if(l.hasOwnProperty(u)){var ie=l[u];if(ie!=null)switch(u){case"name":p=ie;break;case"type":E=ie;break;case"checked":I=ie;break;case"defaultChecked":X=ie;break;case"value":b=ie;break;case"defaultValue":k=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,r));break;default:mt(i,r,u,ie,l,null)}}Rr(i,b,k,I,X,E,p,!1);return;case"select":Ke("invalid",i),u=E=b=null;for(p in l)if(l.hasOwnProperty(p)&&(k=l[p],k!=null))switch(p){case"value":b=k;break;case"defaultValue":E=k;break;case"multiple":u=k;default:mt(i,r,p,k,l,null)}r=b,l=E,i.multiple=!!u,r!=null?rn(i,!!u,r,!1):l!=null&&rn(i,!!u,l,!0);return;case"textarea":Ke("invalid",i),b=p=u=null;for(E in l)if(l.hasOwnProperty(E)&&(k=l[E],k!=null))switch(E){case"value":u=k;break;case"defaultValue":p=k;break;case"children":b=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(a(91));break;default:mt(i,r,E,k,l,null)}Ts(i,u,p,b);return;case"option":for(I in l)if(l.hasOwnProperty(I)&&(u=l[I],u!=null))switch(I){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:mt(i,r,I,u,l,null)}return;case"dialog":Ke("beforetoggle",i),Ke("toggle",i),Ke("cancel",i),Ke("close",i);break;case"iframe":case"object":Ke("load",i);break;case"video":case"audio":for(u=0;u<Do.length;u++)Ke(Do[u],i);break;case"image":Ke("error",i),Ke("load",i);break;case"details":Ke("toggle",i);break;case"embed":case"source":case"link":Ke("error",i),Ke("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in l)if(l.hasOwnProperty(X)&&(u=l[X],u!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,X,u,l,null)}return;default:if(La(r)){for(ie in l)l.hasOwnProperty(ie)&&(u=l[ie],u!==void 0&&$h(i,r,ie,u,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(u=l[k],u!=null&&mt(i,r,k,u,l,null))}function dN(i,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,E=null,k=null,I=null,X=null,ie=null;for(ee in l){var se=l[ee];if(l.hasOwnProperty(ee)&&se!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":I=se;default:u.hasOwnProperty(ee)||mt(i,r,ee,null,u,se)}}for(var W in u){var ee=u[W];if(se=l[W],u.hasOwnProperty(W)&&(ee!=null||se!=null))switch(W){case"type":b=ee;break;case"name":p=ee;break;case"checked":X=ee;break;case"defaultChecked":ie=ee;break;case"value":E=ee;break;case"defaultValue":k=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,r));break;default:ee!==se&&mt(i,r,W,ee,u,se)}}Wl(i,E,k,I,X,ie,b,p);return;case"select":ee=E=k=W=null;for(b in l)if(I=l[b],l.hasOwnProperty(b)&&I!=null)switch(b){case"value":break;case"multiple":ee=I;default:u.hasOwnProperty(b)||mt(i,r,b,null,u,I)}for(p in u)if(b=u[p],I=l[p],u.hasOwnProperty(p)&&(b!=null||I!=null))switch(p){case"value":W=b;break;case"defaultValue":k=b;break;case"multiple":E=b;default:b!==I&&mt(i,r,p,b,u,I)}r=k,l=E,u=ee,W!=null?rn(i,!!l,W,!1):!!u!=!!l&&(r!=null?rn(i,!!l,r,!0):rn(i,!!l,l?[]:"",!1));return;case"textarea":ee=W=null;for(k in l)if(p=l[k],l.hasOwnProperty(k)&&p!=null&&!u.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:mt(i,r,k,null,u,p)}for(E in u)if(p=u[E],b=l[E],u.hasOwnProperty(E)&&(p!=null||b!=null))switch(E){case"value":W=p;break;case"defaultValue":ee=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==b&&mt(i,r,E,p,u,b)}Rc(i,W,ee);return;case"option":for(var ye in l)if(W=l[ye],l.hasOwnProperty(ye)&&W!=null&&!u.hasOwnProperty(ye))switch(ye){case"selected":i.selected=!1;break;default:mt(i,r,ye,null,u,W)}for(I in u)if(W=u[I],ee=l[I],u.hasOwnProperty(I)&&W!==ee&&(W!=null||ee!=null))switch(I){case"selected":i.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:mt(i,r,I,W,u,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in l)W=l[Ae],l.hasOwnProperty(Ae)&&W!=null&&!u.hasOwnProperty(Ae)&&mt(i,r,Ae,null,u,W);for(X in u)if(W=u[X],ee=l[X],u.hasOwnProperty(X)&&W!==ee&&(W!=null||ee!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,r));break;default:mt(i,r,X,W,u,ee)}return;default:if(La(r)){for(var pt in l)W=l[pt],l.hasOwnProperty(pt)&&W!==void 0&&!u.hasOwnProperty(pt)&&$h(i,r,pt,void 0,u,W);for(ie in u)W=u[ie],ee=l[ie],!u.hasOwnProperty(ie)||W===ee||W===void 0&&ee===void 0||$h(i,r,ie,W,u,ee);return}}for(var G in l)W=l[G],l.hasOwnProperty(G)&&W!=null&&!u.hasOwnProperty(G)&&mt(i,r,G,null,u,W);for(se in u)W=u[se],ee=l[se],!u.hasOwnProperty(se)||W===ee||W==null&&ee==null||mt(i,r,se,W,u,ee)}function Ix(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hN(){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 I=l[u],X=I.startTime;if(X>k)break;var ie=I.transferSize,se=I.initiatorType;ie&&Ix(se)&&(I=I.responseEnd,E+=ie*(I<k?1:(k-X)/(I-X)))}if(--u,r+=8*(b+E)/(p.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Fh=null,Ph=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 qh(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 Hh=null;function mN(){var i=window.event;return i&&i.type==="popstate"?i===Hh?!1:(Hh=i,!0):(Hh=null,!1)}var Ux=typeof setTimeout=="function"?setTimeout:void 0,pN=typeof clearTimeout=="function"?clearTimeout:void 0,$x=typeof Promise=="function"?Promise:void 0,gN=typeof queueMicrotask=="function"?queueMicrotask:typeof $x<"u"?function(i){return $x.resolve(null).then(i).catch(bN)}:Ux;function bN(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")Io(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Io(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"&&Io(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 Kh(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":Kh(l),Xl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function yN(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 xN(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 Gh(i){return i.data==="$?"||i.data==="$~"}function Qh(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function vN(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 Yh=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 Io(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);Xl(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=oe.d;oe.d={f:EN,r:SN,D:wN,C:_N,L:NN,m:kN,X:CN,S:TN,M:AN};function EN(){var i=va.f(),r=vu();return i||r}function SN(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 wN(i){va.D(i),Yx("dns-prefetch",i,null)}function _N(i,r){va.C(i,r),Yx("preconnect",i,r)}function NN(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(zo(b))||r==="script"&&u.querySelector(Bo(b))||(r=u.createElement("link"),cn(r,"link",i),Ht(r),u.head.appendChild(r)))}}function kN(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(Bo(b)))return}u=l.createElement("link"),cn(u,"link",i),Ht(u),l.head.appendChild(u)}}}function TN(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(zo(b)))k.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":r},l),(l=gi.get(b))&&Vh(i,l);var I=E=u.createElement("link");Ht(I),cn(I,"link",i),I._p=new Promise(function(X,ie){I.onload=X,I.onerror=ie}),I.addEventListener("load",function(){k.loading|=1}),I.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Ou(E,r,u)}E={type:"stylesheet",instance:E,count:1,state:k},p.set(b,E)}}}function CN(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(Bo(p)),b||(i=g({src:i,async:!0},r),(r=gi.get(p))&&Xh(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 AN(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(Bo(p)),b||(i=g({src:i,async:!0,type:"module"},r),(r=gi.get(p))&&Xh(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(zo(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||ON(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 zo(i){return'link[rel="stylesheet"]['+i+"]"}function Xx(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function ON(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 Bo(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(zo(p));if(b)return r.state.loading|=4,r.instance=b,Ht(b),b;u=Xx(l),(p=gi.get(p))&&Vh(u,p),b=(i.ownerDocument||i).createElement("link"),Ht(b);var E=b;return E._p=new Promise(function(k,I){E.onload=k,E.onerror=I}),cn(b,"link",u),r.state.loading|=4,Ou(b,l.precedence,i),r.instance=b;case"script":return b=tl(l.src),(p=i.querySelector(Bo(b)))?(r.instance=p,Ht(p),p):(u=l,(p=gi.get(b))&&(u=g({},l),Xh(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 Vh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function Xh(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 RN(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 MN(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(zo(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))&&Vh(u,p),b=b.createElement("link"),Ht(b);var E=b;E._p=new Promise(function(k,I){E.onload=k,E.onerror=I}),cn(b,"link",u),l.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=Mu.bind(i),r.addEventListener("load",l),r.addEventListener("error",l))}}var Zh=0;function jN(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&&Zh===0&&(Zh=62500*hN());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>Zh?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(DN,i),ju=null,Mu.call(i))}function DN(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 Uo={$$typeof:A,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function LN(i,r,l,u,p,b,E,k,I){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wt(0),this.hiddenUpdates=wt(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function tv(i,r,l,u,p,b,E,k,I,X,ie,se){return i=new LN(i,r,l,E,I,X,ie,se,k),r=1,b===!0&&(r|=24),b=Xn(3,null,null,r),i.current=b,b.stateNode=i,r=Od(),r.refCount++,i.pooledCache=r,r.refCount++,b.memoizedState={element:u,isDehydrated:l,cache:r},Dd(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),bo(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 Wh(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),Wh(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),Wh(i,r)}}var Lu=!0;function IN(i,r,l,u){var p=K.T;K.T=null;var b=oe.p;try{oe.p=2,Jh(i,r,l,u)}finally{oe.p=b,K.T=p}}function zN(i,r,l,u){var p=K.T;K.T=null;var b=oe.p;try{oe.p=8,Jh(i,r,l,u)}finally{oe.p=b,K.T=p}}function Jh(i,r,l,u){if(Lu){var p=em(u);if(p===null)Uh(i,r,u,Iu,l),ov(i,u);else if(UN(p,i,r,l,u))u.stopPropagation();else if(ov(i,u),r&4&&-1<BN.indexOf(i)){for(;p!==null;){var b=na(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=Cn(b.pendingLanes);if(E!==0){var k=b;for(k.pendingLanes|=2,k.entangledLanes|=2;E;){var I=1<<31-lt(E);k.entanglements[1]|=I,E&=~I}qi(b),(at&6)===0&&(yu=Ot()+500,jo(0))}}break;case 31:case 13:k=Lr(b,2),k!==null&&In(k,b,2),vu(),Wh(b,2)}if(b=em(u),b===null&&Uh(i,r,u,Iu,l),b===p)break;p=b}p!==null&&u.stopPropagation()}else Uh(i,r,u,null,l)}}function em(i){return i=Ie(i),tm(i)}var Iu=null;function tm(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 nm=!1,tr=null,nr=null,ir=null,$o=new Map,Fo=new Map,ar=[],BN="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":$o.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fo.delete(r.pointerId)}}function Po(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 UN(i,r,l,u,p){switch(r){case"focusin":return tr=Po(tr,i,r,l,u,p),!0;case"dragenter":return nr=Po(nr,i,r,l,u,p),!0;case"mouseover":return ir=Po(ir,i,r,l,u,p),!0;case"pointerover":var b=p.pointerId;return $o.set(b,Po($o.get(b)||null,i,r,l,u,p)),!0;case"gotpointercapture":return b=p.pointerId,Fo.set(b,Po(Fo.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=em(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 $N(){nm=!1,tr!==null&&zu(tr)&&(tr=null),nr!==null&&zu(nr)&&(nr=null),ir!==null&&zu(ir)&&(ir=null),$o.forEach(uv),Fo.forEach(uv)}function Bu(i,r){i.blockedOn===r&&(i.blockedOn=null,nm||(nm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$N)))}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(tm(u||l)===null)continue;break}var b=na(l);b!==null&&(i.splice(r,3),r-=3,eh(b,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function nl(i){function r(I){return Bu(I,i)}tr!==null&&Bu(tr,i),nr!==null&&Bu(nr,i),ir!==null&&Bu(ir,i),$o.forEach(r),Fo.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(tm(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 im(i){this._internalRoot=i}$u.prototype.render=im.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=im.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"));oe.findDOMNode=function(i){var r=i._reactInternals;if(r===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=h(r),i=i!==null?y(i):null,i=i===null?null:i.stateNode,i};var FN={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(FN),Dt=Fu}catch{}}return Ho.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,Bh(i),new im(r)},Ho.hydrateRoot=function(i,r,l){if(!s(i))throw Error(a(299));var u=!1,p="",b=vy,E=Ey,k=Sy,I=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(b=l.onUncaughtError),l.onCaughtError!==void 0&&(E=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(I=l.formState)),r=tv(i,1,!0,r,l??null,u,p,I,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,Bh(i),new $u(r)},Ho.version="19.2.5",Ho}var Nv;function JN(){if(Nv)return lm.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(),lm.exports=WN(),lm.exports}var ek=JN(),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,tk=(oE=class extends jl{constructor(){super();_e(this,ts);_e(this,ur);_e(this,bl);ge(this,bl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,ur)||this.setEventListener(z(this,bl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,ur))==null||t.call(this),ge(this,ur,void 0))}setEventListener(t){var n;ge(this,bl,t),(n=z(this,ur))==null||n.call(this),ge(this,ur,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){z(this,ts)!==t&&(ge(this,ts,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof z(this,ts)=="boolean"?z(this,ts):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ts=new WeakMap,ur=new WeakMap,bl=new WeakMap,oE),Op=new tk,nk={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fr,Tp,cE,ik=(cE=class{constructor(){_e(this,fr,nk);_e(this,Tp,!1)}setTimeoutProvider(e){ge(this,fr,e)}setTimeout(e,t){return z(this,fr).setTimeout(e,t)}clearTimeout(e){z(this,fr).clearTimeout(e)}setInterval(e,t){return z(this,fr).setInterval(e,t)}clearInterval(e){z(this,fr).clearInterval(e)}},fr=new WeakMap,Tp=new WeakMap,cE),Zr=new ik;function ak(e){setTimeout(e,0)}var rk=typeof window>"u"||"Deno"in globalThis;function _n(){}function sk(e,t){return typeof e=="function"?e(t):e}function Hm(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!==Rp(c,t.options))return!1}else if(!ac(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(!ac(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function Rp(e,t){return((t==null?void 0:t.queryKeyHashFn)||us)(e)}function us(e){return JSON.stringify(e,(t,n)=>Km(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function ac(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ac(e[n],t[n])):!1}var lk=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&&!(Km(e)&&Km(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:lk.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 Km(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 ok(e){return new Promise(t=>{Zr.setTimeout(t,e)})}function Gm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?vE(e,t):t}function ck(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function uk(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var Mp=Symbol();function EE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Mp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function jp(e,t){return typeof e=="function"?e(...t):!!e}function fk(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 rc=(()=>{let e=()=>rk;return{isServer(){return e()},setIsServer(t){e=t}}})();function Qm(){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 dk=ak;function hk(){let e=[],t=0,n=f=>{f()},a=f=>{f()},s=dk;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=hk(),yl,dr,xl,uE,mk=(uE=class extends jl{constructor(){super();_e(this,yl,!0);_e(this,dr);_e(this,xl);ge(this,xl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}})}onSubscribe(){z(this,dr)||this.setEventListener(z(this,xl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,dr))==null||t.call(this),ge(this,dr,void 0))}setEventListener(t){var n;ge(this,xl,t),(n=z(this,dr))==null||n.call(this),ge(this,dr,t(this.setOnline.bind(this)))}setOnline(t){z(this,yl)!==t&&(ge(this,yl,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return z(this,yl)}},yl=new WeakMap,dr=new WeakMap,xl=new WeakMap,uE),gf=new mk;function pk(e){return Math.min(1e3*2**e,3e4)}function SE(e){return(e??"online")==="online"?gf.isOnline():!0}var Ym=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wE(e){let t=!1,n=0,a;const s=Qm(),o=()=>s.status!=="pending",c=w=>{var N;if(!o()){const _=new Ym(w);x(_),(N=e.onCancel)==null||N.call(e,_)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>Op.isFocused()&&(e.networkMode==="always"||gf.isOnline())&&e.canRun(),y=()=>SE(e.networkMode)&&e.canRun(),g=w=>{o()||(a==null||a(),s.resolve(w))},x=w=>{o()||(a==null||a(),s.reject(w))},v=()=>new Promise(w=>{var N;a=_=>{(o()||h())&&w(_)},(N=e.onPause)==null||N.call(e)}).then(()=>{var w;a=void 0,o()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(o())return;let w;const N=n===0?e.initialPromise:void 0;try{w=N??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{var M;if(o())return;const R=e.retry??(rc.isServer()?0:3),A=e.retryDelay??pk,D=typeof A=="function"?A(n,_):A,F=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,_);if(t||!F){x(_);return}n++,(M=e.onFail)==null||M.call(e,n,_),ok(D).then(()=>h()?void 0:v()).then(()=>{t?x(_):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,_E=(fE=class{constructor(){_e(this,ns)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hm(this.gcTime)&&ge(this,ns,Zr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(rc.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,ns)!==void 0&&(Zr.clearTimeout(z(this,ns)),ge(this,ns,void 0))}},ns=new WeakMap,fE),is,vl,bi,as,nn,dc,rs,ii,NE,Ea,dE,gk=(dE=class extends _E{constructor(t){super();_e(this,ii);_e(this,is);_e(this,vl);_e(this,bi);_e(this,as);_e(this,nn);_e(this,dc);_e(this,rs);ge(this,rs,!1),ge(this,dc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,as,t.client),ge(this,bi,z(this,as).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,is,Rv(this.options)),this.state=t.state??z(this,is),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,nn))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,dc),...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"&&z(this,bi).remove(this)}setData(t,n){const a=Gm(this.state.data,t,this.options);return Ue(this,ii,Ea).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){Ue(this,ii,Ea).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=z(this,nn))==null?void 0:a.promise;return(s=z(this,nn))==null||s.cancel(t),n?n.then(_n).catch(_n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,is)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>yi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mp||!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=z(this,nn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,nn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,bi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(z(this,nn)&&(z(this,rs)||Ue(this,ii,NE).call(this)?z(this,nn).cancel({revert:!0}):z(this,nn).cancelRetry()),this.scheduleGc()),z(this,bi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,ii,Ea).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,y,g,x,v,S,w,N,_,R,A;if(this.state.fetchStatus!=="idle"&&((d=z(this,nn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,nn))return z(this,nn).continueRetry(),z(this,nn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(F=>F.options.queryFn);D&&this.setOptions(D.options)}const a=new AbortController,s=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(ge(this,rs,!0),a.signal)})},o=()=>{const D=EE(this.options,n),M=(()=>{const H={client:z(this,as),queryKey:this.queryKey,meta:this.meta};return s(H),H})();return ge(this,rs,!1),this.options.persister?this.options.persister(D,M,this):D(M)},f=(()=>{const D={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,as),state:this.state,fetchFn:o};return s(D),D})();(h=this.options.behavior)==null||h.onFetch(f,this),ge(this,vl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=f.fetchOptions)==null?void 0:y.meta))&&Ue(this,ii,Ea).call(this,{type:"fetch",meta:(g=f.fetchOptions)==null?void 0:g.meta}),ge(this,nn,wE({initialPromise:n==null?void 0:n.initialPromise,fn:f.fetchFn,onCancel:D=>{D instanceof Ym&&D.revert&&this.setState({...z(this,vl),fetchStatus:"idle"}),a.abort()},onFail:(D,F)=>{Ue(this,ii,Ea).call(this,{type:"failed",failureCount:D,error:F})},onPause:()=>{Ue(this,ii,Ea).call(this,{type:"pause"})},onContinue:()=>{Ue(this,ii,Ea).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const D=await z(this,nn).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(v=(x=z(this,bi).config).onSuccess)==null||v.call(x,D,this),(w=(S=z(this,bi).config).onSettled)==null||w.call(S,D,this.state.error,this),D}catch(D){if(D instanceof Ym){if(D.silent)return z(this,nn).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw Ue(this,ii,Ea).call(this,{type:"error",error:D}),(_=(N=z(this,bi).config).onError)==null||_.call(N,D,this),(A=(R=z(this,bi).config).onSettled)==null||A.call(R,this.state.data,D,this),D}finally{this.scheduleGc()}}},is=new WeakMap,vl=new WeakMap,bi=new WeakMap,as=new WeakMap,nn=new WeakMap,dc=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()}),z(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,hc,Sn,ss,El,Sa,hr,mc,Sl,wl,ls,os,mr,_l,rt,Wo,Vm,Xm,Zm,Wm,Jm,ep,tp,TE,hE,bk=(hE=class extends jl{constructor(t,n){super();_e(this,rt);_e(this,Un);_e(this,We);_e(this,hc);_e(this,Sn);_e(this,ss);_e(this,El);_e(this,Sa);_e(this,hr);_e(this,mc);_e(this,Sl);_e(this,wl);_e(this,ls);_e(this,os);_e(this,mr);_e(this,_l,new Set);this.options=n,ge(this,Un,t),ge(this,hr,null),ge(this,Sa,Qm()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,We).addObserver(this),Mv(z(this,We),this.options)?Ue(this,rt,Wo).call(this):this.updateResult(),Ue(this,rt,Wm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return np(z(this,We),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return np(z(this,We),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,rt,Jm).call(this),Ue(this,rt,ep).call(this),z(this,We).removeObserver(this)}setOptions(t){const n=this.options,a=z(this,We);if(this.options=z(this,Un).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,z(this,We))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,rt,tp).call(this),z(this,We).setOptions(this.options),n._defaulted&&!pf(this.options,n)&&z(this,Un).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,We),observer:this});const s=this.hasListeners();s&&jv(z(this,We),a,this.options,n)&&Ue(this,rt,Wo).call(this),this.updateResult(),s&&(z(this,We)!==a||yi(this.options.enabled,z(this,We))!==yi(n.enabled,z(this,We))||xr(this.options.staleTime,z(this,We))!==xr(n.staleTime,z(this,We)))&&Ue(this,rt,Vm).call(this);const o=Ue(this,rt,Xm).call(this);s&&(z(this,We)!==a||yi(this.options.enabled,z(this,We))!==yi(n.enabled,z(this,We))||o!==z(this,mr))&&Ue(this,rt,Zm).call(this,o)}getOptimisticResult(t){const n=z(this,Un).getQueryCache().build(z(this,Un),t),a=this.createResult(n,t);return xk(this,a)&&(ge(this,Sn,a),ge(this,El,this.options),ge(this,ss,z(this,We).state)),a}getCurrentResult(){return z(this,Sn)}trackResult(t,n){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Sa).status==="pending"&&z(this,Sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){z(this,_l).add(t)}getCurrentQuery(){return z(this,We)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=z(this,Un).defaultQueryOptions(t),a=z(this,Un).getQueryCache().build(z(this,Un),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return Ue(this,rt,Wo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,Sn)))}createResult(t,n){var J;const a=z(this,We),s=this.options,o=z(this,Sn),c=z(this,ss),f=z(this,El),h=t!==a?t.state:z(this,hc),{state:y}=t;let g={...y},x=!1,v;if(n._optimisticResults){const C=this.hasListeners(),P=!C&&Mv(t,n),Y=C&&jv(t,a,n,s);(P||Y)&&(g={...g,...kE(y.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:S,errorUpdatedAt:w,status:N}=g;v=g.data;let _=!1;if(n.placeholderData!==void 0&&v===void 0&&N==="pending"){let C;o!=null&&o.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(C=o.data,_=!0):C=typeof n.placeholderData=="function"?n.placeholderData((J=z(this,wl))==null?void 0:J.state.data,z(this,wl)):n.placeholderData,C!==void 0&&(N="success",v=Gm(o==null?void 0:o.data,C,n),x=!0)}if(n.select&&v!==void 0&&!_)if(o&&v===(c==null?void 0:c.data)&&n.select===z(this,mc))v=z(this,Sl);else try{ge(this,mc,n.select),v=n.select(v),v=Gm(o==null?void 0:o.data,v,n),ge(this,Sl,v),ge(this,hr,null)}catch(C){ge(this,hr,C)}z(this,hr)&&(S=z(this,hr),v=z(this,Sl),w=Date.now(),N="error");const R=g.fetchStatus==="fetching",A=N==="pending",D=N==="error",F=A&&R,M=v!==void 0,U={status:N,fetchStatus:g.fetchStatus,isPending:A,isSuccess:N==="success",isError:D,isInitialLoading:F,isLoading:F,data:v,dataUpdatedAt:g.dataUpdatedAt,error:S,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:D&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:D&&M,isStale:Dp(t,n),refetch:this.refetch,promise:z(this,Sa),isEnabled:yi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=U.data!==void 0,P=U.status==="error"&&!C,Y=Q=>{P?Q.reject(U.error):C&&Q.resolve(U.data)},le=()=>{const Q=ge(this,Sa,U.promise=Qm());Y(Q)},q=z(this,Sa);switch(q.status){case"pending":t.queryHash===a.queryHash&&Y(q);break;case"fulfilled":(P||U.data!==q.value)&&le();break;case"rejected":(!P||U.error!==q.reason)&&le();break}}return U}updateResult(){const t=z(this,Sn),n=this.createResult(z(this,We),this.options);if(ge(this,ss,z(this,We).state),ge(this,El,this.options),z(this,ss).data!==void 0&&ge(this,wl,z(this,We)),pf(n,t))return;ge(this,Sn,n);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!z(this,_l).size)return!0;const c=new Set(o??z(this,_l));return this.options.throwOnError&&c.add("error"),Object.keys(z(this,Sn)).some(f=>{const d=f;return z(this,Sn)[d]!==t[d]&&c.has(d)})};Ue(this,rt,TE).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,rt,Wm).call(this)}},Un=new WeakMap,We=new WeakMap,hc=new WeakMap,Sn=new WeakMap,ss=new WeakMap,El=new WeakMap,Sa=new WeakMap,hr=new WeakMap,mc=new WeakMap,Sl=new WeakMap,wl=new WeakMap,ls=new WeakMap,os=new WeakMap,mr=new WeakMap,_l=new WeakMap,rt=new WeakSet,Wo=function(t){Ue(this,rt,tp).call(this);let n=z(this,We).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(_n)),n},Vm=function(){Ue(this,rt,Jm).call(this);const t=xr(this.options.staleTime,z(this,We));if(rc.isServer()||z(this,Sn).isStale||!Hm(t))return;const a=xE(z(this,Sn).dataUpdatedAt,t)+1;ge(this,ls,Zr.setTimeout(()=>{z(this,Sn).isStale||this.updateResult()},a))},Xm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,We)):this.options.refetchInterval)??!1},Zm=function(t){Ue(this,rt,ep).call(this),ge(this,mr,t),!(rc.isServer()||yi(this.options.enabled,z(this,We))===!1||!Hm(z(this,mr))||z(this,mr)===0)&&ge(this,os,Zr.setInterval(()=>{(this.options.refetchIntervalInBackground||Op.isFocused())&&Ue(this,rt,Wo).call(this)},z(this,mr)))},Wm=function(){Ue(this,rt,Vm).call(this),Ue(this,rt,Zm).call(this,Ue(this,rt,Xm).call(this))},Jm=function(){z(this,ls)!==void 0&&(Zr.clearTimeout(z(this,ls)),ge(this,ls,void 0))},ep=function(){z(this,os)!==void 0&&(Zr.clearInterval(z(this,os)),ge(this,os,void 0))},tp=function(){const t=z(this,Un).getQueryCache().build(z(this,Un),this.options);if(t===z(this,We))return;const n=z(this,We);ge(this,We,t),ge(this,hc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},TE=function(t){en.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(z(this,Sn))}),z(this,Un).getQueryCache().notify({query:z(this,We),type:"observerResultsUpdated"})})},hE);function yk(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 yk(e,t)||e.state.data!==void 0&&np(e,t,t.refetchOnMount)}function np(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&&Dp(e,t)}return!1}function jv(e,t,n,a){return(e!==t||yi(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Dp(e,n)}function Dp(e,t){return yi(t.enabled,e)!==!1&&e.isStaleByTime(xr(t.staleTime,e))}function xk(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 w=!1;const N=A=>{fk(A,()=>t.signal,()=>w=!0)},_=EE(t.options,t.fetchOptions),R=async(A,D,F)=>{if(w)return Promise.reject();if(D==null&&A.pages.length)return Promise.resolve(A);const H=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:D,direction:F?"backward":"forward",meta:t.options.meta};return N(P),P})(),U=await _(H),{maxPages:J}=t.options,C=F?uk:ck;return{pages:C(A.pages,U,J),pageParams:C(A.pageParams,D,J)}};if(s&&o.length){const A=s==="backward",D=A?vk:Lv,F={pages:o,pageParams:c},M=D(a,F);f=await R(F,M,A)}else{const A=e??o.length;do{const D=d===0?c[0]??a.initialPageParam: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 w,N;return(N=(w=t.options).persister)==null?void 0:N.call(w,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 vk(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 pc,Gi,mn,cs,Qi,or,mE,Ek=(mE=class extends _E{constructor(t){super();_e(this,Qi);_e(this,pc);_e(this,Gi);_e(this,mn);_e(this,cs);ge(this,pc,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){z(this,Gi).includes(t)||(z(this,Gi).push(t),this.clearGcTimeout(),z(this,mn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,Gi,z(this,Gi).filter(n=>n!==t)),this.scheduleGc(),z(this,mn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Gi).length||(this.state.status==="pending"?this.scheduleGc():z(this,mn).remove(this))}continue(){var t;return((t=z(this,cs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,f,d,h,y,g,x,v,S,w,N,_,R,A,D,F,M,H;const n=()=>{Ue(this,Qi,or).call(this,{type:"continue"})},a={client:z(this,pc),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,cs,wE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(U,J)=>{Ue(this,Qi,or).call(this,{type:"failed",failureCount:U,error:J})},onPause:()=>{Ue(this,Qi,or).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,mn).canRun(this)}));const s=this.state.status==="pending",o=!z(this,cs).canStart();try{if(s)n();else{Ue(this,Qi,or).call(this,{type:"pending",variables:t,isPaused:o}),z(this,mn).config.onMutate&&await z(this,mn).config.onMutate(t,this,a);const J=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,a));J!==this.state.context&&Ue(this,Qi,or).call(this,{type:"pending",context:J,variables:t,isPaused:o})}const U=await z(this,cs).start();return await((h=(d=z(this,mn).config).onSuccess)==null?void 0:h.call(d,U,t,this.state.context,this,a)),await((g=(y=this.options).onSuccess)==null?void 0:g.call(y,U,t,this.state.context,a)),await((v=(x=z(this,mn).config).onSettled)==null?void 0:v.call(x,U,null,this.state.variables,this.state.context,this,a)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,U,null,t,this.state.context,a)),Ue(this,Qi,or).call(this,{type:"success",data:U}),U}catch(U){try{await((_=(N=z(this,mn).config).onError)==null?void 0:_.call(N,U,t,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((A=(R=this.options).onError)==null?void 0:A.call(R,U,t,this.state.context,a))}catch(J){Promise.reject(J)}try{await((F=(D=z(this,mn).config).onSettled)==null?void 0:F.call(D,void 0,U,this.state.variables,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((H=(M=this.options).onSettled)==null?void 0:H.call(M,void 0,U,t,this.state.context,a))}catch(J){Promise.reject(J)}throw Ue(this,Qi,or).call(this,{type:"error",error:U}),U}finally{z(this,mn).runNext(this)}}},pc=new WeakMap,Gi=new WeakMap,mn=new WeakMap,cs=new WeakMap,Qi=new WeakSet,or=function(t){const n=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),en.batch(()=>{z(this,Gi).forEach(a=>{a.onMutationUpdate(t)}),z(this,mn).notify({mutation:this,type:"updated",action:t})})},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 wa,Oi,gc,pE,Sk=(pE=class extends jl{constructor(t={}){super();_e(this,wa);_e(this,Oi);_e(this,gc);this.config=t,ge(this,wa,new Set),ge(this,Oi,new Map),ge(this,gc,0)}build(t,n,a){const s=new Ek({client:t,mutationCache:this,mutationId:++Pu(this,gc)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){z(this,wa).add(t);const n=qu(t);if(typeof n=="string"){const a=z(this,Oi).get(n);a?a.push(t):z(this,Oi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,wa).delete(t)){const n=qu(t);if(typeof n=="string"){const a=z(this,Oi).get(n);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&z(this,Oi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=qu(t);if(typeof n=="string"){const a=z(this,Oi).get(n),s=a==null?void 0:a.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var a;const n=qu(t);if(typeof n=="string"){const s=(a=z(this,Oi).get(n))==null?void 0:a.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){en.batch(()=>{z(this,wa).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,wa).clear(),z(this,Oi).clear()})}getAll(){return Array.from(z(this,wa))}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(_n))))}},wa=new WeakMap,Oi=new WeakMap,gc=new WeakMap,pE);function qu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var _a,pr,$n,Na,Ca,lf,ip,gE,wk=(gE=class extends jl{constructor(n,a){super();_e(this,Ca);_e(this,_a);_e(this,pr);_e(this,$n);_e(this,Na);ge(this,_a,n),this.setOptions(a),this.bindMethods(),Ue(this,Ca,lf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const a=this.options;this.options=z(this,_a).defaultMutationOptions(n),pf(this.options,a)||z(this,_a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,$n),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&us(a.mutationKey)!==us(this.options.mutationKey)?this.reset():((s=z(this,$n))==null?void 0:s.state.status)==="pending"&&z(this,$n).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=z(this,$n))==null||n.removeObserver(this)}onMutationUpdate(n){Ue(this,Ca,lf).call(this),Ue(this,Ca,ip).call(this,n)}getCurrentResult(){return z(this,pr)}reset(){var n;(n=z(this,$n))==null||n.removeObserver(this),ge(this,$n,void 0),Ue(this,Ca,lf).call(this),Ue(this,Ca,ip).call(this)}mutate(n,a){var s;return ge(this,Na,a),(s=z(this,$n))==null||s.removeObserver(this),ge(this,$n,z(this,_a).getMutationCache().build(z(this,_a),this.options)),z(this,$n).addObserver(this),z(this,$n).execute(n)}},_a=new WeakMap,pr=new WeakMap,$n=new WeakMap,Na=new WeakMap,Ca=new WeakSet,lf=function(){var a;const n=((a=z(this,$n))==null?void 0:a.state)??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})},ip=function(n){en.batch(()=>{var a,s,o,c,f,d,h,y;if(z(this,Na)&&this.hasListeners()){const g=z(this,pr).variables,x=z(this,pr).context,v={client:z(this,_a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=z(this,Na)).onSuccess)==null||s.call(a,n.data,g,x,v)}catch(S){Promise.reject(S)}try{(c=(o=z(this,Na)).onSettled)==null||c.call(o,n.data,null,g,x,v)}catch(S){Promise.reject(S)}}else if((n==null?void 0:n.type)==="error"){try{(d=(f=z(this,Na)).onError)==null||d.call(f,n.error,g,x,v)}catch(S){Promise.reject(S)}try{(y=(h=z(this,Na)).onSettled)==null||y.call(h,void 0,n.error,g,x,v)}catch(S){Promise.reject(S)}}}this.listeners.forEach(g=>{g(z(this,pr))})})},gE),Yi,bE,_k=(bE=class extends jl{constructor(t={}){super();_e(this,Yi);this.config=t,ge(this,Yi,new Map)}build(t,n,a){const s=n.queryKey,o=n.queryHash??Rp(s,n);let c=this.get(o);return c||(c=new gk({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(c)),c}add(t){z(this,Yi).has(t.queryHash)||(z(this,Yi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,Yi).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,Yi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){en.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Yi).get(t)}getAll(){return[...z(this,Yi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>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,Nk=(yE=class{constructor(e={}){_e(this,zt);_e(this,gr);_e(this,br);_e(this,Nl);_e(this,kl);_e(this,yr);_e(this,Tl);_e(this,Cl);ge(this,zt,e.queryCache||new _k),ge(this,gr,e.mutationCache||new Sk),ge(this,br,e.defaultOptions||{}),ge(this,Nl,new Map),ge(this,kl,new Map),ge(this,yr,0)}mount(){Pu(this,yr)._++,z(this,yr)===1&&(ge(this,Tl,Op.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,zt).onFocus())})),ge(this,Cl,gf.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,zt).onOnline())})))}unmount(){var e,t;Pu(this,yr)._--,z(this,yr)===0&&((e=z(this,Tl))==null||e.call(this),ge(this,Tl,void 0),(t=z(this,Cl))==null||t.call(this),ge(this,Cl,void 0))}isFetching(e){return z(this,zt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,gr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,zt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(this,zt).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(xr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return z(this,zt).findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),s=z(this,zt).get(a.queryHash),o=s==null?void 0:s.state.data,c=sk(t,o);if(c!==void 0)return z(this,zt).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return en.batch(()=>z(this,zt).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,zt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,zt);en.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,zt);return en.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=en.batch(()=>z(this,zt).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(_n).catch(_n)}invalidateQueries(e,t={}){return en.batch(()=>(z(this,zt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=en.batch(()=>z(this,zt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(_n)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(_n)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=z(this,zt).build(this,t);return n.isStaleByTime(xr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_n).catch(_n)}fetchInfiniteQuery(e){return e.behavior=Dv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_n).catch(_n)}ensureInfiniteQueryData(e){return e.behavior=Dv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gf.isOnline()?z(this,gr).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,zt)}getMutationCache(){return z(this,gr)}getDefaultOptions(){return z(this,br)}setDefaultOptions(e){ge(this,br,e)}setQueryDefaults(e,t){z(this,Nl).set(us(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,Nl).values()],n={};return t.forEach(a=>{ac(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){z(this,kl).set(us(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,kl).values()],n={};return t.forEach(a=>{ac(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,br).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Rp(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===Mp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,br).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,zt).clear(),z(this,gr).clear()}},zt=new WeakMap,gr=new WeakMap,br=new WeakMap,Nl=new WeakMap,kl=new WeakMap,yr=new WeakMap,Tl=new WeakMap,Cl=new WeakMap,yE),AE=j.createContext(void 0),Tn=e=>{const t=j.useContext(AE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},kk=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(AE.Provider,{value:e,children:t})),OE=j.createContext(!1),Tk=()=>j.useContext(OE);OE.Provider;function Ck(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ak=j.createContext(Ck()),Ok=()=>j.useContext(Ak),Rk=(e,t,n)=>{const a=n!=null&&n.state.error&&typeof e.throwOnError=="function"?jp(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},Mk=e=>{j.useEffect(()=>{e.clearReset()},[e])},jk=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||jp(n,[e.error,a])),Dk=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))}},Lk=(e,t)=>e.isLoading&&e.isFetching&&!t,Ik=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Iv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function zk(e,t,n){var x,v,S,w;const a=Tk(),s=Ok(),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",Dk(c),Rk(c,s,f),Mk(s);const d=!o.getQueryCache().get(c.queryHash),[h]=j.useState(()=>new t(o,c)),y=h.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(N=>{const _=g?h.subscribe(en.batchCalls(N)):_n;return h.updateResult(),_},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),j.useEffect(()=>{h.setOptions(c)},[c,h]),Ik(c,y))throw Iv(c,h,s);if(jk({result:y,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw y.error;if((w=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||w.call(S,c,y),c.experimental_prefetchInRender&&!rc.isServer()&&Lk(y,a)){const N=d?Iv(c,h,s):f==null?void 0:f.promise;N==null||N.catch(_n).finally(()=>{h.updateResult()})}return c.notifyOnChangeProps?y:h.trackResult(y)}function dt(e,t){return zk(e,bk)}function Pn(e,t){const n=Tn(),[a]=j.useState(()=>new wk(n,e));j.useEffect(()=>{a.setOptions(e)},[a,e]);const s=j.useSyncExternalStore(j.useCallback(c=>a.subscribe(en.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=j.useCallback((c,f)=>{a.mutate(c,f).catch(_n)},[a]);if(s.error&&jp(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/**
48
+ `+u.stack}}var zi=Object.prototype.hasOwnProperty,ea=e.unstable_scheduleCallback,kr=e.unstable_cancelCallback,Yl=e.unstable_shouldYield,ys=e.unstable_requestPaint,Ot=e.unstable_now,xs=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,fe=e.unstable_UserBlockingPriority,Ce=e.unstable_NormalPriority,Pe=e.unstable_LowPriority,et=e.unstable_IdlePriority,yn=e.log,Ni=e.unstable_setDisableYieldValue,an=null,Dt=null;function un(i){if(typeof yn=="function"&&Ni(i),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(an,i)}catch{}}var lt=Math.clz32?Math.clz32:kc,Bi=Math.log,xn=Math.LN2;function kc(i){return i>>>=0,i===0?32:31-(Bi(i)/xn|0)|0}var Tr=256,vs=262144,Cr=4194304;function Cn(i){var r=i&42;if(r!==0)return r;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function B(i,r,l){var u=i.pendingLanes;if(u===0)return 0;var p=0,b=i.suspendedLanes,E=i.pingedLanes;i=i.warmLanes;var k=u&134217727;return k!==0?(u=k&~b,u!==0?p=Cn(u):(E&=k,E!==0?p=Cn(E):l||(l=k&~i,l!==0&&(p=Cn(l))))):(k=u&~b,k!==0?p=Cn(k):E!==0?p=Cn(E):l||(l=u&~i,l!==0&&(p=Cn(l)))),p===0?0:r!==0&&r!==p&&(r&b)===0&&(b=p&-p,l=r&-r,b>=l||b===32&&(l&4194048)!==0)?r:p}function ae(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function me(i,r){switch(i){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function je(){var i=Cr;return Cr<<=1,(Cr&62914560)===0&&(Cr=4194304),i}function wt(i){for(var r=[],l=0;31>l;l++)r.push(i);return r}function bt(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function xe(i,r,l,u,p,b){var E=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var k=i.entanglements,I=i.expirationTimes,X=i.hiddenUpdates;for(l=E&~l;0<l;){var ie=31-lt(l),se=1<<ie;k[ie]=0,I[ie]=-1;var W=X[ie];if(W!==null)for(X[ie]=null,ie=0;ie<W.length;ie++){var ee=W[ie];ee!==null&&(ee.lane&=-536870913)}l&=~se}u!==0&&be(i,u,0),b!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=b&~(E&~r))}function be(i,r,l){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-lt(r);i.entangledLanes|=r,i.entanglements[u]=i.entanglements[u]|1073741824|l&261930}function Me(i,r){var l=i.entangledLanes|=r;for(i=i.entanglements;l;){var u=31-lt(l),p=1<<u;p&r|i[u]&r&&(i[u]|=r),l&=~p}}function Ut(i,r){var l=r&-r;return l=(l&42)!==0?1:kt(l),(l&(i.suspendedLanes|r))!==0?0:l}function kt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ta(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Es(){var i=oe.p;return i!==0?i:(i=window.event,i===void 0?32:lv(i.type))}function Ss(i,r){var l=oe.p;try{return oe.p=i,r()}finally{oe.p=l}}var Ui=Math.random().toString(36).slice(2),$t="__reactFiber$"+Ui,fn="__reactProps$"+Ui,Ma="__reactContainer$"+Ui,Vl="__reactEvents$"+Ui,Tc="__reactListeners$"+Ui,ws="__reactHandles$"+Ui,Cc="__reactResources$"+Ui,Ar="__reactMarker$"+Ui;function Xl(i){delete i[$t],delete i[fn],delete i[Vl],delete i[Tc],delete i[ws]}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 we=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:we.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 _s(i){if(!i._valueTracker){var r=Yn(i)?"checked":"value";i._valueTracker=Oc(i,r,""+i[r])}}function Zl(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 id=/[\n"\\]/g;function On(i){return i.replace(id,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Wl(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)){_s(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),_s(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),_s(i)}function Re(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"]]),Jl=/^[\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 Jl.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(Wl(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));Wl(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&&Zl(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 eo=!1;function jc(i,r,l){if(eo)return i(r,l);eo=!0;try{var u=i(r);return u}finally{if(eo=!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 to(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"),ad=!1;if(ra)try{var no={};Object.defineProperty(no,"passive",{get:function(){ad=!0}}),window.addEventListener("test",no,no),window.removeEventListener("test",no,no)}catch{ad=!1}var za=null,rd=null,Dc=null;function Bg(){if(Dc)return Dc;var i,r=rd,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),io=g({},Mr,{view:0,detail:0}),Fw=Rn(io),sd,ld,ao,Bc=g({},io,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cd,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!==ao&&(ao&&i.type==="mousemove"?(sd=i.screenX-ao.screenX,ld=i.screenY-ao.screenY):ld=sd=0,ao=i),sd)},movementY:function(i){return"movementY"in i?i.movementY:ld}}),$g=Rn(Bc),Pw=g({},Bc,{dataTransfer:0}),qw=Rn(Pw),Hw=g({},io,{relatedTarget:0}),od=Rn(Hw),Kw=g({},Mr,{animationName:0,elapsedTime:0,pseudoElement:0}),Gw=Rn(Kw),Qw=g({},Mr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Yw=Rn(Qw),Vw=g({},Mr,{data:0}),Fg=Rn(Vw),Xw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zw={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"},Ww={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jw(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=Ww[i])?!!r[i]:!1}function cd(){return Jw}var e_=g({},io,{key:function(i){if(i.key){var r=Xw[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"?Zw[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cd,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}}),t_=Rn(e_),n_=g({},Bc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pg=Rn(n_),i_=g({},io,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cd}),a_=Rn(i_),r_=g({},Mr,{propertyName:0,elapsedTime:0,pseudoElement:0}),s_=Rn(r_),l_=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}),o_=Rn(l_),c_=g({},Mr,{newState:0,oldState:0}),u_=Rn(c_),f_=[9,13,27,32],ud=ra&&"CompositionEvent"in window,ro=null;ra&&"documentMode"in document&&(ro=document.documentMode);var d_=ra&&"TextEvent"in window&&!ro,qg=ra&&(!ud||ro&&8<ro&&11>=ro),Hg=" ",Kg=!1;function Gg(i,r){switch(i){case"keyup":return f_.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 h_(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 m_(i,r){if(Cs)return i==="compositionend"||!ud&&Gg(i,r)?(i=Bg(),Dc=rd=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 p_={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"?!!p_[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 so=null,lo=null;function g_(i){Rx(i,0)}function Uc(i){var r=ja(i);if(Zl(r))return i}function Xg(i,r){if(i==="change")return r}var Zg=!1;if(ra){var fd;if(ra){var dd="oninput"in document;if(!dd){var Wg=document.createElement("div");Wg.setAttribute("oninput","return;"),dd=typeof Wg.oninput=="function"}fd=dd}else fd=!1;Zg=fd&&(!document.documentMode||9<document.documentMode)}function Jg(){so&&(so.detachEvent("onpropertychange",eb),lo=so=null)}function eb(i){if(i.propertyName==="value"&&Uc(lo)){var r=[];Vg(r,lo,i,Ie(i)),jc(g_,r)}}function b_(i,r,l){i==="focusin"?(Jg(),so=r,lo=l,so.attachEvent("onpropertychange",eb)):i==="focusout"&&Jg()}function y_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Uc(lo)}function x_(i,r){if(i==="click")return Uc(r)}function v_(i,r){if(i==="input"||i==="change")return Uc(r)}function E_(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Vn=typeof Object.is=="function"?Object.is:E_;function oo(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 hd(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 S_=ra&&"documentMode"in document&&11>=document.documentMode,As=null,md=null,co=null,pd=!1;function rb(i,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;pd||As==null||As!==Ns(u)||(u=As,"selectionStart"in u&&hd(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}),co&&oo(co,u)||(co=u,u=Tu(md,"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")},gd={},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(gd[i])return gd[i];if(!Os[i])return i;var r=Os[i],l;for(l in r)if(r.hasOwnProperty(l)&&l in sb)return gd[i]=r[l];return i}var lb=Dr("animationend"),ob=Dr("animationiteration"),cb=Dr("animationstart"),w_=Dr("transitionrun"),__=Dr("transitionstart"),N_=Dr("transitioncancel"),ub=Dr("transitionend"),fb=new Map,bd="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(" ");bd.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,yd=0;function Fc(){for(var i=Rs,r=yd=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,yd|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function xd(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<Mo)throw Mo=0,Ch=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 k_(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 k_(i,r,l,u)}function vd(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")vd(i)&&(E=1);else if(typeof i=="string")E=RN(i,l,he.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case J:return i=Xn(31,l,r,p),i.elementType=J,i.lanes=b,i;case w:return Ir(l.children,p,b,r);case N:E=8,p|=24;break;case _:return i=Xn(12,l,r,p|2),i.elementType=_,i.lanes=b,i;case F:return i=Xn(13,l,r,p),i.elementType=F,i.lanes=b,i;case M:return i=Xn(19,l,r,p),i.elementType=M,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case A:E=10;break e;case R:E=9;break e;case D:E=11;break e;case H:E=14;break e;case U:E=16,u=null;break e}E=29,l=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Xn(E,l,r,p),r.elementType=i,r.type=u,r.lanes=b,r}function Ir(i,r,l,u){return i=Xn(7,i,u,r),i.lanes=l,i}function Ed(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 Sd(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,uo=0,fi=[],di=0,Ba=null,$i=1,Fi="";function la(i,r){js[Ds++]=uo,js[Ds++]=Kc,Kc=i,uo=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 wd(i){i.return!==null&&(la(i,1),gb(i,1,0))}function _d(i){for(;i===Kc;)Kc=js[--Ds],js[Ds]=null,uo=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,_t=null,Ze=!1,Ua=null,hi=!1,Nd=Error(a(519));function $a(i){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fo(ui(r,i)),Nd}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<Do.length;l++)Ke(Do[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")||qh(i.type,i.memoizedProps)),l=!l),l&&_t&&$a(i),xb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));_t=Hx(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));_t=Hx(i)}else r===27?(r=_t,er(i.type)?(i=Yh,Yh=null,_t=i):_t=r):_t=sn?pi(i.stateNode.nextSibling):null;return!0}function zr(){_t=sn=null,Ze=!1}function kd(){var i=Ua;return i!==null&&(Ln===null?Ln=i:Ln.push.apply(Ln,i),Ua=null),i}function fo(i){Ua===null?Ua=[i]:Ua.push(i)}var Td=L(null),Br=null,oa=null;function Fa(i,r,l){T(Td,r._currentValue),r._currentValue=l}function ca(i){i._currentValue=Td.current,te(Td)}function Cd(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 Ad(i,r,l,u){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var b=p.dependencies;if(b!==null){var E=p.child;b=b.firstContext;e:for(;b!==null;){var k=b;b=p;for(var I=0;I<r.length;I++)if(k.context===r[I]){b.lanes|=l,k=b.alternate,k!==null&&(k.lanes|=l),Cd(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),Cd(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(Uo):i=[Uo])}p=p.return}i!==null&&Ad(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 T_=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()})}},C_=e.unstable_scheduleCallback,A_=e.unstable_NormalPriority,Gt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Od(){return{controller:new T_,data:new Map,refCount:0}}function ho(i){i.refCount--,i.refCount===0&&C_(A_,function(){i.controller.abort()})}var mo=null,Rd=0,zs=0,Bs=null;function O_(i,r){if(mo===null){var l=mo=[];Rd=0,zs=Dh(),Bs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Rd++,r.then(Eb,Eb),r}function Eb(){if(--Rd===0&&mo!==null){Bs!==null&&(Bs.status="fulfilled");var i=mo;mo=null,zs=0,Bs=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function R_(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"&&O_(i,r),Sb!==null&&Sb(i,r)};var $r=L(null);function Md(){var i=$r.current;return i!==null?i:yt.pooledCache}function Yc(i,r){r===null?T($r,$r.current):T($r,r.pool)}function wb(){var i=Md();return i===null?null:{parent:Gt._currentValue,pool:i}}var Us=Error(a(460)),jd=Error(a(474)),Vc=Error(a(542)),Xc={then:function(){}};function _b(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,po=0;function Zc(i){var r=po;return po+=1,$s===null&&($s=[]),Nb($s,i,r)}function go(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(G,$){if(i){var V=G.deletions;V===null?(G.deletions=[$],G.flags|=16):V.push($)}}function l(G,$){if(!i)return null;for(;$!==null;)r(G,$),$=$.sibling;return null}function u(G){for(var $=new Map;G!==null;)G.key!==null?$.set(G.key,G):$.set(G.index,G),G=G.sibling;return $}function p(G,$){return G=sa(G,$),G.index=0,G.sibling=null,G}function b(G,$,V){return G.index=V,i?(V=G.alternate,V!==null?(V=V.index,V<$?(G.flags|=67108866,$):V):(G.flags|=67108866,$)):(G.flags|=1048576,$)}function E(G){return i&&G.alternate===null&&(G.flags|=67108866),G}function k(G,$,V,re){return $===null||$.tag!==6?($=Ed(V,G.mode,re),$.return=G,$):($=p($,V),$.return=G,$)}function I(G,$,V,re){var ke=V.type;return ke===w?ie(G,$,V.props.children,re,V.key):$!==null&&($.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===U&&Fr(ke)===$.type)?($=p($,V.props),go($,V),$.return=G,$):($=Hc(V.type,V.key,V.props,null,G.mode,re),go($,V),$.return=G,$)}function X(G,$,V,re){return $===null||$.tag!==4||$.stateNode.containerInfo!==V.containerInfo||$.stateNode.implementation!==V.implementation?($=Sd(V,G.mode,re),$.return=G,$):($=p($,V.children||[]),$.return=G,$)}function ie(G,$,V,re,ke){return $===null||$.tag!==7?($=Ir(V,G.mode,re,ke),$.return=G,$):($=p($,V),$.return=G,$)}function se(G,$,V){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Ed(""+$,G.mode,V),$.return=G,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return V=Hc($.type,$.key,$.props,null,G.mode,V),go(V,$),V.return=G,V;case S:return $=Sd($,G.mode,V),$.return=G,$;case U:return $=Fr($),se(G,$,V)}if(Q($)||Y($))return $=Ir($,G.mode,V,null),$.return=G,$;if(typeof $.then=="function")return se(G,Zc($),V);if($.$$typeof===A)return se(G,Qc(G,$),V);Wc(G,$)}return null}function W(G,$,V,re){var ke=$!==null?$.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return ke!==null?null:k(G,$,""+V,re);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case v:return V.key===ke?I(G,$,V,re):null;case S:return V.key===ke?X(G,$,V,re):null;case U:return V=Fr(V),W(G,$,V,re)}if(Q(V)||Y(V))return ke!==null?null:ie(G,$,V,re,null);if(typeof V.then=="function")return W(G,$,Zc(V),re);if(V.$$typeof===A)return W(G,$,Qc(G,V),re);Wc(G,V)}return null}function ee(G,$,V,re,ke){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return G=G.get(V)||null,k($,G,""+re,ke);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case v:return G=G.get(re.key===null?V:re.key)||null,I($,G,re,ke);case S:return G=G.get(re.key===null?V:re.key)||null,X($,G,re,ke);case U:return re=Fr(re),ee(G,$,V,re,ke)}if(Q(re)||Y(re))return G=G.get(V)||null,ie($,G,re,ke,null);if(typeof re.then=="function")return ee(G,$,V,Zc(re),ke);if(re.$$typeof===A)return ee(G,$,V,Qc($,re),ke);Wc($,re)}return null}function ye(G,$,V,re){for(var ke=null,tt=null,Se=$,Be=$=0,Ve=null;Se!==null&&Be<V.length;Be++){Se.index>Be?(Ve=Se,Se=null):Ve=Se.sibling;var nt=W(G,Se,V[Be],re);if(nt===null){Se===null&&(Se=Ve);break}i&&Se&&nt.alternate===null&&r(G,Se),$=b(nt,$,Be),tt===null?ke=nt:tt.sibling=nt,tt=nt,Se=Ve}if(Be===V.length)return l(G,Se),Ze&&la(G,Be),ke;if(Se===null){for(;Be<V.length;Be++)Se=se(G,V[Be],re),Se!==null&&($=b(Se,$,Be),tt===null?ke=Se:tt.sibling=Se,tt=Se);return Ze&&la(G,Be),ke}for(Se=u(Se);Be<V.length;Be++)Ve=ee(Se,G,Be,V[Be],re),Ve!==null&&(i&&Ve.alternate!==null&&Se.delete(Ve.key===null?Be:Ve.key),$=b(Ve,$,Be),tt===null?ke=Ve:tt.sibling=Ve,tt=Ve);return i&&Se.forEach(function(rr){return r(G,rr)}),Ze&&la(G,Be),ke}function Ae(G,$,V,re){if(V==null)throw Error(a(151));for(var ke=null,tt=null,Se=$,Be=$=0,Ve=null,nt=V.next();Se!==null&&!nt.done;Be++,nt=V.next()){Se.index>Be?(Ve=Se,Se=null):Ve=Se.sibling;var rr=W(G,Se,nt.value,re);if(rr===null){Se===null&&(Se=Ve);break}i&&Se&&rr.alternate===null&&r(G,Se),$=b(rr,$,Be),tt===null?ke=rr:tt.sibling=rr,tt=rr,Se=Ve}if(nt.done)return l(G,Se),Ze&&la(G,Be),ke;if(Se===null){for(;!nt.done;Be++,nt=V.next())nt=se(G,nt.value,re),nt!==null&&($=b(nt,$,Be),tt===null?ke=nt:tt.sibling=nt,tt=nt);return Ze&&la(G,Be),ke}for(Se=u(Se);!nt.done;Be++,nt=V.next())nt=ee(Se,G,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(PN){return r(G,PN)}),Ze&&la(G,Be),ke}function pt(G,$,V,re){if(typeof V=="object"&&V!==null&&V.type===w&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case v:e:{for(var ke=V.key;$!==null;){if($.key===ke){if(ke=V.type,ke===w){if($.tag===7){l(G,$.sibling),re=p($,V.props.children),re.return=G,G=re;break e}}else if($.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===U&&Fr(ke)===$.type){l(G,$.sibling),re=p($,V.props),go(re,V),re.return=G,G=re;break e}l(G,$);break}else r(G,$);$=$.sibling}V.type===w?(re=Ir(V.props.children,G.mode,re,V.key),re.return=G,G=re):(re=Hc(V.type,V.key,V.props,null,G.mode,re),go(re,V),re.return=G,G=re)}return E(G);case S:e:{for(ke=V.key;$!==null;){if($.key===ke)if($.tag===4&&$.stateNode.containerInfo===V.containerInfo&&$.stateNode.implementation===V.implementation){l(G,$.sibling),re=p($,V.children||[]),re.return=G,G=re;break e}else{l(G,$);break}else r(G,$);$=$.sibling}re=Sd(V,G.mode,re),re.return=G,G=re}return E(G);case U:return V=Fr(V),pt(G,$,V,re)}if(Q(V))return ye(G,$,V,re);if(Y(V)){if(ke=Y(V),typeof ke!="function")throw Error(a(150));return V=ke.call(V),Ae(G,$,V,re)}if(typeof V.then=="function")return pt(G,$,Zc(V),re);if(V.$$typeof===A)return pt(G,$,Qc(G,V),re);Wc(G,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,$!==null&&$.tag===6?(l(G,$.sibling),re=p($,V),re.return=G,G=re):(l(G,$),re=Ed(V,G.mode,re),re.return=G,G=re),E(G)):l(G,$)}return function(G,$,V,re){try{po=0;var ke=pt(G,$,V,re);return $s=null,ke}catch(Se){if(Se===Us||Se===Vc)throw Se;var tt=Xn(29,Se,null,G.mode);return tt.lanes=re,tt.return=G,tt}finally{}}}var qr=Cb(!0),Ab=Cb(!1),Pa=!1;function Dd(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ld(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 bo(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 Id(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 zd=!1;function yo(){if(zd){var i=Bs;if(i!==null)throw i}}function xo(i,r,l,u){zd=!1;var p=i.updateQueue;Pa=!1;var b=p.firstBaseUpdate,E=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var I=k,X=I.next;I.next=null,E===null?b=X:E.next=X,E=I;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,k=ie.lastBaseUpdate,k!==E&&(k===null?ie.firstBaseUpdate=X:k.next=X,ie.lastBaseUpdate=I))}if(b!==null){var se=p.baseState;E=0,ie=X=I=null,k=b;do{var W=k.lane&-536870913,ee=W!==k.lane;if(ee?(Ye&W)===W:(u&W)===W){W!==0&&W===zs&&(zd=!0),ie!==null&&(ie=ie.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var ye=i,Ae=k;W=r;var pt=l;switch(Ae.tag){case 1:if(ye=Ae.payload,typeof ye=="function"){se=ye.call(pt,se,W);break e}se=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ae.payload,W=typeof ye=="function"?ye.call(pt,se,W):ye,W==null)break e;se=g({},se,W);break e;case 2:Pa=!0}}W=k.callback,W!==null&&(i.flags|=64,ee&&(i.flags|=8192),ee=p.callbacks,ee===null?p.callbacks=[W]:ee.push(W))}else ee={lane:W,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ie===null?(X=ie=ee,I=se):ie=ie.next=ee,E|=W;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;ee=k,k=ee.next,ee.next=null,p.lastBaseUpdate=ee,p.shared.pending=null}}while(!0);ie===null&&(I=se),p.baseState=I,p.firstBaseUpdate=X,p.lastBaseUpdate=ie,b===null&&(p.shared.lanes=0),Va|=E,i.lanes=E,i.memoizedState=se}}function 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=L(null),Jc=L(0);function Mb(i,r){i=ya,T(Jc,i),T(Fs,r),ya=i|r.baseLanes}function Bd(){T(Jc,ya),T(Fs,Fs.current)}function Ud(){ya=Jc.current,te(Fs),te(Jc)}var Zn=L(null),mi=null;function Ka(i){var r=i.alternate;T(Pt,Pt.current&1),T(Zn,i),mi===null&&(r===null||Fs.current!==null||r.memoizedState!==null)&&(mi=i)}function $d(i){T(Pt,Pt.current),T(Zn,i),mi===null&&(mi=i)}function jb(i){i.tag===22?(T(Pt,Pt.current),T(Zn,i),mi===null&&(mi=i)):Ga()}function Ga(){T(Pt,Pt.current),T(Zn,Zn.current)}function Wn(i){te(Zn),mi===i&&(mi=null),te(Pt)}var Pt=L(0);function eu(i){for(var r=i;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Gh(l)||Qh(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ua=0,ze=null,ht=null,Qt=null,tu=!1,Ps=!1,Hr=!1,nu=0,vo=0,qs=null,M_=0;function Lt(){throw Error(a(321))}function Fd(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 Pd(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:ih,Hr=!1,b=l(u,p),Hr=!1,Ps&&(b=Lb(r,l,u,p)),Db(i),b}function Db(i){K.H=wo;var r=ht!==null&&ht.next!==null;if(ua=0,Qt=ht=ze=null,tu=!1,vo=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),vo=0,Ps=!1,25<=p)throw Error(a(301));if(p+=1,Qt=ht=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}K.H=by,b=r(l,u)}while(Ps);return b}function j_(){var i=K.H,r=i.useState()[0];return r=typeof r.then=="function"?Eo(r):r,i=i.useState()[0],(ht!==null?ht.memoizedState:null)!==i&&(ze.flags|=1024),r}function qd(){var i=nu!==0;return nu=0,i}function Hd(i,r,l){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~l}function Kd(i){if(tu){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}tu=!1}ua=0,Qt=ht=ze=null,Ps=!1,vo=nu=0,qs=null}function En(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?ze.memoizedState=Qt=i:Qt=Qt.next=i,Qt}function qt(){if(ht===null){var i=ze.alternate;i=i!==null?i.memoizedState:null}else i=ht.next;var r=Qt===null?ze.memoizedState:Qt.next;if(r!==null)Qt=r,ht=i;else{if(i===null)throw ze.alternate===null?Error(a(467)):Error(a(310));ht=i,i={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Qt===null?ze.memoizedState=Qt=i:Qt=Qt.next=i}return Qt}function iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Eo(i){var r=vo;return vo+=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:ih),i}function au(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Eo(i);if(i.$$typeof===A)return ln(i)}throw Error(a(438,String(i)))}function Gd(i){var r=null,l=ze.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=iu(),ze.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(i),u=0;u<i;u++)l[u]=C;return r.index++,l}function fa(i,r){return typeof r=="function"?r(i):r}function ru(i){var r=qt();return Qd(r,ht,i)}function Qd(i,r,l){var u=i.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var p=i.baseQueue,b=u.pending;if(b!==null){if(p!==null){var E=p.next;p.next=b.next,b.next=E}r.baseQueue=p=b,u.pending=null}if(b=i.baseState,p===null)i.memoizedState=b;else{r=p.next;var k=E=null,I=null,X=r,ie=!1;do{var se=X.lane&-536870913;if(se!==X.lane?(Ye&se)===se:(ua&se)===se){var W=X.revertLane;if(W===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),se===zs&&(ie=!0);else if((ua&W)===W){X=X.next,W===zs&&(ie=!0);continue}else se={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(k=I=se,E=b):I=I.next=se,ze.lanes|=W,Va|=W;se=X.action,Hr&&l(b,se),b=X.hasEagerState?X.eagerState:l(b,se)}else W={lane:se,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(k=I=W,E=b):I=I.next=W,ze.lanes|=se,Va|=se;X=X.next}while(X!==null&&X!==r);if(I===null?E=b:I.next=k,!Vn(b,i.memoizedState)&&(Yt=!0,ie&&(l=Bs,l!==null)))throw l;i.memoizedState=b,i.baseState=E,i.baseQueue=I,u.lastRenderedState=b}return p===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function Yd(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((ht||p).memoizedState,l);if(E&&(p.memoizedState=l,Yt=!0),p=p.queue,Zd(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 Vd(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,Qd(i,ht,typeof u=="function"?u:fa)}function D_(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),I=K.S;I!==null&&I(E,k),Hb(i,r,k)}catch(X){Xd(i,r,X)}finally{b!==null&&E.types!==null&&(b.types=E.types),K.T=b}}else try{b=l(p,u),Hb(i,r,b)}catch(X){Xd(i,r,X)}}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 Xd(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 Xd(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(_t){t:{for(var p=_t,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){_t=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=Vd(!1),b=nh.bind(null,ze,!1,u.queue),u=En(),p={state:r,dispatch:null,action:i,pending:null},u.queue=p,l=D_.bind(null,ze,p,b,l),p.dispatch=l,u.memoizedState=i,[r,l,!1]}function Vb(i){var r=qt();return Xb(r,ht,i)}function Xb(i,r,l){if(r=Qd(i,r,Qb)[0],i=ru(fa)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Eo(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},L_.bind(null,p,l),null)),[u,b,i]}function L_(i,r){i.action=r}function Zb(i){var r=qt(),l=ht;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;ht!==null&&u!==null&&Fd(u,ht.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 Zd(i,r){lu(2048,8,i,r)}function I_(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 I_({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 Wd(){}function ry(i,r){var l=qt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&Fd(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&&Fd(r,u[1]))return u[0];if(u=i(),Hr){un(!0);try{i()}finally{un(!1)}}return l.memoizedState=[u,r],u}function Jd(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=Jd(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=oe.p;oe.p=b!==0&&8>b?b:8;var E=K.T,k={};K.T=k,nh(i,!1,r,l);try{var I=p(),X=K.S;if(X!==null&&X(k,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ie=R_(I,u);So(i,r,ie,ti(i))}else So(i,r,u,ti(i))}catch(se){So(i,r,{then:function(){},status:"rejected",reason:se},ti())}finally{oe.p=b,E!==null&&k.types!==null&&(E.types=k.types),K.T=E}}function z_(){}function eh(i,r,l,u){if(i.tag!==5)throw Error(a(476));var p=cy(i).queue;oy(i,p,r,Z,l===null?z_:function(){return uy(i),l(u)})}function cy(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:Z},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:l},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function uy(i){var r=cy(i);r.next===null&&(r=i.alternate.memoizedState),So(i,r.next.queue,{},ti())}function th(){return ln(Uo)}function fy(){return qt().memoizedState}function dy(){return qt().memoizedState}function B_(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),bo(u,r,l)),r={cache:Od()},i.payload=r;return}r=r.return}}function U_(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=xd(i,r,l,u),l!==null&&(In(l,i,u),py(l,r,u)))}function hy(i,r,l){var u=ti();So(i,r,l,u)}function So(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=xd(i,r,p,u),l!==null)return In(l,i,u),py(l,r,u),!0}return!1}function nh(i,r,l,u){if(u={lane:2,revertLane:Dh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ou(i)){if(r)throw Error(a(479))}else r=xd(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 wo={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};wo.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=U_.bind(null,ze,i),[u.memoizedState,i]},useRef:function(i){var r=En();return i={current:i},r.memoizedState=i},useState:function(i){i=Vd(i);var r=i.queue,l=hy.bind(null,ze,r);return r.dispatch=l,[i.memoizedState,l]},useDebugValue:Wd,useDeferredValue:function(i,r){var l=En();return Jd(l,i,r)},useTransition:function(){var i=Vd(!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=M_++,r="_"+r+"r_"+l.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:th,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=nh.bind(null,ze,!0,l),l.dispatch=r,[i,r]},useMemoCache:Gd,useCacheRefresh:function(){return En().memoizedState=B_.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)}}},ih={readContext:ln,use:au,useCallback:ry,useContext:ln,useEffect:Zd,useImperativeHandle:ay,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:sy,useReducer:ru,useRef:Wb,useState:function(){return ru(fa)},useDebugValue:Wd,useDeferredValue:function(i,r){var l=qt();return ly(l,ht.memoizedState,i,r)},useTransition:function(){var i=ru(fa)[0],r=qt().memoizedState;return[typeof i=="boolean"?i:Eo(i),r]},useSyncExternalStore:Ib,useId:fy,useHostTransitionStatus:th,useFormState:Vb,useActionState:Vb,useOptimistic:function(i,r){var l=qt();return Pb(l,ht,i,r)},useMemoCache:Gd,useCacheRefresh:dy};ih.useEffectEvent=ey;var by={readContext:ln,use:au,useCallback:ry,useContext:ln,useEffect:Zd,useImperativeHandle:ay,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:sy,useReducer:Yd,useRef:Wb,useState:function(){return Yd(fa)},useDebugValue:Wd,useDeferredValue:function(i,r){var l=qt();return ht===null?Jd(l,i,r):ly(l,ht.memoizedState,i,r)},useTransition:function(){var i=Yd(fa)[0],r=qt().memoizedState;return[typeof i=="boolean"?i:Eo(i),r]},useSyncExternalStore:Ib,useId:fy,useHostTransitionStatus:th,useFormState:Zb,useActionState:Zb,useOptimistic:function(i,r){var l=qt();return ht!==null?Pb(l,ht,i,r):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:Gd,useCacheRefresh:dy};by.useEffectEvent=ey;function ah(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 rh={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),bo(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),bo(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),bo(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?!oo(l,u)||!oo(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&&rh.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 wy(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 sh(i,r,l){return l=qa(l),l.tag=3,l.payload={element:null},l.callback=function(){cu(i,r)},l}function _y(i){return i=qa(i),i.tag=3,i}function 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(){wy(r,l,u)}}var E=l.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(i.callback=function(){wy(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 $_(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),Rh(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)),Rh(i,u,p)),!1}throw Error(a(435,l.tag))}return Rh(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!==Nd&&(i=Error(a(422),{cause:u}),fo(ui(i,l)))):(u!==Nd&&(r=Error(a(423),{cause:u}),fo(ui(r,l))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,u=ui(u,l),p=sh(i.stateNode,u,p),Id(i,p),It!==4&&(It=2)),!1;var b=Error(a(520),{cause:u});if(b=ui(b,l),Ro===null?Ro=[b]:Ro.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=sh(l.stateNode,u,i),Id(l,i),!1;case 1:if(r=l.type,b=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Xa===null||!Xa.has(b))))return l.flags|=65536,p&=-p,l.lanes|=p,p=_y(p),Ny(p,i,l,u),Id(l,p),!1}l=l.return}while(l!==null);return!1}var lh=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=Pd(i,r,l,E,b,p),k=qd(),i!==null&&!Yt?(Hd(i,r,p),da(i,r,p)):(Ze&&k&&wd(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"&&!vd(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,!ph(i,p)){var E=b.memoizedProps;if(l=l.compare,l=l!==null?l:oo,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(oo(b,u)&&i.ref===r.ref)if(Yt=!1,r.pendingProps=u=b,ph(i,p))(i.flags&131072)!==0&&(Yt=!0);else return r.lanes=i.lanes,da(i,r,p)}return oh(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):Bd(),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),Bd(),Ga());return on(i,r,p,l),r.child}function _o(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Oy(i,r,l,u,p){var b=Md();return b=b===null?null:{parent:Gt._currentValue,pool:b},r.memoizedState={baseLanes:l,cachePool:b},i!==null&&Yc(r,null),Bd(),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 F_(i,r,l){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(Ze){if(u.mode==="hidden")return i=uu(r,u),r.lanes=536870912,_o(null,i);if($d(r),(i=_t)?(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,_t=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($d(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),lh;Eu(),r=Ry(i,r,l)}else i=b.treeContext,_t=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 oh(i,r,l,u,p){return Ur(r),l=Pd(i,r,l,u,void 0,p),u=qd(),i!==null&&!Yt?(Hd(i,r,p),da(i,r,p)):(Ze&&u&&wd(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=qd(),i!==null&&!Yt?(Hd(i,r,b),da(i,r,b)):(Ze&&u&&wd(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=rh,r.stateNode=b,b._reactInternals=r,b=r.stateNode,b.props=u,b.state=r.memoizedState,b.refs={},Dd(r),E=l.contextType,b.context=typeof E=="object"&&E!==null?ln(E):Ms,b.state=r.memoizedState,E=l.getDerivedStateFromProps,typeof E=="function"&&(ah(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&&rh.enqueueReplaceState(b,b.state,null),xo(r,u,b,p),yo(),b.state=r.memoizedState),typeof b.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){b=r.stateNode;var k=r.memoizedProps,I=Kr(l,k);b.props=I;var X=b.context,ie=l.contextType;E=Ms,typeof ie=="object"&&ie!==null&&(E=ln(ie));var se=l.getDerivedStateFromProps;ie=typeof se=="function"||typeof b.getSnapshotBeforeUpdate=="function",k=r.pendingProps!==k,ie||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(k||X!==E)&&xy(r,b,u,E),Pa=!1;var W=r.memoizedState;b.state=W,xo(r,u,b,p),yo(),X=r.memoizedState,k||W!==X||Pa?(typeof se=="function"&&(ah(r,l,se,u),X=r.memoizedState),(I=Pa||yy(r,l,I,u,W,X,E))?(ie||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(r.flags|=4194308)):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=X),b.props=u,b.state=X,b.context=E,u=I):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{b=r.stateNode,Ld(i,r),E=r.memoizedProps,ie=Kr(l,E),b.props=ie,se=r.pendingProps,W=b.context,X=l.contextType,I=Ms,typeof X=="object"&&X!==null&&(I=ln(X)),k=l.getDerivedStateFromProps,(X=typeof k=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==se||W!==I)&&xy(r,b,u,I),Pa=!1,W=r.memoizedState,b.state=W,xo(r,u,b,p),yo();var ee=r.memoizedState;E!==se||W!==ee||Pa||i!==null&&i.dependencies!==null&&Gc(i.dependencies)?(typeof k=="function"&&(ah(r,l,k,u),ee=r.memoizedState),(ie=Pa||yy(r,l,ie,u,W,ee,I)||i!==null&&i.dependencies!==null&&Gc(i.dependencies))?(X||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,ee,I),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,ee,I)),typeof b.componentDidUpdate=="function"&&(r.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=ee),b.props=u,b.state=ee,b.context=I,u=ie):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),u=!1)}return b=u,fu(i,r),u=(r.flags&128)!==0,b||u?(b=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:b.render(),r.flags|=1,i!==null&&u?(r.child=qr(r,i.child,null,p),r.child=qr(r,null,l,p)):on(i,r,l,p),r.memoizedState=b.state,i=r.child):i=da(i,r,p),i}function Dy(i,r,l,u){return zr(),r.flags|=256,on(i,r,l,u),r.child}var ch={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uh(i){return{baseLanes:i,cachePool:wb()}}function fh(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=_t)?(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,_t=null)):i=null,i===null)throw $a(r);return Qh(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=uh(l),u.childLanes=fh(i,E,l),r.memoizedState=ch,_o(null,u)):(Ka(r),dh(r,k))}var I=i.memoizedState;if(I!==null&&(k=I.dehydrated,k!==null)){if(b)r.flags&256?(Ka(r),r.flags&=-257,r=hh(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=uh(l),u.childLanes=fh(i,E,l),r.memoizedState=ch,r=_o(null,u));else if(Ka(r),Qh(k)){if(E=k.nextSibling&&k.nextSibling.dataset,E)var X=E.dgst;E=X,u=Error(a(419)),u.stack="",u.digest=E,fo({value:u,source:null,stack:null}),r=hh(i,r,l)}else if(Yt||Is(i,r,l,!1),E=(l&i.childLanes)!==0,Yt||E){if(E=yt,E!==null&&(u=Ut(E,l),u!==0&&u!==I.retryLane))throw I.retryLane=u,Lr(i,u),In(E,i,u),lh;Gh(k)||Eu(),r=hh(i,r,l)}else Gh(k)?(r.flags|=192,r.child=i.child,r=null):(i=I.treeContext,_t=pi(k.nextSibling),sn=r,Ze=!0,Ua=null,hi=!1,i!==null&&bb(r,i),r=dh(r,u.children),r.flags|=4096);return r}return p?(Ga(),k=u.fallback,p=r.mode,I=i.child,X=I.sibling,u=sa(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,X!==null?k=sa(X,k):(k=Ir(k,p,l,null),k.flags|=2),k.return=r,u.return=r,u.sibling=k,r.child=u,_o(null,u),u=r.child,k=i.child.memoizedState,k===null?k=uh(l):(p=k.cachePool,p!==null?(I=Gt._currentValue,p=p.parent!==I?{parent:I,pool:I}:p):p=wb(),k={baseLanes:k.baseLanes|l,cachePool:p}),u.memoizedState=k,u.childLanes=fh(i,E,l),r.memoizedState=ch,_o(i.child,u)):(Ka(r),l=i.child,i=l.sibling,l=sa(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,i!==null&&(E=r.deletions,E===null?(r.deletions=[i],r.flags|=16):E.push(i)),r.child=l,r.memoizedState=null,l)}function dh(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 hh(i,r,l){return qr(r,i.child,null,l),i=dh(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),Cd(i.return,r,l)}function mh(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,T(Pt,E),on(i,r,u,l),u=Ze?uo: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),mh(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}mh(r,!0,l,null,b,u);break;case"together":mh(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 ph(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Gc(i)))}function P_(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:Zt(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,$d(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),T(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(!ph(i,l)&&(r.flags&128)===0)return Yt=!1,P_(i,r,l);Yt=(i.flags&131072)!==0}else Yt=!1,Ze&&(r.flags&1048576)!==0&&gb(r,uo,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")vd(i)?(u=Kr(i,u),r.tag=1,r=jy(null,r,i,u,l)):(r.tag=0,r=oh(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===H){r.tag=14,r=Ty(null,r,i,u,l);break e}}throw r=q(i)||i,Error(a(306,r,""))}}return r;case 0:return oh(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,Ld(i,r),xo(r,u,null,l);var E=r.memoizedState;if(u=E.cache,Fa(r,Gt,u),u!==b.cache&&Ad(r,[Gt],l,!0),yo(),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),fo(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(_t=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 Zt(r),i===null&&Ze&&(u=r.stateNode=Gx(r.type,r.pendingProps,ve.current),sn=r,hi=!0,p=_t,er(r.type)?(Yh=p,_t=pi(u.firstChild)):_t=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=_t)&&(u=yN(u,r.type,r.pendingProps,hi),u!==null?(r.stateNode=u,sn=r,_t=pi(u.firstChild),hi=!1,p=!0):p=!1),p||$a(r)),Zt(r),p=r.type,b=r.pendingProps,E=i!==null?i.memoizedProps:null,u=b.children,qh(p,b)?u=null:E!==null&&qh(p,E)&&(r.flags|=32),r.memoizedState!==null&&(p=Pd(i,r,j_,null,null,l),Uo._currentValue=p),fu(i,r),on(i,r,u,l),r.child;case 6:return i===null&&Ze&&((i=l=_t)&&(l=xN(l,r.pendingProps,hi),l!==null?(r.stateNode=l,sn=r,_t=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 F_(i,r,l);case 22:return Ay(i,r,l,r.pendingProps);case 24:return Ur(r),u=ln(Gt),i===null?(p=Md(),p===null&&(p=yt,b=Od(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=l),p=b),r.memoizedState={parent:u,cache:p},Dd(r),Fa(r,Gt,p)):((i.lanes&l)!==0&&(Ld(i,r),xo(r,null,null,l),yo()),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&&Ad(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 gh(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,jd}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,jd}function hu(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?je():536870912,i.lanes|=r,Ys|=r)}function No(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 q_(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,kd())),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),gh(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),gh(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),gh(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=kd(),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=kd(),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&&Bh(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)No(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,No(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 T(Pt,Pt.current&1|2),Ze&&la(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&Ot()>yu&&(r.flags|=128,p=!0,No(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),No(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,No(u,!1),r.lanes=4194304);u.isBackwards?(b.sibling=r.child,r.child=b):(i=u.last,i!==null?i.sibling=b:r.child=b,u.last=b)}return u.tail!==null?(i=u.tail,u.rendering=i,u.tail=i.sibling,u.renderingStartTime=Ot(),i.sibling=null,l=Pt.current,T(Pt,p?l&1|2:l&1),Ze&&la(r,u.treeForkCount),i):(Nt(r),null);case 22:case 23:return Wn(r),Ud(),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 H_(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),Ud(),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),Ud(),i!==null&&te($r);break;case 24:ca(Gt)}}function ko(i,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&i)===i){u=void 0;var b=l.create,E=l.inst;u=b(),E.destroy=u}l=l.next}while(l!==p)}}catch(k){ft(r,r.return,k)}}function Qa(i,r,l){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&i)===i){var E=u.inst,k=E.destroy;if(k!==void 0){E.destroy=void 0,p=r;var I=l,X=k;try{X()}catch(ie){ft(p,I,ie)}}}u=u.next}while(u!==b)}}catch(ie){ft(r,r.return,ie)}}function 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 To(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 bh(i,r,l){try{var u=i.stateNode;dN(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 yh(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 xh(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(xh(i,r,l),i=i.sibling;i!==null;)xh(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,vh=!1,Gy=typeof WeakSet=="function"?WeakSet:Set,tn=null;function K_(i,r){if(i=i.containerInfo,Fh=Lu,i=ab(i),hd(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var p=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{l.nodeType,b.nodeType}catch{l=null;break e}var E=0,k=-1,I=-1,X=0,ie=0,se=i,W=null;t:for(;;){for(var ee;se!==l||p!==0&&se.nodeType!==3||(k=E+p),se!==b||u!==0&&se.nodeType!==3||(I=E+u),se.nodeType===3&&(E+=se.nodeValue.length),(ee=se.firstChild)!==null;)W=se,se=ee;for(;;){if(se===i)break t;if(W===l&&++X===p&&(k=E),W===b&&++ie===u&&(I=E),(ee=se.nextSibling)!==null)break;se=W,W=se.parentNode}se=ee}l=k===-1||I===-1?null:{start:k,end:I}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ph={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)Kh(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Kh(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&&ko(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&&To(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&&To(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=eN.bind(null,l),vN(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&&Xl(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),Io(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 G_(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=G_(i);r.forEach(function(u){if(!l.has(u)){l.add(u);var p=tN.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),ko(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&&bh(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&&bh(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{Re(p,"")}catch(ye){ft(i,i.return,ye)}}u&4&&i.stateNode!=null&&(p=i.memoizedProps,bh(i,p,l!==null?l.memoizedProps:p)),u&1024&&(vh=!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)}vh&&(vh=!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 I=l!==null&&l.memoizedState!==null,X=ma,ie=Vt;if(ma=X||p,Vt=ie||I,jn(r,i),Vt=ie,ma=X,Dn(i),u&8192)e:for(r=i.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(l===null||I||ma||Vt||Gr(i)),l=null,r=i;;){if(r.tag===5||r.tag===26){if(l===null){I=l=r;try{if(b=I.stateNode,p)E=b.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{k=I.stateNode;var se=I.memoizedProps.style,W=se!=null&&se.hasOwnProperty("display")?se.display:null;k.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(ye){ft(I,I.return,ye)}}}else if(r.tag===6){if(l===null){I=r;try{I.stateNode.nodeValue=p?"":I.memoizedProps}catch(ye){ft(I,I.return,ye)}}}else if(r.tag===18){if(l===null){I=r;try{var ee=I.stateNode;p?Px(ee,!0):Px(I.stateNode,!1)}catch(ye){ft(I,I.return,ye)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===i)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=i.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,pu(i,l))));break;case 19:jn(r,i),Dn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,pu(i,u)));break;case 30:break;case 21:break;default:jn(r,i),Dn(i)}}function Dn(i){var r=i.flags;if(r&2){try{for(var l,u=i.return;u!==null;){if(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=yh(i);mu(i,b,p);break;case 5:var E=l.stateNode;l.flags&32&&(Re(E,""),l.flags&=-33);var k=yh(i);mu(i,k,E);break;case 3:case 4:var I=l.stateNode.containerInfo,X=yh(i);xh(i,X,I);break;default:throw Error(a(161))}}catch(ie){ft(i,i.return,ie)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function 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:Io(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),ko(4,b);break;case 1:if(ba(p,b,l),u=b,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(X){ft(u,u.return,X)}if(u=b,p=u.updateQueue,p!==null){var k=u.stateNode;try{var I=p.shared.hiddenCallbacks;if(I!==null)for(p.shared.hiddenCallbacks=null,p=0;p<I.length;p++)Ob(I[p],k)}catch(X){ft(u,u.return,X)}}l&&E&64&&Fy(b),To(b,b.return);break;case 27:Ky(b);case 26:case 5:ba(p,b,l),l&&u===null&&E&4&&qy(b),To(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),To(b,b.return);break;case 30:break;default:ba(p,b,l)}r=r.sibling}}function Eh(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&&ho(l))}function Sh(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&ho(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&&ko(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&&ho(i)));break;case 12:if(p&2048){Ci(i,r,l,u),i=r.stateNode;try{var b=r.memoizedProps,E=b.id,k=b.onPostCommit;typeof k=="function"&&k(E,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(I){ft(r,r.return,I)}}else Ci(i,r,l,u);break;case 31:Ci(i,r,l,u);break;case 13:Ci(i,r,l,u);break;case 23:break;case 22:b=r.stateNode,E=r.alternate,r.memoizedState!==null?b._visibility&2?Ci(i,r,l,u):Co(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&&Eh(E,r);break;case 24:Ci(i,r,l,u),p&2048&&Sh(r.alternate,r);break;default:Ci(i,r,l,u)}}function Ks(i,r,l,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var b=i,E=r,k=l,I=u,X=E.flags;switch(E.tag){case 0:case 11:case 15:Ks(b,E,k,I,p),ko(8,E);break;case 23:break;case 22:var ie=E.stateNode;E.memoizedState!==null?ie._visibility&2?Ks(b,E,k,I,p):Co(b,E):(ie._visibility|=2,Ks(b,E,k,I,p)),p&&X&2048&&Eh(E.alternate,E);break;case 24:Ks(b,E,k,I,p),p&&X&2048&&Sh(E.alternate,E);break;default:Ks(b,E,k,I,p)}r=r.sibling}}function Co(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:Co(l,u),p&2048&&Eh(u.alternate,u);break;case 24:Co(l,u),p&2048&&Sh(u.alternate,u);break;default:Co(l,u)}r=r.sibling}}var Ao=8192;function Gs(i,r,l){if(i.subtreeFlags&Ao)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&Ao&&i.memoizedState!==null&&MN(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=Ao,Ao=16777216,Gs(i,r,l),Ao=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 Oo(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:Oo(i),i.flags&2048&&Qa(9,i,i.return);break;case 3:Oo(i);break;case 12:Oo(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)):Oo(i);break;default:Oo(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:ho(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 Q_={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}},Y_=typeof WeakMap=="function"?WeakMap:Map,at=0,yt=null,He=null,Ye=0,ut=0,Jn=null,Ya=!1,Qs=!1,wh=!1,ya=0,It=0,Va=0,Qr=0,_h=0,ei=0,Ys=0,Ro=null,Ln=null,Nh=!1,bu=0,rx=0,yu=1/0,xu=null,Xa=null,Wt=0,Za=null,Vs=null,xa=0,kh=0,Th=null,sx=null,Mo=0,Ch=null;function ti(){return(at&2)!==0&&Ye!==0?Ye&-Ye:K.T!==null?Dh():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?Z_(i,r):Oh(i,r,!0),b=u;do{if(p===0){Qs&&!u&&Wa(i,r,0,!1);break}else{if(l=i.current.alternate,b&&!V_(l)){p=Oh(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=Ro;var I=k.current.memoizedState.isDehydrated;if(I&&(Xs(k,E).flags|=256),E=Oh(k,E,!1),E!==2){if(wh&&!I){k.errorRecoveryDisabledLanes|=b,Qr|=b,p=4;break e}b=Ln,Ln=p,b!==null&&(Ln===null?Ln=b:Ln.push.apply(Ln,b))}p=E}if(b=!1,p!==2)continue}}if(p===1){Xs(i,0),Wa(i,r,0,!0);break}e:{switch(u=i,b=p,b){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Wa(u,r,ei,!Ya);break e;case 2:Ln=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(p=bu+300-Ot(),10<p)){if(Wa(u,r,ei,!Ya),B(u,0,!0)!==0)break e;xa=r,u.timeoutHandle=Ux(cx.bind(null,u,l,Ln,xu,Nh,r,ei,Qr,Ys,Ya,b,"Throttled",-0,0),p);break e}cx(u,l,Ln,xu,Nh,r,ei,Qr,Ys,Ya,b,null,-0,0)}}break}while(!0);qi(i)}function cx(i,r,l,u,p,b,E,k,I,X,ie,se,W,ee){if(i.timeoutHandle=-1,se=r.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:de},tx(r,b,se);var ye=(b&62914560)===b?bu-Ot():(b&4194048)===b?rx-Ot():0;if(ye=jN(se,ye),ye!==null){xa=b,i.cancelPendingCommit=ye(bx.bind(null,i,r,b,l,u,p,E,k,I,ie,se,null,W,ee)),Wa(i,b,E,!X);return}}bx(i,r,b,l,u,p,E,k,I)}function V_(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?(jo(0),!1):!0}function Ah(){if(He!==null){if(ut===0)var i=He.return;else i=He,oa=Br=null,Kd(i),$s=null,po=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,pN(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),xa=0,Ah(),yt=i,He=l=sa(i.current,null),Ye=r,ut=0,Jn=null,Ya=!1,Qs=ae(i,r),wh=!1,Ys=ei=_h=Qr=Va=It=0,Ln=Ro=null,Nh=!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=wo,r===Us||r===Vc?(r=kb(),ut=3):r===jd?(r=kb(),ut=4):ut=r===lh?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=wo,i===null?wo:i}function hx(){var i=K.A;return K.A=Q_,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 Oh(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,I=Jn;switch(ut){case 8:Ah(),E=6;break e;case 3:case 2:case 9:case 6:Zn.current===null&&(r=!0);var X=ut;if(ut=0,Jn=null,Zs(i,k,I,X),l&&Qs){E=0;break e}break;default:X=ut,ut=0,Jn=null,Zs(i,k,I,X)}}X_(),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 X_(){for(;He!==null;)mx(He)}function Z_(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(_b(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:_b(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 I=k.sibling;if(I!==null)He=I;else{var X=k.return;X!==null?(He=X,Su(X)):He=null}break t}}ut=0,Jn=null,Zs(i,r,b,5);break;case 6:ut=0,Jn=null,Zs(i,r,b,6);break;case 8:Ah(),It=6;break e;default:throw Error(a(462))}}W_();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 W_(){for(;He!==null&&!Yl();)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:Kd(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,Kd(r),$s=null,po=0;var p=r.return;try{if($_(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=q_(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=H_(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,I){i.cancelPendingCommit=null;do wu();while(Wt!==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|=yd,xe(i,l,b,E,k,I),i===yt&&(He=yt=null,Ye=0),Vs=r,Za=i,xa=l,kh=b,Th=p,sx=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,nN(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=oe.p,oe.p=2,E=at,at|=4;try{K_(i,r,l)}finally{at=E,oe.p=p,K.T=u}}Wt=1,yx(),xx(),vx()}}function yx(){if(Wt===1){Wt=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=oe.p;oe.p=2;var p=at;at|=4;try{Wy(r,i);var b=Ph,E=ab(i.containerInfo),k=b.focusedElem,I=b.selectionRange;if(E!==k&&k&&k.ownerDocument&&ib(k.ownerDocument.documentElement,k)){if(I!==null&&hd(k)){var X=I.start,ie=I.end;if(ie===void 0&&(ie=X),"selectionStart"in k)k.selectionStart=X,k.selectionEnd=Math.min(ie,k.value.length);else{var se=k.ownerDocument||document,W=se&&se.defaultView||window;if(W.getSelection){var ee=W.getSelection(),ye=k.textContent.length,Ae=Math.min(I.start,ye),pt=I.end===void 0?Ae:Math.min(I.end,ye);!ee.extend&&Ae>pt&&(E=pt,pt=Ae,Ae=E);var G=nb(k,Ae),$=nb(k,pt);if(G&&$&&(ee.rangeCount!==1||ee.anchorNode!==G.node||ee.anchorOffset!==G.offset||ee.focusNode!==$.node||ee.focusOffset!==$.offset)){var V=se.createRange();V.setStart(G.node,G.offset),ee.removeAllRanges(),Ae>pt?(ee.addRange(V),ee.extend($.node,$.offset)):(V.setEnd($.node,$.offset),ee.addRange(V))}}}}for(se=[],ee=k;ee=ee.parentNode;)ee.nodeType===1&&se.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<se.length;k++){var re=se[k];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Lu=!!Fh,Ph=Fh=null}finally{at=p,oe.p=u,K.T=l}}i.current=r,Wt=2}}function xx(){if(Wt===2){Wt=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=oe.p;oe.p=2;var p=at;at|=4;try{Qy(i,r.alternate,r)}finally{at=p,oe.p=u,K.T=l}}Wt=3}}function vx(){if(Wt===4||Wt===3){Wt=0,ys();var i=Za,r=Vs,l=xa,u=sx;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Wt=5:(Wt=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=oe.p,oe.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,oe.p=p}}(xa&3)!==0&&wu(),qi(i),p=i.pendingLanes,(l&261930)!==0&&(p&42)!==0?i===Ch?Mo++:(Mo=0,Ch=i):Mo=0,jo(0)}}function Ex(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,ho(r)))}function wu(){return yx(),xx(),vx(),Sx()}function Sx(){if(Wt!==5)return!1;var i=Za,r=kh;kh=0;var l=ta(xa),u=K.T,p=oe.p;try{oe.p=32>l?32:l,K.T=null,l=Th,Th=null;var b=Za,E=xa;if(Wt=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,jo(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(an,b)}catch{}return!0}finally{oe.p=p,K.T=u,Ex(i,r)}}function wx(i,r,l){r=ui(l,r),r=sh(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)wx(i,i,l);else for(;r!==null;){if(r.tag===3){wx(r,i,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Xa===null||!Xa.has(u))){i=ui(l,i),l=_y(2),u=Ha(r,l,2),u!==null&&(Ny(l,u,r,i),bt(u,2),qi(u));break}}r=r.return}}function Rh(i,r,l){var u=i.pingCache;if(u===null){u=i.pingCache=new Y_;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)||(wh=!0,p.add(l),i=J_.bind(null,i,r,l),r.then(i,i))}function J_(i,r,l){var u=i.pingCache;u!==null&&u.delete(r),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,yt===i&&(Ye&l)===l&&(It===4||It===3&&(Ye&62914560)===Ye&&300>Ot()-bu?(at&2)===0&&Xs(i,0):_h|=l,Ys===Ye&&(Ys=0)),qi(i)}function _x(i,r){r===0&&(r=je()),i=Lr(i,r),i!==null&&(bt(i,r),qi(i))}function eN(i){var r=i.memoizedState,l=0;r!==null&&(l=r.retryLane),_x(i,l)}function tN(i,r){var l=0;switch(i.tag){case 31:case 13:var u=i.stateNode,p=i.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=i.stateNode;break;case 22:u=i.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),_x(i,l)}function nN(i,r){return ea(i,r)}var _u=null,Ws=null,Mh=!1,Nu=!1,jh=!1,Ja=0;function qi(i){i!==Ws&&i.next===null&&(Ws===null?_u=Ws=i:Ws=Ws.next=i),Nu=!0,Mh||(Mh=!0,aN())}function jo(i,r){if(!jh&&Nu){jh=!0;do for(var l=!1,u=_u;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=B(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);jh=!1}}function iN(){Nx()}function Nx(){Nu=Mh=!1;var i=0;Ja!==0&&mN()&&(i=Ja);for(var r=Ot(),l=null,u=_u;u!==null;){var p=u.next,b=kx(u,r);b===0?(u.next=null,l===null?_u=p:l.next=p,p===null&&(Ws=l)):(l=u,(i!==0||(b&3)!==0)&&(Nu=!0)),u=p}Wt!==0&&Wt!==5||jo(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,I=p[E];I===-1?((k&l)===0||(k&u)!==0)&&(p[E]=me(k,r)):I<=r&&(i.expiredLanes|=k),b&=~k}if(r=yt,l=Ye,l=B(i,i===r?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,l===0||i===r&&(ut===2||ut===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&kr(u),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||ae(i,l)){if(r=l&-l,r===i.callbackPriority)return r;switch(u!==null&&kr(u),ta(l)){case 2:case 8:l=fe;break;case 32:l=Ce;break;case 268435456:l=et;break;default:l=Ce}return u=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(Wt!==0&&Wt!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(wu()&&i.callbackNode!==l)return null;var u=Ye;return u=B(i,i===yt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(ox(i,u,r),kx(i,Ot()),i.callbackNode!=null&&i.callbackNode===l?Tx.bind(null,i):null)}function Cx(i,r){if(wu())return null;ox(i,r,!0)}function aN(){gN(function(){(at&6)!==0?ea(ne,iN):Nx()})}function Dh(){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 rN(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 I=E?Ox(p,E):new FormData(p);eh(l,{pending:!0,data:I,method:p.method,action:b},null,I)}}else typeof b=="function"&&(k.preventDefault(),I=E?Ox(p,E):new FormData(p),eh(l,{pending:!0,data:I,method:p.method,action:b},b,I))},currentTarget:p}]})}}for(var Lh=0;Lh<bd.length;Lh++){var Ih=bd[Lh],sN=Ih.toLowerCase(),lN=Ih[0].toUpperCase()+Ih.slice(1);ki(sN,"on"+lN)}ki(lb,"onAnimationEnd"),ki(ob,"onAnimationIteration"),ki(cb,"onAnimationStart"),ki("dblclick","onDoubleClick"),ki("focusin","onFocus"),ki("focusout","onBlur"),ki(w_,"onTransitionRun"),ki(__,"onTransitionStart"),ki(N_,"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 Do="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(" "),oN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Do));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],I=k.instance,X=k.currentTarget;if(k=k.listener,I!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=X;try{b(p)}catch(ie){$c(ie)}p.currentTarget=null,b=I}else for(E=0;E<u.length;E++){if(k=u[E],I=k.instance,X=k.currentTarget,k=k.listener,I!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=X;try{b(p)}catch(ie){$c(ie)}p.currentTarget=null,b=I}}}}function Ke(i,r){var l=r[Vl];l===void 0&&(l=r[Vl]=new Set);var u=i+"__bubble";l.has(u)||(Mx(r,i,2,!1),l.add(u))}function zh(i,r,l){var u=0;r&&(u|=4),Mx(l,i,u,r)}var ku="_reactListening"+Math.random().toString(36).slice(2);function Bh(i){if(!i[ku]){i[ku]=!0,Ac.forEach(function(l){l!=="selectionchange"&&(oN.has(l)||zh(l,!1,i),zh(l,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[ku]||(r[ku]=!0,zh("selectionchange",!1,r))}}function Mx(i,r,l,u){switch(lv(r)){case 2:var p=IN;break;case 8:p=zN;break;default:p=Jh}l=p.bind(null,r,l,i),p=void 0,!ad||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 Uh(i,r,l,u,p){var b=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var E=u.tag;if(E===3||E===4){var k=u.stateNode.containerInfo;if(k===p)break;if(E===4)for(E=u.return;E!==null;){var I=E.tag;if((I===3||I===4)&&E.stateNode.containerInfo===p)return;E=E.return}for(;k!==null;){if(E=vn(k),E===null)return;if(I=E.tag,I===5||I===6||I===26||I===27){u=b=E;continue e}k=k.parentNode}}u=u.return}jc(function(){var X=b,ie=Ie(l),se=[];e:{var W=fb.get(i);if(W!==void 0){var ee=zc,ye=i;switch(i){case"keypress":if(Lc(l)===0)break e;case"keydown":case"keyup":ee=t_;break;case"focusin":ye="focus",ee=od;break;case"focusout":ye="blur",ee=od;break;case"beforeblur":case"afterblur":ee=od;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=qw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=a_;break;case lb:case ob:case cb:ee=Gw;break;case ub:ee=s_;break;case"scroll":case"scrollend":ee=Fw;break;case"wheel":ee=o_;break;case"copy":case"cut":case"paste":ee=Yw;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=u_}var Ae=(r&4)!==0,pt=!Ae&&(i==="scroll"||i==="scrollend"),G=Ae?W!==null?W+"Capture":null:W;Ae=[];for(var $=X,V;$!==null;){var re=$;if(V=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||V===null||G===null||(re=to($,G),re!=null&&Ae.push(Lo($,re,V))),pt)break;$=$.return}0<Ae.length&&(W=new ee(W,ye,null,l,ie),se.push({event:W,listeners:Ae}))}}if((r&7)===0){e:{if(W=i==="mouseover"||i==="pointerover",ee=i==="mouseout"||i==="pointerout",W&&l!==Ee&&(ye=l.relatedTarget||l.fromElement)&&(vn(ye)||ye[Ma]))break e;if((ee||W)&&(W=ie.window===ie?ie:(W=ie.ownerDocument)?W.defaultView||W.parentWindow:window,ee?(ye=l.relatedTarget||l.toElement,ee=X,ye=ye?vn(ye):null,ye!==null&&(pt=o(ye),Ae=ye.tag,ye!==pt||Ae!==5&&Ae!==27&&Ae!==6)&&(ye=null)):(ee=null,ye=X),ee!==ye)){if(Ae=$g,re="onMouseLeave",G="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Ae=Pg,re="onPointerLeave",G="onPointerEnter",$="pointer"),pt=ee==null?W:ja(ee),V=ye==null?W:ja(ye),W=new Ae(re,$+"leave",ee,l,ie),W.target=pt,W.relatedTarget=V,re=null,vn(ie)===X&&(Ae=new Ae(G,$+"enter",ye,l,ie),Ae.target=V,Ae.relatedTarget=pt,re=Ae),pt=re,ee&&ye)t:{for(Ae=cN,G=ee,$=ye,V=0,re=G;re;re=Ae(re))V++;re=0;for(var ke=$;ke;ke=Ae(ke))re++;for(;0<V-re;)G=Ae(G),V--;for(;0<re-V;)$=Ae($),re--;for(;V--;){if(G===$||$!==null&&G===$.alternate){Ae=G;break t}G=Ae(G),$=Ae($)}Ae=null}else Ae=null;ee!==null&&jx(se,W,ee,Ae,!1),ye!==null&&pt!==null&&jx(se,pt,ye,Ae,!0)}}e:{if(W=X?ja(X):window,ee=W.nodeName&&W.nodeName.toLowerCase(),ee==="select"||ee==="input"&&W.type==="file")var tt=Xg;else if(Yg(W))if(Zg)tt=v_;else{tt=y_;var Se=b_}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?X&&La(X.elementType)&&(tt=Xg):tt=x_;if(tt&&(tt=tt(i,X))){Vg(se,tt,l,ie);break e}Se&&Se(i,W,X),i==="focusout"&&X&&W.type==="number"&&X.memoizedProps.value!=null&&ks(W,"number",W.value)}switch(Se=X?ja(X):window,i){case"focusin":(Yg(Se)||Se.contentEditable==="true")&&(As=Se,md=X,co=null);break;case"focusout":co=md=As=null;break;case"mousedown":pd=!0;break;case"contextmenu":case"mouseup":case"dragend":pd=!1,rb(se,l,ie);break;case"selectionchange":if(S_)break;case"keydown":case"keyup":rb(se,l,ie)}var Be;if(ud)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,rd="value"in za?za.value:za.textContent,Cs=!0)),Se=Tu(X,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=d_?h_(i,l):m_(i,l))&&(Ve=Tu(X,"onBeforeInput"),0<Ve.length&&(Se=new Fg("onBeforeInput","beforeinput",null,l,ie),se.push({event:Se,listeners:Ve}),Se.data=Be)),rN(se,i,X,l,ie)}Rx(se,r)})}function Lo(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=to(i,l),p!=null&&u.unshift(Lo(i,p,b)),p=to(i,r),p!=null&&u.push(Lo(i,p,b))),i.tag===3)return u;i=i.return}return[]}function cN(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,I=k.alternate,X=k.stateNode;if(k=k.tag,I!==null&&I===u)break;k!==5&&k!==26&&k!==27||X===null||(I=X,p?(X=to(l,b),X!=null&&E.unshift(Lo(l,X,I))):p||(X=to(l,b),X!=null&&E.push(Lo(l,X,I)))),l=l.return}E.length!==0&&i.push({event:r,listeners:E})}var uN=/\r\n?/g,fN=/\u0000|\uFFFD/g;function Dx(i){return(typeof i=="string"?i:""+i).replace(uN,`
49
+ `).replace(fN,"")}function Lx(i,r){return r=Dx(r),Dx(i)===r}function mt(i,r,l,u,p,b){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Re(i,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Re(i,""+u);break;case"className":Qn(i,"class",u);break;case"tabIndex":Qn(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Qn(i,l,u);break;case"style":ct(i,u,b);break;case"data":if(r!=="object"){Qn(i,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){i.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=Ia(""+u),i.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){i.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(l==="formAction"?(r!=="input"&&mt(i,r,"name",p.name,p,null),mt(i,r,"formEncType",p.formEncType,p,null),mt(i,r,"formMethod",p.formMethod,p,null),mt(i,r,"formTarget",p.formTarget,p,null)):(mt(i,r,"encType",p.encType,p,null),mt(i,r,"method",p.method,p,null),mt(i,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=Ia(""+u),i.setAttribute(l,u);break;case"onClick":u!=null&&(i.onclick=de);break;case"onScroll":u!=null&&Ke("scroll",i);break;case"onScrollEnd":u!=null&&Ke("scrollend",i);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"multiple":i.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":i.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){i.removeAttribute("xlink:href");break}l=Ia(""+u),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""+u):i.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":u===!0?i.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,u):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?i.setAttribute(l,u):i.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?i.removeAttribute(l):i.setAttribute(l,u);break;case"popover":Ke("beforetoggle",i),Ke("toggle",i),dn(i,"popover",u);break;case"xlinkActuate":An(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":An(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":An(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":An(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":An(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":An(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":An(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":An(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":An(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":dn(i,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=aa.get(l)||l,dn(i,l,u))}}function $h(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"?Re(i,u):(typeof u=="number"||typeof u=="bigint")&&Re(i,""+u);break;case"onScroll":u!=null&&Ke("scroll",i);break;case"onScrollEnd":u!=null&&Ke("scrollend",i);break;case"onClick":u!=null&&(i.onclick=de);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Or.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),r=l.slice(2,p?l.length-7:void 0),b=i[fn]||null,b=b!=null?b[l]:null,typeof b=="function"&&i.removeEventListener(r,b,p),typeof u=="function")){typeof b!="function"&&b!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(r,u,p);break e}l in i?i[l]=u:u===!0?i.setAttribute(l,""):dn(i,l,u)}}}function cn(i,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",i),Ke("load",i);var u=!1,p=!1,b;for(b in l)if(l.hasOwnProperty(b)){var E=l[b];if(E!=null)switch(b){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,b,E,l,null)}}p&&mt(i,r,"srcSet",l.srcSet,l,null),u&&mt(i,r,"src",l.src,l,null);return;case"input":Ke("invalid",i);var k=b=E=p=null,I=null,X=null;for(u in l)if(l.hasOwnProperty(u)){var ie=l[u];if(ie!=null)switch(u){case"name":p=ie;break;case"type":E=ie;break;case"checked":I=ie;break;case"defaultChecked":X=ie;break;case"value":b=ie;break;case"defaultValue":k=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,r));break;default:mt(i,r,u,ie,l,null)}}Rr(i,b,k,I,X,E,p,!1);return;case"select":Ke("invalid",i),u=E=b=null;for(p in l)if(l.hasOwnProperty(p)&&(k=l[p],k!=null))switch(p){case"value":b=k;break;case"defaultValue":E=k;break;case"multiple":u=k;default:mt(i,r,p,k,l,null)}r=b,l=E,i.multiple=!!u,r!=null?rn(i,!!u,r,!1):l!=null&&rn(i,!!u,l,!0);return;case"textarea":Ke("invalid",i),b=p=u=null;for(E in l)if(l.hasOwnProperty(E)&&(k=l[E],k!=null))switch(E){case"value":u=k;break;case"defaultValue":p=k;break;case"children":b=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(a(91));break;default:mt(i,r,E,k,l,null)}Ts(i,u,p,b);return;case"option":for(I in l)if(l.hasOwnProperty(I)&&(u=l[I],u!=null))switch(I){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:mt(i,r,I,u,l,null)}return;case"dialog":Ke("beforetoggle",i),Ke("toggle",i),Ke("cancel",i),Ke("close",i);break;case"iframe":case"object":Ke("load",i);break;case"video":case"audio":for(u=0;u<Do.length;u++)Ke(Do[u],i);break;case"image":Ke("error",i),Ke("load",i);break;case"details":Ke("toggle",i);break;case"embed":case"source":case"link":Ke("error",i),Ke("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in l)if(l.hasOwnProperty(X)&&(u=l[X],u!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,X,u,l,null)}return;default:if(La(r)){for(ie in l)l.hasOwnProperty(ie)&&(u=l[ie],u!==void 0&&$h(i,r,ie,u,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(u=l[k],u!=null&&mt(i,r,k,u,l,null))}function dN(i,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,E=null,k=null,I=null,X=null,ie=null;for(ee in l){var se=l[ee];if(l.hasOwnProperty(ee)&&se!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":I=se;default:u.hasOwnProperty(ee)||mt(i,r,ee,null,u,se)}}for(var W in u){var ee=u[W];if(se=l[W],u.hasOwnProperty(W)&&(ee!=null||se!=null))switch(W){case"type":b=ee;break;case"name":p=ee;break;case"checked":X=ee;break;case"defaultChecked":ie=ee;break;case"value":E=ee;break;case"defaultValue":k=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,r));break;default:ee!==se&&mt(i,r,W,ee,u,se)}}Wl(i,E,k,I,X,ie,b,p);return;case"select":ee=E=k=W=null;for(b in l)if(I=l[b],l.hasOwnProperty(b)&&I!=null)switch(b){case"value":break;case"multiple":ee=I;default:u.hasOwnProperty(b)||mt(i,r,b,null,u,I)}for(p in u)if(b=u[p],I=l[p],u.hasOwnProperty(p)&&(b!=null||I!=null))switch(p){case"value":W=b;break;case"defaultValue":k=b;break;case"multiple":E=b;default:b!==I&&mt(i,r,p,b,u,I)}r=k,l=E,u=ee,W!=null?rn(i,!!l,W,!1):!!u!=!!l&&(r!=null?rn(i,!!l,r,!0):rn(i,!!l,l?[]:"",!1));return;case"textarea":ee=W=null;for(k in l)if(p=l[k],l.hasOwnProperty(k)&&p!=null&&!u.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:mt(i,r,k,null,u,p)}for(E in u)if(p=u[E],b=l[E],u.hasOwnProperty(E)&&(p!=null||b!=null))switch(E){case"value":W=p;break;case"defaultValue":ee=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==b&&mt(i,r,E,p,u,b)}Rc(i,W,ee);return;case"option":for(var ye in l)if(W=l[ye],l.hasOwnProperty(ye)&&W!=null&&!u.hasOwnProperty(ye))switch(ye){case"selected":i.selected=!1;break;default:mt(i,r,ye,null,u,W)}for(I in u)if(W=u[I],ee=l[I],u.hasOwnProperty(I)&&W!==ee&&(W!=null||ee!=null))switch(I){case"selected":i.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:mt(i,r,I,W,u,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in l)W=l[Ae],l.hasOwnProperty(Ae)&&W!=null&&!u.hasOwnProperty(Ae)&&mt(i,r,Ae,null,u,W);for(X in u)if(W=u[X],ee=l[X],u.hasOwnProperty(X)&&W!==ee&&(W!=null||ee!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,r));break;default:mt(i,r,X,W,u,ee)}return;default:if(La(r)){for(var pt in l)W=l[pt],l.hasOwnProperty(pt)&&W!==void 0&&!u.hasOwnProperty(pt)&&$h(i,r,pt,void 0,u,W);for(ie in u)W=u[ie],ee=l[ie],!u.hasOwnProperty(ie)||W===ee||W===void 0&&ee===void 0||$h(i,r,ie,W,u,ee);return}}for(var G in l)W=l[G],l.hasOwnProperty(G)&&W!=null&&!u.hasOwnProperty(G)&&mt(i,r,G,null,u,W);for(se in u)W=u[se],ee=l[se],!u.hasOwnProperty(se)||W===ee||W==null&&ee==null||mt(i,r,se,W,u,ee)}function Ix(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hN(){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 I=l[u],X=I.startTime;if(X>k)break;var ie=I.transferSize,se=I.initiatorType;ie&&Ix(se)&&(I=I.responseEnd,E+=ie*(I<k?1:(k-X)/(I-X)))}if(--u,r+=8*(b+E)/(p.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Fh=null,Ph=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 qh(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 Hh=null;function mN(){var i=window.event;return i&&i.type==="popstate"?i===Hh?!1:(Hh=i,!0):(Hh=null,!1)}var Ux=typeof setTimeout=="function"?setTimeout:void 0,pN=typeof clearTimeout=="function"?clearTimeout:void 0,$x=typeof Promise=="function"?Promise:void 0,gN=typeof queueMicrotask=="function"?queueMicrotask:typeof $x<"u"?function(i){return $x.resolve(null).then(i).catch(bN)}:Ux;function bN(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")Io(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Io(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"&&Io(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 Kh(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":Kh(l),Xl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function yN(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 xN(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 Gh(i){return i.data==="$?"||i.data==="$~"}function Qh(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function vN(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 Yh=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 Io(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);Xl(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=oe.d;oe.d={f:EN,r:SN,D:wN,C:_N,L:NN,m:kN,X:CN,S:TN,M:AN};function EN(){var i=va.f(),r=vu();return i||r}function SN(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 wN(i){va.D(i),Yx("dns-prefetch",i,null)}function _N(i,r){va.C(i,r),Yx("preconnect",i,r)}function NN(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(zo(b))||r==="script"&&u.querySelector(Bo(b))||(r=u.createElement("link"),cn(r,"link",i),Ht(r),u.head.appendChild(r)))}}function kN(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(Bo(b)))return}u=l.createElement("link"),cn(u,"link",i),Ht(u),l.head.appendChild(u)}}}function TN(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(zo(b)))k.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":r},l),(l=gi.get(b))&&Vh(i,l);var I=E=u.createElement("link");Ht(I),cn(I,"link",i),I._p=new Promise(function(X,ie){I.onload=X,I.onerror=ie}),I.addEventListener("load",function(){k.loading|=1}),I.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Ou(E,r,u)}E={type:"stylesheet",instance:E,count:1,state:k},p.set(b,E)}}}function CN(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(Bo(p)),b||(i=g({src:i,async:!0},r),(r=gi.get(p))&&Xh(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 AN(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(Bo(p)),b||(i=g({src:i,async:!0,type:"module"},r),(r=gi.get(p))&&Xh(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(zo(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||ON(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 zo(i){return'link[rel="stylesheet"]['+i+"]"}function Xx(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function ON(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 Bo(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(zo(p));if(b)return r.state.loading|=4,r.instance=b,Ht(b),b;u=Xx(l),(p=gi.get(p))&&Vh(u,p),b=(i.ownerDocument||i).createElement("link"),Ht(b);var E=b;return E._p=new Promise(function(k,I){E.onload=k,E.onerror=I}),cn(b,"link",u),r.state.loading|=4,Ou(b,l.precedence,i),r.instance=b;case"script":return b=tl(l.src),(p=i.querySelector(Bo(b)))?(r.instance=p,Ht(p),p):(u=l,(p=gi.get(b))&&(u=g({},l),Xh(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 Vh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function Xh(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 RN(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 MN(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(zo(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))&&Vh(u,p),b=b.createElement("link"),Ht(b);var E=b;E._p=new Promise(function(k,I){E.onload=k,E.onerror=I}),cn(b,"link",u),l.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=Mu.bind(i),r.addEventListener("load",l),r.addEventListener("error",l))}}var Zh=0;function jN(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&&Zh===0&&(Zh=62500*hN());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>Zh?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(DN,i),ju=null,Mu.call(i))}function DN(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 Uo={$$typeof:A,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function LN(i,r,l,u,p,b,E,k,I){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wt(0),this.hiddenUpdates=wt(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function tv(i,r,l,u,p,b,E,k,I,X,ie,se){return i=new LN(i,r,l,E,I,X,ie,se,k),r=1,b===!0&&(r|=24),b=Xn(3,null,null,r),i.current=b,b.stateNode=i,r=Od(),r.refCount++,i.pooledCache=r,r.refCount++,b.memoizedState={element:u,isDehydrated:l,cache:r},Dd(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),bo(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 Wh(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),Wh(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),Wh(i,r)}}var Lu=!0;function IN(i,r,l,u){var p=K.T;K.T=null;var b=oe.p;try{oe.p=2,Jh(i,r,l,u)}finally{oe.p=b,K.T=p}}function zN(i,r,l,u){var p=K.T;K.T=null;var b=oe.p;try{oe.p=8,Jh(i,r,l,u)}finally{oe.p=b,K.T=p}}function Jh(i,r,l,u){if(Lu){var p=em(u);if(p===null)Uh(i,r,u,Iu,l),ov(i,u);else if(UN(p,i,r,l,u))u.stopPropagation();else if(ov(i,u),r&4&&-1<BN.indexOf(i)){for(;p!==null;){var b=na(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=Cn(b.pendingLanes);if(E!==0){var k=b;for(k.pendingLanes|=2,k.entangledLanes|=2;E;){var I=1<<31-lt(E);k.entanglements[1]|=I,E&=~I}qi(b),(at&6)===0&&(yu=Ot()+500,jo(0))}}break;case 31:case 13:k=Lr(b,2),k!==null&&In(k,b,2),vu(),Wh(b,2)}if(b=em(u),b===null&&Uh(i,r,u,Iu,l),b===p)break;p=b}p!==null&&u.stopPropagation()}else Uh(i,r,u,null,l)}}function em(i){return i=Ie(i),tm(i)}var Iu=null;function tm(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 nm=!1,tr=null,nr=null,ir=null,$o=new Map,Fo=new Map,ar=[],BN="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":$o.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fo.delete(r.pointerId)}}function Po(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 UN(i,r,l,u,p){switch(r){case"focusin":return tr=Po(tr,i,r,l,u,p),!0;case"dragenter":return nr=Po(nr,i,r,l,u,p),!0;case"mouseover":return ir=Po(ir,i,r,l,u,p),!0;case"pointerover":var b=p.pointerId;return $o.set(b,Po($o.get(b)||null,i,r,l,u,p)),!0;case"gotpointercapture":return b=p.pointerId,Fo.set(b,Po(Fo.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=em(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 $N(){nm=!1,tr!==null&&zu(tr)&&(tr=null),nr!==null&&zu(nr)&&(nr=null),ir!==null&&zu(ir)&&(ir=null),$o.forEach(uv),Fo.forEach(uv)}function Bu(i,r){i.blockedOn===r&&(i.blockedOn=null,nm||(nm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$N)))}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(tm(u||l)===null)continue;break}var b=na(l);b!==null&&(i.splice(r,3),r-=3,eh(b,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function nl(i){function r(I){return Bu(I,i)}tr!==null&&Bu(tr,i),nr!==null&&Bu(nr,i),ir!==null&&Bu(ir,i),$o.forEach(r),Fo.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(tm(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 im(i){this._internalRoot=i}$u.prototype.render=im.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=im.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"));oe.findDOMNode=function(i){var r=i._reactInternals;if(r===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=h(r),i=i!==null?y(i):null,i=i===null?null:i.stateNode,i};var FN={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(FN),Dt=Fu}catch{}}return Ho.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,Bh(i),new im(r)},Ho.hydrateRoot=function(i,r,l){if(!s(i))throw Error(a(299));var u=!1,p="",b=vy,E=Ey,k=Sy,I=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(b=l.onUncaughtError),l.onCaughtError!==void 0&&(E=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(I=l.formState)),r=tv(i,1,!0,r,l??null,u,p,I,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,Bh(i),new $u(r)},Ho.version="19.2.5",Ho}var Nv;function JN(){if(Nv)return lm.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(),lm.exports=WN(),lm.exports}var ek=JN(),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,tk=(oE=class extends jl{constructor(){super();_e(this,ts);_e(this,ur);_e(this,bl);ge(this,bl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,ur)||this.setEventListener(z(this,bl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,ur))==null||t.call(this),ge(this,ur,void 0))}setEventListener(t){var n;ge(this,bl,t),(n=z(this,ur))==null||n.call(this),ge(this,ur,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){z(this,ts)!==t&&(ge(this,ts,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof z(this,ts)=="boolean"?z(this,ts):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ts=new WeakMap,ur=new WeakMap,bl=new WeakMap,oE),Op=new tk,nk={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fr,Tp,cE,ik=(cE=class{constructor(){_e(this,fr,nk);_e(this,Tp,!1)}setTimeoutProvider(e){ge(this,fr,e)}setTimeout(e,t){return z(this,fr).setTimeout(e,t)}clearTimeout(e){z(this,fr).clearTimeout(e)}setInterval(e,t){return z(this,fr).setInterval(e,t)}clearInterval(e){z(this,fr).clearInterval(e)}},fr=new WeakMap,Tp=new WeakMap,cE),Zr=new ik;function ak(e){setTimeout(e,0)}var rk=typeof window>"u"||"Deno"in globalThis;function _n(){}function sk(e,t){return typeof e=="function"?e(t):e}function Hm(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!==Rp(c,t.options))return!1}else if(!ac(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(!ac(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function Rp(e,t){return((t==null?void 0:t.queryKeyHashFn)||us)(e)}function us(e){return JSON.stringify(e,(t,n)=>Km(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function ac(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ac(e[n],t[n])):!1}var lk=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&&!(Km(e)&&Km(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:lk.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 Km(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 ok(e){return new Promise(t=>{Zr.setTimeout(t,e)})}function Gm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?vE(e,t):t}function ck(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function uk(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var Mp=Symbol();function EE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Mp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function jp(e,t){return typeof e=="function"?e(...t):!!e}function fk(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 rc=(()=>{let e=()=>rk;return{isServer(){return e()},setIsServer(t){e=t}}})();function Qm(){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 dk=ak;function hk(){let e=[],t=0,n=f=>{f()},a=f=>{f()},s=dk;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 Jt=hk(),yl,dr,xl,uE,mk=(uE=class extends jl{constructor(){super();_e(this,yl,!0);_e(this,dr);_e(this,xl);ge(this,xl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}})}onSubscribe(){z(this,dr)||this.setEventListener(z(this,xl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,dr))==null||t.call(this),ge(this,dr,void 0))}setEventListener(t){var n;ge(this,xl,t),(n=z(this,dr))==null||n.call(this),ge(this,dr,t(this.setOnline.bind(this)))}setOnline(t){z(this,yl)!==t&&(ge(this,yl,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return z(this,yl)}},yl=new WeakMap,dr=new WeakMap,xl=new WeakMap,uE),gf=new mk;function pk(e){return Math.min(1e3*2**e,3e4)}function SE(e){return(e??"online")==="online"?gf.isOnline():!0}var Ym=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wE(e){let t=!1,n=0,a;const s=Qm(),o=()=>s.status!=="pending",c=w=>{var N;if(!o()){const _=new Ym(w);x(_),(N=e.onCancel)==null||N.call(e,_)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>Op.isFocused()&&(e.networkMode==="always"||gf.isOnline())&&e.canRun(),y=()=>SE(e.networkMode)&&e.canRun(),g=w=>{o()||(a==null||a(),s.resolve(w))},x=w=>{o()||(a==null||a(),s.reject(w))},v=()=>new Promise(w=>{var N;a=_=>{(o()||h())&&w(_)},(N=e.onPause)==null||N.call(e)}).then(()=>{var w;a=void 0,o()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(o())return;let w;const N=n===0?e.initialPromise:void 0;try{w=N??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{var M;if(o())return;const R=e.retry??(rc.isServer()?0:3),A=e.retryDelay??pk,D=typeof A=="function"?A(n,_):A,F=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,_);if(t||!F){x(_);return}n++,(M=e.onFail)==null||M.call(e,n,_),ok(D).then(()=>h()?void 0:v()).then(()=>{t?x(_):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,_E=(fE=class{constructor(){_e(this,ns)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hm(this.gcTime)&&ge(this,ns,Zr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(rc.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,ns)!==void 0&&(Zr.clearTimeout(z(this,ns)),ge(this,ns,void 0))}},ns=new WeakMap,fE),is,vl,bi,as,nn,dc,rs,ii,NE,Ea,dE,gk=(dE=class extends _E{constructor(t){super();_e(this,ii);_e(this,is);_e(this,vl);_e(this,bi);_e(this,as);_e(this,nn);_e(this,dc);_e(this,rs);ge(this,rs,!1),ge(this,dc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,as,t.client),ge(this,bi,z(this,as).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,is,Rv(this.options)),this.state=t.state??z(this,is),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,nn))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,dc),...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"&&z(this,bi).remove(this)}setData(t,n){const a=Gm(this.state.data,t,this.options);return Ue(this,ii,Ea).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){Ue(this,ii,Ea).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=z(this,nn))==null?void 0:a.promise;return(s=z(this,nn))==null||s.cancel(t),n?n.then(_n).catch(_n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,is)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>yi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mp||!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=z(this,nn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,nn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,bi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(z(this,nn)&&(z(this,rs)||Ue(this,ii,NE).call(this)?z(this,nn).cancel({revert:!0}):z(this,nn).cancelRetry()),this.scheduleGc()),z(this,bi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,ii,Ea).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,y,g,x,v,S,w,N,_,R,A;if(this.state.fetchStatus!=="idle"&&((d=z(this,nn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,nn))return z(this,nn).continueRetry(),z(this,nn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(F=>F.options.queryFn);D&&this.setOptions(D.options)}const a=new AbortController,s=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(ge(this,rs,!0),a.signal)})},o=()=>{const D=EE(this.options,n),M=(()=>{const H={client:z(this,as),queryKey:this.queryKey,meta:this.meta};return s(H),H})();return ge(this,rs,!1),this.options.persister?this.options.persister(D,M,this):D(M)},f=(()=>{const D={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,as),state:this.state,fetchFn:o};return s(D),D})();(h=this.options.behavior)==null||h.onFetch(f,this),ge(this,vl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=f.fetchOptions)==null?void 0:y.meta))&&Ue(this,ii,Ea).call(this,{type:"fetch",meta:(g=f.fetchOptions)==null?void 0:g.meta}),ge(this,nn,wE({initialPromise:n==null?void 0:n.initialPromise,fn:f.fetchFn,onCancel:D=>{D instanceof Ym&&D.revert&&this.setState({...z(this,vl),fetchStatus:"idle"}),a.abort()},onFail:(D,F)=>{Ue(this,ii,Ea).call(this,{type:"failed",failureCount:D,error:F})},onPause:()=>{Ue(this,ii,Ea).call(this,{type:"pause"})},onContinue:()=>{Ue(this,ii,Ea).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const D=await z(this,nn).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(v=(x=z(this,bi).config).onSuccess)==null||v.call(x,D,this),(w=(S=z(this,bi).config).onSettled)==null||w.call(S,D,this.state.error,this),D}catch(D){if(D instanceof Ym){if(D.silent)return z(this,nn).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw Ue(this,ii,Ea).call(this,{type:"error",error:D}),(_=(N=z(this,bi).config).onError)==null||_.call(N,D,this),(A=(R=z(this,bi).config).onSettled)==null||A.call(R,this.state.data,D,this),D}finally{this.scheduleGc()}}},is=new WeakMap,vl=new WeakMap,bi=new WeakMap,as=new WeakMap,nn=new WeakMap,dc=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),Jt.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),z(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,hc,Sn,ss,El,Sa,hr,mc,Sl,wl,ls,os,mr,_l,rt,Wo,Vm,Xm,Zm,Wm,Jm,ep,tp,TE,hE,bk=(hE=class extends jl{constructor(t,n){super();_e(this,rt);_e(this,Un);_e(this,We);_e(this,hc);_e(this,Sn);_e(this,ss);_e(this,El);_e(this,Sa);_e(this,hr);_e(this,mc);_e(this,Sl);_e(this,wl);_e(this,ls);_e(this,os);_e(this,mr);_e(this,_l,new Set);this.options=n,ge(this,Un,t),ge(this,hr,null),ge(this,Sa,Qm()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,We).addObserver(this),Mv(z(this,We),this.options)?Ue(this,rt,Wo).call(this):this.updateResult(),Ue(this,rt,Wm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return np(z(this,We),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return np(z(this,We),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,rt,Jm).call(this),Ue(this,rt,ep).call(this),z(this,We).removeObserver(this)}setOptions(t){const n=this.options,a=z(this,We);if(this.options=z(this,Un).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,z(this,We))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,rt,tp).call(this),z(this,We).setOptions(this.options),n._defaulted&&!pf(this.options,n)&&z(this,Un).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,We),observer:this});const s=this.hasListeners();s&&jv(z(this,We),a,this.options,n)&&Ue(this,rt,Wo).call(this),this.updateResult(),s&&(z(this,We)!==a||yi(this.options.enabled,z(this,We))!==yi(n.enabled,z(this,We))||xr(this.options.staleTime,z(this,We))!==xr(n.staleTime,z(this,We)))&&Ue(this,rt,Vm).call(this);const o=Ue(this,rt,Xm).call(this);s&&(z(this,We)!==a||yi(this.options.enabled,z(this,We))!==yi(n.enabled,z(this,We))||o!==z(this,mr))&&Ue(this,rt,Zm).call(this,o)}getOptimisticResult(t){const n=z(this,Un).getQueryCache().build(z(this,Un),t),a=this.createResult(n,t);return xk(this,a)&&(ge(this,Sn,a),ge(this,El,this.options),ge(this,ss,z(this,We).state)),a}getCurrentResult(){return z(this,Sn)}trackResult(t,n){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Sa).status==="pending"&&z(this,Sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){z(this,_l).add(t)}getCurrentQuery(){return z(this,We)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=z(this,Un).defaultQueryOptions(t),a=z(this,Un).getQueryCache().build(z(this,Un),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return Ue(this,rt,Wo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,Sn)))}createResult(t,n){var J;const a=z(this,We),s=this.options,o=z(this,Sn),c=z(this,ss),f=z(this,El),h=t!==a?t.state:z(this,hc),{state:y}=t;let g={...y},x=!1,v;if(n._optimisticResults){const C=this.hasListeners(),P=!C&&Mv(t,n),Y=C&&jv(t,a,n,s);(P||Y)&&(g={...g,...kE(y.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:S,errorUpdatedAt:w,status:N}=g;v=g.data;let _=!1;if(n.placeholderData!==void 0&&v===void 0&&N==="pending"){let C;o!=null&&o.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(C=o.data,_=!0):C=typeof n.placeholderData=="function"?n.placeholderData((J=z(this,wl))==null?void 0:J.state.data,z(this,wl)):n.placeholderData,C!==void 0&&(N="success",v=Gm(o==null?void 0:o.data,C,n),x=!0)}if(n.select&&v!==void 0&&!_)if(o&&v===(c==null?void 0:c.data)&&n.select===z(this,mc))v=z(this,Sl);else try{ge(this,mc,n.select),v=n.select(v),v=Gm(o==null?void 0:o.data,v,n),ge(this,Sl,v),ge(this,hr,null)}catch(C){ge(this,hr,C)}z(this,hr)&&(S=z(this,hr),v=z(this,Sl),w=Date.now(),N="error");const R=g.fetchStatus==="fetching",A=N==="pending",D=N==="error",F=A&&R,M=v!==void 0,U={status:N,fetchStatus:g.fetchStatus,isPending:A,isSuccess:N==="success",isError:D,isInitialLoading:F,isLoading:F,data:v,dataUpdatedAt:g.dataUpdatedAt,error:S,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:D&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:D&&M,isStale:Dp(t,n),refetch:this.refetch,promise:z(this,Sa),isEnabled:yi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=U.data!==void 0,P=U.status==="error"&&!C,Y=Q=>{P?Q.reject(U.error):C&&Q.resolve(U.data)},le=()=>{const Q=ge(this,Sa,U.promise=Qm());Y(Q)},q=z(this,Sa);switch(q.status){case"pending":t.queryHash===a.queryHash&&Y(q);break;case"fulfilled":(P||U.data!==q.value)&&le();break;case"rejected":(!P||U.error!==q.reason)&&le();break}}return U}updateResult(){const t=z(this,Sn),n=this.createResult(z(this,We),this.options);if(ge(this,ss,z(this,We).state),ge(this,El,this.options),z(this,ss).data!==void 0&&ge(this,wl,z(this,We)),pf(n,t))return;ge(this,Sn,n);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!z(this,_l).size)return!0;const c=new Set(o??z(this,_l));return this.options.throwOnError&&c.add("error"),Object.keys(z(this,Sn)).some(f=>{const d=f;return z(this,Sn)[d]!==t[d]&&c.has(d)})};Ue(this,rt,TE).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,rt,Wm).call(this)}},Un=new WeakMap,We=new WeakMap,hc=new WeakMap,Sn=new WeakMap,ss=new WeakMap,El=new WeakMap,Sa=new WeakMap,hr=new WeakMap,mc=new WeakMap,Sl=new WeakMap,wl=new WeakMap,ls=new WeakMap,os=new WeakMap,mr=new WeakMap,_l=new WeakMap,rt=new WeakSet,Wo=function(t){Ue(this,rt,tp).call(this);let n=z(this,We).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(_n)),n},Vm=function(){Ue(this,rt,Jm).call(this);const t=xr(this.options.staleTime,z(this,We));if(rc.isServer()||z(this,Sn).isStale||!Hm(t))return;const a=xE(z(this,Sn).dataUpdatedAt,t)+1;ge(this,ls,Zr.setTimeout(()=>{z(this,Sn).isStale||this.updateResult()},a))},Xm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,We)):this.options.refetchInterval)??!1},Zm=function(t){Ue(this,rt,ep).call(this),ge(this,mr,t),!(rc.isServer()||yi(this.options.enabled,z(this,We))===!1||!Hm(z(this,mr))||z(this,mr)===0)&&ge(this,os,Zr.setInterval(()=>{(this.options.refetchIntervalInBackground||Op.isFocused())&&Ue(this,rt,Wo).call(this)},z(this,mr)))},Wm=function(){Ue(this,rt,Vm).call(this),Ue(this,rt,Zm).call(this,Ue(this,rt,Xm).call(this))},Jm=function(){z(this,ls)!==void 0&&(Zr.clearTimeout(z(this,ls)),ge(this,ls,void 0))},ep=function(){z(this,os)!==void 0&&(Zr.clearInterval(z(this,os)),ge(this,os,void 0))},tp=function(){const t=z(this,Un).getQueryCache().build(z(this,Un),this.options);if(t===z(this,We))return;const n=z(this,We);ge(this,We,t),ge(this,hc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},TE=function(t){Jt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(z(this,Sn))}),z(this,Un).getQueryCache().notify({query:z(this,We),type:"observerResultsUpdated"})})},hE);function yk(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 yk(e,t)||e.state.data!==void 0&&np(e,t,t.refetchOnMount)}function np(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&&Dp(e,t)}return!1}function jv(e,t,n,a){return(e!==t||yi(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Dp(e,n)}function Dp(e,t){return yi(t.enabled,e)!==!1&&e.isStaleByTime(xr(t.staleTime,e))}function xk(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 w=!1;const N=A=>{fk(A,()=>t.signal,()=>w=!0)},_=EE(t.options,t.fetchOptions),R=async(A,D,F)=>{if(w)return Promise.reject();if(D==null&&A.pages.length)return Promise.resolve(A);const H=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:D,direction:F?"backward":"forward",meta:t.options.meta};return N(P),P})(),U=await _(H),{maxPages:J}=t.options,C=F?uk:ck;return{pages:C(A.pages,U,J),pageParams:C(A.pageParams,D,J)}};if(s&&o.length){const A=s==="backward",D=A?vk:Lv,F={pages:o,pageParams:c},M=D(a,F);f=await R(F,M,A)}else{const A=e??o.length;do{const D=d===0?c[0]??a.initialPageParam: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 w,N;return(N=(w=t.options).persister)==null?void 0:N.call(w,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 vk(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 pc,Gi,mn,cs,Qi,or,mE,Ek=(mE=class extends _E{constructor(t){super();_e(this,Qi);_e(this,pc);_e(this,Gi);_e(this,mn);_e(this,cs);ge(this,pc,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){z(this,Gi).includes(t)||(z(this,Gi).push(t),this.clearGcTimeout(),z(this,mn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,Gi,z(this,Gi).filter(n=>n!==t)),this.scheduleGc(),z(this,mn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Gi).length||(this.state.status==="pending"?this.scheduleGc():z(this,mn).remove(this))}continue(){var t;return((t=z(this,cs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,f,d,h,y,g,x,v,S,w,N,_,R,A,D,F,M,H;const n=()=>{Ue(this,Qi,or).call(this,{type:"continue"})},a={client:z(this,pc),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,cs,wE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(U,J)=>{Ue(this,Qi,or).call(this,{type:"failed",failureCount:U,error:J})},onPause:()=>{Ue(this,Qi,or).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,mn).canRun(this)}));const s=this.state.status==="pending",o=!z(this,cs).canStart();try{if(s)n();else{Ue(this,Qi,or).call(this,{type:"pending",variables:t,isPaused:o}),z(this,mn).config.onMutate&&await z(this,mn).config.onMutate(t,this,a);const J=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,a));J!==this.state.context&&Ue(this,Qi,or).call(this,{type:"pending",context:J,variables:t,isPaused:o})}const U=await z(this,cs).start();return await((h=(d=z(this,mn).config).onSuccess)==null?void 0:h.call(d,U,t,this.state.context,this,a)),await((g=(y=this.options).onSuccess)==null?void 0:g.call(y,U,t,this.state.context,a)),await((v=(x=z(this,mn).config).onSettled)==null?void 0:v.call(x,U,null,this.state.variables,this.state.context,this,a)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,U,null,t,this.state.context,a)),Ue(this,Qi,or).call(this,{type:"success",data:U}),U}catch(U){try{await((_=(N=z(this,mn).config).onError)==null?void 0:_.call(N,U,t,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((A=(R=this.options).onError)==null?void 0:A.call(R,U,t,this.state.context,a))}catch(J){Promise.reject(J)}try{await((F=(D=z(this,mn).config).onSettled)==null?void 0:F.call(D,void 0,U,this.state.variables,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((H=(M=this.options).onSettled)==null?void 0:H.call(M,void 0,U,t,this.state.context,a))}catch(J){Promise.reject(J)}throw Ue(this,Qi,or).call(this,{type:"error",error:U}),U}finally{z(this,mn).runNext(this)}}},pc=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),Jt.batch(()=>{z(this,Gi).forEach(a=>{a.onMutationUpdate(t)}),z(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 wa,Oi,gc,pE,Sk=(pE=class extends jl{constructor(t={}){super();_e(this,wa);_e(this,Oi);_e(this,gc);this.config=t,ge(this,wa,new Set),ge(this,Oi,new Map),ge(this,gc,0)}build(t,n,a){const s=new Ek({client:t,mutationCache:this,mutationId:++Pu(this,gc)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){z(this,wa).add(t);const n=qu(t);if(typeof n=="string"){const a=z(this,Oi).get(n);a?a.push(t):z(this,Oi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,wa).delete(t)){const n=qu(t);if(typeof n=="string"){const a=z(this,Oi).get(n);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&z(this,Oi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=qu(t);if(typeof n=="string"){const a=z(this,Oi).get(n),s=a==null?void 0:a.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var a;const n=qu(t);if(typeof n=="string"){const s=(a=z(this,Oi).get(n))==null?void 0:a.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Jt.batch(()=>{z(this,wa).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,wa).clear(),z(this,Oi).clear()})}getAll(){return Array.from(z(this,wa))}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){Jt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Jt.batch(()=>Promise.all(t.map(n=>n.continue().catch(_n))))}},wa=new WeakMap,Oi=new WeakMap,gc=new WeakMap,pE);function qu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var _a,pr,$n,Na,Ca,lf,ip,gE,wk=(gE=class extends jl{constructor(n,a){super();_e(this,Ca);_e(this,_a);_e(this,pr);_e(this,$n);_e(this,Na);ge(this,_a,n),this.setOptions(a),this.bindMethods(),Ue(this,Ca,lf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const a=this.options;this.options=z(this,_a).defaultMutationOptions(n),pf(this.options,a)||z(this,_a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,$n),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&us(a.mutationKey)!==us(this.options.mutationKey)?this.reset():((s=z(this,$n))==null?void 0:s.state.status)==="pending"&&z(this,$n).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=z(this,$n))==null||n.removeObserver(this)}onMutationUpdate(n){Ue(this,Ca,lf).call(this),Ue(this,Ca,ip).call(this,n)}getCurrentResult(){return z(this,pr)}reset(){var n;(n=z(this,$n))==null||n.removeObserver(this),ge(this,$n,void 0),Ue(this,Ca,lf).call(this),Ue(this,Ca,ip).call(this)}mutate(n,a){var s;return ge(this,Na,a),(s=z(this,$n))==null||s.removeObserver(this),ge(this,$n,z(this,_a).getMutationCache().build(z(this,_a),this.options)),z(this,$n).addObserver(this),z(this,$n).execute(n)}},_a=new WeakMap,pr=new WeakMap,$n=new WeakMap,Na=new WeakMap,Ca=new WeakSet,lf=function(){var a;const n=((a=z(this,$n))==null?void 0:a.state)??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})},ip=function(n){Jt.batch(()=>{var a,s,o,c,f,d,h,y;if(z(this,Na)&&this.hasListeners()){const g=z(this,pr).variables,x=z(this,pr).context,v={client:z(this,_a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=z(this,Na)).onSuccess)==null||s.call(a,n.data,g,x,v)}catch(S){Promise.reject(S)}try{(c=(o=z(this,Na)).onSettled)==null||c.call(o,n.data,null,g,x,v)}catch(S){Promise.reject(S)}}else if((n==null?void 0:n.type)==="error"){try{(d=(f=z(this,Na)).onError)==null||d.call(f,n.error,g,x,v)}catch(S){Promise.reject(S)}try{(y=(h=z(this,Na)).onSettled)==null||y.call(h,void 0,n.error,g,x,v)}catch(S){Promise.reject(S)}}}this.listeners.forEach(g=>{g(z(this,pr))})})},gE),Yi,bE,_k=(bE=class extends jl{constructor(t={}){super();_e(this,Yi);this.config=t,ge(this,Yi,new Map)}build(t,n,a){const s=n.queryKey,o=n.queryHash??Rp(s,n);let c=this.get(o);return c||(c=new gk({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(c)),c}add(t){z(this,Yi).has(t.queryHash)||(z(this,Yi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,Yi).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,Yi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Yi).get(t)}getAll(){return[...z(this,Yi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>kv(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>kv(t,a)):n}notify(t){Jt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yi=new WeakMap,bE),zt,gr,br,Nl,kl,yr,Tl,Cl,yE,Nk=(yE=class{constructor(e={}){_e(this,zt);_e(this,gr);_e(this,br);_e(this,Nl);_e(this,kl);_e(this,yr);_e(this,Tl);_e(this,Cl);ge(this,zt,e.queryCache||new _k),ge(this,gr,e.mutationCache||new Sk),ge(this,br,e.defaultOptions||{}),ge(this,Nl,new Map),ge(this,kl,new Map),ge(this,yr,0)}mount(){Pu(this,yr)._++,z(this,yr)===1&&(ge(this,Tl,Op.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,zt).onFocus())})),ge(this,Cl,gf.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,zt).onOnline())})))}unmount(){var e,t;Pu(this,yr)._--,z(this,yr)===0&&((e=z(this,Tl))==null||e.call(this),ge(this,Tl,void 0),(t=z(this,Cl))==null||t.call(this),ge(this,Cl,void 0))}isFetching(e){return z(this,zt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,gr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,zt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(this,zt).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(xr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return z(this,zt).findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),s=z(this,zt).get(a.queryHash),o=s==null?void 0:s.state.data,c=sk(t,o);if(c!==void 0)return z(this,zt).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return Jt.batch(()=>z(this,zt).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,zt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,zt);Jt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,zt);return Jt.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=Jt.batch(()=>z(this,zt).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(_n).catch(_n)}invalidateQueries(e,t={}){return Jt.batch(()=>(z(this,zt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=Jt.batch(()=>z(this,zt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(_n)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(_n)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=z(this,zt).build(this,t);return n.isStaleByTime(xr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_n).catch(_n)}fetchInfiniteQuery(e){return e.behavior=Dv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_n).catch(_n)}ensureInfiniteQueryData(e){return e.behavior=Dv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gf.isOnline()?z(this,gr).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,zt)}getMutationCache(){return z(this,gr)}getDefaultOptions(){return z(this,br)}setDefaultOptions(e){ge(this,br,e)}setQueryDefaults(e,t){z(this,Nl).set(us(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,Nl).values()],n={};return t.forEach(a=>{ac(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){z(this,kl).set(us(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,kl).values()],n={};return t.forEach(a=>{ac(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,br).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Rp(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===Mp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,br).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,zt).clear(),z(this,gr).clear()}},zt=new WeakMap,gr=new WeakMap,br=new WeakMap,Nl=new WeakMap,kl=new WeakMap,yr=new WeakMap,Tl=new WeakMap,Cl=new WeakMap,yE),AE=j.createContext(void 0),Tn=e=>{const t=j.useContext(AE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},kk=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(AE.Provider,{value:e,children:t})),OE=j.createContext(!1),Tk=()=>j.useContext(OE);OE.Provider;function Ck(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ak=j.createContext(Ck()),Ok=()=>j.useContext(Ak),Rk=(e,t,n)=>{const a=n!=null&&n.state.error&&typeof e.throwOnError=="function"?jp(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},Mk=e=>{j.useEffect(()=>{e.clearReset()},[e])},jk=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||jp(n,[e.error,a])),Dk=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))}},Lk=(e,t)=>e.isLoading&&e.isFetching&&!t,Ik=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Iv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function zk(e,t,n){var x,v,S,w;const a=Tk(),s=Ok(),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",Dk(c),Rk(c,s,f),Mk(s);const d=!o.getQueryCache().get(c.queryHash),[h]=j.useState(()=>new t(o,c)),y=h.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(N=>{const _=g?h.subscribe(Jt.batchCalls(N)):_n;return h.updateResult(),_},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),j.useEffect(()=>{h.setOptions(c)},[c,h]),Ik(c,y))throw Iv(c,h,s);if(jk({result:y,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw y.error;if((w=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||w.call(S,c,y),c.experimental_prefetchInRender&&!rc.isServer()&&Lk(y,a)){const N=d?Iv(c,h,s):f==null?void 0:f.promise;N==null||N.catch(_n).finally(()=>{h.updateResult()})}return c.notifyOnChangeProps?y:h.trackResult(y)}function dt(e,t){return zk(e,bk)}function Pn(e,t){const n=Tn(),[a]=j.useState(()=>new wk(n,e));j.useEffect(()=>{a.setOptions(e)},[a,e]);const s=j.useSyncExternalStore(j.useCallback(c=>a.subscribe(Jt.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=j.useCallback((c,f)=>{a.mutate(c,f).catch(_n)},[a]);if(s.error&&jp(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/**
50
50
  * react-router v7.14.2
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -207,7 +207,7 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
207
207
  *
208
208
  * This source code is licensed under the ISC license.
209
209
  * See the LICENSE file in the root directory of this source tree.
210
- */const uA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Zt=Oe("loader-circle",uA);/**
210
+ */const uA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],en=Oe("loader-circle",uA);/**
211
211
  * @license lucide-react v0.544.0 - ISC
212
212
  *
213
213
  * This source code is licensed under the ISC license.
@@ -332,7 +332,7 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
332
332
  *
333
333
  * This source code is licensed under the ISC license.
334
334
  * See the LICENSE file in the root directory of this source tree.
335
- */const qA=[["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"}]],Vp=Oe("zap",qA),HA=[{to:"/chat",label:"对话",icon:hA},{to:"/projects",label:"项目",icon:lA},{to:"/board",label:"看板",icon:rA},{to:"/workers",label:"Workers",icon:a1},{to:"/logs",label:"Logs",icon:Kp},{to:"/skills",label:"Skills",icon:JC},{to:"/system",label:"系统",icon:n1}];function KA(){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:HA.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 GA 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 GA(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}function s1(){return Bt("/api/system/info")}function QA(){return Bt("/api/system/env")}function YA(){return Bt("/api/system/doctor/all")}function VA(){return Bt("/api/system/env/raw")}async function XA(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 ZA(){return Bt("/api/system/latest-version")}async function WA(){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 Bl(){return Bt("/api/projects")}function JA(e){return Bt(`/api/projects/${encodeURIComponent(e)}`)}async function e2(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 t2(e){return Bt(`/api/projects/${encodeURIComponent(e)}/conf`)}async function n2(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 i2(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 a2(e){return Bt(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function r2(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 s2(e,t){return Bt(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function l2(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 o2(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 c2(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 u2(){var f;const e=dt({queryKey:["system-info"],queryFn:s1,refetchInterval:3e4}),t=dt({queryKey:["projects"],queryFn:Bl,refetchInterval:1e4}),n=d2(),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(f2,{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 f2({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(qp,{size:9,strokeWidth:2.5}),"SSE·down"]})}function d2(){const[e,t]=j.useState("connecting"),n=j.useRef(null);return j.useEffect(()=>{const a=new EventSource("/stream/heartbeat");return n.current=a,a.addEventListener("server.heartbeat",()=>t("open")),a.addEventListener("error",()=>t("closed")),a.addEventListener("open",()=>t("open")),()=>{a.close(),n.current=null}},[]),e}function h2(){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(KA,{})}),m.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:m.jsx(IT,{})}),m.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:m.jsx(u2,{})})]})}function lp(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 m2(){typeof window>"u"||(window.addEventListener("error",e=>{lp(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;lp(t instanceof Error?t:String(t),"unhandledrejection")}))}class p2 extends j.Component{constructor(){super(...arguments);pv(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,a){var s;lp(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 g2(){const e=wr(),{data:t,isLoading:n,isError:a,error:s,refetch:o}=dt({queryKey:["projects"],queryFn:Bl});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(x2,{}),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(v2,{}),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(b2,{project:c},c.name))})]})}function b2({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(y2,{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(mm,{label:"cards",value:e.cards.total,accent:"purple"}),m.jsx(mm,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),m.jsx(mm,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function mm({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 y2({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 x2(){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 v2(){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 E2({title:e,body:t,confirm:n,onConfirm:a,onCancel:s,danger:o}){return j.useEffect(()=>{const c=f=>{f.key==="Escape"&&s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),m.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:m.jsxs("div",{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=j.createContext(null);function S2({children:e}){const[t,n]=j.useState(null),a=j.useCallback(c=>new Promise(f=>{n({kind:"confirm",opts:c,resolve:d=>{n(null),f(d)}})}),[]),s=j.useCallback(c=>new Promise(f=>{n({kind:"alert",opts:c,resolve:()=>{n(null),f()}})}),[]),o=j.useCallback(c=>new Promise(f=>{n({kind:"prompt",opts:c,resolve:d=>{n(null),f(d)}})}),[]);return m.jsxs(l1.Provider,{value:{confirm:a,alert:s,prompt:o},children:[e,(t==null?void 0:t.kind)==="confirm"&&m.jsx(E2,{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(w2,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"知道了",onClose:()=>t.resolve()}),(t==null?void 0:t.kind)==="prompt"&&m.jsx(_2,{title:t.opts.title,body:t.opts.body,placeholder:t.opts.placeholder,defaultValue:t.opts.defaultValue,confirm:t.opts.confirm??"确定",cancel:t.opts.cancel??"取消",onConfirm:c=>t.resolve(c),onCancel:()=>t.resolve(null)})]})}function qn(){const e=j.useContext(l1);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function w2({title:e,body:t,confirm:n,onClose:a}){return j.useEffect(()=>{const s=o=>{(o.key==="Escape"||o.key==="Enter")&&a()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:m.jsxs("div",{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 _2({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:o,onConfirm:c,onCancel:f}){const[d,h]=j.useState(a??""),y=j.useRef(null);j.useEffect(()=>{var v,S;(v=y.current)==null||v.focus(),(S=y.current)==null||S.select();const x=w=>{w.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",children:m.jsxs("div",{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 N2(){const e=wr(),t=Tn(),{alert:n}=qn(),[a,s]=j.useState({name:"",projectDir:"",mergeBranch:"main",maxWorkers:"1"}),o=Pn({mutationFn:d=>e2(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 Xp=Symbol.for("yaml.alias"),op=Symbol.for("yaml.document"),vr=Symbol.for("yaml.map"),o1=Symbol.for("yaml.pair"),Xi=Symbol.for("yaml.scalar"),Ul=Symbol.for("yaml.seq"),Si=Symbol.for("yaml.node.type"),_r=e=>!!e&&typeof e=="object"&&e[Si]===Xp,ms=e=>!!e&&typeof e=="object"&&e[Si]===op,$l=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,Fl=e=>!!e&&typeof e=="object"&&e[Si]===Ul;function Mt(e){if(e&&typeof e=="object")switch(e[Si]){case vr:case Ul:return!0}return!1}function jt(e){if(e&&typeof e=="object")switch(e[Si]){case Xp:case vr:case Xi:case Ul: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 Bf(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([]))}Bf.BREAK=Fn;Bf.SKIP=u1;Bf.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($l(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if(Fl(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(_r(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=_r(a)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const k2={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},T2=e=>e.replace(/[!,[\]{}]/g,t=>k2[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+T2(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(`
335
+ */const qA=[["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"}]],Vp=Oe("zap",qA),HA=[{to:"/chat",label:"对话",icon:hA},{to:"/projects",label:"项目",icon:lA},{to:"/board",label:"看板",icon:rA},{to:"/workers",label:"Workers",icon:a1},{to:"/logs",label:"Logs",icon:Kp},{to:"/skills",label:"Skills",icon:JC},{to:"/system",label:"系统",icon:n1}];function KA(){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:HA.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 GA 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 GA(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}function s1(){return Bt("/api/system/info")}function QA(){return Bt("/api/system/env")}function YA(){return Bt("/api/system/doctor/all")}function VA(){return Bt("/api/system/env/raw")}async function XA(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 ZA(){return Bt("/api/system/latest-version")}async function WA(){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 Bl(){return Bt("/api/projects")}function JA(e){return Bt(`/api/projects/${encodeURIComponent(e)}`)}async function e2(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 t2(e){return Bt(`/api/projects/${encodeURIComponent(e)}/conf`)}async function n2(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 i2(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 a2(e){return Bt(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function r2(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 s2(e,t){return Bt(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function l2(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 o2(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 c2(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 u2(){var f;const e=dt({queryKey:["system-info"],queryFn:s1,refetchInterval:3e4}),t=dt({queryKey:["projects"],queryFn:Bl,refetchInterval:1e4}),n=d2(),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(f2,{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 f2({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(qp,{size:9,strokeWidth:2.5}),"SSE·down"]})}function d2(){const[e,t]=j.useState("connecting"),n=j.useRef(null);return j.useEffect(()=>{const a=new EventSource("/stream/heartbeat");return n.current=a,a.addEventListener("server.heartbeat",()=>t("open")),a.addEventListener("error",()=>t("closed")),a.addEventListener("open",()=>t("open")),()=>{a.close(),n.current=null}},[]),e}function h2(){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(KA,{})}),m.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:m.jsx(IT,{})}),m.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:m.jsx(u2,{})})]})}function lp(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 m2(){typeof window>"u"||(window.addEventListener("error",e=>{lp(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;lp(t instanceof Error?t:String(t),"unhandledrejection")}))}class p2 extends j.Component{constructor(){super(...arguments);pv(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,a){var s;lp(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 g2(){const e=wr(),{data:t,isLoading:n,isError:a,error:s,refetch:o}=dt({queryKey:["projects"],queryFn:Bl});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(x2,{}),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(v2,{}),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(b2,{project:c},c.name))})]})}function b2({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(y2,{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(mm,{label:"cards",value:e.cards.total,accent:"purple"}),m.jsx(mm,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),m.jsx(mm,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function mm({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 y2({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 x2(){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 v2(){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 E2({title:e,body:t,confirm:n,onConfirm:a,onCancel:s,danger:o}){return j.useEffect(()=>{const c=f=>{f.key==="Escape"&&s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),m.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:m.jsxs("div",{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=j.createContext(null);function S2({children:e}){const[t,n]=j.useState(null),a=j.useCallback(c=>new Promise(f=>{n({kind:"confirm",opts:c,resolve:d=>{n(null),f(d)}})}),[]),s=j.useCallback(c=>new Promise(f=>{n({kind:"alert",opts:c,resolve:()=>{n(null),f()}})}),[]),o=j.useCallback(c=>new Promise(f=>{n({kind:"prompt",opts:c,resolve:d=>{n(null),f(d)}})}),[]);return m.jsxs(l1.Provider,{value:{confirm:a,alert:s,prompt:o},children:[e,(t==null?void 0:t.kind)==="confirm"&&m.jsx(E2,{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(w2,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"知道了",onClose:()=>t.resolve()}),(t==null?void 0:t.kind)==="prompt"&&m.jsx(_2,{title:t.opts.title,body:t.opts.body,placeholder:t.opts.placeholder,defaultValue:t.opts.defaultValue,confirm:t.opts.confirm??"确定",cancel:t.opts.cancel??"取消",onConfirm:c=>t.resolve(c),onCancel:()=>t.resolve(null)})]})}function qn(){const e=j.useContext(l1);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function w2({title:e,body:t,confirm:n,onClose:a}){return j.useEffect(()=>{const s=o=>{(o.key==="Escape"||o.key==="Enter")&&a()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:m.jsxs("div",{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 _2({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:o,onConfirm:c,onCancel:f}){const[d,h]=j.useState(a??""),y=j.useRef(null);j.useEffect(()=>{var v,S;(v=y.current)==null||v.focus(),(S=y.current)==null||S.select();const x=w=>{w.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",children:m.jsxs("div",{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 N2(){const e=wr(),t=Tn(),{alert:n}=qn(),[a,s]=j.useState({name:"",projectDir:"",mergeBranch:"main",maxWorkers:"1"}),o=Pn({mutationFn:d=>e2(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(en,{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 Xp=Symbol.for("yaml.alias"),op=Symbol.for("yaml.document"),vr=Symbol.for("yaml.map"),o1=Symbol.for("yaml.pair"),Xi=Symbol.for("yaml.scalar"),Ul=Symbol.for("yaml.seq"),Si=Symbol.for("yaml.node.type"),_r=e=>!!e&&typeof e=="object"&&e[Si]===Xp,ms=e=>!!e&&typeof e=="object"&&e[Si]===op,$l=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,Fl=e=>!!e&&typeof e=="object"&&e[Si]===Ul;function Mt(e){if(e&&typeof e=="object")switch(e[Si]){case vr:case Ul:return!0}return!1}function jt(e){if(e&&typeof e=="object")switch(e[Si]){case Xp:case vr:case Xi:case Ul: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 Bf(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([]))}Bf.BREAK=Fn;Bf.SKIP=u1;Bf.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($l(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if(Fl(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(_r(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=_r(a)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const k2={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},T2=e=>e.replace(/[!,[\]{}]/g,t=>k2[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+T2(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(`
336
336
  `)}}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 C2(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 Zp{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 Uf extends Zp{constructor(t){super(Xp),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)=>{(_r(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(_r(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 Zp{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 A2="tag:yaml.org,2002:";function O2(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 lc(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 Uf(d.anchor);d={anchor:null,node:null},f.set(e,d)}t!=null&&t.startsWith("!!")&&(t=A2+t.slice(2));let h=O2(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[Ul]: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 lc(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 Jo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class y1 extends Zp{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(Jo(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 R2=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(`
337
337
  `)?ka(n,t):n.includes(`
338
338
  `)?`
@@ -470,45 +470,45 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
470
470
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
471
471
  `,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(`
472
472
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
473
- `,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 RO(e,t={}){const{lineCounter:n,prettyErrors:a}=nS(t),s=new ug(n==null?void 0:n.addNewLine),o=new cg(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 ug(n==null?void 0:n.addNewLine),o=new cg(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 MO(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 jO(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 Hl(e,a,n).toString(n)}const i0=Object.freeze(Object.defineProperty({__proto__:null,Alias:Uf,CST:CO,Composer:cg,Document:Hl,Lexer:J1,LineCounter:eS,Pair:gn,Parser:ug,Scalar:Le,Schema:$1,YAMLError:lg,YAMLMap:ai,YAMLParseError:es,YAMLSeq:Sr,YAMLWarning:P1,isAlias:_r,isCollection:Mt,isDocument:ms,isMap:$l,isNode:jt,isPair:At,isScalar:vt,isSeq:Fl,parse:MO,parseAllDocuments:RO,parseDocument:iS,stringify:jO,visit:ps,visitAsync:Bf},Symbol.toStringTag,{value:"Module"}));function DO({projectName:e,file:t,onClose:n,onSaved:a}){const s=Tn(),{alert:o}=qn(),{data:c,isLoading:f,isError:d,error:h,refetch:y}=dt({queryKey:["pipeline-file",e,t],queryFn:()=>s2(e,t)}),[g,x]=j.useState("structured"),[v,S]=j.useState(null),[w,N]=j.useState(null);j.useEffect(()=>{c&&v===null&&(S(c.content),N(c.etag),c.parseError&&x("yaml"))},[c,v]),j.useEffect(()=>{const M=H=>{H.key==="Escape"&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n]);const _=Pn({mutationFn:()=>{if(v===null||w===null)throw new Error("no draft");return l2(e,t,v,w)},onSuccess:M=>{N(M.etag),s.invalidateQueries({queryKey:["pipeline-file",e,t]}),s.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:M=>{const H=M.status;o({title:H===409?"文件已被其他地方修改":H===422?"YAML 语法错":"保存失败",body:M instanceof Error?M.message:String(M)})}}),R=v!==null&&c&&v!==c.content,{parsed:A,parseError:D}=j.useMemo(()=>{if(v===null)return{parsed:null,parseError:null};try{return{parsed:i0.parse(v)??{},parseError:null}}catch(M){return{parsed:null,parseError:M instanceof Error?M.message:String(M)}}},[v]),F=M=>{try{const H=i0.stringify(M,{lineWidth:0});S(H)}catch(H){o({title:"YAML 序列化失败",body:H instanceof Error?H.message:String(H)})}};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",children:m.jsxs("div",{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,w&&` · etag ${w}`]})]}),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(Kp,{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(qp,{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(LO,{parsed:A,onChange:F}),g==="yaml"&&m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:v,onChange:M=>S(M.target.value),spellCheck:!1,"aria-label":"pipeline YAML 编辑器"})]}),m.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:R?m.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● 未保存"}):_.isSuccess?m.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[m.jsx(Hp,{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:_.isPending,type:"button",children:"重新加载"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>_.mutate(),disabled:!R||_.isPending,type:"button","aria-label":"保存 pipeline",children:[_.isPending?m.jsx(Zt,{size:13,strokeWidth:3,className:"animate-spin"}):m.jsx(zf,{size:13,strokeWidth:3}),"保存"]})]})]})]})]})})}function LO({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(IO,{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 IO({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(OC,{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(Lf,{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(zl,{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 zO({onCancel:e,onCreate:t,hasActive:n,hasSample:a,isPending:s}){const[o,c]=j.useState(""),[f,d]=j.useState("blank");j.useEffect(()=>{const v=S=>{S.key==="Escape"&&e()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e]);const h=o.trim(),y=h.endsWith(".yaml")?h:h?`${h}.yaml`:"",g=y&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(y),x=()=>{!g||s||t(y,f)};return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:m.jsxs("div",{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(Sm,{value:"blank",current:f,label:"空白模板",desc:"最简 1 stage (develop → Done)",onSelect:d}),m.jsx(Sm,{value:"sample",current:f,label:"教学模板",desc:"从 sample.yaml.example 复制(带注释,讲解所有字段)",onSelect:d,disabled:!a,disabledReason:"sample.yaml.example 不存在"}),m.jsx(Sm,{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 Sm({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 BO(){var o;const{name:e=""}=qE(),t=wr(),[n,a]=j.useState("overview"),s=dt({queryKey:["project",e],queryFn:()=>JA(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:KC,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:zl,children:"危险操作"})]}),n==="overview"&&m.jsx(UO,{name:e,data:s.data,loading:s.isLoading}),n==="config"&&m.jsx($O,{name:e}),n==="pipelines"&&m.jsx(FO,{name:e}),n==="danger"&&m.jsx(PO,{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 UO({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 $O({name:e}){const t=Tn(),{alert:n}=qn(),{data:a,isLoading:s,isError:o,error:c,refetch:f}=dt({queryKey:["project-conf",e],queryFn:()=>t2(e)}),[d,h]=j.useState(null),[y,g]=j.useState(null);j.useEffect(()=>{a&&d===null&&(h(a.content),g(a.etag))},[a,d]);const x=d!==null&&a!==void 0&&d!==a.content,v=Pn({mutationFn:()=>{if(d===null||y===null)throw new Error("no draft");return n2(e,d,y)},onSuccess:S=>{g(S.etag),t.invalidateQueries({queryKey:["project-conf",e]}),t.invalidateQueries({queryKey:["project",e]})},onError:S=>{const w=S.status;n({title:w===409?"配置已被其他地方修改":"保存失败",body:w===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(kC,{size:13,strokeWidth:3}):m.jsx(zf,{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 FO({name:e}){const t=Tn(),{confirm:n,alert:a}=qn(),{data:s,isLoading:o}=dt({queryKey:["project-pipelines",e],queryFn:()=>a2(e)}),[c,f]=j.useState(null),[d,h]=j.useState(!1),y=Pn({mutationFn:S=>r2(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=>c2(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=>o2(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(Gp,{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(zl,{size:11,strokeWidth:2.5})})]})]})]},S.name))})]}),c&&m.jsx(DO,{projectName:e,file:c,onClose:()=>f(null),onSaved:()=>{t.invalidateQueries({queryKey:["project-pipelines",e]})}}),d&&m.jsx(zO,{hasActive:!!(s!=null&&s.active),hasSample:!0,isPending:x.isPending,onCancel:()=>h(!1),onCreate:(S,w)=>x.mutate({name:S,template:w})})]})}function PO({name:e,repoDir:t}){const n=wr(),a=Tn(),{alert:s}=qn(),[o,c]=j.useState(""),[f,d]=j.useState(!0),h=Pn({mutationFn:()=>i2(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?`项目已删除。同时清理了:
473
+ `,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 RO(e,t={}){const{lineCounter:n,prettyErrors:a}=nS(t),s=new ug(n==null?void 0:n.addNewLine),o=new cg(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 ug(n==null?void 0:n.addNewLine),o=new cg(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 MO(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 jO(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 Hl(e,a,n).toString(n)}const i0=Object.freeze(Object.defineProperty({__proto__:null,Alias:Uf,CST:CO,Composer:cg,Document:Hl,Lexer:J1,LineCounter:eS,Pair:gn,Parser:ug,Scalar:Le,Schema:$1,YAMLError:lg,YAMLMap:ai,YAMLParseError:es,YAMLSeq:Sr,YAMLWarning:P1,isAlias:_r,isCollection:Mt,isDocument:ms,isMap:$l,isNode:jt,isPair:At,isScalar:vt,isSeq:Fl,parse:MO,parseAllDocuments:RO,parseDocument:iS,stringify:jO,visit:ps,visitAsync:Bf},Symbol.toStringTag,{value:"Module"}));function DO({projectName:e,file:t,onClose:n,onSaved:a}){const s=Tn(),{alert:o}=qn(),{data:c,isLoading:f,isError:d,error:h,refetch:y}=dt({queryKey:["pipeline-file",e,t],queryFn:()=>s2(e,t)}),[g,x]=j.useState("structured"),[v,S]=j.useState(null),[w,N]=j.useState(null);j.useEffect(()=>{c&&v===null&&(S(c.content),N(c.etag),c.parseError&&x("yaml"))},[c,v]),j.useEffect(()=>{const M=H=>{H.key==="Escape"&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n]);const _=Pn({mutationFn:()=>{if(v===null||w===null)throw new Error("no draft");return l2(e,t,v,w)},onSuccess:M=>{N(M.etag),s.invalidateQueries({queryKey:["pipeline-file",e,t]}),s.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:M=>{const H=M.status;o({title:H===409?"文件已被其他地方修改":H===422?"YAML 语法错":"保存失败",body:M instanceof Error?M.message:String(M)})}}),R=v!==null&&c&&v!==c.content,{parsed:A,parseError:D}=j.useMemo(()=>{if(v===null)return{parsed:null,parseError:null};try{return{parsed:i0.parse(v)??{},parseError:null}}catch(M){return{parsed:null,parseError:M instanceof Error?M.message:String(M)}}},[v]),F=M=>{try{const H=i0.stringify(M,{lineWidth:0});S(H)}catch(H){o({title:"YAML 序列化失败",body:H instanceof Error?H.message:String(H)})}};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",children:m.jsxs("div",{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,w&&` · etag ${w}`]})]}),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(Kp,{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(qp,{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(LO,{parsed:A,onChange:F}),g==="yaml"&&m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:v,onChange:M=>S(M.target.value),spellCheck:!1,"aria-label":"pipeline YAML 编辑器"})]}),m.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:R?m.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● 未保存"}):_.isSuccess?m.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[m.jsx(Hp,{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:_.isPending,type:"button",children:"重新加载"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>_.mutate(),disabled:!R||_.isPending,type:"button","aria-label":"保存 pipeline",children:[_.isPending?m.jsx(en,{size:13,strokeWidth:3,className:"animate-spin"}):m.jsx(zf,{size:13,strokeWidth:3}),"保存"]})]})]})]})]})})}function LO({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(IO,{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 IO({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(OC,{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(Lf,{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(zl,{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 zO({onCancel:e,onCreate:t,hasActive:n,hasSample:a,isPending:s}){const[o,c]=j.useState(""),[f,d]=j.useState("blank");j.useEffect(()=>{const v=S=>{S.key==="Escape"&&e()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e]);const h=o.trim(),y=h.endsWith(".yaml")?h:h?`${h}.yaml`:"",g=y&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(y),x=()=>{!g||s||t(y,f)};return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:m.jsxs("div",{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(Sm,{value:"blank",current:f,label:"空白模板",desc:"最简 1 stage (develop → Done)",onSelect:d}),m.jsx(Sm,{value:"sample",current:f,label:"教学模板",desc:"从 sample.yaml.example 复制(带注释,讲解所有字段)",onSelect:d,disabled:!a,disabledReason:"sample.yaml.example 不存在"}),m.jsx(Sm,{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(en,{size:13,strokeWidth:3,className:"animate-spin"}):m.jsx(Zi,{size:13,strokeWidth:3}),"创建"]})]})]})]})})}function Sm({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 BO(){var o;const{name:e=""}=qE(),t=wr(),[n,a]=j.useState("overview"),s=dt({queryKey:["project",e],queryFn:()=>JA(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:KC,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:zl,children:"危险操作"})]}),n==="overview"&&m.jsx(UO,{name:e,data:s.data,loading:s.isLoading}),n==="config"&&m.jsx($O,{name:e}),n==="pipelines"&&m.jsx(FO,{name:e}),n==="danger"&&m.jsx(PO,{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 UO({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 $O({name:e}){const t=Tn(),{alert:n}=qn(),{data:a,isLoading:s,isError:o,error:c,refetch:f}=dt({queryKey:["project-conf",e],queryFn:()=>t2(e)}),[d,h]=j.useState(null),[y,g]=j.useState(null);j.useEffect(()=>{a&&d===null&&(h(a.content),g(a.etag))},[a,d]);const x=d!==null&&a!==void 0&&d!==a.content,v=Pn({mutationFn:()=>{if(d===null||y===null)throw new Error("no draft");return n2(e,d,y)},onSuccess:S=>{g(S.etag),t.invalidateQueries({queryKey:["project-conf",e]}),t.invalidateQueries({queryKey:["project",e]})},onError:S=>{const w=S.status;n({title:w===409?"配置已被其他地方修改":"保存失败",body:w===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(en,{size:13,strokeWidth:3,className:"animate-spin"}):v.isSuccess&&!x?m.jsx(kC,{size:13,strokeWidth:3}):m.jsx(zf,{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 FO({name:e}){const t=Tn(),{confirm:n,alert:a}=qn(),{data:s,isLoading:o}=dt({queryKey:["project-pipelines",e],queryFn:()=>a2(e)}),[c,f]=j.useState(null),[d,h]=j.useState(!1),y=Pn({mutationFn:S=>r2(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=>c2(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=>o2(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(Gp,{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(zl,{size:11,strokeWidth:2.5})})]})]})]},S.name))})]}),c&&m.jsx(DO,{projectName:e,file:c,onClose:()=>f(null),onSaved:()=>{t.invalidateQueries({queryKey:["project-pipelines",e]})}}),d&&m.jsx(zO,{hasActive:!!(s!=null&&s.active),hasSample:!0,isPending:x.isPending,onCancel:()=>h(!1),onCreate:(S,w)=>x.mutate({name:S,template:w})})]})}function PO({name:e,repoDir:t}){const n=wr(),a=Tn(),{alert:s}=qn(),[o,c]=j.useState(""),[f,d]=j.useState(!0),h=Pn({mutationFn:()=>i2(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?`项目已删除。同时清理了:
474
474
  ${g.join(`
475
- `)}`:"项目已删除。"}).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(zl,{size:14,strokeWidth:3}),"永久删除"]})]})}function fg(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return Bt(`/api/skills${t}`)}function qO(e){return Bt(`/api/skills/${encodeURIComponent(e)}`)}function HO(e,t){return Bt(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function Zf(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 KO(e,t){return Zf(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function GO(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 QO(e,t){return Zf(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function YO(e,t){return Zf(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function VO(){return Zf("/api/skills/sync")}function XO({project:e,isPending:t,onCancel:n,onCreate:a}){var N;const[s,o]=j.useState(""),[c,f]=j.useState(""),[d,h]=j.useState(new Set),y=dt({queryKey:["skills-all",e],queryFn:()=>fg(e)});j.useEffect(()=>{const _=R=>{R.key==="Escape"&&n()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[n]);const x=s.trim().length>0&&s.trim().length<=200&&!t,v=_=>{const R=new Set(d);R.has(_)?R.delete(_):R.add(_),h(R)},S=()=>{x&&a({title:s.trim(),description:c.trim(),skills:[...d]})},w=((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",children:m.jsxs("div",{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:_=>{_.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:_=>o(_.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:_=>f(_.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)]}),w.length>0&&m.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(_=>{const R=d.has(_.name);return m.jsx("button",{type:"button",onClick:()=>v(_.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:_.name},_.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 ZO(e){return Bt(`/api/projects/${encodeURIComponent(e)}/cards`)}function WO(e,t){return Bt(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function Kl(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 JO(e,t){return Kl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function eR(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function tR(e,t){return Kl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function nR(e,t){const n=typeof t=="string"?{title:t}:t;return Kl(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function iR(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 aR(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 rR(e){return Kl(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function sR(e){return Kl(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function lR(e,t){return Kl(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function aS(e){const t=Tn();j.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",d.project]}),d.card&&t.setQueryData(["card",d.project,d.seq],{...t.getQueryData(["card",d.project,d.seq])??{},...d.card}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["workers",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["pipeline-status",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return a.addEventListener("card.created",s),a.addEventListener("card.updated",s),a.addEventListener("card.deleted",s),a.addEventListener("worker.updated",o),a.addEventListener("worker.added",o),a.addEventListener("worker.deleted",o),a.addEventListener("pipeline.status",c),()=>a.close()},[e,t])}const oR=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),cR=new Set(["frontend","backend","mobile","database","devops"]),uR=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),fR=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function dR(e){return oR.has(e)?"lang":cR.has(e)?"end":uR.has(e)?"persona":fR.has(e)?"workflow":"other"}const hR={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=hR[dR(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 mR({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:pR(e.updatedAt??e.createdAt)}),e.branch&&m.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function pR(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 gR({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const[o,c]=j.useState(!1);return m.jsxs("div",{className:["flex flex-col gap-2 p-3 rounded-2xl border-[3px] min-h-[340px]","transition-all",o?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:f=>{!s||!f.dataTransfer.types.includes("application/x-sps-card-seq")||(f.preventDefault(),f.dataTransfer.dropEffect="move",o||c(!0))},onDragLeave:()=>c(!1),onDrop:f=>{if(c(!1),!s)return;const d=f.dataTransfer.getData("application/x-sps-card-seq"),h=Number.parseInt(d,10);Number.isFinite(h)&&(f.preventDefault(),s(h))},children:[m.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 border-b-2 border-[var(--color-text)]",children:[m.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[n.length===0&&m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),n.map(f=>m.jsx(mR,{card:f,onClick:()=>a(f),done:e==="Done",draggable:!!s},f.seq))]})]})}function mp(e,t){const n=e.split(`
475
+ `)}`:"项目已删除。"}).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(en,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(zl,{size:14,strokeWidth:3}),"永久删除"]})]})}function fg(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return Bt(`/api/skills${t}`)}function qO(e){return Bt(`/api/skills/${encodeURIComponent(e)}`)}function HO(e,t){return Bt(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function Zf(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 KO(e,t){return Zf(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function GO(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 QO(e,t){return Zf(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function YO(e,t){return Zf(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function VO(){return Zf("/api/skills/sync")}function XO({project:e,isPending:t,onCancel:n,onCreate:a}){var N;const[s,o]=j.useState(""),[c,f]=j.useState(""),[d,h]=j.useState(new Set),y=dt({queryKey:["skills-all",e],queryFn:()=>fg(e)});j.useEffect(()=>{const _=R=>{R.key==="Escape"&&n()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[n]);const x=s.trim().length>0&&s.trim().length<=200&&!t,v=_=>{const R=new Set(d);R.has(_)?R.delete(_):R.add(_),h(R)},S=()=>{x&&a({title:s.trim(),description:c.trim(),skills:[...d]})},w=((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",children:m.jsxs("div",{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:_=>{_.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:_=>o(_.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:_=>f(_.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)]}),w.length>0&&m.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(_=>{const R=d.has(_.name);return m.jsx("button",{type:"button",onClick:()=>v(_.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:_.name},_.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(en,{size:13,strokeWidth:3,className:"animate-spin"}):m.jsx(Zi,{size:13,strokeWidth:3}),"创建"]})]})]})})}function ZO(e){return Bt(`/api/projects/${encodeURIComponent(e)}/cards`)}function WO(e,t){return Bt(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function Kl(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 JO(e,t){return Kl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function eR(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function tR(e,t){return Kl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function nR(e,t){const n=typeof t=="string"?{title:t}:t;return Kl(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function iR(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 aR(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 rR(e){return Kl(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function sR(e){return Kl(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function lR(e,t){return Kl(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function aS(e){const t=Tn();j.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",d.project]}),d.card&&t.setQueryData(["card",d.project,d.seq],{...t.getQueryData(["card",d.project,d.seq])??{},...d.card}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["workers",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["pipeline-status",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return a.addEventListener("card.created",s),a.addEventListener("card.updated",s),a.addEventListener("card.deleted",s),a.addEventListener("worker.updated",o),a.addEventListener("worker.added",o),a.addEventListener("worker.deleted",o),a.addEventListener("pipeline.status",c),()=>a.close()},[e,t])}const oR=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),cR=new Set(["frontend","backend","mobile","database","devops"]),uR=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),fR=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function dR(e){return oR.has(e)?"lang":cR.has(e)?"end":uR.has(e)?"persona":fR.has(e)?"workflow":"other"}const hR={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=hR[dR(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 mR({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))]}),e.checklist&&e.checklist.total>0&&m.jsx(pR,{stats:e.checklist}),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:gR(e.updatedAt??e.createdAt)}),e.branch&&m.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function pR({stats:e}){return m.jsxs("div",{className:"mb-2",children:[m.jsxs("div",{className:"flex items-center justify-between text-[11px] font-[family-name:var(--font-mono)] mb-1",children:[m.jsxs("span",{className:"font-bold",children:["检查清单 ",e.done,"/",e.total]}),m.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[e.percent,"%"]})]}),m.jsx("div",{className:"w-full h-1.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full overflow-hidden mb-1.5",children:m.jsx("div",{className:"h-full bg-[var(--color-cta)] transition-[width] duration-200",style:{width:`${e.percent}%`}})}),m.jsxs("ul",{className:"text-[11px] space-y-0.5",children:[e.items.slice(0,3).map((t,n)=>m.jsxs("li",{className:`flex items-start gap-1 ${t.done?"opacity-60 line-through":""}`,children:[m.jsx("span",{className:"flex-shrink-0 mt-0.5",children:t.done?"✓":"○"}),m.jsx("span",{className:"line-clamp-1",children:t.text})]},n)),e.items.length>3&&m.jsxs("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:["… 还有 ",e.items.length-3," 条"]})]})]})}function gR(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 bR({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const[o,c]=j.useState(!1);return m.jsxs("div",{className:["flex flex-col gap-2 p-3 rounded-2xl border-[3px] min-h-[340px]","transition-all",o?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:f=>{!s||!f.dataTransfer.types.includes("application/x-sps-card-seq")||(f.preventDefault(),f.dataTransfer.dropEffect="move",o||c(!0))},onDragLeave:()=>c(!1),onDrop:f=>{if(c(!1),!s)return;const d=f.dataTransfer.getData("application/x-sps-card-seq"),h=Number.parseInt(d,10);Number.isFinite(h)&&(f.preventDefault(),s(h))},children:[m.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 border-b-2 border-[var(--color-text)]",children:[m.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[n.length===0&&m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),n.map(f=>m.jsx(mR,{card:f,onClick:()=>a(f),done:e==="Done",draggable:!!s},f.seq))]})]})}function mp(e,t){if(!e)return"";const n=e.split(`
476
476
  `),a=new RegExp(`^##\\s+${t}\\s*$`),s=n.findIndex(c=>a.test(c));if(s===-1)return"";let o=n.length;for(let c=s+1;c<n.length;c++)if(/^##\s+/.test(n[c]??"")){o=c;break}return n.slice(s+1,o).join(`
477
- `).trim()}function wm(e){return mp(e,"描述")}function bR({project:e,seq:t,onClose:n,onChanged:a}){const s=Tn(),{confirm:o,alert:c}=qn(),{data:f,isLoading:d,isError:h,error:y,refetch:g}=dt({queryKey:["card",e,t],queryFn:()=>WO(e,t)}),[x,v]=j.useState(!1),[S,w]=j.useState(""),[N,_]=j.useState(""),[R,A]=j.useState(new Set),[D,F]=j.useState([]),[M,H]=j.useState(""),U=dt({queryKey:["skills-all",e],queryFn:()=>fg(e),enabled:x});j.useEffect(()=>{x&&f&&(w(f.title),_(wm(f.body)),A(new Set(f.skills)),F([...f.labels]))},[x,f]),j.useEffect(()=>{const q=Q=>{Q.key==="Escape"&&(x?v(!1):n())};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[n,x]);const J=Pn({mutationFn:()=>{if(!f)throw new Error("no data");const q={},Q=S.trim();Q&&Q!==f.title&&(q.title=Q);const K=wm(f.body);N!==K&&(q.description=N);const oe=[...R].sort(),Z=[...f.skills].sort();return JSON.stringify(oe)!==JSON.stringify(Z)&&(q.skills=oe),JSON.stringify(D)!==JSON.stringify(f.labels)&&(q.labels=D),Object.keys(q).length===0?Promise.resolve({ok:!0,noop:!0}):aR(e,t,q)},onSuccess:()=>{s.invalidateQueries({queryKey:["card",e,t]}),s.invalidateQueries({queryKey:["cards",e]}),v(!1),a()},onError:q=>{c({title:"保存失败",body:q instanceof Error?q.message:String(q)})}}),C=j.useMemo(()=>{if(!x||!f)return!1;if(S.trim()!==f.title||N!==wm(f.body))return!0;const q=[...R].sort(),Q=[...f.skills].sort();return JSON.stringify(q)!==JSON.stringify(Q)||JSON.stringify(D)!==JSON.stringify(f.labels)},[x,f,S,N,R,D]),P=q=>{const Q=new Set(R);Q.has(q)?Q.delete(q):Q.add(q),A(Q)},Y=()=>{const q=M.trim();if(q){if(D.includes(q)){H("");return}F([...D,q]),H("")}},le=q=>{F(D.filter(Q=>Q!==q))};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",children:m.jsxs("div",{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:q=>w(q.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(Gp,{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(ZC,{size:14}),m.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:f.branch})]}),x?m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),U.isLoading&&m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),U.data&&U.data.data.length>0&&m.jsx("div",{className:"flex flex-wrap gap-1.5",children:U.data.data.map(q=>{const Q=R.has(q.name);return m.jsx("button",{type:"button",onClick:()=>P(q.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:q.name},q.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(q=>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:[q,m.jsx("button",{type:"button",onClick:()=>le(q),className:"hover:text-[var(--color-crashed)]","aria-label":`删除 ${q}`,children:m.jsx(Er,{size:10,strokeWidth:3})})]},q)),m.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:"+ 添加 label",value:M,onChange:q=>H(q.target.value),onKeyDown:q=>{q.key==="Enter"&&!q.nativeEvent.isComposing&&(q.preventDefault(),Y())}}),M&&m.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:Y,"aria-label":"添加 label",children:m.jsx(Zi,{size:10,strokeWidth:3})})]}),m.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖"})]})]}):m.jsxs(m.Fragment,{children:[f.skills.length>0&&m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),m.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.skills.map(q=>m.jsx(rS,{name:q},q))})]}),f.labels.length>0&&m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),m.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.labels.map(q=>m.jsx(sS,{label:q,kind:q==="NEEDS-FIX"?"warn":"default"},q))})]})]}),x?m.jsxs(m.Fragment,{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:"描述"}),m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:N,onChange:q=>_(q.target.value),"aria-label":"卡片描述"}),m.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:'只替换 "## 描述" 段的内容;检查清单和日志段不动。'})]}),f.checklist.total>0&&m.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[m.jsx("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("ul",{className:"text-sm space-y-1",children:f.checklist.items.map((q,Q)=>m.jsxs("li",{className:`flex items-start gap-2 ${q.done?"opacity-60 line-through":""}`,children:[m.jsx("span",{children:q.done?"✓":"○"}),m.jsx("span",{children:q.text})]},Q))})]})]}):m.jsxs(m.Fragment,{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:"描述"}),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:mp(f.body,"描述")||"(空)"})]}),f.checklist.total>0&&m.jsxs("div",{children:[m.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:["检查清单 ",m.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[f.checklist.done,"/",f.checklist.total]})]}),m.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[m.jsx("div",{className:"flex items-center justify-end mb-2",children: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((q,Q)=>m.jsxs("li",{className:`flex items-start gap-2 ${q.done?"opacity-60 line-through":""}`,children:[m.jsx("span",{children:q.done?"✓":"○"}),m.jsx("span",{children:q.text})]},Q))})]})]}),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:mp(f.body,"日志")||"(空)"})]})]}),m.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:x?m.jsxs(m.Fragment,{children:[m.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{v(!1),g()},disabled:J.isPending,children:"取消"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>J.mutate(),disabled:!C||!S.trim()||J.isPending,"aria-label":"保存卡片修改",children:[J.isPending?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(zf,{size:14,strokeWidth:3}),"保存"]})]}):m.jsxs(m.Fragment,{children:[m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:async()=>{try{await tR(e,t),a()}catch(q){c({title:"启动 worker 失败",body:q instanceof Error?q.message:String(q)})}},children:[m.jsx(Qp,{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 JO(e,t),a(),n()}catch(Q){c({title:"重置失败",body:Q instanceof Error?Q.message:String(Q)})}},children:[m.jsx(If,{size:14,strokeWidth:2.5}),"重置卡片"]}),m.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await o({title:`删除卡片 #${t}`,body:`即将删除 "${f.title}"。此操作不可恢复(md 文件将被物理删除)。是否继续?`,confirm:"继续",danger:!0})||!await o({title:"最终确认",body:`请再次确认删除卡片 #${t}。`,confirm:"确定删除",danger:!0})))try{await eR(e,t),a(),n()}catch(K){c({title:"删除失败",body:K instanceof Error?K.message:String(K)})}},"aria-label":"删除卡片",children:[m.jsx(zl,{size:14,strokeWidth:2.5}),"删除卡片"]})]})})]})]})})}function lS({current:e,onChange:t}){const[n,a]=j.useState(!1),s=j.useRef(null),{data:o}=dt({queryKey:["projects"],queryFn:Bl});return j.useEffect(()=>{const c=f=>{var d;(d=s.current)!=null&&d.contains(f.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),m.jsxs("div",{className:"relative",ref:s,children:[m.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>a(c=>!c),children:[e,m.jsx(Lf,{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 yR=[{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)"}],oS="sps-console:last-board-project";function xR(){if(typeof window>"u")return null;try{return localStorage.getItem(oS)}catch{return null}}function vR(e){if(!(typeof window>"u"))try{localStorage.setItem(oS,e)}catch{}}function ER(){var Q,K,oe;const[e,t]=jf(),n=e.get("project"),[a,s]=j.useState(null),[o,c]=j.useState(""),[f,d]=j.useState(()=>new Set),[h,y]=j.useState(()=>new Set),{confirm:g,alert:x}=qn();aS(n);const v=dt({queryKey:["projects"],queryFn:Bl}),S=dt({queryKey:["cards",n],queryFn:()=>ZO(n??""),enabled:!!n}),w=Tn(),N=()=>{w.invalidateQueries({queryKey:["cards",n]}),w.invalidateQueries({queryKey:["projects"]}),w.invalidateQueries({queryKey:["pipeline-status",n]})},_=Z=>{t({project:Z})};j.useEffect(()=>{var pe;if(n){vR(n);return}const Z=xR();Z&&((pe=v.data)!=null&&pe.data.some(O=>O.name===Z))&&t({project:Z},{replace:!0})},[n,v.data,t]);const R=Pn({mutationFn:()=>rR(n),onSuccess:()=>{N()},onError:Z=>{x({title:"启动 pipeline 失败",body:Z instanceof Error?Z.message:String(Z)})}}),A=Pn({mutationFn:()=>sR(n),onSuccess:()=>N(),onError:Z=>{x({title:"停止 pipeline 失败",body:Z instanceof Error?Z.message:String(Z)})}}),D=Pn({mutationFn:()=>lR(n,{all:!0}),onSuccess:()=>N(),onError:Z=>{x({title:"重置失败",body:Z instanceof Error?Z.message:String(Z)})}}),[F,M]=j.useState(!1),H=Pn({mutationFn:Z=>nR(n,Z),onSuccess:()=>{N(),M(!1)},onError:Z=>{x({title:"新建卡片失败",body:Z instanceof Error?Z.message:String(Z)})}}),U=Pn({mutationFn:({seq:Z,state:pe})=>iR(n,Z,pe),onMutate:async({seq:Z,state:pe})=>{await w.cancelQueries({queryKey:["cards",n]});const O=w.getQueryData(["cards",n]);return O&&w.setQueryData(["cards",n],{...O,data:O.data.map(L=>L.seq===Z?{...L,state:pe}:L)}),{prev:O}},onError:(Z,pe,O)=>{O!=null&&O.prev&&w.setQueryData(["cards",n],O.prev),x({title:"移动卡片失败",body:Z instanceof Error?Z.message:String(Z)})},onSettled:()=>{w.invalidateQueries({queryKey:["cards",n]})}}),J=((Q=S.data)==null?void 0:Q.data)??[],{allSkills:C,allLabels:P}=j.useMemo(()=>{const Z=new Set,pe=new Set;for(const O of J){for(const L of O.skills)Z.add(L);for(const L of O.labels)pe.add(L)}return{allSkills:[...Z].sort(),allLabels:[...pe].sort()}},[J]);if(!n)return m.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"看板"}),m.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"选择一个项目 🎯"}),m.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:"看板按项目分。挑一个开始:"}),m.jsx("div",{className:"flex flex-wrap gap-2",children:(K=v.data)==null?void 0:K.data.map(Z=>m.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>_(Z.name),type:"button",children:Z.name},Z.name))})]})]});const Y=J.filter(Z=>{if(o){const pe=o.toLowerCase();if(!(Z.title.toLowerCase().includes(pe)||Z.skills.some(L=>L.toLowerCase().includes(pe))||Z.labels.some(L=>L.toLowerCase().includes(pe))))return!1}return!(f.size>0&&!Z.skills.some(O=>f.has(O))||h.size>0&&!Z.labels.some(O=>h.has(O)))}),le=(oe=v.data)==null?void 0:oe.data.find(Z=>Z.name===n),q=(le==null?void 0:le.pipelineStatus)==="running";return m.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[m.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"看板 ✨"}),m.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:le?`${le.name} · ${le.cards.total} cards · ${le.workers.active} workers 活跃`:"加载中…"})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsx(lS,{current:n,onChange:_}),m.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:()=>R.mutate(),disabled:q||R.isPending,type:"button","aria-label":"启动 pipeline",title:q?"pipeline 正在运行":"启动 pipeline",children:[R.isPending?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(Qp,{size:14,strokeWidth:3}),"启动"]}),m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:()=>A.mutate(),disabled:!q||A.isPending,type:"button","aria-label":"停止 pipeline",title:q?"停止 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(If,{size:14,strokeWidth:2.5}),"重置"]}),m.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>M(!0),disabled:H.isPending,children:[H.isPending?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(Zi,{size:14,strokeWidth:3}),"新卡片"]})]})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsxs("div",{className:"relative flex-1 max-w-md",children:[m.jsx(xf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),m.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索标题 / skill / label…",value:o,onChange:Z=>c(Z.target.value),"aria-label":"搜索卡片"})]}),m.jsx(a0,{label:"skill",options:C,selected:f,onChange:d}),m.jsx(a0,{label:"label",options:P,selected:h,onChange:y}),(o||f.size>0||h.size>0)&&m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{c(""),d(new Set),y(new Set)},type:"button","aria-label":"清空筛选",children:[m.jsx(Er,{size:11,strokeWidth:3}),"清空"]}),m.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[m.jsx(VC,{size:12}),Y.length," / ",J.length]})]}),S.isError&&m.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[m.jsx("p",{className:"font-semibold",children:"加载卡片失败"}),m.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:S.error instanceof Error?S.error.message:String(S.error)})]}),!S.isError&&m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6 gap-3",children:yR.map(Z=>m.jsx(gR,{label:Z.label,bg:Z.bg,cards:Y.filter(SR(Z.state)),onCardClick:pe=>s(pe.seq),onDropCard:pe=>U.mutate({seq:pe,state:Z.state})},Z.state))}),a!==null&&m.jsx(bR,{project:n,seq:a,onClose:()=>s(null),onChanged:N}),F&&m.jsx(XO,{project:n,isPending:H.isPending,onCancel:()=>M(!1),onCreate:Z=>H.mutate(Z)})]})}function SR(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]=j.useState(!1),c=j.useRef(null);j.useEffect(()=>{if(!s)return;const y=x=>{var v;(v=c.current)!=null&&v.contains(x.target)||o(!1)},g=x=>{x.key==="Escape"&&o(!1)};return window.addEventListener("click",y),window.addEventListener("keydown",g),()=>{window.removeEventListener("click",y),window.removeEventListener("keydown",g)}},[s]);const f=y=>{const g=new Set(n);g.has(y)?g.delete(y):g.add(y),a(g)},d=t.length===0,h=n.size;return m.jsxs("div",{ref:c,className:"relative",children:[m.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!d&&o(y=>!y),disabled:d,"aria-haspopup":"listbox","aria-expanded":s,"aria-label":`按 ${e} 筛选`,children:[e,h>0&&m.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:h}),m.jsx(Lf,{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 wR(){return Bt("/api/workers/all")}function _R(e){return Bt(`/api/projects/${encodeURIComponent(e)}/workers`)}function NR(e,t){return Bt(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function cS(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 cS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function dg(e,t,n){return cS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function kR(){const[e,t]=jf(),n=e.get("project");aS(n);const a=Tn(),[s,o]=j.useState(null),{data:c,isLoading:f,isError:d,error:h,refetch:y}=dt({queryKey:["workers",n],queryFn:()=>_R(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(w=>w.state==="running").length,v=g.filter(w=>w.state==="stuck").length,S=g.filter(w=>w.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(lS,{current:n,onChange:w=>t({project:w})}),m.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>y(),type:"button",children:[m.jsx(If,{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(w=>m.jsx(TR,{project:n,worker:w,onChange:()=>a.invalidateQueries({queryKey:["workers",n]}),onDetail:()=>o(w.slot)},w.slot))})]})}),s!==null&&m.jsx(CR,{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 TR({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(uS,{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:fS(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(iA,{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(Yp,{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(Vp,{size:12,strokeWidth:2.5})," 终止"]})]})]})]})}function CR({project:e,slot:t,onClose:n,onChange:a}){const{confirm:s,alert:o}=qn(),{data:c,isLoading:f,isError:d,error:h,refetch:y}=dt({queryKey:["worker-detail",e,t],queryFn:()=>NR(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",children:m.jsxs("div",{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(If,{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(uS,{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:fS(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()} (${AR(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(`
478
- `)}),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(Vp,{size:14,strokeWidth:3})," 终止"]}),c.state==="running"&&m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin self-center text-[var(--color-running)]"})]})]})]})})}function AR(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 uS({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 fS(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 OR(){var f;const e=Tn(),[t,n]=j.useState(null),a=dt({queryKey:["workers-agg"],queryFn:wR,refetchInterval:5e3});j.useEffect(()=>{if(!a.data)return;const d=a.data.capacity.map(y=>y.project),h=[];for(const y of d){const g=new EventSource(`/stream/projects/${encodeURIComponent(y)}`),x=()=>{e.invalidateQueries({queryKey:["workers-agg"]})};g.addEventListener("worker.updated",x),g.addEventListener("worker.added",x),g.addEventListener("worker.deleted",x),g.addEventListener("card.updated",x),h.push(g)}return()=>{for(const y of h)y.close()}},[(f=a.data)==null?void 0:f.capacity.map(d=>d.project).join(","),e]);const s=j.useMemo(()=>{var h,y;return[...((h=a.data)==null?void 0:h.alerts)??[],...((y=a.data)==null?void 0:y.active)??[]]},[a.data]),o=t&&s.find(d=>d.project===t.project&&d.slot===t.slot),c=j.useMemo(()=>{if(!a.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const d={projects:a.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const h of a.data.capacity)d.running+=h.running,d.starting+=h.starting,d.stuck+=h.stuck,d.crashed+=h.crashed,d.idle+=h.idle;return d},[a.data]);return m.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[m.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Workers 👷"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:["跨 ",c.projects," 项目 · ",c.running," 跑 · ",c.starting," 启动 ·"," ",m.jsxs("span",{className:"text-[var(--color-stuck)]",children:[c.stuck," 卡"]})," ·"," ",m.jsxs("span",{className:"text-[var(--color-crashed)]",children:[c.crashed," 崩"]})," · ",c.idle," 闲"]})]}),m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a.refetch(),disabled:a.isFetching,type:"button","aria-label":"刷新",children:[a.isFetching?m.jsx(Zt,{size:12,strokeWidth:3,className:"animate-spin"}):m.jsx(hs,{size:12,strokeWidth:2.5}),"刷新"]})]}),m.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[m.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[a.isLoading&&m.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"加载中…"}),a.isError&&m.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:m.jsxs("p",{children:["加载失败: ",a.error instanceof Error?a.error.message:String(a.error)]})}),a.data&&m.jsxs(m.Fragment,{children:[m.jsx(RR,{alerts:a.data.alerts,selected:t,onSelect:(d,h)=>n({project:d,slot:h})}),m.jsx(MR,{active:a.data.active,selected:t,onSelect:(d,h)=>n({project:d,slot:h})}),m.jsx(jR,{capacity:a.data.capacity})]})]}),m.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:o?m.jsx(IR,{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 RR({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(Hp,{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(zA,{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(BC,{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 MR({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)] ${zR(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(Yp,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function jR({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(DR,{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 DR({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:LR(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 LR(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 IR({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(Yp,{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,`
479
- `]}),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(DA,{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(Vp,{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(CA,{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 zR(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 BR(e){const t=new URLSearchParams;return e.project&&t.set("project",e.project),e.worker&&t.set("worker",e.worker),t.set("limit",String(e.limit)),e.since&&t.set("since",e.since),Bt(`/api/logs?${t}`)}function UR(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const $R=["error","warn","info","debug"],FR=["error","warn","info"];function PR(){var U,J;const[e,t]=jf(),n=e.get("project"),a=e.get("worker")??"",[s,o]=j.useState([]),[c,f]=j.useState(!1),[d,h]=j.useState(!0),[y,g]=j.useState(()=>new Set(FR)),[x,v]=j.useState(""),[S,w]=j.useState("live"),[N,_]=j.useState(()=>{const C=new Date(Date.now()-36e5),P=Y=>String(Y).padStart(2,"0");return`${C.getFullYear()}-${P(C.getMonth()+1)}-${P(C.getDate())}T${P(C.getHours())}:${P(C.getMinutes())}`}),R=j.useRef(null),A=!n,D=dt({queryKey:["projects"],queryFn:Bl}),{data:F,refetch:M}=dt({queryKey:["logs",n??"agg",a,S,S==="history"?N:"live"],queryFn:()=>BR({project:n||void 0,worker:a||void 0,limit:S==="history"?2e3:500,since:S==="history"?new Date(N).toISOString():void 0}),refetchInterval:A&&S==="live"?5e3:!1});j.useEffect(()=>{F!=null&&F.data&&o(F.data)},[F]),j.useEffect(()=>{if(!n||S!=="live")return;const C=UR({project:n,worker:a||void 0}),P=new EventSource(C);return P.addEventListener("log.line",Y=>{if(!c)try{const le=JSON.parse(Y.data);o(q=>{const Q=[...q,le];return Q.length>5e3&&Q.splice(0,Q.length-5e3),Q})}catch{}}),()=>P.close()},[n,a,c,S]),j.useEffect(()=>{if(!d)return;const C=R.current;C&&(C.scrollTop=C.scrollHeight)},[s,d]);const H=j.useMemo(()=>{const C=x.toLowerCase();return s.filter(P=>!(!y.has(P.level)||C&&!P.msg.toLowerCase().includes(C)))},[s,y,x]);return m.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[m.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Logs 📜"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[A?`全部项目(${((U=D.data)==null?void 0:U.data.length)??0})`:n,a&&` · worker-${a}`," · ",A&&S==="live"?"5s 轮询":"tail -f"," · ",s.length," lines",c&&m.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:"⏸ PAUSED"})]})]})}),m.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:()=>w("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:()=>w("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(tA,{size:11,strokeWidth:2.5}),"历史"]})]}),S==="history"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:N,onChange:C=>_(C.target.value),"aria-label":"查询起始时间"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>M(),type:"button","aria-label":"查询",children:[m.jsx(xf,{size:11,strokeWidth:3}),"查询"]})]}),m.jsxs("div",{className:"relative",children:[m.jsx(QC,{size:14,strokeWidth:2.5,className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"}),m.jsxs("select",{className:"nb-input appearance-none pl-9 pr-9 font-[family-name:var(--font-mono)] cursor-pointer",style:{padding:"10px 36px 10px 36px",fontSize:13,minWidth:180},value:n??"",onChange:C=>{const P=C.target.value;t(P?{project:P}:{})},"aria-label":"筛选项目",children:[m.jsx("option",{value:"",children:"全部项目"}),(J=D.data)==null?void 0:J.data.map(C=>m.jsx("option",{value:C.name,children:C.name},C.name))]}),m.jsx(Lf,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),m.jsxs("div",{className:"relative flex-1 max-w-md",children:[m.jsx(xf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),m.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"过滤关键字…",value:x,onChange:C=>v(C.target.value),"aria-label":"过滤日志"})]}),m.jsx("div",{className:"flex items-center gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:$R.map(C=>m.jsx(qR,{level:C,enabled:y.has(C),onToggle:()=>{g(P=>{const Y=new Set(P);return Y.has(C)?Y.delete(C):Y.add(C),Y})}},C))}),m.jsxs("div",{className:"ml-auto flex gap-2",children:[S==="live"&&m.jsxs(m.Fragment,{children:[m.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>h(C=>!C),type:"button",children:d?"✓ Auto-scroll":"Auto-scroll"}),m.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(C=>!C),type:"button",children:c?m.jsxs(m.Fragment,{children:[m.jsx(Qp,{size:12,strokeWidth:3})," Resume"]}):m.jsxs(m.Fragment,{children:[m.jsx(pA,{size:12,strokeWidth:3})," Pause"]})})]}),m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const C=new Blob([H.map(le=>le.raw).join(`
480
- `)],{type:"text/plain"}),P=URL.createObjectURL(C),Y=document.createElement("a");Y.href=P,Y.download=`${n}-log-${Date.now()}.log`,Y.click(),URL.revokeObjectURL(P)},type:"button",children:[m.jsx(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:(F==null?void 0:F.file)??"~/.coral/projects/.../logs/*.log"}),S==="live"?m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):m.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),m.jsxs("div",{ref:R,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:C=>{const P=C.currentTarget;!(P.scrollHeight-P.scrollTop-P.clientHeight<40)&&d&&h(!1)},children:[H.map((C,P)=>m.jsx(HR,{line:C},P)),H.length===0&&m.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"没有匹配的日志"})]})]})]})}function qR({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 HR({line:e}){var a;const t={error:"bg-[var(--color-crashed)] text-[var(--color-text)]",warn:"bg-[var(--color-stuck)] text-[var(--color-text)]",info:"bg-[var(--color-secondary)] text-[var(--color-text)]",debug:"",trace:""},n=!!e.project;return m.jsxs("div",{className:["grid gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",n?"grid-cols-[100px_90px_60px_1fr]":"grid-cols-[100px_60px_1fr]"].join(" "),children:[m.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((a=e.ts.split("T")[1])==null?void 0:a.replace("Z",""))??e.ts:"--"}),n&&m.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),m.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),m.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function KR(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const GR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YR={};function r0(e,t){return(YR.jsx?QR:GR).test(e)}const VR=/[ \t\n\f\r]/g;function XR(e){return typeof e=="object"?e.type==="text"?s0(e.value):!1:s0(e)}function s0(e){return e.replace(VR,"")===""}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 dS(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 pp(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 ZR=0;const $e=gs(),Xt=gs(),gp=gs(),ue=gs(),St=gs(),gl=gs(),ni=gs();function gs(){return 2**++ZR}const bp=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Xt,commaOrSpaceSeparated:ni,commaSeparated:gl,number:ue,overloadedBoolean:gp,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),_m=Object.keys(bp);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&bp[c])===bp[c])}}}gg.prototype.defined=!0;function l0(e,t,n){n&&(e[t]=n)}function Gl(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[pp(a)]=a,n[pp(o.attribute)]=a}return new Sc(t,n,e.space)}const hS=Gl({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 mS(e,t){return t in e?e[t]:t}function pS(e,t){return mS(e,t.toLowerCase())}const WR=Gl({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:gp,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:gp,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:pS}),JR=Gl({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:mS}),gS=Gl({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()}}),bS=Gl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pS}),yS=Gl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),eM={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"},tM=/[A-Z]/g,o0=/-[a-z]/g,nM=/^data[-\w.:]+$/i;function iM(e,t){const n=pp(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"&&nM.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(o0,rM);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!o0.test(o)){let c=o.replace(tM,aM);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=gg}return new s(a,t)}function aM(e){return"-"+e.toLowerCase()}function rM(e){return e.charAt(1).toUpperCase()}const sM=dS([hS,WR,gS,bS,yS],"html"),bg=dS([hS,JR,gS,bS,yS],"svg");function lM(e){return e.join(" ").trim()}var rl={},Nm,c0;function oM(){if(c0)return Nm;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=`
481
- `,h="/",y="*",g="",x="comment",v="declaration";function S(N,_){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];_=_||{};var R=1,A=1;function D(q){var Q=q.match(t);Q&&(R+=Q.length);var K=q.lastIndexOf(d);A=~K?q.length-K:A+q.length}function F(){var q={line:R,column:A};return function(Q){return Q.position=new M(q),J(),Q}}function M(q){this.start=q,this.end={line:R,column:A},this.source=_.source}M.prototype.content=N;function H(q){var Q=new Error(_.source+":"+R+":"+A+": "+q);if(Q.reason=q,Q.filename=_.source,Q.line=R,Q.column=A,Q.source=N,!_.silent)throw Q}function U(q){var Q=q.exec(N);if(Q){var K=Q[0];return D(K),N=N.slice(K.length),Q}}function J(){U(n)}function C(q){var Q;for(q=q||[];Q=P();)Q!==!1&&q.push(Q);return q}function P(){var q=F();if(!(h!=N.charAt(0)||y!=N.charAt(1))){for(var Q=2;g!=N.charAt(Q)&&(y!=N.charAt(Q)||h!=N.charAt(Q+1));)++Q;if(Q+=2,g===N.charAt(Q-1))return H("End of comment missing");var K=N.slice(2,Q-2);return A+=2,D(K),N=N.slice(Q),A+=2,q({type:x,comment:K})}}function Y(){var q=F(),Q=U(a);if(Q){if(P(),!U(s))return H("property missing ':'");var K=U(o),oe=q({type:v,property:w(Q[0].replace(e,g)),value:K?w(K[0].replace(e,g)):g});return U(c),oe}}function le(){var q=[];C(q);for(var Q;Q=Y();)Q!==!1&&(q.push(Q),C(q));return q}return J(),le()}function w(N){return N?N.replace(f,g):g}return Nm=S,Nm}var u0;function cM(){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(oM());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 Qo={},f0;function uM(){if(f0)return Qo;f0=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.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 Qo.camelCase=d,Qo}var Yo,d0;function fM(){if(d0)return Yo;d0=1;var e=Yo&&Yo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(cM()),n=uM();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,Yo=a,Yo}var dM=fM();const hM=Cp(dM),xS=vS("end"),yg=vS("start");function vS(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 mM(e){const t=yg(e),n=xS(e);if(t&&n)return{start:t,end:n}}function tc(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?yp(e):""}function yp(e){return m0(e&&e.line)+":"+m0(e&&e.column)}function h0(e){return yp(e&&e.start)+"-"+yp(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=tc(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,pM=new Map,gM=/[A-Z]/g,bM=new Set(["table","tbody","thead","tfoot","tr"]),yM=new Set(["td","th"]),ES="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xM(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=TM(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=kM(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:sM,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=SS(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function SS(e,t,n){if(t.type==="element")return vM(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return EM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wM(e,t,n);if(t.type==="mdxjsEsm")return SM(e,t);if(t.type==="root")return _M(e,t,n);if(t.type==="text")return NM(e,t)}function vM(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=CM(e,t);let f=Eg(e,t);return bM.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!XR(d):!0})),wS(e,c,o,t),vg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function EM(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)}uc(e,t.position)}function SM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);uc(e,t.position)}function wM(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=AM(e,t),f=Eg(e,t);return wS(e,c,o,t),vg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function _M(e,t,n){const a={};return vg(a,Eg(e,t)),e.create(t,e.Fragment,a,n)}function NM(e,t){return t.value}function wS(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 kM(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 TM(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 CM(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&xg.call(t.properties,s)){const o=OM(e,s,t.properties[s]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&yM.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 AM(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 uc(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 uc(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:pM;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=SS(e,o,c);f!==void 0&&n.push(f)}return n}function OM(e,t,n){const a=iM(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?KR(n):lM(n)),a.property==="style"){let s=typeof n=="object"?n:RM(e,String(n));return e.stylePropertyNameCase==="css"&&(s=MM(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?eM[a.property]||a.property:a.attribute,n]}}function RM(e,t){try{return hM(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=ES+"#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);uc(e)}function uc(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=ES+"#cannot-handle-mdx-estrees-without-createevaluater",n}function MM(e){const t={};let n;for(n in e)xg.call(e,n)&&(t[jM(n)]=e[n]);return t}function jM(e){let t=e.replace(gM,DM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function DM(e){return"-"+e.toLowerCase()}const km={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"]},LM={};function Sg(e,t){const n=LM,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return NS(e,a,s)}function NS(e,t,n){if(IM(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]=NS(e[s],t,n);return a.join("")}function IM(e){return!!(e&&typeof e=="object")}const g0=document.createElement("i");function wg(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 kS(e){const t={};let n=-1;for(;++n<e.length;)zM(t,e[n]);return t}function zM(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];BM(s[c],Array.isArray(f)?f:f?[f]:[])}}}function BM(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 TS(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]/),UM=Nr(/[#-'*+\--9=?A-Z^-~]/);function _f(e){return e!==null&&(e<32||e===127)}const xp=Nr(/\d/),$M=Nr(/[\dA-Fa-f]/),FM=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 Wf=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 Ql(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 PM={tokenize:qM};function qM(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 HM={tokenize:KM},y0={tokenize:GM};function KM(e){const t=this,n=[];let a=0,s,o,c;return f;function f(A){if(a<n.length){const D=n[a];return t.containerState=D[1],e.attempt(D[0].continuation,d,h)(A)}return h(A)}function d(A){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const D=t.events.length;let F=D,M;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){M=t.events[F][1].end;break}_(a);let H=D;for(;H<t.events.length;)t.events[H][1].end={...M},H++;return ri(t.events,F+1,0,t.events.slice(D)),t.events.length=H,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(),_(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(),_(0),e.consume(A);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),w(A)}function w(A){if(A===null){N(e.exit("chunkFlow"),!0),_(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),w)}function N(A,D){const F=t.sliceStream(A);if(D&&F.push(null),A.previous=o,o&&(o.next=A),o=A,s.defineSkip(A.start),s.write(F),t.parser.lazy[A.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<c&&(!s.events[M][1].end||s.events[M][1].end.offset>c))return;const H=t.events.length;let U=H,J,C;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(J){C=t.events[U][1].end;break}J=!0}for(_(a),M=H;M<t.events.length;)t.events[M][1].end={...C},M++;ri(t.events,U+1,0,t.events.slice(H)),t.events.length=M}}function _(A){let D=n.length;for(;D-- >A;){const F=n[D];t.containerState=F[1],F[0].exit.call(t,e)}n.length=A}function R(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function GM(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(Wf(e))return 2}function Jf(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 vp={name:"attention",resolveAll:QM,tokenize:YM};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,Jf(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 YM(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 VM={name:"autolink",tokenize:XM};function XM(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||_f(v)?n(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),y):UM(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 wc={partial:!0,tokenize:ZM};function ZM(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 CS={continuation:{tokenize:JM},exit:ej,name:"blockQuote",tokenize:WM};function WM(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 JM(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(CS,t,n)(c)}}function ej(e){e.exit("blockQuote")}const AS={name:"characterEscape",tokenize:tj};function tj(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 FM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const OS={name:"characterReference",tokenize:nj};function nj(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=$M,y):(e.enter("characterReferenceValue"),o=7,c=xp,y(g))}function y(g){if(g===59&&s){const x=e.exit("characterReferenceValue");return c===pn&&!wg(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:aj},E0={concrete:!0,name:"codeFenced",tokenize:ij};function ij(e,t,n){const a=this,s={partial:!0,tokenize:F};let o=0,c=0,f;return d;function d(M){return h(M)}function h(M){const H=a.events[a.events.length-1];return o=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(M)}function y(M){return M===f?(c++,e.consume(M),y):c<3?n(M):(e.exit("codeFencedFenceSequence"),Ge(M)?Je(e,g,"whitespace")(M):g(M))}function g(M){return M===null||Te(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(v0,w,D)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(M))}function x(M){return M===null||Te(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Ge(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,v,"whitespace")(M)):M===96&&M===f?n(M):(e.consume(M),x)}function v(M){return M===null||Te(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(M))}function S(M){return M===null||Te(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===f?n(M):(e.consume(M),S)}function w(M){return e.attempt(s,D,N)(M)}function N(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),_}function _(M){return o>0&&Ge(M)?Je(e,R,"linePrefix",o+1)(M):R(M)}function R(M){return M===null||Te(M)?e.check(v0,w,D)(M):(e.enter("codeFlowValue"),A(M))}function A(M){return M===null||Te(M)?(e.exit("codeFlowValue"),R(M)):(e.consume(M),A)}function D(M){return e.exit("codeFenced"),t(M)}function F(M,H,U){let J=0;return C;function C(Q){return M.enter("lineEnding"),M.consume(Q),M.exit("lineEnding"),P}function P(Q){return M.enter("codeFencedFence"),Ge(Q)?Je(M,Y,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):Y(Q)}function Y(Q){return Q===f?(M.enter("codeFencedFenceSequence"),le(Q)):U(Q)}function le(Q){return Q===f?(J++,M.consume(Q),le):J>=c?(M.exit("codeFencedFenceSequence"),Ge(Q)?Je(M,q,"whitespace")(Q):q(Q)):U(Q)}function q(Q){return Q===null||Te(Q)?(M.exit("codeFencedFence"),H(Q)):U(Q)}}}function aj(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 Tm={name:"codeIndented",tokenize:sj},rj={partial:!0,tokenize:lj};function sj(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(rj,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 lj(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 oj={name:"codeText",previous:uj,resolve:cj,tokenize:fj};function cj(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 uj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fj(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 dj{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&&Vo(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),Vo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Vo(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);Vo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Vo(this.left,n.reverse())}}}function Vo(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 RS(e){const t={};let n=-1,a,s,o,c,f,d,h;const y=new dj(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,hj(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 hj(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,w=0;const N=[w];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&&(w=x+1,N.push(w),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 _=f.slice(N[x],N[x+1]),R=o.pop();d.push([R,R+_.length-1]),e.splice(R,2,_)}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 mj={resolve:gj,tokenize:bj},pj={partial:!0,tokenize:yj};function gj(e){return RS(e),e}function bj(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(pj,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 yj(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 MS(e,t,n,a,s,o,c,f,d){const h=d||Number.POSITIVE_INFINITY;let y=0;return g;function g(_){return _===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(_),e.exit(o),x):_===null||_===32||_===41||_f(_)?n(_):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(_))}function x(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(f),x(_)):_===null||_===60||Te(_)?n(_):(e.consume(_),_===92?S:v)}function S(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!y&&(_===null||_===41||xt(_))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(_)):y<h&&_===40?(e.consume(_),y++,w):_===41?(e.consume(_),y--,w):_===null||_===32||_===40||_f(_)?n(_):(e.consume(_),_===92?N:w)}function N(_){return _===40||_===41||_===92?(e.consume(_),w):w(_)}}function jS(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 DS(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 nc(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 xj={name:"definition",tokenize:Ej},vj={partial:!0,tokenize:Sj};function Ej(e,t,n){const a=this;let s;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return jS.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)?nc(e,h)(v):h(v)}function h(v){return MS(e,y,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return e.attempt(vj,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 Sj(e,t,n){return a;function a(f){return xt(f)?nc(e,s)(f):n(f)}function s(f){return DS(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 wj={name:"hardBreakEscape",tokenize:_j};function _j(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 Nj={name:"headingAtx",resolve:kj,tokenize:Tj};function kj(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 Tj(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 Cj=["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"],Aj={concrete:!0,name:"htmlFlow",resolveTo:Mj,tokenize:jj},Oj={partial:!0,tokenize:Lj},Rj={partial:!0,tokenize:Dj};function Mj(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 jj(e,t,n){const a=this;let s,o,c,f,d;return h;function h(T){return y(T)}function y(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),g}function g(T){return T===33?(e.consume(T),x):T===47?(e.consume(T),o=!0,w):T===63?(e.consume(T),s=3,a.interrupt?t:O):kn(T)?(e.consume(T),c=String.fromCharCode(T),N):n(T)}function x(T){return T===45?(e.consume(T),s=2,v):T===91?(e.consume(T),s=5,f=0,S):kn(T)?(e.consume(T),s=4,a.interrupt?t:O):n(T)}function v(T){return T===45?(e.consume(T),a.interrupt?t:O):n(T)}function S(T){const he="CDATA[";return T===he.charCodeAt(f++)?(e.consume(T),f===he.length?a.interrupt?t:Y:S):n(T)}function w(T){return kn(T)?(e.consume(T),c=String.fromCharCode(T),N):n(T)}function N(T){if(T===null||T===47||T===62||xt(T)){const he=T===47,Ne=c.toLowerCase();return!he&&!o&&S0.includes(Ne)?(s=1,a.interrupt?t(T):Y(T)):Cj.includes(c.toLowerCase())?(s=6,he?(e.consume(T),_):a.interrupt?t(T):Y(T)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(T):o?R(T):A(T))}return T===45||pn(T)?(e.consume(T),c+=String.fromCharCode(T),N):n(T)}function _(T){return T===62?(e.consume(T),a.interrupt?t:Y):n(T)}function R(T){return Ge(T)?(e.consume(T),R):C(T)}function A(T){return T===47?(e.consume(T),C):T===58||T===95||kn(T)?(e.consume(T),D):Ge(T)?(e.consume(T),A):C(T)}function D(T){return T===45||T===46||T===58||T===95||pn(T)?(e.consume(T),D):F(T)}function F(T){return T===61?(e.consume(T),M):Ge(T)?(e.consume(T),F):A(T)}function M(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),d=T,H):Ge(T)?(e.consume(T),M):U(T)}function H(T){return T===d?(e.consume(T),d=null,J):T===null||Te(T)?n(T):(e.consume(T),H)}function U(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||xt(T)?F(T):(e.consume(T),U)}function J(T){return T===47||T===62||Ge(T)?A(T):n(T)}function C(T){return T===62?(e.consume(T),P):n(T)}function P(T){return T===null||Te(T)?Y(T):Ge(T)?(e.consume(T),P):n(T)}function Y(T){return T===45&&s===2?(e.consume(T),K):T===60&&s===1?(e.consume(T),oe):T===62&&s===4?(e.consume(T),L):T===63&&s===3?(e.consume(T),O):T===93&&s===5?(e.consume(T),pe):Te(T)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Oj,te,le)(T)):T===null||Te(T)?(e.exit("htmlFlowData"),le(T)):(e.consume(T),Y)}function le(T){return e.check(Rj,q,te)(T)}function q(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Q}function Q(T){return T===null||Te(T)?le(T):(e.enter("htmlFlowData"),Y(T))}function K(T){return T===45?(e.consume(T),O):Y(T)}function oe(T){return T===47?(e.consume(T),c="",Z):Y(T)}function Z(T){if(T===62){const he=c.toLowerCase();return S0.includes(he)?(e.consume(T),L):Y(T)}return kn(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),Z):Y(T)}function pe(T){return T===93?(e.consume(T),O):Y(T)}function O(T){return T===62?(e.consume(T),L):T===45&&s===2?(e.consume(T),O):Y(T)}function L(T){return T===null||Te(T)?(e.exit("htmlFlowData"),te(T)):(e.consume(T),L)}function te(T){return e.exit("htmlFlow"),t(T)}}function Dj(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 Lj(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(wc,t,n)}}const Ij={name:"htmlText",tokenize:zj};function zj(e,t,n){const a=this;let s,o,c;return f;function f(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),F):O===63?(e.consume(O),A):kn(O)?(e.consume(O),U):n(O)}function h(O){return O===45?(e.consume(O),y):O===91?(e.consume(O),o=0,S):kn(O)?(e.consume(O),R):n(O)}function y(O){return O===45?(e.consume(O),v):n(O)}function g(O){return O===null?n(O):O===45?(e.consume(O),x):Te(O)?(c=g,oe(O)):(e.consume(O),g)}function x(O){return O===45?(e.consume(O),v):g(O)}function v(O){return O===62?K(O):O===45?x(O):g(O)}function S(O){const L="CDATA[";return O===L.charCodeAt(o++)?(e.consume(O),o===L.length?w:S):n(O)}function w(O){return O===null?n(O):O===93?(e.consume(O),N):Te(O)?(c=w,oe(O)):(e.consume(O),w)}function N(O){return O===93?(e.consume(O),_):w(O)}function _(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,oe(O)):(e.consume(O),R)}function A(O){return O===null?n(O):O===63?(e.consume(O),D):Te(O)?(c=A,oe(O)):(e.consume(O),A)}function D(O){return O===62?K(O):A(O)}function F(O){return kn(O)?(e.consume(O),M):n(O)}function M(O){return O===45||pn(O)?(e.consume(O),M):H(O)}function H(O){return Te(O)?(c=H,oe(O)):Ge(O)?(e.consume(O),H):K(O)}function U(O){return O===45||pn(O)?(e.consume(O),U):O===47||O===62||xt(O)?J(O):n(O)}function J(O){return O===47?(e.consume(O),K):O===58||O===95||kn(O)?(e.consume(O),C):Te(O)?(c=J,oe(O)):Ge(O)?(e.consume(O),J):K(O)}function C(O){return O===45||O===46||O===58||O===95||pn(O)?(e.consume(O),C):P(O)}function P(O){return O===61?(e.consume(O),Y):Te(O)?(c=P,oe(O)):Ge(O)?(e.consume(O),P):J(O)}function Y(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,le):Te(O)?(c=Y,oe(O)):Ge(O)?(e.consume(O),Y):(e.consume(O),q)}function le(O){return O===s?(e.consume(O),s=void 0,Q):O===null?n(O):Te(O)?(c=le,oe(O)):(e.consume(O),le)}function q(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||xt(O)?J(O):(e.consume(O),q)}function Q(O){return O===47||O===62||xt(O)?J(O):n(O)}function K(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function oe(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Z}function Z(O){return Ge(O)?Je(e,pe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):pe(O)}function pe(O){return e.enter("htmlTextData"),c(O)}}const _g={name:"labelEnd",resolveAll:Fj,resolveTo:Pj,tokenize:qj},Bj={tokenize:Hj},Uj={tokenize:Kj},$j={tokenize:Gj};function Fj(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 Pj(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,Jf(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 qj(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(Bj,y,c?y:g)(x):x===91?e.attempt(Uj,y,c?h:g)(x):c?y(x):g(x)}function h(x){return e.attempt($j,y,g)(x)}function y(x){return t(x)}function g(x){return o._balanced=!0,n(x)}}function Hj(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)?nc(e,o)(g):o(g)}function o(g){return g===41?y(g):MS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return xt(g)?nc(e,d)(g):y(g)}function f(g){return n(g)}function d(g){return g===34||g===39||g===40?DS(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function h(g){return xt(g)?nc(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 Kj(e,t,n){const a=this;return s;function s(f){return jS.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 Gj(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Qj={name:"labelStartImage",resolveAll:_g.resolveAll,tokenize:Yj};function Yj(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 Vj={name:"labelStartLink",resolveAll:_g.resolveAll,tokenize:Xj};function Xj(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 Cm={name:"lineEnding",tokenize:Zj};function Zj(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:Wj};function Wj(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:nD},exit:aD,name:"list",tokenize:tD},Jj={partial:!0,tokenize:rD},eD={partial:!0,tokenize:iD};function tD(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:xp(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 xp(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(wc,a.interrupt?n:y,e.attempt(Jj,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 nD(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(wc,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(eD,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 iD(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 aD(e){e.exit(this.containerState.type)}function rD(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 w0={name:"setextUnderline",resolveTo:sD,tokenize:lD};function sD(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 lD(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 oD={tokenize:cD};function cD(e){const t=this,n=e.attempt(wc,a,e.attempt(this.parser.constructs.flowInitial,s,Je(e,e.attempt(this.parser.constructs.flow,s,e.attempt(mj,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 uD={resolveAll:IS()},fD=LS("string"),dD=LS("text");function LS(e){return{resolveAll:IS(e==="text"?hD: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 IS(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 hD(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 mD={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:CS},pD={91:xj},gD={[-2]:Tm,[-1]:Tm,32:Tm},bD={35:Nj,42:mf,45:[w0,mf],60:Aj,61:w0,95:mf,96:E0,126:E0},yD={38:OS,92:AS},xD={[-5]:Cm,[-4]:Cm,[-3]:Cm,33:Qj,38:OS,42:vp,60:[VM,Ij],91:Vj,92:[wj,AS],93:_g,95:vp,96:oj},vD={null:[vp,uD]},ED={null:[42,95]},SD={null:[]},wD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ED,contentInitial:pD,disable:SD,document:mD,flow:bD,flowInitial:gD,insideSpan:vD,string:yD,text:xD},Symbol.toStringTag,{value:"Module"}));function _D(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:H(F),check:H(M),consume:R,enter:A,exit:D,interrupt:H(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:S,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:g};let y=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function g(P){return c=xi(c,P),N(),c[c.length-1]!==null?[]:(U(t,0),h.events=Jf(o,h.events,h),h.events)}function x(P,Y){return kD(v(P),Y)}function v(P){return ND(c,P)}function S(){const{_bufferIndex:P,_index:Y,line:le,column:q,offset:Q}=a;return{_bufferIndex:P,_index:Y,line:le,column:q,offset:Q}}function w(P){s[P.line]=P.column,C()}function N(){let P;for(;a._index<c.length;){const Y=c[a._index];if(typeof Y=="string")for(P=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===P&&a._bufferIndex<Y.length;)_(Y.charCodeAt(a._bufferIndex));else _(Y)}}function _(P){y=y(P)}function R(P){Te(P)?(a.line++,a.column=1,a.offset+=P===-3?2:1,C()):P!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=P}function A(P,Y){const le=Y||{};return le.type=P,le.start=S(),h.events.push(["enter",le,h]),f.push(le),le}function D(P){const Y=f.pop();return Y.end=S(),h.events.push(["exit",Y,h]),Y}function F(P,Y){U(P,Y.from)}function M(P,Y){Y.restore()}function H(P,Y){return le;function le(q,Q,K){let oe,Z,pe,O;return Array.isArray(q)?te(q):"tokenize"in q?te([q]):L(q);function L(ve){return Fe;function Fe(st){const it=st!==null&&ve[st],Wt=st!==null&&ve.null,Kn=[...Array.isArray(it)?it:it?[it]:[],...Array.isArray(Wt)?Wt:Wt?[Wt]:[]];return te(Kn)(st)}}function te(ve){return oe=ve,Z=0,ve.length===0?K:T(ve[Z])}function T(ve){return Fe;function Fe(st){return O=J(),pe=ve,ve.partial||(h.currentConstruct=ve),ve.name&&h.parser.constructs.disable.null.includes(ve.name)?Ne():ve.tokenize.call(Y?Object.assign(Object.create(h),Y):h,d,he,Ne)(st)}}function he(ve){return P(pe,O),Q}function Ne(ve){return O.restore(),++Z<oe.length?T(oe[Z]):K}}}function U(P,Y){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ri(h.events,Y,h.events.length-Y,P.resolve(h.events.slice(Y),h)),P.resolveTo&&(h.events=P.resolveTo(h.events,h))}function J(){const P=S(),Y=h.previous,le=h.currentConstruct,q=h.events.length,Q=Array.from(f);return{from:q,restore:K};function K(){a=P,h.previous=Y,h.currentConstruct=le,h.events.length=q,f=Q,C()}}function C(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function ND(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 kD(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
+ `).trim()}function wm(e){return mp(e,"描述")}function yR({project:e,seq:t,onClose:n,onChanged:a}){const s=Tn(),{confirm:o,alert:c}=qn(),{data:f,isLoading:d,isError:h,error:y,refetch:g}=dt({queryKey:["card",e,t],queryFn:()=>WO(e,t)}),[x,v]=j.useState(!1),[S,w]=j.useState(""),[N,_]=j.useState(""),[R,A]=j.useState(new Set),[D,F]=j.useState([]),[M,H]=j.useState(""),U=dt({queryKey:["skills-all",e],queryFn:()=>fg(e),enabled:x});j.useEffect(()=>{x&&f&&(w(f.title),_(wm(f.body)),A(new Set(f.skills)),F([...f.labels]))},[x,f]),j.useEffect(()=>{const q=Q=>{Q.key==="Escape"&&(x?v(!1):n())};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[n,x]);const J=Pn({mutationFn:()=>{if(!f)throw new Error("no data");const q={},Q=S.trim();Q&&Q!==f.title&&(q.title=Q);const K=wm(f.body);N!==K&&(q.description=N);const oe=[...R].sort(),Z=[...f.skills].sort();return JSON.stringify(oe)!==JSON.stringify(Z)&&(q.skills=oe),JSON.stringify(D)!==JSON.stringify(f.labels)&&(q.labels=D),Object.keys(q).length===0?Promise.resolve({ok:!0,noop:!0}):aR(e,t,q)},onSuccess:()=>{s.invalidateQueries({queryKey:["card",e,t]}),s.invalidateQueries({queryKey:["cards",e]}),v(!1),a()},onError:q=>{c({title:"保存失败",body:q instanceof Error?q.message:String(q)})}}),C=j.useMemo(()=>{if(!x||!f)return!1;if(S.trim()!==f.title||N!==wm(f.body))return!0;const q=[...R].sort(),Q=[...f.skills].sort();return JSON.stringify(q)!==JSON.stringify(Q)||JSON.stringify(D)!==JSON.stringify(f.labels)},[x,f,S,N,R,D]),P=q=>{const Q=new Set(R);Q.has(q)?Q.delete(q):Q.add(q),A(Q)},Y=()=>{const q=M.trim();if(q){if(D.includes(q)){H("");return}F([...D,q]),H("")}},le=q=>{F(D.filter(Q=>Q!==q))};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",children:m.jsxs("div",{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:q=>w(q.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(Gp,{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(ZC,{size:14}),m.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:f.branch})]}),x?m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),U.isLoading&&m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),U.data&&U.data.data.length>0&&m.jsx("div",{className:"flex flex-wrap gap-1.5",children:U.data.data.map(q=>{const Q=R.has(q.name);return m.jsx("button",{type:"button",onClick:()=>P(q.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:q.name},q.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(q=>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:[q,m.jsx("button",{type:"button",onClick:()=>le(q),className:"hover:text-[var(--color-crashed)]","aria-label":`删除 ${q}`,children:m.jsx(Er,{size:10,strokeWidth:3})})]},q)),m.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:"+ 添加 label",value:M,onChange:q=>H(q.target.value),onKeyDown:q=>{q.key==="Enter"&&!q.nativeEvent.isComposing&&(q.preventDefault(),Y())}}),M&&m.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:Y,"aria-label":"添加 label",children:m.jsx(Zi,{size:10,strokeWidth:3})})]}),m.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖"})]})]}):m.jsxs(m.Fragment,{children:[f.skills.length>0&&m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),m.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.skills.map(q=>m.jsx(rS,{name:q},q))})]}),f.labels.length>0&&m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),m.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.labels.map(q=>m.jsx(sS,{label:q,kind:q==="NEEDS-FIX"?"warn":"default"},q))})]})]}),x?m.jsxs(m.Fragment,{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:"描述"}),m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:N,onChange:q=>_(q.target.value),"aria-label":"卡片描述"}),m.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:'只替换 "## 描述" 段的内容;检查清单和日志段不动。'})]}),f.checklist.total>0&&m.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[m.jsx("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("ul",{className:"text-sm space-y-1",children:f.checklist.items.map((q,Q)=>m.jsxs("li",{className:`flex items-start gap-2 ${q.done?"opacity-60 line-through":""}`,children:[m.jsx("span",{children:q.done?"✓":"○"}),m.jsx("span",{children:q.text})]},Q))})]})]}):m.jsxs(m.Fragment,{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:"描述"}),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:mp(f.body,"描述")||"(空)"})]}),f.checklist.total>0&&m.jsxs("div",{children:[m.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:["检查清单 ",m.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[f.checklist.done,"/",f.checklist.total]})]}),m.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[m.jsx("div",{className:"flex items-center justify-end mb-2",children: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((q,Q)=>m.jsxs("li",{className:`flex items-start gap-2 ${q.done?"opacity-60 line-through":""}`,children:[m.jsx("span",{children:q.done?"✓":"○"}),m.jsx("span",{children:q.text})]},Q))})]})]}),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:mp(f.body,"日志")||"(空)"})]})]}),m.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:x?m.jsxs(m.Fragment,{children:[m.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{v(!1),g()},disabled:J.isPending,children:"取消"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>J.mutate(),disabled:!C||!S.trim()||J.isPending,"aria-label":"保存卡片修改",children:[J.isPending?m.jsx(en,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(zf,{size:14,strokeWidth:3}),"保存"]})]}):m.jsxs(m.Fragment,{children:[m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:async()=>{try{await tR(e,t),a()}catch(q){c({title:"启动 worker 失败",body:q instanceof Error?q.message:String(q)})}},children:[m.jsx(Qp,{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 JO(e,t),a(),n()}catch(Q){c({title:"重置失败",body:Q instanceof Error?Q.message:String(Q)})}},children:[m.jsx(If,{size:14,strokeWidth:2.5}),"重置卡片"]}),m.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await o({title:`删除卡片 #${t}`,body:`即将删除 "${f.title}"。此操作不可恢复(md 文件将被物理删除)。是否继续?`,confirm:"继续",danger:!0})||!await o({title:"最终确认",body:`请再次确认删除卡片 #${t}。`,confirm:"确定删除",danger:!0})))try{await eR(e,t),a(),n()}catch(K){c({title:"删除失败",body:K instanceof Error?K.message:String(K)})}},"aria-label":"删除卡片",children:[m.jsx(zl,{size:14,strokeWidth:2.5}),"删除卡片"]})]})})]})]})})}function lS({current:e,onChange:t}){const[n,a]=j.useState(!1),s=j.useRef(null),{data:o}=dt({queryKey:["projects"],queryFn:Bl});return j.useEffect(()=>{const c=f=>{var d;(d=s.current)!=null&&d.contains(f.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),m.jsxs("div",{className:"relative",ref:s,children:[m.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>a(c=>!c),children:[e,m.jsx(Lf,{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 xR=[{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)"}],oS="sps-console:last-board-project";function vR(){if(typeof window>"u")return null;try{return localStorage.getItem(oS)}catch{return null}}function ER(e){if(!(typeof window>"u"))try{localStorage.setItem(oS,e)}catch{}}function SR(){var Q,K,oe;const[e,t]=jf(),n=e.get("project"),[a,s]=j.useState(null),[o,c]=j.useState(""),[f,d]=j.useState(()=>new Set),[h,y]=j.useState(()=>new Set),{confirm:g,alert:x}=qn();aS(n);const v=dt({queryKey:["projects"],queryFn:Bl}),S=dt({queryKey:["cards",n],queryFn:()=>ZO(n??""),enabled:!!n}),w=Tn(),N=()=>{w.invalidateQueries({queryKey:["cards",n]}),w.invalidateQueries({queryKey:["projects"]}),w.invalidateQueries({queryKey:["pipeline-status",n]})},_=Z=>{t({project:Z})};j.useEffect(()=>{var pe;if(n){ER(n);return}const Z=vR();Z&&((pe=v.data)!=null&&pe.data.some(O=>O.name===Z))&&t({project:Z},{replace:!0})},[n,v.data,t]);const R=Pn({mutationFn:()=>rR(n),onSuccess:()=>{N()},onError:Z=>{x({title:"启动 pipeline 失败",body:Z instanceof Error?Z.message:String(Z)})}}),A=Pn({mutationFn:()=>sR(n),onSuccess:()=>N(),onError:Z=>{x({title:"停止 pipeline 失败",body:Z instanceof Error?Z.message:String(Z)})}}),D=Pn({mutationFn:()=>lR(n,{all:!0}),onSuccess:()=>N(),onError:Z=>{x({title:"重置失败",body:Z instanceof Error?Z.message:String(Z)})}}),[F,M]=j.useState(!1),H=Pn({mutationFn:Z=>nR(n,Z),onSuccess:()=>{N(),M(!1)},onError:Z=>{x({title:"新建卡片失败",body:Z instanceof Error?Z.message:String(Z)})}}),U=Pn({mutationFn:({seq:Z,state:pe})=>iR(n,Z,pe),onMutate:async({seq:Z,state:pe})=>{await w.cancelQueries({queryKey:["cards",n]});const O=w.getQueryData(["cards",n]);return O&&w.setQueryData(["cards",n],{...O,data:O.data.map(L=>L.seq===Z?{...L,state:pe}:L)}),{prev:O}},onError:(Z,pe,O)=>{O!=null&&O.prev&&w.setQueryData(["cards",n],O.prev),x({title:"移动卡片失败",body:Z instanceof Error?Z.message:String(Z)})},onSettled:()=>{w.invalidateQueries({queryKey:["cards",n]})}}),J=((Q=S.data)==null?void 0:Q.data)??[],{allSkills:C,allLabels:P}=j.useMemo(()=>{const Z=new Set,pe=new Set;for(const O of J){for(const L of O.skills)Z.add(L);for(const L of O.labels)pe.add(L)}return{allSkills:[...Z].sort(),allLabels:[...pe].sort()}},[J]);if(!n)return m.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"看板"}),m.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"选择一个项目 🎯"}),m.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:"看板按项目分。挑一个开始:"}),m.jsx("div",{className:"flex flex-wrap gap-2",children:(K=v.data)==null?void 0:K.data.map(Z=>m.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>_(Z.name),type:"button",children:Z.name},Z.name))})]})]});const Y=J.filter(Z=>{if(o){const pe=o.toLowerCase();if(!(Z.title.toLowerCase().includes(pe)||Z.skills.some(L=>L.toLowerCase().includes(pe))||Z.labels.some(L=>L.toLowerCase().includes(pe))))return!1}return!(f.size>0&&!Z.skills.some(O=>f.has(O))||h.size>0&&!Z.labels.some(O=>h.has(O)))}),le=(oe=v.data)==null?void 0:oe.data.find(Z=>Z.name===n),q=(le==null?void 0:le.pipelineStatus)==="running";return m.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[m.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"看板 ✨"}),m.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:le?`${le.name} · ${le.cards.total} cards · ${le.workers.active} workers 活跃`:"加载中…"})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsx(lS,{current:n,onChange:_}),m.jsxs("button",{className:q?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>q?A.mutate():R.mutate(),disabled:R.isPending||A.isPending,type:"button","aria-label":q?"停止 pipeline":"启动 pipeline",title:q?"停止 pipeline":"启动 pipeline",children:[R.isPending||A.isPending?m.jsx(en,{size:14,strokeWidth:3,className:"animate-spin"}):q?m.jsx(i1,{size:14,strokeWidth:3}):m.jsx(Qp,{size:14,strokeWidth:3}),q?"停止":"启动"]}),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(en,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(If,{size:14,strokeWidth:2.5}),"重置"]}),m.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>M(!0),disabled:H.isPending,children:[H.isPending?m.jsx(en,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(Zi,{size:14,strokeWidth:3}),"新卡片"]})]})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsxs("div",{className:"relative flex-1 max-w-md",children:[m.jsx(xf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),m.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索标题 / skill / label…",value:o,onChange:Z=>c(Z.target.value),"aria-label":"搜索卡片"})]}),m.jsx(a0,{label:"skill",options:C,selected:f,onChange:d}),m.jsx(a0,{label:"label",options:P,selected:h,onChange:y}),(o||f.size>0||h.size>0)&&m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{c(""),d(new Set),y(new Set)},type:"button","aria-label":"清空筛选",children:[m.jsx(Er,{size:11,strokeWidth:3}),"清空"]}),m.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[m.jsx(VC,{size:12}),Y.length," / ",J.length]})]}),S.isError&&m.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[m.jsx("p",{className:"font-semibold",children:"加载卡片失败"}),m.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:S.error instanceof Error?S.error.message:String(S.error)})]}),!S.isError&&m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6 gap-3",children:xR.map(Z=>m.jsx(bR,{label:Z.label,bg:Z.bg,cards:Y.filter(wR(Z.state)),onCardClick:pe=>s(pe.seq),onDropCard:pe=>U.mutate({seq:pe,state:Z.state})},Z.state))}),a!==null&&m.jsx(yR,{project:n,seq:a,onClose:()=>s(null),onChanged:N}),F&&m.jsx(XO,{project:n,isPending:H.isPending,onCancel:()=>M(!1),onCreate:Z=>H.mutate(Z)})]})}function wR(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]=j.useState(!1),c=j.useRef(null);j.useEffect(()=>{if(!s)return;const y=x=>{var v;(v=c.current)!=null&&v.contains(x.target)||o(!1)},g=x=>{x.key==="Escape"&&o(!1)};return window.addEventListener("click",y),window.addEventListener("keydown",g),()=>{window.removeEventListener("click",y),window.removeEventListener("keydown",g)}},[s]);const f=y=>{const g=new Set(n);g.has(y)?g.delete(y):g.add(y),a(g)},d=t.length===0,h=n.size;return m.jsxs("div",{ref:c,className:"relative",children:[m.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!d&&o(y=>!y),disabled:d,"aria-haspopup":"listbox","aria-expanded":s,"aria-label":`按 ${e} 筛选`,children:[e,h>0&&m.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:h}),m.jsx(Lf,{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 _R(){return Bt("/api/workers/all")}function NR(e){return Bt(`/api/projects/${encodeURIComponent(e)}/workers`)}function kR(e,t){return Bt(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function cS(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 cS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function dg(e,t,n){return cS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function TR(){const[e,t]=jf(),n=e.get("project");aS(n);const a=Tn(),[s,o]=j.useState(null),{data:c,isLoading:f,isError:d,error:h,refetch:y}=dt({queryKey:["workers",n],queryFn:()=>NR(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(w=>w.state==="running").length,v=g.filter(w=>w.state==="stuck").length,S=g.filter(w=>w.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(lS,{current:n,onChange:w=>t({project:w})}),m.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>y(),type:"button",children:[m.jsx(If,{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(w=>m.jsx(CR,{project:n,worker:w,onChange:()=>a.invalidateQueries({queryKey:["workers",n]}),onDetail:()=>o(w.slot)},w.slot))})]})}),s!==null&&m.jsx(AR,{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 CR({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(uS,{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:fS(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(iA,{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(Yp,{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(Vp,{size:12,strokeWidth:2.5})," 终止"]})]})]})]})}function AR({project:e,slot:t,onClose:n,onChange:a}){const{confirm:s,alert:o}=qn(),{data:c,isLoading:f,isError:d,error:h,refetch:y}=dt({queryKey:["worker-detail",e,t],queryFn:()=>kR(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",children:m.jsxs("div",{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(If,{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(uS,{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:fS(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()} (${OR(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(`
478
+ `)}),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(Vp,{size:14,strokeWidth:3})," 终止"]}),c.state==="running"&&m.jsx(en,{size:14,strokeWidth:3,className:"animate-spin self-center text-[var(--color-running)]"})]})]})]})})}function OR(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 uS({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 fS(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 RR(){var f;const e=Tn(),[t,n]=j.useState(null),a=dt({queryKey:["workers-agg"],queryFn:_R,refetchInterval:5e3});j.useEffect(()=>{if(!a.data)return;const d=a.data.capacity.map(y=>y.project),h=[];for(const y of d){const g=new EventSource(`/stream/projects/${encodeURIComponent(y)}`),x=()=>{e.invalidateQueries({queryKey:["workers-agg"]})};g.addEventListener("worker.updated",x),g.addEventListener("worker.added",x),g.addEventListener("worker.deleted",x),g.addEventListener("card.updated",x),h.push(g)}return()=>{for(const y of h)y.close()}},[(f=a.data)==null?void 0:f.capacity.map(d=>d.project).join(","),e]);const s=j.useMemo(()=>{var h,y;return[...((h=a.data)==null?void 0:h.alerts)??[],...((y=a.data)==null?void 0:y.active)??[]]},[a.data]),o=t&&s.find(d=>d.project===t.project&&d.slot===t.slot),c=j.useMemo(()=>{if(!a.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const d={projects:a.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const h of a.data.capacity)d.running+=h.running,d.starting+=h.starting,d.stuck+=h.stuck,d.crashed+=h.crashed,d.idle+=h.idle;return d},[a.data]);return m.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[m.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Workers 👷"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:["跨 ",c.projects," 项目 · ",c.running," 跑 · ",c.starting," 启动 ·"," ",m.jsxs("span",{className:"text-[var(--color-stuck)]",children:[c.stuck," 卡"]})," ·"," ",m.jsxs("span",{className:"text-[var(--color-crashed)]",children:[c.crashed," 崩"]})," · ",c.idle," 闲"]})]}),m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a.refetch(),disabled:a.isFetching,type:"button","aria-label":"刷新",children:[a.isFetching?m.jsx(en,{size:12,strokeWidth:3,className:"animate-spin"}):m.jsx(hs,{size:12,strokeWidth:2.5}),"刷新"]})]}),m.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[m.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[a.isLoading&&m.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"加载中…"}),a.isError&&m.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:m.jsxs("p",{children:["加载失败: ",a.error instanceof Error?a.error.message:String(a.error)]})}),a.data&&m.jsxs(m.Fragment,{children:[m.jsx(MR,{alerts:a.data.alerts,selected:t,onSelect:(d,h)=>n({project:d,slot:h})}),m.jsx(jR,{active:a.data.active,selected:t,onSelect:(d,h)=>n({project:d,slot:h})}),m.jsx(DR,{capacity:a.data.capacity})]})]}),m.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:o?m.jsx(zR,{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 MR({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(Hp,{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(zA,{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(BC,{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 jR({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)] ${BR(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(Yp,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function DR({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(LR,{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 LR({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:IR(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 IR(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 zR({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(Yp,{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,`
479
+ `]}),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(DA,{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(Vp,{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(en,{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(CA,{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 BR(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 UR(e){const t=new URLSearchParams;return e.project&&t.set("project",e.project),e.worker&&t.set("worker",e.worker),t.set("limit",String(e.limit)),e.since&&t.set("since",e.since),Bt(`/api/logs?${t}`)}function $R(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const FR=["error","warn","info","debug"],PR=["error","warn","info"];function qR(){var U,J;const[e,t]=jf(),n=e.get("project"),a=e.get("worker")??"",[s,o]=j.useState([]),[c,f]=j.useState(!1),[d,h]=j.useState(!0),[y,g]=j.useState(()=>new Set(PR)),[x,v]=j.useState(""),[S,w]=j.useState("live"),[N,_]=j.useState(()=>{const C=new Date(Date.now()-36e5),P=Y=>String(Y).padStart(2,"0");return`${C.getFullYear()}-${P(C.getMonth()+1)}-${P(C.getDate())}T${P(C.getHours())}:${P(C.getMinutes())}`}),R=j.useRef(null),A=!n,D=dt({queryKey:["projects"],queryFn:Bl}),{data:F,refetch:M}=dt({queryKey:["logs",n??"agg",a,S,S==="history"?N:"live"],queryFn:()=>UR({project:n||void 0,worker:a||void 0,limit:S==="history"?2e3:500,since:S==="history"?new Date(N).toISOString():void 0}),refetchInterval:A&&S==="live"?5e3:!1});j.useEffect(()=>{F!=null&&F.data&&o(F.data)},[F]),j.useEffect(()=>{if(!n||S!=="live")return;const C=$R({project:n,worker:a||void 0}),P=new EventSource(C);return P.addEventListener("log.line",Y=>{if(!c)try{const le=JSON.parse(Y.data);o(q=>{const Q=[...q,le];return Q.length>5e3&&Q.splice(0,Q.length-5e3),Q})}catch{}}),()=>P.close()},[n,a,c,S]),j.useEffect(()=>{if(!d)return;const C=R.current;C&&(C.scrollTop=C.scrollHeight)},[s,d]);const H=j.useMemo(()=>{const C=x.toLowerCase();return s.filter(P=>!(!y.has(P.level)||C&&!P.msg.toLowerCase().includes(C)))},[s,y,x]);return m.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[m.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Logs 📜"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[A?`全部项目(${((U=D.data)==null?void 0:U.data.length)??0})`:n,a&&` · worker-${a}`," · ",A&&S==="live"?"5s 轮询":"tail -f"," · ",s.length," lines",c&&m.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:"⏸ PAUSED"})]})]})}),m.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:()=>w("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:()=>w("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(tA,{size:11,strokeWidth:2.5}),"历史"]})]}),S==="history"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:N,onChange:C=>_(C.target.value),"aria-label":"查询起始时间"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>M(),type:"button","aria-label":"查询",children:[m.jsx(xf,{size:11,strokeWidth:3}),"查询"]})]}),m.jsxs("div",{className:"relative",children:[m.jsx(QC,{size:14,strokeWidth:2.5,className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"}),m.jsxs("select",{className:"nb-input appearance-none pl-9 pr-9 font-[family-name:var(--font-mono)] cursor-pointer",style:{padding:"10px 36px 10px 36px",fontSize:13,minWidth:180},value:n??"",onChange:C=>{const P=C.target.value;t(P?{project:P}:{})},"aria-label":"筛选项目",children:[m.jsx("option",{value:"",children:"全部项目"}),(J=D.data)==null?void 0:J.data.map(C=>m.jsx("option",{value:C.name,children:C.name},C.name))]}),m.jsx(Lf,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),m.jsxs("div",{className:"relative flex-1 max-w-md",children:[m.jsx(xf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),m.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"过滤关键字…",value:x,onChange:C=>v(C.target.value),"aria-label":"过滤日志"})]}),m.jsx("div",{className:"flex items-center gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:FR.map(C=>m.jsx(HR,{level:C,enabled:y.has(C),onToggle:()=>{g(P=>{const Y=new Set(P);return Y.has(C)?Y.delete(C):Y.add(C),Y})}},C))}),m.jsxs("div",{className:"ml-auto flex gap-2",children:[S==="live"&&m.jsxs(m.Fragment,{children:[m.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>h(C=>!C),type:"button",children:d?"✓ Auto-scroll":"Auto-scroll"}),m.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(C=>!C),type:"button",children:c?m.jsxs(m.Fragment,{children:[m.jsx(Qp,{size:12,strokeWidth:3})," Resume"]}):m.jsxs(m.Fragment,{children:[m.jsx(pA,{size:12,strokeWidth:3})," Pause"]})})]}),m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const C=new Blob([H.map(le=>le.raw).join(`
480
+ `)],{type:"text/plain"}),P=URL.createObjectURL(C),Y=document.createElement("a");Y.href=P,Y.download=`${n}-log-${Date.now()}.log`,Y.click(),URL.revokeObjectURL(P)},type:"button",children:[m.jsx(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:(F==null?void 0:F.file)??"~/.coral/projects/.../logs/*.log"}),S==="live"?m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):m.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),m.jsxs("div",{ref:R,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:C=>{const P=C.currentTarget;!(P.scrollHeight-P.scrollTop-P.clientHeight<40)&&d&&h(!1)},children:[H.map((C,P)=>m.jsx(KR,{line:C},P)),H.length===0&&m.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"没有匹配的日志"})]})]})]})}function HR({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 KR({line:e}){var a;const t={error:"bg-[var(--color-crashed)] text-[var(--color-text)]",warn:"bg-[var(--color-stuck)] text-[var(--color-text)]",info:"bg-[var(--color-secondary)] text-[var(--color-text)]",debug:"",trace:""},n=!!e.project;return m.jsxs("div",{className:["grid gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",n?"grid-cols-[100px_90px_60px_1fr]":"grid-cols-[100px_60px_1fr]"].join(" "),children:[m.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((a=e.ts.split("T")[1])==null?void 0:a.replace("Z",""))??e.ts:"--"}),n&&m.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),m.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),m.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function GR(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const QR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VR={};function r0(e,t){return(VR.jsx?YR:QR).test(e)}const XR=/[ \t\n\f\r]/g;function ZR(e){return typeof e=="object"?e.type==="text"?s0(e.value):!1:s0(e)}function s0(e){return e.replace(XR,"")===""}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 dS(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 pp(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 WR=0;const $e=gs(),Xt=gs(),gp=gs(),ue=gs(),St=gs(),gl=gs(),ni=gs();function gs(){return 2**++WR}const bp=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Xt,commaOrSpaceSeparated:ni,commaSeparated:gl,number:ue,overloadedBoolean:gp,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),_m=Object.keys(bp);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&bp[c])===bp[c])}}}gg.prototype.defined=!0;function l0(e,t,n){n&&(e[t]=n)}function Gl(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[pp(a)]=a,n[pp(o.attribute)]=a}return new Sc(t,n,e.space)}const hS=Gl({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 mS(e,t){return t in e?e[t]:t}function pS(e,t){return mS(e,t.toLowerCase())}const JR=Gl({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:gp,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:gp,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:pS}),eM=Gl({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:mS}),gS=Gl({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()}}),bS=Gl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pS}),yS=Gl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),tM={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"},nM=/[A-Z]/g,o0=/-[a-z]/g,iM=/^data[-\w.:]+$/i;function aM(e,t){const n=pp(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"&&iM.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(o0,sM);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!o0.test(o)){let c=o.replace(nM,rM);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=gg}return new s(a,t)}function rM(e){return"-"+e.toLowerCase()}function sM(e){return e.charAt(1).toUpperCase()}const lM=dS([hS,JR,gS,bS,yS],"html"),bg=dS([hS,eM,gS,bS,yS],"svg");function oM(e){return e.join(" ").trim()}var rl={},Nm,c0;function cM(){if(c0)return Nm;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=`
481
+ `,h="/",y="*",g="",x="comment",v="declaration";function S(N,_){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];_=_||{};var R=1,A=1;function D(q){var Q=q.match(t);Q&&(R+=Q.length);var K=q.lastIndexOf(d);A=~K?q.length-K:A+q.length}function F(){var q={line:R,column:A};return function(Q){return Q.position=new M(q),J(),Q}}function M(q){this.start=q,this.end={line:R,column:A},this.source=_.source}M.prototype.content=N;function H(q){var Q=new Error(_.source+":"+R+":"+A+": "+q);if(Q.reason=q,Q.filename=_.source,Q.line=R,Q.column=A,Q.source=N,!_.silent)throw Q}function U(q){var Q=q.exec(N);if(Q){var K=Q[0];return D(K),N=N.slice(K.length),Q}}function J(){U(n)}function C(q){var Q;for(q=q||[];Q=P();)Q!==!1&&q.push(Q);return q}function P(){var q=F();if(!(h!=N.charAt(0)||y!=N.charAt(1))){for(var Q=2;g!=N.charAt(Q)&&(y!=N.charAt(Q)||h!=N.charAt(Q+1));)++Q;if(Q+=2,g===N.charAt(Q-1))return H("End of comment missing");var K=N.slice(2,Q-2);return A+=2,D(K),N=N.slice(Q),A+=2,q({type:x,comment:K})}}function Y(){var q=F(),Q=U(a);if(Q){if(P(),!U(s))return H("property missing ':'");var K=U(o),oe=q({type:v,property:w(Q[0].replace(e,g)),value:K?w(K[0].replace(e,g)):g});return U(c),oe}}function le(){var q=[];C(q);for(var Q;Q=Y();)Q!==!1&&(q.push(Q),C(q));return q}return J(),le()}function w(N){return N?N.replace(f,g):g}return Nm=S,Nm}var u0;function uM(){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(cM());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 Qo={},f0;function fM(){if(f0)return Qo;f0=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.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 Qo.camelCase=d,Qo}var Yo,d0;function dM(){if(d0)return Yo;d0=1;var e=Yo&&Yo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(uM()),n=fM();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,Yo=a,Yo}var hM=dM();const mM=Cp(hM),xS=vS("end"),yg=vS("start");function vS(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 pM(e){const t=yg(e),n=xS(e);if(t&&n)return{start:t,end:n}}function tc(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?yp(e):""}function yp(e){return m0(e&&e.line)+":"+m0(e&&e.column)}function h0(e){return yp(e&&e.start)+"-"+yp(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=tc(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,gM=new Map,bM=/[A-Z]/g,yM=new Set(["table","tbody","thead","tfoot","tr"]),xM=new Set(["td","th"]),ES="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vM(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=CM(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=TM(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:lM,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=SS(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function SS(e,t,n){if(t.type==="element")return EM(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return SM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return _M(e,t,n);if(t.type==="mdxjsEsm")return wM(e,t);if(t.type==="root")return NM(e,t,n);if(t.type==="text")return kM(e,t)}function EM(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=AM(e,t);let f=Eg(e,t);return yM.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!ZR(d):!0})),wS(e,c,o,t),vg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function SM(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)}uc(e,t.position)}function wM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);uc(e,t.position)}function _M(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=OM(e,t),f=Eg(e,t);return wS(e,c,o,t),vg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function NM(e,t,n){const a={};return vg(a,Eg(e,t)),e.create(t,e.Fragment,a,n)}function kM(e,t){return t.value}function wS(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 TM(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 CM(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 AM(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&xg.call(t.properties,s)){const o=RM(e,s,t.properties[s]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&xM.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 OM(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 uc(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 uc(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:gM;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=SS(e,o,c);f!==void 0&&n.push(f)}return n}function RM(e,t,n){const a=aM(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?GR(n):oM(n)),a.property==="style"){let s=typeof n=="object"?n:MM(e,String(n));return e.stylePropertyNameCase==="css"&&(s=jM(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?tM[a.property]||a.property:a.attribute,n]}}function MM(e,t){try{return mM(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=ES+"#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);uc(e)}function uc(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=ES+"#cannot-handle-mdx-estrees-without-createevaluater",n}function jM(e){const t={};let n;for(n in e)xg.call(e,n)&&(t[DM(n)]=e[n]);return t}function DM(e){let t=e.replace(bM,LM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function LM(e){return"-"+e.toLowerCase()}const km={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"]},IM={};function Sg(e,t){const n=IM,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return NS(e,a,s)}function NS(e,t,n){if(zM(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]=NS(e[s],t,n);return a.join("")}function zM(e){return!!(e&&typeof e=="object")}const g0=document.createElement("i");function wg(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 kS(e){const t={};let n=-1;for(;++n<e.length;)BM(t,e[n]);return t}function BM(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];UM(s[c],Array.isArray(f)?f:f?[f]:[])}}}function UM(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 TS(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]/),$M=Nr(/[#-'*+\--9=?A-Z^-~]/);function _f(e){return e!==null&&(e<32||e===127)}const xp=Nr(/\d/),FM=Nr(/[\dA-Fa-f]/),PM=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 Wf=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 Ql(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 qM={tokenize:HM};function HM(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 KM={tokenize:GM},y0={tokenize:QM};function GM(e){const t=this,n=[];let a=0,s,o,c;return f;function f(A){if(a<n.length){const D=n[a];return t.containerState=D[1],e.attempt(D[0].continuation,d,h)(A)}return h(A)}function d(A){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const D=t.events.length;let F=D,M;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){M=t.events[F][1].end;break}_(a);let H=D;for(;H<t.events.length;)t.events[H][1].end={...M},H++;return ri(t.events,F+1,0,t.events.slice(D)),t.events.length=H,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(),_(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(),_(0),e.consume(A);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),w(A)}function w(A){if(A===null){N(e.exit("chunkFlow"),!0),_(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),w)}function N(A,D){const F=t.sliceStream(A);if(D&&F.push(null),A.previous=o,o&&(o.next=A),o=A,s.defineSkip(A.start),s.write(F),t.parser.lazy[A.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<c&&(!s.events[M][1].end||s.events[M][1].end.offset>c))return;const H=t.events.length;let U=H,J,C;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(J){C=t.events[U][1].end;break}J=!0}for(_(a),M=H;M<t.events.length;)t.events[M][1].end={...C},M++;ri(t.events,U+1,0,t.events.slice(H)),t.events.length=M}}function _(A){let D=n.length;for(;D-- >A;){const F=n[D];t.containerState=F[1],F[0].exit.call(t,e)}n.length=A}function R(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function QM(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(Wf(e))return 2}function Jf(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 vp={name:"attention",resolveAll:YM,tokenize:VM};function YM(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,Jf(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 VM(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 XM={name:"autolink",tokenize:ZM};function ZM(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||_f(v)?n(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),y):$M(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 wc={partial:!0,tokenize:WM};function WM(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 CS={continuation:{tokenize:ej},exit:tj,name:"blockQuote",tokenize:JM};function JM(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 ej(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(CS,t,n)(c)}}function tj(e){e.exit("blockQuote")}const AS={name:"characterEscape",tokenize:nj};function nj(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 PM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const OS={name:"characterReference",tokenize:ij};function ij(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=FM,y):(e.enter("characterReferenceValue"),o=7,c=xp,y(g))}function y(g){if(g===59&&s){const x=e.exit("characterReferenceValue");return c===pn&&!wg(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:rj},E0={concrete:!0,name:"codeFenced",tokenize:aj};function aj(e,t,n){const a=this,s={partial:!0,tokenize:F};let o=0,c=0,f;return d;function d(M){return h(M)}function h(M){const H=a.events[a.events.length-1];return o=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(M)}function y(M){return M===f?(c++,e.consume(M),y):c<3?n(M):(e.exit("codeFencedFenceSequence"),Ge(M)?Je(e,g,"whitespace")(M):g(M))}function g(M){return M===null||Te(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(v0,w,D)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(M))}function x(M){return M===null||Te(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Ge(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,v,"whitespace")(M)):M===96&&M===f?n(M):(e.consume(M),x)}function v(M){return M===null||Te(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(M))}function S(M){return M===null||Te(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===f?n(M):(e.consume(M),S)}function w(M){return e.attempt(s,D,N)(M)}function N(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),_}function _(M){return o>0&&Ge(M)?Je(e,R,"linePrefix",o+1)(M):R(M)}function R(M){return M===null||Te(M)?e.check(v0,w,D)(M):(e.enter("codeFlowValue"),A(M))}function A(M){return M===null||Te(M)?(e.exit("codeFlowValue"),R(M)):(e.consume(M),A)}function D(M){return e.exit("codeFenced"),t(M)}function F(M,H,U){let J=0;return C;function C(Q){return M.enter("lineEnding"),M.consume(Q),M.exit("lineEnding"),P}function P(Q){return M.enter("codeFencedFence"),Ge(Q)?Je(M,Y,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):Y(Q)}function Y(Q){return Q===f?(M.enter("codeFencedFenceSequence"),le(Q)):U(Q)}function le(Q){return Q===f?(J++,M.consume(Q),le):J>=c?(M.exit("codeFencedFenceSequence"),Ge(Q)?Je(M,q,"whitespace")(Q):q(Q)):U(Q)}function q(Q){return Q===null||Te(Q)?(M.exit("codeFencedFence"),H(Q)):U(Q)}}}function rj(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 Tm={name:"codeIndented",tokenize:lj},sj={partial:!0,tokenize:oj};function lj(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(sj,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 oj(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 cj={name:"codeText",previous:fj,resolve:uj,tokenize:dj};function uj(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 fj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function dj(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 hj{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&&Vo(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),Vo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Vo(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);Vo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Vo(this.left,n.reverse())}}}function Vo(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 RS(e){const t={};let n=-1,a,s,o,c,f,d,h;const y=new hj(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,mj(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 mj(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,w=0;const N=[w];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&&(w=x+1,N.push(w),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 _=f.slice(N[x],N[x+1]),R=o.pop();d.push([R,R+_.length-1]),e.splice(R,2,_)}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 pj={resolve:bj,tokenize:yj},gj={partial:!0,tokenize:xj};function bj(e){return RS(e),e}function yj(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(gj,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 xj(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 MS(e,t,n,a,s,o,c,f,d){const h=d||Number.POSITIVE_INFINITY;let y=0;return g;function g(_){return _===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(_),e.exit(o),x):_===null||_===32||_===41||_f(_)?n(_):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(_))}function x(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(f),x(_)):_===null||_===60||Te(_)?n(_):(e.consume(_),_===92?S:v)}function S(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!y&&(_===null||_===41||xt(_))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(_)):y<h&&_===40?(e.consume(_),y++,w):_===41?(e.consume(_),y--,w):_===null||_===32||_===40||_f(_)?n(_):(e.consume(_),_===92?N:w)}function N(_){return _===40||_===41||_===92?(e.consume(_),w):w(_)}}function jS(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 DS(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 nc(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 vj={name:"definition",tokenize:Sj},Ej={partial:!0,tokenize:wj};function Sj(e,t,n){const a=this;let s;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return jS.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)?nc(e,h)(v):h(v)}function h(v){return MS(e,y,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return e.attempt(Ej,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 wj(e,t,n){return a;function a(f){return xt(f)?nc(e,s)(f):n(f)}function s(f){return DS(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 _j={name:"hardBreakEscape",tokenize:Nj};function Nj(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 kj={name:"headingAtx",resolve:Tj,tokenize:Cj};function Tj(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 Cj(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 Aj=["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"],Oj={concrete:!0,name:"htmlFlow",resolveTo:jj,tokenize:Dj},Rj={partial:!0,tokenize:Ij},Mj={partial:!0,tokenize:Lj};function jj(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 Dj(e,t,n){const a=this;let s,o,c,f,d;return h;function h(T){return y(T)}function y(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),g}function g(T){return T===33?(e.consume(T),x):T===47?(e.consume(T),o=!0,w):T===63?(e.consume(T),s=3,a.interrupt?t:O):kn(T)?(e.consume(T),c=String.fromCharCode(T),N):n(T)}function x(T){return T===45?(e.consume(T),s=2,v):T===91?(e.consume(T),s=5,f=0,S):kn(T)?(e.consume(T),s=4,a.interrupt?t:O):n(T)}function v(T){return T===45?(e.consume(T),a.interrupt?t:O):n(T)}function S(T){const he="CDATA[";return T===he.charCodeAt(f++)?(e.consume(T),f===he.length?a.interrupt?t:Y:S):n(T)}function w(T){return kn(T)?(e.consume(T),c=String.fromCharCode(T),N):n(T)}function N(T){if(T===null||T===47||T===62||xt(T)){const he=T===47,Ne=c.toLowerCase();return!he&&!o&&S0.includes(Ne)?(s=1,a.interrupt?t(T):Y(T)):Aj.includes(c.toLowerCase())?(s=6,he?(e.consume(T),_):a.interrupt?t(T):Y(T)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(T):o?R(T):A(T))}return T===45||pn(T)?(e.consume(T),c+=String.fromCharCode(T),N):n(T)}function _(T){return T===62?(e.consume(T),a.interrupt?t:Y):n(T)}function R(T){return Ge(T)?(e.consume(T),R):C(T)}function A(T){return T===47?(e.consume(T),C):T===58||T===95||kn(T)?(e.consume(T),D):Ge(T)?(e.consume(T),A):C(T)}function D(T){return T===45||T===46||T===58||T===95||pn(T)?(e.consume(T),D):F(T)}function F(T){return T===61?(e.consume(T),M):Ge(T)?(e.consume(T),F):A(T)}function M(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),d=T,H):Ge(T)?(e.consume(T),M):U(T)}function H(T){return T===d?(e.consume(T),d=null,J):T===null||Te(T)?n(T):(e.consume(T),H)}function U(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||xt(T)?F(T):(e.consume(T),U)}function J(T){return T===47||T===62||Ge(T)?A(T):n(T)}function C(T){return T===62?(e.consume(T),P):n(T)}function P(T){return T===null||Te(T)?Y(T):Ge(T)?(e.consume(T),P):n(T)}function Y(T){return T===45&&s===2?(e.consume(T),K):T===60&&s===1?(e.consume(T),oe):T===62&&s===4?(e.consume(T),L):T===63&&s===3?(e.consume(T),O):T===93&&s===5?(e.consume(T),pe):Te(T)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Rj,te,le)(T)):T===null||Te(T)?(e.exit("htmlFlowData"),le(T)):(e.consume(T),Y)}function le(T){return e.check(Mj,q,te)(T)}function q(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Q}function Q(T){return T===null||Te(T)?le(T):(e.enter("htmlFlowData"),Y(T))}function K(T){return T===45?(e.consume(T),O):Y(T)}function oe(T){return T===47?(e.consume(T),c="",Z):Y(T)}function Z(T){if(T===62){const he=c.toLowerCase();return S0.includes(he)?(e.consume(T),L):Y(T)}return kn(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),Z):Y(T)}function pe(T){return T===93?(e.consume(T),O):Y(T)}function O(T){return T===62?(e.consume(T),L):T===45&&s===2?(e.consume(T),O):Y(T)}function L(T){return T===null||Te(T)?(e.exit("htmlFlowData"),te(T)):(e.consume(T),L)}function te(T){return e.exit("htmlFlow"),t(T)}}function Lj(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 Ij(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(wc,t,n)}}const zj={name:"htmlText",tokenize:Bj};function Bj(e,t,n){const a=this;let s,o,c;return f;function f(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),F):O===63?(e.consume(O),A):kn(O)?(e.consume(O),U):n(O)}function h(O){return O===45?(e.consume(O),y):O===91?(e.consume(O),o=0,S):kn(O)?(e.consume(O),R):n(O)}function y(O){return O===45?(e.consume(O),v):n(O)}function g(O){return O===null?n(O):O===45?(e.consume(O),x):Te(O)?(c=g,oe(O)):(e.consume(O),g)}function x(O){return O===45?(e.consume(O),v):g(O)}function v(O){return O===62?K(O):O===45?x(O):g(O)}function S(O){const L="CDATA[";return O===L.charCodeAt(o++)?(e.consume(O),o===L.length?w:S):n(O)}function w(O){return O===null?n(O):O===93?(e.consume(O),N):Te(O)?(c=w,oe(O)):(e.consume(O),w)}function N(O){return O===93?(e.consume(O),_):w(O)}function _(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,oe(O)):(e.consume(O),R)}function A(O){return O===null?n(O):O===63?(e.consume(O),D):Te(O)?(c=A,oe(O)):(e.consume(O),A)}function D(O){return O===62?K(O):A(O)}function F(O){return kn(O)?(e.consume(O),M):n(O)}function M(O){return O===45||pn(O)?(e.consume(O),M):H(O)}function H(O){return Te(O)?(c=H,oe(O)):Ge(O)?(e.consume(O),H):K(O)}function U(O){return O===45||pn(O)?(e.consume(O),U):O===47||O===62||xt(O)?J(O):n(O)}function J(O){return O===47?(e.consume(O),K):O===58||O===95||kn(O)?(e.consume(O),C):Te(O)?(c=J,oe(O)):Ge(O)?(e.consume(O),J):K(O)}function C(O){return O===45||O===46||O===58||O===95||pn(O)?(e.consume(O),C):P(O)}function P(O){return O===61?(e.consume(O),Y):Te(O)?(c=P,oe(O)):Ge(O)?(e.consume(O),P):J(O)}function Y(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,le):Te(O)?(c=Y,oe(O)):Ge(O)?(e.consume(O),Y):(e.consume(O),q)}function le(O){return O===s?(e.consume(O),s=void 0,Q):O===null?n(O):Te(O)?(c=le,oe(O)):(e.consume(O),le)}function q(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||xt(O)?J(O):(e.consume(O),q)}function Q(O){return O===47||O===62||xt(O)?J(O):n(O)}function K(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function oe(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Z}function Z(O){return Ge(O)?Je(e,pe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):pe(O)}function pe(O){return e.enter("htmlTextData"),c(O)}}const _g={name:"labelEnd",resolveAll:Pj,resolveTo:qj,tokenize:Hj},Uj={tokenize:Kj},$j={tokenize:Gj},Fj={tokenize:Qj};function Pj(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 qj(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,Jf(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 Hj(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(Uj,y,c?y:g)(x):x===91?e.attempt($j,y,c?h:g)(x):c?y(x):g(x)}function h(x){return e.attempt(Fj,y,g)(x)}function y(x){return t(x)}function g(x){return o._balanced=!0,n(x)}}function Kj(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)?nc(e,o)(g):o(g)}function o(g){return g===41?y(g):MS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return xt(g)?nc(e,d)(g):y(g)}function f(g){return n(g)}function d(g){return g===34||g===39||g===40?DS(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function h(g){return xt(g)?nc(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 Gj(e,t,n){const a=this;return s;function s(f){return jS.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 Qj(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 Yj={name:"labelStartImage",resolveAll:_g.resolveAll,tokenize:Vj};function Vj(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 Xj={name:"labelStartLink",resolveAll:_g.resolveAll,tokenize:Zj};function Zj(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 Cm={name:"lineEnding",tokenize:Wj};function Wj(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:Jj};function Jj(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:iD},exit:rD,name:"list",tokenize:nD},eD={partial:!0,tokenize:sD},tD={partial:!0,tokenize:aD};function nD(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:xp(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 xp(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(wc,a.interrupt?n:y,e.attempt(eD,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 iD(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(wc,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(tD,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 aD(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 rD(e){e.exit(this.containerState.type)}function sD(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 w0={name:"setextUnderline",resolveTo:lD,tokenize:oD};function lD(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 oD(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 cD={tokenize:uD};function uD(e){const t=this,n=e.attempt(wc,a,e.attempt(this.parser.constructs.flowInitial,s,Je(e,e.attempt(this.parser.constructs.flow,s,e.attempt(pj,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 fD={resolveAll:IS()},dD=LS("string"),hD=LS("text");function LS(e){return{resolveAll:IS(e==="text"?mD: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 IS(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 mD(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 pD={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:CS},gD={91:vj},bD={[-2]:Tm,[-1]:Tm,32:Tm},yD={35:kj,42:mf,45:[w0,mf],60:Oj,61:w0,95:mf,96:E0,126:E0},xD={38:OS,92:AS},vD={[-5]:Cm,[-4]:Cm,[-3]:Cm,33:Yj,38:OS,42:vp,60:[XM,zj],91:Xj,92:[_j,AS],93:_g,95:vp,96:cj},ED={null:[vp,fD]},SD={null:[42,95]},wD={null:[]},_D=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:SD,contentInitial:gD,disable:wD,document:pD,flow:yD,flowInitial:bD,insideSpan:ED,string:xD,text:vD},Symbol.toStringTag,{value:"Module"}));function ND(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:H(F),check:H(M),consume:R,enter:A,exit:D,interrupt:H(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:S,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:g};let y=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function g(P){return c=xi(c,P),N(),c[c.length-1]!==null?[]:(U(t,0),h.events=Jf(o,h.events,h),h.events)}function x(P,Y){return TD(v(P),Y)}function v(P){return kD(c,P)}function S(){const{_bufferIndex:P,_index:Y,line:le,column:q,offset:Q}=a;return{_bufferIndex:P,_index:Y,line:le,column:q,offset:Q}}function w(P){s[P.line]=P.column,C()}function N(){let P;for(;a._index<c.length;){const Y=c[a._index];if(typeof Y=="string")for(P=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===P&&a._bufferIndex<Y.length;)_(Y.charCodeAt(a._bufferIndex));else _(Y)}}function _(P){y=y(P)}function R(P){Te(P)?(a.line++,a.column=1,a.offset+=P===-3?2:1,C()):P!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=P}function A(P,Y){const le=Y||{};return le.type=P,le.start=S(),h.events.push(["enter",le,h]),f.push(le),le}function D(P){const Y=f.pop();return Y.end=S(),h.events.push(["exit",Y,h]),Y}function F(P,Y){U(P,Y.from)}function M(P,Y){Y.restore()}function H(P,Y){return le;function le(q,Q,K){let oe,Z,pe,O;return Array.isArray(q)?te(q):"tokenize"in q?te([q]):L(q);function L(ve){return Fe;function Fe(st){const it=st!==null&&ve[st],Zt=st!==null&&ve.null,Kn=[...Array.isArray(it)?it:it?[it]:[],...Array.isArray(Zt)?Zt:Zt?[Zt]:[]];return te(Kn)(st)}}function te(ve){return oe=ve,Z=0,ve.length===0?K:T(ve[Z])}function T(ve){return Fe;function Fe(st){return O=J(),pe=ve,ve.partial||(h.currentConstruct=ve),ve.name&&h.parser.constructs.disable.null.includes(ve.name)?Ne():ve.tokenize.call(Y?Object.assign(Object.create(h),Y):h,d,he,Ne)(st)}}function he(ve){return P(pe,O),Q}function Ne(ve){return O.restore(),++Z<oe.length?T(oe[Z]):K}}}function U(P,Y){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ri(h.events,Y,h.events.length-Y,P.resolve(h.events.slice(Y),h)),P.resolveTo&&(h.events=P.resolveTo(h.events,h))}function J(){const P=S(),Y=h.previous,le=h.currentConstruct,q=h.events.length,Q=Array.from(f);return{from:q,restore:K};function K(){a=P,h.previous=Y,h.currentConstruct=le,h.events.length=q,f=Q,C()}}function C(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function kD(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 TD(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=`
482
482
  `;break}case-3:{c=`\r
483
- `;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 TD(e){const a={constructs:kS([wD,...(e||{}).extensions||[]]),content:s(PM),defined:[],document:s(HM),flow:s(oD),lazy:{},string:s(fD),text:s(dD)};return a;function s(o){return c;function c(f){return _D(a,o,f)}}}function CD(e){for(;!RS(e););return e}const _0=/[\0\t\n\r]/g;function AD(){let e=1,t="",n=!0,a;return s;function s(o,c,f){const d=[];let h,y,g,x,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),g=0,t="",n&&(o.charCodeAt(0)===65279&&g++,n=void 0);g<o.length;){if(_0.lastIndex=g,h=_0.exec(o),x=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(x),!h){t=o.slice(g);break}if(v===10&&g===x&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),g<x&&(d.push(o.slice(g,x)),e+=x-g),v){case 0:{d.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,d.push(-2);e++<y;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}g=x+1}return f&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const OD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RD(e){return e.replace(OD,MD)}function MD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return TS(n.slice(o?2:1),o?16:10)}return wg(n)||e}const zS={}.hasOwnProperty;function jD(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),DD(n)(CD(TD(n).document().write(AD()(e,t,!0))))}function DD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(zi),autolinkProtocol:J,autolinkEmail:J,atxHeading:o(Ii),blockQuote:o(Wt),characterEscape:J,characterReference:J,codeFenced:o(Kn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Kn,c),codeText:o(Ji,c),codeTextData:J,data:J,codeFlowValue:J,definition:o(Ra),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Gn),hardBreakEscape:o(Xe),hardBreakTrailing:o(Xe),htmlFlow:o(_i,c),htmlFlowData:J,htmlText:o(_i,c),htmlTextData:J,image:o(li),label:c,link:o(zi),listItem:o(kr),listItemValue:x,listOrdered:o(ea,g),listUnordered:o(ea),paragraph:o(Yl),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Ii),strong:o(ys),thematicBreak:o(xs)},exit:{atxHeading:d(),atxHeadingSequence:F,autolink:d(),autolinkEmail:it,autolinkProtocol:st,blockQuote:d(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:ve,characterReference:Fe,codeFenced:d(N),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:C,codeIndented:d(_),codeText:d(Q),codeTextData:C,data:C,definition:d(),definitionDestinationString:D,definitionLabelString:R,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(Y),hardBreakTrailing:d(Y),htmlFlow:d(le),htmlFlowData:C,htmlText:d(q),htmlTextData:C,image:d(oe),label:pe,labelText:Z,lineEnding:P,link:d(K),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:he,resourceDestinationString:O,resourceTitleString:L,resource:te,setextHeading:d(U),setextHeadingLineSequence:H,setextHeadingText:M,strong:d(),thematicBreak:d()}};BS(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]];zS.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&&lt[0]==="enter"&&lt[1].type==="listItemPrefix"||et===-1&&lt[0]==="exit"&&(lt[1].type==="listUnordered"||lt[1].type==="listOrdered")){if(Ni){let Bi=Pe;for(an=void 0;Bi--;){const xn=ne[Bi];if(xn[1].type==="lineEnding"||xn[1].type==="lineEndingBlank"){if(xn[0]==="exit")continue;an&&(ne[an][1].type="lineEndingBlank",yn=!0),xn[1].type="lineEnding",an=Bi}else if(!(xn[1].type==="linePrefix"||xn[1].type==="blockQuotePrefix"||xn[1].type==="blockQuotePrefixWhitespace"||xn[1].type==="blockQuoteMarker"||xn[1].type==="listItemIndent"))break}Dt&&(!an||Dt<an)&&(Ni._spread=!0),Ni.end=Object.assign({},an?ne[an][1].start:lt[1].end),ne.splice(an||Pe,0,["exit",Ni,lt[2]]),Pe++,Ce++}if(lt[1].type==="listItemPrefix"){const Bi={type:"listItem",_spread:!1,start:Object.assign({},lt[1].start),end:void 0};Ni=Bi,ne.splice(Pe,0,["enter",Bi,lt[2]]),Pe++,Ce++,Dt=void 0,un=!0}}}return ne[fe][1]._spread=yn,Ce}function o(ne,fe){return Ce;function Ce(Pe){f.call(this,ne(Pe),Pe),fe&&fe.call(this,Pe)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ne,fe,Ce){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([fe,Ce||void 0]),ne.position={start:lr(fe.start),end:void 0}}function d(ne){return fe;function fe(Ce){ne&&ne.call(this,Ce),h.call(this,Ce)}}function h(ne,fe){const Ce=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==ne.type&&(fe?fe.call(this,ne,Pe[0]):(Pe[1]||N0).call(this,ne,Pe[0]));else throw new Error("Cannot close `"+ne.type+"` ("+tc({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 w(){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 _(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ne.replace(/(\r?\n|\r)$/g,"")}function R(ne){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Mi(this.sliceSerialize(ne)).toLowerCase()}function A(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ne}function D(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ne}function F(ne){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Ce=this.sliceSerialize(ne).length;fe.depth=Ce}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function H(ne){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function J(ne){const Ce=this.stack[this.stack.length-1].children;let Pe=Ce[Ce.length-1];(!Pe||Pe.type!=="text")&&(Pe=Ot(),Pe.position={start:lr(ne.start),end:void 0},Ce.push(Pe)),this.stack.push(Pe)}function C(ne){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ne),fe.position.end=lr(ne.end)}function P(ne){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=fe.children[fe.children.length-1];Ce.position.end=lr(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(J.call(this,ne),C.call(this,ne))}function Y(){this.data.atHardBreak=!0}function le(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ne}function q(){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 oe(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=fe,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function Z(ne){const fe=this.sliceSerialize(ne),Ce=this.stack[this.stack.length-2];Ce.label=RD(fe),Ce.identifier=Mi(fe).toLowerCase()}function pe(){const ne=this.stack[this.stack.length-1],fe=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Pe=ne.children;Ce.children=Pe}else Ce.alt=fe}function O(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ne}function L(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ne}function te(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function he(ne){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Mi(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function Ne(ne){this.data.characterReferenceType=ne.type}function ve(ne){const fe=this.sliceSerialize(ne),Ce=this.data.characterReferenceType;let Pe;Ce?(Pe=TS(fe,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=wg(fe);const et=this.stack[this.stack.length-1];et.value+=Pe}function Fe(ne){const fe=this.stack.pop();fe.position.end=lr(ne.end)}function st(ne){C.call(this,ne);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ne)}function it(ne){C.call(this,ne);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ne)}function Wt(){return{type:"blockquote",children:[]}}function Kn(){return{type:"code",lang:null,meta:null,value:""}}function Ji(){return{type:"inlineCode",value:""}}function Ra(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Gn(){return{type:"emphasis",children:[]}}function Ii(){return{type:"heading",depth:0,children:[]}}function Xe(){return{type:"break"}}function _i(){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 Yl(){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 BS(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?BS(e,a):LD(e,a)}}function LD(e,t){let n;for(n in t)if(zS.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+"` ("+tc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tc({start:t.start,end:t.end})+") is still open")}function ID(e){const t=this;t.parser=n;function n(a){return jD(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function zD(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 BD(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
484
- `}]}function UD(e,t){const n=t.value?t.value+`
485
- `:"",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 $D(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FD(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PD(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Ql(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 qD(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 HD(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function US(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 KD(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return US(e,t);const s={src:Ql(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 GD(e,t){const n={src:Ql(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 YD(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return US(e,t);const s={href:Ql(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 VD(e,t){const n={href:Ql(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 XD(e,t,n){const a=e.all(t),s=n?ZD(n):$S(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:`
483
+ `;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 CD(e){const a={constructs:kS([_D,...(e||{}).extensions||[]]),content:s(qM),defined:[],document:s(KM),flow:s(cD),lazy:{},string:s(dD),text:s(hD)};return a;function s(o){return c;function c(f){return ND(a,o,f)}}}function AD(e){for(;!RS(e););return e}const _0=/[\0\t\n\r]/g;function OD(){let e=1,t="",n=!0,a;return s;function s(o,c,f){const d=[];let h,y,g,x,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),g=0,t="",n&&(o.charCodeAt(0)===65279&&g++,n=void 0);g<o.length;){if(_0.lastIndex=g,h=_0.exec(o),x=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(x),!h){t=o.slice(g);break}if(v===10&&g===x&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),g<x&&(d.push(o.slice(g,x)),e+=x-g),v){case 0:{d.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,d.push(-2);e++<y;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}g=x+1}return f&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const RD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function MD(e){return e.replace(RD,jD)}function jD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return TS(n.slice(o?2:1),o?16:10)}return wg(n)||e}const zS={}.hasOwnProperty;function DD(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),LD(n)(AD(CD(n).document().write(OD()(e,t,!0))))}function LD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(zi),autolinkProtocol:J,autolinkEmail:J,atxHeading:o(Ii),blockQuote:o(Zt),characterEscape:J,characterReference:J,codeFenced:o(Kn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Kn,c),codeText:o(Ji,c),codeTextData:J,data:J,codeFlowValue:J,definition:o(Ra),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Gn),hardBreakEscape:o(Xe),hardBreakTrailing:o(Xe),htmlFlow:o(_i,c),htmlFlowData:J,htmlText:o(_i,c),htmlTextData:J,image:o(li),label:c,link:o(zi),listItem:o(kr),listItemValue:x,listOrdered:o(ea,g),listUnordered:o(ea),paragraph:o(Yl),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Ii),strong:o(ys),thematicBreak:o(xs)},exit:{atxHeading:d(),atxHeadingSequence:F,autolink:d(),autolinkEmail:it,autolinkProtocol:st,blockQuote:d(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:ve,characterReference:Fe,codeFenced:d(N),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:C,codeIndented:d(_),codeText:d(Q),codeTextData:C,data:C,definition:d(),definitionDestinationString:D,definitionLabelString:R,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(Y),hardBreakTrailing:d(Y),htmlFlow:d(le),htmlFlowData:C,htmlText:d(q),htmlTextData:C,image:d(oe),label:pe,labelText:Z,lineEnding:P,link:d(K),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:he,resourceDestinationString:O,resourceTitleString:L,resource:te,setextHeading:d(U),setextHeadingLineSequence:H,setextHeadingText:M,strong:d(),thematicBreak:d()}};BS(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]];zS.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&&lt[0]==="enter"&&lt[1].type==="listItemPrefix"||et===-1&&lt[0]==="exit"&&(lt[1].type==="listUnordered"||lt[1].type==="listOrdered")){if(Ni){let Bi=Pe;for(an=void 0;Bi--;){const xn=ne[Bi];if(xn[1].type==="lineEnding"||xn[1].type==="lineEndingBlank"){if(xn[0]==="exit")continue;an&&(ne[an][1].type="lineEndingBlank",yn=!0),xn[1].type="lineEnding",an=Bi}else if(!(xn[1].type==="linePrefix"||xn[1].type==="blockQuotePrefix"||xn[1].type==="blockQuotePrefixWhitespace"||xn[1].type==="blockQuoteMarker"||xn[1].type==="listItemIndent"))break}Dt&&(!an||Dt<an)&&(Ni._spread=!0),Ni.end=Object.assign({},an?ne[an][1].start:lt[1].end),ne.splice(an||Pe,0,["exit",Ni,lt[2]]),Pe++,Ce++}if(lt[1].type==="listItemPrefix"){const Bi={type:"listItem",_spread:!1,start:Object.assign({},lt[1].start),end:void 0};Ni=Bi,ne.splice(Pe,0,["enter",Bi,lt[2]]),Pe++,Ce++,Dt=void 0,un=!0}}}return ne[fe][1]._spread=yn,Ce}function o(ne,fe){return Ce;function Ce(Pe){f.call(this,ne(Pe),Pe),fe&&fe.call(this,Pe)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ne,fe,Ce){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([fe,Ce||void 0]),ne.position={start:lr(fe.start),end:void 0}}function d(ne){return fe;function fe(Ce){ne&&ne.call(this,Ce),h.call(this,Ce)}}function h(ne,fe){const Ce=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==ne.type&&(fe?fe.call(this,ne,Pe[0]):(Pe[1]||N0).call(this,ne,Pe[0]));else throw new Error("Cannot close `"+ne.type+"` ("+tc({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 w(){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 _(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ne.replace(/(\r?\n|\r)$/g,"")}function R(ne){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Mi(this.sliceSerialize(ne)).toLowerCase()}function A(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ne}function D(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ne}function F(ne){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Ce=this.sliceSerialize(ne).length;fe.depth=Ce}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function H(ne){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function J(ne){const Ce=this.stack[this.stack.length-1].children;let Pe=Ce[Ce.length-1];(!Pe||Pe.type!=="text")&&(Pe=Ot(),Pe.position={start:lr(ne.start),end:void 0},Ce.push(Pe)),this.stack.push(Pe)}function C(ne){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ne),fe.position.end=lr(ne.end)}function P(ne){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=fe.children[fe.children.length-1];Ce.position.end=lr(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(J.call(this,ne),C.call(this,ne))}function Y(){this.data.atHardBreak=!0}function le(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ne}function q(){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 oe(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=fe,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function Z(ne){const fe=this.sliceSerialize(ne),Ce=this.stack[this.stack.length-2];Ce.label=MD(fe),Ce.identifier=Mi(fe).toLowerCase()}function pe(){const ne=this.stack[this.stack.length-1],fe=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Pe=ne.children;Ce.children=Pe}else Ce.alt=fe}function O(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ne}function L(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ne}function te(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function he(ne){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Mi(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function Ne(ne){this.data.characterReferenceType=ne.type}function ve(ne){const fe=this.sliceSerialize(ne),Ce=this.data.characterReferenceType;let Pe;Ce?(Pe=TS(fe,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=wg(fe);const et=this.stack[this.stack.length-1];et.value+=Pe}function Fe(ne){const fe=this.stack.pop();fe.position.end=lr(ne.end)}function st(ne){C.call(this,ne);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ne)}function it(ne){C.call(this,ne);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ne)}function Zt(){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 _i(){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 Yl(){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 BS(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?BS(e,a):ID(e,a)}}function ID(e,t){let n;for(n in t)if(zS.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+"` ("+tc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tc({start:t.start,end:t.end})+") is still open")}function zD(e){const t=this;t.parser=n;function n(a){return DD(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function BD(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 UD(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
484
+ `}]}function $D(e,t){const n=t.value?t.value+`
485
+ `:"",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 FD(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PD(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qD(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Ql(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 HD(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 KD(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function US(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 GD(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return US(e,t);const s={src:Ql(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 QD(e,t){const n={src:Ql(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 YD(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 VD(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return US(e,t);const s={href:Ql(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 XD(e,t){const n={href:Ql(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 ZD(e,t,n){const a=e.all(t),s=n?WD(n):$S(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:`
486
486
  `}),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:`
487
- `});const h={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,h),e.applyData(t,h)}function ZD(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=$S(n[a])}return t}function $S(e){const t=e.spread;return t??e.children.length>1}function WD(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 JD(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eL(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function tL(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nL(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=xS(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 iL(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 aL(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 rL(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 sL(e,t){const n={type:"text",value:rL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function lL(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const oL={blockquote:zD,break:BD,code:UD,delete:$D,emphasis:FD,footnoteReference:PD,heading:qD,html:HD,imageReference:KD,image:GD,inlineCode:QD,linkReference:YD,link:VD,listItem:XD,list:WD,paragraph:JD,root:eL,strong:tL,table:nL,tableCell:aL,tableRow:iL,text:sL,thematicBreak:lL,toml:Zu,yaml:Zu,definition:Zu,footnoteDefinition:Zu};function Zu(){}const FS=-1,ed=0,ic=1,Nf=2,Ng=3,kg=4,Tg=5,Cg=6,PS=7,qS=8,A0=typeof self=="object"?self:globalThis,cL=(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 ed:case FS:return n(c,s);case ic:{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 PS:{const{name:f,message:d}=c;return n(new A0[f](d),s)}case qS: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=>cL(new Map,e)(0),sl="",{toString:uL}={},{keys:fL}=Object,Xo=e=>{const t=typeof e;if(t!=="object"||!e)return[ed,t];const n=uL.call(e).slice(8,-1);switch(n){case"Array":return[ic,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[ic,n]}return n.includes("Array")?[ic,n]:n.includes("Error")?[PS,n]:[Nf,n]},Wu=([e,t])=>e===ed&&(t==="function"||t==="symbol"),dL=(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]=Xo(c);switch(f){case ed:{let y=c;switch(d){case"bigint":f=qS,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);y=null;break;case"undefined":return s([FS],c)}return s([f,y],c)}case ic:{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 fL(c))(e||!Wu(Xo(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(Xo(x))||Wu(Xo(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(Xo(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 dL(!(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 hL(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 mL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function pL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||hL,a=e.options.footnoteBackLabel||mL,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=Ql(g.toLowerCase());let v=0;const S=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++v<=w;){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 _={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(y,!0)};e.patch(h,_),f.push(_)}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:`
487
+ `});const h={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,h),e.applyData(t,h)}function WD(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=$S(n[a])}return t}function $S(e){const t=e.spread;return t??e.children.length>1}function JD(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 eL(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tL(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function nL(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iL(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=xS(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 aL(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 rL(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 sL(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 lL(e,t){const n={type:"text",value:sL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function oL(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const cL={blockquote:BD,break:UD,code:$D,delete:FD,emphasis:PD,footnoteReference:qD,heading:HD,html:KD,imageReference:GD,image:QD,inlineCode:YD,linkReference:VD,link:XD,listItem:ZD,list:JD,paragraph:eL,root:tL,strong:nL,table:iL,tableCell:rL,tableRow:aL,text:lL,thematicBreak:oL,toml:Zu,yaml:Zu,definition:Zu,footnoteDefinition:Zu};function Zu(){}const FS=-1,ed=0,ic=1,Nf=2,Ng=3,kg=4,Tg=5,Cg=6,PS=7,qS=8,A0=typeof self=="object"?self:globalThis,uL=(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 ed:case FS:return n(c,s);case ic:{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 PS:{const{name:f,message:d}=c;return n(new A0[f](d),s)}case qS: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=>uL(new Map,e)(0),sl="",{toString:fL}={},{keys:dL}=Object,Xo=e=>{const t=typeof e;if(t!=="object"||!e)return[ed,t];const n=fL.call(e).slice(8,-1);switch(n){case"Array":return[ic,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[ic,n]}return n.includes("Array")?[ic,n]:n.includes("Error")?[PS,n]:[Nf,n]},Wu=([e,t])=>e===ed&&(t==="function"||t==="symbol"),hL=(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]=Xo(c);switch(f){case ed:{let y=c;switch(d){case"bigint":f=qS,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);y=null;break;case"undefined":return s([FS],c)}return s([f,y],c)}case ic:{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 dL(c))(e||!Wu(Xo(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(Xo(x))||Wu(Xo(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(Xo(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 hL(!(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 mL(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 pL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function gL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||mL,a=e.options.footnoteBackLabel||pL,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=Ql(g.toLowerCase());let v=0;const S=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++v<=w;){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 _={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(y,!0)};e.patch(h,_),f.push(_)}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:`
488
488
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
489
- `}]}}const _c=(function(e){if(e==null)return xL;if(typeof e=="function")return td(e);if(typeof e=="object")return Array.isArray(e)?gL(e):bL(e);if(typeof e=="string")return yL(e);throw new Error("Expected function, string, or object as test")});function gL(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_c(e[n]);return td(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function bL(e){const t=e;return td(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function yL(e){return td(t);function t(n){return n&&n.type===e}}function td(e){return t;function t(n,a,s){return!!(vL(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function xL(){return!0}function vL(e){return e!==null&&typeof e=="object"&&"type"in e}const HS=[],EL=!0,Ep=!1,SL="skip";function KS(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const o=_c(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=HS,S,w,N;if((!t||o(d,h,y[y.length-1]||void 0))&&(v=wL(n(d,y)),v[0]===Ep))return v;if("children"in d&&d.children){const _=d;if(_.children&&v[0]!==SL)for(w=(a?_.children.length:-1)+c,N=y.concat(_);w>-1&&w<_.children.length;){const R=_.children[w];if(S=f(R,w,N)(),S[0]===Ep)return S;w=typeof S[1]=="number"?S[1]:w+c}}return v}}}function wL(e){return Array.isArray(e)?e:typeof e=="number"?[EL,e]:e==null?HS:[e]}function nd(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),KS(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 Sp={}.hasOwnProperty,_L={};function NL(e,t){const n=t||_L,a=new Map,s=new Map,o=new Map,c={...oL,...n.handlers},f={all:h,applyData:TL,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:d,options:n,patch:kL,wrap:AL};return nd(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(Sp.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:w,...N}=y,_=kf(N);return _.children=f.all(y),_}return kf(y)}return(f.options.unknownHandler||CL)(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 w=S.children[0];w&&w.type==="text"&&(w.value=M0(w.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function kL(e,t){e.position&&(t.position=mM(e))}function TL(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 CL(e,t){const n=t.data||{},a="value"in t&&!(Sp.call(n,"hProperties")||Sp.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 AL(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
489
+ `}]}}const _c=(function(e){if(e==null)return vL;if(typeof e=="function")return td(e);if(typeof e=="object")return Array.isArray(e)?bL(e):yL(e);if(typeof e=="string")return xL(e);throw new Error("Expected function, string, or object as test")});function bL(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_c(e[n]);return td(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function yL(e){const t=e;return td(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function xL(e){return td(t);function t(n){return n&&n.type===e}}function td(e){return t;function t(n,a,s){return!!(EL(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function vL(){return!0}function EL(e){return e!==null&&typeof e=="object"&&"type"in e}const HS=[],SL=!0,Ep=!1,wL="skip";function KS(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const o=_c(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=HS,S,w,N;if((!t||o(d,h,y[y.length-1]||void 0))&&(v=_L(n(d,y)),v[0]===Ep))return v;if("children"in d&&d.children){const _=d;if(_.children&&v[0]!==wL)for(w=(a?_.children.length:-1)+c,N=y.concat(_);w>-1&&w<_.children.length;){const R=_.children[w];if(S=f(R,w,N)(),S[0]===Ep)return S;w=typeof S[1]=="number"?S[1]:w+c}}return v}}}function _L(e){return Array.isArray(e)?e:typeof e=="number"?[SL,e]:e==null?HS:[e]}function nd(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),KS(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 Sp={}.hasOwnProperty,NL={};function kL(e,t){const n=t||NL,a=new Map,s=new Map,o=new Map,c={...cL,...n.handlers},f={all:h,applyData:CL,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:d,options:n,patch:TL,wrap:OL};return nd(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(Sp.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:w,...N}=y,_=kf(N);return _.children=f.all(y),_}return kf(y)}return(f.options.unknownHandler||AL)(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 w=S.children[0];w&&w.type==="text"&&(w.value=M0(w.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function TL(e,t){e.position&&(t.position=pM(e))}function CL(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 AL(e,t){const n=t.data||{},a="value"in t&&!(Sp.call(n,"hProperties")||Sp.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 OL(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
490
490
  `});++a<e.length;)a&&n.push({type:"text",value:`
491
491
  `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
492
- `}),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=NL(e,t),a=n.one(e,void 0),s=pL(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
493
- `},s),o}function OL(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 Am,L0;function RL(){if(L0)return Am;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 Am=function d(){var h,y,g,x,v,S,w=arguments[0],N=1,_=arguments.length,R=!1;for(typeof w=="boolean"&&(R=w,w=arguments[1]||{},N=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});N<_;++N)if(h=arguments[N],h!=null)for(y in h)g=f(w,y),x=f(h,y),w!==x&&(R&&x&&(o(x)||(v=s(x)))?(v?(v=!1,S=g&&s(g)?g:[]):S=g&&o(g)?g:{},c(w,{name:y,newValue:d(R,S,x)})):typeof x<"u"&&c(w,{name:y,newValue:x}));return w},Am}var ML=RL();const Om=Cp(ML);function wp(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 jL(){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?DL(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 DL(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:LL,dirname:IL,extname:zL,join:BL,sep:"/"};function LL(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 IL(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 zL(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 BL(...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?".":UL(n)}function UL(e){Nc(e);const t=e.codePointAt(0)===47;let n=$L(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function $L(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 FL={cwd:PL};function PL(){return"/"}function _p(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qL(e){if(typeof e=="string")e=new URL(e);else if(!_p(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 HL(e)}function HL(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 Rm=["history","path","basename","stem","extname","dirname"];class GS{constructor(t){let n;t?_p(t)?n={path:t}:typeof t=="string"||KL(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":FL.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Rm.length;){const o=Rm[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)Rm.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ki.basename(this.path):void 0}set basename(t){jm(t,"basename"),Mm(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(Mm(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){_p(t)&&(t=qL(t)),jm(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){jm(t,"stem"),Mm(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 Mm(e,t){if(e&&e.includes(Ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ki.sep+"`")}function jm(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 KL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const GL=(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 GL{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=jL()}copy(){const t=new Ag;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Om(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Im("data",this.frozen),this.namespace[t]=n,this):QL.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Im("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[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 Dm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),Dm("process",this.parser||this.Parser),Lm("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);XL(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(),Dm("processSync",this.parser||this.Parser),Lm("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 Lm("stringify",s),z0(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(Im("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=Om(!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 w=a[x][1];wp(w)&&wp(v)&&(v=Om(!0,w,v)),a[x]=[h,v,...S]}}}}const YL=new Ag().freeze();function Dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Lm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Im(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function z0(e){if(!wp(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 VL(e)?e:new GS(e)}function VL(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function XL(e){return typeof e=="string"||ZL(e)}function ZL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WL="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",U0=[],$0={allowDangerousHtml:!0},JL=/^(https?|ircs?|mailto|xmpp)$/i,e3=[{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=t3(e),n=n3(e);return i3(t.runSync(t.parse(n),n),e)}function t3(e){const t=e.rehypePlugins||U0,n=e.remarkPlugins||U0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$0}:$0;return YL().use(ID).use(n).use(OL,a).use(t)}function n3(e){const t=e.children||"",n=new GS;return typeof t=="string"&&(n.value=t),n}function i3(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||a3;for(const y of e3)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+WL+y.id,void 0);return nd(e,h),xM(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 km)if(Object.hasOwn(km,v)&&Object.hasOwn(y.properties,v)){const S=y.properties[v],w=km[v];(w===null||w.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 a3(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||JL.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 r3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function s3(e,t,n){const s=_c((n||{}).ignore||[]),o=l3(t);let c=-1;for(;++c<o.length;)KS(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 _=!1,R=[];x.lastIndex=0;let A=x.exec(h.value);for(;A;){const D=A.index,F={index:A.index,input:A.input,stack:[...y,h]};let M=v(...A,F);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?x.lastIndex=D+1:(S!==D&&R.push({type:"text",value:h.value.slice(S,D)}),Array.isArray(M)?R.push(...M):M&&R.push(M),S=D+A[0].length,_=!0),!x.global)break;A=x.exec(h.value)}return _?(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 l3(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([o3(s[0]),c3(s[1])])}return t}function o3(e){return typeof e=="string"?new RegExp(r3(e),"g"):e}function c3(e){return typeof e=="function"?e:function(){return e}}const zm="phrasing",Bm=["autolink","link","image","label"];function u3(){return{transforms:[b3],enter:{literalAutolink:d3,literalAutolinkEmail:Um,literalAutolinkHttp:Um,literalAutolinkWww:Um},exit:{literalAutolink:g3,literalAutolinkEmail:p3,literalAutolinkHttp:h3,literalAutolinkWww:m3}}}function f3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zm,notInConstruct:Bm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zm,notInConstruct:Bm},{character:":",before:"[ps]",after:"\\/",inConstruct:zm,notInConstruct:Bm}]}}function d3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Um(e){this.config.enter.autolinkProtocol.call(this,e)}function h3(e){this.config.exit.autolinkProtocol.call(this,e)}function m3(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 p3(e){this.config.exit.autolinkEmail.call(this,e)}function g3(e){this.exit(e)}function b3(e){s3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,y3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),x3]],{ignore:["link","linkReference"]})}function y3(e,t,n,a,s){let o="";if(!QS(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!v3(n)))return!1;const c=E3(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 x3(e,t,n,a){return!QS(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function v3(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 E3(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 QS(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ds(n)||Wf(n))&&(!t||n!==47)}YS.peek=O3;function S3(){this.buffer()}function w3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _3(){this.buffer()}function N3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function k3(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 T3(e){this.exit(e)}function C3(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 A3(e){this.exit(e)}function O3(){return"["}function YS(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 R3(){return{enter:{gfmFootnoteCallString:S3,gfmFootnoteCall:w3,gfmFootnoteDefinitionLabelString:_3,gfmFootnoteDefinition:N3},exit:{gfmFootnoteCallString:k3,gfmFootnoteCall:T3,gfmFootnoteDefinitionLabelString:C3,gfmFootnoteDefinition:A3}}}function M3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:YS},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?`
494
- `:" ")+o.indentLines(o.containerFlow(a,f.current()),t?VS:j3))),h(),d}}function j3(e,t,n){return t===0?e:VS(e,t,n)}function VS(e,t,n){return(n?"":" ")+e}const D3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];XS.peek=U3;function L3(){return{canContainEols:["delete"],enter:{strikethrough:z3},exit:{strikethrough:B3}}}function I3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:D3}],handlers:{delete:XS}}}function z3(e){this.enter({type:"delete",children:[]},e)}function B3(e){this.exit(e)}function XS(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 U3(){return"~"}function $3(e){return e.length}function F3(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||$3,o=[],c=[],f=[],d=[];let h=0,y=-1;for(;++y<e.length;){const w=[],N=[];let _=-1;for(e[y].length>h&&(h=e[y].length);++_<e[y].length;){const R=P3(e[y][_]);if(n.alignDelimiters!==!1){const A=s(R);N[_]=A,(d[_]===void 0||A>d[_])&&(d[_]=A)}w.push(R)}c[y]=w,f[y]=N}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<h;)o[g]=P0(a[g]);else{const w=P0(a);for(;++g<h;)o[g]=w}g=-1;const x=[],v=[];for(;++g<h;){const w=o[g];let N="",_="";w===99?(N=":",_=":"):w===108?N=":":w===114&&(_=":");let R=n.alignDelimiters===!1?1:Math.max(1,d[g]-N.length-_.length);const A=N+"-".repeat(R)+_;n.alignDelimiters!==!1&&(R=N.length+R+_.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 w=c[y],N=f[y];g=-1;const _=[];for(;++g<h;){const R=w[g]||"";let A="",D="";if(n.alignDelimiters!==!1){const F=d[g]-(N[g]||0),M=o[g];M===114?A=" ".repeat(F):M===99?F%2?(A=" ".repeat(F/2+.5),D=" ".repeat(F/2-.5)):(A=" ".repeat(F/2),D=A):D=" ".repeat(F)}n.delimiterStart!==!1&&!g&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||g)&&_.push(" "),n.alignDelimiters!==!1&&_.push(A),_.push(R),n.alignDelimiters!==!1&&_.push(D),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&_.push("|")}S.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return S.join(`
495
- `)}function P3(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 q3(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()),H3);return s(),c}function H3(e,t,n){return">"+(n?"":" ")+e}function K3(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===`
496
- `&&K3(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
497
- `}function G3(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 Y3(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 V3(e,t,n,a){const s=Y3(n),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(Q3(e,n)){const g=n.enter("codeIndented"),x=n.indentLines(o,X3);return g(),x}const f=n.createTracker(a),d=s.repeat(Math.max(G3(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:`
492
+ `}),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=kL(e,t),a=n.one(e,void 0),s=gL(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
493
+ `},s),o}function RL(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 Am,L0;function ML(){if(L0)return Am;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 Am=function d(){var h,y,g,x,v,S,w=arguments[0],N=1,_=arguments.length,R=!1;for(typeof w=="boolean"&&(R=w,w=arguments[1]||{},N=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});N<_;++N)if(h=arguments[N],h!=null)for(y in h)g=f(w,y),x=f(h,y),w!==x&&(R&&x&&(o(x)||(v=s(x)))?(v?(v=!1,S=g&&s(g)?g:[]):S=g&&o(g)?g:{},c(w,{name:y,newValue:d(R,S,x)})):typeof x<"u"&&c(w,{name:y,newValue:x}));return w},Am}var jL=ML();const Om=Cp(jL);function wp(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 DL(){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?LL(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 LL(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:IL,dirname:zL,extname:BL,join:UL,sep:"/"};function IL(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 zL(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 BL(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 UL(...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?".":$L(n)}function $L(e){Nc(e);const t=e.codePointAt(0)===47;let n=FL(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function FL(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 PL={cwd:qL};function qL(){return"/"}function _p(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function HL(e){if(typeof e=="string")e=new URL(e);else if(!_p(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 KL(e)}function KL(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 Rm=["history","path","basename","stem","extname","dirname"];class GS{constructor(t){let n;t?_p(t)?n={path:t}:typeof t=="string"||GL(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":PL.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Rm.length;){const o=Rm[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)Rm.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ki.basename(this.path):void 0}set basename(t){jm(t,"basename"),Mm(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(Mm(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){_p(t)&&(t=HL(t)),jm(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){jm(t,"stem"),Mm(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 Mm(e,t){if(e&&e.includes(Ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ki.sep+"`")}function jm(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 GL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const QL=(function(e){const a=this.constructor.prototype,s=a[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),YL={}.hasOwnProperty;class Ag extends QL{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=DL()}copy(){const t=new Ag;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Om(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Im("data",this.frozen),this.namespace[t]=n,this):YL.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Im("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[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 Dm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),Dm("process",this.parser||this.Parser),Lm("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);ZL(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(),Dm("processSync",this.parser||this.Parser),Lm("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 Lm("stringify",s),z0(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(Im("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=Om(!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 w=a[x][1];wp(w)&&wp(v)&&(v=Om(!0,w,v)),a[x]=[h,v,...S]}}}}const VL=new Ag().freeze();function Dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Lm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Im(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function z0(e){if(!wp(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 XL(e)?e:new GS(e)}function XL(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZL(e){return typeof e=="string"||WL(e)}function WL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const JL="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",U0=[],$0={allowDangerousHtml:!0},e3=/^(https?|ircs?|mailto|xmpp)$/i,t3=[{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=n3(e),n=i3(e);return a3(t.runSync(t.parse(n),n),e)}function n3(e){const t=e.rehypePlugins||U0,n=e.remarkPlugins||U0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$0}:$0;return VL().use(zD).use(n).use(RL,a).use(t)}function i3(e){const t=e.children||"",n=new GS;return typeof t=="string"&&(n.value=t),n}function a3(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||r3;for(const y of t3)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+JL+y.id,void 0);return nd(e,h),vM(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 km)if(Object.hasOwn(km,v)&&Object.hasOwn(y.properties,v)){const S=y.properties[v],w=km[v];(w===null||w.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 r3(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||e3.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 s3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function l3(e,t,n){const s=_c((n||{}).ignore||[]),o=o3(t);let c=-1;for(;++c<o.length;)KS(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 _=!1,R=[];x.lastIndex=0;let A=x.exec(h.value);for(;A;){const D=A.index,F={index:A.index,input:A.input,stack:[...y,h]};let M=v(...A,F);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?x.lastIndex=D+1:(S!==D&&R.push({type:"text",value:h.value.slice(S,D)}),Array.isArray(M)?R.push(...M):M&&R.push(M),S=D+A[0].length,_=!0),!x.global)break;A=x.exec(h.value)}return _?(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 o3(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([c3(s[0]),u3(s[1])])}return t}function c3(e){return typeof e=="string"?new RegExp(s3(e),"g"):e}function u3(e){return typeof e=="function"?e:function(){return e}}const zm="phrasing",Bm=["autolink","link","image","label"];function f3(){return{transforms:[y3],enter:{literalAutolink:h3,literalAutolinkEmail:Um,literalAutolinkHttp:Um,literalAutolinkWww:Um},exit:{literalAutolink:b3,literalAutolinkEmail:g3,literalAutolinkHttp:m3,literalAutolinkWww:p3}}}function d3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zm,notInConstruct:Bm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zm,notInConstruct:Bm},{character:":",before:"[ps]",after:"\\/",inConstruct:zm,notInConstruct:Bm}]}}function h3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Um(e){this.config.enter.autolinkProtocol.call(this,e)}function m3(e){this.config.exit.autolinkProtocol.call(this,e)}function p3(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 g3(e){this.config.exit.autolinkEmail.call(this,e)}function b3(e){this.exit(e)}function y3(e){l3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,x3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),v3]],{ignore:["link","linkReference"]})}function x3(e,t,n,a,s){let o="";if(!QS(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!E3(n)))return!1;const c=S3(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 v3(e,t,n,a){return!QS(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function E3(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 S3(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 QS(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ds(n)||Wf(n))&&(!t||n!==47)}YS.peek=R3;function w3(){this.buffer()}function _3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function N3(){this.buffer()}function k3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function T3(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 C3(e){this.exit(e)}function A3(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 O3(e){this.exit(e)}function R3(){return"["}function YS(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 M3(){return{enter:{gfmFootnoteCallString:w3,gfmFootnoteCall:_3,gfmFootnoteDefinitionLabelString:N3,gfmFootnoteDefinition:k3},exit:{gfmFootnoteCallString:T3,gfmFootnoteCall:C3,gfmFootnoteDefinitionLabelString:A3,gfmFootnoteDefinition:O3}}}function j3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:YS},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?`
494
+ `:" ")+o.indentLines(o.containerFlow(a,f.current()),t?VS:D3))),h(),d}}function D3(e,t,n){return t===0?e:VS(e,t,n)}function VS(e,t,n){return(n?"":" ")+e}const L3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];XS.peek=$3;function I3(){return{canContainEols:["delete"],enter:{strikethrough:B3},exit:{strikethrough:U3}}}function z3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:L3}],handlers:{delete:XS}}}function B3(e){this.enter({type:"delete",children:[]},e)}function U3(e){this.exit(e)}function XS(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 $3(){return"~"}function F3(e){return e.length}function P3(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||F3,o=[],c=[],f=[],d=[];let h=0,y=-1;for(;++y<e.length;){const w=[],N=[];let _=-1;for(e[y].length>h&&(h=e[y].length);++_<e[y].length;){const R=q3(e[y][_]);if(n.alignDelimiters!==!1){const A=s(R);N[_]=A,(d[_]===void 0||A>d[_])&&(d[_]=A)}w.push(R)}c[y]=w,f[y]=N}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<h;)o[g]=P0(a[g]);else{const w=P0(a);for(;++g<h;)o[g]=w}g=-1;const x=[],v=[];for(;++g<h;){const w=o[g];let N="",_="";w===99?(N=":",_=":"):w===108?N=":":w===114&&(_=":");let R=n.alignDelimiters===!1?1:Math.max(1,d[g]-N.length-_.length);const A=N+"-".repeat(R)+_;n.alignDelimiters!==!1&&(R=N.length+R+_.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 w=c[y],N=f[y];g=-1;const _=[];for(;++g<h;){const R=w[g]||"";let A="",D="";if(n.alignDelimiters!==!1){const F=d[g]-(N[g]||0),M=o[g];M===114?A=" ".repeat(F):M===99?F%2?(A=" ".repeat(F/2+.5),D=" ".repeat(F/2-.5)):(A=" ".repeat(F/2),D=A):D=" ".repeat(F)}n.delimiterStart!==!1&&!g&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||g)&&_.push(" "),n.alignDelimiters!==!1&&_.push(A),_.push(R),n.alignDelimiters!==!1&&_.push(D),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&_.push("|")}S.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return S.join(`
495
+ `)}function q3(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 H3(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()),K3);return s(),c}function K3(e,t,n){return">"+(n?"":" ")+e}function G3(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===`
496
+ `&&G3(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
497
+ `}function Q3(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 Y3(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 V3(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 X3(e,t,n,a){const s=V3(n),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(Y3(e,n)){const g=n.enter("codeIndented"),x=n.indentLines(o,Z3);return g(),x}const f=n.createTracker(a),d=s.repeat(Math.max(Q3(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:`
498
498
  `,encode:["`"],...f.current()})),g()}return y+=f.move(`
499
499
  `),o&&(y+=f.move(o+`
500
- `)),y+=f.move(d),h(),y}function X3(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 Z3(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?" ":`
501
- `,...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 W3(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 fc(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}}ZS.peek=J3;function ZS(e,t,n,a){const s=W3(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=fc(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)+fc(g));const v=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+d+v}function J3(e,t,n){return n.options.emphasis||"*"}function eI(e,t){let n=!1;return nd(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Ep}),!!((!e.depth||e.depth<3)&&Sg(e)&&(t.options.setext||n))}function tI(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if(eI(e,n)){const y=n.enter("headingSetext"),g=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
500
+ `)),y+=f.move(d),h(),y}function Z3(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 W3(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?" ":`
501
+ `,...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 J3(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 fc(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}}ZS.peek=eI;function ZS(e,t,n,a){const s=J3(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=fc(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)+fc(g));const v=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+d+v}function eI(e,t,n){return n.options.emphasis||"*"}function tI(e,t){let n=!1;return nd(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Ep}),!!((!e.depth||e.depth<3)&&Sg(e)&&(t.options.setext||n))}function nI(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if(tI(e,n)){const y=n.enter("headingSetext"),g=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
502
502
  `,after:`
503
503
  `});return g(),y(),x+`
504
504
  `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
505
505
  `))+1))}const c="#".repeat(s),f=n.enter("headingAtx"),d=n.enter("phrasing");o.move(c+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
506
- `,...o.current()});return/^[\t ]/.test(h)&&(h=fc(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,n.options.closeAtx&&(h+=" "+c),d(),f(),h}WS.peek=nI;function WS(e){return e.value||""}function nI(){return"<"}JS.peek=iI;function JS(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 iI(){return"!"}ew.peek=aI;function ew(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 aI(){return"!"}tw.peek=rI;function tw(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 rI(){return"`"}function nw(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))}iw.peek=sI;function iw(e,t,n,a){const s=Rg(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,d;if(nw(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 sI(e,t,n){return nw(e,n)?"<":"["}aw.peek=lI;function aw(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 lI(){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 oI(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 cI(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 rw(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 uI(e,t,n,a){const s=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?cI(n):Mg(n);const f=e.ordered?c==="."?")":".":oI(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),rw(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 fI(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 dI(e,t,n,a){const s=fI(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 hI(e,t,n,a){const s=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),s(),c}const mI=_c(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function pI(e,t,n,a){return(e.children.some(function(c){return mI(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function gI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}sw.peek=bI;function sw(e,t,n,a){const s=gI(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=fc(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)+fc(g));const v=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+d+v}function bI(e,t,n){return n.options.strong||"*"}function yI(e,t,n,a){return n.safe(e.value,a)}function xI(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 vI(e,t,n){const a=(rw(n)+(n.options.ruleSpaces?" ":"")).repeat(xI(n));return n.options.ruleSpaces?a.slice(0,-1):a}const lw={blockquote:q3,break:H0,code:V3,definition:Z3,emphasis:ZS,hardBreak:H0,heading:tI,html:WS,image:JS,imageReference:ew,inlineCode:tw,link:iw,linkReference:aw,list:uI,listItem:dI,paragraph:hI,root:pI,strong:sw,text:yI,thematicBreak:vI};function EI(){return{enter:{table:SI,tableData:K0,tableHeader:K0,tableRow:_I},exit:{codeText:NI,table:wI,tableData:$m,tableHeader:$m,tableRow:$m}}}function SI(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 wI(e){this.exit(e),this.data.inTable=void 0}function _I(e){this.enter({type:"tableRow",children:[]},e)}function $m(e){this.exit(e)}function K0(e){this.enter({type:"tableCell",children:[]},e)}function NI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,kI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function kI(e,t){return t==="|"?t:e}function TI(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
506
+ `,...o.current()});return/^[\t ]/.test(h)&&(h=fc(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,n.options.closeAtx&&(h+=" "+c),d(),f(),h}WS.peek=iI;function WS(e){return e.value||""}function iI(){return"<"}JS.peek=aI;function JS(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 aI(){return"!"}ew.peek=rI;function ew(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 rI(){return"!"}tw.peek=sI;function tw(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 sI(){return"`"}function nw(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))}iw.peek=lI;function iw(e,t,n,a){const s=Rg(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,d;if(nw(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 lI(e,t,n){return nw(e,n)?"<":"["}aw.peek=oI;function aw(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 oI(){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 cI(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 uI(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 rw(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 fI(e,t,n,a){const s=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?uI(n):Mg(n);const f=e.ordered?c==="."?")":".":cI(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),rw(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 dI(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 hI(e,t,n,a){const s=dI(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 mI(e,t,n,a){const s=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),s(),c}const pI=_c(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gI(e,t,n,a){return(e.children.some(function(c){return pI(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function bI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}sw.peek=yI;function sw(e,t,n,a){const s=bI(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=fc(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)+fc(g));const v=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+d+v}function yI(e,t,n){return n.options.strong||"*"}function xI(e,t,n,a){return n.safe(e.value,a)}function vI(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 EI(e,t,n){const a=(rw(n)+(n.options.ruleSpaces?" ":"")).repeat(vI(n));return n.options.ruleSpaces?a.slice(0,-1):a}const lw={blockquote:H3,break:H0,code:X3,definition:W3,emphasis:ZS,hardBreak:H0,heading:nI,html:WS,image:JS,imageReference:ew,inlineCode:tw,link:iw,linkReference:aw,list:fI,listItem:hI,paragraph:mI,root:gI,strong:sw,text:xI,thematicBreak:EI};function SI(){return{enter:{table:wI,tableData:K0,tableHeader:K0,tableRow:NI},exit:{codeText:kI,table:_I,tableData:$m,tableHeader:$m,tableRow:$m}}}function wI(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 _I(e){this.exit(e),this.data.inTable=void 0}function NI(e){this.enter({type:"tableRow",children:[]},e)}function $m(e){this.exit(e)}function K0(e){this.enter({type:"tableCell",children:[]},e)}function kI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,TI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function TI(e,t){return t==="|"?t:e}function CI(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
507
507
  `,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,w,N){return h(y(v,w,N),v.align)}function f(v,S,w,N){const _=g(v,w,N),R=h([_]);return R.slice(0,R.indexOf(`
508
- `))}function d(v,S,w,N){const _=w.enter("tableCell"),R=w.enter("phrasing"),A=w.containerPhrasing(v,{...N,before:o,after:o});return R(),_(),A}function h(v,S){return F3(v,{align:S,alignDelimiters:a,padding:n,stringLength:s})}function y(v,S,w){const N=v.children;let _=-1;const R=[],A=S.enter("table");for(;++_<N.length;)R[_]=g(N[_],S,w);return A(),R}function g(v,S,w){const N=v.children;let _=-1;const R=[],A=S.enter("tableRow");for(;++_<N.length;)R[_]=d(N[_],v,S,w);return A(),R}function x(v,S,w){let N=lw.inlineCode(v,S,w);return w.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function CI(){return{exit:{taskListCheckValueChecked:G0,taskListCheckValueUnchecked:G0,paragraph:OI}}}function AI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RI}}}function G0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function OI(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 RI(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=lw.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 MI(){return[u3(),R3(),L3(),EI(),CI()]}function jI(e){return{extensions:[f3(),M3(e),I3(),TI(e),AI()]}}const DI={tokenize:$I,partial:!0},ow={tokenize:FI,partial:!0},cw={tokenize:PI,partial:!0},uw={tokenize:qI,partial:!0},LI={tokenize:HI,partial:!0},fw={name:"wwwAutolink",tokenize:BI,previous:hw},dw={name:"protocolAutolink",tokenize:UI,previous:mw},Oa={name:"emailAutolink",tokenize:zI,previous:pw},Wi={};function II(){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,dw];Wi[104]=[Oa,dw];Wi[87]=[Oa,fw];Wi[119]=[Oa,fw];function zI(e,t,n){const a=this;let s,o;return c;function c(g){return!Np(g)||!pw.call(a,a.previous)||jg(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Np(g)?(e.consume(g),f):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(LI,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 BI(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!hw.call(a,a.previous)||jg(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(DI,e.attempt(ow,e.attempt(cw,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function UI(e,t,n){const a=this;let s="",o=!1;return c;function c(g){return(g===72||g===104)&&mw.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||_f(g)||xt(g)||ds(g)||Wf(g)?n(g):e.attempt(ow,e.attempt(cw,y),n)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function $I(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 FI(e,t,n){let a,s,o;return c;function c(h){return h===46||h===95?e.check(uw,d,f)(h):h===null||xt(h)||ds(h)||h!==45&&Wf(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 PI(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(uw,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 qI(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 HI(e,t,n){return a;function a(o){return e.consume(o),s}function s(o){return pn(o)?n(o):t(o)}}function hw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xt(e)}function mw(e){return!kn(e)}function pw(e){return!(e===47||Np(e))}function Np(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 KI={tokenize:JI,partial:!0};function GI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:XI,continuation:{tokenize:ZI},exit:WI}},text:{91:{name:"gfmFootnoteCall",tokenize:VI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:QI,resolveTo:YI}}}}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 YI(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 VI(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 XI(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 w=e.exit("gfmFootnoteDefinitionLabelString");return o=Mi(a.sliceSerialize(w)),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 ZI(e,t,n){return e.check(wc,t,e.attempt(KI,t,n))}function WI(e){e.exit("gfmFootnoteDefinition")}function JI(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 ez(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,Jf(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 w=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"),_=Ml(S);return N._open=!_||_===2&&!!w,N._close=!w||w===2&&!!_,f(S)}}}class tz{constructor(){this.map=[]}add(t,n,a){nz(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 nz(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 iz(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 az(){return{flow:{null:{name:"table",tokenize:rz,resolveAll:sz}}}}function rz(e,t,n){const a=this;let s=0,o=0,c;return f;function f(C){let P=a.events.length-1;for(;P>-1;){const q=a.events[P][1].type;if(q==="lineEnding"||q==="linePrefix")P--;else break}const Y=P>-1?a.events[P][1].type:null,le=Y==="tableHead"||Y==="tableRow"?M:d;return le===M&&a.parser.lazy[a.now().line]?n(C):le(C)}function d(C){return e.enter("tableHead"),e.enter("tableRow"),h(C)}function h(C){return C===124||(c=!0,o+=1),y(C)}function y(C){return C===null?n(C):Te(C)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),v):n(C):Ge(C)?Je(e,y,"whitespace")(C):(o+=1,c&&(c=!1,s+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(C)))}function g(C){return C===null||C===124||xt(C)?(e.exit("data"),y(C)):(e.consume(C),C===92?x:g)}function x(C){return C===92||C===124?(e.consume(C),g):g(C)}function v(C){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(C):(e.enter("tableDelimiterRow"),c=!1,Ge(C)?Je(e,S,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):S(C))}function S(C){return C===45||C===58?N(C):C===124?(c=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),w):F(C)}function w(C){return Ge(C)?Je(e,N,"whitespace")(C):N(C)}function N(C){return C===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),_):C===45?(o+=1,_(C)):C===null||Te(C)?D(C):F(C)}function _(C){return C===45?(e.enter("tableDelimiterFiller"),R(C)):F(C)}function R(C){return C===45?(e.consume(C),R):C===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(C))}function A(C){return Ge(C)?Je(e,D,"whitespace")(C):D(C)}function D(C){return C===124?S(C):C===null||Te(C)?!c||s!==o?F(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):F(C)}function F(C){return n(C)}function M(C){return e.enter("tableRow"),H(C)}function H(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),H):C===null||Te(C)?(e.exit("tableRow"),t(C)):Ge(C)?Je(e,H,"whitespace")(C):(e.enter("data"),U(C))}function U(C){return C===null||C===124||xt(C)?(e.exit("data"),H(C)):(e.consume(C),C===92?J:U)}function J(C){return C===92||C===124?(e.consume(C),U):U(C)}}function sz(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 tz;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=iz(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,w=n[3]-n[2]-1;e.add(S,w,[])}}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 lz={name:"tasklistCheck",tokenize:cz};function oz(){return{text:{91:lz}}}function cz(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:uz},t,n)(d):n(d)}}function uz(e,t,n){return Je(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function fz(e){return kS([II(),GI(),ez(e),az(),oz()])}const dz={};function Dg(e){const t=this,n=e||dz,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(fz(n)),o.push(MI()),c.push(jI(n))}const Y0=(function(e,t,n){const a=_c(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 pz;if(typeof e=="string")return mz(e);if(typeof e=="object")return hz(e);if(typeof e=="function")return Lg(e);throw new Error("Expected function, string, or array as `test`")});function hz(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 mz(e){return Lg(t);function t(n){return n.tagName===e}}function Lg(e){return t;function t(n,a,s){return!!(gz(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function pz(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function gz(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const V0=/\n/g,X0=/[\t ]+/g,kp=bs("br"),Z0=bs(_z),bz=bs("p"),W0=bs("tr"),yz=bs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",wz,Nz]),gw=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 xz(e,t){const n=t||{},a="children"in e?e.children:[],s=gw(e),o=xw(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...yw(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...bw(a[f],e,{whitespace:o,breakBefore:f?void 0:s,breakAfter:f<a.length-1?kp(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(`
509
- `.repeat(h)||" "),h=-1,d.push(y))}return d.join("")}function bw(e,t,n){return e.type==="element"?vz(e,t,n):e.type==="text"?n.whitespace==="normal"?yw(e,n):Ez(e):[]}function vz(e,t,n){const a=xw(e,n),s=e.children||[];let o=-1,c=[];if(yz(e))return c;let f,d;for(kp(e)||W0(e)&&Y0(t,e,W0)?d=`
510
- `:bz(e)?(f=2,d=2):gw(e)&&(f=1,d=1);++o<s.length;)c=c.concat(bw(s[o],e,{whitespace:a,breakBefore:o?void 0:f,breakAfter:o<s.length-1?kp(s[o+1]):d}));return Z0(e)&&Y0(t,e,Z0)&&c.push(" "),f&&c.unshift(f),d&&c.push(d),c}function yw(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(Sz(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 Ez(e){return[String(e.value)]}function Sz(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 xw(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 wz(e){return!!(e.properties||{}).hidden}function _z(e){return e.tagName==="td"||e.tagName==="th"}function Nz(e){return e.tagName==="dialog"&&!(e.properties||{}).open}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"],w=["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"],_=["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:w,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},F={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],H={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:M.concat([{begin:/\(/,end:/\)/,keywords:D,contains:M.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(H,U,F,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:D,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Tz(e){const t={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=kz(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 Cz(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},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],N=["true","false"],_={match:/(\/[a-z._-]+)+/},R=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],A=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],D=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],F=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:w,literal:N,built_in:[...R,...A,"set","shopt",...D,...F]},contains:[v,e.SHEBANG(),S,g,o,c,_,f,d,h,y,n]}}function Az(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"},_=[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:_.concat([{begin:/\(/,end:/\)/,keywords:N,contains:_.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,_,[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 Oz(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"],w=["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"],_=["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:w,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},F={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],H={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:M.concat([{begin:/\(/,end:/\)/,keywords:D,contains:M.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(H,U,F,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:D,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Rz(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]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},N=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});x.contains=[w,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 _={variants:[h,w,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"}},_,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:[_,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},D]}}const Mz=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_-]*/}}),jz=["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"],Dz=["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"],Lz=[...jz,...Dz],Iz=["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(),zz=["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(),Bz=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Uz=["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 $z(e){const t=e.regex,n=Mz(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:":("+zz.join("|")+")"},{begin:":(:)?("+Bz.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Uz.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:Iz.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Lz.join("|")+")\\b"}]}}function Fz(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 Pz(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 qz(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 Hz(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 vw(e,t,n){return n===-1?"":e.replace(t,a=>vw(e,t,n-1))}function Kz(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+vw("(?:<"+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$_]*",Gz=["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"],Ew=["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"],Sw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ww=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Yz=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Vz=[].concat(ww,Ew,Sw);function Xz(e){const t=e.regex,n=(Z,{after:pe})=>{const O="</"+Z[0].slice(1);return Z.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:(Z,pe)=>{const O=Z[0].length+Z.index,L=Z.input[O];if(L==="<"||L===","){pe.ignoreMatch();return}L===">"&&(n(Z,{after:O})||pe.ignoreMatch());let te;const T=Z.input.substring(O);if(te=T.match(/^\s*=/)){pe.ignoreMatch();return}if((te=T.match(/^\s+extends\s+/))&&te.index===0){pe.ignoreMatch();return}}},f={$pattern:eE,keyword:Gz,literal:Qz,built_in:Vz,"variable.language":Yz},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"}},w={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,w,N,{match:/\$\d+/},g];x.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const D=[].concat(R,x.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},H={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Ew,...Sw]}},J={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Y(Z){return t.concat("(?!",Z.join("|"),")")}const le={match:t.concat(/\b/,Y([...ww,"super","import"].map(Z=>`${Z}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},q={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},K="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(K)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),J,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,N,R,{match:/\$\d+/},g,U,{scope:"attr",match:a+t.lookahead(":"),relevance:0},oe,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin: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:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},q,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},le,P,H,Q,{match:/\$[(.]/}]}}function Zz(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])*",Wz={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 Jz(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=Wz,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:`
511
- `},h]}}const e4=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_-]*/}}),t4=["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"],n4=["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"],i4=[...t4,...n4],a4=["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(),_w=["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(),Nw=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),r4=["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(),s4=_w.concat(Nw).sort().reverse();function l4(e){const t=e4(e),n=s4,a="and or not only",s="[\\w-]+",o="("+s+"|@\\{"+s+"\\})",c=[],f=[],d=function(A){return{className:"string",begin:"~?"+A+".*?"+A}},h=function(A,D,F){return{className:A,begin:D,relevance:F}},y={$pattern:/[a-z-]+/,keyword:a,attribute:a4.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("+r4.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},w={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}},_={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("+i4.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:":("+_w.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Nw.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:x},{begin:"!important"},t.FUNCTION_DISPATCH]},R={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[_]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,N,R,S,_,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function o4(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 c4(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 u4(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(_=>{_.contains=_.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 f4(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 d4(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=(w,N,_="\\1")=>{const R=_==="\\1"?_:t.concat(_,N);return t.concat(t.concat("(?:",w,")"),N,/(?:\\.|[^\\\/])*?/,R,/(?:\\.|[^\\\/])*?/,_,a)},v=(w,N,_)=>t.concat(t.concat("(?:",w,")"),N,/(?:\\.|[^\\\/])*?/,_,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 h4(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":(q,Q)=>{Q.data._beginMatch=q[1]||q[2]},"on:end":(q,Q)=>{Q.data._beginMatch!==q[1]&&Q.ignoreMatch()}},x=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
512
- ]`,S={scope:"string",variants:[y,h,g,x]},w={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"],_=["__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:_,literal:(q=>{const Q=[];return q.forEach(K=>{Q.push(K),K.toLowerCase()===K?Q.push(K.toUpperCase()):Q.push(K.toLowerCase())}),Q})(N),built_in:R},F=q=>q.map(Q=>Q.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",F(R).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},H=t.concat(a,"\\b(?!\\()"),U={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),H],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),H],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},J={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},C={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[J,c,U,e.C_BLOCK_COMMENT_MODE,S,w,M]},P={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",F(_).join("\\b|"),"|",F(R).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[C]};C.contains.push(P);const Y=[J,U,e.C_BLOCK_COMMENT_MODE,S,w,M],le={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:N,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:N,keyword:["new","array"]},contains:["self",...Y]},...Y,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:D,contains:[le,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,P,U,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},M,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:D,contains:["self",le,c,U,e.C_BLOCK_COMMENT_MODE,S,w]}]},{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,w]}}function m4(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 p4(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function g4(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("|")}`,w={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}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",d,w,g,e.HASH_COMMENT_MODE]}]};return h.contains=[g,w,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[d,w,{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:[_]},{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 b4(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function y4(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 x4(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"}]},w={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},M=[g,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:n}],relevance:0},S,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,y],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,h),relevance:0}].concat(d,h);y.contains=M,w.contains=M;const C=[{begin:/^\s*=>/,starts:{end:"$",contains:M}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:M}}];return h.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(C).concat(h).concat(M)}}function v4(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 E4=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_-]*/}}),S4=["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"],w4=["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"],_4=[...S4,...w4],N4=["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(),k4=["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(),T4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),C4=["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 A4(e){const t=E4(e),n=T4,a=k4,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("+_4.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("+C4.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:N4.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 O4(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function R4(e){const t=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],h=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],y=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],x=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=y,S=[...h,...d].filter(F=>!y.includes(F)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},N={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function R(F){return t.concat(/\b/,t.either(...F.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:R(x),relevance:0};function D(F,{exceptions:M,when:H}={}){const U=H;return M=M||[],F.map(J=>J.match(/\|\d+$/)||M.includes(J)?J:U(J)?`${J}|0`:J)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:D(S,{when:F=>F.length<3}),literal:o,type:f,built_in:g},contains:[{scope:"type",match:R(c)},A,_,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,N]}}function kw(e){return e?typeof e=="string"?e:e.source:null}function Zo(e){return gt("(?=",e,")")}function gt(...e){return e.map(n=>kw(n)).join("")}function M4(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function wn(...e){return"("+(M4(e).capture?"":"?:")+e.map(a=>kw(a)).join("|")+")"}const Ig=e=>gt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),j4=["Protocol","Type"].map(Ig),tE=["init","self"].map(Ig),D4=["Any","Self"],Fm=["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"],L4=["assignment","associativity","higherThan","left","lowerThan","none","right"],I4=["#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"],Tw=wn(/[/=\-+!*%<>&|^~?]/,/[\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]/),Cw=wn(Tw,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Pm=gt(Tw,Cw,"*"),Aw=wn(/[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=wn(Aw,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Hi=gt(Aw,Cf,"*"),sf=gt(/[A-Z]/,Cf,"*"),z4=["attached","autoclosure",gt(/convention\(/,wn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",gt(/objc\(/,Hi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],B4=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function U4(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,wn(...j4,...tE)],className:{2:"keyword"}},o={match:gt(/\./,wn(...Fm)),relevance:0},c=Fm.filter(Xe=>typeof Xe=="string").concat(["_|0"]),f=Fm.filter(Xe=>typeof Xe!="string").concat(D4).map(Ig),d={variants:[{className:"keyword",match:wn(...f,...tE)}]},h={$pattern:wn(/\b\w+/,/#\w+/),keyword:c.concat(I4),literal:nE},y=[s,o,d],g={match:gt(/\./,wn(...iE)),relevance:0},x={className:"built_in",match:gt(/\b/,wn(...iE),/(?=\()/)},v=[g,x],S={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:Pm},{match:`\\.(\\.|${Cw})+`}]},N=[S,w],_="([0-9]_*)+",R="([0-9a-fA-F]_*)+",A={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${R})(\\.(${R}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},D=(Xe="")=>({className:"subst",variants:[{match:gt(/\\/,Xe,/[0\\tnr"']/)},{match:gt(/\\/,Xe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),F=(Xe="")=>({className:"subst",match:gt(/\\/,Xe,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(Xe="")=>({className:"subst",label:"interpol",begin:gt(/\\/,Xe,/\(/),end:/\)/}),H=(Xe="")=>({begin:gt(Xe,/"""/),end:gt(/"""/,Xe),contains:[D(Xe),F(Xe),M(Xe)]}),U=(Xe="")=>({begin:gt(Xe,/"/),end:gt(/"/,Xe),contains:[D(Xe),M(Xe)]}),J={className:"string",variants:[H(),H("#"),H("##"),H("###"),U(),U("#"),U("##"),U("###")]},C=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],P={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:C},Y=Xe=>{const _i=gt(Xe,/\//),li=gt(/\//,Xe);return{begin:_i,end:li,contains:[...C,{scope:"comment",begin:`#(?!.*${li})`,end:/$/}]}},le={scope:"regexp",variants:[Y("###"),Y("##"),Y("#"),P]},q={match:gt(/`/,Hi,/`/)},Q={className:"variable",match:/\$\d+/},K={className:"variable",match:`\\$${Cf}+`},oe=[q,Q,K],Z={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:B4,contains:[...N,A,J]}]}},pe={scope:"keyword",match:gt(/@/,wn(...z4),Zo(wn(/\(/,/\s+/)))},O={scope:"meta",match:gt(/@/,Hi)},L=[Z,pe,O],te={match:Zo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:gt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Cf,"+")},{className:"type",match:sf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:gt(/\s+&\s+/,Zo(sf)),relevance:0}]},T={begin:/</,end:/>/,keywords:h,contains:[...a,...y,...L,S,te]};te.contains.push(T);const he={match:gt(Hi,/\s*:/),keywords:"_|0",relevance:0},Ne={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",he,...a,le,...y,...v,...N,A,J,...oe,...L,te]},ve={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,te]},Fe={begin:wn(Zo(gt(Hi,/\s*:/)),Zo(gt(Hi,/\s+/,Hi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Hi}]},st={begin:/\(/,end:/\)/,keywords:h,contains:[Fe,...a,...y,...N,A,J,...L,te,Ne],endsParent:!0,illegal:/["']/},it={match:[/(func|macro)/,/\s+/,wn(q.match,Hi,Pm)],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+/,Pm],className:{1:"keyword",3:"title"}},Ji={begin:[/precedencegroup/,/\s+/,sf],className:{1:"keyword",3:"title"},contains:[te],keywords:[...L4,...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 J.variants){const _i=Xe.contains.find(zi=>zi.label==="interpol");_i.keywords=h;const li=[...y,...v,...N,A,J,...oe];_i.contains=[...li,{begin:/\(/,end:/\)/,contains:["self",...li]}]}return{name:"Swift",keywords:h,contains:[...a,it,Wt,Ra,Gn,Ii,Kn,Ji,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},le,...y,...v,...N,A,J,...oe,...L,te,Ne]}}const Af="[A-Za-z$_][0-9A-Za-z$_]*",Ow=["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"],Rw=["true","false","null","undefined","NaN","Infinity"],Mw=["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"],jw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Dw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Lw=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Iw=[].concat(Dw,Mw,jw);function $4(e){const t=e.regex,n=(Z,{after:pe})=>{const O="</"+Z[0].slice(1);return Z.input.indexOf(O,pe)!==-1},a=Af,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,pe)=>{const O=Z[0].length+Z.index,L=Z.input[O];if(L==="<"||L===","){pe.ignoreMatch();return}L===">"&&(n(Z,{after:O})||pe.ignoreMatch());let te;const T=Z.input.substring(O);if(te=T.match(/^\s*=/)){pe.ignoreMatch();return}if((te=T.match(/^\s+extends\s+/))&&te.index===0){pe.ignoreMatch();return}}},f={$pattern:Af,keyword:Ow,literal:Rw,built_in:Iw,"variable.language":Lw},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"}},w={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,w,N,{match:/\$\d+/},g];x.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const D=[].concat(R,x.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},H={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Mw,...jw]}},J={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Y(Z){return t.concat("(?!",Z.join("|"),")")}const le={match:t.concat(/\b/,Y([...Dw,"super","import"].map(Z=>`${Z}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},q={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},K="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(K)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),J,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,N,R,{match:/\$\d+/},g,U,{scope:"attr",match:a+t.lookahead(":"),relevance:0},oe,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin: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:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},q,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},le,P,H,Q,{match:/\$[(.]/}]}}function F4(e){const t=e.regex,n=$4(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:Ow.concat(d),literal:Rw,built_in:Iw.concat(s),"variable.language":Lw},y={className:"meta",begin:"@"+a},g=(w,N,_)=>{const R=w.contains.findIndex(A=>A.label===N);if(R===-1)throw new Error("can not find mode to replace");w.contains.splice(R,1,_)};Object.assign(n.keywords,h),n.exports.PARAMS_CONTAINS.push(y);const x=n.contains.find(w=>w.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(w=>w.label==="func.def");return S.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function P4(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 q4(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 H4(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 K4(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},w={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,w,o,c],_=[...N];return _.pop(),_.push(f),v.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:N}}const G4={arduino:Tz,bash:Cz,c:Az,cpp:Oz,csharp:Rz,css:$z,diff:Fz,go:Pz,graphql:qz,ini:Hz,java:Kz,javascript:Xz,json:Zz,kotlin:Jz,less:l4,lua:o4,makefile:c4,markdown:u4,objectivec:f4,perl:d4,php:h4,"php-template":m4,plaintext:p4,python:g4,"python-repl":b4,r:y4,ruby:x4,rust:v4,scss:A4,shell:O4,sql:R4,swift:U4,typescript:F4,vbnet:P4,wasm:q4,xml:H4,yaml:K4};var qm,aE;function Q4(){if(aE)return qm;aE=1;function e(B){return B instanceof Map?B.clear=B.delete=B.set=function(){throw new Error("map is read-only")}:B instanceof Set&&(B.add=B.clear=B.delete=function(){throw new Error("set is read-only")}),Object.freeze(B),Object.getOwnPropertyNames(B).forEach(ae=>{const me=B[ae],je=typeof me;(je==="object"||je==="function")&&!Object.isFrozen(me)&&e(me)}),B}class t{constructor(ae){ae.data===void 0&&(ae.data={}),this.data=ae.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(B){return B.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(B,...ae){const me=Object.create(null);for(const je in B)me[je]=B[je];return ae.forEach(function(je){for(const wt in je)me[wt]=je[wt]}),me}const s="</span>",o=B=>!!B.scope,c=(B,{prefix:ae})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const me=B.split(".");return[`${ae}${me.shift()}`,...me.map((je,wt)=>`${je}${"_".repeat(wt+1)}`)].join(" ")}return`${ae}${B}`};class f{constructor(ae,me){this.buffer="",this.classPrefix=me.classPrefix,ae.walk(this)}addText(ae){this.buffer+=n(ae)}openNode(ae){if(!o(ae))return;const me=c(ae.scope,{prefix:this.classPrefix});this.span(me)}closeNode(ae){o(ae)&&(this.buffer+=s)}value(){return this.buffer}span(ae){this.buffer+=`<span class="${ae}">`}}const d=(B={})=>{const ae={children:[]};return Object.assign(ae,B),ae};class h{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ae){this.top.children.push(ae)}openNode(ae){const me=d({scope:ae});this.add(me),this.stack.push(me)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ae){return this.constructor._walk(ae,this.rootNode)}static _walk(ae,me){return typeof me=="string"?ae.addText(me):me.children&&(ae.openNode(me),me.children.forEach(je=>this._walk(ae,je)),ae.closeNode(me)),ae}static _collapse(ae){typeof ae!="string"&&ae.children&&(ae.children.every(me=>typeof me=="string")?ae.children=[ae.children.join("")]:ae.children.forEach(me=>{h._collapse(me)}))}}class y extends h{constructor(ae){super(),this.options=ae}addText(ae){ae!==""&&this.add(ae)}startScope(ae){this.openNode(ae)}endScope(){this.closeNode()}__addSublanguage(ae,me){const je=ae.root;me&&(je.scope=`language:${me}`),this.add(je)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(B){return B?typeof B=="string"?B:B.source:null}function x(B){return w("(?=",B,")")}function v(B){return w("(?:",B,")*")}function S(B){return w("(?:",B,")?")}function w(...B){return B.map(me=>g(me)).join("")}function N(B){const ae=B[B.length-1];return typeof ae=="object"&&ae.constructor===Object?(B.splice(B.length-1,1),ae):{}}function _(...B){return"("+(N(B).capture?"":"?:")+B.map(je=>g(je)).join("|")+")"}function R(B){return new RegExp(B.toString()+"|").exec("").length-1}function A(B,ae){const me=B&&B.exec(ae);return me&&me.index===0}const D=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function F(B,{joinWith:ae}){let me=0;return B.map(je=>{me+=1;const wt=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])+wt):(xe+=be[0],be[0]==="("&&me++)}return xe}).map(je=>`(${je})`).join(ae)}const M=/\b\B/,H="[a-zA-Z]\\w*",U="[a-zA-Z_]\\w*",J="\\b\\d+(\\.\\d+)?",C="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",Y="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",le=(B={})=>{const ae=/^#![ ]*\//;return B.binary&&(B.begin=w(ae,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:ae,end:/$/,relevance:0,"on:begin":(me,je)=>{me.index!==0&&je.ignoreMatch()}},B)},q={begin:"\\\\[\\s\\S]",relevance:0},Q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[q]},K={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[q]},oe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Z=function(B,ae,me={}){const je=a({scope:"comment",begin:B,end:ae,contains:[]},me);je.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const wt=_("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:w(/[ ]+/,"(",wt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),je},pe=Z("//","$"),O=Z("/\\*","\\*/"),L=Z("#","$"),te={scope:"number",begin:J,relevance:0},T={scope:"number",begin:C,relevance:0},he={scope:"number",begin:P,relevance:0},Ne={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[q,{begin:/\[/,end:/\]/,relevance:0,contains:[q]}]},ve={scope:"title",begin:H,relevance:0},Fe={scope:"title",begin:U,relevance:0},st={begin:"\\.\\s*"+U,relevance:0};var Wt=Object.freeze({__proto__:null,APOS_STRING_MODE:Q,BACKSLASH_ESCAPE:q,BINARY_NUMBER_MODE:he,BINARY_NUMBER_RE:P,COMMENT:Z,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:pe,C_NUMBER_MODE:T,C_NUMBER_RE:C,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(ae,me)=>{me.data._beginMatch=ae[1]},"on:end":(ae,me)=>{me.data._beginMatch!==ae[1]&&me.ignoreMatch()}})},HASH_COMMENT_MODE:L,IDENT_RE:H,MATCH_NOTHING_RE:M,METHOD_GUARD:st,NUMBER_MODE:te,NUMBER_RE:J,PHRASAL_WORDS_MODE:oe,QUOTE_STRING_MODE:K,REGEXP_MODE:Ne,RE_STARTERS_RE:Y,SHEBANG:le,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:U,UNDERSCORE_TITLE_MODE:Fe});function Kn(B,ae){B.input[B.index-1]==="."&&ae.ignoreMatch()}function Ji(B,ae){B.className!==void 0&&(B.scope=B.className,delete B.className)}function Ra(B,ae){ae&&B.beginKeywords&&(B.begin="\\b("+B.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",B.__beforeBegin=Kn,B.keywords=B.keywords||B.beginKeywords,delete B.beginKeywords,B.relevance===void 0&&(B.relevance=0))}function Gn(B,ae){Array.isArray(B.illegal)&&(B.illegal=_(...B.illegal))}function Ii(B,ae){if(B.match){if(B.begin||B.end)throw new Error("begin & end are not supported with match");B.begin=B.match,delete B.match}}function Xe(B,ae){B.relevance===void 0&&(B.relevance=1)}const _i=(B,ae)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const me=Object.assign({},B);Object.keys(B).forEach(je=>{delete B[je]}),B.keywords=me.keywords,B.begin=w(me.beforeMatch,x(me.begin)),B.starts={relevance:0,contains:[Object.assign(me,{endsParent:!0})]},B.relevance=0,delete me.beforeMatch},li=["of","and","for","in","not","or","if","then","parent","list","value"],zi="keyword";function ea(B,ae,me=zi){const je=Object.create(null);return typeof B=="string"?wt(me,B.split(" ")):Array.isArray(B)?wt(me,B):Object.keys(B).forEach(function(bt){Object.assign(je,ea(B[bt],ae,bt))}),je;function wt(bt,xe){ae&&(xe=xe.map(be=>be.toLowerCase())),xe.forEach(function(be){const Me=be.split("|");je[Me[0]]=[bt,kr(Me[0],Me[1])]})}}function kr(B,ae){return ae?Number(ae):Yl(B)?0:1}function Yl(B){return li.includes(B.toLowerCase())}const ys={},Ot=B=>{console.error(B)},xs=(B,...ae)=>{console.log(`WARN: ${B}`,...ae)},ne=(B,ae)=>{ys[`${B}/${ae}`]||(console.log(`Deprecated as of ${B}. ${ae}`),ys[`${B}/${ae}`]=!0)},fe=new Error;function Ce(B,ae,{key:me}){let je=0;const wt=B[me],bt={},xe={};for(let be=1;be<=ae.length;be++)xe[be+je]=wt[be],bt[be+je]=!0,je+=R(ae[be-1]);B[me]=xe,B[me]._emit=bt,B[me]._multi=!0}function Pe(B){if(Array.isArray(B.begin)){if(B.skip||B.excludeBegin||B.returnBegin)throw Ot("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),fe;if(typeof B.beginScope!="object"||B.beginScope===null)throw Ot("beginScope must be object"),fe;Ce(B,B.begin,{key:"beginScope"}),B.begin=F(B.begin,{joinWith:""})}}function et(B){if(Array.isArray(B.end)){if(B.skip||B.excludeEnd||B.returnEnd)throw Ot("skip, excludeEnd, returnEnd not compatible with endScope: {}"),fe;if(typeof B.endScope!="object"||B.endScope===null)throw Ot("endScope must be object"),fe;Ce(B,B.end,{key:"endScope"}),B.end=F(B.end,{joinWith:""})}}function yn(B){B.scope&&typeof B.scope=="object"&&B.scope!==null&&(B.beginScope=B.scope,delete B.scope)}function Ni(B){yn(B),typeof B.beginScope=="string"&&(B.beginScope={_wrap:B.beginScope}),typeof B.endScope=="string"&&(B.endScope={_wrap:B.endScope}),Pe(B),et(B)}function an(B){function ae(xe,be){return new RegExp(g(xe),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(be?"g":""))}class me{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(be,Me){Me.position=this.position++,this.matchIndexes[this.matchAt]=Me,this.regexes.push([Me,be]),this.matchAt+=R(be)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const be=this.regexes.map(Me=>Me[1]);this.matcherRe=ae(F(be,{joinWith:"|"}),!0),this.lastIndex=0}exec(be){this.matcherRe.lastIndex=this.lastIndex;const Me=this.matcherRe.exec(be);if(!Me)return null;const Ut=Me.findIndex((ta,Es)=>Es>0&&ta!==void 0),kt=this.matchIndexes[Ut];return Me.splice(0,Ut),Object.assign(Me,kt)}}class je{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(be){if(this.multiRegexes[be])return this.multiRegexes[be];const Me=new me;return this.rules.slice(be).forEach(([Ut,kt])=>Me.addRule(Ut,kt)),Me.compile(),this.multiRegexes[be]=Me,Me}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(be,Me){this.rules.push([be,Me]),Me.type==="begin"&&this.count++}exec(be){const Me=this.getMatcher(this.regexIndex);Me.lastIndex=this.lastIndex;let Ut=Me.exec(be);if(this.resumingScanAtSamePosition()&&!(Ut&&Ut.index===this.lastIndex)){const kt=this.getMatcher(0);kt.lastIndex=this.lastIndex+1,Ut=kt.exec(be)}return Ut&&(this.regexIndex+=Ut.position+1,this.regexIndex===this.count&&this.considerAll()),Ut}}function wt(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,_i].forEach(kt=>kt(xe,be)),B.compilerExtensions.forEach(kt=>kt(xe,be)),xe.__beforeBegin=null,[Ra,Gn,Xe].forEach(kt=>kt(xe,be)),xe.isCompiled=!0;let Ut=null;return typeof xe.keywords=="object"&&xe.keywords.$pattern&&(xe.keywords=Object.assign({},xe.keywords),Ut=xe.keywords.$pattern,delete xe.keywords.$pattern),Ut=Ut||/\w+/,xe.keywords&&(xe.keywords=ea(xe.keywords,B.case_insensitive)),Me.keywordPatternRe=ae(Ut,!0),be&&(xe.begin||(xe.begin=/\B|\b/),Me.beginRe=ae(Me.begin),!xe.end&&!xe.endsWithParent&&(xe.end=/\B|\b/),xe.end&&(Me.endRe=ae(Me.end)),Me.terminatorEnd=g(Me.end)||"",xe.endsWithParent&&be.terminatorEnd&&(Me.terminatorEnd+=(xe.end?"|":"")+be.terminatorEnd)),xe.illegal&&(Me.illegalRe=ae(xe.illegal)),xe.contains||(xe.contains=[]),xe.contains=[].concat(...xe.contains.map(function(kt){return un(kt==="self"?xe:kt)})),xe.contains.forEach(function(kt){bt(kt,Me)}),xe.starts&&bt(xe.starts,be),Me.matcher=wt(Me),Me}if(B.compilerExtensions||(B.compilerExtensions=[]),B.contains&&B.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return B.classNameAliases=a(B.classNameAliases||{}),bt(B)}function Dt(B){return B?B.endsWithParent||Dt(B.starts):!1}function un(B){return B.variants&&!B.cachedVariants&&(B.cachedVariants=B.variants.map(function(ae){return a(B,{variants:null},ae)})),B.cachedVariants?B.cachedVariants:Dt(B)?a(B,{starts:B.starts?a(B.starts):null}):Object.isFrozen(B)?a(B):B}var lt="11.11.1";class Bi extends Error{constructor(ae,me){super(ae),this.name="HTMLInjectionError",this.html=me}}const xn=n,kc=a,Tr=Symbol("nomatch"),vs=7,Cr=function(B){const ae=Object.create(null),me=Object.create(null),je=[];let wt=!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 we=ce.className+" ";we+=ce.parentNode?ce.parentNode.className:"";const qe=be.languageDetectRe.exec(we);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 we.split(/\s+/).find(ot=>Me(ot)||vn(ot))}function kt(ce,we,qe){let ot="",Ft="";typeof we=="object"?(ot=ce,qe=we.ignoreIllegals,Ft=we.language):(ne("10.7.0","highlight(lang, code, ...args) has been deprecated."),ne("10.7.0",`Please use highlight(code, options) instead.
508
+ `))}function d(v,S,w,N){const _=w.enter("tableCell"),R=w.enter("phrasing"),A=w.containerPhrasing(v,{...N,before:o,after:o});return R(),_(),A}function h(v,S){return P3(v,{align:S,alignDelimiters:a,padding:n,stringLength:s})}function y(v,S,w){const N=v.children;let _=-1;const R=[],A=S.enter("table");for(;++_<N.length;)R[_]=g(N[_],S,w);return A(),R}function g(v,S,w){const N=v.children;let _=-1;const R=[],A=S.enter("tableRow");for(;++_<N.length;)R[_]=d(N[_],v,S,w);return A(),R}function x(v,S,w){let N=lw.inlineCode(v,S,w);return w.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function AI(){return{exit:{taskListCheckValueChecked:G0,taskListCheckValueUnchecked:G0,paragraph:RI}}}function OI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:MI}}}function G0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function RI(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 MI(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=lw.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 jI(){return[f3(),M3(),I3(),SI(),AI()]}function DI(e){return{extensions:[d3(),j3(e),z3(),CI(e),OI()]}}const LI={tokenize:FI,partial:!0},ow={tokenize:PI,partial:!0},cw={tokenize:qI,partial:!0},uw={tokenize:HI,partial:!0},II={tokenize:KI,partial:!0},fw={name:"wwwAutolink",tokenize:UI,previous:hw},dw={name:"protocolAutolink",tokenize:$I,previous:mw},Oa={name:"emailAutolink",tokenize:BI,previous:pw},Wi={};function zI(){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,dw];Wi[104]=[Oa,dw];Wi[87]=[Oa,fw];Wi[119]=[Oa,fw];function BI(e,t,n){const a=this;let s,o;return c;function c(g){return!Np(g)||!pw.call(a,a.previous)||jg(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Np(g)?(e.consume(g),f):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(II,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 UI(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!hw.call(a,a.previous)||jg(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(LI,e.attempt(ow,e.attempt(cw,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function $I(e,t,n){const a=this;let s="",o=!1;return c;function c(g){return(g===72||g===104)&&mw.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||_f(g)||xt(g)||ds(g)||Wf(g)?n(g):e.attempt(ow,e.attempt(cw,y),n)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function FI(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 PI(e,t,n){let a,s,o;return c;function c(h){return h===46||h===95?e.check(uw,d,f)(h):h===null||xt(h)||ds(h)||h!==45&&Wf(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 qI(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(uw,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 HI(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 KI(e,t,n){return a;function a(o){return e.consume(o),s}function s(o){return pn(o)?n(o):t(o)}}function hw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xt(e)}function mw(e){return!kn(e)}function pw(e){return!(e===47||Np(e))}function Np(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 GI={tokenize:ez,partial:!0};function QI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ZI,continuation:{tokenize:WI},exit:JI}},text:{91:{name:"gfmFootnoteCall",tokenize:XI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:YI,resolveTo:VI}}}}function YI(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 VI(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 XI(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 ZI(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 w=e.exit("gfmFootnoteDefinitionLabelString");return o=Mi(a.sliceSerialize(w)),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 WI(e,t,n){return e.check(wc,t,e.attempt(GI,t,n))}function JI(e){e.exit("gfmFootnoteDefinition")}function ez(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 tz(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,Jf(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 w=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"),_=Ml(S);return N._open=!_||_===2&&!!w,N._close=!w||w===2&&!!_,f(S)}}}class nz{constructor(){this.map=[]}add(t,n,a){iz(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 iz(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 az(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 rz(){return{flow:{null:{name:"table",tokenize:sz,resolveAll:lz}}}}function sz(e,t,n){const a=this;let s=0,o=0,c;return f;function f(C){let P=a.events.length-1;for(;P>-1;){const q=a.events[P][1].type;if(q==="lineEnding"||q==="linePrefix")P--;else break}const Y=P>-1?a.events[P][1].type:null,le=Y==="tableHead"||Y==="tableRow"?M:d;return le===M&&a.parser.lazy[a.now().line]?n(C):le(C)}function d(C){return e.enter("tableHead"),e.enter("tableRow"),h(C)}function h(C){return C===124||(c=!0,o+=1),y(C)}function y(C){return C===null?n(C):Te(C)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),v):n(C):Ge(C)?Je(e,y,"whitespace")(C):(o+=1,c&&(c=!1,s+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(C)))}function g(C){return C===null||C===124||xt(C)?(e.exit("data"),y(C)):(e.consume(C),C===92?x:g)}function x(C){return C===92||C===124?(e.consume(C),g):g(C)}function v(C){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(C):(e.enter("tableDelimiterRow"),c=!1,Ge(C)?Je(e,S,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):S(C))}function S(C){return C===45||C===58?N(C):C===124?(c=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),w):F(C)}function w(C){return Ge(C)?Je(e,N,"whitespace")(C):N(C)}function N(C){return C===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),_):C===45?(o+=1,_(C)):C===null||Te(C)?D(C):F(C)}function _(C){return C===45?(e.enter("tableDelimiterFiller"),R(C)):F(C)}function R(C){return C===45?(e.consume(C),R):C===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(C))}function A(C){return Ge(C)?Je(e,D,"whitespace")(C):D(C)}function D(C){return C===124?S(C):C===null||Te(C)?!c||s!==o?F(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):F(C)}function F(C){return n(C)}function M(C){return e.enter("tableRow"),H(C)}function H(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),H):C===null||Te(C)?(e.exit("tableRow"),t(C)):Ge(C)?Je(e,H,"whitespace")(C):(e.enter("data"),U(C))}function U(C){return C===null||C===124||xt(C)?(e.exit("data"),H(C)):(e.consume(C),C===92?J:U)}function J(C){return C===92||C===124?(e.consume(C),U):U(C)}}function lz(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 nz;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=az(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,w=n[3]-n[2]-1;e.add(S,w,[])}}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 oz={name:"tasklistCheck",tokenize:uz};function cz(){return{text:{91:oz}}}function uz(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:fz},t,n)(d):n(d)}}function fz(e,t,n){return Je(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function dz(e){return kS([zI(),QI(),tz(e),rz(),cz()])}const hz={};function Dg(e){const t=this,n=e||hz,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(dz(n)),o.push(jI()),c.push(DI(n))}const Y0=(function(e,t,n){const a=_c(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 gz;if(typeof e=="string")return pz(e);if(typeof e=="object")return mz(e);if(typeof e=="function")return Lg(e);throw new Error("Expected function, string, or array as `test`")});function mz(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 pz(e){return Lg(t);function t(n){return n.tagName===e}}function Lg(e){return t;function t(n,a,s){return!!(bz(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function gz(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function bz(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const V0=/\n/g,X0=/[\t ]+/g,kp=bs("br"),Z0=bs(Nz),yz=bs("p"),W0=bs("tr"),xz=bs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",_z,kz]),gw=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 vz(e,t){const n=t||{},a="children"in e?e.children:[],s=gw(e),o=xw(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...yw(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...bw(a[f],e,{whitespace:o,breakBefore:f?void 0:s,breakAfter:f<a.length-1?kp(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(`
509
+ `.repeat(h)||" "),h=-1,d.push(y))}return d.join("")}function bw(e,t,n){return e.type==="element"?Ez(e,t,n):e.type==="text"?n.whitespace==="normal"?yw(e,n):Sz(e):[]}function Ez(e,t,n){const a=xw(e,n),s=e.children||[];let o=-1,c=[];if(xz(e))return c;let f,d;for(kp(e)||W0(e)&&Y0(t,e,W0)?d=`
510
+ `:yz(e)?(f=2,d=2):gw(e)&&(f=1,d=1);++o<s.length;)c=c.concat(bw(s[o],e,{whitespace:a,breakBefore:o?void 0:f,breakAfter:o<s.length-1?kp(s[o+1]):d}));return Z0(e)&&Y0(t,e,Z0)&&c.push(" "),f&&c.unshift(f),d&&c.push(d),c}function yw(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(wz(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 Sz(e){return[String(e.value)]}function wz(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 xw(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 _z(e){return!!(e.properties||{}).hidden}function Nz(e){return e.tagName==="td"||e.tagName==="th"}function kz(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function Tz(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"],w=["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"],_=["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:w,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},F={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],H={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:M.concat([{begin:/\(/,end:/\)/,keywords:D,contains:M.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(H,U,F,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:D,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Cz(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=Tz(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 Az(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},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],N=["true","false"],_={match:/(\/[a-z._-]+)+/},R=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],A=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],D=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],F=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:w,literal:N,built_in:[...R,...A,"set","shopt",...D,...F]},contains:[v,e.SHEBANG(),S,g,o,c,_,f,d,h,y,n]}}function Oz(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"},_=[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:_.concat([{begin:/\(/,end:/\)/,keywords:N,contains:_.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,_,[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 Rz(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"],w=["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"],_=["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:w,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},F={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],H={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:M.concat([{begin:/\(/,end:/\)/,keywords:D,contains:M.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(H,U,F,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:D,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Mz(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]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},N=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});x.contains=[w,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 _={variants:[h,w,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"}},_,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:[_,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},D]}}const jz=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_-]*/}}),Dz=["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"],Lz=["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"],Iz=[...Dz,...Lz],zz=["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(),Bz=["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(),Uz=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),$z=["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 Fz(e){const t=e.regex,n=jz(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:":("+Bz.join("|")+")"},{begin:":(:)?("+Uz.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+$z.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:zz.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Iz.join("|")+")\\b"}]}}function Pz(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 qz(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 Hz(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 Kz(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 vw(e,t,n){return n===-1?"":e.replace(t,a=>vw(e,t,n-1))}function Gz(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+vw("(?:<"+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$_]*",Qz=["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"],Yz=["true","false","null","undefined","NaN","Infinity"],Ew=["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"],Sw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ww=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Vz=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Xz=[].concat(ww,Ew,Sw);function Zz(e){const t=e.regex,n=(Z,{after:pe})=>{const O="</"+Z[0].slice(1);return Z.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:(Z,pe)=>{const O=Z[0].length+Z.index,L=Z.input[O];if(L==="<"||L===","){pe.ignoreMatch();return}L===">"&&(n(Z,{after:O})||pe.ignoreMatch());let te;const T=Z.input.substring(O);if(te=T.match(/^\s*=/)){pe.ignoreMatch();return}if((te=T.match(/^\s+extends\s+/))&&te.index===0){pe.ignoreMatch();return}}},f={$pattern:eE,keyword:Qz,literal:Yz,built_in:Xz,"variable.language":Vz},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"}},w={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,w,N,{match:/\$\d+/},g];x.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const D=[].concat(R,x.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},H={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Ew,...Sw]}},J={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Y(Z){return t.concat("(?!",Z.join("|"),")")}const le={match:t.concat(/\b/,Y([...ww,"super","import"].map(Z=>`${Z}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},q={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},K="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(K)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),J,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,N,R,{match:/\$\d+/},g,U,{scope:"attr",match:a+t.lookahead(":"),relevance:0},oe,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin: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:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},q,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},le,P,H,Q,{match:/\$[(.]/}]}}function Wz(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])*",Jz={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 e4(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=Jz,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:`
511
+ `},h]}}const t4=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_-]*/}}),n4=["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"],i4=["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"],a4=[...n4,...i4],r4=["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(),_w=["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(),Nw=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),s4=["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(),l4=_w.concat(Nw).sort().reverse();function o4(e){const t=t4(e),n=l4,a="and or not only",s="[\\w-]+",o="("+s+"|@\\{"+s+"\\})",c=[],f=[],d=function(A){return{className:"string",begin:"~?"+A+".*?"+A}},h=function(A,D,F){return{className:A,begin:D,relevance:F}},y={$pattern:/[a-z-]+/,keyword:a,attribute:r4.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("+s4.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},w={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}},_={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("+a4.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:":("+_w.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Nw.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:x},{begin:"!important"},t.FUNCTION_DISPATCH]},R={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[_]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,N,R,S,_,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function c4(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 u4(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 f4(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(_=>{_.contains=_.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 d4(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 h4(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=(w,N,_="\\1")=>{const R=_==="\\1"?_:t.concat(_,N);return t.concat(t.concat("(?:",w,")"),N,/(?:\\.|[^\\\/])*?/,R,/(?:\\.|[^\\\/])*?/,_,a)},v=(w,N,_)=>t.concat(t.concat("(?:",w,")"),N,/(?:\\.|[^\\\/])*?/,_,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 m4(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":(q,Q)=>{Q.data._beginMatch=q[1]||q[2]},"on:end":(q,Q)=>{Q.data._beginMatch!==q[1]&&Q.ignoreMatch()}},x=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
512
+ ]`,S={scope:"string",variants:[y,h,g,x]},w={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"],_=["__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:_,literal:(q=>{const Q=[];return q.forEach(K=>{Q.push(K),K.toLowerCase()===K?Q.push(K.toUpperCase()):Q.push(K.toLowerCase())}),Q})(N),built_in:R},F=q=>q.map(Q=>Q.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",F(R).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},H=t.concat(a,"\\b(?!\\()"),U={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),H],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),H],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},J={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},C={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[J,c,U,e.C_BLOCK_COMMENT_MODE,S,w,M]},P={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",F(_).join("\\b|"),"|",F(R).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[C]};C.contains.push(P);const Y=[J,U,e.C_BLOCK_COMMENT_MODE,S,w,M],le={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:N,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:N,keyword:["new","array"]},contains:["self",...Y]},...Y,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:D,contains:[le,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,P,U,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},M,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:D,contains:["self",le,c,U,e.C_BLOCK_COMMENT_MODE,S,w]}]},{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,w]}}function p4(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 g4(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function b4(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("|")}`,w={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}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",d,w,g,e.HASH_COMMENT_MODE]}]};return h.contains=[g,w,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[d,w,{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:[_]},{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 y4(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function x4(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 v4(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"}]},w={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},M=[g,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:n}],relevance:0},S,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,y],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,h),relevance:0}].concat(d,h);y.contains=M,w.contains=M;const C=[{begin:/^\s*=>/,starts:{end:"$",contains:M}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:M}}];return h.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(C).concat(h).concat(M)}}function E4(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 S4=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_-]*/}}),w4=["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"],_4=["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"],N4=[...w4,..._4],k4=["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(),T4=["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(),C4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),A4=["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 O4(e){const t=S4(e),n=C4,a=T4,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("+N4.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("+A4.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:k4.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 R4(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function M4(e){const t=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],h=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],y=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],x=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=y,S=[...h,...d].filter(F=>!y.includes(F)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},N={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function R(F){return t.concat(/\b/,t.either(...F.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:R(x),relevance:0};function D(F,{exceptions:M,when:H}={}){const U=H;return M=M||[],F.map(J=>J.match(/\|\d+$/)||M.includes(J)?J:U(J)?`${J}|0`:J)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:D(S,{when:F=>F.length<3}),literal:o,type:f,built_in:g},contains:[{scope:"type",match:R(c)},A,_,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,N]}}function kw(e){return e?typeof e=="string"?e:e.source:null}function Zo(e){return gt("(?=",e,")")}function gt(...e){return e.map(n=>kw(n)).join("")}function j4(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function wn(...e){return"("+(j4(e).capture?"":"?:")+e.map(a=>kw(a)).join("|")+")"}const Ig=e=>gt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),D4=["Protocol","Type"].map(Ig),tE=["init","self"].map(Ig),L4=["Any","Self"],Fm=["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"],I4=["assignment","associativity","higherThan","left","lowerThan","none","right"],z4=["#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"],Tw=wn(/[/=\-+!*%<>&|^~?]/,/[\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]/),Cw=wn(Tw,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Pm=gt(Tw,Cw,"*"),Aw=wn(/[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=wn(Aw,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Hi=gt(Aw,Cf,"*"),sf=gt(/[A-Z]/,Cf,"*"),B4=["attached","autoclosure",gt(/convention\(/,wn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",gt(/objc\(/,Hi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],U4=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function $4(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,wn(...D4,...tE)],className:{2:"keyword"}},o={match:gt(/\./,wn(...Fm)),relevance:0},c=Fm.filter(Xe=>typeof Xe=="string").concat(["_|0"]),f=Fm.filter(Xe=>typeof Xe!="string").concat(L4).map(Ig),d={variants:[{className:"keyword",match:wn(...f,...tE)}]},h={$pattern:wn(/\b\w+/,/#\w+/),keyword:c.concat(z4),literal:nE},y=[s,o,d],g={match:gt(/\./,wn(...iE)),relevance:0},x={className:"built_in",match:gt(/\b/,wn(...iE),/(?=\()/)},v=[g,x],S={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:Pm},{match:`\\.(\\.|${Cw})+`}]},N=[S,w],_="([0-9]_*)+",R="([0-9a-fA-F]_*)+",A={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${R})(\\.(${R}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},D=(Xe="")=>({className:"subst",variants:[{match:gt(/\\/,Xe,/[0\\tnr"']/)},{match:gt(/\\/,Xe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),F=(Xe="")=>({className:"subst",match:gt(/\\/,Xe,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(Xe="")=>({className:"subst",label:"interpol",begin:gt(/\\/,Xe,/\(/),end:/\)/}),H=(Xe="")=>({begin:gt(Xe,/"""/),end:gt(/"""/,Xe),contains:[D(Xe),F(Xe),M(Xe)]}),U=(Xe="")=>({begin:gt(Xe,/"/),end:gt(/"/,Xe),contains:[D(Xe),M(Xe)]}),J={className:"string",variants:[H(),H("#"),H("##"),H("###"),U(),U("#"),U("##"),U("###")]},C=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],P={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:C},Y=Xe=>{const _i=gt(Xe,/\//),li=gt(/\//,Xe);return{begin:_i,end:li,contains:[...C,{scope:"comment",begin:`#(?!.*${li})`,end:/$/}]}},le={scope:"regexp",variants:[Y("###"),Y("##"),Y("#"),P]},q={match:gt(/`/,Hi,/`/)},Q={className:"variable",match:/\$\d+/},K={className:"variable",match:`\\$${Cf}+`},oe=[q,Q,K],Z={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:U4,contains:[...N,A,J]}]}},pe={scope:"keyword",match:gt(/@/,wn(...B4),Zo(wn(/\(/,/\s+/)))},O={scope:"meta",match:gt(/@/,Hi)},L=[Z,pe,O],te={match:Zo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:gt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Cf,"+")},{className:"type",match:sf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:gt(/\s+&\s+/,Zo(sf)),relevance:0}]},T={begin:/</,end:/>/,keywords:h,contains:[...a,...y,...L,S,te]};te.contains.push(T);const he={match:gt(Hi,/\s*:/),keywords:"_|0",relevance:0},Ne={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",he,...a,le,...y,...v,...N,A,J,...oe,...L,te]},ve={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,te]},Fe={begin:wn(Zo(gt(Hi,/\s*:/)),Zo(gt(Hi,/\s+/,Hi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Hi}]},st={begin:/\(/,end:/\)/,keywords:h,contains:[Fe,...a,...y,...N,A,J,...L,te,Ne],endsParent:!0,illegal:/["']/},it={match:[/(func|macro)/,/\s+/,wn(q.match,Hi,Pm)],className:{1:"keyword",3:"title.function"},contains:[ve,st,t],illegal:[/\[/,/%/]},Zt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ve,st,t],illegal:/\[|%/},Kn={match:[/operator/,/\s+/,Pm],className:{1:"keyword",3:"title"}},Ji={begin:[/precedencegroup/,/\s+/,sf],className:{1:"keyword",3:"title"},contains:[te],keywords:[...I4,...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 J.variants){const _i=Xe.contains.find(zi=>zi.label==="interpol");_i.keywords=h;const li=[...y,...v,...N,A,J,...oe];_i.contains=[...li,{begin:/\(/,end:/\)/,contains:["self",...li]}]}return{name:"Swift",keywords:h,contains:[...a,it,Zt,Ra,Gn,Ii,Kn,Ji,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},le,...y,...v,...N,A,J,...oe,...L,te,Ne]}}const Af="[A-Za-z$_][0-9A-Za-z$_]*",Ow=["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"],Rw=["true","false","null","undefined","NaN","Infinity"],Mw=["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"],jw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Dw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Lw=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Iw=[].concat(Dw,Mw,jw);function F4(e){const t=e.regex,n=(Z,{after:pe})=>{const O="</"+Z[0].slice(1);return Z.input.indexOf(O,pe)!==-1},a=Af,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,pe)=>{const O=Z[0].length+Z.index,L=Z.input[O];if(L==="<"||L===","){pe.ignoreMatch();return}L===">"&&(n(Z,{after:O})||pe.ignoreMatch());let te;const T=Z.input.substring(O);if(te=T.match(/^\s*=/)){pe.ignoreMatch();return}if((te=T.match(/^\s+extends\s+/))&&te.index===0){pe.ignoreMatch();return}}},f={$pattern:Af,keyword:Ow,literal:Rw,built_in:Iw,"variable.language":Lw},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"}},w={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,w,N,{match:/\$\d+/},g];x.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const D=[].concat(R,x.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},H={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Mw,...jw]}},J={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Y(Z){return t.concat("(?!",Z.join("|"),")")}const le={match:t.concat(/\b/,Y([...Dw,"super","import"].map(Z=>`${Z}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},q={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},K="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(K)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),J,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,N,R,{match:/\$\d+/},g,U,{scope:"attr",match:a+t.lookahead(":"),relevance:0},oe,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin: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:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},q,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},le,P,H,Q,{match:/\$[(.]/}]}}function P4(e){const t=e.regex,n=F4(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:Ow.concat(d),literal:Rw,built_in:Iw.concat(s),"variable.language":Lw},y={className:"meta",begin:"@"+a},g=(w,N,_)=>{const R=w.contains.findIndex(A=>A.label===N);if(R===-1)throw new Error("can not find mode to replace");w.contains.splice(R,1,_)};Object.assign(n.keywords,h),n.exports.PARAMS_CONTAINS.push(y);const x=n.contains.find(w=>w.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(w=>w.label==="func.def");return S.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function q4(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 H4(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 K4(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 G4(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},w={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,w,o,c],_=[...N];return _.pop(),_.push(f),v.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:N}}const Q4={arduino:Cz,bash:Az,c:Oz,cpp:Rz,csharp:Mz,css:Fz,diff:Pz,go:qz,graphql:Hz,ini:Kz,java:Gz,javascript:Zz,json:Wz,kotlin:e4,less:o4,lua:c4,makefile:u4,markdown:f4,objectivec:d4,perl:h4,php:m4,"php-template":p4,plaintext:g4,python:b4,"python-repl":y4,r:x4,ruby:v4,rust:E4,scss:O4,shell:R4,sql:M4,swift:$4,typescript:P4,vbnet:q4,wasm:H4,xml:K4,yaml:G4};var qm,aE;function Y4(){if(aE)return qm;aE=1;function e(B){return B instanceof Map?B.clear=B.delete=B.set=function(){throw new Error("map is read-only")}:B instanceof Set&&(B.add=B.clear=B.delete=function(){throw new Error("set is read-only")}),Object.freeze(B),Object.getOwnPropertyNames(B).forEach(ae=>{const me=B[ae],je=typeof me;(je==="object"||je==="function")&&!Object.isFrozen(me)&&e(me)}),B}class t{constructor(ae){ae.data===void 0&&(ae.data={}),this.data=ae.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(B){return B.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(B,...ae){const me=Object.create(null);for(const je in B)me[je]=B[je];return ae.forEach(function(je){for(const wt in je)me[wt]=je[wt]}),me}const s="</span>",o=B=>!!B.scope,c=(B,{prefix:ae})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const me=B.split(".");return[`${ae}${me.shift()}`,...me.map((je,wt)=>`${je}${"_".repeat(wt+1)}`)].join(" ")}return`${ae}${B}`};class f{constructor(ae,me){this.buffer="",this.classPrefix=me.classPrefix,ae.walk(this)}addText(ae){this.buffer+=n(ae)}openNode(ae){if(!o(ae))return;const me=c(ae.scope,{prefix:this.classPrefix});this.span(me)}closeNode(ae){o(ae)&&(this.buffer+=s)}value(){return this.buffer}span(ae){this.buffer+=`<span class="${ae}">`}}const d=(B={})=>{const ae={children:[]};return Object.assign(ae,B),ae};class h{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ae){this.top.children.push(ae)}openNode(ae){const me=d({scope:ae});this.add(me),this.stack.push(me)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ae){return this.constructor._walk(ae,this.rootNode)}static _walk(ae,me){return typeof me=="string"?ae.addText(me):me.children&&(ae.openNode(me),me.children.forEach(je=>this._walk(ae,je)),ae.closeNode(me)),ae}static _collapse(ae){typeof ae!="string"&&ae.children&&(ae.children.every(me=>typeof me=="string")?ae.children=[ae.children.join("")]:ae.children.forEach(me=>{h._collapse(me)}))}}class y extends h{constructor(ae){super(),this.options=ae}addText(ae){ae!==""&&this.add(ae)}startScope(ae){this.openNode(ae)}endScope(){this.closeNode()}__addSublanguage(ae,me){const je=ae.root;me&&(je.scope=`language:${me}`),this.add(je)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(B){return B?typeof B=="string"?B:B.source:null}function x(B){return w("(?=",B,")")}function v(B){return w("(?:",B,")*")}function S(B){return w("(?:",B,")?")}function w(...B){return B.map(me=>g(me)).join("")}function N(B){const ae=B[B.length-1];return typeof ae=="object"&&ae.constructor===Object?(B.splice(B.length-1,1),ae):{}}function _(...B){return"("+(N(B).capture?"":"?:")+B.map(je=>g(je)).join("|")+")"}function R(B){return new RegExp(B.toString()+"|").exec("").length-1}function A(B,ae){const me=B&&B.exec(ae);return me&&me.index===0}const D=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function F(B,{joinWith:ae}){let me=0;return B.map(je=>{me+=1;const wt=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])+wt):(xe+=be[0],be[0]==="("&&me++)}return xe}).map(je=>`(${je})`).join(ae)}const M=/\b\B/,H="[a-zA-Z]\\w*",U="[a-zA-Z_]\\w*",J="\\b\\d+(\\.\\d+)?",C="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",Y="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",le=(B={})=>{const ae=/^#![ ]*\//;return B.binary&&(B.begin=w(ae,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:ae,end:/$/,relevance:0,"on:begin":(me,je)=>{me.index!==0&&je.ignoreMatch()}},B)},q={begin:"\\\\[\\s\\S]",relevance:0},Q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[q]},K={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[q]},oe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Z=function(B,ae,me={}){const je=a({scope:"comment",begin:B,end:ae,contains:[]},me);je.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const wt=_("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:w(/[ ]+/,"(",wt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),je},pe=Z("//","$"),O=Z("/\\*","\\*/"),L=Z("#","$"),te={scope:"number",begin:J,relevance:0},T={scope:"number",begin:C,relevance:0},he={scope:"number",begin:P,relevance:0},Ne={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[q,{begin:/\[/,end:/\]/,relevance:0,contains:[q]}]},ve={scope:"title",begin:H,relevance:0},Fe={scope:"title",begin:U,relevance:0},st={begin:"\\.\\s*"+U,relevance:0};var Zt=Object.freeze({__proto__:null,APOS_STRING_MODE:Q,BACKSLASH_ESCAPE:q,BINARY_NUMBER_MODE:he,BINARY_NUMBER_RE:P,COMMENT:Z,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:pe,C_NUMBER_MODE:T,C_NUMBER_RE:C,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(ae,me)=>{me.data._beginMatch=ae[1]},"on:end":(ae,me)=>{me.data._beginMatch!==ae[1]&&me.ignoreMatch()}})},HASH_COMMENT_MODE:L,IDENT_RE:H,MATCH_NOTHING_RE:M,METHOD_GUARD:st,NUMBER_MODE:te,NUMBER_RE:J,PHRASAL_WORDS_MODE:oe,QUOTE_STRING_MODE:K,REGEXP_MODE:Ne,RE_STARTERS_RE:Y,SHEBANG:le,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:U,UNDERSCORE_TITLE_MODE:Fe});function Kn(B,ae){B.input[B.index-1]==="."&&ae.ignoreMatch()}function Ji(B,ae){B.className!==void 0&&(B.scope=B.className,delete B.className)}function Ra(B,ae){ae&&B.beginKeywords&&(B.begin="\\b("+B.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",B.__beforeBegin=Kn,B.keywords=B.keywords||B.beginKeywords,delete B.beginKeywords,B.relevance===void 0&&(B.relevance=0))}function Gn(B,ae){Array.isArray(B.illegal)&&(B.illegal=_(...B.illegal))}function Ii(B,ae){if(B.match){if(B.begin||B.end)throw new Error("begin & end are not supported with match");B.begin=B.match,delete B.match}}function Xe(B,ae){B.relevance===void 0&&(B.relevance=1)}const _i=(B,ae)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const me=Object.assign({},B);Object.keys(B).forEach(je=>{delete B[je]}),B.keywords=me.keywords,B.begin=w(me.beforeMatch,x(me.begin)),B.starts={relevance:0,contains:[Object.assign(me,{endsParent:!0})]},B.relevance=0,delete me.beforeMatch},li=["of","and","for","in","not","or","if","then","parent","list","value"],zi="keyword";function ea(B,ae,me=zi){const je=Object.create(null);return typeof B=="string"?wt(me,B.split(" ")):Array.isArray(B)?wt(me,B):Object.keys(B).forEach(function(bt){Object.assign(je,ea(B[bt],ae,bt))}),je;function wt(bt,xe){ae&&(xe=xe.map(be=>be.toLowerCase())),xe.forEach(function(be){const Me=be.split("|");je[Me[0]]=[bt,kr(Me[0],Me[1])]})}}function kr(B,ae){return ae?Number(ae):Yl(B)?0:1}function Yl(B){return li.includes(B.toLowerCase())}const ys={},Ot=B=>{console.error(B)},xs=(B,...ae)=>{console.log(`WARN: ${B}`,...ae)},ne=(B,ae)=>{ys[`${B}/${ae}`]||(console.log(`Deprecated as of ${B}. ${ae}`),ys[`${B}/${ae}`]=!0)},fe=new Error;function Ce(B,ae,{key:me}){let je=0;const wt=B[me],bt={},xe={};for(let be=1;be<=ae.length;be++)xe[be+je]=wt[be],bt[be+je]=!0,je+=R(ae[be-1]);B[me]=xe,B[me]._emit=bt,B[me]._multi=!0}function Pe(B){if(Array.isArray(B.begin)){if(B.skip||B.excludeBegin||B.returnBegin)throw Ot("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),fe;if(typeof B.beginScope!="object"||B.beginScope===null)throw Ot("beginScope must be object"),fe;Ce(B,B.begin,{key:"beginScope"}),B.begin=F(B.begin,{joinWith:""})}}function et(B){if(Array.isArray(B.end)){if(B.skip||B.excludeEnd||B.returnEnd)throw Ot("skip, excludeEnd, returnEnd not compatible with endScope: {}"),fe;if(typeof B.endScope!="object"||B.endScope===null)throw Ot("endScope must be object"),fe;Ce(B,B.end,{key:"endScope"}),B.end=F(B.end,{joinWith:""})}}function yn(B){B.scope&&typeof B.scope=="object"&&B.scope!==null&&(B.beginScope=B.scope,delete B.scope)}function Ni(B){yn(B),typeof B.beginScope=="string"&&(B.beginScope={_wrap:B.beginScope}),typeof B.endScope=="string"&&(B.endScope={_wrap:B.endScope}),Pe(B),et(B)}function an(B){function ae(xe,be){return new RegExp(g(xe),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(be?"g":""))}class me{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(be,Me){Me.position=this.position++,this.matchIndexes[this.matchAt]=Me,this.regexes.push([Me,be]),this.matchAt+=R(be)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const be=this.regexes.map(Me=>Me[1]);this.matcherRe=ae(F(be,{joinWith:"|"}),!0),this.lastIndex=0}exec(be){this.matcherRe.lastIndex=this.lastIndex;const Me=this.matcherRe.exec(be);if(!Me)return null;const Ut=Me.findIndex((ta,Es)=>Es>0&&ta!==void 0),kt=this.matchIndexes[Ut];return Me.splice(0,Ut),Object.assign(Me,kt)}}class je{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(be){if(this.multiRegexes[be])return this.multiRegexes[be];const Me=new me;return this.rules.slice(be).forEach(([Ut,kt])=>Me.addRule(Ut,kt)),Me.compile(),this.multiRegexes[be]=Me,Me}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(be,Me){this.rules.push([be,Me]),Me.type==="begin"&&this.count++}exec(be){const Me=this.getMatcher(this.regexIndex);Me.lastIndex=this.lastIndex;let Ut=Me.exec(be);if(this.resumingScanAtSamePosition()&&!(Ut&&Ut.index===this.lastIndex)){const kt=this.getMatcher(0);kt.lastIndex=this.lastIndex+1,Ut=kt.exec(be)}return Ut&&(this.regexIndex+=Ut.position+1,this.regexIndex===this.count&&this.considerAll()),Ut}}function wt(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,_i].forEach(kt=>kt(xe,be)),B.compilerExtensions.forEach(kt=>kt(xe,be)),xe.__beforeBegin=null,[Ra,Gn,Xe].forEach(kt=>kt(xe,be)),xe.isCompiled=!0;let Ut=null;return typeof xe.keywords=="object"&&xe.keywords.$pattern&&(xe.keywords=Object.assign({},xe.keywords),Ut=xe.keywords.$pattern,delete xe.keywords.$pattern),Ut=Ut||/\w+/,xe.keywords&&(xe.keywords=ea(xe.keywords,B.case_insensitive)),Me.keywordPatternRe=ae(Ut,!0),be&&(xe.begin||(xe.begin=/\B|\b/),Me.beginRe=ae(Me.begin),!xe.end&&!xe.endsWithParent&&(xe.end=/\B|\b/),xe.end&&(Me.endRe=ae(Me.end)),Me.terminatorEnd=g(Me.end)||"",xe.endsWithParent&&be.terminatorEnd&&(Me.terminatorEnd+=(xe.end?"|":"")+be.terminatorEnd)),xe.illegal&&(Me.illegalRe=ae(xe.illegal)),xe.contains||(xe.contains=[]),xe.contains=[].concat(...xe.contains.map(function(kt){return un(kt==="self"?xe:kt)})),xe.contains.forEach(function(kt){bt(kt,Me)}),xe.starts&&bt(xe.starts,be),Me.matcher=wt(Me),Me}if(B.compilerExtensions||(B.compilerExtensions=[]),B.contains&&B.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return B.classNameAliases=a(B.classNameAliases||{}),bt(B)}function Dt(B){return B?B.endsWithParent||Dt(B.starts):!1}function un(B){return B.variants&&!B.cachedVariants&&(B.cachedVariants=B.variants.map(function(ae){return a(B,{variants:null},ae)})),B.cachedVariants?B.cachedVariants:Dt(B)?a(B,{starts:B.starts?a(B.starts):null}):Object.isFrozen(B)?a(B):B}var lt="11.11.1";class Bi extends Error{constructor(ae,me){super(ae),this.name="HTMLInjectionError",this.html=me}}const xn=n,kc=a,Tr=Symbol("nomatch"),vs=7,Cr=function(B){const ae=Object.create(null),me=Object.create(null),je=[];let wt=!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 we=ce.className+" ";we+=ce.parentNode?ce.parentNode.className:"";const qe=be.languageDetectRe.exec(we);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 we.split(/\s+/).find(ot=>Me(ot)||vn(ot))}function kt(ce,we,qe){let ot="",Ft="";typeof we=="object"?(ot=ce,qe=we.ignoreIllegals,Ft=we.language):(ne("10.7.0","highlight(lang, code, ...args) has been deprecated."),ne("10.7.0",`Please use highlight(code, options) instead.
513
513
  https://github.com/highlightjs/highlight.js/issues/2277`),Ft=ce,ot=we),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,we,qe,ot){const Ft=Object.create(null);function dn(de,Ee){return de.keywords[Ee]}function Qn(){if(!Re.keywords){Kt.addText(ct);return}let de=0;Re.keywordPatternRe.lastIndex=0;let Ee=Re.keywordPatternRe.exec(ct),Ie="";for(;Ee;){Ie+=ct.substring(de,Ee.index);const Qe=rn.case_insensitive?Ee[0].toLowerCase():Ee[0],Rt=dn(Re,Qe);if(Rt){const[oi,eo]=Rt;if(Kt.addText(Ie),Ie="",Ft[Qe]=(Ft[Qe]||0)+1,Ft[Qe]<=vs&&(La+=eo),oi.startsWith("_"))Ie+=Ee[0];else{const jc=rn.classNameAliases[oi]||oi;Yn(Ee[0],jc)}}else Ie+=Ee[0];de=Re.keywordPatternRe.lastIndex,Ee=Re.keywordPatternRe.exec(ct)}Ie+=ct.substring(de),Kt.addText(Ie)}function An(){if(ct==="")return;let de=null;if(typeof Re.subLanguage=="string"){if(!ae[Re.subLanguage]){Kt.addText(ct);return}de=ta(Re.subLanguage,ct,!0,Mc[Re.subLanguage]),Mc[Re.subLanguage]=de._top}else de=Ss(ct,Re.subLanguage.length?Re.subLanguage:null);Re.relevance>0&&(La+=de.relevance),Kt.__addSublanguage(de._emitter,de.language)}function Et(){Re.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 _s(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="")),Re=Object.create(de,{parent:{value:Re}}),Re}function Zl(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 Zl(de.parent,Ee,Ie)}function Ns(de){return Re.matcher.regexIndex===0?(ct+=de[0],1):(Ia=!0,0)}function id(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)),_s(Ie,de),Ie.returnBegin?0:Ee.length}function On(de){const Ee=de[0],Ie=we.substring(de.index),Qe=Zl(Re,de,Ie);if(!Qe)return Tr;const Rt=Re;Re.endScope&&Re.endScope._wrap?(Et(),Yn(Ee,Re.endScope._wrap)):Re.endScope&&Re.endScope._multi?(Et(),Oc(Re.endScope,de)):Rt.skip?ct+=Ee:(Rt.returnEnd||Rt.excludeEnd||(ct+=Ee),Et(),Rt.excludeEnd&&(ct=Ee));do Re.scope&&Kt.closeNode(),!Re.skip&&!Re.subLanguage&&(La+=Re.relevance),Re=Re.parent;while(Re!==Qe.parent);return Qe.starts&&_s(Qe.starts,de),Rt.returnEnd?0:Ee.length}function Wl(){const de=[];for(let Ee=Re;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+=we.slice(Ee.index,Ee.index+1),!wt){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 id(Ee);if(Ee.type==="illegal"&&!qe){const Qe=new Error('Illegal lexeme "'+Ie+'" for mode "'+(Re.scope||"<unnamed>")+'"');throw Qe.mode=Re,Qe}else if(Ee.type==="end"){const Qe=On(Ee);if(Qe!==Tr)return Qe}if(Ee.type==="illegal"&&Ie==="")return ct+=`
514
- `,1;if(Jl>1e5&&Jl>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="",Re=ot||Rc;const Mc={},Kt=new be.__emitter(be);Wl();let ct="",La=0,aa=0,Jl=0,Ia=!1;try{if(rn.__emitTokens)rn.__emitTokens(we,Kt);else{for(Re.matcher.considerAll();;){Jl++,Ia?Ia=!1:Re.matcher.considerAll(),Re.matcher.lastIndex=aa;const de=Re.matcher.exec(we);if(!de)break;const Ee=we.substring(aa,de.index),Ie=ks(Ee,de);aa=de.index+Ie}ks(we.substring(aa))}return Kt.finalize(),Ts=Kt.toHTML(),{language:ce,value:Ts,relevance:La,illegal:!1,_emitter:Kt,_top:Re}}catch(de){if(de.message&&de.message.includes("Illegal"))return{language:ce,value:xn(we),illegal:!0,relevance:0,_illegalBy:{message:de.message,index:aa,context:we.slice(aa-100,aa+100),mode:de.mode,resultSoFar:Ts},_emitter:Kt};if(wt)return{language:ce,value:xn(we),illegal:!1,relevance:0,errorRaised:de,_emitter:Kt,_top:Re};throw de}}function Es(ce){const we={value:xn(ce),illegal:!1,relevance:0,_top:xe,_emitter:new be.__emitter(be)};return we._emitter.addText(ce),we}function Ss(ce,we){we=we||be.languages||Object.keys(ae);const qe=Es(ce),ot=we.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,we,qe){const ot=we&&me[we]||qe;ce.classList.add("hljs"),ce.classList.add(`language-${ot}`)}function $t(ce){let we=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);we=ce;const ot=we.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=()=>{ws(),ne("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Vl(){ws(),ne("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Tc=!1;function ws(){function ce(){ws()}if(document.readyState==="loading"){Tc||window.addEventListener("DOMContentLoaded",ce,!1),Tc=!0;return}document.querySelectorAll(be.cssSelector).forEach($t)}function Cc(ce,we){let qe=null;try{qe=we(B)}catch(ot){if(Ot("Language definition for '{}' could not be registered.".replace("{}",ce)),wt)Ot(ot);else throw ot;qe=xe}qe.name||(qe.name=ce),ae[ce]=qe,qe.rawDefinition=we.bind(null,B),qe.aliases&&na(qe.aliases,{languageName:ce})}function Ar(ce){delete ae[ce];for(const we of Object.keys(me))me[we]===ce&&delete me[we]}function Xl(){return Object.keys(ae)}function vn(ce){return ce=(ce||"").toLowerCase(),ae[ce]||ae[me[ce]]}function na(ce,{languageName:we}){typeof ce=="string"&&(ce=[ce]),ce.forEach(qe=>{me[qe.toLowerCase()]=we})}function ja(ce){const we=vn(ce);return we&&!we.disableAutodetect}function Da(ce){ce["before:highlightBlock"]&&!ce["before:highlightElement"]&&(ce["before:highlightElement"]=we=>{ce["before:highlightBlock"](Object.assign({block:we.el},we))}),ce["after:highlightBlock"]&&!ce["after:highlightElement"]&&(ce["after:highlightElement"]=we=>{ce["after:highlightBlock"](Object.assign({block:we.el},we))})}function Ht(ce){Da(ce),je.push(ce)}function Ac(ce){const we=je.indexOf(ce);we!==-1&&je.splice(we,1)}function Or(ce,we){const qe=ce;je.forEach(function(ot){ot[qe]&&ot[qe](we)})}function ia(ce){return ne("10.7.0","highlightBlock will be removed entirely in v12.0"),ne("10.7.0","Please use highlightElement now."),$t(ce)}Object.assign(B,{highlight:kt,highlightAuto:Ss,highlightAll:ws,highlightElement:$t,highlightBlock:ia,configure:fn,initHighlighting:Ma,initHighlightingOnLoad:Vl,registerLanguage:Cc,unregisterLanguage:Ar,listLanguages:Xl,getLanguage:vn,registerAliases:na,autoDetection:ja,inherit:kc,addPlugin:Ht,removePlugin:Ac}),B.debugMode=function(){wt=!1},B.safeMode=function(){wt=!0},B.versionString=lt,B.regex={concat:w,lookahead:x,either:_,optional:S,anyNumberOfTimes:v};for(const ce in Wt)typeof Wt[ce]=="object"&&e(Wt[ce]);return Object.assign(B,Wt),B},Cn=Cr({});return Cn.newInstance=()=>Cr({}),qm=Cn,Cn.HighlightJS=Cn,Cn.default=Cn,qm}var Y4=Q4();const V4=Cp(Y4),rE={},X4="hljs-";function Z4(e){const t=V4.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:X4;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:W4,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,w=S.data;return w.language=v.language,w.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 w=g[x];if(!t.getLanguage(w))continue;const N=n(w,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 W4{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 J4={};function zg(e){const t=e||J4,n=t.aliases,a=t.detect||!1,s=t.languages||G4,o=t.plainText,c=t.prefix,f=t.subset;let d="hljs";const h=Z4(s);if(n&&h.registerAlias(n),c){const y=c.indexOf("-");d=y===-1?c:c.slice(0,y)}return function(y,g){nd(y,"element",function(x,v,S){if(x.tagName!=="code"||!S||S.type!=="element"||S.tagName!=="pre")return;const w=eB(x);if(w===!1||!w&&!a||w&&o&&o.includes(w))return;Array.isArray(x.properties.className)||(x.properties.className=[]),x.properties.className.includes(d)||x.properties.className.unshift(d);const N=xz(x,{whitespace:"pre"});let _;try{_=w?h.highlight(w,N,{prefix:c}):h.highlightAuto(N,{prefix:c,subset:f})}catch(R){const A=R;if(w&&/Unknown language/.test(A.message)){g.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[S,x],cause:A,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw A}!w&&_.data&&_.data.language&&x.properties.className.push("language-"+_.data.language),_.children.length>0&&(x.children=_.children)})}}function eB(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 tB({name:e,projects:t,onClose:n,onChange:a}){const{confirm:s}=qn(),{data:o,isLoading:c,isError:f,error:d,refetch:h}=dt({queryKey:["skill",e],queryFn:()=>qO(e)});j.useEffect(()=>{const w=N=>{N.key==="Escape"&&n()};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[n]);const y=async w=>{await KO(e,w),h(),a()},g=async w=>{await s({title:`从 ${w} 移除 ${e}`,body:"skill 链接会被解除,项目后续运行时将无法使用该 skill。",confirm:"移除",danger:!0})&&(await GO(e,w),h(),a())},x=async w=>{await QO(e,w),h(),a()},v=async w=>{await s({title:`解冻 ${e} @ ${w}`,body:"本地对这个 skill 的改动会被覆盖,回到最新共享版本。",confirm:"解冻",danger:!0})&&(await YO(e,w),h(),a())},S=new Map(((o==null?void 0:o.linkedProjects)??[]).map(w=>[w.project,w.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",children:m.jsxs("div",{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(w=>{const N=S.get(w);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:w}),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(w),type:"button",children:[m.jsx(cA,{size:11})," link"]}),N==="linked"&&m.jsxs(m.Fragment,{children:[m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(w),type:"button",children:[m.jsx(OA,{size:11})," freeze"]}),m.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>g(w),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(w),type:"button",children:[m.jsx(qC,{size:11})," unfreeze"]}),m.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>g(w),type:"button",children:"unlink"})]})]})]},w)}),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(w=>m.jsx(nB,{skillName:e,file:w.name,lines:w.lines},w.name))})]})]})]})})}function nB({skillName:e,file:t,lines:n}){const[a,s]=j.useState(!1),{data:o,isLoading:c,isError:f,error:d}=dt({queryKey:["skill-ref",e,t],queryFn:()=>HO(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(Kp,{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 iB=[{value:"all",label:"全部"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],aB={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function rB(){var x;const[e,t]=j.useState("all"),[n,a]=j.useState(""),[s,o]=j.useState(null),c=Tn(),{data:f,isLoading:d}=dt({queryKey:["skills"],queryFn:()=>fg()}),h=dt({queryKey:["projects"],queryFn:Bl}),y=j.useMemo(()=>((f==null?void 0:f.data)??[]).filter(S=>!(e!=="all"&&S.category!==e||n&&!S.name.toLowerCase().includes(n.toLowerCase()))),[f,e,n]),g=j.useMemo(()=>{const v=(f==null?void 0:f.data)??[],S={all:v.length};for(const w of v)S[w.category]=(S[w.category]??0)+1;return S},[f]);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",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 VO(),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:iB.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 gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:y.map(v=>{var S;return m.jsx(sB,{skill:v,projectCount:((S=h.data)==null?void 0:S.data.length)??0,onOpen:()=>o(v.name)},v.name)})}),s&&m.jsx(tB,{name:s,projects:((x=h.data)==null?void 0:x.data.map(v=>v.name))??[],onClose:()=>o(null),onChange:()=>c.invalidateQueries({queryKey:["skills"]})})]})}function sB({skill:e,projectCount:t,onOpen:n}){const a=aB[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 lB(){var o;const e=dt({queryKey:["system-info"],queryFn:s1}),t=dt({queryKey:["system-env"],queryFn:QA}),n=dt({queryKey:["doctor"],queryFn:YA}),[a,s]=j.useState(!1);return m.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[m.jsx("header",{children:m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),m.jsx(oB,{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:uB(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(Gp,{size:12,strokeWidth:2.5})," 编辑"]})]}),a?m.jsx(cB,{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(jC,{size:16,className:"text-[var(--color-running)]",strokeWidth:2.5}):m.jsx(qp,{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 oB({current:e}){const{confirm:t,alert:n}=qn(),[a,s]=j.useState(!1),[o,c]=j.useState(null),f=dt({queryKey:["latest-version"],queryFn:ZA,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 WA();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 cB({onClose:e}){const t=Tn(),{alert:n}=qn(),a=dt({queryKey:["system-env-raw"],queryFn:VA}),[s,o]=j.useState(null),[c,f]=j.useState(null);j.useEffect(()=>{a.data&&s===null&&(o(a.data.content),f(a.data.etag))},[a.data,s]);const d=s!==null&&a.data&&s!==a.data.content,h=Pn({mutationFn:()=>{if(s===null)throw new Error("no draft");return XA(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(zf,{size:12,strokeWidth:3}),"保存"]})]})]})]})}function uB(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 fB(){return Bt("/api/chat/sessions")}function dB(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 hB(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function mB(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 pB(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 gB(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return Bt(`/api/chat/sessions/${e}/messages${n}`)}function lE(){var R,A,D,F,M,H;const{sessionId:e}=qE(),t=wr(),n=Tn(),{confirm:a,alert:s}=qn(),o=dt({queryKey:["chat-sessions"],queryFn:fB}),c=dt({queryKey:["chat-session",e],queryFn:()=>dB(e??""),enabled:!!e}),[f,d]=j.useState(null),[h,y]=j.useState(""),[g,x]=j.useState(!1),v=j.useRef(null);j.useEffect(()=>{if(!e)return;const U=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let J=!0;return U.addEventListener("open",()=>{if(J){J=!1;return}const C=n.getQueryData(["chat-session",e]),P=C!=null&&C.messages.length?C.messages[C.messages.length-1].ts:void 0;gB(e,P).then(Y=>{Y.data.length!==0&&n.setQueryData(["chat-session",e],le=>{if(!le)return le;const q=new Set(le.messages.map(K=>K.id)),Q=Y.data.filter(K=>!q.has(K.id));return Q.length===0?le:{...le,messages:[...le.messages,...Q],lastMessageAt:Q[Q.length-1].ts,messageCount:le.messageCount+Q.length}})}).catch(()=>{})}),U.addEventListener("chat.message",C=>{try{const P=JSON.parse(C.data);n.setQueryData(["chat-session",e],Y=>{if(!Y||Y.messages.some(Q=>Q.id===P.message.id))return Y;const q=Y.messages.findIndex(Q=>Q.role==="user"&&Q.id.startsWith("optim-")&&Q.content===P.message.content);if(q>=0){const Q=[...Y.messages];return Q[q]=P.message,{...Y,messages:Q}}return{...Y,messages:[...Y.messages,P.message]}})}catch{}}),U.addEventListener("chat.message.pending",C=>{try{const P=JSON.parse(C.data);d({id:P.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),U.addEventListener("chat.message.chunk.text",C=>{try{const P=JSON.parse(C.data);d(Y=>{if(!Y||Y.id!==P.assistantId)return Y;const le=[...Y.blocks],q=le[le.length-1];return q&&q.type==="text"?le[le.length-1]={...q,target:q.target+P.text}:le.push({type:"text",target:P.text,displayed:""}),{...Y,blocks:le}})}catch{}}),U.addEventListener("chat.message.chunk.tool_use",C=>{try{const P=JSON.parse(C.data);d(Y=>!Y||Y.id!==P.assistantId?Y:{...Y,blocks:[...Y.blocks,{type:"tool_use",id:P.id,title:P.title,kind:P.kind,status:P.status}]})}catch{}}),U.addEventListener("chat.message.chunk.tool_update",C=>{try{const P=JSON.parse(C.data);d(Y=>!Y||Y.id!==P.assistantId?Y:{...Y,blocks:Y.blocks.map(le=>le.type==="tool_use"&&le.id===P.id?{...le,status:P.status}:le)})}catch{}}),U.addEventListener("chat.message.complete",C=>{try{const P=JSON.parse(C.data);d(Y=>Y&&Y.id===P.assistantId?{...Y,done:!0,finalMessage:P.message}:Y)}catch{}}),()=>U.close()},[e,n]),j.useEffect(()=>{if(!f)return;const U=f.blocks.reduce((C,P)=>P.type==="text"?C+(P.target.length-P.displayed.length):C,0);if(U<=0){if(f.done&&f.finalMessage){const C=f.finalMessage;n.setQueryData(["chat-session",e],P=>!P||P.messages.some(Y=>Y.id===C.id)?P:{...P,messages:[...P.messages,C],lastMessageAt:C.ts,messageCount:P.messageCount+1}),n.invalidateQueries({queryKey:["chat-sessions"]}),d(null),x(!1)}return}const J=setTimeout(()=>{d(C=>{if(!C)return C;let P=Math.max(1,Math.ceil(U/40));const Y=C.blocks.map(le=>{if(le.type!=="text"||P<=0)return le;const q=le.target.length-le.displayed.length;if(q<=0)return le;const Q=Math.min(q,P);return P-=Q,{...le,displayed:le.target.slice(0,le.displayed.length+Q)}});return{...C,blocks:Y}})},25);return()=>clearTimeout(J)},[f,n,e]),j.useEffect(()=>{const U=v.current;U&&(U.scrollTop=U.scrollHeight)},[c.data,f]);const S=j.useCallback(async()=>{const U=await sE();n.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${U.id}`)},[n,t]),w=j.useCallback(async()=>{const U=h.trim();if(!U||g)return;let J=e;if(!J){const P=await sE();n.invalidateQueries({queryKey:["chat-sessions"]}),J=P.id,t(`/chat/${J}`,{replace:!0})}const C={id:`optim-${Date.now()}`,role:"user",content:U,ts:new Date().toISOString(),status:"complete"};n.setQueryData(["chat-session",J],P=>P?{...P,messages:[...P.messages,C],lastMessageAt:C.ts,messageCount:P.messageCount+1}:{id:J,createdAt:C.ts,lastMessageAt:C.ts,title:U.slice(0,60),project:null,messageCount:1,messages:[C]}),y(""),x(!0);try{await mB(J,U)}catch(P){x(!1),console.error("sendMessage failed",P),s({title:"发送失败",body:P instanceof Error?P.message:String(P)})}},[h,g,e,n,t,s]),N=j.useCallback(async U=>{await a({title:"删除对话",body:"对话记录会永久删除,不可恢复。",confirm:"删除",danger:!0})&&(await hB(U),n.invalidateQueries({queryKey:["chat-sessions"]}),e===U&&t("/chat"))},[n,e,t,a]),_=j.useCallback(async()=>{if(e)try{await pB(e)}catch(U){s({title:"中断失败",body:U instanceof Error?U.message:String(U)})}},[e,s]);return m.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[m.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[m.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:S,type:"button",children:[m.jsx(Zi,{size:14,strokeWidth:3}),"新建对话"]}),m.jsxs("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:["历史 ",((R=o.data)==null?void 0:R.data.length)??0]}),m.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((A=o.data)==null?void 0:A.data)??[]).map(U=>m.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",e===U.id?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[m.jsxs("button",{type:"button","aria-label":`打开对话 ${U.title}`,onClick:()=>t(`/chat/${U.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[m.jsx(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:U.title}),m.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[U.messageCount," msg · ",Uw(U.lastMessageAt??U.createdAt)]})]})]}),m.jsx("button",{type:"button","aria-label":"删除对话",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:J=>{J.stopPropagation(),N(U.id)},children:m.jsx(zl,{size:12})})]},U.id)),(((D=o.data)==null?void 0:D.data)??[]).length===0&&m.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:"还没对话。点上面新建。"})]})]}),m.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:e?m.jsxs(m.Fragment,{children:[m.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((F=c.data)==null?void 0:F.title)??"新对话"}),m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:e})]}),m.jsxs("div",{ref:v,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((M=c.data)==null?void 0:M.messages)??[]).map(U=>m.jsx(bB,{msg:U},U.id)),f&&m.jsx(yB,{pending:f}),!c.isLoading&&(((H=c.data)==null?void 0:H.messages)??[]).length===0&&!f&&!g&&m.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行"})]}),m.jsx("div",{className:"border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)]",children:m.jsxs("div",{className:"flex gap-2 items-end",children:[m.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:"说点什么… (Enter 发送,Shift+Enter 换行)",rows:2,value:h,onChange:U=>y(U.target.value),onKeyDown:U=>{U.key==="Enter"&&!U.shiftKey&&!U.nativeEvent.isComposing&&(U.preventDefault(),w())},"aria-label":"消息输入"}),f?m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:_,type:"button","aria-label":"中断生成",children:[m.jsx(i1,{size:14,strokeWidth:3}),"中断"]}):m.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:w,disabled:!h.trim()||g,type:"button","aria-label":"发送",children:[g?m.jsx(Zt,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(NA,{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 bB({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:Uw(e.ts)})]}),m.jsx("div",{className:"flex flex-col gap-2",children:a.map((s,o)=>m.jsx(xB,{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 yB({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(zw,{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(Bw,{tool:n},a)})]})]})})}function xB({block:e}){return e.type==="text"?m.jsx(zw,{text:e.text}):m.jsx(Bw,{tool:e})}function zw({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 Bw({tool:e}){const[t,n]=j.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return m.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[m.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[m.jsx(JE,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),m.jsx(FA,{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(Hp,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),s&&m.jsx(IC,{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 Uw(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 vB(){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 EB(){const[e]=jf();return e.get("project")?m.jsx(kR,{}):m.jsx(OR,{})}function SB(){return m.jsx(p2,{children:m.jsx(BT,{children:m.jsxs(zn,{element:m.jsx(h2,{}),children:[m.jsx(zn,{index:!0,element:m.jsx(LT,{to:"/projects",replace:!0})}),m.jsx(zn,{path:"/projects",element:m.jsx(g2,{})}),m.jsx(zn,{path:"/projects/new",element:m.jsx(N2,{})}),m.jsx(zn,{path:"/projects/:name",element:m.jsx(BO,{})}),m.jsx(zn,{path:"/board",element:m.jsx(ER,{})}),m.jsx(zn,{path:"/workers",element:m.jsx(EB,{})}),m.jsx(zn,{path:"/logs",element:m.jsx(PR,{})}),m.jsx(zn,{path:"/skills",element:m.jsx(rB,{})}),m.jsx(zn,{path:"/system",element:m.jsx(lB,{})}),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(vB,{})})]})})})}m2();const wB=new Nk({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),$w=document.getElementById("root");if(!$w)throw new Error("#root not found");ek.createRoot($w).render(m.jsx(j.StrictMode,{children:m.jsx(kk,{client:wB,children:m.jsx(cC,{children:m.jsx(S2,{children:m.jsx(SB,{})})})})}));
514
+ `,1;if(Jl>1e5&&Jl>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="",Re=ot||Rc;const Mc={},Kt=new be.__emitter(be);Wl();let ct="",La=0,aa=0,Jl=0,Ia=!1;try{if(rn.__emitTokens)rn.__emitTokens(we,Kt);else{for(Re.matcher.considerAll();;){Jl++,Ia?Ia=!1:Re.matcher.considerAll(),Re.matcher.lastIndex=aa;const de=Re.matcher.exec(we);if(!de)break;const Ee=we.substring(aa,de.index),Ie=ks(Ee,de);aa=de.index+Ie}ks(we.substring(aa))}return Kt.finalize(),Ts=Kt.toHTML(),{language:ce,value:Ts,relevance:La,illegal:!1,_emitter:Kt,_top:Re}}catch(de){if(de.message&&de.message.includes("Illegal"))return{language:ce,value:xn(we),illegal:!0,relevance:0,_illegalBy:{message:de.message,index:aa,context:we.slice(aa-100,aa+100),mode:de.mode,resultSoFar:Ts},_emitter:Kt};if(wt)return{language:ce,value:xn(we),illegal:!1,relevance:0,errorRaised:de,_emitter:Kt,_top:Re};throw de}}function Es(ce){const we={value:xn(ce),illegal:!1,relevance:0,_top:xe,_emitter:new be.__emitter(be)};return we._emitter.addText(ce),we}function Ss(ce,we){we=we||be.languages||Object.keys(ae);const qe=Es(ce),ot=we.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,we,qe){const ot=we&&me[we]||qe;ce.classList.add("hljs"),ce.classList.add(`language-${ot}`)}function $t(ce){let we=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);we=ce;const ot=we.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=()=>{ws(),ne("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Vl(){ws(),ne("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Tc=!1;function ws(){function ce(){ws()}if(document.readyState==="loading"){Tc||window.addEventListener("DOMContentLoaded",ce,!1),Tc=!0;return}document.querySelectorAll(be.cssSelector).forEach($t)}function Cc(ce,we){let qe=null;try{qe=we(B)}catch(ot){if(Ot("Language definition for '{}' could not be registered.".replace("{}",ce)),wt)Ot(ot);else throw ot;qe=xe}qe.name||(qe.name=ce),ae[ce]=qe,qe.rawDefinition=we.bind(null,B),qe.aliases&&na(qe.aliases,{languageName:ce})}function Ar(ce){delete ae[ce];for(const we of Object.keys(me))me[we]===ce&&delete me[we]}function Xl(){return Object.keys(ae)}function vn(ce){return ce=(ce||"").toLowerCase(),ae[ce]||ae[me[ce]]}function na(ce,{languageName:we}){typeof ce=="string"&&(ce=[ce]),ce.forEach(qe=>{me[qe.toLowerCase()]=we})}function ja(ce){const we=vn(ce);return we&&!we.disableAutodetect}function Da(ce){ce["before:highlightBlock"]&&!ce["before:highlightElement"]&&(ce["before:highlightElement"]=we=>{ce["before:highlightBlock"](Object.assign({block:we.el},we))}),ce["after:highlightBlock"]&&!ce["after:highlightElement"]&&(ce["after:highlightElement"]=we=>{ce["after:highlightBlock"](Object.assign({block:we.el},we))})}function Ht(ce){Da(ce),je.push(ce)}function Ac(ce){const we=je.indexOf(ce);we!==-1&&je.splice(we,1)}function Or(ce,we){const qe=ce;je.forEach(function(ot){ot[qe]&&ot[qe](we)})}function ia(ce){return ne("10.7.0","highlightBlock will be removed entirely in v12.0"),ne("10.7.0","Please use highlightElement now."),$t(ce)}Object.assign(B,{highlight:kt,highlightAuto:Ss,highlightAll:ws,highlightElement:$t,highlightBlock:ia,configure:fn,initHighlighting:Ma,initHighlightingOnLoad:Vl,registerLanguage:Cc,unregisterLanguage:Ar,listLanguages:Xl,getLanguage:vn,registerAliases:na,autoDetection:ja,inherit:kc,addPlugin:Ht,removePlugin:Ac}),B.debugMode=function(){wt=!1},B.safeMode=function(){wt=!0},B.versionString=lt,B.regex={concat:w,lookahead:x,either:_,optional:S,anyNumberOfTimes:v};for(const ce in Zt)typeof Zt[ce]=="object"&&e(Zt[ce]);return Object.assign(B,Zt),B},Cn=Cr({});return Cn.newInstance=()=>Cr({}),qm=Cn,Cn.HighlightJS=Cn,Cn.default=Cn,qm}var V4=Y4();const X4=Cp(V4),rE={},Z4="hljs-";function W4(e){const t=X4.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:Z4;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:J4,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,w=S.data;return w.language=v.language,w.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 w=g[x];if(!t.getLanguage(w))continue;const N=n(w,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 J4{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 eB={};function zg(e){const t=e||eB,n=t.aliases,a=t.detect||!1,s=t.languages||Q4,o=t.plainText,c=t.prefix,f=t.subset;let d="hljs";const h=W4(s);if(n&&h.registerAlias(n),c){const y=c.indexOf("-");d=y===-1?c:c.slice(0,y)}return function(y,g){nd(y,"element",function(x,v,S){if(x.tagName!=="code"||!S||S.type!=="element"||S.tagName!=="pre")return;const w=tB(x);if(w===!1||!w&&!a||w&&o&&o.includes(w))return;Array.isArray(x.properties.className)||(x.properties.className=[]),x.properties.className.includes(d)||x.properties.className.unshift(d);const N=vz(x,{whitespace:"pre"});let _;try{_=w?h.highlight(w,N,{prefix:c}):h.highlightAuto(N,{prefix:c,subset:f})}catch(R){const A=R;if(w&&/Unknown language/.test(A.message)){g.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[S,x],cause:A,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw A}!w&&_.data&&_.data.language&&x.properties.className.push("language-"+_.data.language),_.children.length>0&&(x.children=_.children)})}}function tB(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 nB({name:e,projects:t,onClose:n,onChange:a}){const{confirm:s}=qn(),{data:o,isLoading:c,isError:f,error:d,refetch:h}=dt({queryKey:["skill",e],queryFn:()=>qO(e)});j.useEffect(()=>{const w=N=>{N.key==="Escape"&&n()};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[n]);const y=async w=>{await KO(e,w),h(),a()},g=async w=>{await s({title:`从 ${w} 移除 ${e}`,body:"skill 链接会被解除,项目后续运行时将无法使用该 skill。",confirm:"移除",danger:!0})&&(await GO(e,w),h(),a())},x=async w=>{await QO(e,w),h(),a()},v=async w=>{await s({title:`解冻 ${e} @ ${w}`,body:"本地对这个 skill 的改动会被覆盖,回到最新共享版本。",confirm:"解冻",danger:!0})&&(await YO(e,w),h(),a())},S=new Map(((o==null?void 0:o.linkedProjects)??[]).map(w=>[w.project,w.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",children:m.jsxs("div",{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(w=>{const N=S.get(w);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:w}),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(w),type:"button",children:[m.jsx(cA,{size:11})," link"]}),N==="linked"&&m.jsxs(m.Fragment,{children:[m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(w),type:"button",children:[m.jsx(OA,{size:11})," freeze"]}),m.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>g(w),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(w),type:"button",children:[m.jsx(qC,{size:11})," unfreeze"]}),m.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>g(w),type:"button",children:"unlink"})]})]})]},w)}),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(w=>m.jsx(iB,{skillName:e,file:w.name,lines:w.lines},w.name))})]})]})]})})}function iB({skillName:e,file:t,lines:n}){const[a,s]=j.useState(!1),{data:o,isLoading:c,isError:f,error:d}=dt({queryKey:["skill-ref",e,t],queryFn:()=>HO(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(Kp,{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 aB=[{value:"all",label:"全部"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],rB={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function sB(){var x;const[e,t]=j.useState("all"),[n,a]=j.useState(""),[s,o]=j.useState(null),c=Tn(),{data:f,isLoading:d}=dt({queryKey:["skills"],queryFn:()=>fg()}),h=dt({queryKey:["projects"],queryFn:Bl}),y=j.useMemo(()=>((f==null?void 0:f.data)??[]).filter(S=>!(e!=="all"&&S.category!==e||n&&!S.name.toLowerCase().includes(n.toLowerCase()))),[f,e,n]),g=j.useMemo(()=>{const v=(f==null?void 0:f.data)??[],S={all:v.length};for(const w of v)S[w.category]=(S[w.category]??0)+1;return S},[f]);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",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 VO(),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:aB.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 gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:y.map(v=>{var S;return m.jsx(lB,{skill:v,projectCount:((S=h.data)==null?void 0:S.data.length)??0,onOpen:()=>o(v.name)},v.name)})}),s&&m.jsx(nB,{name:s,projects:((x=h.data)==null?void 0:x.data.map(v=>v.name))??[],onClose:()=>o(null),onChange:()=>c.invalidateQueries({queryKey:["skills"]})})]})}function lB({skill:e,projectCount:t,onOpen:n}){const a=rB[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 oB(){var o;const e=dt({queryKey:["system-info"],queryFn:s1}),t=dt({queryKey:["system-env"],queryFn:QA}),n=dt({queryKey:["doctor"],queryFn:YA}),[a,s]=j.useState(!1);return m.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[m.jsx("header",{children:m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),m.jsx(cB,{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:fB(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(Gp,{size:12,strokeWidth:2.5})," 编辑"]})]}),a?m.jsx(uB,{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(jC,{size:16,className:"text-[var(--color-running)]",strokeWidth:2.5}):m.jsx(qp,{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 cB({current:e}){const{confirm:t,alert:n}=qn(),[a,s]=j.useState(!1),[o,c]=j.useState(null),f=dt({queryKey:["latest-version"],queryFn:ZA,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 WA();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(en,{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(en,{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 uB({onClose:e}){const t=Tn(),{alert:n}=qn(),a=dt({queryKey:["system-env-raw"],queryFn:VA}),[s,o]=j.useState(null),[c,f]=j.useState(null);j.useEffect(()=>{a.data&&s===null&&(o(a.data.content),f(a.data.etag))},[a.data,s]);const d=s!==null&&a.data&&s!==a.data.content,h=Pn({mutationFn:()=>{if(s===null)throw new Error("no draft");return XA(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(en,{size:12,strokeWidth:3,className:"animate-spin"}):m.jsx(zf,{size:12,strokeWidth:3}),"保存"]})]})]})]})}function fB(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 dB(){return Bt("/api/chat/sessions")}function hB(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 mB(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function pB(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 gB(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 bB(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return Bt(`/api/chat/sessions/${e}/messages${n}`)}function lE(){var R,A,D,F,M,H;const{sessionId:e}=qE(),t=wr(),n=Tn(),{confirm:a,alert:s}=qn(),o=dt({queryKey:["chat-sessions"],queryFn:dB}),c=dt({queryKey:["chat-session",e],queryFn:()=>hB(e??""),enabled:!!e}),[f,d]=j.useState(null),[h,y]=j.useState(""),[g,x]=j.useState(!1),v=j.useRef(null);j.useEffect(()=>{if(!e)return;const U=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let J=!0;return U.addEventListener("open",()=>{if(J){J=!1;return}const C=n.getQueryData(["chat-session",e]),P=C!=null&&C.messages.length?C.messages[C.messages.length-1].ts:void 0;bB(e,P).then(Y=>{Y.data.length!==0&&n.setQueryData(["chat-session",e],le=>{if(!le)return le;const q=new Set(le.messages.map(K=>K.id)),Q=Y.data.filter(K=>!q.has(K.id));return Q.length===0?le:{...le,messages:[...le.messages,...Q],lastMessageAt:Q[Q.length-1].ts,messageCount:le.messageCount+Q.length}})}).catch(()=>{})}),U.addEventListener("chat.message",C=>{try{const P=JSON.parse(C.data);n.setQueryData(["chat-session",e],Y=>{if(!Y||Y.messages.some(Q=>Q.id===P.message.id))return Y;const q=Y.messages.findIndex(Q=>Q.role==="user"&&Q.id.startsWith("optim-")&&Q.content===P.message.content);if(q>=0){const Q=[...Y.messages];return Q[q]=P.message,{...Y,messages:Q}}return{...Y,messages:[...Y.messages,P.message]}})}catch{}}),U.addEventListener("chat.message.pending",C=>{try{const P=JSON.parse(C.data);d({id:P.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),U.addEventListener("chat.message.chunk.text",C=>{try{const P=JSON.parse(C.data);d(Y=>{if(!Y||Y.id!==P.assistantId)return Y;const le=[...Y.blocks],q=le[le.length-1];return q&&q.type==="text"?le[le.length-1]={...q,target:q.target+P.text}:le.push({type:"text",target:P.text,displayed:""}),{...Y,blocks:le}})}catch{}}),U.addEventListener("chat.message.chunk.tool_use",C=>{try{const P=JSON.parse(C.data);d(Y=>!Y||Y.id!==P.assistantId?Y:{...Y,blocks:[...Y.blocks,{type:"tool_use",id:P.id,title:P.title,kind:P.kind,status:P.status}]})}catch{}}),U.addEventListener("chat.message.chunk.tool_update",C=>{try{const P=JSON.parse(C.data);d(Y=>!Y||Y.id!==P.assistantId?Y:{...Y,blocks:Y.blocks.map(le=>le.type==="tool_use"&&le.id===P.id?{...le,status:P.status}:le)})}catch{}}),U.addEventListener("chat.message.complete",C=>{try{const P=JSON.parse(C.data);d(Y=>Y&&Y.id===P.assistantId?{...Y,done:!0,finalMessage:P.message}:Y)}catch{}}),()=>U.close()},[e,n]),j.useEffect(()=>{if(!f)return;const U=f.blocks.reduce((C,P)=>P.type==="text"?C+(P.target.length-P.displayed.length):C,0);if(U<=0){if(f.done&&f.finalMessage){const C=f.finalMessage;n.setQueryData(["chat-session",e],P=>!P||P.messages.some(Y=>Y.id===C.id)?P:{...P,messages:[...P.messages,C],lastMessageAt:C.ts,messageCount:P.messageCount+1}),n.invalidateQueries({queryKey:["chat-sessions"]}),d(null),x(!1)}return}const J=setTimeout(()=>{d(C=>{if(!C)return C;let P=Math.max(1,Math.ceil(U/40));const Y=C.blocks.map(le=>{if(le.type!=="text"||P<=0)return le;const q=le.target.length-le.displayed.length;if(q<=0)return le;const Q=Math.min(q,P);return P-=Q,{...le,displayed:le.target.slice(0,le.displayed.length+Q)}});return{...C,blocks:Y}})},25);return()=>clearTimeout(J)},[f,n,e]),j.useEffect(()=>{const U=v.current;U&&(U.scrollTop=U.scrollHeight)},[c.data,f]);const S=j.useCallback(async()=>{const U=await sE();n.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${U.id}`)},[n,t]),w=j.useCallback(async()=>{const U=h.trim();if(!U||g)return;let J=e;if(!J){const P=await sE();n.invalidateQueries({queryKey:["chat-sessions"]}),J=P.id,t(`/chat/${J}`,{replace:!0})}const C={id:`optim-${Date.now()}`,role:"user",content:U,ts:new Date().toISOString(),status:"complete"};n.setQueryData(["chat-session",J],P=>P?{...P,messages:[...P.messages,C],lastMessageAt:C.ts,messageCount:P.messageCount+1}:{id:J,createdAt:C.ts,lastMessageAt:C.ts,title:U.slice(0,60),project:null,messageCount:1,messages:[C]}),y(""),x(!0);try{await pB(J,U)}catch(P){x(!1),console.error("sendMessage failed",P),s({title:"发送失败",body:P instanceof Error?P.message:String(P)})}},[h,g,e,n,t,s]),N=j.useCallback(async U=>{await a({title:"删除对话",body:"对话记录会永久删除,不可恢复。",confirm:"删除",danger:!0})&&(await mB(U),n.invalidateQueries({queryKey:["chat-sessions"]}),e===U&&t("/chat"))},[n,e,t,a]),_=j.useCallback(async()=>{if(e)try{await gB(e)}catch(U){s({title:"中断失败",body:U instanceof Error?U.message:String(U)})}},[e,s]);return m.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[m.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[m.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:S,type:"button",children:[m.jsx(Zi,{size:14,strokeWidth:3}),"新建对话"]}),m.jsxs("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:["历史 ",((R=o.data)==null?void 0:R.data.length)??0]}),m.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((A=o.data)==null?void 0:A.data)??[]).map(U=>m.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",e===U.id?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[m.jsxs("button",{type:"button","aria-label":`打开对话 ${U.title}`,onClick:()=>t(`/chat/${U.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[m.jsx(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:U.title}),m.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[U.messageCount," msg · ",Uw(U.lastMessageAt??U.createdAt)]})]})]}),m.jsx("button",{type:"button","aria-label":"删除对话",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:J=>{J.stopPropagation(),N(U.id)},children:m.jsx(zl,{size:12})})]},U.id)),(((D=o.data)==null?void 0:D.data)??[]).length===0&&m.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:"还没对话。点上面新建。"})]})]}),m.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:e?m.jsxs(m.Fragment,{children:[m.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((F=c.data)==null?void 0:F.title)??"新对话"}),m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:e})]}),m.jsxs("div",{ref:v,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((M=c.data)==null?void 0:M.messages)??[]).map(U=>m.jsx(yB,{msg:U},U.id)),f&&m.jsx(xB,{pending:f}),!c.isLoading&&(((H=c.data)==null?void 0:H.messages)??[]).length===0&&!f&&!g&&m.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行"})]}),m.jsx("div",{className:"border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)]",children:m.jsxs("div",{className:"flex gap-2 items-end",children:[m.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:"说点什么… (Enter 发送,Shift+Enter 换行)",rows:2,value:h,onChange:U=>y(U.target.value),onKeyDown:U=>{U.key==="Enter"&&!U.shiftKey&&!U.nativeEvent.isComposing&&(U.preventDefault(),w())},"aria-label":"消息输入"}),f?m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:_,type:"button","aria-label":"中断生成",children:[m.jsx(i1,{size:14,strokeWidth:3}),"中断"]}):m.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:w,disabled:!h.trim()||g,type:"button","aria-label":"发送",children:[g?m.jsx(en,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(NA,{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 yB({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:Uw(e.ts)})]}),m.jsx("div",{className:"flex flex-col gap-2",children:a.map((s,o)=>m.jsx(vB,{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 xB({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(en,{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(zw,{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(Bw,{tool:n},a)})]})]})})}function vB({block:e}){return e.type==="text"?m.jsx(zw,{text:e.text}):m.jsx(Bw,{tool:e})}function zw({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 Bw({tool:e}){const[t,n]=j.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return m.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[m.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[m.jsx(JE,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),m.jsx(FA,{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(en,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),a&&m.jsx(Hp,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),s&&m.jsx(IC,{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 Uw(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 EB(){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 SB(){const[e]=jf();return e.get("project")?m.jsx(TR,{}):m.jsx(RR,{})}function wB(){return m.jsx(p2,{children:m.jsx(BT,{children:m.jsxs(zn,{element:m.jsx(h2,{}),children:[m.jsx(zn,{index:!0,element:m.jsx(LT,{to:"/projects",replace:!0})}),m.jsx(zn,{path:"/projects",element:m.jsx(g2,{})}),m.jsx(zn,{path:"/projects/new",element:m.jsx(N2,{})}),m.jsx(zn,{path:"/projects/:name",element:m.jsx(BO,{})}),m.jsx(zn,{path:"/board",element:m.jsx(SR,{})}),m.jsx(zn,{path:"/workers",element:m.jsx(SB,{})}),m.jsx(zn,{path:"/logs",element:m.jsx(qR,{})}),m.jsx(zn,{path:"/skills",element:m.jsx(sB,{})}),m.jsx(zn,{path:"/system",element:m.jsx(oB,{})}),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(EB,{})})]})})})}m2();const _B=new Nk({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),$w=document.getElementById("root");if(!$w)throw new Error("#root not found");ek.createRoot($w).render(m.jsx(j.StrictMode,{children:m.jsx(kk,{client:_B,children:m.jsx(cC,{children:m.jsx(S2,{children:m.jsx(wB,{})})})})}));