@coralai/sps-cli 0.50.5 → 0.50.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/console-assets/assets/{index-BczFsg3E.js → index-CGiD8z0L.js} +47 -47
- package/dist/console-assets/index.html +1 -1
- package/dist/services/PipelineService.d.ts.map +1 -1
- package/dist/services/PipelineService.js +22 -0
- package/dist/services/PipelineService.js.map +1 -1
- package/package.json +1 -1
- package/dist/console/sse/eventBus.d.ts +0 -25
- package/dist/console/sse/eventBus.d.ts.map +0 -1
- package/dist/console/sse/eventBus.js +0 -32
- package/dist/console/sse/eventBus.js.map +0 -1
- package/dist/console-server/index.d.ts +0 -29
- package/dist/console-server/index.d.ts.map +0 -1
- package/dist/console-server/index.js +0 -180
- package/dist/console-server/index.js.map +0 -1
- package/dist/console-server/lib/cardReader.d.ts +0 -27
- package/dist/console-server/lib/cardReader.d.ts.map +0 -1
- package/dist/console-server/lib/cardReader.js +0 -201
- package/dist/console-server/lib/cardReader.js.map +0 -1
- package/dist/console-server/lib/lockFile.d.ts +0 -17
- package/dist/console-server/lib/lockFile.d.ts.map +0 -1
- package/dist/console-server/lib/lockFile.js +0 -61
- package/dist/console-server/lib/lockFile.js.map +0 -1
- package/dist/console-server/lib/portPicker.d.ts +0 -3
- package/dist/console-server/lib/portPicker.d.ts.map +0 -1
- package/dist/console-server/lib/portPicker.js +0 -25
- package/dist/console-server/lib/portPicker.js.map +0 -1
- package/dist/console-server/lib/spawnCli.d.ts +0 -31
- package/dist/console-server/lib/spawnCli.d.ts.map +0 -1
- package/dist/console-server/lib/spawnCli.js +0 -64
- package/dist/console-server/lib/spawnCli.js.map +0 -1
- package/dist/console-server/routes/cards.d.ts +0 -7
- package/dist/console-server/routes/cards.d.ts.map +0 -1
- package/dist/console-server/routes/cards.js +0 -185
- package/dist/console-server/routes/cards.js.map +0 -1
- package/dist/console-server/routes/chat.d.ts +0 -36
- package/dist/console-server/routes/chat.d.ts.map +0 -1
- package/dist/console-server/routes/chat.js +0 -458
- package/dist/console-server/routes/chat.js.map +0 -1
- package/dist/console-server/routes/logs.d.ts +0 -14
- package/dist/console-server/routes/logs.d.ts.map +0 -1
- package/dist/console-server/routes/logs.js +0 -283
- package/dist/console-server/routes/logs.js.map +0 -1
- package/dist/console-server/routes/pipeline.d.ts +0 -8
- package/dist/console-server/routes/pipeline.d.ts.map +0 -1
- package/dist/console-server/routes/pipeline.js +0 -96
- package/dist/console-server/routes/pipeline.js.map +0 -1
- package/dist/console-server/routes/projects.d.ts +0 -11
- package/dist/console-server/routes/projects.d.ts.map +0 -1
- package/dist/console-server/routes/projects.js +0 -583
- package/dist/console-server/routes/projects.js.map +0 -1
- package/dist/console-server/routes/skills.d.ts +0 -7
- package/dist/console-server/routes/skills.d.ts.map +0 -1
- package/dist/console-server/routes/skills.js +0 -267
- package/dist/console-server/routes/skills.js.map +0 -1
- package/dist/console-server/routes/system.d.ts +0 -7
- package/dist/console-server/routes/system.d.ts.map +0 -1
- package/dist/console-server/routes/system.js +0 -288
- package/dist/console-server/routes/system.js.map +0 -1
- package/dist/console-server/routes/workers.d.ts +0 -18
- package/dist/console-server/routes/workers.d.ts.map +0 -1
- package/dist/console-server/routes/workers.js +0 -351
- package/dist/console-server/routes/workers.js.map +0 -1
- package/dist/console-server/sse/eventBus.d.ts +0 -25
- package/dist/console-server/sse/eventBus.d.ts.map +0 -1
- package/dist/console-server/sse/eventBus.js +0 -32
- package/dist/console-server/sse/eventBus.js.map +0 -1
- package/dist/console-server/sse/projectStream.d.ts +0 -10
- package/dist/console-server/sse/projectStream.d.ts.map +0 -1
- package/dist/console-server/sse/projectStream.js +0 -86
- package/dist/console-server/sse/projectStream.js.map +0 -1
- package/dist/console-server/watchers/cardWatcher.d.ts +0 -17
- package/dist/console-server/watchers/cardWatcher.d.ts.map +0 -1
- package/dist/console-server/watchers/cardWatcher.js +0 -68
- package/dist/console-server/watchers/cardWatcher.js.map +0 -1
- package/dist/console-server/watchers/markerWatcher.d.ts +0 -7
- package/dist/console-server/watchers/markerWatcher.d.ts.map +0 -1
- package/dist/console-server/watchers/markerWatcher.js +0 -63
- package/dist/console-server/watchers/markerWatcher.js.map +0 -1
- package/dist/console-server/watchers/pipelinePoller.d.ts +0 -2
- package/dist/console-server/watchers/pipelinePoller.d.ts.map +0 -1
- package/dist/console-server/watchers/pipelinePoller.js +0 -52
- package/dist/console-server/watchers/pipelinePoller.js.map +0 -1
- package/dist/models/types.d.ts +0 -103
- package/dist/models/types.d.ts.map +0 -1
- package/dist/models/types.js +0 -17
- package/dist/models/types.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var qN=Object.defineProperty;var mv=e=>{throw TypeError(e)};var HN=(e,t,n)=>t in e?qN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pv=(e,t,n)=>HN(e,typeof t!="symbol"?t+"":t,n),am=(e,t,n)=>t.has(e)||mv("Cannot "+n);var z=(e,t,n)=>(am(e,t,"read from private field"),n?n.call(e):t.get(e)),
|
|
1
|
+
var qN=Object.defineProperty;var mv=e=>{throw TypeError(e)};var HN=(e,t,n)=>t in e?qN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pv=(e,t,n)=>HN(e,typeof t!="symbol"?t+"":t,n),am=(e,t,n)=>t.has(e)||mv("Cannot "+n);var z=(e,t,n)=>(am(e,t,"read from private field"),n?n.call(e):t.get(e)),Ne=(e,t,n)=>t.has(e)?mv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ge=(e,t,n,a)=>(am(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),$e=(e,t,n)=>(am(e,t,"access private method"),n);var Pu=(e,t,n,a)=>({set _(s){ge(e,t,s,n)},get _(){return z(e,t,a)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Cp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rm={exports:{}},qo={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -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,_={};function N(L,
|
|
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,_={};function N(L,J,k){this.props=L,this.context=J,this.refs=_,this.updater=k||S}N.prototype.isReactComponent={},N.prototype.setState=function(L,J){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,J,"setState")},N.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function j(){}j.prototype=N.prototype;function C(L,J,k){this.props=L,this.context=J,this.refs=_,this.updater=k||S}var D=C.prototype=new j;D.constructor=C,w(D,N.prototype),D.isPureReactComponent=!0;var F=Array.isArray;function R(){}var q={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function Z(L,J,k){var ce=k.ref;return{$$typeof:e,type:L,key:J,ref:ce!==void 0?ce:null,props:k}}function A(L,J){return Z(L.type,J,L.props)}function P(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function G(L){var J={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(k){return J[k]})}var le=/\/+/g;function ae(L,J){return typeof L=="object"&&L!==null&&L.key!=null?G(""+L.key):J.toString(36)}function W(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(R,R):(L.status="pending",L.then(function(J){L.status==="pending"&&(L.status="fulfilled",L.value=J)},function(J){L.status==="pending"&&(L.status="rejected",L.reason=J)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function K(L,J,k,ce,Ee){var xe=typeof L;(xe==="undefined"||xe==="boolean")&&(L=null);var ze=!1;if(L===null)ze=!0;else switch(xe){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(L.$$typeof){case e:case t:ze=!0;break;case y:return ze=L._init,K(ze(L._payload),J,k,ce,Ee)}}if(ze)return Ee=Ee(L),ze=ce===""?"."+ae(L,0):ce,F(Ee)?(k="",ze!=null&&(k=ze.replace(le,"$&/")+"/"),K(Ee,J,k,"",function(Zt){return Zt})):Ee!=null&&(P(Ee)&&(Ee=A(Ee,k+(Ee.key==null||L&&L.key===Ee.key?"":(""+Ee.key).replace(le,"$&/")+"/")+ze)),J.push(Ee)),1;ze=0;var st=ce===""?".":ce+":";if(F(L))for(var it=0;it<L.length;it++)ce=L[it],xe=st+ae(ce,it),ze+=K(ce,J,k,xe,Ee);else if(it=v(L),typeof it=="function")for(L=it.call(L),it=0;!(ce=L.next()).done;)ce=ce.value,xe=st+ae(ce,it++),ze+=K(ce,J,k,xe,Ee);else if(xe==="object"){if(typeof L.then=="function")return K(W(L),J,k,ce,Ee);throw J=String(L),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return ze}function oe(L,J,k){if(L==null)return L;var ce=[],Ee=0;return K(L,ce,"","",function(xe){return J.call(k,xe,Ee++)}),ce}function V(L){if(L._status===-1){var J=L._result;J=J(),J.then(function(k){(L._status===0||L._status===-1)&&(L._status=1,L._result=k)},function(k){(L._status===0||L._status===-1)&&(L._status=2,L._result=k)}),L._status===-1&&(L._status=0,L._result=J)}if(L._status===1)return L._result.default;throw L._result}var me=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=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(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},O={map:oe,forEach:function(L,J,k){oe(L,function(){J.apply(this,arguments)},k)},count:function(L){var J=0;return oe(L,function(){J++}),J},toArray:function(L){return oe(L,function(J){return J})||[]},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=N,De.Fragment=n,De.Profiler=s,De.PureComponent=C,De.StrictMode=a,De.Suspense=d,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,De.__COMPILER_RUNTIME={__proto__:null,c:function(L){return q.H.useMemoCache(L)}},De.cache=function(L){return function(){return L.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(L,J,k){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var ce=w({},L.props),Ee=L.key;if(J!=null)for(xe in J.key!==void 0&&(Ee=""+J.key),J)!U.call(J,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&J.ref===void 0||(ce[xe]=J[xe]);var xe=arguments.length-2;if(xe===1)ce.children=k;else if(1<xe){for(var ze=Array(xe),st=0;st<xe;st++)ze[st]=arguments[st+2];ce.children=ze}return Z(L.type,Ee,ce)},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,J,k){var ce,Ee={},xe=null;if(J!=null)for(ce in J.key!==void 0&&(xe=""+J.key),J)U.call(J,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(Ee[ce]=J[ce]);var ze=arguments.length-2;if(ze===1)Ee.children=k;else if(1<ze){for(var st=Array(ze),it=0;it<ze;it++)st[it]=arguments[it+2];Ee.children=st}if(L&&L.defaultProps)for(ce in ze=L.defaultProps,ze)Ee[ce]===void 0&&(Ee[ce]=ze[ce]);return Z(L,xe,Ee)},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:V}},De.memo=function(L,J){return{$$typeof:h,type:L,compare:J===void 0?null:J}},De.startTransition=function(L){var J=q.T,k={};q.T=k;try{var ce=L(),Ee=q.S;Ee!==null&&Ee(k,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(R,me)}catch(xe){me(xe)}finally{J!==null&&k.types!==null&&(J.types=k.types),q.T=J}},De.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},De.use=function(L){return q.H.use(L)},De.useActionState=function(L,J,k){return q.H.useActionState(L,J,k)},De.useCallback=function(L,J){return q.H.useCallback(L,J)},De.useContext=function(L){return q.H.useContext(L)},De.useDebugValue=function(){},De.useDeferredValue=function(L,J){return q.H.useDeferredValue(L,J)},De.useEffect=function(L,J){return q.H.useEffect(L,J)},De.useEffectEvent=function(L){return q.H.useEffectEvent(L)},De.useId=function(){return q.H.useId()},De.useImperativeHandle=function(L,J,k){return q.H.useImperativeHandle(L,J,k)},De.useInsertionEffect=function(L,J){return q.H.useInsertionEffect(L,J)},De.useLayoutEffect=function(L,J){return q.H.useLayoutEffect(L,J)},De.useMemo=function(L,J){return q.H.useMemo(L,J)},De.useOptimistic=function(L,J){return q.H.useOptimistic(L,J)},De.useReducer=function(L,J,k){return q.H.useReducer(L,J,k)},De.useRef=function(L){return q.H.useRef(L)},De.useState=function(L){return q.H.useState(L)},De.useSyncExternalStore=function(L,J,k){return q.H.useSyncExternalStore(L,J,k)},De.useTransition=function(){return q.H.useTransition()},De.version="19.2.5",De}var xv;function Ap(){return xv||(xv=1,sm.exports=QN()),sm.exports}var M=Ap(),lm={exports:{}},Ho={},om={exports:{}},cm={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var qN=Object.defineProperty;var mv=e=>{throw TypeError(e)};var HN=(e,t,n)=>t in
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var vv;function YN(){return vv||(vv=1,(function(e){function t(K,oe){var
|
|
25
|
+
*/var vv;function YN(){return vv||(vv=1,(function(e){function t(K,oe){var V=K.length;K.push(oe);e:for(;0<V;){var me=V-1>>>1,O=K[me];if(0<s(O,oe))K[me]=oe,K[V]=O,V=me;else break e}}function n(K){return K.length===0?null:K[0]}function a(K){if(K.length===0)return null;var oe=K[0],V=K.pop();if(V!==oe){K[0]=V;e:for(var me=0,O=K.length,L=O>>>1;me<L;){var J=2*(me+1)-1,k=K[J],ce=J+1,Ee=K[ce];if(0>s(k,V))ce<O&&0>s(Ee,k)?(K[me]=Ee,K[ce]=V,me=ce):(K[me]=k,K[J]=V,me=J);else if(ce<O&&0>s(Ee,V))K[me]=Ee,K[ce]=V,me=ce;else break e}}return oe}function s(K,oe){var V=K.sortIndex-oe.sortIndex;return V!==0?V:K.id-oe.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],y=1,g=null,x=3,v=!1,S=!1,w=!1,_=!1,N=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function D(K){for(var oe=n(h);oe!==null;){if(oe.callback===null)a(h);else if(oe.startTime<=K)a(h),oe.sortIndex=oe.expirationTime,t(d,oe);else break;oe=n(h)}}function F(K){if(w=!1,D(K),!S)if(n(d)!==null)S=!0,R||(R=!0,G());else{var oe=n(h);oe!==null&&W(F,oe.startTime-K)}}var R=!1,q=-1,U=5,Z=-1;function A(){return _?!0:!(e.unstable_now()-Z<U)}function P(){if(_=!1,R){var K=e.unstable_now();Z=K;var oe=!0;try{e:{S=!1,w&&(w=!1,j(q),q=-1),v=!0;var V=x;try{t:{for(D(K),g=n(d);g!==null&&!(g.expirationTime>K&&A());){var me=g.callback;if(typeof me=="function"){g.callback=null,x=g.priorityLevel;var O=me(g.expirationTime<=K);if(K=e.unstable_now(),typeof O=="function"){g.callback=O,D(K),oe=!0;break t}g===n(d)&&a(d),D(K)}else a(d);g=n(d)}if(g!==null)oe=!0;else{var L=n(h);L!==null&&W(F,L.startTime-K),oe=!1}}break e}finally{g=null,x=V,v=!1}oe=void 0}}finally{oe?G():R=!1}}}var G;if(typeof C=="function")G=function(){C(P)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,ae=le.port2;le.port1.onmessage=P,G=function(){ae.postMessage(null)}}else G=function(){N(P,0)};function W(K,oe){q=N(function(){K(e.unstable_now())},oe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(K){switch(x){case 1:case 2:case 3:var oe=3;break;default:oe=x}var V=x;x=oe;try{return K()}finally{x=V}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(K,oe){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var V=x;x=K;try{return oe()}finally{x=V}},e.unstable_scheduleCallback=function(K,oe,V){var me=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?me+V:me):V=me,K){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=V+O,K={id:y++,callback:oe,priorityLevel:K,startTime:V,expirationTime:O,sortIndex:-1},V>me?(K.sortIndex=V,t(h,K),n(d)===null&&K===n(h)&&(w?(j(q),q=-1):w=!0,W(F,V-me))):(K.sortIndex=O,t(d,K),S||v||(S=!0,R||(R=!0,G()))),K},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(K){var oe=x;return function(){var V=x;x=oe;try{return K.apply(this,arguments)}finally{x=V}}}})(cm)),cm}var Ev;function VN(){return Ev||(Ev=1,om.exports=YN()),om.exports}var um={exports:{}},hn={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -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,
|
|
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,T=p.child;T;){if(T===l){E=!0,l=p,u=b;break}if(T===u){E=!0,u=p,l=b;break}T=T.sibling}if(!E){for(T=b.child;T;){if(T===l){E=!0,l=b,u=p;break}if(T===u){E=!0,u=b,l=p;break}T=T.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"),_=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),C=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),A=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function G(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 ae(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 N:return"Profiler";case _:return"StrictMode";case F:return"Suspense";case R:return"SuspenseList";case Z:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case C:return i.displayName||"Context";case j:return(i._context.displayName||"Context")+".Consumer";case D:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case q:return r=i.displayName||null,r!==null?r:ae(i.type)||"Memo";case U:r=i._payload,i=i._init;try{return ae(i(r))}catch{}}return null}var W=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,V={pending:!1,data:null,method:null,action:null},me=[],O=-1;function L(i){return{current:i}}function J(i){0>O||(i.current=me[O],me[O]=null,O--)}function k(i,r){O++,me[O]=i.current,i.current=r}var ce=L(null),Ee=L(null),xe=L(null),ze=L(null);function st(i,r){switch(k(xe,r),k(Ee,i),k(ce,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}}J(ce),k(ce,i)}function it(){J(ce),J(Ee),J(xe)}function Zt(i){i.memoizedState!==null&&k(ze,i);var r=ce.current,l=Bx(r,i.type);r!==l&&(k(Ee,i),k(ce,l))}function Kn(i){Ee.current===i&&(J(ce),J(Ee)),ze.current===i&&(J(ze),Uo._currentValue=V)}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
|
-
`+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
|
|
44
|
-
`),
|
|
45
|
-
`);for(p=u=0;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;for(;p<
|
|
46
|
-
`+I[u].replace(" at new "," at ");return i.displayName&&
|
|
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 X=ee}Reflect.construct(i,[],se)}else{try{se.call()}catch(ee){X=ee}i.call(se.prototype)}}else{try{throw Error()}catch(ee){X=ee}(se=i())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(ee){if(ee&&X&&typeof ee.stack=="string")return[ee.stack,X.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],T=b[1];if(E&&T){var I=E.split(`
|
|
44
|
+
`),Y=T.split(`
|
|
45
|
+
`);for(p=u=0;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;for(;p<Y.length&&!Y[p].includes("DetermineComponentFrameRoot");)p++;if(u===I.length||p===Y.length)for(u=I.length-1,p=Y.length-1;1<=u&&0<=p&&I[u]!==Y[p];)p--;for(;1<=u&&0<=p;u--,p--)if(I[u]!==Y[p]){if(u!==1||p!==1)do if(u--,p--,0>p||I[u]!==Y[p]){var ne=`
|
|
46
|
+
`+I[u].replace(" at new "," at ");return i.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",i.displayName)),ne}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 _:E=8,p|=24;break;case N:return i=Xn(12,l,r,p|2),i.elementType=N,i.lanes=b,i;case F:return i=Xn(13,l,r,p),i.elementType=F,i.lanes=b,i;case R:return i=Xn(19,l,r,p),i.elementType=R,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:E=10;break e;case j: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){C(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:T,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?C($r,$r.current):C($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===T)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===T)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===T)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===T)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,C(Jc,i),C(Fs,r),ya=i|r.baseLanes}function Bd(){C(Jc,ya),C(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;C(Pt,Pt.current&1),C(Zn,i),mi===null&&(r===null||Fs.current!==null||r.memoizedState!==null)&&(mi=i)}function $d(i){C(Pt,Pt.current),C(Zn,i),mi===null&&(mi=i)}function jb(i){i.tag===22?(C(Pt,Pt.current),C(Zn,i),mi===null&&(mi=i)):Ga()}function Ga(){C(Pt,Pt.current),C(Zn,Zn.current)}function Wn(i){te(Zn),mi===i&&(mi=null),te(Pt)}var Pt=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===T)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]=A;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,C(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),C(Pt,Pt.current),u)break;return null;case 22:return r.lanes=0,Ay(i,r,l,r.pendingProps);case 24:Fa(r,Gt,i.memoizedState.cache)}return da(i,r,l)}function By(i,r,l){if(i!==null)if(i.memoizedProps!==r.pendingProps)Yt=!0;else{if(!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 C(Pt,Pt.current&1|2),Ze&&la(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&Ot()>yu&&(r.flags|=128,p=!0,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,C(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:T,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 _;if(!o()){const N=new Ym(w);x(N),(_=e.onCancel)==null||_.call(e,N)}},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 _;a=N=>{(o()||h())&&w(N)},(_=e.onPause)==null||_.call(e)}).then(()=>{var w;a=void 0,o()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(o())return;let w;const _=n===0?e.initialPromise:void 0;try{w=_??e.fn()}catch(N){w=Promise.reject(N)}Promise.resolve(w).then(g).catch(N=>{var R;if(o())return;const j=e.retry??(rc.isServer()?0:3),T=e.retryDelay??pk,D=typeof T=="function"?T(n,N):T,F=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,N);if(t||!F){x(N);return}n++,(R=e.onFail)==null||R.call(e,n,N),ok(D).then(()=>h()?void 0:v()).then(()=>{t?x(N):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,j,T;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),R=(()=>{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,R,this):D(R)},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||N.call(_,D,this),(T=(j=z(this,bi).config).onSettled)==null||T.call(j,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 A=this.hasListeners(),P=!A&&Mv(t,n),Y=A&&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:_}=g;v=g.data;let N=!1;if(n.placeholderData!==void 0&&v===void 0&&_==="pending"){let A;o!=null&&o.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(A=o.data,N=!0):A=typeof n.placeholderData=="function"?n.placeholderData((J=z(this,wl))==null?void 0:J.state.data,z(this,wl)):n.placeholderData,A!==void 0&&(_="success",v=Gm(o==null?void 0:o.data,A,n),x=!0)}if(n.select&&v!==void 0&&!N)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(A){ge(this,hr,A)}z(this,hr)&&(S=z(this,hr),v=z(this,Sl),w=Date.now(),_="error");const j=g.fetchStatus==="fetching",T=_==="pending",D=_==="error",F=T&&j,R=v!==void 0,U={status:_,fetchStatus:g.fetchStatus,isPending:T,isSuccess:_==="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:j,isRefetching:j&&!T,isLoadingError:D&&!R,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:D&&R,isStale:Dp(t,n),refetch:this.refetch,promise:z(this,Sa),isEnabled:yi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=U.data!==void 0,P=U.status==="error"&&!A,Y=Q=>{P?Q.reject(U.error):A&&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 _=T=>{fk(T,()=>t.signal,()=>w=!0)},N=EE(t.options,t.fetchOptions),j=async(T,D,F)=>{if(w)return Promise.reject();if(D==null&&T.pages.length)return Promise.resolve(T);const H=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:D,direction:F?"backward":"forward",meta:t.options.meta};return _(P),P})(),U=await N(H),{maxPages:J}=t.options,A=F?uk:ck;return{pages:A(T.pages,U,J),pageParams:A(T.pageParams,D,J)}};if(s&&o.length){const T=s==="backward",D=T?vk:Lv,F={pages:o,pageParams:c},R=D(a,F);f=await j(F,R,T)}else{const T=e??o.length;do{const D=d===0?c[0]??a.initialPageParam:Lv(a,f);if(d>0&&D==null)break;f=await j(f,D),d++}while(d<T)}return f};t.options.persister?t.fetchFn=()=>{var w,_;return(_=(w=t.options).persister)==null?void 0:_.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,j,T,D,F,R,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:N.call(_,U,t,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((T=(j=this.options).onError)==null?void 0:T.call(j,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=(R=this.options).onSettled)==null?void 0:H.call(R,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=M.createContext(void 0),Tn=e=>{const t=M.useContext(AE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},kk=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(AE.Provider,{value:e,children:t})),OE=M.createContext(!1),Tk=()=>M.useContext(OE);OE.Provider;function Ck(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ak=M.createContext(Ck()),Ok=()=>M.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=>{M.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]=M.useState(()=>new t(o,c)),y=h.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(_=>{const N=g?h.subscribe(Jt.batchCalls(_)):_n;return h.updateResult(),N},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),M.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 _=d?Iv(c,h,s):f==null?void 0:f.promise;_==null||_.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]=M.useState(()=>new wk(n,e));M.useEffect(()=>{a.setOptions(e)},[a,e]);const s=M.useSyncExternalStore(M.useCallback(c=>a.subscribe(Jt.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=M.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,te=e.unstable_ImmediatePriority,de=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 T=u&134217727;return T!==0?(u=T&~b,u!==0?p=Cn(u):(E&=T,E!==0?p=Cn(E):l||(l=T&~i,l!==0&&(p=Cn(l))))):(T=u&~b,T!==0?p=Cn(T):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 ie(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function pe(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 ve(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 T=i.entanglements,I=i.expirationTimes,Y=i.hiddenUpdates;for(l=E&~l;0<l;){var ne=31-lt(l),se=1<<ne;T[ne]=0,I[ne]=-1;var X=Y[ne];if(X!==null)for(Y[ne]=null,ne=0;ne<X.length;ne++){var ee=X[ne];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){ue(i,r),ue(i+"Capture",r)}function ue(i,r){for(Or[i]=r,i=0;i<r.length;i++)Ac.add(r[i])}var _e=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),qe={},ot={};function Ft(i){return zi.call(ot,i)?!0:zi.call(qe,i)?!1:_e.test(i)?ot[i]=!0:(qe[i]=!0,!1)}function dn(i,r,l){if(Ft(r))if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":i.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){i.removeAttribute(r);return}}i.setAttribute(r,""+l)}}function Qn(i,r,l){if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(r);return}i.setAttribute(r,""+l)}}function An(i,r,l,u){if(u===null)i.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(r,l,""+u)}}function Et(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Yn(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Oc(i,r,l){var u=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,b=u.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return p.call(this)},set:function(E){l=""+E,b.call(this,E)}}),Object.defineProperty(i,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(E){l=""+E},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function _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,T){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"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?i.name=""+Et(T):i.removeAttribute("name")}function Rr(i,r,l,u,p,b,E,T){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,T||r===i.value||(i.value=r),i.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,i.checked=T?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(W(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 he(){}var Se=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 T in i)i.hasOwnProperty(T)&&(l=i[T],this[T]=l?l(b):b[T]);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,ce.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case Z:return i=Xn(31,l,r,p),i.elementType=Z,i.lanes=b,i;case w:return Ir(l.children,p,b,r);case _:E=8,p|=24;break;case N:return i=Xn(12,l,r,p|2),i.elementType=N,i.lanes=b,i;case F:return i=Xn(13,l,r,p),i.elementType=F,i.lanes=b,i;case R:return i=Xn(19,l,r,p),i.elementType=R,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case C:E=10;break e;case j:E=9;break e;case D:E=11;break e;case q:E=14;break e;case U:E=16,u=null;break e}E=29,l=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Xn(E,l,r,p),r.elementType=i,r.type=u,r.lanes=b,r}function Ir(i,r,l,u){return i=Xn(7,i,u,r),i.lanes=l,i}function 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=he),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){k(Td,r._currentValue),r._currentValue=l}function ca(i){i._currentValue=Td.current,J(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 T=b;b=p;for(var I=0;I<r.length;I++)if(T.context===r[I]){b.lanes|=l,T=b.alternate,T!==null&&(T.lanes|=l),Cd(b.return,l,i),u||(E=null);break e}b=T.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 T=p.type;Vn(p.pendingProps.value,E.value)||(i!==null?i.push(T):i=[T])}}else if(p===ze.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:C,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?k($r,$r.current):k($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(he,he),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(he,he);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(H,$){if(i){var Q=H.deletions;Q===null?(H.deletions=[$],H.flags|=16):Q.push($)}}function l(H,$){if(!i)return null;for(;$!==null;)r(H,$),$=$.sibling;return null}function u(H){for(var $=new Map;H!==null;)H.key!==null?$.set(H.key,H):$.set(H.index,H),H=H.sibling;return $}function p(H,$){return H=sa(H,$),H.index=0,H.sibling=null,H}function b(H,$,Q){return H.index=Q,i?(Q=H.alternate,Q!==null?(Q=Q.index,Q<$?(H.flags|=67108866,$):Q):(H.flags|=67108866,$)):(H.flags|=1048576,$)}function E(H){return i&&H.alternate===null&&(H.flags|=67108866),H}function T(H,$,Q,re){return $===null||$.tag!==6?($=Ed(Q,H.mode,re),$.return=H,$):($=p($,Q),$.return=H,$)}function I(H,$,Q,re){var ke=Q.type;return ke===w?ne(H,$,Q.props.children,re,Q.key):$!==null&&($.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===U&&Fr(ke)===$.type)?($=p($,Q.props),go($,Q),$.return=H,$):($=Hc(Q.type,Q.key,Q.props,null,H.mode,re),go($,Q),$.return=H,$)}function Y(H,$,Q,re){return $===null||$.tag!==4||$.stateNode.containerInfo!==Q.containerInfo||$.stateNode.implementation!==Q.implementation?($=Sd(Q,H.mode,re),$.return=H,$):($=p($,Q.children||[]),$.return=H,$)}function ne(H,$,Q,re,ke){return $===null||$.tag!==7?($=Ir(Q,H.mode,re,ke),$.return=H,$):($=p($,Q),$.return=H,$)}function se(H,$,Q){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Ed(""+$,H.mode,Q),$.return=H,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return Q=Hc($.type,$.key,$.props,null,H.mode,Q),go(Q,$),Q.return=H,Q;case S:return $=Sd($,H.mode,Q),$.return=H,$;case U:return $=Fr($),se(H,$,Q)}if(W($)||G($))return $=Ir($,H.mode,Q,null),$.return=H,$;if(typeof $.then=="function")return se(H,Zc($),Q);if($.$$typeof===C)return se(H,Qc(H,$),Q);Wc(H,$)}return null}function X(H,$,Q,re){var ke=$!==null?$.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return ke!==null?null:T(H,$,""+Q,re);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return Q.key===ke?I(H,$,Q,re):null;case S:return Q.key===ke?Y(H,$,Q,re):null;case U:return Q=Fr(Q),X(H,$,Q,re)}if(W(Q)||G(Q))return ke!==null?null:ne(H,$,Q,re,null);if(typeof Q.then=="function")return X(H,$,Zc(Q),re);if(Q.$$typeof===C)return X(H,$,Qc(H,Q),re);Wc(H,Q)}return null}function ee(H,$,Q,re,ke){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return H=H.get(Q)||null,T($,H,""+re,ke);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case v:return H=H.get(re.key===null?Q:re.key)||null,I($,H,re,ke);case S:return H=H.get(re.key===null?Q:re.key)||null,Y($,H,re,ke);case U:return re=Fr(re),ee(H,$,Q,re,ke)}if(W(re)||G(re))return H=H.get(Q)||null,ne($,H,re,ke,null);if(typeof re.then=="function")return ee(H,$,Q,Zc(re),ke);if(re.$$typeof===C)return ee(H,$,Q,Qc($,re),ke);Wc($,re)}return null}function ye(H,$,Q,re){for(var ke=null,tt=null,we=$,Ue=$=0,Ve=null;we!==null&&Ue<Q.length;Ue++){we.index>Ue?(Ve=we,we=null):Ve=we.sibling;var nt=X(H,we,Q[Ue],re);if(nt===null){we===null&&(we=Ve);break}i&&we&&nt.alternate===null&&r(H,we),$=b(nt,$,Ue),tt===null?ke=nt:tt.sibling=nt,tt=nt,we=Ve}if(Ue===Q.length)return l(H,we),Ze&&la(H,Ue),ke;if(we===null){for(;Ue<Q.length;Ue++)we=se(H,Q[Ue],re),we!==null&&($=b(we,$,Ue),tt===null?ke=we:tt.sibling=we,tt=we);return Ze&&la(H,Ue),ke}for(we=u(we);Ue<Q.length;Ue++)Ve=ee(we,H,Ue,Q[Ue],re),Ve!==null&&(i&&Ve.alternate!==null&&we.delete(Ve.key===null?Ue:Ve.key),$=b(Ve,$,Ue),tt===null?ke=Ve:tt.sibling=Ve,tt=Ve);return i&&we.forEach(function(rr){return r(H,rr)}),Ze&&la(H,Ue),ke}function Ae(H,$,Q,re){if(Q==null)throw Error(a(151));for(var ke=null,tt=null,we=$,Ue=$=0,Ve=null,nt=Q.next();we!==null&&!nt.done;Ue++,nt=Q.next()){we.index>Ue?(Ve=we,we=null):Ve=we.sibling;var rr=X(H,we,nt.value,re);if(rr===null){we===null&&(we=Ve);break}i&&we&&rr.alternate===null&&r(H,we),$=b(rr,$,Ue),tt===null?ke=rr:tt.sibling=rr,tt=rr,we=Ve}if(nt.done)return l(H,we),Ze&&la(H,Ue),ke;if(we===null){for(;!nt.done;Ue++,nt=Q.next())nt=se(H,nt.value,re),nt!==null&&($=b(nt,$,Ue),tt===null?ke=nt:tt.sibling=nt,tt=nt);return Ze&&la(H,Ue),ke}for(we=u(we);!nt.done;Ue++,nt=Q.next())nt=ee(we,H,Ue,nt.value,re),nt!==null&&(i&&nt.alternate!==null&&we.delete(nt.key===null?Ue:nt.key),$=b(nt,$,Ue),tt===null?ke=nt:tt.sibling=nt,tt=nt);return i&&we.forEach(function(PN){return r(H,PN)}),Ze&&la(H,Ue),ke}function pt(H,$,Q,re){if(typeof Q=="object"&&Q!==null&&Q.type===w&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:e:{for(var ke=Q.key;$!==null;){if($.key===ke){if(ke=Q.type,ke===w){if($.tag===7){l(H,$.sibling),re=p($,Q.props.children),re.return=H,H=re;break e}}else if($.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===U&&Fr(ke)===$.type){l(H,$.sibling),re=p($,Q.props),go(re,Q),re.return=H,H=re;break e}l(H,$);break}else r(H,$);$=$.sibling}Q.type===w?(re=Ir(Q.props.children,H.mode,re,Q.key),re.return=H,H=re):(re=Hc(Q.type,Q.key,Q.props,null,H.mode,re),go(re,Q),re.return=H,H=re)}return E(H);case S:e:{for(ke=Q.key;$!==null;){if($.key===ke)if($.tag===4&&$.stateNode.containerInfo===Q.containerInfo&&$.stateNode.implementation===Q.implementation){l(H,$.sibling),re=p($,Q.children||[]),re.return=H,H=re;break e}else{l(H,$);break}else r(H,$);$=$.sibling}re=Sd(Q,H.mode,re),re.return=H,H=re}return E(H);case U:return Q=Fr(Q),pt(H,$,Q,re)}if(W(Q))return ye(H,$,Q,re);if(G(Q)){if(ke=G(Q),typeof ke!="function")throw Error(a(150));return Q=ke.call(Q),Ae(H,$,Q,re)}if(typeof Q.then=="function")return pt(H,$,Zc(Q),re);if(Q.$$typeof===C)return pt(H,$,Qc(H,Q),re);Wc(H,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,$!==null&&$.tag===6?(l(H,$.sibling),re=p($,Q),re.return=H,H=re):(l(H,$),re=Ed(Q,H.mode,re),re.return=H,H=re),E(H)):l(H,$)}return function(H,$,Q,re){try{po=0;var ke=pt(H,$,Q,re);return $s=null,ke}catch(we){if(we===Us||we===Vc)throw we;var tt=Xn(29,we,null,H.mode);return tt.lanes=re,tt.return=H,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,T=p.shared.pending;if(T!==null){p.shared.pending=null;var I=T,Y=I.next;I.next=null,E===null?b=Y:E.next=Y,E=I;var ne=i.alternate;ne!==null&&(ne=ne.updateQueue,T=ne.lastBaseUpdate,T!==E&&(T===null?ne.firstBaseUpdate=Y:T.next=Y,ne.lastBaseUpdate=I))}if(b!==null){var se=p.baseState;E=0,ne=Y=I=null,T=b;do{var X=T.lane&-536870913,ee=X!==T.lane;if(ee?(Ye&X)===X:(u&X)===X){X!==0&&X===zs&&(zd=!0),ne!==null&&(ne=ne.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var ye=i,Ae=T;X=r;var pt=l;switch(Ae.tag){case 1:if(ye=Ae.payload,typeof ye=="function"){se=ye.call(pt,se,X);break e}se=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ae.payload,X=typeof ye=="function"?ye.call(pt,se,X):ye,X==null)break e;se=g({},se,X);break e;case 2:Pa=!0}}X=T.callback,X!==null&&(i.flags|=64,ee&&(i.flags|=8192),ee=p.callbacks,ee===null?p.callbacks=[X]:ee.push(X))}else ee={lane:X,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ne===null?(Y=ne=ee,I=se):ne=ne.next=ee,E|=X;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;ee=T,T=ee.next,ee.next=null,p.lastBaseUpdate=ee,p.shared.pending=null}}while(!0);ne===null&&(I=se),p.baseState=I,p.firstBaseUpdate=Y,p.lastBaseUpdate=ne,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,k(Jc,i),k(Fs,r),ya=i|r.baseLanes}function Bd(){k(Jc,ya),k(Fs,Fs.current)}function Ud(){ya=Jc.current,J(Fs),J(Jc)}var Zn=L(null),mi=null;function Ka(i){var r=i.alternate;k(Pt,Pt.current&1),k(Zn,i),mi===null&&(r===null||Fs.current!==null||r.memoizedState!==null)&&(mi=i)}function $d(i){k(Pt,Pt.current),k(Zn,i),mi===null&&(mi=i)}function jb(i){i.tag===22?(k(Pt,Pt.current),k(Zn,i),mi===null&&(mi=i)):Ga()}function Ga(){k(Pt,Pt.current),k(Zn,Zn.current)}function Wn(i){J(Zn),mi===i&&(mi=null),J(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,Be=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,Be=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=Be=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){Be=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&&(Be.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=Be=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?Be.memoizedState=Qt=i:Qt=Qt.next=i,Qt}function qt(){if(ht===null){var i=Be.alternate;i=i!==null?i.memoizedState:null}else i=ht.next;var r=Qt===null?Be.memoizedState:Qt.next;if(r!==null)Qt=r,ht=i;else{if(i===null)throw Be.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?Be.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=Be,(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===C)return ln(i)}throw Error(a(438,String(i)))}function Gd(i){var r=null,l=Be.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=Be.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(),Be.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]=A;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 T=E=null,I=null,Y=r,ne=!1;do{var se=Y.lane&-536870913;if(se!==Y.lane?(Ye&se)===se:(ua&se)===se){var X=Y.revertLane;if(X===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),se===zs&&(ne=!0);else if((ua&X)===X){Y=Y.next,X===zs&&(ne=!0);continue}else se={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},I===null?(T=I=se,E=b):I=I.next=se,Be.lanes|=X,Va|=X;se=Y.action,Hr&&l(b,se),b=Y.hasEagerState?Y.eagerState:l(b,se)}else X={lane:se,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},I===null?(T=I=X,E=b):I=I.next=X,Be.lanes|=se,Va|=se;Y=Y.next}while(Y!==null&&Y!==r);if(I===null?E=b:I.next=T,!Vn(b,i.memoizedState)&&(Yt=!0,ne&&(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=Be,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=Be.updateQueue,r===null?(r=iu(),Be.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 T=l(p,u),I=K.S;I!==null&&I(E,T),Hb(i,r,T)}catch(Y){Xd(i,r,Y)}finally{b!==null&&E.types!==null&&(b.types=E.types),K.T=b}}else try{b=l(p,u),Hb(i,r,b)}catch(Y){Xd(i,r,Y)}}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=Be;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,Be,u),u.dispatch=l,u=Vd(!1),b=nh.bind(null,Be,!1,u.queue),u=En(),p={state:r,dispatch:null,action:i,pending:null},u.queue=p,l=D_.bind(null,Be,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&&(Be.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=Be.updateQueue,r===null&&(r=iu(),Be.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();Be.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):(Be.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){Be.flags|=4;var r=Be.updateQueue;if(r===null)r=iu(),Be.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(),Be.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(),Be.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,T={};K.T=T,nh(i,!1,r,l);try{var I=p(),Y=K.S;if(Y!==null&&Y(T,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ne=R_(I,u);So(i,r,ne,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&&T.types!==null&&(E.types=T.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,V,l===null?z_:function(){return uy(i),l(u)})}function cy(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:V},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,T=b(E,l);if(p.hasEagerState=!0,p.eagerState=T,Vn(T,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===Be||r!==null&&r===Be}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,Be,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,Be,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,Be,i.queue,!0,!1),En().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,l){var u=Be,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,Be,!0,l),l.dispatch=r,[i,r]},useMemoCache:Gd,useCacheRefresh:function(){return En().memoizedState=B_.bind(null,Be)},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 T=u.stack;this.componentDidCatch(u.value,{componentStack:T!==null?T:""})})}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 T in u)T!=="ref"&&(E[T]=u[T])}else E=u;return Ur(r),u=Pd(i,r,l,E,b,p),T=qd(),i!==null&&!Yt?(Hd(i,r,p),da(i,r,p)):(Ze&&T&&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 T=r.memoizedProps,I=Kr(l,T);b.props=I;var Y=b.context,ne=l.contextType;E=Ms,typeof ne=="object"&&ne!==null&&(E=ln(ne));var se=l.getDerivedStateFromProps;ne=typeof se=="function"||typeof b.getSnapshotBeforeUpdate=="function",T=r.pendingProps!==T,ne||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(T||Y!==E)&&xy(r,b,u,E),Pa=!1;var X=r.memoizedState;b.state=X,xo(r,u,b,p),yo(),Y=r.memoizedState,T||X!==Y||Pa?(typeof se=="function"&&(ah(r,l,se,u),Y=r.memoizedState),(I=Pa||yy(r,l,I,u,X,Y,E))?(ne||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=Y),b.props=u,b.state=Y,b.context=E,u=I):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{b=r.stateNode,Ld(i,r),E=r.memoizedProps,ne=Kr(l,E),b.props=ne,se=r.pendingProps,X=b.context,Y=l.contextType,I=Ms,typeof Y=="object"&&Y!==null&&(I=ln(Y)),T=l.getDerivedStateFromProps,(Y=typeof T=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==se||X!==I)&&xy(r,b,u,I),Pa=!1,X=r.memoizedState,b.state=X,xo(r,u,b,p),yo();var ee=r.memoizedState;E!==se||X!==ee||Pa||i!==null&&i.dependencies!==null&&Gc(i.dependencies)?(typeof T=="function"&&(ah(r,l,T,u),ee=r.memoizedState),(ne=Pa||yy(r,l,ne,u,X,ee,I)||i!==null&&i.dependencies!==null&&Gc(i.dependencies))?(Y||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&&X===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&X===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=ee),b.props=u,b.state=ee,b.context=I,u=ne):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&X===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&X===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 T=u.children;return u=u.fallback,p?(Ga(),p=r.mode,T=du({mode:"hidden",children:T},p),u=Ir(u,p,l,null),T.return=r,u.return=r,T.sibling=u,r.child=T,u=r.child,u.memoizedState=uh(l),u.childLanes=fh(i,E,l),r.memoizedState=ch,_o(null,u)):(Ka(r),dh(r,T))}var I=i.memoizedState;if(I!==null&&(T=I.dehydrated,T!==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(),T=u.fallback,p=r.mode,u=du({mode:"visible",children:u.children},p),T=Ir(T,p,l,null),T.flags|=2,u.return=r,T.return=r,u.sibling=T,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(T)){if(E=T.nextSibling&&T.nextSibling.dataset,E)var Y=E.dgst;E=Y,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(T)||Eu(),r=hh(i,r,l)}else Gh(T)?(r.flags|=192,r.child=i.child,r=null):(i=I.treeContext,_t=pi(T.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(),T=u.fallback,p=r.mode,I=i.child,Y=I.sibling,u=sa(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,Y!==null?T=sa(Y,T):(T=Ir(T,p,l,null),T.flags|=2),T.return=r,u.return=r,u.sibling=T,r.child=u,_o(null,u),u=r.child,T=i.child.memoizedState,T===null?T=uh(l):(p=T.cachePool,p!==null?(I=Gt._currentValue,p=p.parent!==I?{parent:I,pool:I}:p):p=wb(),T={baseLanes:T.baseLanes|l,cachePool:p}),u.memoizedState=T,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,T=(E&2)!==0;if(T?(E=E&1|2,r.flags|=128):E&=1,k(Pt,E),on(i,r,u,l),u=Ze?uo:0,!T&&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),k(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===q){r.tag=14,r=Ty(null,r,i,u,l);break e}}throw r=ae(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(xe.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,xe.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=xe.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=ce.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=ce.current,Ls(r))yb(r);else{var E=Cu(xe.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=xe.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(J(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 k(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,k(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&&J($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 J(Pt),null;case 4:return it(),null;case 10:return ca(r.type),null;case 22:case 23:return Wn(r),Ud(),i!==null&&J($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:J(Pt);break;case 10:ca(r.type);break;case 22:case 23:Wn(r),Ud(),i!==null&&J($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(T){ft(r,r.return,T)}}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,T=E.destroy;if(T!==void 0){E.destroy=void 0,p=r;var I=l,Y=T;try{Y()}catch(ne){ft(p,I,ne)}}}u=u.next}while(u!==b)}}catch(ne){ft(r,r.return,ne)}}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=he));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,T=-1,I=-1,Y=0,ne=0,se=i,X=null;t:for(;;){for(var ee;se!==l||p!==0&&se.nodeType!==3||(T=E+p),se!==b||u!==0&&se.nodeType!==3||(I=E+u),se.nodeType===3&&(E+=se.nodeValue.length),(ee=se.firstChild)!==null;)X=se,se=ee;for(;;){if(se===i)break t;if(X===l&&++Y===p&&(T=E),X===b&&++ne===u&&(I=E),(ee=se.nextSibling)!==null)break;se=X,X=se.parentNode}se=ee}l=T===-1||I===-1?null:{start:T,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,T=E;e:for(;T!==null;){switch(T.tag){case 27:if(er(T.type)){Tt=T.stateNode,Mn=!1;break e}break;case 5:Tt=T.stateNode,Mn=!1;break e;case 3:case 4:Tt=T.stateNode.containerInfo,Mn=!0;break e}T=T.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 T=0;T<E.length;T++)if(b=E[T],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(T,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(T=0;T<E.length;T++)if(b=E[T],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(T,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,Y=ma,ne=Vt;if(ma=Y||p,Vt=ne||I,jn(r,i),Vt=ne,ma=Y,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{T=I.stateNode;var se=I.memoizedProps.style,X=se!=null&&se.hasOwnProperty("display")?se.display:null;T.style.display=X==null||typeof X=="boolean"?"":(""+X).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 T=yh(i);mu(i,T,E);break;case 3:case 4:var I=l.stateNode.containerInfo,Y=yh(i);xh(i,Y,I);break;default:throw Error(a(161))}}catch(ne){ft(i,i.return,ne)}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(Y){ft(u,u.return,Y)}if(u=b,p=u.updateQueue,p!==null){var T=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],T)}catch(Y){ft(u,u.return,Y)}}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,T=b.onPostCommit;typeof T=="function"&&T(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,T=l,I=u,Y=E.flags;switch(E.tag){case 0:case 11:case 15:Ks(b,E,T,I,p),ko(8,E);break;case 23:break;case 22:var ne=E.stateNode;E.memoizedState!==null?ne._visibility&2?Ks(b,E,T,I,p):Co(b,E):(ne._visibility|=2,Ks(b,E,T,I,p)),p&&Y&2048&&Eh(E.alternate,E);break;case 24:Ks(b,E,T,I,p),p&&Y&2048&&Sh(E.alternate,E);break;default:Ks(b,E,T,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||ie(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 T=i;p=Ro;var I=T.current.memoizedState.isDehydrated;if(I&&(Xs(T,E).flags|=256),E=Oh(T,E,!1),E!==2){if(wh&&!I){T.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,T,I,Y,ne,se,X,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:he},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,T,I,ne,se,null,X,ee)),Wa(i,b,E,!Y);return}}bx(i,r,b,l,u,p,E,T,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=ie(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){Be=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 T=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 Y=ut;if(ut=0,Jn=null,Zs(i,T,I,Y),l&&Qs){E=0;break e}break;default:Y=ut,ut=0,Jn=null,Zs(i,T,I,Y)}}X_(),E=It;break}catch(ne){ux(i,ne)}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=ie(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 T=He;if(E?ev(E):T.stateNode.complete){ut=0,Jn=null;var I=T.sibling;if(I!==null)He=I;else{var Y=T.return;Y!==null?(He=Y,Su(Y)):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(ne){ux(i,ne)}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,T,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,ve(i,l,b,E,T,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),T=b.focusedElem,I=b.selectionRange;if(E!==T&&T&&T.ownerDocument&&ib(T.ownerDocument.documentElement,T)){if(I!==null&&hd(T)){var Y=I.start,ne=I.end;if(ne===void 0&&(ne=Y),"selectionStart"in T)T.selectionStart=Y,T.selectionEnd=Math.min(ne,T.value.length);else{var se=T.ownerDocument||document,X=se&&se.defaultView||window;if(X.getSelection){var ee=X.getSelection(),ye=T.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 H=nb(T,Ae),$=nb(T,pt);if(H&&$&&(ee.rangeCount!==1||ee.anchorNode!==H.node||ee.anchorOffset!==H.offset||ee.focusNode!==$.node||ee.focusOffset!==$.offset)){var Q=se.createRange();Q.setStart(H.node,H.offset),ee.removeAllRanges(),Ae>pt?(ee.addRange(Q),ee.extend($.node,$.offset)):(Q.setEnd($.node,$.offset),ee.addRange(Q))}}}}for(se=[],ee=T;ee=ee.parentNode;)ee.nodeType===1&&se.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<se.length;T++){var re=se[T];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 T=u[E];b(T.value,{componentStack:T.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 T=at;if(at|=4,ix(b.current),ex(b,b.current,E,l),at=T,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,T=u.pingedLanes;b=(1<<31-lt(42|i)+1)-1,b&=p&~(E&~T),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||ie(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),T=1<<E,I=p[E];I===-1?((T&l)===0||(T&u)!==0)&&(p[E]=pe(T,r)):I<=r&&(i.expiredLanes|=T),b&=~T}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||ie(i,l)){if(r=l&-l,r===i.callbackPriority)return r;switch(u!==null&&kr(u),ta(l)){case 2:case 8:l=de;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(te,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 T=new zc("action","action",null,u,p);i.push({event:T,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"&&(T.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"),ue("onMouseEnter",["mouseout","mouseover"]),ue("onMouseLeave",["mouseout","mouseover"]),ue("onPointerEnter",["pointerout","pointerover"]),ue("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 T=u[E],I=T.instance,Y=T.currentTarget;if(T=T.listener,I!==b&&p.isPropagationStopped())break e;b=T,p.currentTarget=Y;try{b(p)}catch(ne){$c(ne)}p.currentTarget=null,b=I}else for(E=0;E<u.length;E++){if(T=u[E],I=T.instance,Y=T.currentTarget,T=T.listener,I!==b&&p.isPropagationStopped())break e;b=T,p.currentTarget=Y;try{b(p)}catch(ne){$c(ne)}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 T=u.stateNode.containerInfo;if(T===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(;T!==null;){if(E=vn(T),E===null)return;if(I=E.tag,I===5||I===6||I===26||I===27){u=b=E;continue e}T=T.parentNode}}u=u.return}jc(function(){var Y=b,ne=Ie(l),se=[];e:{var X=fb.get(i);if(X!==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"),H=Ae?X!==null?X+"Capture":null:X;Ae=[];for(var $=Y,Q;$!==null;){var re=$;if(Q=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||Q===null||H===null||(re=to($,H),re!=null&&Ae.push(Lo($,re,Q))),pt)break;$=$.return}0<Ae.length&&(X=new ee(X,ye,null,l,ne),se.push({event:X,listeners:Ae}))}}if((r&7)===0){e:{if(X=i==="mouseover"||i==="pointerover",ee=i==="mouseout"||i==="pointerout",X&&l!==Se&&(ye=l.relatedTarget||l.fromElement)&&(vn(ye)||ye[Ma]))break e;if((ee||X)&&(X=ne.window===ne?ne:(X=ne.ownerDocument)?X.defaultView||X.parentWindow:window,ee?(ye=l.relatedTarget||l.toElement,ee=Y,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=Y),ee!==ye)){if(Ae=$g,re="onMouseLeave",H="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Ae=Pg,re="onPointerLeave",H="onPointerEnter",$="pointer"),pt=ee==null?X:ja(ee),Q=ye==null?X:ja(ye),X=new Ae(re,$+"leave",ee,l,ne),X.target=pt,X.relatedTarget=Q,re=null,vn(ne)===Y&&(Ae=new Ae(H,$+"enter",ye,l,ne),Ae.target=Q,Ae.relatedTarget=pt,re=Ae),pt=re,ee&&ye)t:{for(Ae=cN,H=ee,$=ye,Q=0,re=H;re;re=Ae(re))Q++;re=0;for(var ke=$;ke;ke=Ae(ke))re++;for(;0<Q-re;)H=Ae(H),Q--;for(;0<re-Q;)$=Ae($),re--;for(;Q--;){if(H===$||$!==null&&H===$.alternate){Ae=H;break t}H=Ae(H),$=Ae($)}Ae=null}else Ae=null;ee!==null&&jx(se,X,ee,Ae,!1),ye!==null&&pt!==null&&jx(se,pt,ye,Ae,!0)}}e:{if(X=Y?ja(Y):window,ee=X.nodeName&&X.nodeName.toLowerCase(),ee==="select"||ee==="input"&&X.type==="file")var tt=Xg;else if(Yg(X))if(Zg)tt=v_;else{tt=y_;var we=b_}else ee=X.nodeName,!ee||ee.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Y&&La(Y.elementType)&&(tt=Xg):tt=x_;if(tt&&(tt=tt(i,Y))){Vg(se,tt,l,ne);break e}we&&we(i,X,Y),i==="focusout"&&Y&&X.type==="number"&&Y.memoizedProps.value!=null&&ks(X,"number",X.value)}switch(we=Y?ja(Y):window,i){case"focusin":(Yg(we)||we.contentEditable==="true")&&(As=we,md=Y,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,ne);break;case"selectionchange":if(S_)break;case"keydown":case"keyup":rb(se,l,ne)}var Ue;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&&(Ue=Bg()):(za=ne,rd="value"in za?za.value:za.textContent,Cs=!0)),we=Tu(Y,Ve),0<we.length&&(Ve=new Fg(Ve,i,null,l,ne),se.push({event:Ve,listeners:we}),Ue?Ve.data=Ue:(Ue=Qg(l),Ue!==null&&(Ve.data=Ue)))),(Ue=d_?h_(i,l):m_(i,l))&&(Ve=Tu(Y,"onBeforeInput"),0<Ve.length&&(we=new Fg("onBeforeInput","beforeinput",null,l,ne),se.push({event:we,listeners:Ve}),we.data=Ue)),rN(se,i,Y,l,ne)}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 T=l,I=T.alternate,Y=T.stateNode;if(T=T.tag,I!==null&&I===u)break;T!==5&&T!==26&&T!==27||Y===null||(I=Y,p?(Y=to(l,b),Y!=null&&E.unshift(Lo(l,Y,I))):p||(Y=to(l,b),Y!=null&&E.push(Lo(l,Y,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=he);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=he);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 T=b=E=p=null,I=null,Y=null;for(u in l)if(l.hasOwnProperty(u)){var ne=l[u];if(ne!=null)switch(u){case"name":p=ne;break;case"type":E=ne;break;case"checked":I=ne;break;case"defaultChecked":Y=ne;break;case"value":b=ne;break;case"defaultValue":T=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(a(137,r));break;default:mt(i,r,u,ne,l,null)}}Rr(i,b,T,I,Y,E,p,!1);return;case"select":Ke("invalid",i),u=E=b=null;for(p in l)if(l.hasOwnProperty(p)&&(T=l[p],T!=null))switch(p){case"value":b=T;break;case"defaultValue":E=T;break;case"multiple":u=T;default:mt(i,r,p,T,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)&&(T=l[E],T!=null))switch(E){case"value":u=T;break;case"defaultValue":p=T;break;case"children":b=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(a(91));break;default:mt(i,r,E,T,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(Y in l)if(l.hasOwnProperty(Y)&&(u=l[Y],u!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,Y,u,l,null)}return;default:if(La(r)){for(ne in l)l.hasOwnProperty(ne)&&(u=l[ne],u!==void 0&&$h(i,r,ne,u,l,void 0));return}}for(T in l)l.hasOwnProperty(T)&&(u=l[T],u!=null&&mt(i,r,T,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,T=null,I=null,Y=null,ne=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 X in u){var ee=u[X];if(se=l[X],u.hasOwnProperty(X)&&(ee!=null||se!=null))switch(X){case"type":b=ee;break;case"name":p=ee;break;case"checked":Y=ee;break;case"defaultChecked":ne=ee;break;case"value":E=ee;break;case"defaultValue":T=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,r));break;default:ee!==se&&mt(i,r,X,ee,u,se)}}Wl(i,E,T,I,Y,ne,b,p);return;case"select":ee=E=T=X=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":X=b;break;case"defaultValue":T=b;break;case"multiple":E=b;default:b!==I&&mt(i,r,p,b,u,I)}r=T,l=E,u=ee,X!=null?rn(i,!!l,X,!1):!!u!=!!l&&(r!=null?rn(i,!!l,r,!0):rn(i,!!l,l?[]:"",!1));return;case"textarea":ee=X=null;for(T in l)if(p=l[T],l.hasOwnProperty(T)&&p!=null&&!u.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:mt(i,r,T,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":X=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,X,ee);return;case"option":for(var ye in l)if(X=l[ye],l.hasOwnProperty(ye)&&X!=null&&!u.hasOwnProperty(ye))switch(ye){case"selected":i.selected=!1;break;default:mt(i,r,ye,null,u,X)}for(I in u)if(X=u[I],ee=l[I],u.hasOwnProperty(I)&&X!==ee&&(X!=null||ee!=null))switch(I){case"selected":i.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:mt(i,r,I,X,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)X=l[Ae],l.hasOwnProperty(Ae)&&X!=null&&!u.hasOwnProperty(Ae)&&mt(i,r,Ae,null,u,X);for(Y in u)if(X=u[Y],ee=l[Y],u.hasOwnProperty(Y)&&X!==ee&&(X!=null||ee!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(a(137,r));break;default:mt(i,r,Y,X,u,ee)}return;default:if(La(r)){for(var pt in l)X=l[pt],l.hasOwnProperty(pt)&&X!==void 0&&!u.hasOwnProperty(pt)&&$h(i,r,pt,void 0,u,X);for(ne in u)X=u[ne],ee=l[ne],!u.hasOwnProperty(ne)||X===ee||X===void 0&&ee===void 0||$h(i,r,ne,X,u,ee);return}}for(var H in l)X=l[H],l.hasOwnProperty(H)&&X!=null&&!u.hasOwnProperty(H)&&mt(i,r,H,null,u,X);for(se in u)X=u[se],ee=l[se],!u.hasOwnProperty(se)||X===ee||X==null&&ee==null||mt(i,r,se,X,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,T=p.duration;if(b&&T&&Ix(E)){for(E=0,T=p.responseEnd,u+=1;u<l.length;u++){var I=l[u],Y=I.startTime;if(Y>T)break;var ne=I.transferSize,se=I.initiatorType;ne&&Ix(se)&&(I=I.responseEnd,E+=ne*(I<T?1:(T-Y)/(I-Y)))}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,T=b.nodeName;b[Ar]||T==="SCRIPT"||T==="STYLE"||T==="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 T={loading:0,preload:null};if(E=u.querySelector(zo(b)))T.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(Y,ne){I.onload=Y,I.onerror=ne}),I.addEventListener("load",function(){T.loading|=1}),I.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Ou(E,r,u)}E={type:"stylesheet",instance:E,count:1,state:T},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=xe.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(T,I){E.onload=T,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 T=u[E];if(T.dataset.precedence===r)b=T;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 T=u.get(E);T?T.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(T,I){E.onload=T,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:C,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function LN(i,r,l,u,p,b,E,T,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,T,I,Y,ne,se){return i=new LN(i,r,l,E,I,Y,ne,se,T),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 T=b;for(T.pendingLanes|=2,T.entangledLanes|=2;E;){var I=1<<31-lt(E);T.entanglements[1]|=I,E&=~I}qi(b),(at&6)===0&&(yu=Ot()+500,jo(0))}}break;case 31:case 13:T=Lr(b,2),T!==null&&In(T,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 te:return 2;case de: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);Se=u,l.target.dispatchEvent(u),Se=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 T=null;if(b&&b.hasAttribute("formAction")){if(p=b,E=b[fn]||null)T=E.formAction;else if(tm(p)!==null)continue}else T=E.action;typeof T=="function"?l[u+1]=T:(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,T=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&&(T=l.onRecoverableError),l.formState!==void 0&&(I=l.formState)),r=tv(i,1,!0,r,l??null,u,p,I,b,E,T,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();Ne(this,ts);Ne(this,ur);Ne(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(){Ne(this,fr,nk);Ne(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();Ne(this,yl,!0);Ne(this,dr);Ne(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 _;if(!o()){const N=new Ym(w);x(N),(_=e.onCancel)==null||_.call(e,N)}},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 _;a=N=>{(o()||h())&&w(N)},(_=e.onPause)==null||_.call(e)}).then(()=>{var w;a=void 0,o()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(o())return;let w;const _=n===0?e.initialPromise:void 0;try{w=_??e.fn()}catch(N){w=Promise.reject(N)}Promise.resolve(w).then(g).catch(N=>{var R;if(o())return;const j=e.retry??(rc.isServer()?0:3),C=e.retryDelay??pk,D=typeof C=="function"?C(n,N):C,F=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,N);if(t||!F){x(N);return}n++,(R=e.onFail)==null||R.call(e,n,N),ok(D).then(()=>h()?void 0:v()).then(()=>{t?x(N):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(){Ne(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();Ne(this,ii);Ne(this,is);Ne(this,vl);Ne(this,bi);Ne(this,as);Ne(this,nn);Ne(this,dc);Ne(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 $e(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){$e(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)||$e(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||$e(this,ii,Ea).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,y,g,x,v,S,w,_,N,j,C;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),R=(()=>{const q={client:z(this,as),queryKey:this.queryKey,meta:this.meta};return s(q),q})();return ge(this,rs,!1),this.options.persister?this.options.persister(D,R,this):D(R)},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))&&$e(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)=>{$e(this,ii,Ea).call(this,{type:"failed",failureCount:D,error:F})},onPause:()=>{$e(this,ii,Ea).call(this,{type:"pause"})},onContinue:()=>{$e(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 $e(this,ii,Ea).call(this,{type:"error",error:D}),(N=(_=z(this,bi).config).onError)==null||N.call(_,D,this),(C=(j=z(this,bi).config).onSettled)==null||C.call(j,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();Ne(this,rt);Ne(this,Un);Ne(this,We);Ne(this,hc);Ne(this,Sn);Ne(this,ss);Ne(this,El);Ne(this,Sa);Ne(this,hr);Ne(this,mc);Ne(this,Sl);Ne(this,wl);Ne(this,ls);Ne(this,os);Ne(this,mr);Ne(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)?$e(this,rt,Wo).call(this):this.updateResult(),$e(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,$e(this,rt,Jm).call(this),$e(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");$e(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)&&$e(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)))&&$e(this,rt,Vm).call(this);const o=$e(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))&&$e(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 $e(this,rt,Wo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,Sn)))}createResult(t,n){var Z;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 A=this.hasListeners(),P=!A&&Mv(t,n),G=A&&jv(t,a,n,s);(P||G)&&(g={...g,...kE(y.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:S,errorUpdatedAt:w,status:_}=g;v=g.data;let N=!1;if(n.placeholderData!==void 0&&v===void 0&&_==="pending"){let A;o!=null&&o.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(A=o.data,N=!0):A=typeof n.placeholderData=="function"?n.placeholderData((Z=z(this,wl))==null?void 0:Z.state.data,z(this,wl)):n.placeholderData,A!==void 0&&(_="success",v=Gm(o==null?void 0:o.data,A,n),x=!0)}if(n.select&&v!==void 0&&!N)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(A){ge(this,hr,A)}z(this,hr)&&(S=z(this,hr),v=z(this,Sl),w=Date.now(),_="error");const j=g.fetchStatus==="fetching",C=_==="pending",D=_==="error",F=C&&j,R=v!==void 0,U={status:_,fetchStatus:g.fetchStatus,isPending:C,isSuccess:_==="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:j,isRefetching:j&&!C,isLoadingError:D&&!R,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:D&&R,isStale:Dp(t,n),refetch:this.refetch,promise:z(this,Sa),isEnabled:yi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=U.data!==void 0,P=U.status==="error"&&!A,G=W=>{P?W.reject(U.error):A&&W.resolve(U.data)},le=()=>{const W=ge(this,Sa,U.promise=Qm());G(W)},ae=z(this,Sa);switch(ae.status){case"pending":t.queryHash===a.queryHash&&G(ae);break;case"fulfilled":(P||U.data!==ae.value)&&le();break;case"rejected":(!P||U.error!==ae.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)})};$e(this,rt,TE).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(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){$e(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(){$e(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){$e(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())&&$e(this,rt,Wo).call(this)},z(this,mr)))},Wm=function(){$e(this,rt,Vm).call(this),$e(this,rt,Zm).call(this,$e(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 _=C=>{fk(C,()=>t.signal,()=>w=!0)},N=EE(t.options,t.fetchOptions),j=async(C,D,F)=>{if(w)return Promise.reject();if(D==null&&C.pages.length)return Promise.resolve(C);const q=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:D,direction:F?"backward":"forward",meta:t.options.meta};return _(P),P})(),U=await N(q),{maxPages:Z}=t.options,A=F?uk:ck;return{pages:A(C.pages,U,Z),pageParams:A(C.pageParams,D,Z)}};if(s&&o.length){const C=s==="backward",D=C?vk:Lv,F={pages:o,pageParams:c},R=D(a,F);f=await j(F,R,C)}else{const C=e??o.length;do{const D=d===0?c[0]??a.initialPageParam:Lv(a,f);if(d>0&&D==null)break;f=await j(f,D),d++}while(d<C)}return f};t.options.persister?t.fetchFn=()=>{var w,_;return(_=(w=t.options).persister)==null?void 0:_.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();Ne(this,Qi);Ne(this,pc);Ne(this,Gi);Ne(this,mn);Ne(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,j,C,D,F,R,q;const n=()=>{$e(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,Z)=>{$e(this,Qi,or).call(this,{type:"failed",failureCount:U,error:Z})},onPause:()=>{$e(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{$e(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 Z=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,a));Z!==this.state.context&&$e(this,Qi,or).call(this,{type:"pending",context:Z,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)),$e(this,Qi,or).call(this,{type:"success",data:U}),U}catch(U){try{await((N=(_=z(this,mn).config).onError)==null?void 0:N.call(_,U,t,this.state.context,this,a))}catch(Z){Promise.reject(Z)}try{await((C=(j=this.options).onError)==null?void 0:C.call(j,U,t,this.state.context,a))}catch(Z){Promise.reject(Z)}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(Z){Promise.reject(Z)}try{await((q=(R=this.options).onSettled)==null?void 0:q.call(R,void 0,U,t,this.state.context,a))}catch(Z){Promise.reject(Z)}throw $e(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();Ne(this,wa);Ne(this,Oi);Ne(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();Ne(this,Ca);Ne(this,_a);Ne(this,pr);Ne(this,$n);Ne(this,Na);ge(this,_a,n),this.setOptions(a),this.bindMethods(),$e(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){$e(this,Ca,lf).call(this),$e(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),$e(this,Ca,lf).call(this),$e(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();Ne(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={}){Ne(this,zt);Ne(this,gr);Ne(this,br);Ne(this,Nl);Ne(this,kl);Ne(this,yr);Ne(this,Tl);Ne(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=M.createContext(void 0),Tn=e=>{const t=M.useContext(AE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},kk=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(AE.Provider,{value:e,children:t})),OE=M.createContext(!1),Tk=()=>M.useContext(OE);OE.Provider;function Ck(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ak=M.createContext(Ck()),Ok=()=>M.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=>{M.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]=M.useState(()=>new t(o,c)),y=h.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(_=>{const N=g?h.subscribe(Jt.batchCalls(_)):_n;return h.updateResult(),N},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),M.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 _=d?Iv(c,h,s):f==null?void 0:f.promise;_==null||_.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]=M.useState(()=>new wk(n,e));M.useEffect(()=>{a.setOptions(e)},[a,e]);const s=M.useSyncExternalStore(M.useCallback(c=>a.subscribe(Jt.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=M.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.
|
|
@@ -55,9 +55,9 @@ Error generating stack: `+u.message+`
|
|
|
55
55
|
* LICENSE.md file in the root directory of this source tree.
|
|
56
56
|
*
|
|
57
57
|
* @license MIT
|
|
58
|
-
*/var zv="popstate";function Bv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Bk(e={}){function t(a,s){var h;let o=(h=s.state)==null?void 0:h.masked,{pathname:c,search:f,hash:d}=o||a.location;return ap("",{pathname:c,search:f,hash:d},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:sc(s)}return $k(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ei(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Uk(){return Math.random().toString(36).substring(2,10)}function Uv(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ap(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Dl(t):t,state:n,key:t&&t.key||a||Uk(),unstable_mask:s}}function sc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Dl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function $k(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,c=s.history,f="POP",d=null,h=y();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function y(){return(c.state||{idx:null}).idx}function g(){f="POP";let _=y(),N=_==null?null:_-h;h=_,d&&d({action:f,location:w.location,delta:N})}function x(_,N){f="PUSH";let j=Bv(_)?_:ap(w.location,_,N);h=y()+1;let T=Uv(j,h),D=w.createHref(j.unstable_mask||j);try{c.pushState(T,"",D)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;s.location.assign(D)}o&&d&&d({action:f,location:w.location,delta:1})}function v(_,N){f="REPLACE";let j=Bv(_)?_:ap(w.location,_,N);h=y();let T=Uv(j,h),D=w.createHref(j.unstable_mask||j);c.replaceState(T,"",D),o&&d&&d({action:f,location:w.location,delta:0})}function S(_){return Fk(_)}let w={get action(){return f},get location(){return e(s,c)},listen(_){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(zv,g),d=_,()=>{s.removeEventListener(zv,g),d=null}},createHref(_){return t(s,_)},createURL:S,encodeLocation(_){let N=S(_);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:x,replace:v,go(_){return c.go(_)}};return w}function Fk(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:sc(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function RE(e,t,n="/"){return Pk(e,t,n,!1)}function Pk(e,t,n,a){let s=typeof t=="string"?Dl(t):t,o=Aa(s.pathname||"/",n);if(o==null)return null;let c=ME(e);qk(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let h=eT(o);f=Wk(c[d],h,a)}return f}function ME(e,t=[],n=[],a="",s=!1){let o=(c,f,d=s,h)=>{let y={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(a)&&d)return;Ct(y.relativePath.startsWith(a),`Absolute route path "${y.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(a.length)}let g=Ri([a,y.relativePath]),x=n.concat(y);c.children&&c.children.length>0&&(Ct(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),ME(c.children,t,x,g,d)),!(c.path==null&&!c.index)&&t.push({path:g,score:Xk(g,c.index),routesMeta:x})};return e.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))o(c,f);else for(let h of jE(c.path))o(c,f,!0,h)}),t}function jE(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return s?[o,""]:[o];let c=jE(a.join("/")),f=[];return f.push(...c.map(d=>d===""?o:[o,d].join("/"))),s&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function qk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Zk(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var Hk=/^:[\w-]+$/,Kk=3,Gk=2,Qk=1,Yk=10,Vk=-2,$v=e=>e==="*";function Xk(e,t){let n=e.split("/"),a=n.length;return n.some($v)&&(a+=Vk),t&&(a+=Gk),n.filter(s=>!$v(s)).reduce((s,o)=>s+(Hk.test(o)?Kk:o===""?Qk:Yk),a)}function Zk(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function Wk(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",c=[];for(let f=0;f<a.length;++f){let d=a[f],h=f===a.length-1,y=o==="/"?t:t.slice(o.length)||"/",g=bf({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},y),x=d.route;if(!g&&h&&n&&!a[a.length-1].route.index&&(g=bf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},y)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:Ri([o,g.pathname]),pathnameBase:aT(Ri([o,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(o=Ri([o,g.pathnameBase]))}return c}function bf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=Jk(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((h,{paramName:y,isOptional:g},x)=>{if(y==="*"){let S=f[x]||"";c=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const v=f[x];return g&&!v?h[y]=void 0:h[y]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:c,pattern:e}}function Jk(e,t=!1,n=!0){Ei(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,d,h,y)=>{if(a.push({paramName:f,isOptional:d!=null}),d){let g=y.charAt(h+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function eT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ei(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Aa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var tT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function nT(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?Dl(e):e,o;return n?(n=DE(n),n.startsWith("/")?o=Fv(n.substring(1),"/"):o=Fv(n,t)):o=t,{pathname:o,search:rT(a),hash:sT(s)}}function Fv(e,t){let n=yf(t).split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function fm(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function iT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Lp(e){let t=iT(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Of(e,t,n,a=!1){let s;typeof e=="string"?s=Dl(e):(s={...e},Ct(!s.pathname||!s.pathname.includes("?"),fm("?","pathname","search",s)),Ct(!s.pathname||!s.pathname.includes("#"),fm("#","pathname","hash",s)),Ct(!s.search||!s.search.includes("#"),fm("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,f;if(c==null)f=n;else{let g=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),g-=1;s.pathname=x.join("/")}f=g>=0?t[g]:"/"}let d=nT(s,f),h=c&&c!=="/"&&c.endsWith("/"),y=(o||c===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||y)&&(d.pathname+="/"),d}var DE=e=>e.replace(/\/\/+/g,"/"),Ri=e=>DE(e.join("/")),yf=e=>e.replace(/\/+$/,""),aT=e=>yf(e).replace(/^\/*/,"/"),rT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,sT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,lT=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function oT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function cT(e){let t=e.map(n=>n.route.path).filter(Boolean);return Ri(t)||"/"}var LE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function IE(e,t){let n=e;if(typeof n!="string"||!tT.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(LE)try{let o=new URL(window.location.href),c=n.startsWith("//")?new URL(o.protocol+n):new URL(n),f=Aa(c.pathname,t);c.origin===o.origin&&f!=null?n=f+c.search+c.hash:s=!0}catch{Ei(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zE=["POST","PUT","PATCH","DELETE"];new Set(zE);var uT=["GET",...zE];new Set(uT);var Ll=M.createContext(null);Ll.displayName="DataRouter";var Rf=M.createContext(null);Rf.displayName="DataRouterState";var BE=M.createContext(!1);function fT(){return M.useContext(BE)}var UE=M.createContext({isTransitioning:!1});UE.displayName="ViewTransition";var dT=M.createContext(new Map);dT.displayName="Fetchers";var hT=M.createContext(null);hT.displayName="Await";var si=M.createContext(null);si.displayName="Navigation";var bc=M.createContext(null);bc.displayName="Location";var wi=M.createContext({outlet:null,matches:[],isDataRoute:!1});wi.displayName="Route";var Ip=M.createContext(null);Ip.displayName="RouteError";var $E="REACT_ROUTER_ERROR",mT="REDIRECT",pT="ROUTE_ERROR_RESPONSE";function gT(e){if(e.startsWith(`${$E}:${mT}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function bT(e){if(e.startsWith(`${$E}:${pT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new lT(t.status,t.statusText,t.data)}catch{}}function yT(e,{relative:t}={}){Ct(Il(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=M.useContext(si),{hash:s,pathname:o,search:c}=yc(e,{relative:t}),f=o;return n!=="/"&&(f=o==="/"?n:Ri([n,o])),a.createHref({pathname:f,search:c,hash:s})}function Il(){return M.useContext(bc)!=null}function Di(){return Ct(Il(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(bc).location}var FE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function PE(e){M.useContext(si).static||M.useLayoutEffect(e)}function wr(){let{isDataRoute:e}=M.useContext(wi);return e?jT():xT()}function xT(){Ct(Il(),"useNavigate() may be used only in the context of a <Router> component.");let e=M.useContext(Ll),{basename:t,navigator:n}=M.useContext(si),{matches:a}=M.useContext(wi),{pathname:s}=Di(),o=JSON.stringify(Lp(a)),c=M.useRef(!1);return PE(()=>{c.current=!0}),M.useCallback((d,h={})=>{if(Ei(c.current,FE),!c.current)return;if(typeof d=="number"){n.go(d);return}let y=Of(d,JSON.parse(o),s,h.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Ri([t,y.pathname])),(h.replace?n.replace:n.push)(y,h.state,h)},[t,n,o,s,e])}var vT=M.createContext(null);function ET(e){let t=M.useContext(wi).outlet;return M.useMemo(()=>t&&M.createElement(vT.Provider,{value:e},t),[t,e])}function qE(){let{matches:e}=M.useContext(wi),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function yc(e,{relative:t}={}){let{matches:n}=M.useContext(wi),{pathname:a}=Di(),s=JSON.stringify(Lp(n));return M.useMemo(()=>Of(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function ST(e,t){return HE(e,t)}function HE(e,t,n){var _;Ct(Il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=M.useContext(si),{matches:s}=M.useContext(wi),o=s[s.length-1],c=o?o.params:{},f=o?o.pathname:"/",d=o?o.pathnameBase:"/",h=o&&o.route;{let N=h&&h.path||"";GE(f,!h||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
58
|
+
*/var zv="popstate";function Bv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Bk(e={}){function t(a,s){var h;let o=(h=s.state)==null?void 0:h.masked,{pathname:c,search:f,hash:d}=o||a.location;return ap("",{pathname:c,search:f,hash:d},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:sc(s)}return $k(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ei(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Uk(){return Math.random().toString(36).substring(2,10)}function Uv(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ap(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Dl(t):t,state:n,key:t&&t.key||a||Uk(),unstable_mask:s}}function sc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Dl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function $k(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,c=s.history,f="POP",d=null,h=y();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function y(){return(c.state||{idx:null}).idx}function g(){f="POP";let _=y(),N=_==null?null:_-h;h=_,d&&d({action:f,location:w.location,delta:N})}function x(_,N){f="PUSH";let j=Bv(_)?_:ap(w.location,_,N);h=y()+1;let C=Uv(j,h),D=w.createHref(j.unstable_mask||j);try{c.pushState(C,"",D)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;s.location.assign(D)}o&&d&&d({action:f,location:w.location,delta:1})}function v(_,N){f="REPLACE";let j=Bv(_)?_:ap(w.location,_,N);h=y();let C=Uv(j,h),D=w.createHref(j.unstable_mask||j);c.replaceState(C,"",D),o&&d&&d({action:f,location:w.location,delta:0})}function S(_){return Fk(_)}let w={get action(){return f},get location(){return e(s,c)},listen(_){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(zv,g),d=_,()=>{s.removeEventListener(zv,g),d=null}},createHref(_){return t(s,_)},createURL:S,encodeLocation(_){let N=S(_);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:x,replace:v,go(_){return c.go(_)}};return w}function Fk(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:sc(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function RE(e,t,n="/"){return Pk(e,t,n,!1)}function Pk(e,t,n,a){let s=typeof t=="string"?Dl(t):t,o=Aa(s.pathname||"/",n);if(o==null)return null;let c=ME(e);qk(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let h=eT(o);f=Wk(c[d],h,a)}return f}function ME(e,t=[],n=[],a="",s=!1){let o=(c,f,d=s,h)=>{let y={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(a)&&d)return;Ct(y.relativePath.startsWith(a),`Absolute route path "${y.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(a.length)}let g=Ri([a,y.relativePath]),x=n.concat(y);c.children&&c.children.length>0&&(Ct(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),ME(c.children,t,x,g,d)),!(c.path==null&&!c.index)&&t.push({path:g,score:Xk(g,c.index),routesMeta:x})};return e.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))o(c,f);else for(let h of jE(c.path))o(c,f,!0,h)}),t}function jE(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return s?[o,""]:[o];let c=jE(a.join("/")),f=[];return f.push(...c.map(d=>d===""?o:[o,d].join("/"))),s&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function qk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Zk(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var Hk=/^:[\w-]+$/,Kk=3,Gk=2,Qk=1,Yk=10,Vk=-2,$v=e=>e==="*";function Xk(e,t){let n=e.split("/"),a=n.length;return n.some($v)&&(a+=Vk),t&&(a+=Gk),n.filter(s=>!$v(s)).reduce((s,o)=>s+(Hk.test(o)?Kk:o===""?Qk:Yk),a)}function Zk(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function Wk(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",c=[];for(let f=0;f<a.length;++f){let d=a[f],h=f===a.length-1,y=o==="/"?t:t.slice(o.length)||"/",g=bf({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},y),x=d.route;if(!g&&h&&n&&!a[a.length-1].route.index&&(g=bf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},y)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:Ri([o,g.pathname]),pathnameBase:aT(Ri([o,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(o=Ri([o,g.pathnameBase]))}return c}function bf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=Jk(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((h,{paramName:y,isOptional:g},x)=>{if(y==="*"){let S=f[x]||"";c=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const v=f[x];return g&&!v?h[y]=void 0:h[y]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:c,pattern:e}}function Jk(e,t=!1,n=!0){Ei(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,d,h,y)=>{if(a.push({paramName:f,isOptional:d!=null}),d){let g=y.charAt(h+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function eT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ei(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Aa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var tT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function nT(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?Dl(e):e,o;return n?(n=DE(n),n.startsWith("/")?o=Fv(n.substring(1),"/"):o=Fv(n,t)):o=t,{pathname:o,search:rT(a),hash:sT(s)}}function Fv(e,t){let n=yf(t).split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function fm(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function iT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Lp(e){let t=iT(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Of(e,t,n,a=!1){let s;typeof e=="string"?s=Dl(e):(s={...e},Ct(!s.pathname||!s.pathname.includes("?"),fm("?","pathname","search",s)),Ct(!s.pathname||!s.pathname.includes("#"),fm("#","pathname","hash",s)),Ct(!s.search||!s.search.includes("#"),fm("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,f;if(c==null)f=n;else{let g=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),g-=1;s.pathname=x.join("/")}f=g>=0?t[g]:"/"}let d=nT(s,f),h=c&&c!=="/"&&c.endsWith("/"),y=(o||c===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||y)&&(d.pathname+="/"),d}var DE=e=>e.replace(/\/\/+/g,"/"),Ri=e=>DE(e.join("/")),yf=e=>e.replace(/\/+$/,""),aT=e=>yf(e).replace(/^\/*/,"/"),rT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,sT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,lT=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function oT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function cT(e){let t=e.map(n=>n.route.path).filter(Boolean);return Ri(t)||"/"}var LE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function IE(e,t){let n=e;if(typeof n!="string"||!tT.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(LE)try{let o=new URL(window.location.href),c=n.startsWith("//")?new URL(o.protocol+n):new URL(n),f=Aa(c.pathname,t);c.origin===o.origin&&f!=null?n=f+c.search+c.hash:s=!0}catch{Ei(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zE=["POST","PUT","PATCH","DELETE"];new Set(zE);var uT=["GET",...zE];new Set(uT);var Ll=M.createContext(null);Ll.displayName="DataRouter";var Rf=M.createContext(null);Rf.displayName="DataRouterState";var BE=M.createContext(!1);function fT(){return M.useContext(BE)}var UE=M.createContext({isTransitioning:!1});UE.displayName="ViewTransition";var dT=M.createContext(new Map);dT.displayName="Fetchers";var hT=M.createContext(null);hT.displayName="Await";var si=M.createContext(null);si.displayName="Navigation";var bc=M.createContext(null);bc.displayName="Location";var wi=M.createContext({outlet:null,matches:[],isDataRoute:!1});wi.displayName="Route";var Ip=M.createContext(null);Ip.displayName="RouteError";var $E="REACT_ROUTER_ERROR",mT="REDIRECT",pT="ROUTE_ERROR_RESPONSE";function gT(e){if(e.startsWith(`${$E}:${mT}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function bT(e){if(e.startsWith(`${$E}:${pT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new lT(t.status,t.statusText,t.data)}catch{}}function yT(e,{relative:t}={}){Ct(Il(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=M.useContext(si),{hash:s,pathname:o,search:c}=yc(e,{relative:t}),f=o;return n!=="/"&&(f=o==="/"?n:Ri([n,o])),a.createHref({pathname:f,search:c,hash:s})}function Il(){return M.useContext(bc)!=null}function Di(){return Ct(Il(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(bc).location}var FE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function PE(e){M.useContext(si).static||M.useLayoutEffect(e)}function wr(){let{isDataRoute:e}=M.useContext(wi);return e?jT():xT()}function xT(){Ct(Il(),"useNavigate() may be used only in the context of a <Router> component.");let e=M.useContext(Ll),{basename:t,navigator:n}=M.useContext(si),{matches:a}=M.useContext(wi),{pathname:s}=Di(),o=JSON.stringify(Lp(a)),c=M.useRef(!1);return PE(()=>{c.current=!0}),M.useCallback((d,h={})=>{if(Ei(c.current,FE),!c.current)return;if(typeof d=="number"){n.go(d);return}let y=Of(d,JSON.parse(o),s,h.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Ri([t,y.pathname])),(h.replace?n.replace:n.push)(y,h.state,h)},[t,n,o,s,e])}var vT=M.createContext(null);function ET(e){let t=M.useContext(wi).outlet;return M.useMemo(()=>t&&M.createElement(vT.Provider,{value:e},t),[t,e])}function qE(){let{matches:e}=M.useContext(wi),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function yc(e,{relative:t}={}){let{matches:n}=M.useContext(wi),{pathname:a}=Di(),s=JSON.stringify(Lp(n));return M.useMemo(()=>Of(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function ST(e,t){return HE(e,t)}function HE(e,t,n){var _;Ct(Il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=M.useContext(si),{matches:s}=M.useContext(wi),o=s[s.length-1],c=o?o.params:{},f=o?o.pathname:"/",d=o?o.pathnameBase:"/",h=o&&o.route;{let N=h&&h.path||"";GE(f,!h||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
59
|
|
|
60
|
-
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let y=Di(),g;if(t){let N=typeof t=="string"?Dl(t):t;Ct(d==="/"||((_=N.pathname)==null?void 0:_.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${N.pathname}" was given in the \`location\` prop.`),g=N}else g=y;let x=g.pathname||"/",v=x;if(d!=="/"){let N=d.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(N.length).join("/")}let S=RE(e,{pathname:v});Ei(h||S!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ei(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=TT(S&&S.map(N=>Object.assign({},N,{params:Object.assign({},c,N.params),pathname:Ri([d,a.encodeLocation?a.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?d:Ri([d,a.encodeLocation?a.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),s,n);return t&&w?M.createElement(bc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},w):w}function wT(){let e=MT(),t=oT(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:o},"ErrorBoundary")," or"," ",M.createElement("code",{style:o},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),n?M.createElement("pre",{style:s},n):null,c)}var _T=M.createElement(wT,null),KE=class extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=bT(e.digest);n&&(e=n)}let t=e!==void 0?M.createElement(wi.Provider,{value:this.props.routeContext},M.createElement(Ip.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?M.createElement(NT,{error:e},t):t}};KE.contextType=BE;var dm=new WeakMap;function NT({children:e,error:t}){let{basename:n}=M.useContext(si);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=gT(t.digest);if(a){let s=dm.get(t);if(s)throw s;let o=IE(a.location,n);if(LE&&!dm.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw dm.set(t,c),c}return M.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function kT({routeContext:e,match:t,children:n}){let a=M.useContext(Ll);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(wi.Provider,{value:e},n)}function TT(e,t=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,o=a==null?void 0:a.errors;if(o!=null){let y=s.findIndex(g=>g.route.id&&(o==null?void 0:o[g.route.id])!==void 0);Ct(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,f=-1;if(n&&a){c=a.renderFallback;for(let y=0;y<s.length;y++){let g=s[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=y),g.route.id){let{loaderData:x,errors:v}=a,S=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!v||v[g.route.id]===void 0);if(g.route.lazy||S){n.isStatic&&(c=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let d=n==null?void 0:n.onError,h=a&&d?(y,g)=>{var x,v;d(y,{location:a.location,params:((v=(x=a.matches)==null?void 0:x[0])==null?void 0:v.params)??{},unstable_pattern:cT(a.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,x)=>{let v,S=!1,w=null,_=null;a&&(v=o&&g.route.id?o[g.route.id]:void 0,w=g.route.errorElement||_T,c&&(f<0&&x===0?(GE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,_=null):f===x&&(S=!0,_=g.route.hydrateFallbackElement||null)));let N=t.concat(s.slice(0,x+1)),j=()=>{let T;return v?T=w:S?T=_:g.route.Component?T=M.createElement(g.route.Component,null):g.route.element?T=g.route.element:T=y,M.createElement(kT,{match:g,routeContext:{outlet:y,matches:N,isDataRoute:a!=null},children:T})};return a&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?M.createElement(KE,{location:a.location,revalidation:a.revalidation,component:w,error:v,children:j(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:h}):j()},null)}function zp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function CT(e){let t=M.useContext(Ll);return Ct(t,zp(e)),t}function AT(e){let t=M.useContext(Rf);return Ct(t,zp(e)),t}function OT(e){let t=M.useContext(wi);return Ct(t,zp(e)),t}function Bp(e){let t=OT(e),n=t.matches[t.matches.length-1];return Ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function RT(){return Bp("useRouteId")}function MT(){var a;let e=M.useContext(Ip),t=AT("useRouteError"),n=Bp("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function jT(){let{router:e}=CT("useNavigate"),t=Bp("useNavigate"),n=M.useRef(!1);return PE(()=>{n.current=!0}),M.useCallback(async(s,o={})=>{Ei(n.current,FE),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var Pv={};function GE(e,t,n){!t&&!Pv[e]&&(Pv[e]=!0,Ei(!1,n))}M.memo(DT);function DT({routes:e,future:t,state:n,isStatic:a,onError:s}){return HE(e,void 0,{state:n,isStatic:a,onError:s})}function LT({to:e,replace:t,state:n,relative:a}){Ct(Il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=M.useContext(si);Ei(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=M.useContext(wi),{pathname:c}=Di(),f=wr(),d=Of(e,Lp(o),c,a==="path"),h=JSON.stringify(d);return M.useEffect(()=>{f(JSON.parse(h),{replace:t,state:n,relative:a})},[f,h,a,t,n]),null}function IT(e){return ET(e.context)}function zn(e){Ct(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function zT({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){Ct(!Il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=M.useMemo(()=>({basename:f,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[f,s,o,c]);typeof n=="string"&&(n=Dl(n));let{pathname:h="/",search:y="",hash:g="",state:x=null,key:v="default",unstable_mask:S}=n,w=M.useMemo(()=>{let _=Aa(h,f);return _==null?null:{location:{pathname:_,search:y,hash:g,state:x,key:v,unstable_mask:S},navigationType:a}},[f,h,y,g,x,v,a,S]);return Ei(w!=null,`<Router basename="${f}"> is not able to match the URL "${h}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:M.createElement(si.Provider,{value:d},M.createElement(bc.Provider,{children:t,value:w}))}function BT({children:e,location:t}){return ST(rp(e),t)}function rp(e,t=[]){let n=[];return M.Children.forEach(e,(a,s)=>{if(!M.isValidElement(a))return;let o=[...t,s];if(a.type===M.Fragment){n.push.apply(n,rp(a.props.children,o));return}Ct(a.type===zn,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ct(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=rp(a.props.children,o)),n.push(c)}),n}var of="get",cf="application/x-www-form-urlencoded";function Mf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function UT(e){return Mf(e)&&e.tagName.toLowerCase()==="button"}function $T(e){return Mf(e)&&e.tagName.toLowerCase()==="form"}function FT(e){return Mf(e)&&e.tagName.toLowerCase()==="input"}function PT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qT(e,t){return e.button===0&&(!t||t==="_self")&&!PT(e)}function sp(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function HT(e,t){let n=sp(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var Hu=null;function KT(){if(Hu===null)try{new FormData(document.createElement("form"),0),Hu=!1}catch{Hu=!0}return Hu}var GT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hm(e){return e!=null&&!GT.has(e)?(Ei(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${cf}"`),null):e}function QT(e,t){let n,a,s,o,c;if($T(e)){let f=e.getAttribute("action");a=f?Aa(f,t):null,n=e.getAttribute("method")||of,s=hm(e.getAttribute("enctype"))||cf,o=new FormData(e)}else if(UT(e)||FT(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(a=d?Aa(d,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||of,s=hm(e.getAttribute("formenctype"))||hm(f.getAttribute("enctype"))||cf,o=new FormData(f,e),!KT()){let{name:h,type:y,value:g}=e;if(y==="image"){let x=h?`${h}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else h&&o.append(h,g)}}else{if(Mf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=of,a=null,s=cf,c=e}return o&&s==="text/plain"&&(c=o,o=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Up(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function QE(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Aa(s.pathname,t)==="/"?s.pathname=`${yf(t)}/_root.${a}`:s.pathname=`${yf(s.pathname)}.${a}`,s}async function YT(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function VT(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function XT(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let c=await YT(o,n);return c.links?c.links():[]}return[]}));return eC(a.flat(1).filter(VT).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function qv(e,t,n,a,s,o){let c=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,f=(d,h)=>{var y;return n[h].pathname!==d.pathname||((y=n[h].route.path)==null?void 0:y.endsWith("*"))&&n[h].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,h)=>c(d,h)||f(d,h)):o==="data"?t.filter((d,h)=>{var g;let y=a.routes[d.route.id];if(!y||!y.hasLoader)return!1;if(c(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let x=d.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function ZT(e,t,{includeHydrateFallback:n}={}){return WT(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function WT(e){return[...new Set(e)]}function JT(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function eC(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(JT(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function $p(){let e=M.useContext(Ll);return Up(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function tC(){let e=M.useContext(Rf);return Up(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Fp=M.createContext(void 0);Fp.displayName="FrameworkContext";function Pp(){let e=M.useContext(Fp);return Up(e,"You must render this element inside a <HydratedRouter> element"),e}function nC(e,t){let n=M.useContext(Fp),[a,s]=M.useState(!1),[o,c]=M.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:y,onTouchStart:g}=t,x=M.useRef(null);M.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=N=>{N.forEach(j=>{c(j.isIntersecting)})},_=new IntersectionObserver(w,{threshold:.5});return x.current&&_.observe(x.current),()=>{_.disconnect()}}},[e]),M.useEffect(()=>{if(a){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[a]);let v=()=>{s(!0)},S=()=>{s(!1),c(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Ko(f,v),onBlur:Ko(d,S),onMouseEnter:Ko(h,v),onMouseLeave:Ko(y,S),onTouchStart:Ko(g,v)}]:[!1,x,{}]}function Ko(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function iC({page:e,...t}){let n=fT(),{router:a}=$p(),s=M.useMemo(()=>RE(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?M.createElement(rC,{page:e,matches:s,...t}):M.createElement(sC,{page:e,matches:s,...t}):null}function aC(e){let{manifest:t,routeModules:n}=Pp(),[a,s]=M.useState([]);return M.useEffect(()=>{let o=!1;return XT(e,t,n).then(c=>{o||s(c)}),()=>{o=!0}},[e,t,n]),a}function rC({page:e,matches:t,...n}){let a=Di(),{future:s}=Pp(),{basename:o}=$p(),c=M.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=QE(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),d=!1,h=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?d=!0:h.push(y.route.id);return d&&h.length>0&&f.searchParams.set("_routes",h.join(",")),[f.pathname+f.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return M.createElement(M.Fragment,null,c.map(f=>M.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...n})))}function sC({page:e,matches:t,...n}){let a=Di(),{future:s,manifest:o,routeModules:c}=Pp(),{basename:f}=$p(),{loaderData:d,matches:h}=tC(),y=M.useMemo(()=>qv(e,t,h,o,a,"data"),[e,t,h,o,a]),g=M.useMemo(()=>qv(e,t,h,o,a,"assets"),[e,t,h,o,a]),x=M.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,_=!1;if(t.forEach(j=>{var D;let T=o.routes[j.route.id];!T||!T.hasLoader||(!y.some(F=>F.route.id===j.route.id)&&j.route.id in d&&((D=c[j.route.id])!=null&&D.shouldRevalidate)||T.hasClientLoader?_=!0:w.add(j.route.id))}),w.size===0)return[];let N=QE(e,f,s.unstable_trailingSlashAwareDataRequests,"data");return _&&w.size>0&&N.searchParams.set("_routes",t.filter(j=>w.has(j.route.id)).map(j=>j.route.id).join(",")),[N.pathname+N.search]},[f,s.unstable_trailingSlashAwareDataRequests,d,a,o,y,t,e,c]),v=M.useMemo(()=>ZT(g,o),[g,o]),S=aC(g);return M.createElement(M.Fragment,null,x.map(w=>M.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),v.map(w=>M.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),S.map(({key:w,link:_})=>M.createElement("link",{key:w,nonce:n.nonce,..._,crossOrigin:_.crossOrigin??n.crossOrigin})))}function lC(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var oC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oC&&(window.__reactRouterVersion="7.14.2")}catch{}function cC({basename:e,children:t,unstable_useTransitions:n,window:a}){let s=M.useRef();s.current==null&&(s.current=Bk({window:a,v5Compat:!0}));let o=s.current,[c,f]=M.useState({action:o.action,location:o.location}),d=M.useCallback(h=>{n===!1?f(h):M.startTransition(()=>f(h))},[n]);return M.useLayoutEffect(()=>o.listen(d),[o,d]),M.createElement(zT,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:n})}var YE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ji=M.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:c,unstable_mask:f,state:d,target:h,to:y,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:v,...S},w){let{basename:_,navigator:N,unstable_useTransitions:j}=M.useContext(si),T=typeof y=="string"&&YE.test(y),D=IE(y,_);y=D.to;let F=yT(y,{relative:s}),R=Di(),H=null;if(f){let Q=Of(f,[],R.unstable_mask?R.unstable_mask.pathname:"/",!0);_!=="/"&&(Q.pathname=Q.pathname==="/"?_:Ri([_,Q.pathname])),H=N.createHref(Q)}let[U,J,A]=nC(a,S),P=dC(y,{replace:c,unstable_mask:f,state:d,target:h,preventScrollReset:g,relative:s,viewTransition:x,unstable_defaultShouldRevalidate:v,unstable_useTransitions:j});function Y(Q){t&&t(Q),Q.defaultPrevented||P(Q)}let le=!(D.isExternal||o),q=M.createElement("a",{...S,...A,href:(le?H:void 0)||D.absoluteURL||F,onClick:le?Y:t,ref:lC(w,J),target:h,"data-discover":!T&&n==="render"?"true":void 0});return U&&!T?M.createElement(M.Fragment,null,q,M.createElement(iC,{page:F})):q});ji.displayName="Link";var VE=M.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:c,viewTransition:f,children:d,...h},y){let g=yc(c,{relative:h.relative}),x=Di(),v=M.useContext(Rf),{navigator:S,basename:w}=M.useContext(si),_=v!=null&&bC(g)&&f===!0,N=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,j=x.pathname,T=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(j=j.toLowerCase(),T=T?T.toLowerCase():null,N=N.toLowerCase()),T&&w&&(T=Aa(T,w)||T);const D=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let F=j===N||!s&&j.startsWith(N)&&j.charAt(D)==="/",R=T!=null&&(T===N||!s&&T.startsWith(N)&&T.charAt(N.length)==="/"),H={isActive:F,isPending:R,isTransitioning:_},U=F?t:void 0,J;typeof a=="function"?J=a(H):J=[a,F?"active":null,R?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let A=typeof o=="function"?o(H):o;return M.createElement(ji,{...h,"aria-current":U,className:J,ref:y,style:A,to:c,viewTransition:f},typeof d=="function"?d(H):d)});VE.displayName="NavLink";var uC=M.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:c=of,action:f,onSubmit:d,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:x,...v},S)=>{let{unstable_useTransitions:w}=M.useContext(si),_=pC(),N=gC(f,{relative:h}),j=c.toLowerCase()==="get"?"get":"post",T=typeof f=="string"&&YE.test(f),D=F=>{if(d&&d(F),F.defaultPrevented)return;F.preventDefault();let R=F.nativeEvent.submitter,H=(R==null?void 0:R.getAttribute("formmethod"))||c,U=()=>_(R||F.currentTarget,{fetcherKey:t,method:H,navigate:n,replace:s,state:o,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:x});w&&n!==!1?M.startTransition(()=>U()):U()};return M.createElement("form",{ref:S,method:j,action:N,onSubmit:a?d:D,...v,"data-discover":!T&&e==="render"?"true":void 0})});uC.displayName="Form";function fC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function XE(e){let t=M.useContext(Ll);return Ct(t,fC(e)),t}function dC(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h}={}){let y=wr(),g=Di(),x=yc(e,{relative:c});return M.useCallback(v=>{if(qT(v,t)){v.preventDefault();let S=n!==void 0?n:sc(g)===sc(x),w=()=>y(e,{replace:S,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d});h?M.startTransition(()=>w()):w()}},[g,y,x,n,a,s,t,e,o,c,f,d,h])}function jf(e){Ei(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=M.useRef(sp(e)),n=M.useRef(!1),a=Di(),s=M.useMemo(()=>HT(a.search,n.current?null:t.current),[a.search]),o=wr(),c=M.useCallback((f,d)=>{const h=sp(typeof f=="function"?f(new URLSearchParams(s)):f);n.current=!0,o("?"+h,d)},[o,s]);return[s,c]}var hC=0,mC=()=>`__${String(++hC)}__`;function pC(){let{router:e}=XE("useSubmit"),{basename:t}=M.useContext(si),n=RT(),a=e.fetch,s=e.navigate;return M.useCallback(async(o,c={})=>{let{action:f,method:d,encType:h,formData:y,body:g}=QT(o,t);if(c.navigate===!1){let x=c.fetcherKey||mC();await a(x,n,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||h,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,n])}function gC(e,{relative:t}={}){let{basename:n}=M.useContext(si),a=M.useContext(wi);Ct(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...yc(e||".",{relative:t})},c=Di();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),d=f.getAll("index");if(d.some(y=>y==="")){f.delete("index"),d.filter(g=>g).forEach(g=>f.append("index",g));let y=f.toString();o.search=y?`?${y}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Ri([n,o.pathname])),sc(o)}function bC(e,{relative:t}={}){let n=M.useContext(UE);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=XE("useViewTransitionState"),s=yc(e,{relative:t});if(!n.isTransitioning)return!1;let o=Aa(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Aa(n.nextLocation.pathname,a)||n.nextLocation.pathname;return bf(s.pathname,c)!=null||bf(s.pathname,o)!=null}/**
|
|
60
|
+
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let y=Di(),g;if(t){let N=typeof t=="string"?Dl(t):t;Ct(d==="/"||((_=N.pathname)==null?void 0:_.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${N.pathname}" was given in the \`location\` prop.`),g=N}else g=y;let x=g.pathname||"/",v=x;if(d!=="/"){let N=d.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(N.length).join("/")}let S=RE(e,{pathname:v});Ei(h||S!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ei(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=TT(S&&S.map(N=>Object.assign({},N,{params:Object.assign({},c,N.params),pathname:Ri([d,a.encodeLocation?a.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?d:Ri([d,a.encodeLocation?a.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),s,n);return t&&w?M.createElement(bc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},w):w}function wT(){let e=MT(),t=oT(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:o},"ErrorBoundary")," or"," ",M.createElement("code",{style:o},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),n?M.createElement("pre",{style:s},n):null,c)}var _T=M.createElement(wT,null),KE=class extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=bT(e.digest);n&&(e=n)}let t=e!==void 0?M.createElement(wi.Provider,{value:this.props.routeContext},M.createElement(Ip.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?M.createElement(NT,{error:e},t):t}};KE.contextType=BE;var dm=new WeakMap;function NT({children:e,error:t}){let{basename:n}=M.useContext(si);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=gT(t.digest);if(a){let s=dm.get(t);if(s)throw s;let o=IE(a.location,n);if(LE&&!dm.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw dm.set(t,c),c}return M.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function kT({routeContext:e,match:t,children:n}){let a=M.useContext(Ll);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(wi.Provider,{value:e},n)}function TT(e,t=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,o=a==null?void 0:a.errors;if(o!=null){let y=s.findIndex(g=>g.route.id&&(o==null?void 0:o[g.route.id])!==void 0);Ct(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,f=-1;if(n&&a){c=a.renderFallback;for(let y=0;y<s.length;y++){let g=s[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=y),g.route.id){let{loaderData:x,errors:v}=a,S=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!v||v[g.route.id]===void 0);if(g.route.lazy||S){n.isStatic&&(c=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let d=n==null?void 0:n.onError,h=a&&d?(y,g)=>{var x,v;d(y,{location:a.location,params:((v=(x=a.matches)==null?void 0:x[0])==null?void 0:v.params)??{},unstable_pattern:cT(a.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,x)=>{let v,S=!1,w=null,_=null;a&&(v=o&&g.route.id?o[g.route.id]:void 0,w=g.route.errorElement||_T,c&&(f<0&&x===0?(GE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,_=null):f===x&&(S=!0,_=g.route.hydrateFallbackElement||null)));let N=t.concat(s.slice(0,x+1)),j=()=>{let C;return v?C=w:S?C=_:g.route.Component?C=M.createElement(g.route.Component,null):g.route.element?C=g.route.element:C=y,M.createElement(kT,{match:g,routeContext:{outlet:y,matches:N,isDataRoute:a!=null},children:C})};return a&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?M.createElement(KE,{location:a.location,revalidation:a.revalidation,component:w,error:v,children:j(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:h}):j()},null)}function zp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function CT(e){let t=M.useContext(Ll);return Ct(t,zp(e)),t}function AT(e){let t=M.useContext(Rf);return Ct(t,zp(e)),t}function OT(e){let t=M.useContext(wi);return Ct(t,zp(e)),t}function Bp(e){let t=OT(e),n=t.matches[t.matches.length-1];return Ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function RT(){return Bp("useRouteId")}function MT(){var a;let e=M.useContext(Ip),t=AT("useRouteError"),n=Bp("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function jT(){let{router:e}=CT("useNavigate"),t=Bp("useNavigate"),n=M.useRef(!1);return PE(()=>{n.current=!0}),M.useCallback(async(s,o={})=>{Ei(n.current,FE),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var Pv={};function GE(e,t,n){!t&&!Pv[e]&&(Pv[e]=!0,Ei(!1,n))}M.memo(DT);function DT({routes:e,future:t,state:n,isStatic:a,onError:s}){return HE(e,void 0,{state:n,isStatic:a,onError:s})}function LT({to:e,replace:t,state:n,relative:a}){Ct(Il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=M.useContext(si);Ei(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=M.useContext(wi),{pathname:c}=Di(),f=wr(),d=Of(e,Lp(o),c,a==="path"),h=JSON.stringify(d);return M.useEffect(()=>{f(JSON.parse(h),{replace:t,state:n,relative:a})},[f,h,a,t,n]),null}function IT(e){return ET(e.context)}function zn(e){Ct(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function zT({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){Ct(!Il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=M.useMemo(()=>({basename:f,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[f,s,o,c]);typeof n=="string"&&(n=Dl(n));let{pathname:h="/",search:y="",hash:g="",state:x=null,key:v="default",unstable_mask:S}=n,w=M.useMemo(()=>{let _=Aa(h,f);return _==null?null:{location:{pathname:_,search:y,hash:g,state:x,key:v,unstable_mask:S},navigationType:a}},[f,h,y,g,x,v,a,S]);return Ei(w!=null,`<Router basename="${f}"> is not able to match the URL "${h}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:M.createElement(si.Provider,{value:d},M.createElement(bc.Provider,{children:t,value:w}))}function BT({children:e,location:t}){return ST(rp(e),t)}function rp(e,t=[]){let n=[];return M.Children.forEach(e,(a,s)=>{if(!M.isValidElement(a))return;let o=[...t,s];if(a.type===M.Fragment){n.push.apply(n,rp(a.props.children,o));return}Ct(a.type===zn,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ct(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=rp(a.props.children,o)),n.push(c)}),n}var of="get",cf="application/x-www-form-urlencoded";function Mf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function UT(e){return Mf(e)&&e.tagName.toLowerCase()==="button"}function $T(e){return Mf(e)&&e.tagName.toLowerCase()==="form"}function FT(e){return Mf(e)&&e.tagName.toLowerCase()==="input"}function PT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qT(e,t){return e.button===0&&(!t||t==="_self")&&!PT(e)}function sp(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function HT(e,t){let n=sp(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var Hu=null;function KT(){if(Hu===null)try{new FormData(document.createElement("form"),0),Hu=!1}catch{Hu=!0}return Hu}var GT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hm(e){return e!=null&&!GT.has(e)?(Ei(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${cf}"`),null):e}function QT(e,t){let n,a,s,o,c;if($T(e)){let f=e.getAttribute("action");a=f?Aa(f,t):null,n=e.getAttribute("method")||of,s=hm(e.getAttribute("enctype"))||cf,o=new FormData(e)}else if(UT(e)||FT(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(a=d?Aa(d,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||of,s=hm(e.getAttribute("formenctype"))||hm(f.getAttribute("enctype"))||cf,o=new FormData(f,e),!KT()){let{name:h,type:y,value:g}=e;if(y==="image"){let x=h?`${h}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else h&&o.append(h,g)}}else{if(Mf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=of,a=null,s=cf,c=e}return o&&s==="text/plain"&&(c=o,o=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Up(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function QE(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Aa(s.pathname,t)==="/"?s.pathname=`${yf(t)}/_root.${a}`:s.pathname=`${yf(s.pathname)}.${a}`,s}async function YT(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function VT(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function XT(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let c=await YT(o,n);return c.links?c.links():[]}return[]}));return eC(a.flat(1).filter(VT).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function qv(e,t,n,a,s,o){let c=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,f=(d,h)=>{var y;return n[h].pathname!==d.pathname||((y=n[h].route.path)==null?void 0:y.endsWith("*"))&&n[h].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,h)=>c(d,h)||f(d,h)):o==="data"?t.filter((d,h)=>{var g;let y=a.routes[d.route.id];if(!y||!y.hasLoader)return!1;if(c(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let x=d.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function ZT(e,t,{includeHydrateFallback:n}={}){return WT(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function WT(e){return[...new Set(e)]}function JT(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function eC(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(JT(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function $p(){let e=M.useContext(Ll);return Up(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function tC(){let e=M.useContext(Rf);return Up(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Fp=M.createContext(void 0);Fp.displayName="FrameworkContext";function Pp(){let e=M.useContext(Fp);return Up(e,"You must render this element inside a <HydratedRouter> element"),e}function nC(e,t){let n=M.useContext(Fp),[a,s]=M.useState(!1),[o,c]=M.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:y,onTouchStart:g}=t,x=M.useRef(null);M.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=N=>{N.forEach(j=>{c(j.isIntersecting)})},_=new IntersectionObserver(w,{threshold:.5});return x.current&&_.observe(x.current),()=>{_.disconnect()}}},[e]),M.useEffect(()=>{if(a){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[a]);let v=()=>{s(!0)},S=()=>{s(!1),c(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Ko(f,v),onBlur:Ko(d,S),onMouseEnter:Ko(h,v),onMouseLeave:Ko(y,S),onTouchStart:Ko(g,v)}]:[!1,x,{}]}function Ko(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function iC({page:e,...t}){let n=fT(),{router:a}=$p(),s=M.useMemo(()=>RE(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?M.createElement(rC,{page:e,matches:s,...t}):M.createElement(sC,{page:e,matches:s,...t}):null}function aC(e){let{manifest:t,routeModules:n}=Pp(),[a,s]=M.useState([]);return M.useEffect(()=>{let o=!1;return XT(e,t,n).then(c=>{o||s(c)}),()=>{o=!0}},[e,t,n]),a}function rC({page:e,matches:t,...n}){let a=Di(),{future:s}=Pp(),{basename:o}=$p(),c=M.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=QE(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),d=!1,h=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?d=!0:h.push(y.route.id);return d&&h.length>0&&f.searchParams.set("_routes",h.join(",")),[f.pathname+f.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return M.createElement(M.Fragment,null,c.map(f=>M.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...n})))}function sC({page:e,matches:t,...n}){let a=Di(),{future:s,manifest:o,routeModules:c}=Pp(),{basename:f}=$p(),{loaderData:d,matches:h}=tC(),y=M.useMemo(()=>qv(e,t,h,o,a,"data"),[e,t,h,o,a]),g=M.useMemo(()=>qv(e,t,h,o,a,"assets"),[e,t,h,o,a]),x=M.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,_=!1;if(t.forEach(j=>{var D;let C=o.routes[j.route.id];!C||!C.hasLoader||(!y.some(F=>F.route.id===j.route.id)&&j.route.id in d&&((D=c[j.route.id])!=null&&D.shouldRevalidate)||C.hasClientLoader?_=!0:w.add(j.route.id))}),w.size===0)return[];let N=QE(e,f,s.unstable_trailingSlashAwareDataRequests,"data");return _&&w.size>0&&N.searchParams.set("_routes",t.filter(j=>w.has(j.route.id)).map(j=>j.route.id).join(",")),[N.pathname+N.search]},[f,s.unstable_trailingSlashAwareDataRequests,d,a,o,y,t,e,c]),v=M.useMemo(()=>ZT(g,o),[g,o]),S=aC(g);return M.createElement(M.Fragment,null,x.map(w=>M.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),v.map(w=>M.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),S.map(({key:w,link:_})=>M.createElement("link",{key:w,nonce:n.nonce,..._,crossOrigin:_.crossOrigin??n.crossOrigin})))}function lC(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var oC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oC&&(window.__reactRouterVersion="7.14.2")}catch{}function cC({basename:e,children:t,unstable_useTransitions:n,window:a}){let s=M.useRef();s.current==null&&(s.current=Bk({window:a,v5Compat:!0}));let o=s.current,[c,f]=M.useState({action:o.action,location:o.location}),d=M.useCallback(h=>{n===!1?f(h):M.startTransition(()=>f(h))},[n]);return M.useLayoutEffect(()=>o.listen(d),[o,d]),M.createElement(zT,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:n})}var YE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ji=M.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:c,unstable_mask:f,state:d,target:h,to:y,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:v,...S},w){let{basename:_,navigator:N,unstable_useTransitions:j}=M.useContext(si),C=typeof y=="string"&&YE.test(y),D=IE(y,_);y=D.to;let F=yT(y,{relative:s}),R=Di(),q=null;if(f){let W=Of(f,[],R.unstable_mask?R.unstable_mask.pathname:"/",!0);_!=="/"&&(W.pathname=W.pathname==="/"?_:Ri([_,W.pathname])),q=N.createHref(W)}let[U,Z,A]=nC(a,S),P=dC(y,{replace:c,unstable_mask:f,state:d,target:h,preventScrollReset:g,relative:s,viewTransition:x,unstable_defaultShouldRevalidate:v,unstable_useTransitions:j});function G(W){t&&t(W),W.defaultPrevented||P(W)}let le=!(D.isExternal||o),ae=M.createElement("a",{...S,...A,href:(le?q:void 0)||D.absoluteURL||F,onClick:le?G:t,ref:lC(w,Z),target:h,"data-discover":!C&&n==="render"?"true":void 0});return U&&!C?M.createElement(M.Fragment,null,ae,M.createElement(iC,{page:F})):ae});ji.displayName="Link";var VE=M.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:c,viewTransition:f,children:d,...h},y){let g=yc(c,{relative:h.relative}),x=Di(),v=M.useContext(Rf),{navigator:S,basename:w}=M.useContext(si),_=v!=null&&bC(g)&&f===!0,N=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,j=x.pathname,C=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(j=j.toLowerCase(),C=C?C.toLowerCase():null,N=N.toLowerCase()),C&&w&&(C=Aa(C,w)||C);const D=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let F=j===N||!s&&j.startsWith(N)&&j.charAt(D)==="/",R=C!=null&&(C===N||!s&&C.startsWith(N)&&C.charAt(N.length)==="/"),q={isActive:F,isPending:R,isTransitioning:_},U=F?t:void 0,Z;typeof a=="function"?Z=a(q):Z=[a,F?"active":null,R?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let A=typeof o=="function"?o(q):o;return M.createElement(ji,{...h,"aria-current":U,className:Z,ref:y,style:A,to:c,viewTransition:f},typeof d=="function"?d(q):d)});VE.displayName="NavLink";var uC=M.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:c=of,action:f,onSubmit:d,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:x,...v},S)=>{let{unstable_useTransitions:w}=M.useContext(si),_=pC(),N=gC(f,{relative:h}),j=c.toLowerCase()==="get"?"get":"post",C=typeof f=="string"&&YE.test(f),D=F=>{if(d&&d(F),F.defaultPrevented)return;F.preventDefault();let R=F.nativeEvent.submitter,q=(R==null?void 0:R.getAttribute("formmethod"))||c,U=()=>_(R||F.currentTarget,{fetcherKey:t,method:q,navigate:n,replace:s,state:o,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:x});w&&n!==!1?M.startTransition(()=>U()):U()};return M.createElement("form",{ref:S,method:j,action:N,onSubmit:a?d:D,...v,"data-discover":!C&&e==="render"?"true":void 0})});uC.displayName="Form";function fC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function XE(e){let t=M.useContext(Ll);return Ct(t,fC(e)),t}function dC(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h}={}){let y=wr(),g=Di(),x=yc(e,{relative:c});return M.useCallback(v=>{if(qT(v,t)){v.preventDefault();let S=n!==void 0?n:sc(g)===sc(x),w=()=>y(e,{replace:S,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d});h?M.startTransition(()=>w()):w()}},[g,y,x,n,a,s,t,e,o,c,f,d,h])}function jf(e){Ei(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=M.useRef(sp(e)),n=M.useRef(!1),a=Di(),s=M.useMemo(()=>HT(a.search,n.current?null:t.current),[a.search]),o=wr(),c=M.useCallback((f,d)=>{const h=sp(typeof f=="function"?f(new URLSearchParams(s)):f);n.current=!0,o("?"+h,d)},[o,s]);return[s,c]}var hC=0,mC=()=>`__${String(++hC)}__`;function pC(){let{router:e}=XE("useSubmit"),{basename:t}=M.useContext(si),n=RT(),a=e.fetch,s=e.navigate;return M.useCallback(async(o,c={})=>{let{action:f,method:d,encType:h,formData:y,body:g}=QT(o,t);if(c.navigate===!1){let x=c.fetcherKey||mC();await a(x,n,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||h,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,n])}function gC(e,{relative:t}={}){let{basename:n}=M.useContext(si),a=M.useContext(wi);Ct(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...yc(e||".",{relative:t})},c=Di();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),d=f.getAll("index");if(d.some(y=>y==="")){f.delete("index"),d.filter(g=>g).forEach(g=>f.append("index",g));let y=f.toString();o.search=y?`?${y}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Ri([n,o.pathname])),sc(o)}function bC(e,{relative:t}={}){let n=M.useContext(UE);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=XE("useViewTransitionState"),s=yc(e,{relative:t});if(!n.isTransitioning)return!1;let o=Aa(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Aa(n.nextLocation.pathname,a)||n.nextLocation.pathname;return bf(s.pathname,c)!=null||bf(s.pathname,o)!=null}/**
|
|
61
61
|
* @license lucide-react v0.544.0 - ISC
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the ISC license.
|
|
@@ -336,10 +336,10 @@ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}
|
|
|
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
|
`)?`
|
|
339
|
-
`+ka(n,t):(e.endsWith(" ")?"":" ")+n,x1="flow",cp="block",ff="quoted";function $f(e,t,n="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:o=20,onFold:c,onOverflow:f}={}){if(!s||s<0)return e;s<o&&(o=0);const d=Math.max(1+o,1+s-t.length);if(e.length<=d)return e;const h=[],y={};let g=s-t.length;typeof a=="number"&&(a>s-Math.max(2,o)?h.push(0):g=s-a);let x,v,S=!1,w=-1,_=-1,N=-1;n===cp&&(w=Qv(e,w,t.length),w!==-1&&(g=w+d));for(let
|
|
340
|
-
`)n===cp&&(w=Qv(e,w,t.length)),g=w+t.length+d,x=void 0;else{if(
|
|
339
|
+
`+ka(n,t):(e.endsWith(" ")?"":" ")+n,x1="flow",cp="block",ff="quoted";function $f(e,t,n="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:o=20,onFold:c,onOverflow:f}={}){if(!s||s<0)return e;s<o&&(o=0);const d=Math.max(1+o,1+s-t.length);if(e.length<=d)return e;const h=[],y={};let g=s-t.length;typeof a=="number"&&(a>s-Math.max(2,o)?h.push(0):g=s-a);let x,v,S=!1,w=-1,_=-1,N=-1;n===cp&&(w=Qv(e,w,t.length),w!==-1&&(g=w+d));for(let C;C=e[w+=1];){if(n===ff&&C==="\\"){switch(_=w,e[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}N=w}if(C===`
|
|
340
|
+
`)n===cp&&(w=Qv(e,w,t.length)),g=w+t.length+d,x=void 0;else{if(C===" "&&v&&v!==" "&&v!==`
|
|
341
341
|
`&&v!==" "){const D=e[w+1];D&&D!==" "&&D!==`
|
|
342
|
-
`&&D!==" "&&(x=w)}if(w>=g)if(x)h.push(x),g=x+d,x=void 0;else if(n===ff){for(;v===" "||v===" ";)v=
|
|
342
|
+
`&&D!==" "&&(x=w)}if(w>=g)if(x)h.push(x),g=x+d,x=void 0;else if(n===ff){for(;v===" "||v===" ";)v=C,C=e[w+=1],S=!0;const D=w>N+1?w-2:_-1;if(y[D])return e;h.push(D),y[D]=!0,g=D+d,x=void 0}else S=!0}v=C}if(S&&f&&f(),h.length===0)return e;c&&c();let j=e.slice(0,h[0]);for(let C=0;C<h.length;++C){const D=h[C],F=h[C+1]||e.length;D===0?j=`
|
|
343
343
|
${t}${e.slice(0,F)}`:(n===ff&&y[D]&&(j+=`${e[D]}\\`),j+=`
|
|
344
344
|
${t}${e.slice(D+1,F)}`)}return j}function Qv(e,t,n){let a=t,s=t+1,o=e[s];for(;o===" "||o===" ";)if(t<s+n)o=e[++t];else{do o=e[++t];while(o&&o!==`
|
|
345
345
|
`);a=t,s=t+1,o=e[s]}return a}const Ff=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Pf=e=>/^(%|---|\.\.\.)/m.test(e);function M2(e,t,n){if(!t||t<0)return!1;const a=t-n,s=e.length;if(s<=a)return!1;for(let o=0,c=0;o<s;++o)if(e[o]===`
|
|
@@ -358,28 +358,28 @@ ${n}`)+"'";return t.implicitKey?a:$f(a,n,x1,Ff(t,!1))}function hl(e,t){const{sin
|
|
|
358
358
|
`);S===-1?g="-":n===v||S!==v.length-1?(g="+",o&&o()):g="",v&&(n=n.slice(0,-v.length),v[v.length-1]===`
|
|
359
359
|
`&&(v=v.slice(0,-1)),v=v.replace(fp,`$&${h}`));let w=!1,_,N=-1;for(_=0;_<n.length;++_){const F=n[_];if(F===" ")w=!0;else if(F===`
|
|
360
360
|
`)N=_;else break}let j=n.substring(0,N<_?N+1:_);j&&(n=n.substring(j.length),j=j.replace(/\n+/g,`$&${h}`));let D=(w?h?"2":"1":"")+g;if(e&&(D+=" "+f(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!y){const F=n.replace(/\n+/g,`
|
|
361
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let R=!1;const
|
|
361
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let R=!1;const q=Ff(a,!0);c!=="folded"&&t!==Le.BLOCK_FOLDED&&(q.onOverflow=()=>{R=!0});const U=$f(`${j}${F}${v}`,h,cp,q);if(!R)return`>${D}
|
|
362
362
|
${h}${U}`}return n=n.replace(/\n+/g,`$&${h}`),`|${D}
|
|
363
363
|
${h}${j}${n}${v}`}function j2(e,t,n,a){const{type:s,value:o}=e,{actualString:c,implicitKey:f,indent:d,indentStep:h,inFlow:y}=t;if(f&&o.includes(`
|
|
364
364
|
`)||y&&/[[\]{},]/.test(o))return hl(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||y||!o.includes(`
|
|
365
365
|
`)?hl(o,t):df(e,t,n,a);if(!f&&!y&&s!==Le.PLAIN&&o.includes(`
|
|
366
366
|
`))return df(e,t,n,a);if(Pf(o)){if(d==="")return t.forceBlockIndent=!0,df(e,t,n,a);if(f&&d===h)return hl(o,t)}const g=o.replace(/\n+/g,`$&
|
|
367
367
|
${d}`);if(c){const x=w=>{var _;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((_=w.test)==null?void 0:_.test(g))},{compat:v,tags:S}=t.doc.schema;if(S.some(x)||v!=null&&v.some(x))return hl(o,t)}return f?g:$f(g,d,x1,Ff(t,!1))}function xc(e,t,n,a){const{implicitKey:s,inFlow:o}=t,c=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:f}=e;f!==Le.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(f=Le.QUOTE_DOUBLE);const d=y=>{switch(y){case Le.BLOCK_FOLDED:case Le.BLOCK_LITERAL:return s||o?hl(c.value,t):df(c,t,n,a);case Le.QUOTE_DOUBLE:return ec(c.value,t);case Le.QUOTE_SINGLE:return up(c.value,t);case Le.PLAIN:return j2(c,t,n,a);default:return null}};let h=d(f);if(h===null){const{defaultKeyType:y,defaultStringType:g}=t.options,x=s&&y||g;if(h=d(x),h===null)throw new Error(`Unsupported default string type ${x}`)}return h}function v1(e,t){const n=Object.assign({blockQuote:!0,commentString:R2,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let a;switch(n.collectionStyle){case"block":a=!1;break;case"flow":a=!0;break;default:a=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:a,options:n}}function D2(e,t){var s;if(t.tag){const o=e.filter(c=>c.tag===t.tag);if(o.length>0)return o.find(c=>c.format===t.format)??o[0]}let n,a;if(vt(t)){a=t.value;let o=e.filter(c=>{var f;return(f=c.identify)==null?void 0:f.call(c,a)});if(o.length>1){const c=o.filter(f=>f.test);c.length>0&&(o=c)}n=o.find(c=>c.format===t.format)??o.find(c=>!c.format)}else a=t,n=e.find(o=>o.nodeClass&&a instanceof o.nodeClass);if(!n){const o=((s=a==null?void 0:a.constructor)==null?void 0:s.name)??(a===null?"null":typeof a);throw new Error(`Tag not resolved for ${o} value`)}return n}function L2(e,t,{anchors:n,doc:a}){if(!a.directives)return"";const s=[],o=(vt(e)||Mt(e))&&e.anchor;o&&m1(o)&&(n.add(o),s.push(`&${o}`));const c=e.tag??(t.default?null:t.tag);return c&&s.push(a.directives.tagString(c)),s.join(" ")}function Al(e,t,n,a){var d;if(At(e))return e.toString(t,n,a);if(_r(e)){if(t.doc.directives)return e.toString(t);if((d=t.resolvedAliases)!=null&&d.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const o=jt(e)?e:t.doc.createNode(e,{onTagObj:h=>s=h});s??(s=D2(t.doc.schema.tags,o));const c=L2(o,s,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const f=typeof s.stringify=="function"?s.stringify(o,t,n,a):vt(o)?xc(o,t,n,a):o.toString(t,n,a);return c?vt(o)||f[0]==="{"||f[0]==="["?`${c} ${f}`:`${c}
|
|
368
|
-
${t.indent}${f}`:f}function I2({key:e,value:t},n,a,s){const{allNullValues:o,doc:c,indent:f,indentStep:d,options:{commentString:h,indentSeq:y,simpleKeys:g}}=n;let x=jt(e)&&e.comment||null;if(g){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(Mt(e)||!jt(e)&&typeof e=="object"){const
|
|
369
|
-
${f}:`):(_=`${_}:`,x&&(_+=Wr(_,n.indent,h(x))));let N,j,
|
|
370
|
-
`:"",j){const
|
|
371
|
-
${ka(
|
|
372
|
-
`&&
|
|
368
|
+
${t.indent}${f}`:f}function I2({key:e,value:t},n,a,s){const{allNullValues:o,doc:c,indent:f,indentStep:d,options:{commentString:h,indentSeq:y,simpleKeys:g}}=n;let x=jt(e)&&e.comment||null;if(g){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(Mt(e)||!jt(e)&&typeof e=="object"){const q="With simple keys, collection cannot be used as a key value";throw new Error(q)}}let v=!g&&(!e||x&&t==null&&!n.inFlow||Mt(e)||(vt(e)?e.type===Le.BLOCK_FOLDED||e.type===Le.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!v&&(g||!o),indent:f+d});let S=!1,w=!1,_=Al(e,n,()=>S=!0,()=>w=!0);if(!v&&!n.inFlow&&_.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(n.inFlow){if(o||t==null)return S&&a&&a(),_===""?"?":v?`? ${_}`:_}else if(o&&!g||t==null&&v)return _=`? ${_}`,x&&!S?_+=Wr(_,n.indent,h(x)):w&&s&&s(),_;S&&(x=null),v?(x&&(_+=Wr(_,n.indent,h(x))),_=`? ${_}
|
|
369
|
+
${f}:`):(_=`${_}:`,x&&(_+=Wr(_,n.indent,h(x))));let N,j,C;jt(t)?(N=!!t.spaceBefore,j=t.commentBefore,C=t.comment):(N=!1,j=null,C=null,t&&typeof t=="object"&&(t=c.createNode(t))),n.implicitKey=!1,!v&&!x&&vt(t)&&(n.indentAtStart=_.length+1),w=!1,!y&&d.length>=2&&!n.inFlow&&!v&&Fl(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let D=!1;const F=Al(t,n,()=>D=!0,()=>w=!0);let R=" ";if(x||N||j){if(R=N?`
|
|
370
|
+
`:"",j){const q=h(j);R+=`
|
|
371
|
+
${ka(q,n.indent)}`}F===""&&!n.inFlow?R===`
|
|
372
|
+
`&&C&&(R=`
|
|
373
373
|
|
|
374
374
|
`):R+=`
|
|
375
|
-
${n.indent}`}else if(!v&&Mt(t)){const
|
|
376
|
-
`),
|
|
375
|
+
${n.indent}`}else if(!v&&Mt(t)){const q=F[0],U=F.indexOf(`
|
|
376
|
+
`),Z=U!==-1,A=n.inFlow??t.flow??t.items.length===0;if(Z||!A){let P=!1;if(Z&&(q==="&"||q==="!")){let G=F.indexOf(" ");q==="&"&&G!==-1&&G<U&&F[G+1]==="!"&&(G=F.indexOf(" ",G+1)),(G===-1||U<G)&&(P=!0)}P||(R=`
|
|
377
377
|
${n.indent}`)}}else(F===""||F[0]===`
|
|
378
|
-
`)&&(R="");return _+=R+F,n.inFlow?D&&a&&a():
|
|
378
|
+
`)&&(R="");return _+=R+F,n.inFlow?D&&a&&a():C&&!D?_+=Wr(_,n.indent,h(C)):w&&s&&s(),_}function E1(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Ku="<<",Ta={identify:e=>e===Ku||typeof e=="symbol"&&e.description===Ku,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Le(Symbol(Ku)),{addToJSMap:S1}),stringify:()=>Ku},z2=(e,t)=>(Ta.identify(t)||vt(t)&&(!t.type||t.type===Le.PLAIN)&&Ta.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Ta.tag&&n.default));function S1(e,t,n){if(n=e&&_r(n)?n.resolve(e.doc):n,Fl(n))for(const a of n.items)pm(e,t,a);else if(Array.isArray(n))for(const a of n)pm(e,t,a);else pm(e,t,n)}function pm(e,t,n){const a=e&&_r(n)?n.resolve(e.doc):n;if(!$l(a))throw new Error("Merge sources must be maps or map aliases");const s=a.toJSON(null,e,Map);for(const[o,c]of s)t instanceof Map?t.has(o)||t.set(o,c):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0});return t}function w1(e,t,{key:n,value:a}){if(jt(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(z2(e,n))S1(e,t,a);else{const s=vi(n,"",e);if(t instanceof Map)t.set(s,vi(a,s,e));else if(t instanceof Set)t.add(s);else{const o=B2(n,s,e),c=vi(a,o,e);o in t?Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[o]=c}}return t}function B2(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(jt(e)&&(n!=null&&n.doc)){const a=v1(n.doc,{});a.anchors=new Set;for(const o of n.anchors.keys())a.anchors.add(o.anchor);a.inFlow=!0,a.inStringifyKey=!0;const s=e.toString(a);if(!n.mapKeyWarned){let o=JSON.stringify(s);o.length>40&&(o=o.substring(0,36)+'..."'),E1(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function Wp(e,t,n){const a=lc(e,void 0,n),s=lc(t,void 0,n);return new gn(a,s)}class gn{constructor(t,n=null){Object.defineProperty(this,Si,{value:o1}),this.key=t,this.value=n}clone(t){let{key:n,value:a}=this;return jt(n)&&(n=n.clone(t)),jt(a)&&(a=a.clone(t)),new gn(n,a)}toJSON(t,n){const a=n!=null&&n.mapAsMap?new Map:{};return w1(n,a,this)}toString(t,n,a){return t!=null&&t.doc?I2(this,t,n,a):JSON.stringify(this)}}function _1(e,t,n){return(t.inFlow??e.flow?$2:U2)(e,t,n)}function U2({comment:e,items:t},n,{blockItemPrefix:a,flowChars:s,itemIndent:o,onChompKeep:c,onComment:f}){const{indent:d,options:{commentString:h}}=n,y=Object.assign({},n,{indent:o,type:null});let g=!1;const x=[];for(let S=0;S<t.length;++S){const w=t[S];let _=null;if(jt(w))!g&&w.spaceBefore&&x.push(""),Ef(n,x,w.commentBefore,g),w.comment&&(_=w.comment);else if(At(w)){const j=jt(w.key)?w.key:null;j&&(!g&&j.spaceBefore&&x.push(""),Ef(n,x,j.commentBefore,g))}g=!1;let N=Al(w,y,()=>_=null,()=>g=!0);_&&(N+=Wr(N,o,h(_))),g&&_&&(g=!1),x.push(a+N)}let v;if(x.length===0)v=s.start+s.end;else{v=x[0];for(let S=1;S<x.length;++S){const w=x[S];v+=w?`
|
|
379
379
|
${d}${w}`:`
|
|
380
380
|
`}}return e?(v+=`
|
|
381
|
-
`+ka(h(e),d),f&&f()):g&&c&&c(),v}function $2({items:e},t,{flowChars:n,itemIndent:a}){const{indent:s,indentStep:o,flowCollectionPadding:c,options:{commentString:f}}=t;a+=o;const d=Object.assign({},t,{indent:a,inFlow:!0,type:null});let h=!1,y=0;const g=[];for(let S=0;S<e.length;++S){const w=e[S];let _=null;if(jt(w))w.spaceBefore&&g.push(""),Ef(t,g,w.commentBefore,!1),w.comment&&(_=w.comment);else if(At(w)){const j=jt(w.key)?w.key:null;j&&(j.spaceBefore&&g.push(""),Ef(t,g,j.commentBefore,!1),j.comment&&(h=!0));const
|
|
382
|
-
`)),S<e.length-1?N+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(h||(h=g.reduce((j,
|
|
381
|
+
`+ka(h(e),d),f&&f()):g&&c&&c(),v}function $2({items:e},t,{flowChars:n,itemIndent:a}){const{indent:s,indentStep:o,flowCollectionPadding:c,options:{commentString:f}}=t;a+=o;const d=Object.assign({},t,{indent:a,inFlow:!0,type:null});let h=!1,y=0;const g=[];for(let S=0;S<e.length;++S){const w=e[S];let _=null;if(jt(w))w.spaceBefore&&g.push(""),Ef(t,g,w.commentBefore,!1),w.comment&&(_=w.comment);else if(At(w)){const j=jt(w.key)?w.key:null;j&&(j.spaceBefore&&g.push(""),Ef(t,g,j.commentBefore,!1),j.comment&&(h=!0));const C=jt(w.value)?w.value:null;C?(C.comment&&(_=C.comment),C.commentBefore&&(h=!0)):w.value==null&&(j!=null&&j.comment)&&(_=j.comment)}_&&(h=!0);let N=Al(w,d,()=>_=null);h||(h=g.length>y||N.includes(`
|
|
382
|
+
`)),S<e.length-1?N+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(h||(h=g.reduce((j,C)=>j+C.length+2,2)+(N.length+2)>t.options.lineWidth)),h&&(N+=",")),_&&(N+=Wr(N,a,f(_))),g.push(N),y=g.length}const{start:x,end:v}=n;if(g.length===0)return x+v;if(!h){const S=g.reduce((w,_)=>w+_.length+2,2);h=t.options.lineWidth>0&&S>t.options.lineWidth}if(h){let S=x;for(const w of g)S+=w?`
|
|
383
383
|
${o}${s}${w}`:`
|
|
384
384
|
`;return`${S}
|
|
385
385
|
${s}${v}`}else return`${x}${c}${g.join(" ")}${c}${v}`}function Ef({indent:e,options:{commentString:t}},n,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){const o=ka(t(a),e);n.push(o.trimStart())}}function Jr(e,t){const n=vt(t)?t.value:t;for(const a of e)if(At(a)&&(a.key===t||a.key===n||vt(a.key)&&a.key.value===n))return a}class ai extends y1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(vr,t),this.items=[]}static from(t,n,a){const{keepUndefined:s,replacer:o}=a,c=new this(t),f=(d,h)=>{if(typeof o=="function")h=o.call(n,d,h);else if(Array.isArray(o)&&!o.includes(d))return;(h!==void 0||s)&&c.items.push(Wp(d,h,a))};if(n instanceof Map)for(const[d,h]of n)f(d,h);else if(n&&typeof n=="object")for(const d of Object.keys(n))f(d,n[d]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,n){var c;let a;At(t)?a=t:!t||typeof t!="object"||!("key"in t)?a=new gn(t,t==null?void 0:t.value):a=new gn(t.key,t.value);const s=Jr(this.items,a.key),o=(c=this.schema)==null?void 0:c.sortMapEntries;if(s){if(!n)throw new Error(`Key ${a.key} already set`);vt(s.value)&&b1(a.value)?s.value.value=a.value:s.value=a.value}else if(o){const f=this.items.findIndex(d=>o(a,d)<0);f===-1?this.items.push(a):this.items.splice(f,0,a)}else this.items.push(a)}delete(t){const n=Jr(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const a=Jr(this.items,t),s=a==null?void 0:a.value;return(!n&&vt(s)?s.value:s)??void 0}has(t){return!!Jr(this.items,t)}set(t,n){this.add(new gn(t,n),!0)}toJSON(t,n,a){const s=a?new a:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(s);for(const o of this.items)w1(n,s,o);return s}toString(t,n,a){if(!t)return JSON.stringify(this);for(const s of this.items)if(!At(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),_1(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const Pl={collection:"map",default:!0,nodeClass:ai,tag:"tag:yaml.org,2002:map",resolve(e,t){return $l(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>ai.from(e,t,n)};class Sr extends y1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Ul,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Gu(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const a=Gu(t);if(typeof a!="number")return;const s=this.items[a];return!n&&vt(s)?s.value:s}has(t){const n=Gu(t);return typeof n=="number"&&n<this.items.length}set(t,n){const a=Gu(t);if(typeof a!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[a];vt(s)&&b1(n)?s.value=n:this.items[a]=n}toJSON(t,n){const a=[];n!=null&&n.onCreate&&n.onCreate(a);let s=0;for(const o of this.items)a.push(vi(o,String(s++),n));return a}toString(t,n,a){return t?_1(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:a,onComment:n}):JSON.stringify(this)}static from(t,n,a){const{replacer:s}=a,o=new this(t);if(n&&Symbol.iterator in Object(n)){let c=0;for(let f of n){if(typeof s=="function"){const d=n instanceof Set?f:String(c++);f=s.call(n,d,f)}o.items.push(lc(f,void 0,a))}}return o}}function Gu(e){let t=vt(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const ql={collection:"seq",default:!0,nodeClass:Sr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Fl(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Sr.from(e,t,n)},qf={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,a){return t=Object.assign({actualString:!0},t),xc(e,t,n,a)}},Hf={identify:e=>e==null,createNode:()=>new Le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Le(null),stringify:({source:e},t)=>typeof e=="string"&&Hf.test.test(e)?e:t.options.nullStr},Jp={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Le(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&Jp.test.test(e)){const a=e[0]==="t"||e[0]==="T";if(t===a)return e}return t?n.options.trueStr:n.options.falseStr}};function Li({format:e,minFractionDigits:t,tag:n,value:a}){if(typeof a=="bigint")return String(a);const s=typeof a=="number"?a:Number(a);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(a,-0)?"-0":JSON.stringify(a);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let c=o.indexOf(".");c<0&&(c=o.length,o+=".");let f=t-(o.length-c-1);for(;f-- >0;)o+="0"}return o}const N1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Li},k1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Li(e)}},T1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Le(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Li},Kf=e=>typeof e=="bigint"||Number.isInteger(e),eg=(e,t,n,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),n);function C1(e,t,n){const{value:a}=e;return Kf(a)&&a>=0?n+a.toString(t):Li(e)}const A1={identify:e=>Kf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>eg(e,2,8,n),stringify:e=>C1(e,8,"0o")},O1={identify:Kf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>eg(e,0,10,n),stringify:Li},R1={identify:e=>Kf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>eg(e,2,16,n),stringify:e=>C1(e,16,"0x")},F2=[Pl,ql,qf,Hf,Jp,A1,O1,R1,N1,k1,T1];function Yv(e){return typeof e=="bigint"||Number.isInteger(e)}const Qu=({value:e})=>JSON.stringify(e),P2=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Qu},{identify:e=>e==null,createNode:()=>new Le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Qu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Qu},{identify:Yv,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Yv(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Qu}],q2={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},H2=[Pl,ql].concat(P2,q2),tg={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),a=new Uint8Array(n.length);for(let s=0;s<n.length;++s)a[s]=n.charCodeAt(s);return a}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},a,s,o){if(!n)return"";const c=n;let f;if(typeof btoa=="function"){let d="";for(let h=0;h<c.length;++h)d+=String.fromCharCode(c[h]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Le.BLOCK_LITERAL),t!==Le.QUOTE_DOUBLE){const d=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),h=Math.ceil(f.length/d),y=new Array(h);for(let g=0,x=0;g<h;++g,x+=d)y[g]=f.substr(x,d);f=y.join(t===Le.BLOCK_LITERAL?`
|
|
@@ -393,13 +393,13 @@ ${o.comment}`:a.comment}a=s}e.items[n]=At(a)?a:new gn(a)}}else t("Expected a seq
|
|
|
393
393
|
|
|
394
394
|
${c}
|
|
395
395
|
${h}
|
|
396
|
-
`}};function Ol(e,{flow:t,indicator:n,next:a,offset:s,onError:o,parentIndent:c,startOnNewline:f}){let d=!1,h=f,y=f,g="",x="",v=!1,S=!1,w=null,_=null,N=null,j=null,
|
|
396
|
+
`}};function Ol(e,{flow:t,indicator:n,next:a,offset:s,onError:o,parentIndent:c,startOnNewline:f}){let d=!1,h=f,y=f,g="",x="",v=!1,S=!1,w=null,_=null,N=null,j=null,C=null,D=null,F=null;for(const U of e)switch(S&&(U.type!=="space"&&U.type!=="newline"&&U.type!=="comma"&&o(U.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),w&&(h&&U.type!=="comment"&&U.type!=="newline"&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),U.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&U.source.includes(" ")&&(w=U),y=!0;break;case"comment":{y||o(U,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const Z=U.source.substring(1)||" ";g?g+=x+Z:g=Z,x="",h=!1;break}case"newline":h?g?g+=U.source:(!D||n!=="seq-item-ind")&&(d=!0):x+=U.source,h=!0,v=!0,(_||N)&&(j=U),y=!0;break;case"anchor":_&&o(U,"MULTIPLE_ANCHORS","A node can have at most one anchor"),U.source.endsWith(":")&&o(U.offset+U.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),_=U,F??(F=U.offset),h=!1,y=!1,S=!0;break;case"tag":{N&&o(U,"MULTIPLE_TAGS","A node can have at most one tag"),N=U,F??(F=U.offset),h=!1,y=!1,S=!0;break}case n:(_||N)&&o(U,"BAD_PROP_ORDER",`Anchors and tags must be after the ${U.source} indicator`),D&&o(U,"UNEXPECTED_TOKEN",`Unexpected ${U.source} in ${t??"collection"}`),D=U,h=n==="seq-item-ind"||n==="explicit-key-ind",y=!1;break;case"comma":if(t){C&&o(U,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),C=U,h=!1,y=!1;break}default:o(U,"UNEXPECTED_TOKEN",`Unexpected ${U.type} token`),h=!1,y=!1}const R=e[e.length-1],q=R?R.offset+R.source.length:s;return S&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&o(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(h&&w.indent<=c||(a==null?void 0:a.type)==="block-map"||(a==null?void 0:a.type)==="block-seq")&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:C,found:D,spaceBefore:d,comment:g,hasNewline:v,anchor:_,tag:N,newlineAfterProp:j,end:q,start:F??q}}function oc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
397
397
|
`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(oc(t.key)||oc(t.value))return!0}return!1;default:return!0}}function dp(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&oc(t)&&n(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function q1(e,t,n){const{uniqueKeys:a}=e.options;if(a===!1)return!1;const s=typeof a=="function"?a:(o,c)=>o===c||vt(o)&&vt(c)&&o.value===c.value;return t.some(o=>s(o.key,n))}const Wv="All mapping items must start at the same column";function tO({composeNode:e,composeEmptyNode:t},n,a,s,o){var y;const c=(o==null?void 0:o.nodeClass)??ai,f=new c(n.schema);n.atRoot&&(n.atRoot=!1);let d=a.offset,h=null;for(const g of a.items){const{start:x,key:v,sep:S,value:w}=g,_=Ol(x,{indicator:"explicit-key-ind",next:v??(S==null?void 0:S[0]),offset:d,onError:s,parentIndent:a.indent,startOnNewline:!0}),N=!_.found;if(N){if(v&&(v.type==="block-seq"?s(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==a.indent&&s(d,"BAD_INDENT",Wv)),!_.anchor&&!_.tag&&!S){h=_.end,_.comment&&(f.comment?f.comment+=`
|
|
398
|
-
`+_.comment:f.comment=_.comment);continue}(_.newlineAfterProp||oc(v))&&s(v??x[x.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=_.found)==null?void 0:y.indent)!==a.indent&&s(d,"BAD_INDENT",Wv);n.atKey=!0;const j=_.end,
|
|
399
|
-
`+D.comment:
|
|
400
|
-
`+
|
|
401
|
-
`+U:
|
|
402
|
-
`+A.comment:
|
|
398
|
+
`+_.comment:f.comment=_.comment);continue}(_.newlineAfterProp||oc(v))&&s(v??x[x.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=_.found)==null?void 0:y.indent)!==a.indent&&s(d,"BAD_INDENT",Wv);n.atKey=!0;const j=_.end,C=v?e(n,v,_,s):t(n,j,x,null,_,s);n.schema.compat&&dp(a.indent,v,s),n.atKey=!1,q1(n,f.items,C)&&s(j,"DUPLICATE_KEY","Map keys must be unique");const D=Ol(S??[],{indicator:"map-value-ind",next:w,offset:C.range[2],onError:s,parentIndent:a.indent,startOnNewline:!v||v.type==="block-scalar"});if(d=D.end,D.found){N&&((w==null?void 0:w.type)==="block-map"&&!D.hasNewline&&s(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&_.start<D.found.offset-1024&&s(C.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const F=w?e(n,w,D,s):t(n,d,S,null,D,s);n.schema.compat&&dp(a.indent,w,s),d=F.range[2];const R=new gn(C,F);n.options.keepSourceTokens&&(R.srcToken=g),f.items.push(R)}else{N&&s(C.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),D.comment&&(C.comment?C.comment+=`
|
|
399
|
+
`+D.comment:C.comment=D.comment);const F=new gn(C);n.options.keepSourceTokens&&(F.srcToken=g),f.items.push(F)}}return h&&h<d&&s(h,"IMPOSSIBLE","Map comment with trailing content"),f.range=[a.offset,d,h??d],f}function nO({composeNode:e,composeEmptyNode:t},n,a,s,o){const c=(o==null?void 0:o.nodeClass)??Sr,f=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=a.offset,h=null;for(const{start:y,value:g}of a.items){const x=Ol(y,{indicator:"seq-item-ind",next:g,offset:d,onError:s,parentIndent:a.indent,startOnNewline:!0});if(!x.found)if(x.anchor||x.tag||g)(g==null?void 0:g.type)==="block-seq"?s(x.end,"BAD_INDENT","All sequence items must start at the same column"):s(d,"MISSING_CHAR","Sequence item without - indicator");else{h=x.end,x.comment&&(f.comment=x.comment);continue}const v=g?e(n,g,x,s):t(n,x.end,y,null,x,s);n.schema.compat&&dp(a.indent,g,s),d=v.range[2],f.items.push(v)}return f.range=[a.offset,d,h??d],f}function Ec(e,t,n,a){let s="";if(e){let o=!1,c="";for(const f of e){const{source:d,type:h}=f;switch(h){case"space":o=!0;break;case"comment":{n&&!o&&a(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const y=d.substring(1)||" ";s?s+=c+y:s=y,c="";break}case"newline":s&&(c+=d),o=!0;break;default:a(f,"UNEXPECTED_TOKEN",`Unexpected ${h} at node end`)}t+=d.length}}return{comment:s,offset:t}}const bm="Block collections are not allowed within flow collections",ym=e=>e&&(e.type==="block-map"||e.type==="block-seq");function iO({composeNode:e,composeEmptyNode:t},n,a,s,o){var _;const c=a.start.source==="{",f=c?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(c?ai:Sr),h=new d(n.schema);h.flow=!0;const y=n.atRoot;y&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let g=a.offset+a.start.source.length;for(let N=0;N<a.items.length;++N){const j=a.items[N],{start:C,key:D,sep:F,value:R}=j,q=Ol(C,{flow:f,indicator:"explicit-key-ind",next:D??(F==null?void 0:F[0]),offset:g,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!q.found){if(!q.anchor&&!q.tag&&!F&&!R){N===0&&q.comma?s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):N<a.items.length-1&&s(q.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),q.comment&&(h.comment?h.comment+=`
|
|
400
|
+
`+q.comment:h.comment=q.comment),g=q.end;continue}!c&&n.options.strict&&oc(D)&&s(D,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(N===0)q.comma&&s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(q.comma||s(q.start,"MISSING_CHAR",`Missing , between ${f} items`),q.comment){let U="";e:for(const Z of C)switch(Z.type){case"comma":case"space":break;case"comment":U=Z.source.substring(1);break e;default:break e}if(U){let Z=h.items[h.items.length-1];At(Z)&&(Z=Z.value??Z.key),Z.comment?Z.comment+=`
|
|
401
|
+
`+U:Z.comment=U,q.comment=q.comment.substring(U.length+1)}}if(!c&&!F&&!q.found){const U=R?e(n,R,q,s):t(n,q.end,F,null,q,s);h.items.push(U),g=U.range[2],ym(R)&&s(U.range,"BLOCK_IN_FLOW",bm)}else{n.atKey=!0;const U=q.end,Z=D?e(n,D,q,s):t(n,U,C,null,q,s);ym(D)&&s(Z.range,"BLOCK_IN_FLOW",bm),n.atKey=!1;const A=Ol(F??[],{flow:f,indicator:"map-value-ind",next:R,offset:Z.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(A.found){if(!c&&!q.found&&n.options.strict){if(F)for(const le of F){if(le===A.found)break;if(le.type==="newline"){s(le,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}q.start<A.found.offset-1024&&s(A.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else R&&("source"in R&&((_=R.source)==null?void 0:_[0])===":"?s(R,"MISSING_CHAR",`Missing space after : in ${f}`):s(A.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const P=R?e(n,R,A,s):A.found?t(n,A.end,F,null,A,s):null;P?ym(R)&&s(P.range,"BLOCK_IN_FLOW",bm):A.comment&&(Z.comment?Z.comment+=`
|
|
402
|
+
`+A.comment:Z.comment=A.comment);const G=new gn(Z,P);if(n.options.keepSourceTokens&&(G.srcToken=j),c){const le=h;q1(n,le.items,Z)&&s(U,"DUPLICATE_KEY","Map keys must be unique"),le.items.push(G)}else{const le=new ai(n.schema);le.flow=!0,le.items.push(G);const ae=(P??Z).range;le.range=[Z.range[0],ae[1],ae[2]],h.items.push(le)}g=P?P.range[2]:A.end}}const x=c?"}":"]",[v,...S]=a.end;let w=g;if((v==null?void 0:v.source)===x)w=v.offset+v.source.length;else{const N=f[0].toUpperCase()+f.substring(1),j=y?`${N} must end with a ${x}`:`${N} in block collection must be sufficiently indented and end with a ${x}`;s(g,y?"MISSING_CHAR":"BAD_INDENT",j),v&&v.source.length!==1&&S.unshift(v)}if(S.length>0){const N=Ec(S,w,n.options.strict,s);N.comment&&(h.comment?h.comment+=`
|
|
403
403
|
`+N.comment:h.comment=N.comment),h.range=[a.offset,w,N.offset]}else h.range=[a.offset,w,w];return h}function xm(e,t,n,a,s,o){const c=n.type==="block-map"?tO(e,t,n,a,o):n.type==="block-seq"?nO(e,t,n,a,o):iO(e,t,n,a,o),f=c.constructor;return s==="!"||s===f.tagName?(c.tag=f.tagName,c):(s&&(c.tag=s),c)}function aO(e,t,n,a,s){var x;const o=a.tag,c=o?t.directives.tagName(o.source,v=>s(o,"TAG_RESOLVE_FAILED",v)):null;if(n.type==="block-seq"){const{anchor:v,newlineAfterProp:S}=a,w=v&&o?v.offset>o.offset?v:o:v??o;w&&(!S||S.offset<w.offset)&&s(w,"MISSING_CHAR","Missing newline after block sequence props")}const f=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!c||c==="!"||c===ai.tagName&&f==="map"||c===Sr.tagName&&f==="seq")return xm(e,t,n,s,c);let d=t.schema.tags.find(v=>v.tag===c&&v.collection===f);if(!d){const v=t.schema.knownTags[c];if((v==null?void 0:v.collection)===f)t.schema.tags.push(Object.assign({},v,{default:!1})),d=v;else return v?s(o,"BAD_COLLECTION_TYPE",`${v.tag} used for ${f} collection, but expects ${v.collection??"scalar"}`,!0):s(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),xm(e,t,n,s,c)}const h=xm(e,t,n,s,c,d),y=((x=d.resolve)==null?void 0:x.call(d,h,v=>s(o,"TAG_RESOLVE_FAILED",v),t.options))??h,g=jt(y)?y:new Le(y);return g.range=h.range,g.tag=c,d!=null&&d.format&&(g.format=d.format),g}function H1(e,t,n){const a=t.offset,s=rO(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};const o=s.mode===">"?Le.BLOCK_FOLDED:Le.BLOCK_LITERAL,c=t.source?sO(t.source):[];let f=c.length;for(let w=c.length-1;w>=0;--w){const _=c[w][1];if(_===""||_==="\r")f=w;else break}if(f===0){const w=s.chomp==="+"&&c.length>0?`
|
|
404
404
|
`.repeat(Math.max(1,c.length-1)):"";let _=a+s.length;return t.source&&(_+=t.source.length),{value:w,type:o,comment:s.comment,range:[a,_,_]}}let d=t.indent+s.indent,h=t.offset+s.length,y=0;for(let w=0;w<f;++w){const[_,N]=c[w];if(N===""||N==="\r")s.indent===0&&_.length>d&&(d=_.length);else{_.length<d&&n(h+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(d=_.length),y=w,d===0&&!e.atRoot&&n(h,"BAD_INDENT","Block scalar values in collections must be indented");break}h+=_.length+N.length+1}for(let w=c.length-1;w>=f;--w)c[w][0].length>d&&(f=w+1);let g="",x="",v=!1;for(let w=0;w<y;++w)g+=c[w][0].slice(d)+`
|
|
405
405
|
`;for(let w=y;w<f;++w){let[_,N]=c[w];h+=_.length+N.length+1;const j=N[N.length-1]==="\r";if(j&&(N=N.slice(0,-1)),N&&_.length<d){const D=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(h-N.length-(j?2:1),"BAD_INDENT",D),_=""}o===Le.BLOCK_LITERAL?(g+=x+_.slice(d)+N,x=`
|
|
@@ -470,17 +470,17 @@ ${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]=M.useState("structured"),[v,S]=M.useState(null),[w,_]=M.useState(null);M.useEffect(()=>{c&&v===null&&(S(c.content),_(c.etag),c.parseError&&x("yaml"))},[c,v]),M.useEffect(()=>{const R=H=>{H.key==="Escape"&&n()};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[n]);const N=Pn({mutationFn:()=>{if(v===null||w===null)throw new Error("no draft");return l2(e,t,v,w)},onSuccess:R=>{_(R.etag),s.invalidateQueries({queryKey:["pipeline-file",e,t]}),s.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:R=>{const H=R.status;o({title:H===409?"文件已被其他地方修改":H===422?"YAML 语法错":"保存失败",body:R instanceof Error?R.message:String(R)})}}),j=v!==null&&c&&v!==c.content,{parsed:T,parseError:D}=M.useMemo(()=>{if(v===null)return{parsed:null,parseError:null};try{return{parsed:i0.parse(v)??{},parseError:null}}catch(R){return{parsed:null,parseError:R instanceof Error?R.message:String(R)}}},[v]),F=R=>{try{const H=i0.stringify(R,{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"&&T&&m.jsx(LO,{parsed:T,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:R=>S(R.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:j?m.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● 未保存"}):N.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:N.isPending,type:"button",children:"重新加载"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>N.mutate(),disabled:!j||N.isPending,type:"button","aria-label":"保存 pipeline",children:[N.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]=M.useState(""),[f,d]=M.useState("blank");M.useEffect(()=>{const v=S=>{S.key==="Escape"&&e()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e]);const h=o.trim(),y=h.endsWith(".yaml")?h:h?`${h}.yaml`:"",g=y&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(y),x=()=>{!g||s||t(y,f)};return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",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]=M.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]=M.useState(null),[y,g]=M.useState(null);M.useEffect(()=>{a&&d===null&&(h(a.content),g(a.etag))},[a,d]);const x=d!==null&&a!==void 0&&d!==a.content,v=Pn({mutationFn:()=>{if(d===null||y===null)throw new Error("no draft");return 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]=M.useState(null),[d,h]=M.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]=M.useState(""),[f,d]=M.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]=M.useState("structured"),[v,S]=M.useState(null),[w,_]=M.useState(null);M.useEffect(()=>{c&&v===null&&(S(c.content),_(c.etag),c.parseError&&x("yaml"))},[c,v]),M.useEffect(()=>{const R=q=>{q.key==="Escape"&&n()};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[n]);const N=Pn({mutationFn:()=>{if(v===null||w===null)throw new Error("no draft");return l2(e,t,v,w)},onSuccess:R=>{_(R.etag),s.invalidateQueries({queryKey:["pipeline-file",e,t]}),s.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:R=>{const q=R.status;o({title:q===409?"文件已被其他地方修改":q===422?"YAML 语法错":"保存失败",body:R instanceof Error?R.message:String(R)})}}),j=v!==null&&c&&v!==c.content,{parsed:C,parseError:D}=M.useMemo(()=>{if(v===null)return{parsed:null,parseError:null};try{return{parsed:i0.parse(v)??{},parseError:null}}catch(R){return{parsed:null,parseError:R instanceof Error?R.message:String(R)}}},[v]),F=R=>{try{const q=i0.stringify(R,{lineWidth:0});S(q)}catch(q){o({title:"YAML 序列化失败",body:q instanceof Error?q.message:String(q)})}};return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",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"&&C&&m.jsx(LO,{parsed:C,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:R=>S(R.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:j?m.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● 未保存"}):N.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:N.isPending,type:"button",children:"重新加载"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>N.mutate(),disabled:!j||N.isPending,type:"button","aria-label":"保存 pipeline",children:[N.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]=M.useState(""),[f,d]=M.useState("blank");M.useEffect(()=>{const v=S=>{S.key==="Escape"&&e()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e]);const h=o.trim(),y=h.endsWith(".yaml")?h:h?`${h}.yaml`:"",g=y&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(y),x=()=>{!g||s||t(y,f)};return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",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]=M.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]=M.useState(null),[y,g]=M.useState(null);M.useEffect(()=>{a&&d===null&&(h(a.content),g(a.etag))},[a,d]);const x=d!==null&&a!==void 0&&d!==a.content,v=Pn({mutationFn:()=>{if(d===null||y===null)throw new Error("no draft");return 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]=M.useState(null),[d,h]=M.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]=M.useState(""),[f,d]=M.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(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 j;const[s,o]=M.useState(""),[c,f]=M.useState(""),[d,h]=M.useState(new Set),[y,g]=M.useState(!0),x=dt({queryKey:["skills-all",e],queryFn:()=>fg(e)});M.useEffect(()=>{const T=D=>{D.key==="Escape"&&n()};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[n]);const S=s.trim().length>0&&s.trim().length<=200&&!t,w=T=>{const D=new Set(d);D.has(T)?D.delete(T):D.add(T),h(D)},_=()=>{S&&a({title:s.trim(),description:c.trim(),skills:[...d],labels:y?["AI-PIPELINE"]:[]})},N=((j=x.data)==null?void 0:j.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:T=>{T.preventDefault(),_()},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:T=>o(T.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:T=>f(T.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。"}),x.isLoading&&m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),x.isError&&m.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["skill 列表加载失败,不影响创建:",x.error instanceof Error?x.error.message:String(x.error)]}),N.length>0&&m.jsx("div",{className:"flex flex-wrap gap-2",children:N.map(T=>{const D=d.has(T.name);return m.jsx("button",{type:"button",onClick:()=>w(T.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",D?"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":D,children:T.name},T.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 flex-col gap-2",children:[m.jsx("span",{className:"text-sm font-bold",children:"流水线"}),m.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none p-3 border-[2px] border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)]",children:[m.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:y,onChange:T=>g(T.target.checked)}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:"text-sm font-bold",children:"加入流水线(`AI-PIPELINE` 标签)"}),m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:"打开后 pipeline 会识别这张卡并派 worker 跑。关闭则只是一个普通 todo,需要人工改标签才会被流水线拾起。"})]})]})]})]}),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:_,disabled:!S,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();M.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",d.project]}),d.card&&t.setQueryData(["card",d.project,d.seq],{...t.getQueryData(["card",d.project,d.seq])??{},...d.card}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["workers",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["pipeline-status",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return a.addEventListener("card.created",s),a.addEventListener("card.updated",s),a.addEventListener("card.deleted",s),a.addEventListener("worker.updated",o),a.addEventListener("worker.added",o),a.addEventListener("worker.deleted",o),a.addEventListener("pipeline.status",c),()=>a.close()},[e,t])}const 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]=M.useState(!1);return m.jsxs("div",{className:["flex flex-col gap-2 p-3 rounded-2xl border-[3px] min-h-[340px]","transition-all",o?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:f=>{!s||!f.dataTransfer.types.includes("application/x-sps-card-seq")||(f.preventDefault(),f.dataTransfer.dropEffect="move",o||c(!0))},onDragLeave:()=>c(!1),onDrop:f=>{if(c(!1),!s)return;const d=f.dataTransfer.getData("application/x-sps-card-seq"),h=Number.parseInt(d,10);Number.isFinite(h)&&(f.preventDefault(),s(h))},children:[m.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 border-b-2 border-[var(--color-text)]",children:[m.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[n.length===0&&m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),n.map(f=>m.jsx(mR,{card:f,onClick:()=>a(f),done:e==="Done",draggable:!!s},f.seq))]})]})}function mp(e,t){if(!e)return"";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 j;const[s,o]=M.useState(""),[c,f]=M.useState(""),[d,h]=M.useState(new Set),[y,g]=M.useState(!0),x=dt({queryKey:["skills-all",e],queryFn:()=>fg(e)});M.useEffect(()=>{const C=D=>{D.key==="Escape"&&n()};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[n]);const S=s.trim().length>0&&s.trim().length<=200&&!t,w=C=>{const D=new Set(d);D.has(C)?D.delete(C):D.add(C),h(D)},_=()=>{S&&a({title:s.trim(),description:c.trim(),skills:[...d],labels:y?["AI-PIPELINE"]:[]})},N=((j=x.data)==null?void 0:j.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:C=>{C.preventDefault(),_()},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:C=>o(C.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:C=>f(C.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。"}),x.isLoading&&m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),x.isError&&m.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["skill 列表加载失败,不影响创建:",x.error instanceof Error?x.error.message:String(x.error)]}),N.length>0&&m.jsx("div",{className:"flex flex-wrap gap-2",children:N.map(C=>{const D=d.has(C.name);return m.jsx("button",{type:"button",onClick:()=>w(C.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",D?"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":D,children:C.name},C.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 flex-col gap-2",children:[m.jsx("span",{className:"text-sm font-bold",children:"流水线"}),m.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none p-3 border-[2px] border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)]",children:[m.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:y,onChange:C=>g(C.target.checked)}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:"text-sm font-bold",children:"加入流水线(`AI-PIPELINE` 标签)"}),m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:"打开后 pipeline 会识别这张卡并派 worker 跑。关闭则只是一个普通 todo,需要人工改标签才会被流水线拾起。"})]})]})]})]}),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:_,disabled:!S,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();M.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",d.project]}),t.invalidateQueries({queryKey:["card",d.project,d.seq]}),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.moved",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.addEventListener("pipeline.started",c),a.addEventListener("pipeline.stopped",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]=M.useState(!1);return m.jsxs("div",{className:["flex flex-col gap-2 p-3 rounded-2xl border-[3px] min-h-[340px]","transition-all",o?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:f=>{!s||!f.dataTransfer.types.includes("application/x-sps-card-seq")||(f.preventDefault(),f.dataTransfer.dropEffect="move",o||c(!0))},onDragLeave:()=>c(!1),onDrop:f=>{if(c(!1),!s)return;const d=f.dataTransfer.getData("application/x-sps-card-seq"),h=Number.parseInt(d,10);Number.isFinite(h)&&(f.preventDefault(),s(h))},children:[m.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 border-b-2 border-[var(--color-text)]",children:[m.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[n.length===0&&m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),n.map(f=>m.jsx(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 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]=M.useState(!1),[S,w]=M.useState(""),[_,N]=M.useState(""),[j,T]=M.useState(new Set),[D,F]=M.useState([]),[R,H]=M.useState(""),U=dt({queryKey:["skills-all",e],queryFn:()=>fg(e),enabled:x});M.useEffect(()=>{x&&f&&(w(f.title),N(wm(f.body)),T(new Set(f.skills)),F([...f.labels]))},[x,f]),M.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);_!==K&&(q.description=_);const oe=[...j].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)})}}),A=M.useMemo(()=>{if(!x||!f)return!1;if(S.trim()!==f.title||_!==wm(f.body))return!0;const q=[...j].sort(),Q=[...f.skills].sort();return JSON.stringify(q)!==JSON.stringify(Q)||JSON.stringify(D)!==JSON.stringify(f.labels)},[x,f,S,_,j,D]),P=q=>{const Q=new Set(j);Q.has(q)?Q.delete(q):Q.add(q),T(Q)},Y=()=>{const q=R.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=j.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:R,onChange:q=>H(q.target.value),onKeyDown:q=>{q.key==="Enter"&&!q.nativeEvent.isComposing&&(q.preventDefault(),Y())}}),R&&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:_,onChange:q=>N(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:!A||!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]=M.useState(!1),s=M.useRef(null),{data:o}=dt({queryKey:["projects"],queryFn:Bl});return M.useEffect(()=>{const c=f=>{var d;(d=s.current)!=null&&d.contains(f.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),m.jsxs("div",{className:"relative",ref:s,children:[m.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>a(c=>!c),children:[e,m.jsx(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]=M.useState(null),[o,c]=M.useState(""),[f,d]=M.useState(()=>new Set),[h,y]=M.useState(()=>new Set),{confirm:g,alert:x}=qn();aS(n);const v=dt({queryKey:["projects"],queryFn:Bl}),S=dt({queryKey:["cards",n],queryFn:()=>ZO(n??""),enabled:!!n}),w=Tn(),_=()=>{w.invalidateQueries({queryKey:["cards",n]}),w.invalidateQueries({queryKey:["projects"]}),w.invalidateQueries({queryKey:["pipeline-status",n]})},N=Z=>{t({project:Z})};M.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 j=Pn({mutationFn:()=>rR(n),onSuccess:()=>{_()},onError:Z=>{x({title:"启动 pipeline 失败",body:Z instanceof Error?Z.message:String(Z)})}}),T=Pn({mutationFn:()=>sR(n),onSuccess:()=>_(),onError:Z=>{x({title:"停止 pipeline 失败",body:Z instanceof Error?Z.message:String(Z)})}}),D=Pn({mutationFn:()=>lR(n,{all:!0}),onSuccess:()=>_(),onError:Z=>{x({title:"重置失败",body:Z instanceof Error?Z.message:String(Z)})}}),[F,R]=M.useState(!1),H=Pn({mutationFn:Z=>nR(n,Z),onSuccess:()=>{_(),R(!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:A,allLabels:P}=M.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:()=>N(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:N}),m.jsxs("button",{className:q?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>q?T.mutate():j.mutate(),disabled:j.isPending||T.isPending,type:"button","aria-label":q?"停止 pipeline":"启动 pipeline",title:q?"停止 pipeline":"启动 pipeline",children:[j.isPending||T.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:()=>R(!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:A,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:_}),F&&m.jsx(XO,{project:n,isPending:H.isPending,onCancel:()=>R(!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]=M.useState(!1),c=M.useRef(null);M.useEffect(()=>{if(!s)return;const y=x=>{var v;(v=c.current)!=null&&v.contains(x.target)||o(!1)},g=x=>{x.key==="Escape"&&o(!1)};return window.addEventListener("click",y),window.addEventListener("keydown",g),()=>{window.removeEventListener("click",y),window.removeEventListener("keydown",g)}},[s]);const f=y=>{const g=new Set(n);g.has(y)?g.delete(y):g.add(y),a(g)},d=t.length===0,h=n.size;return m.jsxs("div",{ref:c,className:"relative",children:[m.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!d&&o(y=>!y),disabled:d,"aria-haspopup":"listbox","aria-expanded":s,"aria-label":`按 ${e} 筛选`,children:[e,h>0&&m.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:h}),m.jsx(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]=M.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(`
|
|
477
|
+
`).trim()}function wm(e){return mp(e,"描述")}function yR({project:e,seq:t,onClose:n,onChanged:a}){var ae,W,K,oe,V,me,O,L,J;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]=M.useState(!1),[S,w]=M.useState(""),[_,N]=M.useState(""),[j,C]=M.useState(new Set),[D,F]=M.useState([]),[R,q]=M.useState(""),U=dt({queryKey:["skills-all",e],queryFn:()=>fg(e),enabled:x});M.useEffect(()=>{x&&f&&(w(f.title),N(wm(f.body)),C(new Set(f.skills)),F([...f.labels]))},[x,f]),M.useEffect(()=>{const k=ce=>{ce.key==="Escape"&&(x?v(!1):n())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[n,x]);const Z=Pn({mutationFn:()=>{if(!f)throw new Error("no data");const k={},ce=S.trim();ce&&ce!==f.title&&(k.title=ce);const Ee=wm(f.body);_!==Ee&&(k.description=_);const xe=[...j].sort(),ze=[...f.skills].sort();return JSON.stringify(xe)!==JSON.stringify(ze)&&(k.skills=xe),JSON.stringify(D)!==JSON.stringify(f.labels)&&(k.labels=D),Object.keys(k).length===0?Promise.resolve({ok:!0,noop:!0}):aR(e,t,k)},onSuccess:()=>{s.invalidateQueries({queryKey:["card",e,t]}),s.invalidateQueries({queryKey:["cards",e]}),v(!1),a()},onError:k=>{c({title:"保存失败",body:k instanceof Error?k.message:String(k)})}}),A=M.useMemo(()=>{if(!x||!f)return!1;if(S.trim()!==f.title||_!==wm(f.body))return!0;const k=[...j].sort(),ce=[...f.skills].sort();return JSON.stringify(k)!==JSON.stringify(ce)||JSON.stringify(D)!==JSON.stringify(f.labels)},[x,f,S,_,j,D]),P=k=>{const ce=new Set(j);ce.has(k)?ce.delete(k):ce.add(k),C(ce)},G=()=>{const k=R.trim();if(k){if(D.includes(k)){q("");return}F([...D,k]),q("")}},le=k=>{F(D.filter(ce=>ce!==k))};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:k=>w(k.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(k=>{const ce=j.has(k.name);return m.jsx("button",{type:"button",onClick:()=>P(k.name),"aria-pressed":ce,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",ce?"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:k.name},k.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(k=>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:[k,m.jsx("button",{type:"button",onClick:()=>le(k),className:"hover:text-[var(--color-crashed)]","aria-label":`删除 ${k}`,children:m.jsx(Er,{size:10,strokeWidth:3})})]},k)),m.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:"+ 添加 label",value:R,onChange:k=>q(k.target.value),onKeyDown:k=>{k.key==="Enter"&&!k.nativeEvent.isComposing&&(k.preventDefault(),G())}}),R&&m.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:G,"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(k=>m.jsx(rS,{name:k},k))})]}),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(k=>m.jsx(sS,{label:k,kind:k==="NEEDS-FIX"?"warn":"default"},k))})]})]}),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:_,onChange:k=>N(k.target.value),"aria-label":"卡片描述"}),m.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:'只替换 "## 描述" 段的内容;检查清单和日志段不动。'})]}),(((me=f.checklist)==null?void 0:me.total)??0)>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:["检查清单 ",((O=f.checklist)==null?void 0:O.done)??0,"/",((L=f.checklist)==null?void 0:L.total)??0]})}),m.jsx("ul",{className:"text-sm space-y-1",children:(((J=f.checklist)==null?void 0:J.items)??[]).map((k,ce)=>m.jsxs("li",{className:`flex items-start gap-2 ${k.done?"opacity-60 line-through":""}`,children:[m.jsx("span",{children:k.done?"✓":"○"}),m.jsx("span",{children:k.text})]},ce))})]})]}):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,"描述")||"(空)"})]}),(((ae=f.checklist)==null?void 0:ae.total)??0)>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:[((W=f.checklist)==null?void 0:W.done)??0,"/",((K=f.checklist)==null?void 0:K.total)??0]})]}),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:`${((oe=f.checklist)==null?void 0:oe.percent)??0}%`}})})}),m.jsx("ul",{className:"text-sm space-y-1",children:(((V=f.checklist)==null?void 0:V.items)??[]).map((k,ce)=>m.jsxs("li",{className:`flex items-start gap-2 ${k.done?"opacity-60 line-through":""}`,children:[m.jsx("span",{children:k.done?"✓":"○"}),m.jsx("span",{children:k.text})]},ce))})]})]}),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:Z.isPending,children:"取消"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>Z.mutate(),disabled:!A||!S.trim()||Z.isPending,"aria-label":"保存卡片修改",children:[Z.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(k){c({title:"启动 worker 失败",body:k instanceof Error?k.message:String(k)})}},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(ce){c({title:"重置失败",body:ce instanceof Error?ce.message:String(ce)})}},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(Ee){c({title:"删除失败",body:Ee instanceof Error?Ee.message:String(Ee)})}},"aria-label":"删除卡片",children:[m.jsx(zl,{size:14,strokeWidth:2.5}),"删除卡片"]})]})})]})]})})}function lS({current:e,onChange:t}){const[n,a]=M.useState(!1),s=M.useRef(null),{data:o}=dt({queryKey:["projects"],queryFn:Bl});return M.useEffect(()=>{const c=f=>{var d;(d=s.current)!=null&&d.contains(f.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),m.jsxs("div",{className:"relative",ref:s,children:[m.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>a(c=>!c),children:[e,m.jsx(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 W,K,oe;const[e,t]=jf(),n=e.get("project"),[a,s]=M.useState(null),[o,c]=M.useState(""),[f,d]=M.useState(()=>new Set),[h,y]=M.useState(()=>new Set),{confirm:g,alert:x}=qn();aS(n);const v=dt({queryKey:["projects"],queryFn:Bl}),S=dt({queryKey:["cards",n],queryFn:()=>ZO(n??""),enabled:!!n}),w=Tn(),_=()=>{w.invalidateQueries({queryKey:["cards",n]}),w.invalidateQueries({queryKey:["projects"]}),w.invalidateQueries({queryKey:["pipeline-status",n]})},N=V=>{t({project:V})};M.useEffect(()=>{var me;if(n){ER(n);return}const V=vR();V&&((me=v.data)!=null&&me.data.some(O=>O.name===V))&&t({project:V},{replace:!0})},[n,v.data,t]);const j=Pn({mutationFn:()=>rR(n),onSuccess:()=>{_()},onError:V=>{x({title:"启动 pipeline 失败",body:V instanceof Error?V.message:String(V)})}}),C=Pn({mutationFn:()=>sR(n),onSuccess:()=>_(),onError:V=>{x({title:"停止 pipeline 失败",body:V instanceof Error?V.message:String(V)})}}),D=Pn({mutationFn:()=>lR(n,{all:!0}),onSuccess:()=>_(),onError:V=>{x({title:"重置失败",body:V instanceof Error?V.message:String(V)})}}),[F,R]=M.useState(!1),q=Pn({mutationFn:V=>nR(n,V),onSuccess:()=>{_(),R(!1)},onError:V=>{x({title:"新建卡片失败",body:V instanceof Error?V.message:String(V)})}}),U=Pn({mutationFn:({seq:V,state:me})=>iR(n,V,me),onMutate:async({seq:V,state:me})=>{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===V?{...L,state:me}:L)}),{prev:O}},onError:(V,me,O)=>{O!=null&&O.prev&&w.setQueryData(["cards",n],O.prev),x({title:"移动卡片失败",body:V instanceof Error?V.message:String(V)})},onSettled:()=>{w.invalidateQueries({queryKey:["cards",n]})}}),Z=((W=S.data)==null?void 0:W.data)??[],{allSkills:A,allLabels:P}=M.useMemo(()=>{const V=new Set,me=new Set;for(const O of Z){for(const L of O.skills)V.add(L);for(const L of O.labels)me.add(L)}return{allSkills:[...V].sort(),allLabels:[...me].sort()}},[Z]);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(V=>m.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>N(V.name),type:"button",children:V.name},V.name))})]})]});const G=Z.filter(V=>{if(o){const me=o.toLowerCase();if(!(V.title.toLowerCase().includes(me)||V.skills.some(L=>L.toLowerCase().includes(me))||V.labels.some(L=>L.toLowerCase().includes(me))))return!1}return!(f.size>0&&!V.skills.some(O=>f.has(O))||h.size>0&&!V.labels.some(O=>h.has(O)))}),le=(oe=v.data)==null?void 0:oe.data.find(V=>V.name===n),ae=(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:N}),m.jsxs("button",{className:ae?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>ae?C.mutate():j.mutate(),disabled:j.isPending||C.isPending,type:"button","aria-label":ae?"停止 pipeline":"启动 pipeline",title:ae?"停止 pipeline":"启动 pipeline",children:[j.isPending||C.isPending?m.jsx(en,{size:14,strokeWidth:3,className:"animate-spin"}):ae?m.jsx(i1,{size:14,strokeWidth:3}):m.jsx(Qp,{size:14,strokeWidth:3}),ae?"停止":"启动"]}),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:()=>R(!0),disabled:q.isPending,children:[q.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:V=>c(V.target.value),"aria-label":"搜索卡片"})]}),m.jsx(a0,{label:"skill",options:A,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}),G.length," / ",Z.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(V=>m.jsx(bR,{label:V.label,bg:V.bg,cards:G.filter(wR(V.state)),onCardClick:me=>s(me.seq),onDropCard:me=>U.mutate({seq:me,state:V.state})},V.state))}),a!==null&&m.jsx(yR,{project:n,seq:a,onClose:()=>s(null),onChanged:_}),F&&m.jsx(XO,{project:n,isPending:q.isPending,onCancel:()=>R(!1),onCreate:V=>q.mutate(V)})]})}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]=M.useState(!1),c=M.useRef(null);M.useEffect(()=>{if(!s)return;const y=x=>{var v;(v=c.current)!=null&&v.contains(x.target)||o(!1)},g=x=>{x.key==="Escape"&&o(!1)};return window.addEventListener("click",y),window.addEventListener("keydown",g),()=>{window.removeEventListener("click",y),window.removeEventListener("keydown",g)}},[s]);const f=y=>{const g=new Set(n);g.has(y)?g.delete(y):g.add(y),a(g)},d=t.length===0,h=n.size;return m.jsxs("div",{ref:c,className:"relative",children:[m.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!d&&o(y=>!y),disabled:d,"aria-haspopup":"listbox","aria-expanded":s,"aria-label":`按 ${e} 筛选`,children:[e,h>0&&m.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:h}),m.jsx(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]=M.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
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]=M.useState(null),a=dt({queryKey:["workers-agg"],queryFn:_R,refetchInterval:5e3});M.useEffect(()=>{if(!a.data)return;const d=a.data.capacity.map(y=>y.project),h=[];for(const y of d){const g=new EventSource(`/stream/projects/${encodeURIComponent(y)}`),x=()=>{e.invalidateQueries({queryKey:["workers-agg"]})};g.addEventListener("worker.updated",x),g.addEventListener("worker.added",x),g.addEventListener("worker.deleted",x),g.addEventListener("card.updated",x),h.push(g)}return()=>{for(const y of h)y.close()}},[(f=a.data)==null?void 0:f.capacity.map(d=>d.project).join(","),e]);const s=M.useMemo(()=>{var h,y;return[...((h=a.data)==null?void 0:h.alerts)??[],...((y=a.data)==null?void 0:y.active)??[]]},[a.data]),o=t&&s.find(d=>d.project===t.project&&d.slot===t.slot),c=M.useMemo(()=>{if(!a.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const d={projects:a.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const h of a.data.capacity)d.running+=h.running,d.starting+=h.starting,d.stuck+=h.stuck,d.crashed+=h.crashed,d.idle+=h.idle;return d},[a.data]);return m.jsxs("div",{className:"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,
|
|
480
|
-
`)],{type:"text/plain"}),P=URL.createObjectURL(A),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:j,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:A=>{const P=A.currentTarget;!(P.scrollHeight-P.scrollTop-P.clientHeight<40)&&d&&h(!1)},children:[H.map((A,P)=>m.jsx(KR,{line:A},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 _!="string")throw new TypeError("First argument must be a string");if(!_)return[];N=N||{};var j=1,T=1;function D(q){var Q=q.match(t);Q&&(j+=Q.length);var K=q.lastIndexOf(d);T=~K?q.length-K:T+q.length}function F(){var q={line:j,column:T};return function(Q){return Q.position=new R(q),J(),Q}}function R(q){this.start=q,this.end={line:j,column:T},this.source=N.source}R.prototype.content=_;function H(q){var Q=new Error(N.source+":"+j+":"+T+": "+q);if(Q.reason=q,Q.filename=N.source,Q.line=j,Q.column=T,Q.source=_,!N.silent)throw Q}function U(q){var Q=q.exec(_);if(Q){var K=Q[0];return D(K),_=_.slice(K.length),Q}}function J(){U(n)}function A(q){var Q;for(q=q||[];Q=P();)Q!==!1&&q.push(Q);return q}function P(){var q=F();if(!(h!=_.charAt(0)||y!=_.charAt(1))){for(var Q=2;g!=_.charAt(Q)&&(y!=_.charAt(Q)||h!=_.charAt(Q+1));)++Q;if(Q+=2,g===_.charAt(Q-1))return H("End of comment missing");var K=_.slice(2,Q-2);return T+=2,D(K),_=_.slice(Q),T+=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=[];A(q);for(var Q;Q=Y();)Q!==!1&&(q.push(Q),A(q));return q}return J(),le()}function w(_){return _?_.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(T){if(a<n.length){const D=n[a];return t.containerState=D[1],e.attempt(D[0].continuation,d,h)(T)}return h(T)}function d(T){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&j();const D=t.events.length;let F=D,R;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){R=t.events[F][1].end;break}N(a);let H=D;for(;H<t.events.length;)t.events[H][1].end={...R},H++;return ri(t.events,F+1,0,t.events.slice(D)),t.events.length=H,h(T)}return f(T)}function h(T){if(a===n.length){if(!s)return x(T);if(s.currentConstruct&&s.currentConstruct.concrete)return S(T);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(y0,y,g)(T)}function y(T){return s&&j(),N(a),x(T)}function g(T){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,S(T)}function x(T){return t.containerState={},e.attempt(y0,v,S)(T)}function v(T){return a++,n.push([t.currentConstruct,t.containerState]),x(T)}function S(T){if(T===null){s&&j(),N(0),e.consume(T);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),w(T)}function w(T){if(T===null){_(e.exit("chunkFlow"),!0),N(0),e.consume(T);return}return Te(T)?(e.consume(T),_(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(T),w)}function _(T,D){const F=t.sliceStream(T);if(D&&F.push(null),T.previous=o,o&&(o.next=T),o=T,s.defineSkip(T.start),s.write(F),t.parser.lazy[T.start.line]){let R=s.events.length;for(;R--;)if(s.events[R][1].start.offset<c&&(!s.events[R][1].end||s.events[R][1].end.offset>c))return;const H=t.events.length;let U=H,J,A;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(J){A=t.events[U][1].end;break}J=!0}for(N(a),R=H;R<t.events.length;)t.events[R][1].end={...A},R++;ri(t.events,U+1,0,t.events.slice(H)),t.events.length=R}}function N(T){let D=n.length;for(;D-- >T;){const F=n[D];t.containerState=F[1],F[0].exit.call(t,e)}n.length=T}function j(){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(R){return h(R)}function h(R){const H=a.events[a.events.length-1];return o=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,f=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(R)}function y(R){return R===f?(c++,e.consume(R),y):c<3?n(R):(e.exit("codeFencedFenceSequence"),Ge(R)?Je(e,g,"whitespace")(R):g(R))}function g(R){return R===null||Te(R)?(e.exit("codeFencedFence"),a.interrupt?t(R):e.check(v0,w,D)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(R))}function x(R){return R===null||Te(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(R)):Ge(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,v,"whitespace")(R)):R===96&&R===f?n(R):(e.consume(R),x)}function v(R){return R===null||Te(R)?g(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(R))}function S(R){return R===null||Te(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(R)):R===96&&R===f?n(R):(e.consume(R),S)}function w(R){return e.attempt(s,D,_)(R)}function _(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),N}function N(R){return o>0&&Ge(R)?Je(e,j,"linePrefix",o+1)(R):j(R)}function j(R){return R===null||Te(R)?e.check(v0,w,D)(R):(e.enter("codeFlowValue"),T(R))}function T(R){return R===null||Te(R)?(e.exit("codeFlowValue"),j(R)):(e.consume(R),T)}function D(R){return e.exit("codeFenced"),t(R)}function F(R,H,U){let J=0;return A;function A(Q){return R.enter("lineEnding"),R.consume(Q),R.exit("lineEnding"),P}function P(Q){return R.enter("codeFencedFence"),Ge(Q)?Je(R,Y,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):Y(Q)}function Y(Q){return Q===f?(R.enter("codeFencedFenceSequence"),le(Q)):U(Q)}function le(Q){return Q===f?(J++,R.consume(Q),le):J>=c?(R.exit("codeFencedFenceSequence"),Ge(Q)?Je(R,q,"whitespace")(Q):q(Q)):U(Q)}function q(Q){return Q===null||Te(Q)?(R.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 _=[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,_.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):_.pop(),x=_.length;x--;){const N=f.slice(_[x],_[x+1]),j=o.pop();d.push([j,j+N.length-1]),e.splice(j,2,N)}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(N){return N===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(N),e.exit(o),x):N===null||N===32||N===41||_f(N)?n(N):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(N))}function x(N){return N===62?(e.enter(o),e.consume(N),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(e.exit("chunkString"),e.exit(f),x(N)):N===null||N===60||Te(N)?n(N):(e.consume(N),N===92?S:v)}function S(N){return N===60||N===62||N===92?(e.consume(N),v):v(N)}function w(N){return!y&&(N===null||N===41||xt(N))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(N)):y<h&&N===40?(e.consume(N),y++,w):N===41?(e.consume(N),y--,w):N===null||N===32||N===40||_f(N)?n(N):(e.consume(N),N===92?_:w)}function _(N){return N===40||N===41||N===92?(e.consume(N),w):w(N)}}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(C){return y(C)}function y(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),g}function g(C){return C===33?(e.consume(C),x):C===47?(e.consume(C),o=!0,w):C===63?(e.consume(C),s=3,a.interrupt?t:O):kn(C)?(e.consume(C),c=String.fromCharCode(C),_):n(C)}function x(C){return C===45?(e.consume(C),s=2,v):C===91?(e.consume(C),s=5,f=0,S):kn(C)?(e.consume(C),s=4,a.interrupt?t:O):n(C)}function v(C){return C===45?(e.consume(C),a.interrupt?t:O):n(C)}function S(C){const he="CDATA[";return C===he.charCodeAt(f++)?(e.consume(C),f===he.length?a.interrupt?t:Y:S):n(C)}function w(C){return kn(C)?(e.consume(C),c=String.fromCharCode(C),_):n(C)}function _(C){if(C===null||C===47||C===62||xt(C)){const he=C===47,Ne=c.toLowerCase();return!he&&!o&&S0.includes(Ne)?(s=1,a.interrupt?t(C):Y(C)):Aj.includes(c.toLowerCase())?(s=6,he?(e.consume(C),N):a.interrupt?t(C):Y(C)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(C):o?j(C):T(C))}return C===45||pn(C)?(e.consume(C),c+=String.fromCharCode(C),_):n(C)}function N(C){return C===62?(e.consume(C),a.interrupt?t:Y):n(C)}function j(C){return Ge(C)?(e.consume(C),j):A(C)}function T(C){return C===47?(e.consume(C),A):C===58||C===95||kn(C)?(e.consume(C),D):Ge(C)?(e.consume(C),T):A(C)}function D(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),D):F(C)}function F(C){return C===61?(e.consume(C),R):Ge(C)?(e.consume(C),F):T(C)}function R(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),d=C,H):Ge(C)?(e.consume(C),R):U(C)}function H(C){return C===d?(e.consume(C),d=null,J):C===null||Te(C)?n(C):(e.consume(C),H)}function U(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||xt(C)?F(C):(e.consume(C),U)}function J(C){return C===47||C===62||Ge(C)?T(C):n(C)}function A(C){return C===62?(e.consume(C),P):n(C)}function P(C){return C===null||Te(C)?Y(C):Ge(C)?(e.consume(C),P):n(C)}function Y(C){return C===45&&s===2?(e.consume(C),K):C===60&&s===1?(e.consume(C),oe):C===62&&s===4?(e.consume(C),L):C===63&&s===3?(e.consume(C),O):C===93&&s===5?(e.consume(C),pe):Te(C)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Rj,te,le)(C)):C===null||Te(C)?(e.exit("htmlFlowData"),le(C)):(e.consume(C),Y)}function le(C){return e.check(Mj,q,te)(C)}function q(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),Q}function Q(C){return C===null||Te(C)?le(C):(e.enter("htmlFlowData"),Y(C))}function K(C){return C===45?(e.consume(C),O):Y(C)}function oe(C){return C===47?(e.consume(C),c="",Z):Y(C)}function Z(C){if(C===62){const he=c.toLowerCase();return S0.includes(he)?(e.consume(C),L):Y(C)}return kn(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),Z):Y(C)}function pe(C){return C===93?(e.consume(C),O):Y(C)}function O(C){return C===62?(e.consume(C),L):C===45&&s===2?(e.consume(C),O):Y(C)}function L(C){return C===null||Te(C)?(e.exit("htmlFlowData"),te(C)):(e.consume(C),L)}function te(C){return e.exit("htmlFlow"),t(C)}}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),T):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),j):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),_):Te(O)?(c=w,oe(O)):(e.consume(O),w)}function _(O){return O===93?(e.consume(O),N):w(O)}function N(O){return O===62?K(O):O===93?(e.consume(O),N):w(O)}function j(O){return O===null||O===62?K(O):Te(O)?(c=j,oe(O)):(e.consume(O),j)}function T(O){return O===null?n(O):O===63?(e.consume(O),D):Te(O)?(c=T,oe(O)):(e.consume(O),T)}function D(O){return O===62?K(O):T(O)}function F(O){return kn(O)?(e.consume(O),R):n(O)}function R(O){return O===45||pn(O)?(e.consume(O),R):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),A):Te(O)?(c=J,oe(O)):Ge(O)?(e.consume(O),J):K(O)}function A(O){return O===45||O===46||O===58||O===95||pn(O)?(e.consume(O),A):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(R),consume:j,enter:T,exit:D,interrupt:H(R,{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),_(),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,A()}function _(){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;)N(Y.charCodeAt(a._bufferIndex));else N(Y)}}function N(P){y=y(P)}function j(P){Te(P)?(a.line++,a.column=1,a.offset+=P===-3?2:1,A()):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 T(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 R(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:C(ve[Z])}function C(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?C(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,A()}}function A(){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=`
|
|
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,Z;const[e,t]=jf(),n=e.get("project"),a=e.get("worker")??"",[s,o]=M.useState([]),[c,f]=M.useState(!1),[d,h]=M.useState(!0),[y,g]=M.useState(()=>new Set(PR)),[x,v]=M.useState(""),[S,w]=M.useState("live"),[_,N]=M.useState(()=>{const A=new Date(Date.now()-36e5),P=G=>String(G).padStart(2,"0");return`${A.getFullYear()}-${P(A.getMonth()+1)}-${P(A.getDate())}T${P(A.getHours())}:${P(A.getMinutes())}`}),j=M.useRef(null),C=!n,D=dt({queryKey:["projects"],queryFn:Bl}),{data:F,refetch:R}=dt({queryKey:["logs",n??"agg",a,S,S==="history"?_:"live"],queryFn:()=>UR({project:n||void 0,worker:a||void 0,limit:S==="history"?2e3:500,since:S==="history"?new Date(_).toISOString():void 0}),refetchInterval:C&&S==="live"?5e3:!1});M.useEffect(()=>{F!=null&&F.data&&o(F.data)},[F]),M.useEffect(()=>{if(!n||S!=="live")return;const A=$R({project:n,worker:a||void 0}),P=new EventSource(A);return P.addEventListener("log.line",G=>{if(!c)try{const le=JSON.parse(G.data);o(ae=>{const W=[...ae,le];return W.length>5e3&&W.splice(0,W.length-5e3),W})}catch{}}),()=>P.close()},[n,a,c,S]),M.useEffect(()=>{if(!d)return;const A=j.current;A&&(A.scrollTop=A.scrollHeight)},[s,d]);const q=M.useMemo(()=>{const A=x.toLowerCase();return s.filter(P=>!(!y.has(P.level)||A&&!P.msg.toLowerCase().includes(A)))},[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:[C?`全部项目(${((U=D.data)==null?void 0:U.data.length)??0})`:n,a&&` · worker-${a}`," · ",C&&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:_,onChange:A=>N(A.target.value),"aria-label":"查询起始时间"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>R(),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:A=>{const P=A.target.value;t(P?{project:P}:{})},"aria-label":"筛选项目",children:[m.jsx("option",{value:"",children:"全部项目"}),(Z=D.data)==null?void 0:Z.data.map(A=>m.jsx("option",{value:A.name,children:A.name},A.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:A=>v(A.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(A=>m.jsx(HR,{level:A,enabled:y.has(A),onToggle:()=>{g(P=>{const G=new Set(P);return G.has(A)?G.delete(A):G.add(A),G})}},A))}),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(A=>!A),type:"button",children:d?"✓ Auto-scroll":"Auto-scroll"}),m.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(A=>!A),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 A=new Blob([q.map(le=>le.raw).join(`
|
|
480
|
+
`)],{type:"text/plain"}),P=URL.createObjectURL(A),G=document.createElement("a");G.href=P,G.download=`${n}-log-${Date.now()}.log`,G.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:j,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:A=>{const P=A.currentTarget;!(P.scrollHeight-P.scrollTop-P.clientHeight<40)&&d&&h(!1)},children:[q.map((A,P)=>m.jsx(KR,{line:A},P)),q.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 Fe=gs(),Xt=gs(),gp=gs(),fe=gs(),St=gs(),gl=gs(),ni=gs();function gs(){return 2**++WR}const bp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Fe,booleanish:Xt,commaOrSpaceSeparated:ni,commaSeparated:gl,number:fe,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:fe,ariaColIndex:fe,ariaColSpan:fe,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:fe,ariaLive:null,ariaModal:Xt,ariaMultiLine:Xt,ariaMultiSelectable:Xt,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:Xt,ariaReadOnly:Xt,ariaRelevant:null,ariaRequired:Xt,ariaRoleDescription:St,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:Xt,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,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:Fe,allowPaymentRequest:Fe,allowUserMedia:Fe,alt:null,as:null,async:Fe,autoCapitalize:null,autoComplete:St,autoFocus:Fe,autoPlay:Fe,blocking:St,capture:null,charSet:null,checked:Fe,cite:null,className:St,cols:fe,colSpan:null,content:null,contentEditable:Xt,controls:Fe,controlsList:St,coords:fe|gl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Fe,defer:Fe,dir:null,dirName:null,disabled:Fe,download:gp,draggable:Xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Fe,formTarget:null,headers:St,height:fe,hidden:gp,high:fe,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:Fe,inputMode:null,integrity:null,is:null,isMap:Fe,itemId:null,itemProp:St,itemRef:St,itemScope:Fe,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Fe,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Fe,muted:Fe,name:null,nonce:null,noModule:Fe,noValidate:Fe,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:Fe,optimum:fe,pattern:null,ping:St,placeholder:null,playsInline:Fe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Fe,referrerPolicy:null,rel:St,required:Fe,reversed:Fe,rows:fe,rowSpan:fe,sandbox:St,scope:null,scoped:Fe,seamless:Fe,selected:Fe,shadowRootClonable:Fe,shadowRootDelegatesFocus:Fe,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:Xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Fe,useMap:null,value:Xt,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Fe,declare:Fe,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Fe,noHref:Fe,noShade:Fe,noWrap:Fe,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:Xt,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Fe,disableRemotePlayback:Fe,prefix:null,property:null,results:fe,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:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,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:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Fe,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,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:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:ni,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,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:fe,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:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,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:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:ni,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ni,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,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:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,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 _!="string")throw new TypeError("First argument must be a string");if(!_)return[];N=N||{};var j=1,C=1;function D(ae){var W=ae.match(t);W&&(j+=W.length);var K=ae.lastIndexOf(d);C=~K?ae.length-K:C+ae.length}function F(){var ae={line:j,column:C};return function(W){return W.position=new R(ae),Z(),W}}function R(ae){this.start=ae,this.end={line:j,column:C},this.source=N.source}R.prototype.content=_;function q(ae){var W=new Error(N.source+":"+j+":"+C+": "+ae);if(W.reason=ae,W.filename=N.source,W.line=j,W.column=C,W.source=_,!N.silent)throw W}function U(ae){var W=ae.exec(_);if(W){var K=W[0];return D(K),_=_.slice(K.length),W}}function Z(){U(n)}function A(ae){var W;for(ae=ae||[];W=P();)W!==!1&&ae.push(W);return ae}function P(){var ae=F();if(!(h!=_.charAt(0)||y!=_.charAt(1))){for(var W=2;g!=_.charAt(W)&&(y!=_.charAt(W)||h!=_.charAt(W+1));)++W;if(W+=2,g===_.charAt(W-1))return q("End of comment missing");var K=_.slice(2,W-2);return C+=2,D(K),_=_.slice(W),C+=2,ae({type:x,comment:K})}}function G(){var ae=F(),W=U(a);if(W){if(P(),!U(s))return q("property missing ':'");var K=U(o),oe=ae({type:v,property:w(W[0].replace(e,g)),value:K?w(K[0].replace(e,g)):g});return U(c),oe}}function le(){var ae=[];A(ae);for(var W;W=G();)W!==!1&&(ae.push(W),A(ae));return ae}return Z(),le()}function w(_){return _?_.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(C){if(a<n.length){const D=n[a];return t.containerState=D[1],e.attempt(D[0].continuation,d,h)(C)}return h(C)}function d(C){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&j();const D=t.events.length;let F=D,R;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){R=t.events[F][1].end;break}N(a);let q=D;for(;q<t.events.length;)t.events[q][1].end={...R},q++;return ri(t.events,F+1,0,t.events.slice(D)),t.events.length=q,h(C)}return f(C)}function h(C){if(a===n.length){if(!s)return x(C);if(s.currentConstruct&&s.currentConstruct.concrete)return S(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(y0,y,g)(C)}function y(C){return s&&j(),N(a),x(C)}function g(C){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,S(C)}function x(C){return t.containerState={},e.attempt(y0,v,S)(C)}function v(C){return a++,n.push([t.currentConstruct,t.containerState]),x(C)}function S(C){if(C===null){s&&j(),N(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),w(C)}function w(C){if(C===null){_(e.exit("chunkFlow"),!0),N(0),e.consume(C);return}return Te(C)?(e.consume(C),_(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(C),w)}function _(C,D){const F=t.sliceStream(C);if(D&&F.push(null),C.previous=o,o&&(o.next=C),o=C,s.defineSkip(C.start),s.write(F),t.parser.lazy[C.start.line]){let R=s.events.length;for(;R--;)if(s.events[R][1].start.offset<c&&(!s.events[R][1].end||s.events[R][1].end.offset>c))return;const q=t.events.length;let U=q,Z,A;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(Z){A=t.events[U][1].end;break}Z=!0}for(N(a),R=q;R<t.events.length;)t.events[R][1].end={...A},R++;ri(t.events,U+1,0,t.events.slice(q)),t.events.length=R}}function N(C){let D=n.length;for(;D-- >C;){const F=n[D];t.containerState=F[1],F[0].exit.call(t,e)}n.length=C}function j(){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(R){return h(R)}function h(R){const q=a.events[a.events.length-1];return o=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,f=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(R)}function y(R){return R===f?(c++,e.consume(R),y):c<3?n(R):(e.exit("codeFencedFenceSequence"),Ge(R)?Je(e,g,"whitespace")(R):g(R))}function g(R){return R===null||Te(R)?(e.exit("codeFencedFence"),a.interrupt?t(R):e.check(v0,w,D)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(R))}function x(R){return R===null||Te(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(R)):Ge(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,v,"whitespace")(R)):R===96&&R===f?n(R):(e.consume(R),x)}function v(R){return R===null||Te(R)?g(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(R))}function S(R){return R===null||Te(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(R)):R===96&&R===f?n(R):(e.consume(R),S)}function w(R){return e.attempt(s,D,_)(R)}function _(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),N}function N(R){return o>0&&Ge(R)?Je(e,j,"linePrefix",o+1)(R):j(R)}function j(R){return R===null||Te(R)?e.check(v0,w,D)(R):(e.enter("codeFlowValue"),C(R))}function C(R){return R===null||Te(R)?(e.exit("codeFlowValue"),j(R)):(e.consume(R),C)}function D(R){return e.exit("codeFenced"),t(R)}function F(R,q,U){let Z=0;return A;function A(W){return R.enter("lineEnding"),R.consume(W),R.exit("lineEnding"),P}function P(W){return R.enter("codeFencedFence"),Ge(W)?Je(R,G,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):G(W)}function G(W){return W===f?(R.enter("codeFencedFenceSequence"),le(W)):U(W)}function le(W){return W===f?(Z++,R.consume(W),le):Z>=c?(R.exit("codeFencedFenceSequence"),Ge(W)?Je(R,ae,"whitespace")(W):ae(W)):U(W)}function ae(W){return W===null||Te(W)?(R.exit("codeFencedFence"),q(W)):U(W)}}}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 _=[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,_.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):_.pop(),x=_.length;x--;){const N=f.slice(_[x],_[x+1]),j=o.pop();d.push([j,j+N.length-1]),e.splice(j,2,N)}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(N){return N===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(N),e.exit(o),x):N===null||N===32||N===41||_f(N)?n(N):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(N))}function x(N){return N===62?(e.enter(o),e.consume(N),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(e.exit("chunkString"),e.exit(f),x(N)):N===null||N===60||Te(N)?n(N):(e.consume(N),N===92?S:v)}function S(N){return N===60||N===62||N===92?(e.consume(N),v):v(N)}function w(N){return!y&&(N===null||N===41||xt(N))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(N)):y<h&&N===40?(e.consume(N),y++,w):N===41?(e.consume(N),y--,w):N===null||N===32||N===40||_f(N)?n(N):(e.consume(N),N===92?_:w)}function _(N){return N===40||N===41||N===92?(e.consume(N),w):w(N)}}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(k){return y(k)}function y(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),g}function g(k){return k===33?(e.consume(k),x):k===47?(e.consume(k),o=!0,w):k===63?(e.consume(k),s=3,a.interrupt?t:O):kn(k)?(e.consume(k),c=String.fromCharCode(k),_):n(k)}function x(k){return k===45?(e.consume(k),s=2,v):k===91?(e.consume(k),s=5,f=0,S):kn(k)?(e.consume(k),s=4,a.interrupt?t:O):n(k)}function v(k){return k===45?(e.consume(k),a.interrupt?t:O):n(k)}function S(k){const ce="CDATA[";return k===ce.charCodeAt(f++)?(e.consume(k),f===ce.length?a.interrupt?t:G:S):n(k)}function w(k){return kn(k)?(e.consume(k),c=String.fromCharCode(k),_):n(k)}function _(k){if(k===null||k===47||k===62||xt(k)){const ce=k===47,Ee=c.toLowerCase();return!ce&&!o&&S0.includes(Ee)?(s=1,a.interrupt?t(k):G(k)):Aj.includes(c.toLowerCase())?(s=6,ce?(e.consume(k),N):a.interrupt?t(k):G(k)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(k):o?j(k):C(k))}return k===45||pn(k)?(e.consume(k),c+=String.fromCharCode(k),_):n(k)}function N(k){return k===62?(e.consume(k),a.interrupt?t:G):n(k)}function j(k){return Ge(k)?(e.consume(k),j):A(k)}function C(k){return k===47?(e.consume(k),A):k===58||k===95||kn(k)?(e.consume(k),D):Ge(k)?(e.consume(k),C):A(k)}function D(k){return k===45||k===46||k===58||k===95||pn(k)?(e.consume(k),D):F(k)}function F(k){return k===61?(e.consume(k),R):Ge(k)?(e.consume(k),F):C(k)}function R(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),d=k,q):Ge(k)?(e.consume(k),R):U(k)}function q(k){return k===d?(e.consume(k),d=null,Z):k===null||Te(k)?n(k):(e.consume(k),q)}function U(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||xt(k)?F(k):(e.consume(k),U)}function Z(k){return k===47||k===62||Ge(k)?C(k):n(k)}function A(k){return k===62?(e.consume(k),P):n(k)}function P(k){return k===null||Te(k)?G(k):Ge(k)?(e.consume(k),P):n(k)}function G(k){return k===45&&s===2?(e.consume(k),K):k===60&&s===1?(e.consume(k),oe):k===62&&s===4?(e.consume(k),L):k===63&&s===3?(e.consume(k),O):k===93&&s===5?(e.consume(k),me):Te(k)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Rj,J,le)(k)):k===null||Te(k)?(e.exit("htmlFlowData"),le(k)):(e.consume(k),G)}function le(k){return e.check(Mj,ae,J)(k)}function ae(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),W}function W(k){return k===null||Te(k)?le(k):(e.enter("htmlFlowData"),G(k))}function K(k){return k===45?(e.consume(k),O):G(k)}function oe(k){return k===47?(e.consume(k),c="",V):G(k)}function V(k){if(k===62){const ce=c.toLowerCase();return S0.includes(ce)?(e.consume(k),L):G(k)}return kn(k)&&c.length<8?(e.consume(k),c+=String.fromCharCode(k),V):G(k)}function me(k){return k===93?(e.consume(k),O):G(k)}function O(k){return k===62?(e.consume(k),L):k===45&&s===2?(e.consume(k),O):G(k)}function L(k){return k===null||Te(k)?(e.exit("htmlFlowData"),J(k)):(e.consume(k),L)}function J(k){return e.exit("htmlFlow"),t(k)}}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),C):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),j):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),_):Te(O)?(c=w,oe(O)):(e.consume(O),w)}function _(O){return O===93?(e.consume(O),N):w(O)}function N(O){return O===62?K(O):O===93?(e.consume(O),N):w(O)}function j(O){return O===null||O===62?K(O):Te(O)?(c=j,oe(O)):(e.consume(O),j)}function C(O){return O===null?n(O):O===63?(e.consume(O),D):Te(O)?(c=C,oe(O)):(e.consume(O),C)}function D(O){return O===62?K(O):C(O)}function F(O){return kn(O)?(e.consume(O),R):n(O)}function R(O){return O===45||pn(O)?(e.consume(O),R):q(O)}function q(O){return Te(O)?(c=q,oe(O)):Ge(O)?(e.consume(O),q):K(O)}function U(O){return O===45||pn(O)?(e.consume(O),U):O===47||O===62||xt(O)?Z(O):n(O)}function Z(O){return O===47?(e.consume(O),K):O===58||O===95||kn(O)?(e.consume(O),A):Te(O)?(c=Z,oe(O)):Ge(O)?(e.consume(O),Z):K(O)}function A(O){return O===45||O===46||O===58||O===95||pn(O)?(e.consume(O),A):P(O)}function P(O){return O===61?(e.consume(O),G):Te(O)?(c=P,oe(O)):Ge(O)?(e.consume(O),P):Z(O)}function G(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=G,oe(O)):Ge(O)?(e.consume(O),G):(e.consume(O),ae)}function le(O){return O===s?(e.consume(O),s=void 0,W):O===null?n(O):Te(O)?(c=le,oe(O)):(e.consume(O),le)}function ae(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||xt(O)?Z(O):(e.consume(O),ae)}function W(O){return O===47||O===62||xt(O)?Z(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"),V}function V(O){return Ge(O)?Je(e,me,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):me(O)}function me(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:q(F),check:q(R),consume:j,enter:C,exit:D,interrupt:q(R,{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),_(),c[c.length-1]!==null?[]:(U(t,0),h.events=Jf(o,h.events,h),h.events)}function x(P,G){return TD(v(P),G)}function v(P){return kD(c,P)}function S(){const{_bufferIndex:P,_index:G,line:le,column:ae,offset:W}=a;return{_bufferIndex:P,_index:G,line:le,column:ae,offset:W}}function w(P){s[P.line]=P.column,A()}function _(){let P;for(;a._index<c.length;){const G=c[a._index];if(typeof G=="string")for(P=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===P&&a._bufferIndex<G.length;)N(G.charCodeAt(a._bufferIndex));else N(G)}}function N(P){y=y(P)}function j(P){Te(P)?(a.line++,a.column=1,a.offset+=P===-3?2:1,A()):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 C(P,G){const le=G||{};return le.type=P,le.start=S(),h.events.push(["enter",le,h]),f.push(le),le}function D(P){const G=f.pop();return G.end=S(),h.events.push(["exit",G,h]),G}function F(P,G){U(P,G.from)}function R(P,G){G.restore()}function q(P,G){return le;function le(ae,W,K){let oe,V,me,O;return Array.isArray(ae)?J(ae):"tokenize"in ae?J([ae]):L(ae);function L(xe){return ze;function ze(st){const it=st!==null&&xe[st],Zt=st!==null&&xe.null,Kn=[...Array.isArray(it)?it:it?[it]:[],...Array.isArray(Zt)?Zt:Zt?[Zt]:[]];return J(Kn)(st)}}function J(xe){return oe=xe,V=0,xe.length===0?K:k(xe[V])}function k(xe){return ze;function ze(st){return O=Z(),me=xe,xe.partial||(h.currentConstruct=xe),xe.name&&h.parser.constructs.disable.null.includes(xe.name)?Ee():xe.tokenize.call(G?Object.assign(Object.create(h),G):h,d,ce,Ee)(st)}}function ce(xe){return P(me,O),W}function Ee(xe){return O.restore(),++V<oe.length?k(oe[V]):K}}}function U(P,G){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ri(h.events,G,h.events.length-G,P.resolve(h.events.slice(G),h)),P.resolveTo&&(h.events=P.resolveTo(h.events,h))}function Z(){const P=S(),G=h.previous,le=h.currentConstruct,ae=h.events.length,W=Array.from(f);return{from:ae,restore:K};function K(){a=P,h.previous=G,h.currentConstruct=le,h.events.length=ae,f=W,A()}}function A(){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 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:C,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:A,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:ve,characterReference:Fe,codeFenced:d(_),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:A,codeIndented:d(N),codeText:d(Q),codeTextData:A,data:A,definition:d(),definitionDestinationString:D,definitionLabelString:j,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(Y),hardBreakTrailing:d(Y),htmlFlow:d(le),htmlFlowData:A,htmlText:d(q),htmlTextData:A,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:R,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&<[0]==="enter"&<[1].type==="listItemPrefix"||et===-1&<[0]==="exit"&&(lt[1].type==="listUnordered"||lt[1].type==="listOrdered")){if(Ni){let Bi=Pe;for(an=void 0;Bi--;){const xn=ne[Bi];if(xn[1].type==="lineEnding"||xn[1].type==="lineEndingBlank"){if(xn[0]==="exit")continue;an&&(ne[an][1].type="lineEndingBlank",yn=!0),xn[1].type="lineEnding",an=Bi}else if(!(xn[1].type==="linePrefix"||xn[1].type==="blockQuotePrefix"||xn[1].type==="blockQuotePrefixWhitespace"||xn[1].type==="blockQuoteMarker"||xn[1].type==="listItemIndent"))break}Dt&&(!an||Dt<an)&&(Ni._spread=!0),Ni.end=Object.assign({},an?ne[an][1].start:lt[1].end),ne.splice(an||Pe,0,["exit",Ni,lt[2]]),Pe++,Ce++}if(lt[1].type==="listItemPrefix"){const Bi={type:"listItem",_spread:!1,start:Object.assign({},lt[1].start),end:void 0};Ni=Bi,ne.splice(Pe,0,["enter",Bi,lt[2]]),Pe++,Ce++,Dt=void 0,un=!0}}}return ne[fe][1]._spread=yn,Ce}function o(ne,fe){return Ce;function Ce(Pe){f.call(this,ne(Pe),Pe),fe&&fe.call(this,Pe)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ne,fe,Ce){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([fe,Ce||void 0]),ne.position={start:lr(fe.start),end:void 0}}function d(ne){return fe;function fe(Ce){ne&&ne.call(this,Ce),h.call(this,Ce)}}function h(ne,fe){const Ce=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==ne.type&&(fe?fe.call(this,ne,Pe[0]):(Pe[1]||N0).call(this,ne,Pe[0]));else throw new Error("Cannot close `"+ne.type+"` ("+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 _(){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 N(){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ne.replace(/(\r?\n|\r)$/g,"")}function j(ne){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Mi(this.sliceSerialize(ne)).toLowerCase()}function T(){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 R(){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 A(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),A.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 C(){this.data.referenceType="collapsed"}function he(ne){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Mi(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function Ne(ne){this.data.characterReferenceType=ne.type}function ve(ne){const fe=this.sliceSerialize(ne),Ce=this.data.characterReferenceType;let Pe;Ce?(Pe=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){A.call(this,ne);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ne)}function it(ne){A.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:`
|
|
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:Z,autolinkEmail:Z,atxHeading:o(Ii),blockQuote:o(Zt),characterEscape:Z,characterReference:Z,codeFenced:o(Kn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Kn,c),codeText:o(Ji,c),codeTextData:Z,data:Z,codeFlowValue:Z,definition:o(Ra),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Gn),hardBreakEscape:o(Xe),hardBreakTrailing:o(Xe),htmlFlow:o(_i,c),htmlFlowData:Z,htmlText:o(_i,c),htmlTextData:Z,image:o(li),label:c,link:o(zi),listItem:o(kr),listItemValue:x,listOrdered:o(ea,g),listUnordered:o(ea),paragraph:o(Yl),reference:k,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:A,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:xe,characterReference:ze,codeFenced:d(_),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:A,codeIndented:d(N),codeText:d(W),codeTextData:A,data:A,definition:d(),definitionDestinationString:D,definitionLabelString:j,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(G),hardBreakTrailing:d(G),htmlFlow:d(le),htmlFlowData:A,htmlText:d(ae),htmlTextData:A,image:d(oe),label:me,labelText:V,lineEnding:P,link:d(K),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ce,resourceDestinationString:O,resourceTitleString:L,resource:J,setextHeading:d(U),setextHeadingLineSequence:q,setextHeadingText:R,strong:d(),thematicBreak:d()}};BS(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(te){let de={type:"root",children:[]};const Ce={stack:[de],tokenStack:[],config:t,enter:f,exit:h,buffer:c,resume:y,data:n},Pe=[];let et=-1;for(;++et<te.length;)if(te[et][1].type==="listOrdered"||te[et][1].type==="listUnordered")if(te[et][0]==="enter")Pe.push(et);else{const yn=Pe.pop();et=s(te,yn,et)}for(et=-1;++et<te.length;){const yn=t[te[et][0]];zS.call(yn,te[et][1].type)&&yn[te[et][1].type].call(Object.assign({sliceSerialize:te[et][2].sliceSerialize},Ce),te[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(de.position={start:lr(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:lr(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et<t.transforms.length;)de=t.transforms[et](de)||de;return de}function s(te,de,Ce){let Pe=de-1,et=-1,yn=!1,Ni,an,Dt,un;for(;++Pe<=Ce;){const lt=te[Pe];switch(lt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{lt[0]==="enter"?et++:et--,un=void 0;break}case"lineEndingBlank":{lt[0]==="enter"&&(Ni&&!un&&!et&&!Dt&&(Dt=Pe),un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:un=void 0}if(!et&<[0]==="enter"&<[1].type==="listItemPrefix"||et===-1&<[0]==="exit"&&(lt[1].type==="listUnordered"||lt[1].type==="listOrdered")){if(Ni){let Bi=Pe;for(an=void 0;Bi--;){const xn=te[Bi];if(xn[1].type==="lineEnding"||xn[1].type==="lineEndingBlank"){if(xn[0]==="exit")continue;an&&(te[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?te[an][1].start:lt[1].end),te.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,te.splice(Pe,0,["enter",Bi,lt[2]]),Pe++,Ce++,Dt=void 0,un=!0}}}return te[de][1]._spread=yn,Ce}function o(te,de){return Ce;function Ce(Pe){f.call(this,te(Pe),Pe),de&&de.call(this,Pe)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(te,de,Ce){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([de,Ce||void 0]),te.position={start:lr(de.start),end:void 0}}function d(te){return de;function de(Ce){te&&te.call(this,Ce),h.call(this,Ce)}}function h(te,de){const Ce=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==te.type&&(de?de.call(this,te,Pe[0]):(Pe[1]||N0).call(this,te,Pe[0]));else throw new Error("Cannot close `"+te.type+"` ("+tc({start:te.start,end:te.end})+"): it’s not open");Ce.position.end=lr(te.end)}function y(){return Sg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x(te){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function v(){const te=this.resume(),de=this.stack[this.stack.length-1];de.lang=te}function S(){const te=this.resume(),de=this.stack[this.stack.length-1];de.meta=te}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te.replace(/(\r?\n|\r)$/g,"")}function j(te){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=Mi(this.sliceSerialize(te)).toLowerCase()}function C(){const te=this.resume(),de=this.stack[this.stack.length-1];de.title=te}function D(){const te=this.resume(),de=this.stack[this.stack.length-1];de.url=te}function F(te){const de=this.stack[this.stack.length-1];if(!de.depth){const Ce=this.sliceSerialize(te).length;de.depth=Ce}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function q(te){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function Z(te){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(te.start),end:void 0},Ce.push(Pe)),this.stack.push(Pe)}function A(te){const de=this.stack.pop();de.value+=this.sliceSerialize(te),de.position.end=lr(te.end)}function P(te){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=de.children[de.children.length-1];Ce.position.end=lr(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(Z.call(this,te),A.call(this,te))}function G(){this.data.atHardBreak=!0}function le(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function ae(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function W(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function K(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=de,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function oe(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=de,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function V(te){const de=this.sliceSerialize(te),Ce=this.stack[this.stack.length-2];Ce.label=MD(de),Ce.identifier=Mi(de).toLowerCase()}function me(){const te=this.stack[this.stack.length-1],de=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Pe=te.children;Ce.children=Pe}else Ce.alt=de}function O(){const te=this.resume(),de=this.stack[this.stack.length-1];de.url=te}function L(){const te=this.resume(),de=this.stack[this.stack.length-1];de.title=te}function J(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function ce(te){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=Mi(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function Ee(te){this.data.characterReferenceType=te.type}function xe(te){const de=this.sliceSerialize(te),Ce=this.data.characterReferenceType;let Pe;Ce?(Pe=TS(de,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=wg(de);const et=this.stack[this.stack.length-1];et.value+=Pe}function ze(te){const de=this.stack.pop();de.position.end=lr(te.end)}function st(te){A.call(this,te);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(te)}function it(te){A.call(this,te);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(te)}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(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function kr(te){return{type:"listItem",spread:te._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
484
|
`}]}function $D(e,t){const n=t.value?t.value+`
|
|
485
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:`
|
|
@@ -490,8 +490,8 @@ ${g.join(`
|
|
|
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
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],_=1,N=arguments.length,j=!1;for(typeof w=="boolean"&&(j=w,w=arguments[1]||{},_=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});_<N;++_)if(h=arguments[_],h!=null)for(y in h)g=f(w,y),x=f(h,y),w!==x&&(j&&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(j,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 _=g.children.indexOf(h);let N=!1,j=[];x.lastIndex=0;let T=x.exec(h.value);for(;T;){const D=T.index,F={index:T.index,input:T.input,stack:[...y,h]};let R=v(...T,F);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?x.lastIndex=D+1:(S!==D&&j.push({type:"text",value:h.value.slice(S,D)}),Array.isArray(R)?j.push(...R):R&&j.push(R),S=D+T[0].length,N=!0),!x.global)break;T=x.exec(h.value)}return N?(S<h.value.length&&j.push({type:"text",value:h.value.slice(S)}),g.children.splice(_,1,...j)):j=[h],_+j.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=[],_=[];let N=-1;for(e[y].length>h&&(h=e[y].length);++N<e[y].length;){const j=q3(e[y][N]);if(n.alignDelimiters!==!1){const
|
|
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],_=1,N=arguments.length,j=!1;for(typeof w=="boolean"&&(j=w,w=arguments[1]||{},_=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});_<N;++_)if(h=arguments[_],h!=null)for(y in h)g=f(w,y),x=f(h,y),w!==x&&(j&&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(j,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 _=g.children.indexOf(h);let N=!1,j=[];x.lastIndex=0;let C=x.exec(h.value);for(;C;){const D=C.index,F={index:C.index,input:C.input,stack:[...y,h]};let R=v(...C,F);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?x.lastIndex=D+1:(S!==D&&j.push({type:"text",value:h.value.slice(S,D)}),Array.isArray(R)?j.push(...R):R&&j.push(R),S=D+C[0].length,N=!0),!x.global)break;C=x.exec(h.value)}return N?(S<h.value.length&&j.push({type:"text",value:h.value.slice(S)}),g.children.splice(_,1,...j)):j=[h],_+j.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=[],_=[];let N=-1;for(e[y].length>h&&(h=e[y].length);++N<e[y].length;){const j=q3(e[y][N]);if(n.alignDelimiters!==!1){const C=s(j);_[N]=C,(d[N]===void 0||C>d[N])&&(d[N]=C)}w.push(j)}c[y]=w,f[y]=_}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?_=":":w===114&&(N=":");let j=n.alignDelimiters===!1?1:Math.max(1,d[g]-_.length-N.length);const C=_+"-".repeat(j)+N;n.alignDelimiters!==!1&&(j=_.length+j+N.length,j>d[g]&&(d[g]=j),v[g]=j),x[g]=C}c.splice(1,0,x),f.splice(1,0,v),y=-1;const S=[];for(;++y<c.length;){const w=c[y],_=f[y];g=-1;const N=[];for(;++g<h;){const j=w[g]||"";let C="",D="";if(n.alignDelimiters!==!1){const F=d[g]-(_[g]||0),R=o[g];R===114?C=" ".repeat(F):R===99?F%2?(C=" ".repeat(F/2+.5),D=" ".repeat(F/2-.5)):(C=" ".repeat(F/2),D=C):D=" ".repeat(F)}n.delimiterStart!==!1&&!g&&N.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||g)&&N.push(" "),n.alignDelimiters!==!1&&N.push(C),N.push(j),n.alignDelimiters!==!1&&N.push(D),n.padding!==!1&&N.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&N.push("|")}S.push(n.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return S.join(`
|
|
495
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
496
|
`&&G3(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
497
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:`
|
|
@@ -505,10 +505,10 @@ ${g.join(`
|
|
|
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
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,_){return h(y(v,w,_),v.align)}function f(v,S,w,_){const N=g(v,w,_),j=h([N]);return j.slice(0,j.indexOf(`
|
|
508
|
-
`))}function d(v,S,w,_){const N=w.enter("tableCell"),j=w.enter("phrasing"),T=w.containerPhrasing(v,{..._,before:o,after:o});return j(),N(),T}function h(v,S){return P3(v,{align:S,alignDelimiters:a,padding:n,stringLength:s})}function y(v,S,w){const _=v.children;let N=-1;const j=[],T=S.enter("table");for(;++N<_.length;)j[N]=g(_[N],S,w);return T(),j}function g(v,S,w){const _=v.children;let N=-1;const j=[],T=S.enter("tableRow");for(;++N<_.length;)j[N]=d(_[N],v,S,w);return T(),j}function x(v,S,w){let _=lw.inlineCode(v,S,w);return w.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}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 _=c.exit("strikethroughSequenceTemporary"),N=Ml(S);return _._open=!N||N===2&&!!w,_._close=!w||w===2&&!!N,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(A){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"?R:d;return le===R&&a.parser.lazy[a.now().line]?n(A):le(A)}function d(A){return e.enter("tableHead"),e.enter("tableRow"),h(A)}function h(A){return A===124||(c=!0,o+=1),y(A)}function y(A){return A===null?n(A):Te(A)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),v):n(A):Ge(A)?Je(e,y,"whitespace")(A):(o+=1,c&&(c=!1,s+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(A)))}function g(A){return A===null||A===124||xt(A)?(e.exit("data"),y(A)):(e.consume(A),A===92?x:g)}function x(A){return A===92||A===124?(e.consume(A),g):g(A)}function v(A){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(A):(e.enter("tableDelimiterRow"),c=!1,Ge(A)?Je(e,S,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):S(A))}function S(A){return A===45||A===58?_(A):A===124?(c=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),w):F(A)}function w(A){return Ge(A)?Je(e,_,"whitespace")(A):_(A)}function _(A){return A===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),N):A===45?(o+=1,N(A)):A===null||Te(A)?D(A):F(A)}function N(A){return A===45?(e.enter("tableDelimiterFiller"),j(A)):F(A)}function j(A){return A===45?(e.consume(A),j):A===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(A))}function T(A){return Ge(A)?Je(e,D,"whitespace")(A):D(A)}function D(A){return A===124?S(A):A===null||Te(A)?!c||s!==o?F(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):F(A)}function F(A){return n(A)}function R(A){return e.enter("tableRow"),H(A)}function H(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),H):A===null||Te(A)?(e.exit("tableRow"),t(A)):Ge(A)?Je(e,H,"whitespace")(A):(e.enter("data"),U(A))}function U(A){return A===null||A===124||xt(A)?(e.exit("data"),H(A)):(e.consume(A),A===92?J:U)}function J(A){return A===92||A===124?(e.consume(A),U):U(A)}}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(`
|
|
508
|
+
`))}function d(v,S,w,_){const N=w.enter("tableCell"),j=w.enter("phrasing"),C=w.containerPhrasing(v,{..._,before:o,after:o});return j(),N(),C}function h(v,S){return P3(v,{align:S,alignDelimiters:a,padding:n,stringLength:s})}function y(v,S,w){const _=v.children;let N=-1;const j=[],C=S.enter("table");for(;++N<_.length;)j[N]=g(_[N],S,w);return C(),j}function g(v,S,w){const _=v.children;let N=-1;const j=[],C=S.enter("tableRow");for(;++N<_.length;)j[N]=d(_[N],v,S,w);return C(),j}function x(v,S,w){let _=lw.inlineCode(v,S,w);return w.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}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 _=c.exit("strikethroughSequenceTemporary"),N=Ml(S);return _._open=!N||N===2&&!!w,_._close=!w||w===2&&!!N,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(A){let P=a.events.length-1;for(;P>-1;){const ae=a.events[P][1].type;if(ae==="lineEnding"||ae==="linePrefix")P--;else break}const G=P>-1?a.events[P][1].type:null,le=G==="tableHead"||G==="tableRow"?R:d;return le===R&&a.parser.lazy[a.now().line]?n(A):le(A)}function d(A){return e.enter("tableHead"),e.enter("tableRow"),h(A)}function h(A){return A===124||(c=!0,o+=1),y(A)}function y(A){return A===null?n(A):Te(A)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),v):n(A):Ge(A)?Je(e,y,"whitespace")(A):(o+=1,c&&(c=!1,s+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(A)))}function g(A){return A===null||A===124||xt(A)?(e.exit("data"),y(A)):(e.consume(A),A===92?x:g)}function x(A){return A===92||A===124?(e.consume(A),g):g(A)}function v(A){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(A):(e.enter("tableDelimiterRow"),c=!1,Ge(A)?Je(e,S,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):S(A))}function S(A){return A===45||A===58?_(A):A===124?(c=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),w):F(A)}function w(A){return Ge(A)?Je(e,_,"whitespace")(A):_(A)}function _(A){return A===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),N):A===45?(o+=1,N(A)):A===null||Te(A)?D(A):F(A)}function N(A){return A===45?(e.enter("tableDelimiterFiller"),j(A)):F(A)}function j(A){return A===45?(e.consume(A),j):A===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(A))}function C(A){return Ge(A)?Je(e,D,"whitespace")(A):D(A)}function D(A){return A===124?S(A):A===null||Te(A)?!c||s!==o?F(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):F(A)}function F(A){return n(A)}function R(A){return e.enter("tableRow"),q(A)}function q(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),q):A===null||Te(A)?(e.exit("tableRow"),t(A)):Ge(A)?Je(e,q,"whitespace")(A):(e.enter("data"),U(A))}function U(A){return A===null||A===124||xt(A)?(e.exit("data"),q(A)):(e.consume(A),A===92?Z:U)}function Z(A){return A===92||A===124?(e.consume(A),U):U(A)}}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
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"],_=["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"],N=["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:_},F={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},R=[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:R.concat([{begin:/\(/,end:/\)/,keywords:D,contains:R.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,R,[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"],_=["true","false"],N={match:/(\/[a-z._-]+)+/},j=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],T=["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:_,built_in:[...j,...T,"set","shopt",...D,...F]},contains:[v,e.SHEBANG(),S,g,o,c,N,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*\\(",_={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"},N=[g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],j={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:N.concat([{begin:/\(/,end:/\)/,keywords:_,contains:N.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:_,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:_,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:_,disableAutodetect:!0,illegal:"</",contains:[].concat(j,T,N,[g,{begin:e.IDENT_RE+"::",keywords:_},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:h,keywords:_}}}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"],_=["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"],N=["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:_},F={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},R=[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:R.concat([{begin:/\(/,end:/\)/,keywords:D,contains:R.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,R,[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]},_=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=[_,S,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const N={variants:[h,w,S,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},j={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},T=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"}},N,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,j,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,j,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:"("+T+"\\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,j],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[N,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 C=Z.input.substring(O);if(te=C.match(/^\s*=/)){pe.ignoreMatch();return}if((te=C.match(/^\s+extends\s+/))&&te.index===0){pe.ignoreMatch();return}}},f={$pattern:eE,keyword: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"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},j={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]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,_,{match:/\$\d+/},g];x.contains=T.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(T)});const D=[].concat(j,x.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),R={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)['"]/},A={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],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:/\(\)/},R]},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:[R]};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,_,j,{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:[j,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"]}]}]},A,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,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:[R]},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(T){return{className:"string",begin:"~?"+T+".*?"+T}},h=function(T,D,F){return{className:T,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}},_={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:x}},N={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]},j={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[N]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,_,j,S,N,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(N=>{N.contains=N.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 j=N==="\\1"?N:t.concat(N,_);return t.concat(t.concat("(?:",w,")"),_,/(?:\\.|[^\\\/])*?/,j,/(?:\\.|[^\\\/])*?/,N,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},_=["false","null","true"],N=["__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"],j=["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:N,literal:(q=>{const Q=[];return q.forEach(K=>{Q.push(K),K.toLowerCase()===K?Q.push(K.toUpperCase()):Q.push(K.toLowerCase())}),Q})(_),built_in:j},F=q=>q.map(Q=>Q.replace(/\|\d+$/,"")),R={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",F(j).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(/(?!::)/))},A={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[J,c,U,e.C_BLOCK_COMMENT_MODE,S,w,R]},P={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",F(N).join("\\b|"),"|",F(j).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[A]};A.contains.push(P);const Y=[J,U,e.C_BLOCK_COMMENT_MODE,S,w,R],le={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:_,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:_,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"}},R,{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})`}]},_={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},N={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,_,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[N]},{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,N,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}]},R=[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=R,w.contains=R;const A=[{begin:/^\s*=>/,starts:{end:"$",contains:R}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:R}}];return h.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(A).concat(h).concat(R)}}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_]*/},_={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},N={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function j(F){return t.concat(/\b/,t.either(...F.map(R=>R.replace(/\s+/,"\\s+"))),/\b/)}const T={scope:"keyword",match:j(x),relevance:0};function D(F,{exceptions:R,when:H}={}){const U=H;return R=R||[],F.map(J=>J.match(/\|\d+$/)||R.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:j(c)},T,N,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,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})+`}]},_=[S,w],N="([0-9]_*)+",j="([0-9a-fA-F]_*)+",T={className:"number",relevance:0,variants:[{match:`\\b(${N})(\\.(${N}))?([eE][+-]?(${N}))?\\b`},{match:`\\b0x(${j})(\\.(${j}))?([pP][+-]?(${N}))?\\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)/)}),R=(Xe="")=>({className:"subst",label:"interpol",begin:gt(/\\/,Xe,/\(/),end:/\)/}),H=(Xe="")=>({begin:gt(Xe,/"""/),end:gt(/"""/,Xe),contains:[D(Xe),F(Xe),R(Xe)]}),U=(Xe="")=>({begin:gt(Xe,/"/),end:gt(/"/,Xe),contains:[D(Xe),R(Xe)]}),J={className:"string",variants:[H(),H("#"),H("##"),H("###"),U(),U("#"),U("##"),U("###")]},A=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],P={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:A},Y=Xe=>{const _i=gt(Xe,/\//),li=gt(/\//,Xe);return{begin:_i,end:li,contains:[...A,{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:[..._,T,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}]},C={begin:/</,end:/>/,keywords:h,contains:[...a,...y,...L,S,te]};te.contains.push(C);const he={match:gt(Hi,/\s*:/),keywords:"_|0",relevance:0},Ne={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",he,...a,le,...y,...v,..._,T,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,..._,T,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,..._,T,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,..._,T,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 C=Z.input.substring(O);if(te=C.match(/^\s*=/)){pe.ignoreMatch();return}if((te=C.match(/^\s+extends\s+/))&&te.index===0){pe.ignoreMatch();return}}},f={$pattern:Af,keyword: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"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},j={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]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,_,{match:/\$\d+/},g];x.contains=T.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(T)});const D=[].concat(j,x.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),R={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)['"]/},A={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],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:/\(\)/},R]},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:[R]};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,_,j,{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:[j,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"]}]}]},A,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,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:[R]},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 j=w.contains.findIndex(T=>T.label===_);if(j===-1)throw new Error("can not find mode to replace");w.contains.splice(j,1,N)};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},_=[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 N.pop(),N.push(f),v.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:_}}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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}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 _(B){const ae=B[B.length-1];return typeof ae=="object"&&ae.constructor===Object?(B.splice(B.length-1,1),ae):{}}function N(...B){return"("+(_(B).capture?"":"?:")+B.map(je=>g(je)).join("|")+")"}function j(B){return new RegExp(B.toString()+"|").exec("").length-1}function T(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 R=/\b\B/,H="[a-zA-Z]\\w*",U="[a-zA-Z_]\\w*",J="\\b\\d+(\\.\\d+)?",A="(-?)(\\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=N("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},C={scope:"number",begin:A,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:C,C_NUMBER_RE:A,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:R,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=N(...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+=j(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+=j(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
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),Ft=
|
|
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:N,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(w,d,h);_.data&&_.data.relevance!==void 0&&_.data.relevance>v&&(v=_.data.relevance,S=_)}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 _=vz(x,{whitespace:"pre"});let N;try{N=w?h.highlight(w,_,{prefix:c}):h.highlightAuto(_,{prefix:c,subset:f})}catch(j){const T=j;if(w&&/Unknown language/.test(T.message)){g.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[S,x],cause:T,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw T}!w&&N.data&&N.data.language&&x.properties.className.push("language-"+N.data.language),N.children.length>0&&(x.children=N.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)});M.useEffect(()=>{const w=_=>{_.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 _=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}),_==="linked"&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),_==="frozen"&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!_&&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:[!_&&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"]}),_==="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"})]}),_==="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]=M.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]=M.useState("all"),[n,a]=M.useState(""),[s,o]=M.useState(null),c=Tn(),{data:f,isLoading:d}=dt({queryKey:["skills"],queryFn:()=>fg()}),h=dt({queryKey:["projects"],queryFn:Bl}),y=M.useMemo(()=>((f==null?void 0:f.data)??[]).filter(S=>!(e!=="all"&&S.category!==e||n&&!S.name.toLowerCase().includes(n.toLowerCase()))),[f,e,n]),g=M.useMemo(()=>{const v=(f==null?void 0:f.data)??[],S={all:v.length};for(const 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]=M.useState(!1);return m.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[m.jsx("header",{children:m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),m.jsx(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]=M.useState(!1),[o,c]=M.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]=M.useState(null),[c,f]=M.useState(null);M.useEffect(()=>{a.data&&s===null&&(o(a.data.content),f(a.data.etag))},[a.data,s]);const d=s!==null&&a.data&&s!==a.data.content,h=Pn({mutationFn:()=>{if(s===null)throw new Error("no draft");return 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 j,T,D,F,R,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]=M.useState(null),[h,y]=M.useState(""),[g,x]=M.useState(!1),v=M.useRef(null);M.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 A=n.getQueryData(["chat-session",e]),P=A!=null&&A.messages.length?A.messages[A.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",A=>{try{const P=JSON.parse(A.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",A=>{try{const P=JSON.parse(A.data);d({id:P.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),U.addEventListener("chat.message.chunk.text",A=>{try{const P=JSON.parse(A.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",A=>{try{const P=JSON.parse(A.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",A=>{try{const P=JSON.parse(A.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",A=>{try{const P=JSON.parse(A.data);d(Y=>Y&&Y.id===P.assistantId?{...Y,done:!0,finalMessage:P.message}:Y)}catch{}}),()=>U.close()},[e,n]),M.useEffect(()=>{if(!f)return;const U=f.blocks.reduce((A,P)=>P.type==="text"?A+(P.target.length-P.displayed.length):A,0);if(U<=0){if(f.done&&f.finalMessage){const A=f.finalMessage;n.setQueryData(["chat-session",e],P=>!P||P.messages.some(Y=>Y.id===A.id)?P:{...P,messages:[...P.messages,A],lastMessageAt:A.ts,messageCount:P.messageCount+1}),n.invalidateQueries({queryKey:["chat-sessions"]}),d(null),x(!1)}return}const J=setTimeout(()=>{d(A=>{if(!A)return A;let P=Math.max(1,Math.ceil(U/40));const Y=A.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{...A,blocks:Y}})},25);return()=>clearTimeout(J)},[f,n,e]),M.useEffect(()=>{const U=v.current;U&&(U.scrollTop=U.scrollHeight)},[c.data,f]);const S=M.useCallback(async()=>{const U=await sE();n.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${U.id}`)},[n,t]),w=M.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 A={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,A],lastMessageAt:A.ts,messageCount:P.messageCount+1}:{id:J,createdAt:A.ts,lastMessageAt:A.ts,title:U.slice(0,60),project:null,messageCount:1,messages:[A]}),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]),_=M.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]),N=M.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:["历史 ",((j=o.data)==null?void 0:j.data.length)??0]}),m.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((T=o.data)==null?void 0:T.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(),_(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:[(((R=c.data)==null?void 0:R.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:N,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]=M.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return m.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[m.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[m.jsx(JE,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),m.jsx(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(M.StrictMode,{children:m.jsx(kk,{client:_B,children:m.jsx(cC,{children:m.jsx(S2,{children:m.jsx(wB,{})})})})}));
|
|
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"],_=["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"],N=["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:_},F={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},R=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:R.concat([{begin:/\(/,end:/\)/,keywords:D,contains:R.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,U,F,R,[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"],_=["true","false"],N={match:/(\/[a-z._-]+)+/},j=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],C=["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:_,built_in:[...j,...C,"set","shopt",...D,...F]},contains:[v,e.SHEBANG(),S,g,o,c,N,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*\\(",_={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"},N=[g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],j={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:N.concat([{begin:/\(/,end:/\)/,keywords:_,contains:N.concat(["self"]),relevance:0}]),relevance:0},C={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:_,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:_,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:_,disableAutodetect:!0,illegal:"</",contains:[].concat(j,C,N,[g,{begin:e.IDENT_RE+"::",keywords:_},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:h,keywords:_}}}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"],_=["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"],N=["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:_},F={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},R=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,y,h],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:R.concat([{begin:/\(/,end:/\)/,keywords:D,contains:R.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,U,F,R,[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]},_=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=[_,S,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const N={variants:[h,w,S,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},j={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},C=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"}},N,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,j,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,j,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:"("+C+"\\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,j],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[N,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=(V,{after:me})=>{const O="</"+V[0].slice(1);return V.input.indexOf(O,me)!==-1},a=eE,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,me)=>{const O=V[0].length+V.index,L=V.input[O];if(L==="<"||L===","){me.ignoreMatch();return}L===">"&&(n(V,{after:O})||me.ignoreMatch());let J;const k=V.input.substring(O);if(J=k.match(/^\s*=/)){me.ignoreMatch();return}if((J=k.match(/^\s+extends\s+/))&&J.index===0){me.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"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},j={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]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,_,{match:/\$\d+/},g];x.contains=C.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(C)});const D=[].concat(j,x.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},q={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Ew,...Sw]}},Z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},A={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(V){return t.concat("(?!",V.join("|"),")")}const le={match:t.concat(/\b/,G([...ww,"super","import"].map(V=>`${V}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ae={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},W={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},R]},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:[R]};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}),Z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,_,j,{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:[j,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"]}]}]},A,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},ae,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},le,P,q,W,{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(C){return{className:"string",begin:"~?"+C+".*?"+C}},h=function(C,D,F){return{className:C,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}},_={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:x}},N={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]},j={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[N]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,_,j,S,N,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(N=>{N.contains=N.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 j=N==="\\1"?N:t.concat(N,_);return t.concat(t.concat("(?:",w,")"),_,/(?:\\.|[^\\\/])*?/,j,/(?:\\.|[^\\\/])*?/,N,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":(ae,W)=>{W.data._beginMatch=ae[1]||ae[2]},"on:end":(ae,W)=>{W.data._beginMatch!==ae[1]&&W.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},_=["false","null","true"],N=["__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"],j=["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:N,literal:(ae=>{const W=[];return ae.forEach(K=>{W.push(K),K.toLowerCase()===K?W.push(K.toUpperCase()):W.push(K.toLowerCase())}),W})(_),built_in:j},F=ae=>ae.map(W=>W.replace(/\|\d+$/,"")),R={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",F(j).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},q=t.concat(a,"\\b(?!\\()"),U={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),q],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),q],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},Z={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},A={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[Z,c,U,e.C_BLOCK_COMMENT_MODE,S,w,R]},P={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",F(N).join("\\b|"),"|",F(j).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[A]};A.contains.push(P);const G=[Z,U,e.C_BLOCK_COMMENT_MODE,S,w,R],le={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:_,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:_,keyword:["new","array"]},contains:["self",...G]},...G,{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"}},R,{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})`}]},_={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},N={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,_,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[N]},{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,N,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}]},R=[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=R,w.contains=R;const A=[{begin:/^\s*=>/,starts:{end:"$",contains:R}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:R}}];return h.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(A).concat(h).concat(R)}}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_]*/},_={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},N={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function j(F){return t.concat(/\b/,t.either(...F.map(R=>R.replace(/\s+/,"\\s+"))),/\b/)}const C={scope:"keyword",match:j(x),relevance:0};function D(F,{exceptions:R,when:q}={}){const U=q;return R=R||[],F.map(Z=>Z.match(/\|\d+$/)||R.includes(Z)?Z:U(Z)?`${Z}|0`:Z)}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:j(c)},C,N,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,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})+`}]},_=[S,w],N="([0-9]_*)+",j="([0-9a-fA-F]_*)+",C={className:"number",relevance:0,variants:[{match:`\\b(${N})(\\.(${N}))?([eE][+-]?(${N}))?\\b`},{match:`\\b0x(${j})(\\.(${j}))?([pP][+-]?(${N}))?\\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)/)}),R=(Xe="")=>({className:"subst",label:"interpol",begin:gt(/\\/,Xe,/\(/),end:/\)/}),q=(Xe="")=>({begin:gt(Xe,/"""/),end:gt(/"""/,Xe),contains:[D(Xe),F(Xe),R(Xe)]}),U=(Xe="")=>({begin:gt(Xe,/"/),end:gt(/"/,Xe),contains:[D(Xe),R(Xe)]}),Z={className:"string",variants:[q(),q("#"),q("##"),q("###"),U(),U("#"),U("##"),U("###")]},A=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],P={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:A},G=Xe=>{const _i=gt(Xe,/\//),li=gt(/\//,Xe);return{begin:_i,end:li,contains:[...A,{scope:"comment",begin:`#(?!.*${li})`,end:/$/}]}},le={scope:"regexp",variants:[G("###"),G("##"),G("#"),P]},ae={match:gt(/`/,Hi,/`/)},W={className:"variable",match:/\$\d+/},K={className:"variable",match:`\\$${Cf}+`},oe=[ae,W,K],V={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:U4,contains:[..._,C,Z]}]}},me={scope:"keyword",match:gt(/@/,wn(...B4),Zo(wn(/\(/,/\s+/)))},O={scope:"meta",match:gt(/@/,Hi)},L=[V,me,O],J={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}]},k={begin:/</,end:/>/,keywords:h,contains:[...a,...y,...L,S,J]};J.contains.push(k);const ce={match:gt(Hi,/\s*:/),keywords:"_|0",relevance:0},Ee={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",ce,...a,le,...y,...v,..._,C,Z,...oe,...L,J]},xe={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,J]},ze={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:[ze,...a,...y,..._,C,Z,...L,J,Ee],endsParent:!0,illegal:/["']/},it={match:[/(func|macro)/,/\s+/,wn(ae.match,Hi,Pm)],className:{1:"keyword",3:"title.function"},contains:[xe,st,t],illegal:[/\[/,/%/]},Zt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[xe,st,t],illegal:/\[|%/},Kn={match:[/operator/,/\s+/,Pm],className:{1:"keyword",3:"title"}},Ji={begin:[/precedencegroup/,/\s+/,sf],className:{1:"keyword",3:"title"},contains:[J],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:[xe,...y,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:sf},...y],relevance:0}]};for(const Xe of Z.variants){const _i=Xe.contains.find(zi=>zi.label==="interpol");_i.keywords=h;const li=[...y,...v,..._,C,Z,...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,..._,C,Z,...oe,...L,J,Ee]}}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=(V,{after:me})=>{const O="</"+V[0].slice(1);return V.input.indexOf(O,me)!==-1},a=Af,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,me)=>{const O=V[0].length+V.index,L=V.input[O];if(L==="<"||L===","){me.ignoreMatch();return}L===">"&&(n(V,{after:O})||me.ignoreMatch());let J;const k=V.input.substring(O);if(J=k.match(/^\s*=/)){me.ignoreMatch();return}if((J=k.match(/^\s+extends\s+/))&&J.index===0){me.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"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},j={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]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,_,{match:/\$\d+/},g];x.contains=C.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(C)});const D=[].concat(j,x.contains),F=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},q={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Mw,...jw]}},Z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},A={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(V){return t.concat("(?!",V.join("|"),")")}const le={match:t.concat(/\b/,G([...Dw,"super","import"].map(V=>`${V}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ae={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},W={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},R]},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:[R]};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}),Z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,_,j,{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:[j,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"]}]}]},A,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},ae,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},le,P,q,W,{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 j=w.contains.findIndex(C=>C.label===_);if(j===-1)throw new Error("can not find mode to replace");w.contains.splice(j,1,N)};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},_=[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 N.pop(),N.push(f),v.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:_}}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(ie=>{const pe=B[ie],je=typeof pe;(je==="object"||je==="function")&&!Object.isFrozen(pe)&&e(pe)}),B}class t{constructor(ie){ie.data===void 0&&(ie.data={}),this.data=ie.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(B){return B.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(B,...ie){const pe=Object.create(null);for(const je in B)pe[je]=B[je];return ie.forEach(function(je){for(const wt in je)pe[wt]=je[wt]}),pe}const s="</span>",o=B=>!!B.scope,c=(B,{prefix:ie})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const pe=B.split(".");return[`${ie}${pe.shift()}`,...pe.map((je,wt)=>`${je}${"_".repeat(wt+1)}`)].join(" ")}return`${ie}${B}`};class f{constructor(ie,pe){this.buffer="",this.classPrefix=pe.classPrefix,ie.walk(this)}addText(ie){this.buffer+=n(ie)}openNode(ie){if(!o(ie))return;const pe=c(ie.scope,{prefix:this.classPrefix});this.span(pe)}closeNode(ie){o(ie)&&(this.buffer+=s)}value(){return this.buffer}span(ie){this.buffer+=`<span class="${ie}">`}}const d=(B={})=>{const ie={children:[]};return Object.assign(ie,B),ie};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(ie){this.top.children.push(ie)}openNode(ie){const pe=d({scope:ie});this.add(pe),this.stack.push(pe)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ie){return this.constructor._walk(ie,this.rootNode)}static _walk(ie,pe){return typeof pe=="string"?ie.addText(pe):pe.children&&(ie.openNode(pe),pe.children.forEach(je=>this._walk(ie,je)),ie.closeNode(pe)),ie}static _collapse(ie){typeof ie!="string"&&ie.children&&(ie.children.every(pe=>typeof pe=="string")?ie.children=[ie.children.join("")]:ie.children.forEach(pe=>{h._collapse(pe)}))}}class y extends h{constructor(ie){super(),this.options=ie}addText(ie){ie!==""&&this.add(ie)}startScope(ie){this.openNode(ie)}endScope(){this.closeNode()}__addSublanguage(ie,pe){const je=ie.root;pe&&(je.scope=`language:${pe}`),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(pe=>g(pe)).join("")}function _(B){const ie=B[B.length-1];return typeof ie=="object"&&ie.constructor===Object?(B.splice(B.length-1,1),ie):{}}function N(...B){return"("+(_(B).capture?"":"?:")+B.map(je=>g(je)).join("|")+")"}function j(B){return new RegExp(B.toString()+"|").exec("").length-1}function C(B,ie){const pe=B&&B.exec(ie);return pe&&pe.index===0}const D=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function F(B,{joinWith:ie}){let pe=0;return B.map(je=>{pe+=1;const wt=pe;let bt=g(je),ve="";for(;bt.length>0;){const be=D.exec(bt);if(!be){ve+=bt;break}ve+=bt.substring(0,be.index),bt=bt.substring(be.index+be[0].length),be[0][0]==="\\"&&be[1]?ve+="\\"+String(Number(be[1])+wt):(ve+=be[0],be[0]==="("&&pe++)}return ve}).map(je=>`(${je})`).join(ie)}const R=/\b\B/,q="[a-zA-Z]\\w*",U="[a-zA-Z_]\\w*",Z="\\b\\d+(\\.\\d+)?",A="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",G="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",le=(B={})=>{const ie=/^#![ ]*\//;return B.binary&&(B.begin=w(ie,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:ie,end:/$/,relevance:0,"on:begin":(pe,je)=>{pe.index!==0&&je.ignoreMatch()}},B)},ae={begin:"\\\\[\\s\\S]",relevance:0},W={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ae]},K={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ae]},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/},V=function(B,ie,pe={}){const je=a({scope:"comment",begin:B,end:ie,contains:[]},pe);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=N("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},me=V("//","$"),O=V("/\\*","\\*/"),L=V("#","$"),J={scope:"number",begin:Z,relevance:0},k={scope:"number",begin:A,relevance:0},ce={scope:"number",begin:P,relevance:0},Ee={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ae,{begin:/\[/,end:/\]/,relevance:0,contains:[ae]}]},xe={scope:"title",begin:q,relevance:0},ze={scope:"title",begin:U,relevance:0},st={begin:"\\.\\s*"+U,relevance:0};var Zt=Object.freeze({__proto__:null,APOS_STRING_MODE:W,BACKSLASH_ESCAPE:ae,BINARY_NUMBER_MODE:ce,BINARY_NUMBER_RE:P,COMMENT:V,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:me,C_NUMBER_MODE:k,C_NUMBER_RE:A,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(ie,pe)=>{pe.data._beginMatch=ie[1]},"on:end":(ie,pe)=>{pe.data._beginMatch!==ie[1]&&pe.ignoreMatch()}})},HASH_COMMENT_MODE:L,IDENT_RE:q,MATCH_NOTHING_RE:R,METHOD_GUARD:st,NUMBER_MODE:J,NUMBER_RE:Z,PHRASAL_WORDS_MODE:oe,QUOTE_STRING_MODE:K,REGEXP_MODE:Ee,RE_STARTERS_RE:G,SHEBANG:le,TITLE_MODE:xe,UNDERSCORE_IDENT_RE:U,UNDERSCORE_TITLE_MODE:ze});function Kn(B,ie){B.input[B.index-1]==="."&&ie.ignoreMatch()}function Ji(B,ie){B.className!==void 0&&(B.scope=B.className,delete B.className)}function Ra(B,ie){ie&&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,ie){Array.isArray(B.illegal)&&(B.illegal=N(...B.illegal))}function Ii(B,ie){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,ie){B.relevance===void 0&&(B.relevance=1)}const _i=(B,ie)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const pe=Object.assign({},B);Object.keys(B).forEach(je=>{delete B[je]}),B.keywords=pe.keywords,B.begin=w(pe.beforeMatch,x(pe.begin)),B.starts={relevance:0,contains:[Object.assign(pe,{endsParent:!0})]},B.relevance=0,delete pe.beforeMatch},li=["of","and","for","in","not","or","if","then","parent","list","value"],zi="keyword";function ea(B,ie,pe=zi){const je=Object.create(null);return typeof B=="string"?wt(pe,B.split(" ")):Array.isArray(B)?wt(pe,B):Object.keys(B).forEach(function(bt){Object.assign(je,ea(B[bt],ie,bt))}),je;function wt(bt,ve){ie&&(ve=ve.map(be=>be.toLowerCase())),ve.forEach(function(be){const Me=be.split("|");je[Me[0]]=[bt,kr(Me[0],Me[1])]})}}function kr(B,ie){return ie?Number(ie):Yl(B)?0:1}function Yl(B){return li.includes(B.toLowerCase())}const ys={},Ot=B=>{console.error(B)},xs=(B,...ie)=>{console.log(`WARN: ${B}`,...ie)},te=(B,ie)=>{ys[`${B}/${ie}`]||(console.log(`Deprecated as of ${B}. ${ie}`),ys[`${B}/${ie}`]=!0)},de=new Error;function Ce(B,ie,{key:pe}){let je=0;const wt=B[pe],bt={},ve={};for(let be=1;be<=ie.length;be++)ve[be+je]=wt[be],bt[be+je]=!0,je+=j(ie[be-1]);B[pe]=ve,B[pe]._emit=bt,B[pe]._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: {}"),de;if(typeof B.beginScope!="object"||B.beginScope===null)throw Ot("beginScope must be object"),de;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: {}"),de;if(typeof B.endScope!="object"||B.endScope===null)throw Ot("endScope must be object"),de;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 ie(ve,be){return new RegExp(g(ve),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(be?"g":""))}class pe{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+=j(be)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const be=this.regexes.map(Me=>Me[1]);this.matcherRe=ie(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 pe;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(ve){const be=new je;return ve.contains.forEach(Me=>be.addRule(Me.begin,{rule:Me,type:"begin"})),ve.terminatorEnd&&be.addRule(ve.terminatorEnd,{type:"end"}),ve.illegal&&be.addRule(ve.illegal,{type:"illegal"}),be}function bt(ve,be){const Me=ve;if(ve.isCompiled)return Me;[Ji,Ii,Ni,_i].forEach(kt=>kt(ve,be)),B.compilerExtensions.forEach(kt=>kt(ve,be)),ve.__beforeBegin=null,[Ra,Gn,Xe].forEach(kt=>kt(ve,be)),ve.isCompiled=!0;let Ut=null;return typeof ve.keywords=="object"&&ve.keywords.$pattern&&(ve.keywords=Object.assign({},ve.keywords),Ut=ve.keywords.$pattern,delete ve.keywords.$pattern),Ut=Ut||/\w+/,ve.keywords&&(ve.keywords=ea(ve.keywords,B.case_insensitive)),Me.keywordPatternRe=ie(Ut,!0),be&&(ve.begin||(ve.begin=/\B|\b/),Me.beginRe=ie(Me.begin),!ve.end&&!ve.endsWithParent&&(ve.end=/\B|\b/),ve.end&&(Me.endRe=ie(Me.end)),Me.terminatorEnd=g(Me.end)||"",ve.endsWithParent&&be.terminatorEnd&&(Me.terminatorEnd+=(ve.end?"|":"")+be.terminatorEnd)),ve.illegal&&(Me.illegalRe=ie(ve.illegal)),ve.contains||(ve.contains=[]),ve.contains=[].concat(...ve.contains.map(function(kt){return un(kt==="self"?ve:kt)})),ve.contains.forEach(function(kt){bt(kt,Me)}),ve.starts&&bt(ve.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(ie){return a(B,{variants:null},ie)})),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(ie,pe){super(ie),this.name="HTMLInjectionError",this.html=pe}}const xn=n,kc=a,Tr=Symbol("nomatch"),vs=7,Cr=function(B){const ie=Object.create(null),pe=Object.create(null),je=[];let wt=!0;const bt="Could not find the language '{}', did you forget to load/include a language module?",ve={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(ue){return be.noHighlightRe.test(ue)}function Ut(ue){let _e=ue.className+" ";_e+=ue.parentNode?ue.parentNode.className:"";const qe=be.languageDetectRe.exec(_e);if(qe){const ot=vn(qe[1]);return ot||(xs(bt.replace("{}",qe[1])),xs("Falling back to no-highlight mode for this block.",ue)),ot?qe[1]:"no-highlight"}return _e.split(/\s+/).find(ot=>Me(ot)||vn(ot))}function kt(ue,_e,qe){let ot="",Ft="";typeof _e=="object"?(ot=ue,qe=_e.ignoreIllegals,Ft=_e.language):(te("10.7.0","highlight(lang, code, ...args) has been deprecated."),te("10.7.0",`Please use highlight(code, options) instead.
|
|
513
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Ft=ue,ot=_e),qe===void 0&&(qe=!0);const dn={code:ot,language:Ft};Or("before:highlight",dn);const Qn=dn.result?dn.result:ta(dn.language,dn.code,qe);return Qn.code=dn.code,Or("after:highlight",Qn),Qn}function ta(ue,_e,qe,ot){const Ft=Object.create(null);function dn(he,Se){return he.keywords[Se]}function Qn(){if(!Re.keywords){Kt.addText(ct);return}let he=0;Re.keywordPatternRe.lastIndex=0;let Se=Re.keywordPatternRe.exec(ct),Ie="";for(;Se;){Ie+=ct.substring(he,Se.index);const Qe=rn.case_insensitive?Se[0].toLowerCase():Se[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+=Se[0];else{const jc=rn.classNameAliases[oi]||oi;Yn(Se[0],jc)}}else Ie+=Se[0];he=Re.keywordPatternRe.lastIndex,Se=Re.keywordPatternRe.exec(ct)}Ie+=ct.substring(he),Kt.addText(Ie)}function An(){if(ct==="")return;let he=null;if(typeof Re.subLanguage=="string"){if(!ie[Re.subLanguage]){Kt.addText(ct);return}he=ta(Re.subLanguage,ct,!0,Mc[Re.subLanguage]),Mc[Re.subLanguage]=he._top}else he=Ss(ct,Re.subLanguage.length?Re.subLanguage:null);Re.relevance>0&&(La+=he.relevance),Kt.__addSublanguage(he._emitter,he.language)}function Et(){Re.subLanguage!=null?An():Qn(),ct=""}function Yn(he,Se){he!==""&&(Kt.startScope(Se),Kt.addText(he),Kt.endScope())}function Oc(he,Se){let Ie=1;const Qe=Se.length-1;for(;Ie<=Qe;){if(!he._emit[Ie]){Ie++;continue}const Rt=rn.classNameAliases[he[Ie]]||he[Ie],oi=Se[Ie];Rt?Yn(oi,Rt):(ct=oi,Qn(),ct=""),Ie++}}function _s(he,Se){return he.scope&&typeof he.scope=="string"&&Kt.openNode(rn.classNameAliases[he.scope]||he.scope),he.beginScope&&(he.beginScope._wrap?(Yn(ct,rn.classNameAliases[he.beginScope._wrap]||he.beginScope._wrap),ct=""):he.beginScope._multi&&(Oc(he.beginScope,Se),ct="")),Re=Object.create(he,{parent:{value:Re}}),Re}function Zl(he,Se,Ie){let Qe=C(he.endRe,Ie);if(Qe){if(he["on:end"]){const Rt=new t(he);he["on:end"](Se,Rt),Rt.isMatchIgnored&&(Qe=!1)}if(Qe){for(;he.endsParent&&he.parent;)he=he.parent;return he}}if(he.endsWithParent)return Zl(he.parent,Se,Ie)}function Ns(he){return Re.matcher.regexIndex===0?(ct+=he[0],1):(Ia=!0,0)}function id(he){const Se=he[0],Ie=he.rule,Qe=new t(Ie),Rt=[Ie.__beforeBegin,Ie["on:begin"]];for(const oi of Rt)if(oi&&(oi(he,Qe),Qe.isMatchIgnored))return Ns(Se);return Ie.skip?ct+=Se:(Ie.excludeBegin&&(ct+=Se),Et(),!Ie.returnBegin&&!Ie.excludeBegin&&(ct=Se)),_s(Ie,he),Ie.returnBegin?0:Se.length}function On(he){const Se=he[0],Ie=_e.substring(he.index),Qe=Zl(Re,he,Ie);if(!Qe)return Tr;const Rt=Re;Re.endScope&&Re.endScope._wrap?(Et(),Yn(Se,Re.endScope._wrap)):Re.endScope&&Re.endScope._multi?(Et(),Oc(Re.endScope,he)):Rt.skip?ct+=Se:(Rt.returnEnd||Rt.excludeEnd||(ct+=Se),Et(),Rt.excludeEnd&&(ct=Se));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,he),Rt.returnEnd?0:Se.length}function Wl(){const he=[];for(let Se=Re;Se!==rn;Se=Se.parent)Se.scope&&he.unshift(Se.scope);he.forEach(Se=>Kt.openNode(Se))}let Rr={};function ks(he,Se){const Ie=Se&&Se[0];if(ct+=he,Ie==null)return Et(),0;if(Rr.type==="begin"&&Se.type==="end"&&Rr.index===Se.index&&Ie===""){if(ct+=_e.slice(Se.index,Se.index+1),!wt){const Qe=new Error(`0 width match regex (${ue})`);throw Qe.languageName=ue,Qe.badRule=Rr.rule,Qe}return 1}if(Rr=Se,Se.type==="begin")return id(Se);if(Se.type==="illegal"&&!qe){const Qe=new Error('Illegal lexeme "'+Ie+'" for mode "'+(Re.scope||"<unnamed>")+'"');throw Qe.mode=Re,Qe}else if(Se.type==="end"){const Qe=On(Se);if(Qe!==Tr)return Qe}if(Se.type==="illegal"&&Ie==="")return ct+=`
|
|
514
|
+
`,1;if(Jl>1e5&&Jl>Se.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ct+=Ie,Ie.length}const rn=vn(ue);if(!rn)throw Ot(bt.replace("{}",ue)),new Error('Unknown language: "'+ue+'"');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(_e,Kt);else{for(Re.matcher.considerAll();;){Jl++,Ia?Ia=!1:Re.matcher.considerAll(),Re.matcher.lastIndex=aa;const he=Re.matcher.exec(_e);if(!he)break;const Se=_e.substring(aa,he.index),Ie=ks(Se,he);aa=he.index+Ie}ks(_e.substring(aa))}return Kt.finalize(),Ts=Kt.toHTML(),{language:ue,value:Ts,relevance:La,illegal:!1,_emitter:Kt,_top:Re}}catch(he){if(he.message&&he.message.includes("Illegal"))return{language:ue,value:xn(_e),illegal:!0,relevance:0,_illegalBy:{message:he.message,index:aa,context:_e.slice(aa-100,aa+100),mode:he.mode,resultSoFar:Ts},_emitter:Kt};if(wt)return{language:ue,value:xn(_e),illegal:!1,relevance:0,errorRaised:he,_emitter:Kt,_top:Re};throw he}}function Es(ue){const _e={value:xn(ue),illegal:!1,relevance:0,_top:ve,_emitter:new be.__emitter(be)};return _e._emitter.addText(ue),_e}function Ss(ue,_e){_e=_e||be.languages||Object.keys(ie);const qe=Es(ue),ot=_e.filter(vn).filter(ja).map(Et=>ta(Et,ue,!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(ue,_e,qe){const ot=_e&&pe[_e]||qe;ue.classList.add("hljs"),ue.classList.add(`language-${ot}`)}function $t(ue){let _e=null;const qe=Ut(ue);if(Me(qe))return;if(Or("before:highlightElement",{el:ue,language:qe}),ue.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ue);return}if(ue.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(ue)),be.throwUnescapedHTML))throw new Bi("One of your code blocks includes unescaped HTML.",ue.innerHTML);_e=ue;const ot=_e.textContent,Ft=qe?kt(ot,{language:qe,ignoreIllegals:!0}):Ss(ot);ue.innerHTML=Ft.value,ue.dataset.highlighted="yes",Ui(ue,qe,Ft.language),ue.result={language:Ft.language,re:Ft.relevance,relevance:Ft.relevance},Ft.secondBest&&(ue.secondBest={language:Ft.secondBest.language,relevance:Ft.secondBest.relevance}),Or("after:highlightElement",{el:ue,result:Ft,text:ot})}function fn(ue){be=kc(be,ue)}const Ma=()=>{ws(),te("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Vl(){ws(),te("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Tc=!1;function ws(){function ue(){ws()}if(document.readyState==="loading"){Tc||window.addEventListener("DOMContentLoaded",ue,!1),Tc=!0;return}document.querySelectorAll(be.cssSelector).forEach($t)}function Cc(ue,_e){let qe=null;try{qe=_e(B)}catch(ot){if(Ot("Language definition for '{}' could not be registered.".replace("{}",ue)),wt)Ot(ot);else throw ot;qe=ve}qe.name||(qe.name=ue),ie[ue]=qe,qe.rawDefinition=_e.bind(null,B),qe.aliases&&na(qe.aliases,{languageName:ue})}function Ar(ue){delete ie[ue];for(const _e of Object.keys(pe))pe[_e]===ue&&delete pe[_e]}function Xl(){return Object.keys(ie)}function vn(ue){return ue=(ue||"").toLowerCase(),ie[ue]||ie[pe[ue]]}function na(ue,{languageName:_e}){typeof ue=="string"&&(ue=[ue]),ue.forEach(qe=>{pe[qe.toLowerCase()]=_e})}function ja(ue){const _e=vn(ue);return _e&&!_e.disableAutodetect}function Da(ue){ue["before:highlightBlock"]&&!ue["before:highlightElement"]&&(ue["before:highlightElement"]=_e=>{ue["before:highlightBlock"](Object.assign({block:_e.el},_e))}),ue["after:highlightBlock"]&&!ue["after:highlightElement"]&&(ue["after:highlightElement"]=_e=>{ue["after:highlightBlock"](Object.assign({block:_e.el},_e))})}function Ht(ue){Da(ue),je.push(ue)}function Ac(ue){const _e=je.indexOf(ue);_e!==-1&&je.splice(_e,1)}function Or(ue,_e){const qe=ue;je.forEach(function(ot){ot[qe]&&ot[qe](_e)})}function ia(ue){return te("10.7.0","highlightBlock will be removed entirely in v12.0"),te("10.7.0","Please use highlightElement now."),$t(ue)}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:N,optional:S,anyNumberOfTimes:v};for(const ue in Zt)typeof Zt[ue]=="object"&&e(Zt[ue]);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(w,d,h);_.data&&_.data.relevance!==void 0&&_.data.relevance>v&&(v=_.data.relevance,S=_)}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 _=vz(x,{whitespace:"pre"});let N;try{N=w?h.highlight(w,_,{prefix:c}):h.highlightAuto(_,{prefix:c,subset:f})}catch(j){const C=j;if(w&&/Unknown language/.test(C.message)){g.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[S,x],cause:C,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw C}!w&&N.data&&N.data.language&&x.properties.className.push("language-"+N.data.language),N.children.length>0&&(x.children=N.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)});M.useEffect(()=>{const w=_=>{_.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 _=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}),_==="linked"&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),_==="frozen"&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!_&&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:[!_&&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"]}),_==="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"})]}),_==="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]=M.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]=M.useState("all"),[n,a]=M.useState(""),[s,o]=M.useState(null),c=Tn(),{data:f,isLoading:d}=dt({queryKey:["skills"],queryFn:()=>fg()}),h=dt({queryKey:["projects"],queryFn:Bl}),y=M.useMemo(()=>((f==null?void 0:f.data)??[]).filter(S=>!(e!=="all"&&S.category!==e||n&&!S.name.toLowerCase().includes(n.toLowerCase()))),[f,e,n]),g=M.useMemo(()=>{const v=(f==null?void 0:f.data)??[],S={all:v.length};for(const 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]=M.useState(!1);return m.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[m.jsx("header",{children:m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),m.jsx(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]=M.useState(!1),[o,c]=M.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]=M.useState(null),[c,f]=M.useState(null);M.useEffect(()=>{a.data&&s===null&&(o(a.data.content),f(a.data.etag))},[a.data,s]);const d=s!==null&&a.data&&s!==a.data.content,h=Pn({mutationFn:()=>{if(s===null)throw new Error("no draft");return 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 j,C,D,F,R,q;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]=M.useState(null),[h,y]=M.useState(""),[g,x]=M.useState(!1),v=M.useRef(null);M.useEffect(()=>{if(!e)return;const U=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let Z=!0;return U.addEventListener("open",()=>{if(Z){Z=!1;return}const A=n.getQueryData(["chat-session",e]),P=A!=null&&A.messages.length?A.messages[A.messages.length-1].ts:void 0;bB(e,P).then(G=>{G.data.length!==0&&n.setQueryData(["chat-session",e],le=>{if(!le)return le;const ae=new Set(le.messages.map(K=>K.id)),W=G.data.filter(K=>!ae.has(K.id));return W.length===0?le:{...le,messages:[...le.messages,...W],lastMessageAt:W[W.length-1].ts,messageCount:le.messageCount+W.length}})}).catch(()=>{})}),U.addEventListener("chat.message",A=>{try{const P=JSON.parse(A.data);n.setQueryData(["chat-session",e],G=>{if(!G||G.messages.some(W=>W.id===P.message.id))return G;const ae=G.messages.findIndex(W=>W.role==="user"&&W.id.startsWith("optim-")&&W.content===P.message.content);if(ae>=0){const W=[...G.messages];return W[ae]=P.message,{...G,messages:W}}return{...G,messages:[...G.messages,P.message]}})}catch{}}),U.addEventListener("chat.message.pending",A=>{try{const P=JSON.parse(A.data);d({id:P.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),U.addEventListener("chat.message.chunk.text",A=>{try{const P=JSON.parse(A.data);d(G=>{if(!G||G.id!==P.assistantId)return G;const le=[...G.blocks],ae=le[le.length-1];return ae&&ae.type==="text"?le[le.length-1]={...ae,target:ae.target+P.text}:le.push({type:"text",target:P.text,displayed:""}),{...G,blocks:le}})}catch{}}),U.addEventListener("chat.message.chunk.tool_use",A=>{try{const P=JSON.parse(A.data);d(G=>!G||G.id!==P.assistantId?G:{...G,blocks:[...G.blocks,{type:"tool_use",id:P.id,title:P.title,kind:P.kind,status:P.status}]})}catch{}}),U.addEventListener("chat.message.chunk.tool_update",A=>{try{const P=JSON.parse(A.data);d(G=>!G||G.id!==P.assistantId?G:{...G,blocks:G.blocks.map(le=>le.type==="tool_use"&&le.id===P.id?{...le,status:P.status}:le)})}catch{}}),U.addEventListener("chat.message.complete",A=>{try{const P=JSON.parse(A.data);d(G=>G&&G.id===P.assistantId?{...G,done:!0,finalMessage:P.message}:G)}catch{}}),()=>U.close()},[e,n]),M.useEffect(()=>{if(!f)return;const U=f.blocks.reduce((A,P)=>P.type==="text"?A+(P.target.length-P.displayed.length):A,0);if(U<=0){if(f.done&&f.finalMessage){const A=f.finalMessage;n.setQueryData(["chat-session",e],P=>!P||P.messages.some(G=>G.id===A.id)?P:{...P,messages:[...P.messages,A],lastMessageAt:A.ts,messageCount:P.messageCount+1}),n.invalidateQueries({queryKey:["chat-sessions"]}),d(null),x(!1)}return}const Z=setTimeout(()=>{d(A=>{if(!A)return A;let P=Math.max(1,Math.ceil(U/40));const G=A.blocks.map(le=>{if(le.type!=="text"||P<=0)return le;const ae=le.target.length-le.displayed.length;if(ae<=0)return le;const W=Math.min(ae,P);return P-=W,{...le,displayed:le.target.slice(0,le.displayed.length+W)}});return{...A,blocks:G}})},25);return()=>clearTimeout(Z)},[f,n,e]),M.useEffect(()=>{const U=v.current;U&&(U.scrollTop=U.scrollHeight)},[c.data,f]);const S=M.useCallback(async()=>{const U=await sE();n.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${U.id}`)},[n,t]),w=M.useCallback(async()=>{const U=h.trim();if(!U||g)return;let Z=e;if(!Z){const P=await sE();n.invalidateQueries({queryKey:["chat-sessions"]}),Z=P.id,t(`/chat/${Z}`,{replace:!0})}const A={id:`optim-${Date.now()}`,role:"user",content:U,ts:new Date().toISOString(),status:"complete"};n.setQueryData(["chat-session",Z],P=>P?{...P,messages:[...P.messages,A],lastMessageAt:A.ts,messageCount:P.messageCount+1}:{id:Z,createdAt:A.ts,lastMessageAt:A.ts,title:U.slice(0,60),project:null,messageCount:1,messages:[A]}),y(""),x(!0);try{await pB(Z,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]),_=M.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]),N=M.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:["历史 ",((j=o.data)==null?void 0:j.data.length)??0]}),m.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((C=o.data)==null?void 0:C.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:Z=>{Z.stopPropagation(),_(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:[(((R=c.data)==null?void 0:R.messages)??[]).map(U=>m.jsx(yB,{msg:U},U.id)),f&&m.jsx(xB,{pending:f}),!c.isLoading&&(((q=c.data)==null?void 0:q.messages)??[]).length===0&&!f&&!g&&m.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行"})]}),m.jsx("div",{className:"border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)]",children:m.jsxs("div",{className:"flex gap-2 items-end",children:[m.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:"说点什么… (Enter 发送,Shift+Enter 换行)",rows:2,value:h,onChange:U=>y(U.target.value),onKeyDown:U=>{U.key==="Enter"&&!U.shiftKey&&!U.nativeEvent.isComposing&&(U.preventDefault(),w())},"aria-label":"消息输入"}),f?m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:N,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]=M.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return m.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[m.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[m.jsx(JE,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),m.jsx(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(M.StrictMode,{children:m.jsx(kk,{client:_B,children:m.jsx(cC,{children:m.jsx(S2,{children:m.jsx(wB,{})})})})}));
|