botschat 0.1.0
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/LICENSE +201 -0
- package/README.md +213 -0
- package/migrations/0001_initial.sql +88 -0
- package/migrations/0002_rename_projects_to_channels.sql +53 -0
- package/migrations/0003_messages.sql +14 -0
- package/migrations/0004_jobs.sql +15 -0
- package/migrations/0005_deleted_cron_jobs.sql +6 -0
- package/migrations/0006_tasks_add_model.sql +2 -0
- package/migrations/0007_sessions.sql +25 -0
- package/migrations/0008_remove_openclaw_fields.sql +8 -0
- package/package.json +53 -0
- package/packages/api/package.json +17 -0
- package/packages/api/src/do/connection-do.ts +929 -0
- package/packages/api/src/env.ts +8 -0
- package/packages/api/src/index.ts +297 -0
- package/packages/api/src/routes/agents.ts +68 -0
- package/packages/api/src/routes/auth.ts +105 -0
- package/packages/api/src/routes/channels.ts +185 -0
- package/packages/api/src/routes/jobs.ts +65 -0
- package/packages/api/src/routes/models.ts +22 -0
- package/packages/api/src/routes/pairing.ts +76 -0
- package/packages/api/src/routes/projects.ts +177 -0
- package/packages/api/src/routes/sessions.ts +171 -0
- package/packages/api/src/routes/tasks.ts +375 -0
- package/packages/api/src/routes/upload.ts +52 -0
- package/packages/api/src/utils/auth.ts +101 -0
- package/packages/api/src/utils/id.ts +19 -0
- package/packages/api/tsconfig.json +18 -0
- package/packages/plugin/dist/index.d.ts +19 -0
- package/packages/plugin/dist/index.d.ts.map +1 -0
- package/packages/plugin/dist/index.js +17 -0
- package/packages/plugin/dist/index.js.map +1 -0
- package/packages/plugin/dist/src/accounts.d.ts +12 -0
- package/packages/plugin/dist/src/accounts.d.ts.map +1 -0
- package/packages/plugin/dist/src/accounts.js +103 -0
- package/packages/plugin/dist/src/accounts.js.map +1 -0
- package/packages/plugin/dist/src/channel.d.ts +206 -0
- package/packages/plugin/dist/src/channel.d.ts.map +1 -0
- package/packages/plugin/dist/src/channel.js +1248 -0
- package/packages/plugin/dist/src/channel.js.map +1 -0
- package/packages/plugin/dist/src/runtime.d.ts +3 -0
- package/packages/plugin/dist/src/runtime.d.ts.map +1 -0
- package/packages/plugin/dist/src/runtime.js +18 -0
- package/packages/plugin/dist/src/runtime.js.map +1 -0
- package/packages/plugin/dist/src/types.d.ts +179 -0
- package/packages/plugin/dist/src/types.d.ts.map +1 -0
- package/packages/plugin/dist/src/types.js +6 -0
- package/packages/plugin/dist/src/types.js.map +1 -0
- package/packages/plugin/dist/src/ws-client.d.ts +51 -0
- package/packages/plugin/dist/src/ws-client.d.ts.map +1 -0
- package/packages/plugin/dist/src/ws-client.js +170 -0
- package/packages/plugin/dist/src/ws-client.js.map +1 -0
- package/packages/plugin/openclaw.plugin.json +11 -0
- package/packages/plugin/package.json +39 -0
- package/packages/plugin/tsconfig.json +20 -0
- package/packages/web/dist/assets/index-C-wI8eHy.css +1 -0
- package/packages/web/dist/assets/index-CbPEKHLG.js +93 -0
- package/packages/web/dist/index.html +17 -0
- package/packages/web/index.html +16 -0
- package/packages/web/package.json +29 -0
- package/packages/web/postcss.config.js +6 -0
- package/packages/web/src/App.tsx +827 -0
- package/packages/web/src/api.ts +242 -0
- package/packages/web/src/components/ChatWindow.tsx +864 -0
- package/packages/web/src/components/CronDetail.tsx +943 -0
- package/packages/web/src/components/CronSidebar.tsx +123 -0
- package/packages/web/src/components/DebugLogPanel.tsx +258 -0
- package/packages/web/src/components/IconRail.tsx +163 -0
- package/packages/web/src/components/JobList.tsx +120 -0
- package/packages/web/src/components/LoginPage.tsx +178 -0
- package/packages/web/src/components/MessageContent.tsx +1082 -0
- package/packages/web/src/components/ModelSelect.tsx +87 -0
- package/packages/web/src/components/ScheduleEditor.tsx +403 -0
- package/packages/web/src/components/SessionTabs.tsx +246 -0
- package/packages/web/src/components/Sidebar.tsx +331 -0
- package/packages/web/src/components/TaskBar.tsx +413 -0
- package/packages/web/src/components/ThreadPanel.tsx +212 -0
- package/packages/web/src/debug-log.ts +58 -0
- package/packages/web/src/index.css +170 -0
- package/packages/web/src/main.tsx +10 -0
- package/packages/web/src/store.ts +492 -0
- package/packages/web/src/ws.ts +99 -0
- package/packages/web/tailwind.config.js +65 -0
- package/packages/web/tsconfig.json +18 -0
- package/packages/web/vite.config.ts +20 -0
- package/scripts/dev.sh +122 -0
- package/tsconfig.json +18 -0
- package/wrangler.toml +40 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
var Lv=Object.defineProperty;var Iv=(t,a,r)=>a in t?Lv(t,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[a]=r;var xr=(t,a,r)=>Iv(t,typeof a!="symbol"?a+"":a,r);(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const u of d.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function r(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function s(o){if(o.ep)return;o.ep=!0;const d=r(o);fetch(o.href,d)}})();function Gl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Iu={exports:{}},Tl={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Th;function zv(){if(Th)return Tl;Th=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(s,o,d){var u=null;if(d!==void 0&&(u=""+d),o.key!==void 0&&(u=""+o.key),"key"in o){d={};for(var p in o)p!=="key"&&(d[p]=o[p])}else d=o;return o=d.ref,{$$typeof:t,type:s,key:u,ref:o!==void 0?o:null,props:d}}return Tl.Fragment=a,Tl.jsx=r,Tl.jsxs=r,Tl}var wh;function Bv(){return wh||(wh=1,Iu.exports=zv()),Iu.exports}var y=Bv(),zu={exports:{}},Ie={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ah;function Uv(){if(Ah)return Ie;Ah=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),u=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),E=Symbol.iterator;function v(C){return C===null||typeof C!="object"?null:(C=E&&C[E]||C["@@iterator"],typeof C=="function"?C:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,O={};function S(C,P,N){this.props=C,this.context=P,this.refs=O,this.updater=N||k}S.prototype.isReactComponent={},S.prototype.setState=function(C,P){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,P,"setState")},S.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function j(){}j.prototype=S.prototype;function I(C,P,N){this.props=C,this.context=P,this.refs=O,this.updater=N||k}var Y=I.prototype=new j;Y.constructor=I,A(Y,S.prototype),Y.isPureReactComponent=!0;var R=Array.isArray;function T(){}var $={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function ce(C,P,N){var me=N.ref;return{$$typeof:t,type:C,key:P,ref:me!==void 0?me:null,props:N}}function U(C,P){return ce(C.type,P,C.props)}function W(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function re(C){var P={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(N){return P[N]})}var xe=/\/+/g;function H(C,P){return typeof C=="object"&&C!==null&&C.key!=null?re(""+C.key):P.toString(36)}function J(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(T,T):(C.status="pending",C.then(function(P){C.status==="pending"&&(C.status="fulfilled",C.value=P)},function(P){C.status==="pending"&&(C.status="rejected",C.reason=P)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function z(C,P,N,me,Ne){var K=typeof C;(K==="undefined"||K==="boolean")&&(C=null);var se=!1;if(C===null)se=!0;else switch(K){case"bigint":case"string":case"number":se=!0;break;case"object":switch(C.$$typeof){case t:case a:se=!0;break;case g:return se=C._init,z(se(C._payload),P,N,me,Ne)}}if(se)return Ne=Ne(C),se=me===""?"."+H(C,0):me,R(Ne)?(N="",se!=null&&(N=se.replace(xe,"$&/")+"/"),z(Ne,P,N,"",function(De){return De})):Ne!=null&&(W(Ne)&&(Ne=U(Ne,N+(Ne.key==null||C&&C.key===Ne.key?"":(""+Ne.key).replace(xe,"$&/")+"/")+se)),P.push(Ne)),1;se=0;var ye=me===""?".":me+":";if(R(C))for(var ge=0;ge<C.length;ge++)me=C[ge],K=ye+H(me,ge),se+=z(me,P,N,K,Ne);else if(ge=v(C),typeof ge=="function")for(C=ge.call(C),ge=0;!(me=C.next()).done;)me=me.value,K=ye+H(me,ge++),se+=z(me,P,N,K,Ne);else if(K==="object"){if(typeof C.then=="function")return z(J(C),P,N,me,Ne);throw P=String(C),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return se}function ie(C,P,N){if(C==null)return C;var me=[],Ne=0;return z(C,me,"","",function(K){return P.call(N,K,Ne++)}),me}function ae(C){if(C._status===-1){var P=C._result;P=P(),P.then(function(N){(C._status===0||C._status===-1)&&(C._status=1,C._result=N)},function(N){(C._status===0||C._status===-1)&&(C._status=2,C._result=N)}),C._status===-1&&(C._status=0,C._result=P)}if(C._status===1)return C._result.default;throw C._result}var be=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},w={map:ie,forEach:function(C,P,N){ie(C,function(){P.apply(this,arguments)},N)},count:function(C){var P=0;return ie(C,function(){P++}),P},toArray:function(C){return ie(C,function(P){return P})||[]},only:function(C){if(!W(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return Ie.Activity=b,Ie.Children=w,Ie.Component=S,Ie.Fragment=r,Ie.Profiler=o,Ie.PureComponent=I,Ie.StrictMode=s,Ie.Suspense=h,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(C){return $.H.useMemoCache(C)}},Ie.cache=function(C){return function(){return C.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(C,P,N){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var me=A({},C.props),Ne=C.key;if(P!=null)for(K in P.key!==void 0&&(Ne=""+P.key),P)!le.call(P,K)||K==="key"||K==="__self"||K==="__source"||K==="ref"&&P.ref===void 0||(me[K]=P[K]);var K=arguments.length-2;if(K===1)me.children=N;else if(1<K){for(var se=Array(K),ye=0;ye<K;ye++)se[ye]=arguments[ye+2];me.children=se}return ce(C.type,Ne,me)},Ie.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:d,_context:C},C},Ie.createElement=function(C,P,N){var me,Ne={},K=null;if(P!=null)for(me in P.key!==void 0&&(K=""+P.key),P)le.call(P,me)&&me!=="key"&&me!=="__self"&&me!=="__source"&&(Ne[me]=P[me]);var se=arguments.length-2;if(se===1)Ne.children=N;else if(1<se){for(var ye=Array(se),ge=0;ge<se;ge++)ye[ge]=arguments[ge+2];Ne.children=ye}if(C&&C.defaultProps)for(me in se=C.defaultProps,se)Ne[me]===void 0&&(Ne[me]=se[me]);return ce(C,K,Ne)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(C){return{$$typeof:p,render:C}},Ie.isValidElement=W,Ie.lazy=function(C){return{$$typeof:g,_payload:{_status:-1,_result:C},_init:ae}},Ie.memo=function(C,P){return{$$typeof:m,type:C,compare:P===void 0?null:P}},Ie.startTransition=function(C){var P=$.T,N={};$.T=N;try{var me=C(),Ne=$.S;Ne!==null&&Ne(N,me),typeof me=="object"&&me!==null&&typeof me.then=="function"&&me.then(T,be)}catch(K){be(K)}finally{P!==null&&N.types!==null&&(P.types=N.types),$.T=P}},Ie.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Ie.use=function(C){return $.H.use(C)},Ie.useActionState=function(C,P,N){return $.H.useActionState(C,P,N)},Ie.useCallback=function(C,P){return $.H.useCallback(C,P)},Ie.useContext=function(C){return $.H.useContext(C)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(C,P){return $.H.useDeferredValue(C,P)},Ie.useEffect=function(C,P){return $.H.useEffect(C,P)},Ie.useEffectEvent=function(C){return $.H.useEffectEvent(C)},Ie.useId=function(){return $.H.useId()},Ie.useImperativeHandle=function(C,P,N){return $.H.useImperativeHandle(C,P,N)},Ie.useInsertionEffect=function(C,P){return $.H.useInsertionEffect(C,P)},Ie.useLayoutEffect=function(C,P){return $.H.useLayoutEffect(C,P)},Ie.useMemo=function(C,P){return $.H.useMemo(C,P)},Ie.useOptimistic=function(C,P){return $.H.useOptimistic(C,P)},Ie.useReducer=function(C,P,N){return $.H.useReducer(C,P,N)},Ie.useRef=function(C){return $.H.useRef(C)},Ie.useState=function(C){return $.H.useState(C)},Ie.useSyncExternalStore=function(C,P,N){return $.H.useSyncExternalStore(C,P,N)},Ie.useTransition=function(){return $.H.useTransition()},Ie.version="19.2.4",Ie}var Ch;function Td(){return Ch||(Ch=1,zu.exports=Uv()),zu.exports}var X=Td();const jv=Gl(X);var Bu={exports:{}},wl={},Uu={exports:{}},ju={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Oh;function Hv(){return Oh||(Oh=1,(function(t){function a(z,ie){var ae=z.length;z.push(ie);e:for(;0<ae;){var be=ae-1>>>1,w=z[be];if(0<o(w,ie))z[be]=ie,z[ae]=w,ae=be;else break e}}function r(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var ie=z[0],ae=z.pop();if(ae!==ie){z[0]=ae;e:for(var be=0,w=z.length,C=w>>>1;be<C;){var P=2*(be+1)-1,N=z[P],me=P+1,Ne=z[me];if(0>o(N,ae))me<w&&0>o(Ne,N)?(z[be]=Ne,z[me]=ae,be=me):(z[be]=N,z[P]=ae,be=P);else if(me<w&&0>o(Ne,ae))z[be]=Ne,z[me]=ae,be=me;else break e}}return ie}function o(z,ie){var ae=z.sortIndex-ie.sortIndex;return ae!==0?ae:z.id-ie.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;t.unstable_now=function(){return d.now()}}else{var u=Date,p=u.now();t.unstable_now=function(){return u.now()-p}}var h=[],m=[],g=1,b=null,E=3,v=!1,k=!1,A=!1,O=!1,S=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function Y(z){for(var ie=r(m);ie!==null;){if(ie.callback===null)s(m);else if(ie.startTime<=z)s(m),ie.sortIndex=ie.expirationTime,a(h,ie);else break;ie=r(m)}}function R(z){if(A=!1,Y(z),!k)if(r(h)!==null)k=!0,T||(T=!0,re());else{var ie=r(m);ie!==null&&J(R,ie.startTime-z)}}var T=!1,$=-1,le=5,ce=-1;function U(){return O?!0:!(t.unstable_now()-ce<le)}function W(){if(O=!1,T){var z=t.unstable_now();ce=z;var ie=!0;try{e:{k=!1,A&&(A=!1,j($),$=-1),v=!0;var ae=E;try{t:{for(Y(z),b=r(h);b!==null&&!(b.expirationTime>z&&U());){var be=b.callback;if(typeof be=="function"){b.callback=null,E=b.priorityLevel;var w=be(b.expirationTime<=z);if(z=t.unstable_now(),typeof w=="function"){b.callback=w,Y(z),ie=!0;break t}b===r(h)&&s(h),Y(z)}else s(h);b=r(h)}if(b!==null)ie=!0;else{var C=r(m);C!==null&&J(R,C.startTime-z),ie=!1}}break e}finally{b=null,E=ae,v=!1}ie=void 0}}finally{ie?re():T=!1}}}var re;if(typeof I=="function")re=function(){I(W)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,H=xe.port2;xe.port1.onmessage=W,re=function(){H.postMessage(null)}}else re=function(){S(W,0)};function J(z,ie){$=S(function(){z(t.unstable_now())},ie)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<z?Math.floor(1e3/z):5},t.unstable_getCurrentPriorityLevel=function(){return E},t.unstable_next=function(z){switch(E){case 1:case 2:case 3:var ie=3;break;default:ie=E}var ae=E;E=ie;try{return z()}finally{E=ae}},t.unstable_requestPaint=function(){O=!0},t.unstable_runWithPriority=function(z,ie){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ae=E;E=z;try{return ie()}finally{E=ae}},t.unstable_scheduleCallback=function(z,ie,ae){var be=t.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?be+ae:be):ae=be,z){case 1:var w=-1;break;case 2:w=250;break;case 5:w=1073741823;break;case 4:w=1e4;break;default:w=5e3}return w=ae+w,z={id:g++,callback:ie,priorityLevel:z,startTime:ae,expirationTime:w,sortIndex:-1},ae>be?(z.sortIndex=ae,a(m,z),r(h)===null&&z===r(m)&&(A?(j($),$=-1):A=!0,J(R,ae-be))):(z.sortIndex=w,a(h,z),k||v||(k=!0,T||(T=!0,re()))),z},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(z){var ie=E;return function(){var ae=E;E=ie;try{return z.apply(this,arguments)}finally{E=ae}}}})(ju)),ju}var Mh;function Fv(){return Mh||(Mh=1,Uu.exports=Hv()),Uu.exports}var Hu={exports:{}},Qt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Rh;function Gv(){if(Rh)return Qt;Rh=1;var t=Td();function a(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(a(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function d(h,m,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:h,containerInfo:m,implementation:g}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Qt.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(a(299));return d(h,m,null,g)},Qt.flushSync=function(h){var m=u.T,g=s.p;try{if(u.T=null,s.p=2,h)return h()}finally{u.T=m,s.p=g,s.d.f()}},Qt.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(h,m))},Qt.prefetchDNS=function(h){typeof h=="string"&&s.d.D(h)},Qt.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,b=p(g,m.crossOrigin),E=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?s.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:b,integrity:E,fetchPriority:v}):g==="script"&&s.d.X(h,{crossOrigin:b,integrity:E,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Qt.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=p(m.as,m.crossOrigin);s.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(h)},Qt.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,b=p(g,m.crossOrigin);s.d.L(h,g,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Qt.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=p(m.as,m.crossOrigin);s.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(h)},Qt.requestFormReset=function(h){s.d.r(h)},Qt.unstable_batchedUpdates=function(h,m){return h(m)},Qt.useFormState=function(h,m,g){return u.H.useFormState(h,m,g)},Qt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Qt.version="19.2.4",Qt}var Dh;function qv(){if(Dh)return Hu.exports;Dh=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),Hu.exports=Gv(),Hu.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Lh;function Kv(){if(Lh)return wl;Lh=1;var t=Fv(),a=Td(),r=qv();function s(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function u(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(d(e)!==e)throw Error(s(188))}function m(e){var n=e.alternate;if(!n){if(n=d(e),n===null)throw Error(s(188));return n!==e?null:e}for(var i=e,l=n;;){var c=i.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){i=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===i)return h(c),e;if(f===l)return h(c),n;f=f.sibling}throw Error(s(188))}if(i.return!==l.return)i=c,l=f;else{for(var x=!1,_=c.child;_;){if(_===i){x=!0,i=c,l=f;break}if(_===l){x=!0,l=c,i=f;break}_=_.sibling}if(!x){for(_=f.child;_;){if(_===i){x=!0,i=f,l=c;break}if(_===l){x=!0,l=f,i=c;break}_=_.sibling}if(!x)throw Error(s(189))}}if(i.alternate!==l)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?e:n}function g(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=g(e),n!==null)return n;e=e.sibling}return null}var b=Object.assign,E=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),I=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Symbol.for("react.client.reference");function H(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===xe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case S:return"Profiler";case O:return"StrictMode";case R:return"Suspense";case T:return"SuspenseList";case ce:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case I:return e.displayName||"Context";case j:return(e._context.displayName||"Context")+".Consumer";case Y:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return n=e.displayName||null,n!==null?n:H(e.type)||"Memo";case le:n=e._payload,e=e._init;try{return H(e(n))}catch{}}return null}var J=Array.isArray,z=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},be=[],w=-1;function C(e){return{current:e}}function P(e){0>w||(e.current=be[w],be[w]=null,w--)}function N(e,n){w++,be[w]=e.current,e.current=n}var me=C(null),Ne=C(null),K=C(null),se=C(null);function ye(e,n){switch(N(K,n),N(Ne,e),N(me,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Xm(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Xm(n),e=Zm(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(me),N(me,e)}function ge(){P(me),P(Ne),P(K)}function De(e){e.memoizedState!==null&&N(se,e);var n=me.current,i=Zm(n,e.type);n!==i&&(N(Ne,e),N(me,i))}function xt(e){Ne.current===e&&(P(me),P(Ne)),se.current===e&&(P(se),_l._currentValue=ae)}var kt,wi;function yn(e){if(kt===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);kt=n&&n[1]||"",wi=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+kt+e+wi}var Vn=!1;function Ve(e,n){if(!e||Vn)return"";Vn=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(V){var q=V}Reflect.construct(e,[],ne)}else{try{ne.call()}catch(V){q=V}e.call(ne.prototype)}}else{try{throw Error()}catch(V){q=V}(ne=e())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(V){if(V&&q&&typeof V.stack=="string")return[V.stack,q.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),x=f[0],_=f[1];if(x&&_){var M=x.split(`
|
|
44
|
+
`),G=_.split(`
|
|
45
|
+
`);for(c=l=0;l<M.length&&!M[l].includes("DetermineComponentFrameRoot");)l++;for(;c<G.length&&!G[c].includes("DetermineComponentFrameRoot");)c++;if(l===M.length||c===G.length)for(l=M.length-1,c=G.length-1;1<=l&&0<=c&&M[l]!==G[c];)c--;for(;1<=l&&0<=c;l--,c--)if(M[l]!==G[c]){if(l!==1||c!==1)do if(l--,c--,0>c||M[l]!==G[c]){var Q=`
|
|
46
|
+
`+M[l].replace(" at new "," at ");return e.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",e.displayName)),Q}while(1<=l&&0<=c);break}}}finally{Vn=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?yn(i):""}function Gn(e,n){switch(e.tag){case 26:case 27:case 5:return yn(e.type);case 16:return yn("Lazy");case 13:return e.child!==n&&n!==null?yn("Suspense Fallback"):yn("Suspense");case 19:return yn("SuspenseList");case 0:case 15:return Ve(e.type,!1);case 11:return Ve(e.type.render,!1);case 1:return Ve(e.type,!0);case 31:return yn("Activity");default:return""}}function On(e){try{var n="",i=null;do n+=Gn(e,i),i=e,e=e.return;while(e);return n}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var Xn=Object.prototype.hasOwnProperty,ri=t.unstable_scheduleCallback,oa=t.unstable_cancelCallback,Rr=t.unstable_shouldYield,La=t.unstable_requestPaint,_t=t.unstable_now,Ia=t.unstable_getCurrentPriorityLevel,Z=t.unstable_ImmediatePriority,fe=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,He=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,en=t.log,qn=t.unstable_setDisableYieldValue,Gt=null,Nt=null;function Vt(e){if(typeof en=="function"&&qn(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Gt,e)}catch{}}var tt=Math.clz32?Math.clz32:Pl,Zn=Math.log,tn=Math.LN2;function Pl(e){return e>>>=0,e===0?32:31-(Zn(e)/tn|0)|0}var ca=256,za=262144,ua=4194304;function sn(e){var n=e&42;if(n!==0)return n;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function D(e,n,i){var l=e.pendingLanes;if(l===0)return 0;var c=0,f=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var _=l&134217727;return _!==0?(l=_&~f,l!==0?c=sn(l):(x&=_,x!==0?c=sn(x):i||(i=_&~e,i!==0&&(c=sn(i))))):(_=l&~f,_!==0?c=sn(_):x!==0?c=sn(x):i||(i=l&~e,i!==0&&(c=sn(i)))),c===0?0:n!==0&&n!==c&&(n&f)===0&&(f=c&-c,i=n&-n,f>=i||f===32&&(i&4194048)!==0)?n:c}function ee(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function he(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 Le(){var e=ua;return ua<<=1,(ua&62914560)===0&&(ua=4194304),e}function ht(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function ut(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _e(e,n,i,l,c,f){var x=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var _=e.entanglements,M=e.expirationTimes,G=e.hiddenUpdates;for(i=x&~i;0<i;){var Q=31-tt(i),ne=1<<Q;_[Q]=0,M[Q]=-1;var q=G[Q];if(q!==null)for(G[Q]=null,Q=0;Q<q.length;Q++){var V=q[Q];V!==null&&(V.lane&=-536870913)}i&=~ne}l!==0&&ve(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(x&~n))}function ve(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-tt(n);e.entangledLanes|=n,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function Re(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var l=31-tt(i),c=1<<l;c&n|e[l]&n&&(e[l]|=n),i&=~c}}function At(e,n){var i=n&-n;return i=(i&42)!==0?1:vt(i),(i&(e.suspendedLanes|n))!==0?0:i}function vt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function li(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ba(){var e=ie.p;return e!==0?e:(e=window.event,e===void 0?32:xh(e.type))}function Ua(e,n){var i=ie.p;try{return ie.p=e,n()}finally{ie.p=i}}var Qn=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Qn,Xt="__reactProps$"+Qn,Ai="__reactContainer$"+Qn,Dr="__reactEvents$"+Qn,Vl="__reactListeners$"+Qn,ja="__reactHandles$"+Qn,Xl="__reactResources$"+Qn,da="__reactMarker$"+Qn;function Lr(e){delete e[Ct],delete e[Xt],delete e[Dr],delete e[Vl],delete e[ja]}function nn(e){var n=e[Ct];if(n)return n;for(var i=e.parentNode;i;){if(n=i[Ai]||i[Ct]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=ih(e);e!==null;){if(i=e[Ct])return i;e=ih(e)}return n}e=i,i=e.parentNode}return null}function si(e){if(e=e[Ct]||e[Ai]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ci(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(s(33))}function Oi(e){var n=e[Xl];return n||(n=e[Xl]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Dt(e){e[da]=!0}var Zl=new Set,fa={};function oi(e,n){oe(e,n),oe(e+"Capture",n)}function oe(e,n){for(fa[e]=n,e=0;e<n.length;e++)Zl.add(n[e])}var Te=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]*$"),Fe={},nt={};function Ot(e){return Xn.call(nt,e)?!0:Xn.call(Fe,e)?!1:Te.test(e)?nt[e]=!0:(Fe[e]=!0,!1)}function Zt(e,n,i){if(Ot(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function xn(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function on(e,n,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+l)}}function pt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vn(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ql(e,n,i){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,f=l.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(x){i=""+x,f.call(this,x)}}),Object.defineProperty(e,n,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ha(e){if(!e._valueTracker){var n=vn(e)?"checked":"value";e._valueTracker=Ql(e,n,""+e[n])}}function Ir(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),l="";return e&&(l=vn(e)?e.checked?"true":"false":e.value),e=l,e!==i?(n.setValue(e),!0):!1}function Fa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Lo=/[\n"\\]/g;function cn(e){return e.replace(Lo,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function zr(e,n,i,l,c,f,x,_){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),n!=null?x==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+pt(n)):e.value!==""+pt(n)&&(e.value=""+pt(n)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),n!=null?Ga(e,x,pt(n)):i!=null?Ga(e,x,pt(i)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+pt(_):e.removeAttribute("name")}function pa(e,n,i,l,c,f,x,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),n!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||n!=null)){Ha(e);return}i=i!=null?""+pt(i):"",n=n!=null?""+pt(n):i,_||n===e.value||(e.value=n),e.defaultValue=n}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=_?e.checked:!!l,e.defaultChecked=!!l,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Ha(e)}function Ga(e,n,i){n==="number"&&Fa(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function qt(e,n,i,l){if(e=e.options,n){n={};for(var c=0;c<i.length;c++)n["$"+i[c]]=!0;for(i=0;i<e.length;i++)c=n.hasOwnProperty("$"+e[i].value),e[i].selected!==c&&(e[i].selected=c),c&&l&&(e[i].defaultSelected=!0)}else{for(i=""+pt(i),n=null,c=0;c<e.length;c++){if(e[c].value===i){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function Jl(e,n,i){if(n!=null&&(n=""+pt(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+pt(i):""}function qa(e,n,i,l){if(n==null){if(l!=null){if(i!=null)throw Error(s(92));if(J(l)){if(1<l.length)throw Error(s(93));l=l[0]}i=l}i==null&&(i=""),n=i}i=pt(n),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),Ha(e)}function Me(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var Wl=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 Lt(e,n,i){var l=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":l?e.setProperty(n,i):typeof i!="number"||i===0||Wl.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function it(e,n,i){if(n!=null&&typeof n!="object")throw Error(s(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||n!=null&&n.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in n)l=n[c],n.hasOwnProperty(c)&&i[c]!==l&&Lt(e,c,l)}else for(var f in n)n.hasOwnProperty(f)&&Lt(e,f,n[f])}function Mi(e){if(e.indexOf("-")===-1)return!1;switch(e){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 ci=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"]]),Br=/^[\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 Ri(e){return Br.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function pe(){}var Se=null;function ze(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $e=null,St=null;function Mn(e){var n=si(e);if(n&&(e=n.stateNode)){var i=e[Xt]||null;e:switch(e=n.stateNode,n.type){case"input":if(zr(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+cn(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var l=i[n];if(l!==e&&l.form===e.form){var c=l[Xt]||null;if(!c)throw Error(s(90));zr(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<i.length;n++)l=i[n],l.form===e.form&&Ir(l)}break e;case"textarea":Jl(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&qt(e,!!i.multiple,n,!1)}}}var Ur=!1;function es(e,n,i){if(Ur)return e(n,i);Ur=!0;try{var l=e(n);return l}finally{if(Ur=!1,($e!==null||St!==null)&&(Fs(),$e&&(n=$e,e=St,St=$e=null,Mn(n),e)))for(n=0;n<e.length;n++)Mn(e[n])}}function jr(e,n){var i=e.stateNode;if(i===null)return null;var l=i[Xt]||null;if(l===null)return null;i=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(s(231,n,typeof i));return i}var ui=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Io=!1;if(ui)try{var Hr={};Object.defineProperty(Hr,"passive",{get:function(){Io=!0}}),window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{Io=!1}var Di=null,zo=null,ts=null;function Xd(){if(ts)return ts;var e,n=zo,i=n.length,l,c="value"in Di?Di.value:Di.textContent,f=c.length;for(e=0;e<i&&n[e]===c[e];e++);var x=i-e;for(l=1;l<=x&&n[i-l]===c[f-l];l++);return ts=c.slice(e,1<l?1-l:void 0)}function ns(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function is(){return!0}function Zd(){return!1}function un(e){function n(i,l,c,f,x){this._reactName=i,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(i=e[_],this[_]=i?i(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?is:Zd,this.isPropagationStopped=Zd,this}return b(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=is)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=is)},persist:function(){},isPersistent:is}),n}var ma={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},as=un(ma),Fr=b({},ma,{view:0,detail:0}),Ry=un(Fr),Bo,Uo,Gr,rs=b({},Fr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ho,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Gr&&(Gr&&e.type==="mousemove"?(Bo=e.screenX-Gr.screenX,Uo=e.screenY-Gr.screenY):Uo=Bo=0,Gr=e),Bo)},movementY:function(e){return"movementY"in e?e.movementY:Uo}}),Qd=un(rs),Dy=b({},rs,{dataTransfer:0}),Ly=un(Dy),Iy=b({},Fr,{relatedTarget:0}),jo=un(Iy),zy=b({},ma,{animationName:0,elapsedTime:0,pseudoElement:0}),By=un(zy),Uy=b({},ma,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jy=un(Uy),Hy=b({},ma,{data:0}),Jd=un(Hy),Fy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gy={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"},qy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ky(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=qy[e])?!!n[e]:!1}function Ho(){return Ky}var $y=b({},Fr,{key:function(e){if(e.key){var n=Fy[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ns(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Gy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ho,charCode:function(e){return e.type==="keypress"?ns(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ns(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Yy=un($y),Py=b({},rs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wd=un(Py),Vy=b({},Fr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ho}),Xy=un(Vy),Zy=b({},ma,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qy=un(Zy),Jy=b({},rs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Wy=un(Jy),ex=b({},ma,{newState:0,oldState:0}),tx=un(ex),nx=[9,13,27,32],Fo=ui&&"CompositionEvent"in window,qr=null;ui&&"documentMode"in document&&(qr=document.documentMode);var ix=ui&&"TextEvent"in window&&!qr,ef=ui&&(!Fo||qr&&8<qr&&11>=qr),tf=" ",nf=!1;function af(e,n){switch(e){case"keyup":return nx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function ax(e,n){switch(e){case"compositionend":return rf(n);case"keypress":return n.which!==32?null:(nf=!0,tf);case"textInput":return e=n.data,e===tf&&nf?null:e;default:return null}}function rx(e,n){if(Ka)return e==="compositionend"||!Fo&&af(e,n)?(e=Xd(),ts=zo=Di=null,Ka=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return ef&&n.locale!=="ko"?null:n.data;default:return null}}var lx={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 lf(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!lx[e.type]:n==="textarea"}function sf(e,n,i,l){$e?St?St.push(l):St=[l]:$e=l,n=Vs(n,"onChange"),0<n.length&&(i=new as("onChange","change",null,i,l),e.push({event:i,listeners:n}))}var Kr=null,$r=null;function sx(e){qm(e,0)}function ls(e){var n=Ci(e);if(Ir(n))return e}function of(e,n){if(e==="change")return n}var cf=!1;if(ui){var Go;if(ui){var qo="oninput"in document;if(!qo){var uf=document.createElement("div");uf.setAttribute("oninput","return;"),qo=typeof uf.oninput=="function"}Go=qo}else Go=!1;cf=Go&&(!document.documentMode||9<document.documentMode)}function df(){Kr&&(Kr.detachEvent("onpropertychange",ff),$r=Kr=null)}function ff(e){if(e.propertyName==="value"&&ls($r)){var n=[];sf(n,$r,e,ze(e)),es(sx,n)}}function ox(e,n,i){e==="focusin"?(df(),Kr=n,$r=i,Kr.attachEvent("onpropertychange",ff)):e==="focusout"&&df()}function cx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ls($r)}function ux(e,n){if(e==="click")return ls(n)}function dx(e,n){if(e==="input"||e==="change")return ls(n)}function fx(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var En=typeof Object.is=="function"?Object.is:fx;function Yr(e,n){if(En(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),l=Object.keys(n);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var c=i[l];if(!Xn.call(n,c)||!En(e[c],n[c]))return!1}return!0}function pf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mf(e,n){var i=pf(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=n&&l>=n)return{node:i,offset:n-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=pf(i)}}function hf(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?hf(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function gf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Fa(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=Fa(e.document)}return n}function Ko(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var px=ui&&"documentMode"in document&&11>=document.documentMode,$a=null,$o=null,Pr=null,Yo=!1;function bf(e,n,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Yo||$a==null||$a!==Fa(l)||(l=$a,"selectionStart"in l&&Ko(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Pr&&Yr(Pr,l)||(Pr=l,l=Vs($o,"onSelect"),0<l.length&&(n=new as("onSelect","select",null,n,i),e.push({event:n,listeners:l}),n.target=$a)))}function ha(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var Ya={animationend:ha("Animation","AnimationEnd"),animationiteration:ha("Animation","AnimationIteration"),animationstart:ha("Animation","AnimationStart"),transitionrun:ha("Transition","TransitionRun"),transitionstart:ha("Transition","TransitionStart"),transitioncancel:ha("Transition","TransitionCancel"),transitionend:ha("Transition","TransitionEnd")},Po={},yf={};ui&&(yf=document.createElement("div").style,"AnimationEvent"in window||(delete Ya.animationend.animation,delete Ya.animationiteration.animation,delete Ya.animationstart.animation),"TransitionEvent"in window||delete Ya.transitionend.transition);function ga(e){if(Po[e])return Po[e];if(!Ya[e])return e;var n=Ya[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in yf)return Po[e]=n[i];return e}var xf=ga("animationend"),vf=ga("animationiteration"),Ef=ga("animationstart"),mx=ga("transitionrun"),hx=ga("transitionstart"),gx=ga("transitioncancel"),_f=ga("transitionend"),Sf=new Map,Vo="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(" ");Vo.push("scrollEnd");function Kn(e,n){Sf.set(e,n),oi(n,[e])}var ss=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Rn=[],Pa=0,Xo=0;function os(){for(var e=Pa,n=Xo=Pa=0;n<e;){var i=Rn[n];Rn[n++]=null;var l=Rn[n];Rn[n++]=null;var c=Rn[n];Rn[n++]=null;var f=Rn[n];if(Rn[n++]=null,l!==null&&c!==null){var x=l.pending;x===null?c.next=c:(c.next=x.next,x.next=c),l.pending=c}f!==0&&kf(i,c,f)}}function cs(e,n,i,l){Rn[Pa++]=e,Rn[Pa++]=n,Rn[Pa++]=i,Rn[Pa++]=l,Xo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Zo(e,n,i,l){return cs(e,n,i,l),us(e)}function ba(e,n){return cs(e,null,null,n),us(e)}function kf(e,n,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var c=!1,f=e.return;f!==null;)f.childLanes|=i,l=f.alternate,l!==null&&(l.childLanes|=i),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&n!==null&&(c=31-tt(i),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[n]:l.push(n),n.lane=i|536870912),f):null}function us(e){if(50<hl)throw hl=0,ru=null,Error(s(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Va={};function bx(e,n,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(e,n,i,l){return new bx(e,n,i,l)}function Qo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,n){var i=e.alternate;return i===null?(i=_n(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Nf(e,n){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function ds(e,n,i,l,c,f){var x=0;if(l=e,typeof e=="function")Qo(e)&&(x=1);else if(typeof e=="string")x=_v(e,i,me.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ce:return e=_n(31,i,n,c),e.elementType=ce,e.lanes=f,e;case A:return ya(i.children,c,f,n);case O:x=8,c|=24;break;case S:return e=_n(12,i,n,c|2),e.elementType=S,e.lanes=f,e;case R:return e=_n(13,i,n,c),e.elementType=R,e.lanes=f,e;case T:return e=_n(19,i,n,c),e.elementType=T,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case I:x=10;break e;case j:x=9;break e;case Y:x=11;break e;case $:x=14;break e;case le:x=16,l=null;break e}x=29,i=Error(s(130,e===null?"null":typeof e,"")),l=null}return n=_n(x,i,n,c),n.elementType=e,n.type=l,n.lanes=f,n}function ya(e,n,i,l){return e=_n(7,e,l,n),e.lanes=i,e}function Jo(e,n,i){return e=_n(6,e,null,n),e.lanes=i,e}function Tf(e){var n=_n(18,null,null,0);return n.stateNode=e,n}function Wo(e,n,i){return n=_n(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var wf=new WeakMap;function Dn(e,n){if(typeof e=="object"&&e!==null){var i=wf.get(e);return i!==void 0?i:(n={value:e,source:n,stack:On(n)},wf.set(e,n),n)}return{value:e,source:n,stack:On(n)}}var Xa=[],Za=0,fs=null,Vr=0,Ln=[],In=0,Li=null,Jn=1,Wn="";function fi(e,n){Xa[Za++]=Vr,Xa[Za++]=fs,fs=e,Vr=n}function Af(e,n,i){Ln[In++]=Jn,Ln[In++]=Wn,Ln[In++]=Li,Li=e;var l=Jn;e=Wn;var c=32-tt(l)-1;l&=~(1<<c),i+=1;var f=32-tt(n)+c;if(30<f){var x=c-c%5;f=(l&(1<<x)-1).toString(32),l>>=x,c-=x,Jn=1<<32-tt(n)+c|i<<c|l,Wn=f+e}else Jn=1<<f|i<<c|l,Wn=e}function ec(e){e.return!==null&&(fi(e,1),Af(e,1,0))}function tc(e){for(;e===fs;)fs=Xa[--Za],Xa[Za]=null,Vr=Xa[--Za],Xa[Za]=null;for(;e===Li;)Li=Ln[--In],Ln[In]=null,Wn=Ln[--In],Ln[In]=null,Jn=Ln[--In],Ln[In]=null}function Cf(e,n){Ln[In++]=Jn,Ln[In++]=Wn,Ln[In++]=Li,Jn=n.id,Wn=n.overflow,Li=e}var Kt=null,gt=null,Xe=!1,Ii=null,zn=!1,nc=Error(s(519));function zi(e){var n=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xr(Dn(n,e)),nc}function Of(e){var n=e.stateNode,i=e.type,l=e.memoizedProps;switch(n[Ct]=e,n[Xt]=l,i){case"dialog":qe("cancel",n),qe("close",n);break;case"iframe":case"object":case"embed":qe("load",n);break;case"video":case"audio":for(i=0;i<bl.length;i++)qe(bl[i],n);break;case"source":qe("error",n);break;case"img":case"image":case"link":qe("error",n),qe("load",n);break;case"details":qe("toggle",n);break;case"input":qe("invalid",n),pa(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":qe("invalid",n);break;case"textarea":qe("invalid",n),qa(n,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||l.suppressHydrationWarning===!0||Pm(n.textContent,i)?(l.popover!=null&&(qe("beforetoggle",n),qe("toggle",n)),l.onScroll!=null&&qe("scroll",n),l.onScrollEnd!=null&&qe("scrollend",n),l.onClick!=null&&(n.onclick=pe),n=!0):n=!1,n||zi(e,!0)}function Mf(e){for(Kt=e.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:zn=!1;return;case 27:case 3:zn=!0;return;default:Kt=Kt.return}}function Qa(e){if(e!==Kt)return!1;if(!Xe)return Mf(e),Xe=!0,!1;var n=e.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||vu(e.type,e.memoizedProps)),i=!i),i&>&&zi(e),Mf(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));gt=nh(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));gt=nh(e)}else n===27?(n=gt,Zi(e.type)?(e=Nu,Nu=null,gt=e):gt=n):gt=Kt?Un(e.stateNode.nextSibling):null;return!0}function xa(){gt=Kt=null,Xe=!1}function ic(){var e=Ii;return e!==null&&(mn===null?mn=e:mn.push.apply(mn,e),Ii=null),e}function Xr(e){Ii===null?Ii=[e]:Ii.push(e)}var ac=C(null),va=null,pi=null;function Bi(e,n,i){N(ac,n._currentValue),n._currentValue=i}function mi(e){e._currentValue=ac.current,P(ac)}function rc(e,n,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===i)break;e=e.return}}function lc(e,n,i,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var x=c.child;f=f.firstContext;e:for(;f!==null;){var _=f;f=c;for(var M=0;M<n.length;M++)if(_.context===n[M]){f.lanes|=i,_=f.alternate,_!==null&&(_.lanes|=i),rc(f.return,i,e),l||(x=null);break e}f=_.next}}else if(c.tag===18){if(x=c.return,x===null)throw Error(s(341));x.lanes|=i,f=x.alternate,f!==null&&(f.lanes|=i),rc(x,i,e),x=null}else x=c.child;if(x!==null)x.return=c;else for(x=c;x!==null;){if(x===e){x=null;break}if(c=x.sibling,c!==null){c.return=x.return,x=c;break}x=x.return}c=x}}function Ja(e,n,i,l){e=null;for(var c=n,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var x=c.alternate;if(x===null)throw Error(s(387));if(x=x.memoizedProps,x!==null){var _=c.type;En(c.pendingProps.value,x.value)||(e!==null?e.push(_):e=[_])}}else if(c===se.current){if(x=c.alternate,x===null)throw Error(s(387));x.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(_l):e=[_l])}c=c.return}e!==null&&lc(n,e,i,l),n.flags|=262144}function ps(e){for(e=e.firstContext;e!==null;){if(!En(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ea(e){va=e,pi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $t(e){return Rf(va,e)}function ms(e,n){return va===null&&Ea(e),Rf(e,n)}function Rf(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},pi===null){if(e===null)throw Error(s(308));pi=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else pi=pi.next=n;return i}var yx=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},xx=t.unstable_scheduleCallback,vx=t.unstable_NormalPriority,It={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sc(){return{controller:new yx,data:new Map,refCount:0}}function Zr(e){e.refCount--,e.refCount===0&&xx(vx,function(){e.controller.abort()})}var Qr=null,oc=0,Wa=0,er=null;function Ex(e,n){if(Qr===null){var i=Qr=[];oc=0,Wa=du(),er={status:"pending",value:void 0,then:function(l){i.push(l)}}}return oc++,n.then(Df,Df),n}function Df(){if(--oc===0&&Qr!==null){er!==null&&(er.status="fulfilled");var e=Qr;Qr=null,Wa=0,er=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function _x(e,n){var i=[],l={status:"pending",value:null,reason:null,then:function(c){i.push(c)}};return e.then(function(){l.status="fulfilled",l.value=n;for(var c=0;c<i.length;c++)(0,i[c])(n)},function(c){for(l.status="rejected",l.reason=c,c=0;c<i.length;c++)(0,i[c])(void 0)}),l}var Lf=z.S;z.S=function(e,n){bm=_t(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Ex(e,n),Lf!==null&&Lf(e,n)};var _a=C(null);function cc(){var e=_a.current;return e!==null?e:dt.pooledCache}function hs(e,n){n===null?N(_a,_a.current):N(_a,n.pool)}function If(){var e=cc();return e===null?null:{parent:It._currentValue,pool:e}}var tr=Error(s(460)),uc=Error(s(474)),gs=Error(s(542)),bs={then:function(){}};function zf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Bf(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(pe,pe),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,jf(e),e;default:if(typeof n.status=="string")n.then(pe,pe);else{if(e=dt,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=n,e.status="pending",e.then(function(l){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=l}},function(l){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=l}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,jf(e),e}throw ka=n,tr}}function Sa(e){try{var n=e._init;return n(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ka=i,tr):i}}var ka=null;function Uf(){if(ka===null)throw Error(s(459));var e=ka;return ka=null,e}function jf(e){if(e===tr||e===gs)throw Error(s(483))}var nr=null,Jr=0;function ys(e){var n=Jr;return Jr+=1,nr===null&&(nr=[]),Bf(nr,e,n)}function Wr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function xs(e,n){throw n.$$typeof===E?Error(s(525)):(e=Object.prototype.toString.call(n),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Hf(e){function n(B,L){if(e){var F=B.deletions;F===null?(B.deletions=[L],B.flags|=16):F.push(L)}}function i(B,L){if(!e)return null;for(;L!==null;)n(B,L),L=L.sibling;return null}function l(B){for(var L=new Map;B!==null;)B.key!==null?L.set(B.key,B):L.set(B.index,B),B=B.sibling;return L}function c(B,L){return B=di(B,L),B.index=0,B.sibling=null,B}function f(B,L,F){return B.index=F,e?(F=B.alternate,F!==null?(F=F.index,F<L?(B.flags|=67108866,L):F):(B.flags|=67108866,L)):(B.flags|=1048576,L)}function x(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function _(B,L,F,te){return L===null||L.tag!==6?(L=Jo(F,B.mode,te),L.return=B,L):(L=c(L,F),L.return=B,L)}function M(B,L,F,te){var we=F.type;return we===A?Q(B,L,F.props.children,te,F.key):L!==null&&(L.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===le&&Sa(we)===L.type)?(L=c(L,F.props),Wr(L,F),L.return=B,L):(L=ds(F.type,F.key,F.props,null,B.mode,te),Wr(L,F),L.return=B,L)}function G(B,L,F,te){return L===null||L.tag!==4||L.stateNode.containerInfo!==F.containerInfo||L.stateNode.implementation!==F.implementation?(L=Wo(F,B.mode,te),L.return=B,L):(L=c(L,F.children||[]),L.return=B,L)}function Q(B,L,F,te,we){return L===null||L.tag!==7?(L=ya(F,B.mode,te,we),L.return=B,L):(L=c(L,F),L.return=B,L)}function ne(B,L,F){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=Jo(""+L,B.mode,F),L.return=B,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case v:return F=ds(L.type,L.key,L.props,null,B.mode,F),Wr(F,L),F.return=B,F;case k:return L=Wo(L,B.mode,F),L.return=B,L;case le:return L=Sa(L),ne(B,L,F)}if(J(L)||re(L))return L=ya(L,B.mode,F,null),L.return=B,L;if(typeof L.then=="function")return ne(B,ys(L),F);if(L.$$typeof===I)return ne(B,ms(B,L),F);xs(B,L)}return null}function q(B,L,F,te){var we=L!==null?L.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return we!==null?null:_(B,L,""+F,te);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case v:return F.key===we?M(B,L,F,te):null;case k:return F.key===we?G(B,L,F,te):null;case le:return F=Sa(F),q(B,L,F,te)}if(J(F)||re(F))return we!==null?null:Q(B,L,F,te,null);if(typeof F.then=="function")return q(B,L,ys(F),te);if(F.$$typeof===I)return q(B,L,ms(B,F),te);xs(B,F)}return null}function V(B,L,F,te,we){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return B=B.get(F)||null,_(L,B,""+te,we);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case v:return B=B.get(te.key===null?F:te.key)||null,M(L,B,te,we);case k:return B=B.get(te.key===null?F:te.key)||null,G(L,B,te,we);case le:return te=Sa(te),V(B,L,F,te,we)}if(J(te)||re(te))return B=B.get(F)||null,Q(L,B,te,we,null);if(typeof te.then=="function")return V(B,L,F,ys(te),we);if(te.$$typeof===I)return V(B,L,F,ms(L,te),we);xs(L,te)}return null}function Ee(B,L,F,te){for(var we=null,Je=null,ke=L,Ue=L=0,Pe=null;ke!==null&&Ue<F.length;Ue++){ke.index>Ue?(Pe=ke,ke=null):Pe=ke.sibling;var We=q(B,ke,F[Ue],te);if(We===null){ke===null&&(ke=Pe);break}e&&ke&&We.alternate===null&&n(B,ke),L=f(We,L,Ue),Je===null?we=We:Je.sibling=We,Je=We,ke=Pe}if(Ue===F.length)return i(B,ke),Xe&&fi(B,Ue),we;if(ke===null){for(;Ue<F.length;Ue++)ke=ne(B,F[Ue],te),ke!==null&&(L=f(ke,L,Ue),Je===null?we=ke:Je.sibling=ke,Je=ke);return Xe&&fi(B,Ue),we}for(ke=l(ke);Ue<F.length;Ue++)Pe=V(ke,B,Ue,F[Ue],te),Pe!==null&&(e&&Pe.alternate!==null&&ke.delete(Pe.key===null?Ue:Pe.key),L=f(Pe,L,Ue),Je===null?we=Pe:Je.sibling=Pe,Je=Pe);return e&&ke.forEach(function(ta){return n(B,ta)}),Xe&&fi(B,Ue),we}function Oe(B,L,F,te){if(F==null)throw Error(s(151));for(var we=null,Je=null,ke=L,Ue=L=0,Pe=null,We=F.next();ke!==null&&!We.done;Ue++,We=F.next()){ke.index>Ue?(Pe=ke,ke=null):Pe=ke.sibling;var ta=q(B,ke,We.value,te);if(ta===null){ke===null&&(ke=Pe);break}e&&ke&&ta.alternate===null&&n(B,ke),L=f(ta,L,Ue),Je===null?we=ta:Je.sibling=ta,Je=ta,ke=Pe}if(We.done)return i(B,ke),Xe&&fi(B,Ue),we;if(ke===null){for(;!We.done;Ue++,We=F.next())We=ne(B,We.value,te),We!==null&&(L=f(We,L,Ue),Je===null?we=We:Je.sibling=We,Je=We);return Xe&&fi(B,Ue),we}for(ke=l(ke);!We.done;Ue++,We=F.next())We=V(ke,B,Ue,We.value,te),We!==null&&(e&&We.alternate!==null&&ke.delete(We.key===null?Ue:We.key),L=f(We,L,Ue),Je===null?we=We:Je.sibling=We,Je=We);return e&&ke.forEach(function(Dv){return n(B,Dv)}),Xe&&fi(B,Ue),we}function ot(B,L,F,te){if(typeof F=="object"&&F!==null&&F.type===A&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case v:e:{for(var we=F.key;L!==null;){if(L.key===we){if(we=F.type,we===A){if(L.tag===7){i(B,L.sibling),te=c(L,F.props.children),te.return=B,B=te;break e}}else if(L.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===le&&Sa(we)===L.type){i(B,L.sibling),te=c(L,F.props),Wr(te,F),te.return=B,B=te;break e}i(B,L);break}else n(B,L);L=L.sibling}F.type===A?(te=ya(F.props.children,B.mode,te,F.key),te.return=B,B=te):(te=ds(F.type,F.key,F.props,null,B.mode,te),Wr(te,F),te.return=B,B=te)}return x(B);case k:e:{for(we=F.key;L!==null;){if(L.key===we)if(L.tag===4&&L.stateNode.containerInfo===F.containerInfo&&L.stateNode.implementation===F.implementation){i(B,L.sibling),te=c(L,F.children||[]),te.return=B,B=te;break e}else{i(B,L);break}else n(B,L);L=L.sibling}te=Wo(F,B.mode,te),te.return=B,B=te}return x(B);case le:return F=Sa(F),ot(B,L,F,te)}if(J(F))return Ee(B,L,F,te);if(re(F)){if(we=re(F),typeof we!="function")throw Error(s(150));return F=we.call(F),Oe(B,L,F,te)}if(typeof F.then=="function")return ot(B,L,ys(F),te);if(F.$$typeof===I)return ot(B,L,ms(B,F),te);xs(B,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,L!==null&&L.tag===6?(i(B,L.sibling),te=c(L,F),te.return=B,B=te):(i(B,L),te=Jo(F,B.mode,te),te.return=B,B=te),x(B)):i(B,L)}return function(B,L,F,te){try{Jr=0;var we=ot(B,L,F,te);return nr=null,we}catch(ke){if(ke===tr||ke===gs)throw ke;var Je=_n(29,ke,null,B.mode);return Je.lanes=te,Je.return=B,Je}finally{}}}var Na=Hf(!0),Ff=Hf(!1),Ui=!1;function dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fc(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ji(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Hi(e,n,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(et&2)!==0){var c=l.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),l.pending=n,n=us(e),kf(e,null,i),n}return cs(e,l,n,i),us(e)}function el(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var l=n.lanes;l&=e.pendingLanes,i|=l,n.lanes=i,Re(e,i)}}function pc(e,n){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var c=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var x={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?c=f=x:f=f.next=x,i=i.next}while(i!==null);f===null?c=f=n:f=f.next=n}else c=f=n;i={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var mc=!1;function tl(){if(mc){var e=er;if(e!==null)throw e}}function nl(e,n,i,l){mc=!1;var c=e.updateQueue;Ui=!1;var f=c.firstBaseUpdate,x=c.lastBaseUpdate,_=c.shared.pending;if(_!==null){c.shared.pending=null;var M=_,G=M.next;M.next=null,x===null?f=G:x.next=G,x=M;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,_=Q.lastBaseUpdate,_!==x&&(_===null?Q.firstBaseUpdate=G:_.next=G,Q.lastBaseUpdate=M))}if(f!==null){var ne=c.baseState;x=0,Q=G=M=null,_=f;do{var q=_.lane&-536870913,V=q!==_.lane;if(V?(Ye&q)===q:(l&q)===q){q!==0&&q===Wa&&(mc=!0),Q!==null&&(Q=Q.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Ee=e,Oe=_;q=n;var ot=i;switch(Oe.tag){case 1:if(Ee=Oe.payload,typeof Ee=="function"){ne=Ee.call(ot,ne,q);break e}ne=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Oe.payload,q=typeof Ee=="function"?Ee.call(ot,ne,q):Ee,q==null)break e;ne=b({},ne,q);break e;case 2:Ui=!0}}q=_.callback,q!==null&&(e.flags|=64,V&&(e.flags|=8192),V=c.callbacks,V===null?c.callbacks=[q]:V.push(q))}else V={lane:q,tag:_.tag,payload:_.payload,callback:_.callback,next:null},Q===null?(G=Q=V,M=ne):Q=Q.next=V,x|=q;if(_=_.next,_===null){if(_=c.shared.pending,_===null)break;V=_,_=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);Q===null&&(M=ne),c.baseState=M,c.firstBaseUpdate=G,c.lastBaseUpdate=Q,f===null&&(c.shared.lanes=0),$i|=x,e.lanes=x,e.memoizedState=ne}}function Gf(e,n){if(typeof e!="function")throw Error(s(191,e));e.call(n)}function qf(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Gf(i[e],n)}var ir=C(null),vs=C(0);function Kf(e,n){e=Si,N(vs,e),N(ir,n),Si=e|n.baseLanes}function hc(){N(vs,Si),N(ir,ir.current)}function gc(){Si=vs.current,P(ir),P(vs)}var Sn=C(null),Bn=null;function Fi(e){var n=e.alternate;N(Mt,Mt.current&1),N(Sn,e),Bn===null&&(n===null||ir.current!==null||n.memoizedState!==null)&&(Bn=e)}function bc(e){N(Mt,Mt.current),N(Sn,e),Bn===null&&(Bn=e)}function $f(e){e.tag===22?(N(Mt,Mt.current),N(Sn,e),Bn===null&&(Bn=e)):Gi()}function Gi(){N(Mt,Mt.current),N(Sn,Sn.current)}function kn(e){P(Sn),Bn===e&&(Bn=null),P(Mt)}var Mt=C(0);function Es(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Su(i)||ku(i)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var hi=0,Be=null,lt=null,zt=null,_s=!1,ar=!1,Ta=!1,Ss=0,il=0,rr=null,Sx=0;function Tt(){throw Error(s(321))}function yc(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!En(e[i],n[i]))return!1;return!0}function xc(e,n,i,l,c,f){return hi=f,Be=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,z.H=e===null||e.memoizedState===null?Ap:Lc,Ta=!1,f=i(l,c),Ta=!1,ar&&(f=Pf(n,i,l,c)),Yf(e),f}function Yf(e){z.H=ll;var n=lt!==null&<.next!==null;if(hi=0,zt=lt=Be=null,_s=!1,il=0,rr=null,n)throw Error(s(300));e===null||Bt||(e=e.dependencies,e!==null&&ps(e)&&(Bt=!0))}function Pf(e,n,i,l){Be=e;var c=0;do{if(ar&&(rr=null),il=0,ar=!1,25<=c)throw Error(s(301));if(c+=1,zt=lt=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}z.H=Cp,f=n(i,l)}while(ar);return f}function kx(){var e=z.H,n=e.useState()[0];return n=typeof n.then=="function"?al(n):n,e=e.useState()[0],(lt!==null?lt.memoizedState:null)!==e&&(Be.flags|=1024),n}function vc(){var e=Ss!==0;return Ss=0,e}function Ec(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function _c(e){if(_s){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}_s=!1}hi=0,zt=lt=Be=null,ar=!1,il=Ss=0,rr=null}function an(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Be.memoizedState=zt=e:zt=zt.next=e,zt}function Rt(){if(lt===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var n=zt===null?Be.memoizedState:zt.next;if(n!==null)zt=n,lt=e;else{if(e===null)throw Be.alternate===null?Error(s(467)):Error(s(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},zt===null?Be.memoizedState=zt=e:zt=zt.next=e}return zt}function ks(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function al(e){var n=il;return il+=1,rr===null&&(rr=[]),e=Bf(rr,e,n),n=Be,(zt===null?n.memoizedState:zt.next)===null&&(n=n.alternate,z.H=n===null||n.memoizedState===null?Ap:Lc),e}function Ns(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return al(e);if(e.$$typeof===I)return $t(e)}throw Error(s(438,String(e)))}function Sc(e){var n=null,i=Be.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var l=Be.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=ks(),Be.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),l=0;l<e;l++)i[l]=U;return n.index++,i}function gi(e,n){return typeof n=="function"?n(e):n}function Ts(e){var n=Rt();return kc(n,lt,e)}function kc(e,n,i){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=i;var c=e.baseQueue,f=l.pending;if(f!==null){if(c!==null){var x=c.next;c.next=f.next,f.next=x}n.baseQueue=c=f,l.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{n=c.next;var _=x=null,M=null,G=n,Q=!1;do{var ne=G.lane&-536870913;if(ne!==G.lane?(Ye&ne)===ne:(hi&ne)===ne){var q=G.revertLane;if(q===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),ne===Wa&&(Q=!0);else if((hi&q)===q){G=G.next,q===Wa&&(Q=!0);continue}else ne={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},M===null?(_=M=ne,x=f):M=M.next=ne,Be.lanes|=q,$i|=q;ne=G.action,Ta&&i(f,ne),f=G.hasEagerState?G.eagerState:i(f,ne)}else q={lane:ne,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},M===null?(_=M=q,x=f):M=M.next=q,Be.lanes|=ne,$i|=ne;G=G.next}while(G!==null&&G!==n);if(M===null?x=f:M.next=_,!En(f,e.memoizedState)&&(Bt=!0,Q&&(i=er,i!==null)))throw i;e.memoizedState=f,e.baseState=x,e.baseQueue=M,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Nc(e){var n=Rt(),i=n.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=e;var l=i.dispatch,c=i.pending,f=n.memoizedState;if(c!==null){i.pending=null;var x=c=c.next;do f=e(f,x.action),x=x.next;while(x!==c);En(f,n.memoizedState)||(Bt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),i.lastRenderedState=f}return[f,l]}function Vf(e,n,i){var l=Be,c=Rt(),f=Xe;if(f){if(i===void 0)throw Error(s(407));i=i()}else i=n();var x=!En((lt||c).memoizedState,i);if(x&&(c.memoizedState=i,Bt=!0),c=c.queue,Ac(Qf.bind(null,l,c,e),[e]),c.getSnapshot!==n||x||zt!==null&&zt.memoizedState.tag&1){if(l.flags|=2048,lr(9,{destroy:void 0},Zf.bind(null,l,c,i,n),null),dt===null)throw Error(s(349));f||(hi&127)!==0||Xf(l,n,i)}return i}function Xf(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Be.updateQueue,n===null?(n=ks(),Be.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function Zf(e,n,i,l){n.value=i,n.getSnapshot=l,Jf(n)&&Wf(e)}function Qf(e,n,i){return i(function(){Jf(n)&&Wf(e)})}function Jf(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!En(e,i)}catch{return!0}}function Wf(e){var n=ba(e,2);n!==null&&hn(n,e,2)}function Tc(e){var n=an();if(typeof e=="function"){var i=e;if(e=i(),Ta){Vt(!0);try{i()}finally{Vt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:e},n}function ep(e,n,i,l){return e.baseState=i,kc(e,lt,typeof l=="function"?l:gi)}function Nx(e,n,i,l,c){if(Cs(e))throw Error(s(485));if(e=n.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){f.listeners.push(x)}};z.T!==null?i(!0):f.isTransition=!1,l(f),i=n.pending,i===null?(f.next=n.pending=f,tp(n,f)):(f.next=i.next,n.pending=i.next=f)}}function tp(e,n){var i=n.action,l=n.payload,c=e.state;if(n.isTransition){var f=z.T,x={};z.T=x;try{var _=i(c,l),M=z.S;M!==null&&M(x,_),np(e,n,_)}catch(G){wc(e,n,G)}finally{f!==null&&x.types!==null&&(f.types=x.types),z.T=f}}else try{f=i(c,l),np(e,n,f)}catch(G){wc(e,n,G)}}function np(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){ip(e,n,l)},function(l){return wc(e,n,l)}):ip(e,n,i)}function ip(e,n,i){n.status="fulfilled",n.value=i,ap(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,tp(e,i)))}function wc(e,n,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=i,ap(n),n=n.next;while(n!==l)}e.action=null}function ap(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function rp(e,n){return n}function lp(e,n){if(Xe){var i=dt.formState;if(i!==null){e:{var l=Be;if(Xe){if(gt){t:{for(var c=gt,f=zn;c.nodeType!==8;){if(!f){c=null;break t}if(c=Un(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){gt=Un(c.nextSibling),l=c.data==="F!";break e}}zi(l)}l=!1}l&&(n=i[0])}}return i=an(),i.memoizedState=i.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rp,lastRenderedState:n},i.queue=l,i=Np.bind(null,Be,l),l.dispatch=i,l=Tc(!1),f=Dc.bind(null,Be,!1,l.queue),l=an(),c={state:n,dispatch:null,action:e,pending:null},l.queue=c,i=Nx.bind(null,Be,c,f,i),c.dispatch=i,l.memoizedState=e,[n,i,!1]}function sp(e){var n=Rt();return op(n,lt,e)}function op(e,n,i){if(n=kc(e,n,rp)[0],e=Ts(gi)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=al(n)}catch(x){throw x===tr?gs:x}else l=n;n=Rt();var c=n.queue,f=c.dispatch;return i!==n.memoizedState&&(Be.flags|=2048,lr(9,{destroy:void 0},Tx.bind(null,c,i),null)),[l,f,e]}function Tx(e,n){e.action=n}function cp(e){var n=Rt(),i=lt;if(i!==null)return op(n,i,e);Rt(),n=n.memoizedState,i=Rt();var l=i.queue.dispatch;return i.memoizedState=e,[n,l,!1]}function lr(e,n,i,l){return e={tag:e,create:i,deps:l,inst:n,next:null},n=Be.updateQueue,n===null&&(n=ks(),Be.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,n.lastEffect=e),e}function up(){return Rt().memoizedState}function ws(e,n,i,l){var c=an();Be.flags|=e,c.memoizedState=lr(1|n,{destroy:void 0},i,l===void 0?null:l)}function As(e,n,i,l){var c=Rt();l=l===void 0?null:l;var f=c.memoizedState.inst;lt!==null&&l!==null&&yc(l,lt.memoizedState.deps)?c.memoizedState=lr(n,f,i,l):(Be.flags|=e,c.memoizedState=lr(1|n,f,i,l))}function dp(e,n){ws(8390656,8,e,n)}function Ac(e,n){As(2048,8,e,n)}function wx(e){Be.flags|=4;var n=Be.updateQueue;if(n===null)n=ks(),Be.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function fp(e){var n=Rt().memoizedState;return wx({ref:n,nextImpl:e}),function(){if((et&2)!==0)throw Error(s(440));return n.impl.apply(void 0,arguments)}}function pp(e,n){return As(4,2,e,n)}function mp(e,n){return As(4,4,e,n)}function hp(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function gp(e,n,i){i=i!=null?i.concat([e]):null,As(4,4,hp.bind(null,n,e),i)}function Cc(){}function bp(e,n){var i=Rt();n=n===void 0?null:n;var l=i.memoizedState;return n!==null&&yc(n,l[1])?l[0]:(i.memoizedState=[e,n],e)}function yp(e,n){var i=Rt();n=n===void 0?null:n;var l=i.memoizedState;if(n!==null&&yc(n,l[1]))return l[0];if(l=e(),Ta){Vt(!0);try{e()}finally{Vt(!1)}}return i.memoizedState=[l,n],l}function Oc(e,n,i){return i===void 0||(hi&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=xm(),Be.lanes|=e,$i|=e,i)}function xp(e,n,i,l){return En(i,n)?i:ir.current!==null?(e=Oc(e,i,l),En(e,n)||(Bt=!0),e):(hi&42)===0||(hi&1073741824)!==0&&(Ye&261930)===0?(Bt=!0,e.memoizedState=i):(e=xm(),Be.lanes|=e,$i|=e,n)}function vp(e,n,i,l,c){var f=ie.p;ie.p=f!==0&&8>f?f:8;var x=z.T,_={};z.T=_,Dc(e,!1,n,i);try{var M=c(),G=z.S;if(G!==null&&G(_,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var Q=_x(M,l);rl(e,n,Q,wn(e))}else rl(e,n,l,wn(e))}catch(ne){rl(e,n,{then:function(){},status:"rejected",reason:ne},wn())}finally{ie.p=f,x!==null&&_.types!==null&&(x.types=_.types),z.T=x}}function Ax(){}function Mc(e,n,i,l){if(e.tag!==5)throw Error(s(476));var c=Ep(e).queue;vp(e,c,n,ae,i===null?Ax:function(){return _p(e),i(l)})}function Ep(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:ae},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function _p(e){var n=Ep(e);n.next===null&&(n=e.alternate.memoizedState),rl(e,n.next.queue,{},wn())}function Rc(){return $t(_l)}function Sp(){return Rt().memoizedState}function kp(){return Rt().memoizedState}function Cx(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=wn();e=ji(i);var l=Hi(n,e,i);l!==null&&(hn(l,n,i),el(l,n,i)),n={cache:sc()},e.payload=n;return}n=n.return}}function Ox(e,n,i){var l=wn();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Cs(e)?Tp(n,i):(i=Zo(e,n,i,l),i!==null&&(hn(i,e,l),wp(i,n,l)))}function Np(e,n,i){var l=wn();rl(e,n,i,l)}function rl(e,n,i,l){var c={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Cs(e))Tp(n,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var x=n.lastRenderedState,_=f(x,i);if(c.hasEagerState=!0,c.eagerState=_,En(_,x))return cs(e,n,c,0),dt===null&&os(),!1}catch{}finally{}if(i=Zo(e,n,c,l),i!==null)return hn(i,e,l),wp(i,n,l),!0}return!1}function Dc(e,n,i,l){if(l={lane:2,revertLane:du(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Cs(e)){if(n)throw Error(s(479))}else n=Zo(e,i,l,2),n!==null&&hn(n,e,2)}function Cs(e){var n=e.alternate;return e===Be||n!==null&&n===Be}function Tp(e,n){ar=_s=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function wp(e,n,i){if((i&4194048)!==0){var l=n.lanes;l&=e.pendingLanes,i|=l,n.lanes=i,Re(e,i)}}var ll={readContext:$t,use:Ns,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useLayoutEffect:Tt,useInsertionEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useSyncExternalStore:Tt,useId:Tt,useHostTransitionStatus:Tt,useFormState:Tt,useActionState:Tt,useOptimistic:Tt,useMemoCache:Tt,useCacheRefresh:Tt};ll.useEffectEvent=Tt;var Ap={readContext:$t,use:Ns,useCallback:function(e,n){return an().memoizedState=[e,n===void 0?null:n],e},useContext:$t,useEffect:dp,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,ws(4194308,4,hp.bind(null,n,e),i)},useLayoutEffect:function(e,n){return ws(4194308,4,e,n)},useInsertionEffect:function(e,n){ws(4,2,e,n)},useMemo:function(e,n){var i=an();n=n===void 0?null:n;var l=e();if(Ta){Vt(!0);try{e()}finally{Vt(!1)}}return i.memoizedState=[l,n],l},useReducer:function(e,n,i){var l=an();if(i!==void 0){var c=i(n);if(Ta){Vt(!0);try{i(n)}finally{Vt(!1)}}}else c=n;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=Ox.bind(null,Be,e),[l.memoizedState,e]},useRef:function(e){var n=an();return e={current:e},n.memoizedState=e},useState:function(e){e=Tc(e);var n=e.queue,i=Np.bind(null,Be,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:Cc,useDeferredValue:function(e,n){var i=an();return Oc(i,e,n)},useTransition:function(){var e=Tc(!1);return e=vp.bind(null,Be,e.queue,!0,!1),an().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var l=Be,c=an();if(Xe){if(i===void 0)throw Error(s(407));i=i()}else{if(i=n(),dt===null)throw Error(s(349));(Ye&127)!==0||Xf(l,n,i)}c.memoizedState=i;var f={value:i,getSnapshot:n};return c.queue=f,dp(Qf.bind(null,l,f,e),[e]),l.flags|=2048,lr(9,{destroy:void 0},Zf.bind(null,l,f,i,n),null),i},useId:function(){var e=an(),n=dt.identifierPrefix;if(Xe){var i=Wn,l=Jn;i=(l&~(1<<32-tt(l)-1)).toString(32)+i,n="_"+n+"R_"+i,i=Ss++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=Sx++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Rc,useFormState:lp,useActionState:lp,useOptimistic:function(e){var n=an();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=Dc.bind(null,Be,!0,i),i.dispatch=n,[e,n]},useMemoCache:Sc,useCacheRefresh:function(){return an().memoizedState=Cx.bind(null,Be)},useEffectEvent:function(e){var n=an(),i={impl:e};return n.memoizedState=i,function(){if((et&2)!==0)throw Error(s(440));return i.impl.apply(void 0,arguments)}}},Lc={readContext:$t,use:Ns,useCallback:bp,useContext:$t,useEffect:Ac,useImperativeHandle:gp,useInsertionEffect:pp,useLayoutEffect:mp,useMemo:yp,useReducer:Ts,useRef:up,useState:function(){return Ts(gi)},useDebugValue:Cc,useDeferredValue:function(e,n){var i=Rt();return xp(i,lt.memoizedState,e,n)},useTransition:function(){var e=Ts(gi)[0],n=Rt().memoizedState;return[typeof e=="boolean"?e:al(e),n]},useSyncExternalStore:Vf,useId:Sp,useHostTransitionStatus:Rc,useFormState:sp,useActionState:sp,useOptimistic:function(e,n){var i=Rt();return ep(i,lt,e,n)},useMemoCache:Sc,useCacheRefresh:kp};Lc.useEffectEvent=fp;var Cp={readContext:$t,use:Ns,useCallback:bp,useContext:$t,useEffect:Ac,useImperativeHandle:gp,useInsertionEffect:pp,useLayoutEffect:mp,useMemo:yp,useReducer:Nc,useRef:up,useState:function(){return Nc(gi)},useDebugValue:Cc,useDeferredValue:function(e,n){var i=Rt();return lt===null?Oc(i,e,n):xp(i,lt.memoizedState,e,n)},useTransition:function(){var e=Nc(gi)[0],n=Rt().memoizedState;return[typeof e=="boolean"?e:al(e),n]},useSyncExternalStore:Vf,useId:Sp,useHostTransitionStatus:Rc,useFormState:cp,useActionState:cp,useOptimistic:function(e,n){var i=Rt();return lt!==null?ep(i,lt,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Sc,useCacheRefresh:kp};Cp.useEffectEvent=fp;function Ic(e,n,i,l){n=e.memoizedState,i=i(l,n),i=i==null?n:b({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var zc={enqueueSetState:function(e,n,i){e=e._reactInternals;var l=wn(),c=ji(l);c.payload=n,i!=null&&(c.callback=i),n=Hi(e,c,l),n!==null&&(hn(n,e,l),el(n,e,l))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var l=wn(),c=ji(l);c.tag=1,c.payload=n,i!=null&&(c.callback=i),n=Hi(e,c,l),n!==null&&(hn(n,e,l),el(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=wn(),l=ji(i);l.tag=2,n!=null&&(l.callback=n),n=Hi(e,l,i),n!==null&&(hn(n,e,i),el(n,e,i))}};function Op(e,n,i,l,c,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,x):n.prototype&&n.prototype.isPureReactComponent?!Yr(i,l)||!Yr(c,f):!0}function Mp(e,n,i,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,l),n.state!==e&&zc.enqueueReplaceState(n,n.state,null)}function wa(e,n){var i=n;if("ref"in n){i={};for(var l in n)l!=="ref"&&(i[l]=n[l])}if(e=e.defaultProps){i===n&&(i=b({},i));for(var c in e)i[c]===void 0&&(i[c]=e[c])}return i}function Rp(e){ss(e)}function Dp(e){console.error(e)}function Lp(e){ss(e)}function Os(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Ip(e,n,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Bc(e,n,i){return i=ji(i),i.tag=3,i.payload={element:null},i.callback=function(){Os(e,n)},i}function zp(e){return e=ji(e),e.tag=3,e}function Bp(e,n,i,l){var c=i.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;e.payload=function(){return c(f)},e.callback=function(){Ip(n,i,l)}}var x=i.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Ip(n,i,l),typeof c!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function Mx(e,n,i,l,c){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=i.alternate,n!==null&&Ja(n,i,c,!0),i=Sn.current,i!==null){switch(i.tag){case 31:case 13:return Bn===null?Gs():i.alternate===null&&wt===0&&(wt=3),i.flags&=-257,i.flags|=65536,i.lanes=c,l===bs?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([l]):n.add(l),ou(e,l,c)),!1;case 22:return i.flags|=65536,l===bs?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([l]):i.add(l)),ou(e,l,c)),!1}throw Error(s(435,i.tag))}return ou(e,l,c),Gs(),!1}if(Xe)return n=Sn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,l!==nc&&(e=Error(s(422),{cause:l}),Xr(Dn(e,i)))):(l!==nc&&(n=Error(s(423),{cause:l}),Xr(Dn(n,i))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=Dn(l,i),c=Bc(e.stateNode,l,c),pc(e,c),wt!==4&&(wt=2)),!1;var f=Error(s(520),{cause:l});if(f=Dn(f,i),ml===null?ml=[f]:ml.push(f),wt!==4&&(wt=2),n===null)return!0;l=Dn(l,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=c&-c,i.lanes|=e,e=Bc(i.stateNode,l,e),pc(i,e),!1;case 1:if(n=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Yi===null||!Yi.has(f))))return i.flags|=65536,c&=-c,i.lanes|=c,c=zp(c),Bp(c,e,i,l),pc(i,c),!1}i=i.return}while(i!==null);return!1}var Uc=Error(s(461)),Bt=!1;function Yt(e,n,i,l){n.child=e===null?Ff(n,null,i,l):Na(n,e.child,i,l)}function Up(e,n,i,l,c){i=i.render;var f=n.ref;if("ref"in l){var x={};for(var _ in l)_!=="ref"&&(x[_]=l[_])}else x=l;return Ea(n),l=xc(e,n,i,x,f,c),_=vc(),e!==null&&!Bt?(Ec(e,n,c),bi(e,n,c)):(Xe&&_&&ec(n),n.flags|=1,Yt(e,n,l,c),n.child)}function jp(e,n,i,l,c){if(e===null){var f=i.type;return typeof f=="function"&&!Qo(f)&&f.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=f,Hp(e,n,f,l,c)):(e=ds(i.type,null,l,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!Yc(e,c)){var x=f.memoizedProps;if(i=i.compare,i=i!==null?i:Yr,i(x,l)&&e.ref===n.ref)return bi(e,n,c)}return n.flags|=1,e=di(f,l),e.ref=n.ref,e.return=n,n.child=e}function Hp(e,n,i,l,c){if(e!==null){var f=e.memoizedProps;if(Yr(f,l)&&e.ref===n.ref)if(Bt=!1,n.pendingProps=l=f,Yc(e,c))(e.flags&131072)!==0&&(Bt=!0);else return n.lanes=e.lanes,bi(e,n,c)}return jc(e,n,i,l,c)}function Fp(e,n,i,l){var c=l.children,f=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((n.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,e!==null){for(l=n.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,n.child=null;return Gp(e,n,f,i,l)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&hs(n,f!==null?f.cachePool:null),f!==null?Kf(n,f):hc(),$f(n);else return l=n.lanes=536870912,Gp(e,n,f!==null?f.baseLanes|i:i,i,l)}else f!==null?(hs(n,f.cachePool),Kf(n,f),Gi(),n.memoizedState=null):(e!==null&&hs(n,null),hc(),Gi());return Yt(e,n,c,i),n.child}function sl(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Gp(e,n,i,l,c){var f=cc();return f=f===null?null:{parent:It._currentValue,pool:f},n.memoizedState={baseLanes:i,cachePool:f},e!==null&&hs(n,null),hc(),$f(n),e!==null&&Ja(e,n,l,!0),n.childLanes=c,null}function Ms(e,n){return n=Ds({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function qp(e,n,i){return Na(n,e.child,null,i),e=Ms(n,n.pendingProps),e.flags|=2,kn(n),n.memoizedState=null,e}function Rx(e,n,i){var l=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Xe){if(l.mode==="hidden")return e=Ms(n,l),n.lanes=536870912,sl(null,e);if(bc(n),(e=gt)?(e=th(e,zn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Li!==null?{id:Jn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},i=Tf(e),i.return=n,n.child=i,Kt=n,gt=null)):e=null,e===null)throw zi(n);return n.lanes=536870912,null}return Ms(n,l)}var f=e.memoizedState;if(f!==null){var x=f.dehydrated;if(bc(n),c)if(n.flags&256)n.flags&=-257,n=qp(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(s(558));else if(Bt||Ja(e,n,i,!1),c=(i&e.childLanes)!==0,Bt||c){if(l=dt,l!==null&&(x=At(l,i),x!==0&&x!==f.retryLane))throw f.retryLane=x,ba(e,x),hn(l,e,x),Uc;Gs(),n=qp(e,n,i)}else e=f.treeContext,gt=Un(x.nextSibling),Kt=n,Xe=!0,Ii=null,zn=!1,e!==null&&Cf(n,e),n=Ms(n,l),n.flags|=4096;return n}return e=di(e.child,{mode:l.mode,children:l.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Rs(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(e===null||e.ref!==i)&&(n.flags|=4194816)}}function jc(e,n,i,l,c){return Ea(n),i=xc(e,n,i,l,void 0,c),l=vc(),e!==null&&!Bt?(Ec(e,n,c),bi(e,n,c)):(Xe&&l&&ec(n),n.flags|=1,Yt(e,n,i,c),n.child)}function Kp(e,n,i,l,c,f){return Ea(n),n.updateQueue=null,i=Pf(n,l,i,c),Yf(e),l=vc(),e!==null&&!Bt?(Ec(e,n,f),bi(e,n,f)):(Xe&&l&&ec(n),n.flags|=1,Yt(e,n,i,f),n.child)}function $p(e,n,i,l,c){if(Ea(n),n.stateNode===null){var f=Va,x=i.contextType;typeof x=="object"&&x!==null&&(f=$t(x)),f=new i(l,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=zc,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=l,f.state=n.memoizedState,f.refs={},dc(n),x=i.contextType,f.context=typeof x=="object"&&x!==null?$t(x):Va,f.state=n.memoizedState,x=i.getDerivedStateFromProps,typeof x=="function"&&(Ic(n,i,x,l),f.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(x=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),x!==f.state&&zc.enqueueReplaceState(f,f.state,null),nl(n,l,f,c),tl(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(e===null){f=n.stateNode;var _=n.memoizedProps,M=wa(i,_);f.props=M;var G=f.context,Q=i.contextType;x=Va,typeof Q=="object"&&Q!==null&&(x=$t(Q));var ne=i.getDerivedStateFromProps;Q=typeof ne=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,Q||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||G!==x)&&Mp(n,f,l,x),Ui=!1;var q=n.memoizedState;f.state=q,nl(n,l,f,c),tl(),G=n.memoizedState,_||q!==G||Ui?(typeof ne=="function"&&(Ic(n,i,ne,l),G=n.memoizedState),(M=Ui||Op(n,i,M,l,q,G,x))?(Q||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=G),f.props=l,f.state=G,f.context=x,l=M):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{f=n.stateNode,fc(e,n),x=n.memoizedProps,Q=wa(i,x),f.props=Q,ne=n.pendingProps,q=f.context,G=i.contextType,M=Va,typeof G=="object"&&G!==null&&(M=$t(G)),_=i.getDerivedStateFromProps,(G=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x!==ne||q!==M)&&Mp(n,f,l,M),Ui=!1,q=n.memoizedState,f.state=q,nl(n,l,f,c),tl();var V=n.memoizedState;x!==ne||q!==V||Ui||e!==null&&e.dependencies!==null&&ps(e.dependencies)?(typeof _=="function"&&(Ic(n,i,_,l),V=n.memoizedState),(Q=Ui||Op(n,i,Q,l,q,V,M)||e!==null&&e.dependencies!==null&&ps(e.dependencies))?(G||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,V,M),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,V,M)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||x===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=V),f.props=l,f.state=V,f.context=M,l=Q):(typeof f.componentDidUpdate!="function"||x===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),l=!1)}return f=l,Rs(e,n),l=(n.flags&128)!==0,f||l?(f=n.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:f.render(),n.flags|=1,e!==null&&l?(n.child=Na(n,e.child,null,c),n.child=Na(n,null,i,c)):Yt(e,n,i,c),n.memoizedState=f.state,e=n.child):e=bi(e,n,c),e}function Yp(e,n,i,l){return xa(),n.flags|=256,Yt(e,n,i,l),n.child}var Hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fc(e){return{baseLanes:e,cachePool:If()}}function Gc(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=Tn),e}function Pp(e,n,i){var l=n.pendingProps,c=!1,f=(n.flags&128)!==0,x;if((x=f)||(x=e!==null&&e.memoizedState===null?!1:(Mt.current&2)!==0),x&&(c=!0,n.flags&=-129),x=(n.flags&32)!==0,n.flags&=-33,e===null){if(Xe){if(c?Fi(n):Gi(),(e=gt)?(e=th(e,zn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Li!==null?{id:Jn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},i=Tf(e),i.return=n,n.child=i,Kt=n,gt=null)):e=null,e===null)throw zi(n);return ku(e)?n.lanes=32:n.lanes=536870912,null}var _=l.children;return l=l.fallback,c?(Gi(),c=n.mode,_=Ds({mode:"hidden",children:_},c),l=ya(l,c,i,null),_.return=n,l.return=n,_.sibling=l,n.child=_,l=n.child,l.memoizedState=Fc(i),l.childLanes=Gc(e,x,i),n.memoizedState=Hc,sl(null,l)):(Fi(n),qc(n,_))}var M=e.memoizedState;if(M!==null&&(_=M.dehydrated,_!==null)){if(f)n.flags&256?(Fi(n),n.flags&=-257,n=Kc(e,n,i)):n.memoizedState!==null?(Gi(),n.child=e.child,n.flags|=128,n=null):(Gi(),_=l.fallback,c=n.mode,l=Ds({mode:"visible",children:l.children},c),_=ya(_,c,i,null),_.flags|=2,l.return=n,_.return=n,l.sibling=_,n.child=l,Na(n,e.child,null,i),l=n.child,l.memoizedState=Fc(i),l.childLanes=Gc(e,x,i),n.memoizedState=Hc,n=sl(null,l));else if(Fi(n),ku(_)){if(x=_.nextSibling&&_.nextSibling.dataset,x)var G=x.dgst;x=G,l=Error(s(419)),l.stack="",l.digest=x,Xr({value:l,source:null,stack:null}),n=Kc(e,n,i)}else if(Bt||Ja(e,n,i,!1),x=(i&e.childLanes)!==0,Bt||x){if(x=dt,x!==null&&(l=At(x,i),l!==0&&l!==M.retryLane))throw M.retryLane=l,ba(e,l),hn(x,e,l),Uc;Su(_)||Gs(),n=Kc(e,n,i)}else Su(_)?(n.flags|=192,n.child=e.child,n=null):(e=M.treeContext,gt=Un(_.nextSibling),Kt=n,Xe=!0,Ii=null,zn=!1,e!==null&&Cf(n,e),n=qc(n,l.children),n.flags|=4096);return n}return c?(Gi(),_=l.fallback,c=n.mode,M=e.child,G=M.sibling,l=di(M,{mode:"hidden",children:l.children}),l.subtreeFlags=M.subtreeFlags&65011712,G!==null?_=di(G,_):(_=ya(_,c,i,null),_.flags|=2),_.return=n,l.return=n,l.sibling=_,n.child=l,sl(null,l),l=n.child,_=e.child.memoizedState,_===null?_=Fc(i):(c=_.cachePool,c!==null?(M=It._currentValue,c=c.parent!==M?{parent:M,pool:M}:c):c=If(),_={baseLanes:_.baseLanes|i,cachePool:c}),l.memoizedState=_,l.childLanes=Gc(e,x,i),n.memoizedState=Hc,sl(e.child,l)):(Fi(n),i=e.child,e=i.sibling,i=di(i,{mode:"visible",children:l.children}),i.return=n,i.sibling=null,e!==null&&(x=n.deletions,x===null?(n.deletions=[e],n.flags|=16):x.push(e)),n.child=i,n.memoizedState=null,i)}function qc(e,n){return n=Ds({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Ds(e,n){return e=_n(22,e,null,n),e.lanes=0,e}function Kc(e,n,i){return Na(n,e.child,null,i),e=qc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Vp(e,n,i){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),rc(e.return,n,i)}function $c(e,n,i,l,c,f){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:c,treeForkCount:f}:(x.isBackwards=n,x.rendering=null,x.renderingStartTime=0,x.last=l,x.tail=i,x.tailMode=c,x.treeForkCount=f)}function Xp(e,n,i){var l=n.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var x=Mt.current,_=(x&2)!==0;if(_?(x=x&1|2,n.flags|=128):x&=1,N(Mt,x),Yt(e,n,l,i),l=Xe?Vr:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Vp(e,i,n);else if(e.tag===19)Vp(e,i,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(i=n.child,c=null;i!==null;)e=i.alternate,e!==null&&Es(e)===null&&(c=i),i=i.sibling;i=c,i===null?(c=n.child,n.child=null):(c=i.sibling,i.sibling=null),$c(n,!1,c,i,f,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&Es(e)===null){n.child=c;break}e=c.sibling,c.sibling=i,i=c,c=e}$c(n,!0,i,null,f,l);break;case"together":$c(n,!1,null,null,void 0,l);break;default:n.memoizedState=null}return n.child}function bi(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),$i|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(Ja(e,n,i,!1),(i&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(s(153));if(n.child!==null){for(e=n.child,i=di(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=di(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function Yc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&ps(e)))}function Dx(e,n,i){switch(n.tag){case 3:ye(n,n.stateNode.containerInfo),Bi(n,It,e.memoizedState.cache),xa();break;case 27:case 5:De(n);break;case 4:ye(n,n.stateNode.containerInfo);break;case 10:Bi(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,bc(n),null;break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(Fi(n),n.flags|=128,null):(i&n.child.childLanes)!==0?Pp(e,n,i):(Fi(n),e=bi(e,n,i),e!==null?e.sibling:null);Fi(n);break;case 19:var c=(e.flags&128)!==0;if(l=(i&n.childLanes)!==0,l||(Ja(e,n,i,!1),l=(i&n.childLanes)!==0),c){if(l)return Xp(e,n,i);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),N(Mt,Mt.current),l)break;return null;case 22:return n.lanes=0,Fp(e,n,i,n.pendingProps);case 24:Bi(n,It,e.memoizedState.cache)}return bi(e,n,i)}function Zp(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)Bt=!0;else{if(!Yc(e,i)&&(n.flags&128)===0)return Bt=!1,Dx(e,n,i);Bt=(e.flags&131072)!==0}else Bt=!1,Xe&&(n.flags&1048576)!==0&&Af(n,Vr,n.index);switch(n.lanes=0,n.tag){case 16:e:{var l=n.pendingProps;if(e=Sa(n.elementType),n.type=e,typeof e=="function")Qo(e)?(l=wa(e,l),n.tag=1,n=$p(null,n,e,l,i)):(n.tag=0,n=jc(null,n,e,l,i));else{if(e!=null){var c=e.$$typeof;if(c===Y){n.tag=11,n=Up(null,n,e,l,i);break e}else if(c===$){n.tag=14,n=jp(null,n,e,l,i);break e}}throw n=H(e)||e,Error(s(306,n,""))}}return n;case 0:return jc(e,n,n.type,n.pendingProps,i);case 1:return l=n.type,c=wa(l,n.pendingProps),$p(e,n,l,c,i);case 3:e:{if(ye(n,n.stateNode.containerInfo),e===null)throw Error(s(387));l=n.pendingProps;var f=n.memoizedState;c=f.element,fc(e,n),nl(n,l,null,i);var x=n.memoizedState;if(l=x.cache,Bi(n,It,l),l!==f.cache&&lc(n,[It],i,!0),tl(),l=x.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:x.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=Yp(e,n,l,i);break e}else if(l!==c){c=Dn(Error(s(424)),n),Xr(c),n=Yp(e,n,l,i);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(gt=Un(e.firstChild),Kt=n,Xe=!0,Ii=null,zn=!0,i=Ff(n,null,l,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(xa(),l===c){n=bi(e,n,i);break e}Yt(e,n,l,i)}n=n.child}return n;case 26:return Rs(e,n),e===null?(i=sh(n.type,null,n.pendingProps,null))?n.memoizedState=i:Xe||(i=n.type,e=n.pendingProps,l=Xs(K.current).createElement(i),l[Ct]=n,l[Xt]=e,Pt(l,i,e),Dt(l),n.stateNode=l):n.memoizedState=sh(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return De(n),e===null&&Xe&&(l=n.stateNode=ah(n.type,n.pendingProps,K.current),Kt=n,zn=!0,c=gt,Zi(n.type)?(Nu=c,gt=Un(l.firstChild)):gt=c),Yt(e,n,n.pendingProps.children,i),Rs(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Xe&&((c=l=gt)&&(l=cv(l,n.type,n.pendingProps,zn),l!==null?(n.stateNode=l,Kt=n,gt=Un(l.firstChild),zn=!1,c=!0):c=!1),c||zi(n)),De(n),c=n.type,f=n.pendingProps,x=e!==null?e.memoizedProps:null,l=f.children,vu(c,f)?l=null:x!==null&&vu(c,x)&&(n.flags|=32),n.memoizedState!==null&&(c=xc(e,n,kx,null,null,i),_l._currentValue=c),Rs(e,n),Yt(e,n,l,i),n.child;case 6:return e===null&&Xe&&((e=i=gt)&&(i=uv(i,n.pendingProps,zn),i!==null?(n.stateNode=i,Kt=n,gt=null,e=!0):e=!1),e||zi(n)),null;case 13:return Pp(e,n,i);case 4:return ye(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Na(n,null,l,i):Yt(e,n,l,i),n.child;case 11:return Up(e,n,n.type,n.pendingProps,i);case 7:return Yt(e,n,n.pendingProps,i),n.child;case 8:return Yt(e,n,n.pendingProps.children,i),n.child;case 12:return Yt(e,n,n.pendingProps.children,i),n.child;case 10:return l=n.pendingProps,Bi(n,n.type,l.value),Yt(e,n,l.children,i),n.child;case 9:return c=n.type._context,l=n.pendingProps.children,Ea(n),c=$t(c),l=l(c),n.flags|=1,Yt(e,n,l,i),n.child;case 14:return jp(e,n,n.type,n.pendingProps,i);case 15:return Hp(e,n,n.type,n.pendingProps,i);case 19:return Xp(e,n,i);case 31:return Rx(e,n,i);case 22:return Fp(e,n,i,n.pendingProps);case 24:return Ea(n),l=$t(It),e===null?(c=cc(),c===null&&(c=dt,f=sc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=i),c=f),n.memoizedState={parent:l,cache:c},dc(n),Bi(n,It,c)):((e.lanes&i)!==0&&(fc(e,n),nl(n,null,null,i),tl()),c=e.memoizedState,f=n.memoizedState,c.parent!==l?(c={parent:l,cache:l},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),Bi(n,It,l)):(l=f.cache,Bi(n,It,l),l!==c.cache&&lc(n,[It],i,!0))),Yt(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(s(156,n.tag))}function yi(e){e.flags|=4}function Pc(e,n,i,l,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Sm())e.flags|=8192;else throw ka=bs,uc}else e.flags&=-16777217}function Qp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!fh(n))if(Sm())e.flags|=8192;else throw ka=bs,uc}function Ls(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Le():536870912,e.lanes|=n,ur|=n)}function ol(e,n){if(!Xe)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function bt(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(n)for(var c=e.child;c!==null;)i|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)i|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=i,n}function Lx(e,n,i){var l=n.pendingProps;switch(tc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(n),null;case 1:return bt(n),null;case 3:return i=n.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),mi(It),ge(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Qa(n)?yi(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,ic())),bt(n),null;case 26:var c=n.type,f=n.memoizedState;return e===null?(yi(n),f!==null?(bt(n),Qp(n,f)):(bt(n),Pc(n,c,null,l,i))):f?f!==e.memoizedState?(yi(n),bt(n),Qp(n,f)):(bt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==l&&yi(n),bt(n),Pc(n,c,e,l,i)),null;case 27:if(xt(n),i=K.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&yi(n);else{if(!l){if(n.stateNode===null)throw Error(s(166));return bt(n),null}e=me.current,Qa(n)?Of(n):(e=ah(c,l,i),n.stateNode=e,yi(n))}return bt(n),null;case 5:if(xt(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&yi(n);else{if(!l){if(n.stateNode===null)throw Error(s(166));return bt(n),null}if(f=me.current,Qa(n))Of(n);else{var x=Xs(K.current);switch(f){case 1:f=x.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=x.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=x.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=x.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=x.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?x.createElement("select",{is:l.is}):x.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?x.createElement(c,{is:l.is}):x.createElement(c)}}f[Ct]=n,f[Xt]=l;e:for(x=n.child;x!==null;){if(x.tag===5||x.tag===6)f.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===n)break e;for(;x.sibling===null;){if(x.return===null||x.return===n)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}n.stateNode=f;e:switch(Pt(f,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&yi(n)}}return bt(n),Pc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==l&&yi(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(s(166));if(e=K.current,Qa(n)){if(e=n.stateNode,i=n.memoizedProps,l=null,c=Kt,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Ct]=n,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Pm(e.nodeValue,i)),e||zi(n,!0)}else e=Xs(e).createTextNode(l),e[Ct]=n,n.stateNode=e}return bt(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(l=Qa(n),i!==null){if(e===null){if(!l)throw Error(s(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[Ct]=n}else xa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;bt(n),e=!1}else i=ic(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(kn(n),n):(kn(n),null);if((n.flags&128)!==0)throw Error(s(558))}return bt(n),null;case 13:if(l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Qa(n),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(s(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));c[Ct]=n}else xa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;bt(n),c=!1}else c=ic(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(kn(n),n):(kn(n),null)}return kn(n),(n.flags&128)!==0?(n.lanes=i,n):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=n.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),Ls(n,n.updateQueue),bt(n),null);case 4:return ge(),e===null&&hu(n.stateNode.containerInfo),bt(n),null;case 10:return mi(n.type),bt(n),null;case 19:if(P(Mt),l=n.memoizedState,l===null)return bt(n),null;if(c=(n.flags&128)!==0,f=l.rendering,f===null)if(c)ol(l,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=Es(e),f!==null){for(n.flags|=128,ol(l,!1),e=f.updateQueue,n.updateQueue=e,Ls(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)Nf(i,e),i=i.sibling;return N(Mt,Mt.current&1|2),Xe&&fi(n,l.treeForkCount),n.child}e=e.sibling}l.tail!==null&&_t()>js&&(n.flags|=128,c=!0,ol(l,!1),n.lanes=4194304)}else{if(!c)if(e=Es(f),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,Ls(n,e),ol(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Xe)return bt(n),null}else 2*_t()-l.renderingStartTime>js&&i!==536870912&&(n.flags|=128,c=!0,ol(l,!1),n.lanes=4194304);l.isBackwards?(f.sibling=n.child,n.child=f):(e=l.last,e!==null?e.sibling=f:n.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=_t(),e.sibling=null,i=Mt.current,N(Mt,c?i&1|2:i&1),Xe&&fi(n,l.treeForkCount),e):(bt(n),null);case 22:case 23:return kn(n),gc(),l=n.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(i&536870912)!==0&&(n.flags&128)===0&&(bt(n),n.subtreeFlags&6&&(n.flags|=8192)):bt(n),i=n.updateQueue,i!==null&&Ls(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==i&&(n.flags|=2048),e!==null&&P(_a),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),mi(It),bt(n),null;case 25:return null;case 30:return null}throw Error(s(156,n.tag))}function Ix(e,n){switch(tc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return mi(It),ge(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return xt(n),null;case 31:if(n.memoizedState!==null){if(kn(n),n.alternate===null)throw Error(s(340));xa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(kn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));xa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return P(Mt),null;case 4:return ge(),null;case 10:return mi(n.type),null;case 22:case 23:return kn(n),gc(),e!==null&&P(_a),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return mi(It),null;case 25:return null;default:return null}}function Jp(e,n){switch(tc(n),n.tag){case 3:mi(It),ge();break;case 26:case 27:case 5:xt(n);break;case 4:ge();break;case 31:n.memoizedState!==null&&kn(n);break;case 13:kn(n);break;case 19:P(Mt);break;case 10:mi(n.type);break;case 22:case 23:kn(n),gc(),e!==null&&P(_a);break;case 24:mi(It)}}function cl(e,n){try{var i=n.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var c=l.next;i=c;do{if((i.tag&e)===e){l=void 0;var f=i.create,x=i.inst;l=f(),x.destroy=l}i=i.next}while(i!==c)}}catch(_){rt(n,n.return,_)}}function qi(e,n,i){try{var l=n.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){var x=l.inst,_=x.destroy;if(_!==void 0){x.destroy=void 0,c=n;var M=i,G=_;try{G()}catch(Q){rt(c,M,Q)}}}l=l.next}while(l!==f)}}catch(Q){rt(n,n.return,Q)}}function Wp(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{qf(n,i)}catch(l){rt(e,e.return,l)}}}function em(e,n,i){i.props=wa(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){rt(e,n,l)}}function ul(e,n){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof i=="function"?e.refCleanup=i(l):i.current=l}}catch(c){rt(e,n,c)}}function ei(e,n){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(c){rt(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(c){rt(e,n,c)}else i.current=null}function tm(e){var n=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(c){rt(e,e.return,c)}}function Vc(e,n,i){try{var l=e.stateNode;iv(l,e.type,i,n),l[Xt]=n}catch(c){rt(e,e.return,c)}}function nm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zi(e.type)||e.tag===4}function Xc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,n,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(e),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=pe));else if(l!==4&&(l===27&&Zi(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(Zc(e,n,i),e=e.sibling;e!==null;)Zc(e,n,i),e=e.sibling}function Is(e,n,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(l!==4&&(l===27&&Zi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Is(e,n,i),e=e.sibling;e!==null;)Is(e,n,i),e=e.sibling}function im(e){var n=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);Pt(n,l,i),n[Ct]=e,n[Xt]=i}catch(f){rt(e,e.return,f)}}var xi=!1,Ut=!1,Qc=!1,am=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function zx(e,n){if(e=e.containerInfo,yu=no,e=gf(e),Ko(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var x=0,_=-1,M=-1,G=0,Q=0,ne=e,q=null;t:for(;;){for(var V;ne!==i||c!==0&&ne.nodeType!==3||(_=x+c),ne!==f||l!==0&&ne.nodeType!==3||(M=x+l),ne.nodeType===3&&(x+=ne.nodeValue.length),(V=ne.firstChild)!==null;)q=ne,ne=V;for(;;){if(ne===e)break t;if(q===i&&++G===c&&(_=x),q===f&&++Q===l&&(M=x),(V=ne.nextSibling)!==null)break;ne=q,q=ne.parentNode}ne=V}i=_===-1||M===-1?null:{start:_,end:M}}else i=null}i=i||{start:0,end:0}}else i=null;for(xu={focusedElem:e,selectionRange:i},no=!1,Ft=n;Ft!==null;)if(n=Ft,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ft=e;else for(;Ft!==null;){switch(n=Ft,f=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)c=e[i],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,i=n,c=f.memoizedProps,f=f.memoizedState,l=i.stateNode;try{var Ee=wa(i.type,c);e=l.getSnapshotBeforeUpdate(Ee,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(Oe){rt(i,i.return,Oe)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)_u(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_u(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=n.sibling,e!==null){e.return=n.return,Ft=e;break}Ft=n.return}}function rm(e,n,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Ei(e,i),l&4&&cl(5,i);break;case 1:if(Ei(e,i),l&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(x){rt(i,i.return,x)}else{var c=wa(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(x){rt(i,i.return,x)}}l&64&&Wp(i),l&512&&ul(i,i.return);break;case 3:if(Ei(e,i),l&64&&(e=i.updateQueue,e!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{qf(e,n)}catch(x){rt(i,i.return,x)}}break;case 27:n===null&&l&4&&im(i);case 26:case 5:Ei(e,i),n===null&&l&4&&tm(i),l&512&&ul(i,i.return);break;case 12:Ei(e,i);break;case 31:Ei(e,i),l&4&&om(e,i);break;case 13:Ei(e,i),l&4&&cm(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=$x.bind(null,i),dv(e,i))));break;case 22:if(l=i.memoizedState!==null||xi,!l){n=n!==null&&n.memoizedState!==null||Ut,c=xi;var f=Ut;xi=l,(Ut=n)&&!f?_i(e,i,(i.subtreeFlags&8772)!==0):Ei(e,i),xi=c,Ut=f}break;case 30:break;default:Ei(e,i)}}function lm(e){var n=e.alternate;n!==null&&(e.alternate=null,lm(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Lr(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Et=null,dn=!1;function vi(e,n,i){for(i=i.child;i!==null;)sm(e,n,i),i=i.sibling}function sm(e,n,i){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Gt,i)}catch{}switch(i.tag){case 26:Ut||ei(i,n),vi(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Ut||ei(i,n);var l=Et,c=dn;Zi(i.type)&&(Et=i.stateNode,dn=!1),vi(e,n,i),xl(i.stateNode),Et=l,dn=c;break;case 5:Ut||ei(i,n);case 6:if(l=Et,c=dn,Et=null,vi(e,n,i),Et=l,dn=c,Et!==null)if(dn)try{(Et.nodeType===9?Et.body:Et.nodeName==="HTML"?Et.ownerDocument.body:Et).removeChild(i.stateNode)}catch(f){rt(i,n,f)}else try{Et.removeChild(i.stateNode)}catch(f){rt(i,n,f)}break;case 18:Et!==null&&(dn?(e=Et,Wm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),yr(e)):Wm(Et,i.stateNode));break;case 4:l=Et,c=dn,Et=i.stateNode.containerInfo,dn=!0,vi(e,n,i),Et=l,dn=c;break;case 0:case 11:case 14:case 15:qi(2,i,n),Ut||qi(4,i,n),vi(e,n,i);break;case 1:Ut||(ei(i,n),l=i.stateNode,typeof l.componentWillUnmount=="function"&&em(i,n,l)),vi(e,n,i);break;case 21:vi(e,n,i);break;case 22:Ut=(l=Ut)||i.memoizedState!==null,vi(e,n,i),Ut=l;break;default:vi(e,n,i)}}function om(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{yr(e)}catch(i){rt(n,n.return,i)}}}function cm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{yr(e)}catch(i){rt(n,n.return,i)}}function Bx(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new am),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new am),n;default:throw Error(s(435,e.tag))}}function zs(e,n){var i=Bx(e);n.forEach(function(l){if(!i.has(l)){i.add(l);var c=Yx.bind(null,e,l);l.then(c,c)}})}function fn(e,n){var i=n.deletions;if(i!==null)for(var l=0;l<i.length;l++){var c=i[l],f=e,x=n,_=x;e:for(;_!==null;){switch(_.tag){case 27:if(Zi(_.type)){Et=_.stateNode,dn=!1;break e}break;case 5:Et=_.stateNode,dn=!1;break e;case 3:case 4:Et=_.stateNode.containerInfo,dn=!0;break e}_=_.return}if(Et===null)throw Error(s(160));sm(f,x,c),Et=null,dn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)um(n,e),n=n.sibling}var $n=null;function um(e,n){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fn(n,e),pn(e),l&4&&(qi(3,e,e.return),cl(3,e),qi(5,e,e.return));break;case 1:fn(n,e),pn(e),l&512&&(Ut||i===null||ei(i,i.return)),l&64&&xi&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var c=$n;if(fn(n,e),pn(e),l&512&&(Ut||i===null||ei(i,i.return)),l&4){var f=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[da]||f[Ct]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),Pt(f,l,i),f[Ct]=e,Dt(f),l=f;break e;case"link":var x=uh("link","href",c).get(l+(i.href||""));if(x){for(var _=0;_<x.length;_++)if(f=x[_],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){x.splice(_,1);break t}}f=c.createElement(l),Pt(f,l,i),c.head.appendChild(f);break;case"meta":if(x=uh("meta","content",c).get(l+(i.content||""))){for(_=0;_<x.length;_++)if(f=x[_],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){x.splice(_,1);break t}}f=c.createElement(l),Pt(f,l,i),c.head.appendChild(f);break;default:throw Error(s(468,l))}f[Ct]=e,Dt(f),l=f}e.stateNode=l}else dh(c,e.type,e.stateNode);else e.stateNode=ch(c,l,e.memoizedProps);else f!==l?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,l===null?dh(c,e.type,e.stateNode):ch(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Vc(e,e.memoizedProps,i.memoizedProps)}break;case 27:fn(n,e),pn(e),l&512&&(Ut||i===null||ei(i,i.return)),i!==null&&l&4&&Vc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(fn(n,e),pn(e),l&512&&(Ut||i===null||ei(i,i.return)),e.flags&32){c=e.stateNode;try{Me(c,"")}catch(Ee){rt(e,e.return,Ee)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Vc(e,c,i!==null?i.memoizedProps:c)),l&1024&&(Qc=!0);break;case 6:if(fn(n,e),pn(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(Ee){rt(e,e.return,Ee)}}break;case 3:if(Js=null,c=$n,$n=Zs(n.containerInfo),fn(n,e),$n=c,pn(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{yr(n.containerInfo)}catch(Ee){rt(e,e.return,Ee)}Qc&&(Qc=!1,dm(e));break;case 4:l=$n,$n=Zs(e.stateNode.containerInfo),fn(n,e),pn(e),$n=l;break;case 12:fn(n,e),pn(e);break;case 31:fn(n,e),pn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,zs(e,l)));break;case 13:fn(n,e),pn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Us=_t()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,zs(e,l)));break;case 22:c=e.memoizedState!==null;var M=i!==null&&i.memoizedState!==null,G=xi,Q=Ut;if(xi=G||c,Ut=Q||M,fn(n,e),Ut=Q,xi=G,pn(e),l&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(i===null||M||xi||Ut||Aa(e)),i=null,n=e;;){if(n.tag===5||n.tag===26){if(i===null){M=i=n;try{if(f=M.stateNode,c)x=f.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{_=M.stateNode;var ne=M.memoizedProps.style,q=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;_.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(Ee){rt(M,M.return,Ee)}}}else if(n.tag===6){if(i===null){M=n;try{M.stateNode.nodeValue=c?"":M.memoizedProps}catch(Ee){rt(M,M.return,Ee)}}}else if(n.tag===18){if(i===null){M=n;try{var V=M.stateNode;c?eh(V,!0):eh(M.stateNode,!1)}catch(Ee){rt(M,M.return,Ee)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,zs(e,i))));break;case 19:fn(n,e),pn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,zs(e,l)));break;case 30:break;case 21:break;default:fn(n,e),pn(e)}}function pn(e){var n=e.flags;if(n&2){try{for(var i,l=e.return;l!==null;){if(nm(l)){i=l;break}l=l.return}if(i==null)throw Error(s(160));switch(i.tag){case 27:var c=i.stateNode,f=Xc(e);Is(e,f,c);break;case 5:var x=i.stateNode;i.flags&32&&(Me(x,""),i.flags&=-33);var _=Xc(e);Is(e,_,x);break;case 3:case 4:var M=i.stateNode.containerInfo,G=Xc(e);Zc(e,G,M);break;default:throw Error(s(161))}}catch(Q){rt(e,e.return,Q)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function dm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;dm(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Ei(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)rm(e,n.alternate,n),n=n.sibling}function Aa(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:qi(4,n,n.return),Aa(n);break;case 1:ei(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&em(n,n.return,i),Aa(n);break;case 27:xl(n.stateNode);case 26:case 5:ei(n,n.return),Aa(n);break;case 22:n.memoizedState===null&&Aa(n);break;case 30:Aa(n);break;default:Aa(n)}e=e.sibling}}function _i(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var l=n.alternate,c=e,f=n,x=f.flags;switch(f.tag){case 0:case 11:case 15:_i(c,f,i),cl(4,f);break;case 1:if(_i(c,f,i),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(G){rt(l,l.return,G)}if(l=f,c=l.updateQueue,c!==null){var _=l.stateNode;try{var M=c.shared.hiddenCallbacks;if(M!==null)for(c.shared.hiddenCallbacks=null,c=0;c<M.length;c++)Gf(M[c],_)}catch(G){rt(l,l.return,G)}}i&&x&64&&Wp(f),ul(f,f.return);break;case 27:im(f);case 26:case 5:_i(c,f,i),i&&l===null&&x&4&&tm(f),ul(f,f.return);break;case 12:_i(c,f,i);break;case 31:_i(c,f,i),i&&x&4&&om(c,f);break;case 13:_i(c,f,i),i&&x&4&&cm(c,f);break;case 22:f.memoizedState===null&&_i(c,f,i),ul(f,f.return);break;case 30:break;default:_i(c,f,i)}n=n.sibling}}function Jc(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Zr(i))}function Wc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Zr(e))}function Yn(e,n,i,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)fm(e,n,i,l),n=n.sibling}function fm(e,n,i,l){var c=n.flags;switch(n.tag){case 0:case 11:case 15:Yn(e,n,i,l),c&2048&&cl(9,n);break;case 1:Yn(e,n,i,l);break;case 3:Yn(e,n,i,l),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Zr(e)));break;case 12:if(c&2048){Yn(e,n,i,l),e=n.stateNode;try{var f=n.memoizedProps,x=f.id,_=f.onPostCommit;typeof _=="function"&&_(x,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(M){rt(n,n.return,M)}}else Yn(e,n,i,l);break;case 31:Yn(e,n,i,l);break;case 13:Yn(e,n,i,l);break;case 23:break;case 22:f=n.stateNode,x=n.alternate,n.memoizedState!==null?f._visibility&2?Yn(e,n,i,l):dl(e,n):f._visibility&2?Yn(e,n,i,l):(f._visibility|=2,sr(e,n,i,l,(n.subtreeFlags&10256)!==0||!1)),c&2048&&Jc(x,n);break;case 24:Yn(e,n,i,l),c&2048&&Wc(n.alternate,n);break;default:Yn(e,n,i,l)}}function sr(e,n,i,l,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var f=e,x=n,_=i,M=l,G=x.flags;switch(x.tag){case 0:case 11:case 15:sr(f,x,_,M,c),cl(8,x);break;case 23:break;case 22:var Q=x.stateNode;x.memoizedState!==null?Q._visibility&2?sr(f,x,_,M,c):dl(f,x):(Q._visibility|=2,sr(f,x,_,M,c)),c&&G&2048&&Jc(x.alternate,x);break;case 24:sr(f,x,_,M,c),c&&G&2048&&Wc(x.alternate,x);break;default:sr(f,x,_,M,c)}n=n.sibling}}function dl(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,l=n,c=l.flags;switch(l.tag){case 22:dl(i,l),c&2048&&Jc(l.alternate,l);break;case 24:dl(i,l),c&2048&&Wc(l.alternate,l);break;default:dl(i,l)}n=n.sibling}}var fl=8192;function or(e,n,i){if(e.subtreeFlags&fl)for(e=e.child;e!==null;)pm(e,n,i),e=e.sibling}function pm(e,n,i){switch(e.tag){case 26:or(e,n,i),e.flags&fl&&e.memoizedState!==null&&Sv(i,$n,e.memoizedState,e.memoizedProps);break;case 5:or(e,n,i);break;case 3:case 4:var l=$n;$n=Zs(e.stateNode.containerInfo),or(e,n,i),$n=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=fl,fl=16777216,or(e,n,i),fl=l):or(e,n,i));break;default:or(e,n,i)}}function mm(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function pl(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var l=n[i];Ft=l,gm(l,e)}mm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)hm(e),e=e.sibling}function hm(e){switch(e.tag){case 0:case 11:case 15:pl(e),e.flags&2048&&qi(9,e,e.return);break;case 3:pl(e);break;case 12:pl(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Bs(e)):pl(e);break;default:pl(e)}}function Bs(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var l=n[i];Ft=l,gm(l,e)}mm(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:qi(8,n,n.return),Bs(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,Bs(n));break;default:Bs(n)}e=e.sibling}}function gm(e,n){for(;Ft!==null;){var i=Ft;switch(i.tag){case 0:case 11:case 15:qi(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Zr(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,Ft=l;else e:for(i=e;Ft!==null;){l=Ft;var c=l.sibling,f=l.return;if(lm(l),l===i){Ft=null;break e}if(c!==null){c.return=f,Ft=c;break e}Ft=f}}}var Ux={getCacheForType:function(e){var n=$t(It),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i},cacheSignal:function(){return $t(It).controller.signal}},jx=typeof WeakMap=="function"?WeakMap:Map,et=0,dt=null,Ge=null,Ye=0,at=0,Nn=null,Ki=!1,cr=!1,eu=!1,Si=0,wt=0,$i=0,Ca=0,tu=0,Tn=0,ur=0,ml=null,mn=null,nu=!1,Us=0,bm=0,js=1/0,Hs=null,Yi=null,Ht=0,Pi=null,dr=null,ki=0,iu=0,au=null,ym=null,hl=0,ru=null;function wn(){return(et&2)!==0&&Ye!==0?Ye&-Ye:z.T!==null?du():Ba()}function xm(){if(Tn===0)if((Ye&536870912)===0||Xe){var e=za;za<<=1,(za&3932160)===0&&(za=262144),Tn=e}else Tn=536870912;return e=Sn.current,e!==null&&(e.flags|=32),Tn}function hn(e,n,i){(e===dt&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(fr(e,0),Vi(e,Ye,Tn,!1)),ut(e,i),((et&2)===0||e!==dt)&&(e===dt&&((et&2)===0&&(Ca|=i),wt===4&&Vi(e,Ye,Tn,!1)),ti(e))}function vm(e,n,i){if((et&6)!==0)throw Error(s(327));var l=!i&&(n&127)===0&&(n&e.expiredLanes)===0||ee(e,n),c=l?Gx(e,n):su(e,n,!0),f=l;do{if(c===0){cr&&!l&&Vi(e,n,0,!1);break}else{if(i=e.current.alternate,f&&!Hx(i)){c=su(e,n,!1),f=!1;continue}if(c===2){if(f=n,e.errorRecoveryDisabledLanes&f)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){n=x;e:{var _=e;c=ml;var M=_.current.memoizedState.isDehydrated;if(M&&(fr(_,x).flags|=256),x=su(_,x,!1),x!==2){if(eu&&!M){_.errorRecoveryDisabledLanes|=f,Ca|=f,c=4;break e}f=mn,mn=c,f!==null&&(mn===null?mn=f:mn.push.apply(mn,f))}c=x}if(f=!1,c!==2)continue}}if(c===1){fr(e,0),Vi(e,n,0,!0);break}e:{switch(l=e,f=c,f){case 0:case 1:throw Error(s(345));case 4:if((n&4194048)!==n)break;case 6:Vi(l,n,Tn,!Ki);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((n&62914560)===n&&(c=Us+300-_t(),10<c)){if(Vi(l,n,Tn,!Ki),D(l,0,!0)!==0)break e;ki=n,l.timeoutHandle=Qm(Em.bind(null,l,i,mn,Hs,nu,n,Tn,Ca,ur,Ki,f,"Throttled",-0,0),c);break e}Em(l,i,mn,Hs,nu,n,Tn,Ca,ur,Ki,f,null,-0,0)}}break}while(!0);ti(e)}function Em(e,n,i,l,c,f,x,_,M,G,Q,ne,q,V){if(e.timeoutHandle=-1,ne=n.subtreeFlags,ne&8192||(ne&16785408)===16785408){ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pe},pm(n,f,ne);var Ee=(f&62914560)===f?Us-_t():(f&4194048)===f?bm-_t():0;if(Ee=kv(ne,Ee),Ee!==null){ki=f,e.cancelPendingCommit=Ee(Cm.bind(null,e,n,f,i,l,c,x,_,M,Q,ne,null,q,V)),Vi(e,f,x,!G);return}}Cm(e,n,f,i,l,c,x,_,M)}function Hx(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var c=i[l],f=c.getSnapshot;c=c.value;try{if(!En(f(),c))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Vi(e,n,i,l){n&=~tu,n&=~Ca,e.suspendedLanes|=n,e.pingedLanes&=~n,l&&(e.warmLanes|=n),l=e.expirationTimes;for(var c=n;0<c;){var f=31-tt(c),x=1<<f;l[f]=-1,c&=~x}i!==0&&ve(e,i,n)}function Fs(){return(et&6)===0?(gl(0),!1):!0}function lu(){if(Ge!==null){if(at===0)var e=Ge.return;else e=Ge,pi=va=null,_c(e),nr=null,Jr=0,e=Ge;for(;e!==null;)Jp(e.alternate,e),e=e.return;Ge=null}}function fr(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,lv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ki=0,lu(),dt=e,Ge=i=di(e.current,null),Ye=n,at=0,Nn=null,Ki=!1,cr=ee(e,n),eu=!1,ur=Tn=tu=Ca=$i=wt=0,mn=ml=null,nu=!1,(n&8)!==0&&(n|=n&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=n;0<l;){var c=31-tt(l),f=1<<c;n|=e[c],l&=~f}return Si=n,os(),i}function _m(e,n){Be=null,z.H=ll,n===tr||n===gs?(n=Uf(),at=3):n===uc?(n=Uf(),at=4):at=n===Uc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Nn=n,Ge===null&&(wt=1,Os(e,Dn(n,e.current)))}function Sm(){var e=Sn.current;return e===null?!0:(Ye&4194048)===Ye?Bn===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===Bn:!1}function km(){var e=z.H;return z.H=ll,e===null?ll:e}function Nm(){var e=z.A;return z.A=Ux,e}function Gs(){wt=4,Ki||(Ye&4194048)!==Ye&&Sn.current!==null||(cr=!0),($i&134217727)===0&&(Ca&134217727)===0||dt===null||Vi(dt,Ye,Tn,!1)}function su(e,n,i){var l=et;et|=2;var c=km(),f=Nm();(dt!==e||Ye!==n)&&(Hs=null,fr(e,n)),n=!1;var x=wt;e:do try{if(at!==0&&Ge!==null){var _=Ge,M=Nn;switch(at){case 8:lu(),x=6;break e;case 3:case 2:case 9:case 6:Sn.current===null&&(n=!0);var G=at;if(at=0,Nn=null,pr(e,_,M,G),i&&cr){x=0;break e}break;default:G=at,at=0,Nn=null,pr(e,_,M,G)}}Fx(),x=wt;break}catch(Q){_m(e,Q)}while(!0);return n&&e.shellSuspendCounter++,pi=va=null,et=l,z.H=c,z.A=f,Ge===null&&(dt=null,Ye=0,os()),x}function Fx(){for(;Ge!==null;)Tm(Ge)}function Gx(e,n){var i=et;et|=2;var l=km(),c=Nm();dt!==e||Ye!==n?(Hs=null,js=_t()+500,fr(e,n)):cr=ee(e,n);e:do try{if(at!==0&&Ge!==null){n=Ge;var f=Nn;t:switch(at){case 1:at=0,Nn=null,pr(e,n,f,1);break;case 2:case 9:if(zf(f)){at=0,Nn=null,wm(n);break}n=function(){at!==2&&at!==9||dt!==e||(at=7),ti(e)},f.then(n,n);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:zf(f)?(at=0,Nn=null,wm(n)):(at=0,Nn=null,pr(e,n,f,7));break;case 5:var x=null;switch(Ge.tag){case 26:x=Ge.memoizedState;case 5:case 27:var _=Ge;if(x?fh(x):_.stateNode.complete){at=0,Nn=null;var M=_.sibling;if(M!==null)Ge=M;else{var G=_.return;G!==null?(Ge=G,qs(G)):Ge=null}break t}}at=0,Nn=null,pr(e,n,f,5);break;case 6:at=0,Nn=null,pr(e,n,f,6);break;case 8:lu(),wt=6;break e;default:throw Error(s(462))}}qx();break}catch(Q){_m(e,Q)}while(!0);return pi=va=null,z.H=l,z.A=c,et=i,Ge!==null?0:(dt=null,Ye=0,os(),wt)}function qx(){for(;Ge!==null&&!Rr();)Tm(Ge)}function Tm(e){var n=Zp(e.alternate,e,Si);e.memoizedProps=e.pendingProps,n===null?qs(e):Ge=n}function wm(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=Kp(i,n,n.pendingProps,n.type,void 0,Ye);break;case 11:n=Kp(i,n,n.pendingProps,n.type.render,n.ref,Ye);break;case 5:_c(n);default:Jp(i,n),n=Ge=Nf(n,Si),n=Zp(i,n,Si)}e.memoizedProps=e.pendingProps,n===null?qs(e):Ge=n}function pr(e,n,i,l){pi=va=null,_c(n),nr=null,Jr=0;var c=n.return;try{if(Mx(e,c,n,i,Ye)){wt=1,Os(e,Dn(i,e.current)),Ge=null;return}}catch(f){if(c!==null)throw Ge=c,f;wt=1,Os(e,Dn(i,e.current)),Ge=null;return}n.flags&32768?(Xe||l===1?e=!0:cr||(Ye&536870912)!==0?e=!1:(Ki=e=!0,(l===2||l===9||l===3||l===6)&&(l=Sn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Am(n,e)):qs(n)}function qs(e){var n=e;do{if((n.flags&32768)!==0){Am(n,Ki);return}e=n.return;var i=Lx(n.alternate,n,Si);if(i!==null){Ge=i;return}if(n=n.sibling,n!==null){Ge=n;return}Ge=n=e}while(n!==null);wt===0&&(wt=5)}function Am(e,n){do{var i=Ix(e.alternate,e);if(i!==null){i.flags&=32767,Ge=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){Ge=e;return}Ge=e=i}while(e!==null);wt=6,Ge=null}function Cm(e,n,i,l,c,f,x,_,M){e.cancelPendingCommit=null;do Ks();while(Ht!==0);if((et&6)!==0)throw Error(s(327));if(n!==null){if(n===e.current)throw Error(s(177));if(f=n.lanes|n.childLanes,f|=Xo,_e(e,i,f,x,_,M),e===dt&&(Ge=dt=null,Ye=0),dr=n,Pi=e,ki=i,iu=f,au=c,ym=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Px(Ce,function(){return Lm(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=z.T,z.T=null,c=ie.p,ie.p=2,x=et,et|=4;try{zx(e,n,i)}finally{et=x,ie.p=c,z.T=l}}Ht=1,Om(),Mm(),Rm()}}function Om(){if(Ht===1){Ht=0;var e=Pi,n=dr,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=z.T,z.T=null;var l=ie.p;ie.p=2;var c=et;et|=4;try{um(n,e);var f=xu,x=gf(e.containerInfo),_=f.focusedElem,M=f.selectionRange;if(x!==_&&_&&_.ownerDocument&&hf(_.ownerDocument.documentElement,_)){if(M!==null&&Ko(_)){var G=M.start,Q=M.end;if(Q===void 0&&(Q=G),"selectionStart"in _)_.selectionStart=G,_.selectionEnd=Math.min(Q,_.value.length);else{var ne=_.ownerDocument||document,q=ne&&ne.defaultView||window;if(q.getSelection){var V=q.getSelection(),Ee=_.textContent.length,Oe=Math.min(M.start,Ee),ot=M.end===void 0?Oe:Math.min(M.end,Ee);!V.extend&&Oe>ot&&(x=ot,ot=Oe,Oe=x);var B=mf(_,Oe),L=mf(_,ot);if(B&&L&&(V.rangeCount!==1||V.anchorNode!==B.node||V.anchorOffset!==B.offset||V.focusNode!==L.node||V.focusOffset!==L.offset)){var F=ne.createRange();F.setStart(B.node,B.offset),V.removeAllRanges(),Oe>ot?(V.addRange(F),V.extend(L.node,L.offset)):(F.setEnd(L.node,L.offset),V.addRange(F))}}}}for(ne=[],V=_;V=V.parentNode;)V.nodeType===1&&ne.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ne.length;_++){var te=ne[_];te.element.scrollLeft=te.left,te.element.scrollTop=te.top}}no=!!yu,xu=yu=null}finally{et=c,ie.p=l,z.T=i}}e.current=n,Ht=2}}function Mm(){if(Ht===2){Ht=0;var e=Pi,n=dr,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=z.T,z.T=null;var l=ie.p;ie.p=2;var c=et;et|=4;try{rm(e,n.alternate,n)}finally{et=c,ie.p=l,z.T=i}}Ht=3}}function Rm(){if(Ht===4||Ht===3){Ht=0,La();var e=Pi,n=dr,i=ki,l=ym;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Ht=5:(Ht=0,dr=Pi=null,Dm(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Yi=null),li(i),n=n.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(Gt,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=z.T,c=ie.p,ie.p=2,z.T=null;try{for(var f=e.onRecoverableError,x=0;x<l.length;x++){var _=l[x];f(_.value,{componentStack:_.stack})}}finally{z.T=n,ie.p=c}}(ki&3)!==0&&Ks(),ti(e),c=e.pendingLanes,(i&261930)!==0&&(c&42)!==0?e===ru?hl++:(hl=0,ru=e):hl=0,gl(0)}}function Dm(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Zr(n)))}function Ks(){return Om(),Mm(),Rm(),Lm()}function Lm(){if(Ht!==5)return!1;var e=Pi,n=iu;iu=0;var i=li(ki),l=z.T,c=ie.p;try{ie.p=32>i?32:i,z.T=null,i=au,au=null;var f=Pi,x=ki;if(Ht=0,dr=Pi=null,ki=0,(et&6)!==0)throw Error(s(331));var _=et;if(et|=4,hm(f.current),fm(f,f.current,x,i),et=_,gl(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Gt,f)}catch{}return!0}finally{ie.p=c,z.T=l,Dm(e,n)}}function Im(e,n,i){n=Dn(i,n),n=Bc(e.stateNode,n,2),e=Hi(e,n,2),e!==null&&(ut(e,2),ti(e))}function rt(e,n,i){if(e.tag===3)Im(e,e,i);else for(;n!==null;){if(n.tag===3){Im(n,e,i);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Yi===null||!Yi.has(l))){e=Dn(i,e),i=zp(2),l=Hi(n,i,2),l!==null&&(Bp(i,l,n,e),ut(l,2),ti(l));break}}n=n.return}}function ou(e,n,i){var l=e.pingCache;if(l===null){l=e.pingCache=new jx;var c=new Set;l.set(n,c)}else c=l.get(n),c===void 0&&(c=new Set,l.set(n,c));c.has(i)||(eu=!0,c.add(i),e=Kx.bind(null,e,n,i),n.then(e,e))}function Kx(e,n,i){var l=e.pingCache;l!==null&&l.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,dt===e&&(Ye&i)===i&&(wt===4||wt===3&&(Ye&62914560)===Ye&&300>_t()-Us?(et&2)===0&&fr(e,0):tu|=i,ur===Ye&&(ur=0)),ti(e)}function zm(e,n){n===0&&(n=Le()),e=ba(e,n),e!==null&&(ut(e,n),ti(e))}function $x(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),zm(e,i)}function Yx(e,n){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(n),zm(e,i)}function Px(e,n){return ri(e,n)}var $s=null,mr=null,cu=!1,Ys=!1,uu=!1,Xi=0;function ti(e){e!==mr&&e.next===null&&(mr===null?$s=mr=e:mr=mr.next=e),Ys=!0,cu||(cu=!0,Xx())}function gl(e,n){if(!uu&&Ys){uu=!0;do for(var i=!1,l=$s;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var x=l.suspendedLanes,_=l.pingedLanes;f=(1<<31-tt(42|e)+1)-1,f&=c&~(x&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,Hm(l,f))}else f=Ye,f=D(l,l===dt?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||ee(l,f)||(i=!0,Hm(l,f));l=l.next}while(i);uu=!1}}function Vx(){Bm()}function Bm(){Ys=cu=!1;var e=0;Xi!==0&&rv()&&(e=Xi);for(var n=_t(),i=null,l=$s;l!==null;){var c=l.next,f=Um(l,n);f===0?(l.next=null,i===null?$s=c:i.next=c,c===null&&(mr=i)):(i=l,(e!==0||(f&3)!==0)&&(Ys=!0)),l=c}Ht!==0&&Ht!==5||gl(e),Xi!==0&&(Xi=0)}function Um(e,n){for(var i=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var x=31-tt(f),_=1<<x,M=c[x];M===-1?((_&i)===0||(_&l)!==0)&&(c[x]=he(_,n)):M<=n&&(e.expiredLanes|=_),f&=~_}if(n=dt,i=Ye,i=D(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===n&&(at===2||at===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&oa(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||ee(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(l!==null&&oa(l),li(i)){case 2:case 8:i=fe;break;case 32:i=Ce;break;case 268435456:i=Qe;break;default:i=Ce}return l=jm.bind(null,e),i=ri(i,l),e.callbackPriority=n,e.callbackNode=i,n}return l!==null&&l!==null&&oa(l),e.callbackPriority=2,e.callbackNode=null,2}function jm(e,n){if(Ht!==0&&Ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Ks()&&e.callbackNode!==i)return null;var l=Ye;return l=D(e,e===dt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(vm(e,l,n),Um(e,_t()),e.callbackNode!=null&&e.callbackNode===i?jm.bind(null,e):null)}function Hm(e,n){if(Ks())return null;vm(e,n,!0)}function Xx(){sv(function(){(et&6)!==0?ri(Z,Vx):Bm()})}function du(){if(Xi===0){var e=Wa;e===0&&(e=ca,ca<<=1,(ca&261888)===0&&(ca=256)),Xi=e}return Xi}function Fm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ri(""+e)}function Gm(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function Zx(e,n,i,l,c){if(n==="submit"&&i&&i.stateNode===c){var f=Fm((c[Xt]||null).action),x=l.submitter;x&&(n=(n=x[Xt]||null)?Fm(n.formAction):x.getAttribute("formAction"),n!==null&&(f=n,x=null));var _=new as("action","action",null,l,c);e.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Xi!==0){var M=x?Gm(c,x):new FormData(c);Mc(i,{pending:!0,data:M,method:c.method,action:f},null,M)}}else typeof f=="function"&&(_.preventDefault(),M=x?Gm(c,x):new FormData(c),Mc(i,{pending:!0,data:M,method:c.method,action:f},f,M))},currentTarget:c}]})}}for(var fu=0;fu<Vo.length;fu++){var pu=Vo[fu],Qx=pu.toLowerCase(),Jx=pu[0].toUpperCase()+pu.slice(1);Kn(Qx,"on"+Jx)}Kn(xf,"onAnimationEnd"),Kn(vf,"onAnimationIteration"),Kn(Ef,"onAnimationStart"),Kn("dblclick","onDoubleClick"),Kn("focusin","onFocus"),Kn("focusout","onBlur"),Kn(mx,"onTransitionRun"),Kn(hx,"onTransitionStart"),Kn(gx,"onTransitionCancel"),Kn(_f,"onTransitionEnd"),oe("onMouseEnter",["mouseout","mouseover"]),oe("onMouseLeave",["mouseout","mouseover"]),oe("onPointerEnter",["pointerout","pointerover"]),oe("onPointerLeave",["pointerout","pointerover"]),oi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),oi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),oi("onBeforeInput",["compositionend","keypress","textInput","paste"]),oi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),oi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),oi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bl="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(" "),Wx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(bl));function qm(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],c=l.event;l=l.listeners;e:{var f=void 0;if(n)for(var x=l.length-1;0<=x;x--){var _=l[x],M=_.instance,G=_.currentTarget;if(_=_.listener,M!==f&&c.isPropagationStopped())break e;f=_,c.currentTarget=G;try{f(c)}catch(Q){ss(Q)}c.currentTarget=null,f=M}else for(x=0;x<l.length;x++){if(_=l[x],M=_.instance,G=_.currentTarget,_=_.listener,M!==f&&c.isPropagationStopped())break e;f=_,c.currentTarget=G;try{f(c)}catch(Q){ss(Q)}c.currentTarget=null,f=M}}}}function qe(e,n){var i=n[Dr];i===void 0&&(i=n[Dr]=new Set);var l=e+"__bubble";i.has(l)||(Km(n,e,2,!1),i.add(l))}function mu(e,n,i){var l=0;n&&(l|=4),Km(i,e,l,n)}var Ps="_reactListening"+Math.random().toString(36).slice(2);function hu(e){if(!e[Ps]){e[Ps]=!0,Zl.forEach(function(i){i!=="selectionchange"&&(Wx.has(i)||mu(i,!1,e),mu(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ps]||(n[Ps]=!0,mu("selectionchange",!1,n))}}function Km(e,n,i,l){switch(xh(n)){case 2:var c=wv;break;case 8:c=Av;break;default:c=Ou}i=c.bind(null,n,i,e),c=void 0,!Io||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(n,i,{capture:!0,passive:c}):e.addEventListener(n,i,!0):c!==void 0?e.addEventListener(n,i,{passive:c}):e.addEventListener(n,i,!1)}function gu(e,n,i,l,c){var f=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var x=l.tag;if(x===3||x===4){var _=l.stateNode.containerInfo;if(_===c)break;if(x===4)for(x=l.return;x!==null;){var M=x.tag;if((M===3||M===4)&&x.stateNode.containerInfo===c)return;x=x.return}for(;_!==null;){if(x=nn(_),x===null)return;if(M=x.tag,M===5||M===6||M===26||M===27){l=f=x;continue e}_=_.parentNode}}l=l.return}es(function(){var G=f,Q=ze(i),ne=[];e:{var q=Sf.get(e);if(q!==void 0){var V=as,Ee=e;switch(e){case"keypress":if(ns(i)===0)break e;case"keydown":case"keyup":V=Yy;break;case"focusin":Ee="focus",V=jo;break;case"focusout":Ee="blur",V=jo;break;case"beforeblur":case"afterblur":V=jo;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Qd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Ly;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=Xy;break;case xf:case vf:case Ef:V=By;break;case _f:V=Qy;break;case"scroll":case"scrollend":V=Ry;break;case"wheel":V=Wy;break;case"copy":case"cut":case"paste":V=jy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Wd;break;case"toggle":case"beforetoggle":V=tx}var Oe=(n&4)!==0,ot=!Oe&&(e==="scroll"||e==="scrollend"),B=Oe?q!==null?q+"Capture":null:q;Oe=[];for(var L=G,F;L!==null;){var te=L;if(F=te.stateNode,te=te.tag,te!==5&&te!==26&&te!==27||F===null||B===null||(te=jr(L,B),te!=null&&Oe.push(yl(L,te,F))),ot)break;L=L.return}0<Oe.length&&(q=new V(q,Ee,null,i,Q),ne.push({event:q,listeners:Oe}))}}if((n&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",q&&i!==Se&&(Ee=i.relatedTarget||i.fromElement)&&(nn(Ee)||Ee[Ai]))break e;if((V||q)&&(q=Q.window===Q?Q:(q=Q.ownerDocument)?q.defaultView||q.parentWindow:window,V?(Ee=i.relatedTarget||i.toElement,V=G,Ee=Ee?nn(Ee):null,Ee!==null&&(ot=d(Ee),Oe=Ee.tag,Ee!==ot||Oe!==5&&Oe!==27&&Oe!==6)&&(Ee=null)):(V=null,Ee=G),V!==Ee)){if(Oe=Qd,te="onMouseLeave",B="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(Oe=Wd,te="onPointerLeave",B="onPointerEnter",L="pointer"),ot=V==null?q:Ci(V),F=Ee==null?q:Ci(Ee),q=new Oe(te,L+"leave",V,i,Q),q.target=ot,q.relatedTarget=F,te=null,nn(Q)===G&&(Oe=new Oe(B,L+"enter",Ee,i,Q),Oe.target=F,Oe.relatedTarget=ot,te=Oe),ot=te,V&&Ee)t:{for(Oe=ev,B=V,L=Ee,F=0,te=B;te;te=Oe(te))F++;te=0;for(var we=L;we;we=Oe(we))te++;for(;0<F-te;)B=Oe(B),F--;for(;0<te-F;)L=Oe(L),te--;for(;F--;){if(B===L||L!==null&&B===L.alternate){Oe=B;break t}B=Oe(B),L=Oe(L)}Oe=null}else Oe=null;V!==null&&$m(ne,q,V,Oe,!1),Ee!==null&&ot!==null&&$m(ne,ot,Ee,Oe,!0)}}e:{if(q=G?Ci(G):window,V=q.nodeName&&q.nodeName.toLowerCase(),V==="select"||V==="input"&&q.type==="file")var Je=of;else if(lf(q))if(cf)Je=dx;else{Je=cx;var ke=ox}else V=q.nodeName,!V||V.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?G&&Mi(G.elementType)&&(Je=of):Je=ux;if(Je&&(Je=Je(e,G))){sf(ne,Je,i,Q);break e}ke&&ke(e,q,G),e==="focusout"&&G&&q.type==="number"&&G.memoizedProps.value!=null&&Ga(q,"number",q.value)}switch(ke=G?Ci(G):window,e){case"focusin":(lf(ke)||ke.contentEditable==="true")&&($a=ke,$o=G,Pr=null);break;case"focusout":Pr=$o=$a=null;break;case"mousedown":Yo=!0;break;case"contextmenu":case"mouseup":case"dragend":Yo=!1,bf(ne,i,Q);break;case"selectionchange":if(px)break;case"keydown":case"keyup":bf(ne,i,Q)}var Ue;if(Fo)e:{switch(e){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else Ka?af(e,i)&&(Pe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Pe="onCompositionStart");Pe&&(ef&&i.locale!=="ko"&&(Ka||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&Ka&&(Ue=Xd()):(Di=Q,zo="value"in Di?Di.value:Di.textContent,Ka=!0)),ke=Vs(G,Pe),0<ke.length&&(Pe=new Jd(Pe,e,null,i,Q),ne.push({event:Pe,listeners:ke}),Ue?Pe.data=Ue:(Ue=rf(i),Ue!==null&&(Pe.data=Ue)))),(Ue=ix?ax(e,i):rx(e,i))&&(Pe=Vs(G,"onBeforeInput"),0<Pe.length&&(ke=new Jd("onBeforeInput","beforeinput",null,i,Q),ne.push({event:ke,listeners:Pe}),ke.data=Ue)),Zx(ne,e,G,i,Q)}qm(ne,n)})}function yl(e,n,i){return{instance:e,listener:n,currentTarget:i}}function Vs(e,n){for(var i=n+"Capture",l=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=jr(e,i),c!=null&&l.unshift(yl(e,c,f)),c=jr(e,n),c!=null&&l.push(yl(e,c,f))),e.tag===3)return l;e=e.return}return[]}function ev(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $m(e,n,i,l,c){for(var f=n._reactName,x=[];i!==null&&i!==l;){var _=i,M=_.alternate,G=_.stateNode;if(_=_.tag,M!==null&&M===l)break;_!==5&&_!==26&&_!==27||G===null||(M=G,c?(G=jr(i,f),G!=null&&x.unshift(yl(i,G,M))):c||(G=jr(i,f),G!=null&&x.push(yl(i,G,M)))),i=i.return}x.length!==0&&e.push({event:n,listeners:x})}var tv=/\r\n?/g,nv=/\u0000|\uFFFD/g;function Ym(e){return(typeof e=="string"?e:""+e).replace(tv,`
|
|
49
|
+
`).replace(nv,"")}function Pm(e,n){return n=Ym(n),Ym(e)===n}function st(e,n,i,l,c,f){switch(i){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||Me(e,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&Me(e,""+l);break;case"className":xn(e,"class",l);break;case"tabIndex":xn(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":xn(e,i,l);break;case"style":it(e,l,f);break;case"data":if(n!=="object"){xn(e,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Ri(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(i==="formAction"?(n!=="input"&&st(e,n,"name",c.name,c,null),st(e,n,"formEncType",c.formEncType,c,null),st(e,n,"formMethod",c.formMethod,c,null),st(e,n,"formTarget",c.formTarget,c,null)):(st(e,n,"encType",c.encType,c,null),st(e,n,"method",c.method,c,null),st(e,n,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Ri(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=pe);break;case"onScroll":l!=null&&qe("scroll",e);break;case"onScrollEnd":l!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(c.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=Ri(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Zt(e,"popover",l);break;case"xlinkActuate":on(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":on(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":on(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":on(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":on(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":on(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":on(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":on(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":on(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Zt(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=ci.get(i)||i,Zt(e,i,l))}}function bu(e,n,i,l,c,f){switch(i){case"style":it(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(c.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"children":typeof l=="string"?Me(e,l):(typeof l=="number"||typeof l=="bigint")&&Me(e,""+l);break;case"onScroll":l!=null&&qe("scroll",e);break;case"onScrollEnd":l!=null&&qe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=pe);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!fa.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(c=i.endsWith("Capture"),n=i.slice(2,c?i.length-7:void 0),f=e[Xt]||null,f=f!=null?f[i]:null,typeof f=="function"&&e.removeEventListener(n,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,l,c);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):Zt(e,i,l)}}}function Pt(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var l=!1,c=!1,f;for(f in i)if(i.hasOwnProperty(f)){var x=i[f];if(x!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:st(e,n,f,x,i,null)}}c&&st(e,n,"srcSet",i.srcSet,i,null),l&&st(e,n,"src",i.src,i,null);return;case"input":qe("invalid",e);var _=f=x=c=null,M=null,G=null;for(l in i)if(i.hasOwnProperty(l)){var Q=i[l];if(Q!=null)switch(l){case"name":c=Q;break;case"type":x=Q;break;case"checked":M=Q;break;case"defaultChecked":G=Q;break;case"value":f=Q;break;case"defaultValue":_=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(s(137,n));break;default:st(e,n,l,Q,i,null)}}pa(e,f,_,M,G,x,c,!1);return;case"select":qe("invalid",e),l=x=f=null;for(c in i)if(i.hasOwnProperty(c)&&(_=i[c],_!=null))switch(c){case"value":f=_;break;case"defaultValue":x=_;break;case"multiple":l=_;default:st(e,n,c,_,i,null)}n=f,i=x,e.multiple=!!l,n!=null?qt(e,!!l,n,!1):i!=null&&qt(e,!!l,i,!0);return;case"textarea":qe("invalid",e),f=c=l=null;for(x in i)if(i.hasOwnProperty(x)&&(_=i[x],_!=null))switch(x){case"value":l=_;break;case"defaultValue":c=_;break;case"children":f=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(s(91));break;default:st(e,n,x,_,i,null)}qa(e,l,c,f);return;case"option":for(M in i)if(i.hasOwnProperty(M)&&(l=i[M],l!=null))switch(M){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:st(e,n,M,l,i,null)}return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(l=0;l<bl.length;l++)qe(bl[l],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in i)if(i.hasOwnProperty(G)&&(l=i[G],l!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:st(e,n,G,l,i,null)}return;default:if(Mi(n)){for(Q in i)i.hasOwnProperty(Q)&&(l=i[Q],l!==void 0&&bu(e,n,Q,l,i,void 0));return}}for(_ in i)i.hasOwnProperty(_)&&(l=i[_],l!=null&&st(e,n,_,l,i,null))}function iv(e,n,i,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,x=null,_=null,M=null,G=null,Q=null;for(V in i){var ne=i[V];if(i.hasOwnProperty(V)&&ne!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":M=ne;default:l.hasOwnProperty(V)||st(e,n,V,null,l,ne)}}for(var q in l){var V=l[q];if(ne=i[q],l.hasOwnProperty(q)&&(V!=null||ne!=null))switch(q){case"type":f=V;break;case"name":c=V;break;case"checked":G=V;break;case"defaultChecked":Q=V;break;case"value":x=V;break;case"defaultValue":_=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(137,n));break;default:V!==ne&&st(e,n,q,V,l,ne)}}zr(e,x,_,M,G,Q,f,c);return;case"select":V=x=_=q=null;for(f in i)if(M=i[f],i.hasOwnProperty(f)&&M!=null)switch(f){case"value":break;case"multiple":V=M;default:l.hasOwnProperty(f)||st(e,n,f,null,l,M)}for(c in l)if(f=l[c],M=i[c],l.hasOwnProperty(c)&&(f!=null||M!=null))switch(c){case"value":q=f;break;case"defaultValue":_=f;break;case"multiple":x=f;default:f!==M&&st(e,n,c,f,l,M)}n=_,i=x,l=V,q!=null?qt(e,!!i,q,!1):!!l!=!!i&&(n!=null?qt(e,!!i,n,!0):qt(e,!!i,i?[]:"",!1));return;case"textarea":V=q=null;for(_ in i)if(c=i[_],i.hasOwnProperty(_)&&c!=null&&!l.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:st(e,n,_,null,l,c)}for(x in l)if(c=l[x],f=i[x],l.hasOwnProperty(x)&&(c!=null||f!=null))switch(x){case"value":q=c;break;case"defaultValue":V=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(s(91));break;default:c!==f&&st(e,n,x,c,l,f)}Jl(e,q,V);return;case"option":for(var Ee in i)if(q=i[Ee],i.hasOwnProperty(Ee)&&q!=null&&!l.hasOwnProperty(Ee))switch(Ee){case"selected":e.selected=!1;break;default:st(e,n,Ee,null,l,q)}for(M in l)if(q=l[M],V=i[M],l.hasOwnProperty(M)&&q!==V&&(q!=null||V!=null))switch(M){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:st(e,n,M,q,l,V)}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 Oe in i)q=i[Oe],i.hasOwnProperty(Oe)&&q!=null&&!l.hasOwnProperty(Oe)&&st(e,n,Oe,null,l,q);for(G in l)if(q=l[G],V=i[G],l.hasOwnProperty(G)&&q!==V&&(q!=null||V!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,n));break;default:st(e,n,G,q,l,V)}return;default:if(Mi(n)){for(var ot in i)q=i[ot],i.hasOwnProperty(ot)&&q!==void 0&&!l.hasOwnProperty(ot)&&bu(e,n,ot,void 0,l,q);for(Q in l)q=l[Q],V=i[Q],!l.hasOwnProperty(Q)||q===V||q===void 0&&V===void 0||bu(e,n,Q,q,l,V);return}}for(var B in i)q=i[B],i.hasOwnProperty(B)&&q!=null&&!l.hasOwnProperty(B)&&st(e,n,B,null,l,q);for(ne in l)q=l[ne],V=i[ne],!l.hasOwnProperty(ne)||q===V||q==null&&V==null||st(e,n,ne,q,l,V)}function Vm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function av(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var c=i[l],f=c.transferSize,x=c.initiatorType,_=c.duration;if(f&&_&&Vm(x)){for(x=0,_=c.responseEnd,l+=1;l<i.length;l++){var M=i[l],G=M.startTime;if(G>_)break;var Q=M.transferSize,ne=M.initiatorType;Q&&Vm(ne)&&(M=M.responseEnd,x+=Q*(M<_?1:(_-G)/(M-G)))}if(--l,n+=8*(f+x)/(c.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var yu=null,xu=null;function Xs(e){return e.nodeType===9?e:e.ownerDocument}function Xm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zm(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function vu(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Eu=null;function rv(){var e=window.event;return e&&e.type==="popstate"?e===Eu?!1:(Eu=e,!0):(Eu=null,!1)}var Qm=typeof setTimeout=="function"?setTimeout:void 0,lv=typeof clearTimeout=="function"?clearTimeout:void 0,Jm=typeof Promise=="function"?Promise:void 0,sv=typeof queueMicrotask=="function"?queueMicrotask:typeof Jm<"u"?function(e){return Jm.resolve(null).then(e).catch(ov)}:Qm;function ov(e){setTimeout(function(){throw e})}function Zi(e){return e==="head"}function Wm(e,n){var i=n,l=0;do{var c=i.nextSibling;if(e.removeChild(i),c&&c.nodeType===8)if(i=c.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(c),yr(n);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")xl(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,xl(i);for(var f=i.firstChild;f;){var x=f.nextSibling,_=f.nodeName;f[da]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=x}}else i==="body"&&xl(e.ownerDocument.body);i=c}while(i);yr(n)}function eh(e,n){var i=e;e=0;do{var l=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=l}while(i)}function _u(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":_u(i),Lr(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function cv(e,n,i,l){for(;e.nodeType===1;){var c=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[da])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Un(e.nextSibling),e===null)break}return null}function uv(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Un(e.nextSibling),e===null))return null;return e}function th(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Un(e.nextSibling),e===null))return null;return e}function Su(e){return e.data==="$?"||e.data==="$~"}function ku(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function dv(e,n){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||i.readyState!=="loading")n();else{var l=function(){n(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Un(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Nu=null;function nh(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return Un(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function ih(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return e;n--}else i!=="/$"&&i!=="/&"||n++}e=e.previousSibling}return null}function ah(e,n,i){switch(n=Xs(i),e){case"html":if(e=n.documentElement,!e)throw Error(s(452));return e;case"head":if(e=n.head,!e)throw Error(s(453));return e;case"body":if(e=n.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function xl(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Lr(e)}var jn=new Map,rh=new Set;function Zs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ni=ie.d;ie.d={f:fv,r:pv,D:mv,C:hv,L:gv,m:bv,X:xv,S:yv,M:vv};function fv(){var e=Ni.f(),n=Fs();return e||n}function pv(e){var n=si(e);n!==null&&n.tag===5&&n.type==="form"?_p(n):Ni.r(e)}var hr=typeof document>"u"?null:document;function lh(e,n,i){var l=hr;if(l&&typeof n=="string"&&n){var c=cn(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof i=="string"&&(c+='[crossorigin="'+i+'"]'),rh.has(c)||(rh.add(c),e={rel:e,crossOrigin:i,href:n},l.querySelector(c)===null&&(n=l.createElement("link"),Pt(n,"link",e),Dt(n),l.head.appendChild(n)))}}function mv(e){Ni.D(e),lh("dns-prefetch",e,null)}function hv(e,n){Ni.C(e,n),lh("preconnect",e,n)}function gv(e,n,i){Ni.L(e,n,i);var l=hr;if(l&&e&&n){var c='link[rel="preload"][as="'+cn(n)+'"]';n==="image"&&i&&i.imageSrcSet?(c+='[imagesrcset="'+cn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(c+='[imagesizes="'+cn(i.imageSizes)+'"]')):c+='[href="'+cn(e)+'"]';var f=c;switch(n){case"style":f=gr(e);break;case"script":f=br(e)}jn.has(f)||(e=b({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),jn.set(f,e),l.querySelector(c)!==null||n==="style"&&l.querySelector(vl(f))||n==="script"&&l.querySelector(El(f))||(n=l.createElement("link"),Pt(n,"link",e),Dt(n),l.head.appendChild(n)))}}function bv(e,n){Ni.m(e,n);var i=hr;if(i&&e){var l=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+cn(l)+'"][href="'+cn(e)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=br(e)}if(!jn.has(f)&&(e=b({rel:"modulepreload",href:e},n),jn.set(f,e),i.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(El(f)))return}l=i.createElement("link"),Pt(l,"link",e),Dt(l),i.head.appendChild(l)}}}function yv(e,n,i){Ni.S(e,n,i);var l=hr;if(l&&e){var c=Oi(l).hoistableStyles,f=gr(e);n=n||"default";var x=c.get(f);if(!x){var _={loading:0,preload:null};if(x=l.querySelector(vl(f)))_.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":n},i),(i=jn.get(f))&&Tu(e,i);var M=x=l.createElement("link");Dt(M),Pt(M,"link",e),M._p=new Promise(function(G,Q){M.onload=G,M.onerror=Q}),M.addEventListener("load",function(){_.loading|=1}),M.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Qs(x,n,l)}x={type:"stylesheet",instance:x,count:1,state:_},c.set(f,x)}}}function xv(e,n){Ni.X(e,n);var i=hr;if(i&&e){var l=Oi(i).hoistableScripts,c=br(e),f=l.get(c);f||(f=i.querySelector(El(c)),f||(e=b({src:e,async:!0},n),(n=jn.get(c))&&wu(e,n),f=i.createElement("script"),Dt(f),Pt(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function vv(e,n){Ni.M(e,n);var i=hr;if(i&&e){var l=Oi(i).hoistableScripts,c=br(e),f=l.get(c);f||(f=i.querySelector(El(c)),f||(e=b({src:e,async:!0,type:"module"},n),(n=jn.get(c))&&wu(e,n),f=i.createElement("script"),Dt(f),Pt(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function sh(e,n,i,l){var c=(c=K.current)?Zs(c):null;if(!c)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=gr(i.href),i=Oi(c).hoistableStyles,l=i.get(n),l||(l={type:"style",instance:null,count:0,state:null},i.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=gr(i.href);var f=Oi(c).hoistableStyles,x=f.get(e);if(x||(c=c.ownerDocument||c,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,x),(f=c.querySelector(vl(e)))&&!f._p&&(x.instance=f,x.state.loading=5),jn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},jn.set(e,i),f||Ev(c,e,i,x.state))),n&&l===null)throw Error(s(528,""));return x}if(n&&l!==null)throw Error(s(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=br(i),i=Oi(c).hoistableScripts,l=i.get(n),l||(l={type:"script",instance:null,count:0,state:null},i.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function gr(e){return'href="'+cn(e)+'"'}function vl(e){return'link[rel="stylesheet"]['+e+"]"}function oh(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Ev(e,n,i,l){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=1:(n=e.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=1}),n.addEventListener("error",function(){return l.loading|=2}),Pt(n,"link",i),Dt(n),e.head.appendChild(n))}function br(e){return'[src="'+cn(e)+'"]'}function El(e){return"script[async]"+e}function ch(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var l=e.querySelector('style[data-href~="'+cn(i.href)+'"]');if(l)return n.instance=l,Dt(l),l;var c=b({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Dt(l),Pt(l,"style",c),Qs(l,i.precedence,e),n.instance=l;case"stylesheet":c=gr(i.href);var f=e.querySelector(vl(c));if(f)return n.state.loading|=4,n.instance=f,Dt(f),f;l=oh(i),(c=jn.get(c))&&Tu(l,c),f=(e.ownerDocument||e).createElement("link"),Dt(f);var x=f;return x._p=new Promise(function(_,M){x.onload=_,x.onerror=M}),Pt(f,"link",l),n.state.loading|=4,Qs(f,i.precedence,e),n.instance=f;case"script":return f=br(i.src),(c=e.querySelector(El(f)))?(n.instance=c,Dt(c),c):(l=i,(c=jn.get(f))&&(l=b({},i),wu(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Dt(c),Pt(c,"link",l),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(l=n.instance,n.state.loading|=4,Qs(l,i.precedence,e));return n.instance}function Qs(e,n,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,x=0;x<l.length;x++){var _=l[x];if(_.dataset.precedence===n)f=_;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function Tu(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function wu(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Js=null;function uh(e,n,i){if(Js===null){var l=new Map,c=Js=new Map;c.set(i,l)}else c=Js,l=c.get(i),l||(l=new Map,c.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),c=0;c<i.length;c++){var f=i[c];if(!(f[da]||f[Ct]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var x=f.getAttribute(n)||"";x=e+x;var _=l.get(x);_?_.push(f):l.set(x,[f])}}return l}function dh(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function _v(e,n,i){if(i===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function fh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Sv(e,n,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var c=gr(l.href),f=n.querySelector(vl(c));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Ws.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=f,Dt(f);return}f=n.ownerDocument||n,l=oh(l),(c=jn.get(c))&&Tu(l,c),f=f.createElement("link"),Dt(f);var x=f;x._p=new Promise(function(_,M){x.onload=_,x.onerror=M}),Pt(f,"link",l),i.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Ws.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var Au=0;function kv(e,n){return e.stylesheets&&e.count===0&&to(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&to(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+n);0<e.imgBytes&&Au===0&&(Au=62500*av());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&to(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Au?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Ws(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)to(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var eo=null;function to(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,eo=new Map,n.forEach(Nv,e),eo=null,Ws.call(e))}function Nv(e,n){if(!(n.state.loading&4)){var i=eo.get(e);if(i)var l=i.get(null);else{i=new Map,eo.set(e,i);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var x=c[f];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(i.set(x.dataset.precedence,x),l=x)}l&&i.set(null,l)}c=n.instance,x=c.getAttribute("data-precedence"),f=i.get(x)||l,f===l&&i.set(null,c),i.set(x,c),this.count++,l=Ws.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var _l={$$typeof:I,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function Tv(e,n,i,l,c,f,x,_,M){this.tag=1,this.containerInfo=e,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=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function ph(e,n,i,l,c,f,x,_,M,G,Q,ne){return e=new Tv(e,n,i,x,M,G,Q,ne,_),n=1,f===!0&&(n|=24),f=_n(3,null,null,n),e.current=f,f.stateNode=e,n=sc(),n.refCount++,e.pooledCache=n,n.refCount++,f.memoizedState={element:l,isDehydrated:i,cache:n},dc(f),e}function mh(e){return e?(e=Va,e):Va}function hh(e,n,i,l,c,f){c=mh(c),l.context===null?l.context=c:l.pendingContext=c,l=ji(n),l.payload={element:i},f=f===void 0?null:f,f!==null&&(l.callback=f),i=Hi(e,l,n),i!==null&&(hn(i,e,n),el(i,e,n))}function gh(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function Cu(e,n){gh(e,n),(e=e.alternate)&&gh(e,n)}function bh(e){if(e.tag===13||e.tag===31){var n=ba(e,67108864);n!==null&&hn(n,e,67108864),Cu(e,67108864)}}function yh(e){if(e.tag===13||e.tag===31){var n=wn();n=vt(n);var i=ba(e,n);i!==null&&hn(i,e,n),Cu(e,n)}}var no=!0;function wv(e,n,i,l){var c=z.T;z.T=null;var f=ie.p;try{ie.p=2,Ou(e,n,i,l)}finally{ie.p=f,z.T=c}}function Av(e,n,i,l){var c=z.T;z.T=null;var f=ie.p;try{ie.p=8,Ou(e,n,i,l)}finally{ie.p=f,z.T=c}}function Ou(e,n,i,l){if(no){var c=Mu(l);if(c===null)gu(e,n,l,io,i),vh(e,l);else if(Ov(c,e,n,i,l))l.stopPropagation();else if(vh(e,l),n&4&&-1<Cv.indexOf(e)){for(;c!==null;){var f=si(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var x=sn(f.pendingLanes);if(x!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;x;){var M=1<<31-tt(x);_.entanglements[1]|=M,x&=~M}ti(f),(et&6)===0&&(js=_t()+500,gl(0))}}break;case 31:case 13:_=ba(f,2),_!==null&&hn(_,f,2),Fs(),Cu(f,2)}if(f=Mu(l),f===null&&gu(e,n,l,io,i),f===c)break;c=f}c!==null&&l.stopPropagation()}else gu(e,n,l,null,i)}}function Mu(e){return e=ze(e),Ru(e)}var io=null;function Ru(e){if(io=null,e=nn(e),e!==null){var n=d(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=u(n),e!==null)return e;e=null}else if(i===31){if(e=p(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return io=e,null}function xh(e){switch(e){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(Ia()){case Z:return 2;case fe:return 8;case Ce:case He:return 32;case Qe:return 268435456;default:return 32}default:return 32}}var Du=!1,Qi=null,Ji=null,Wi=null,Sl=new Map,kl=new Map,ea=[],Cv="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 vh(e,n){switch(e){case"focusin":case"focusout":Qi=null;break;case"dragenter":case"dragleave":Ji=null;break;case"mouseover":case"mouseout":Wi=null;break;case"pointerover":case"pointerout":Sl.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(n.pointerId)}}function Nl(e,n,i,l,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:i,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},n!==null&&(n=si(n),n!==null&&bh(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function Ov(e,n,i,l,c){switch(n){case"focusin":return Qi=Nl(Qi,e,n,i,l,c),!0;case"dragenter":return Ji=Nl(Ji,e,n,i,l,c),!0;case"mouseover":return Wi=Nl(Wi,e,n,i,l,c),!0;case"pointerover":var f=c.pointerId;return Sl.set(f,Nl(Sl.get(f)||null,e,n,i,l,c)),!0;case"gotpointercapture":return f=c.pointerId,kl.set(f,Nl(kl.get(f)||null,e,n,i,l,c)),!0}return!1}function Eh(e){var n=nn(e.target);if(n!==null){var i=d(n);if(i!==null){if(n=i.tag,n===13){if(n=u(i),n!==null){e.blockedOn=n,Ua(e.priority,function(){yh(i)});return}}else if(n===31){if(n=p(i),n!==null){e.blockedOn=n,Ua(e.priority,function(){yh(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ao(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=Mu(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);Se=l,i.target.dispatchEvent(l),Se=null}else return n=si(i),n!==null&&bh(n),e.blockedOn=i,!1;n.shift()}return!0}function _h(e,n,i){ao(e)&&i.delete(n)}function Mv(){Du=!1,Qi!==null&&ao(Qi)&&(Qi=null),Ji!==null&&ao(Ji)&&(Ji=null),Wi!==null&&ao(Wi)&&(Wi=null),Sl.forEach(_h),kl.forEach(_h)}function ro(e,n){e.blockedOn===n&&(e.blockedOn=null,Du||(Du=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mv)))}var lo=null;function Sh(e){lo!==e&&(lo=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){lo===e&&(lo=null);for(var n=0;n<e.length;n+=3){var i=e[n],l=e[n+1],c=e[n+2];if(typeof l!="function"){if(Ru(l||i)===null)continue;break}var f=si(i);f!==null&&(e.splice(n,3),n-=3,Mc(f,{pending:!0,data:c,method:i.method,action:l},l,c))}}))}function yr(e){function n(M){return ro(M,e)}Qi!==null&&ro(Qi,e),Ji!==null&&ro(Ji,e),Wi!==null&&ro(Wi,e),Sl.forEach(n),kl.forEach(n);for(var i=0;i<ea.length;i++){var l=ea[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ea.length&&(i=ea[0],i.blockedOn===null);)Eh(i),i.blockedOn===null&&ea.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var c=i[l],f=i[l+1],x=c[Xt]||null;if(typeof f=="function")x||Sh(i);else if(x){var _=null;if(f&&f.hasAttribute("formAction")){if(c=f,x=f[Xt]||null)_=x.formAction;else if(Ru(c)!==null)continue}else _=x.action;typeof _=="function"?i[l+1]=_:(i.splice(l,3),l-=3),Sh(i)}}}function kh(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(x){return c=x})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function Lu(e){this._internalRoot=e}so.prototype.render=Lu.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(s(409));var i=n.current,l=wn();hh(i,l,e,n,null,null)},so.prototype.unmount=Lu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;hh(e.current,2,null,e,null,null),Fs(),n[Ai]=null}};function so(e){this._internalRoot=e}so.prototype.unstable_scheduleHydration=function(e){if(e){var n=Ba();e={blockedOn:null,target:e,priority:n};for(var i=0;i<ea.length&&n!==0&&n<ea[i].priority;i++);ea.splice(i,0,e),i===0&&Eh(e)}};var Nh=a.version;if(Nh!=="19.2.4")throw Error(s(527,Nh,"19.2.4"));ie.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=m(n),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Rv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oo.isDisabled&&oo.supportsFiber)try{Gt=oo.inject(Rv),Nt=oo}catch{}}return wl.createRoot=function(e,n){if(!o(e))throw Error(s(299));var i=!1,l="",c=Rp,f=Dp,x=Lp;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError)),n=ph(e,1,!1,null,null,i,l,null,c,f,x,kh),e[Ai]=n.current,hu(e),new Lu(n)},wl.hydrateRoot=function(e,n,i){if(!o(e))throw Error(s(299));var l=!1,c="",f=Rp,x=Dp,_=Lp,M=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError),i.formState!==void 0&&(M=i.formState)),n=ph(e,1,!0,n,i??null,l,c,M,f,x,_,kh),n.context=mh(null),i=n.current,l=wn(),l=vt(l),c=ji(l),c.callback=null,Hi(i,c,l),i=l,n.current.lanes=i,ut(n,i),ti(n),e[Ai]=n.current,hu(e),new so(n)},wl.version="19.2.4",wl}var Ih;function $v(){if(Ih)return Bu.exports;Ih=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),Bu.exports=Kv(),Bu.exports}var Yv=$v();const Pv=Gl(Yv),wd={user:null,activeView:"messages",agents:[],selectedAgentId:null,selectedSessionKey:null,channels:[],selectedChannelId:null,sessions:[],selectedSessionId:null,tasks:[],selectedTaskId:null,jobs:[],selectedJobId:null,messages:[],threadMessages:[],activeThreadId:null,threadReplyCounts:{},openclawConnected:!1,sessionModel:null,wsConnected:!1,models:[],defaultModel:null,streamingRunId:null,streamingSessionKey:null,streamingThreadId:null,cronTasks:[],selectedCronTaskId:null,cronJobs:[],selectedCronJobId:null};function Vv(t,a){switch(a.type){case"SET_USER":return{...t,user:a.user};case"SET_ACTIVE_VIEW":return{...t,activeView:a.view};case"SET_AGENTS":return{...t,agents:a.agents};case"SELECT_AGENT":return{...t,selectedAgentId:a.agentId,selectedSessionKey:a.sessionKey,sessions:[],selectedSessionId:null,messages:[],jobs:[],selectedJobId:null,activeThreadId:null,threadMessages:[]};case"SET_CHANNELS":return{...t,channels:a.channels};case"SELECT_CHANNEL":return{...t,selectedChannelId:a.channelId,sessions:[],selectedSessionId:null,tasks:[],selectedTaskId:null,jobs:[],selectedJobId:null,messages:[]};case"SET_SESSIONS":return{...t,sessions:a.sessions};case"SELECT_SESSION":return{...t,selectedSessionId:a.sessionId,selectedSessionKey:a.sessionKey??t.selectedSessionKey,messages:[],activeThreadId:null,threadMessages:[]};case"ADD_SESSION":return{...t,sessions:[...t.sessions,a.session]};case"REMOVE_SESSION":return{...t,sessions:t.sessions.filter(r=>r.id!==a.sessionId),...t.selectedSessionId===a.sessionId?{selectedSessionId:null,selectedSessionKey:null,messages:[]}:{}};case"RENAME_SESSION":return{...t,sessions:t.sessions.map(r=>r.id===a.sessionId?{...r,name:a.name}:r)};case"SET_TASKS":return{...t,tasks:a.tasks};case"SELECT_TASK":{const r=a.sessionKey??t.selectedSessionKey,s=r!==t.selectedSessionKey;return{...t,selectedTaskId:a.taskId,selectedSessionKey:r,messages:s?[]:t.messages,jobs:[],selectedJobId:null}}case"SET_JOBS":return{...t,jobs:a.jobs};case"SELECT_JOB":return{...t,selectedJobId:a.jobId,selectedSessionKey:a.sessionKey??t.selectedSessionKey,messages:[]};case"ADD_JOB":return{...t,jobs:[a.job,...t.jobs]};case"ADD_MESSAGE":{const r=t.messages[t.messages.length-1];return a.message.sender==="agent"&&(r!=null&&r.isStreaming)?{...t,streamingRunId:null,streamingSessionKey:null,messages:[...t.messages.slice(0,-1),{...a.message,isStreaming:!1}]}:{...t,messages:[...t.messages,a.message]}}case"SET_MESSAGES":return{...t,messages:a.messages,...a.replyCounts?{threadReplyCounts:{...t.threadReplyCounts,...a.replyCounts}}:{}};case"OPEN_THREAD":return{...t,activeThreadId:a.threadId,threadMessages:a.messages,threadReplyCounts:{...t.threadReplyCounts,...a.messages.length>0?{[a.threadId]:a.messages.length}:{}}};case"CLOSE_THREAD":return{...t,activeThreadId:null,threadMessages:[]};case"ADD_THREAD_MESSAGE":{const r=a.message.threadId??t.activeThreadId,s=!!(r&&r===t.activeThreadId);let o=t.threadMessages,d={};if(s){const p=t.threadMessages[t.threadMessages.length-1];a.message.sender==="agent"&&(p!=null&&p.isStreaming)?(o=[...t.threadMessages.slice(0,-1),{...a.message,isStreaming:!1}],d={streamingRunId:null,streamingSessionKey:null,streamingThreadId:null}):o=[...t.threadMessages,a.message]}const u={...t.threadReplyCounts};return r&&(s?u[r]=o.length:u[r]=(u[r]??0)+1),{...t,...d,threadMessages:o,threadReplyCounts:u}}case"SET_OPENCLAW_CONNECTED":return{...t,openclawConnected:a.connected,defaultModel:a.defaultModel??t.defaultModel};case"SET_SESSION_MODEL":return{...t,sessionModel:a.model};case"SET_WS_CONNECTED":return{...t,wsConnected:a.connected};case"SET_MODELS":return{...t,models:a.models};case"SET_DEFAULT_MODEL":return{...t,defaultModel:a.model};case"RESOLVE_ACTION":return{...t,messages:t.messages.map(r=>r.id===a.messageId?{...r,resolvedActions:{...r.resolvedActions,[a.promptHash]:{value:a.value,label:a.label}}}:r)};case"STREAM_START":{const r={id:`stream_${a.runId}`,sender:"agent",text:"",timestamp:Date.now(),isStreaming:!0},s=!!a.threadId;return{...t,streamingRunId:a.runId,streamingSessionKey:a.sessionKey,streamingThreadId:a.threadId??null,...s?{threadMessages:[...t.threadMessages,r]}:{messages:[...t.messages,r]}}}case"STREAM_CHUNK":{if(t.streamingRunId!==a.runId)return t;const r=`stream_${a.runId}`;return t.streamingThreadId?{...t,threadMessages:t.threadMessages.map(s=>s.id===r?{...s,text:a.text}:s)}:{...t,messages:t.messages.map(s=>s.id===r?{...s,text:a.text}:s)}}case"STREAM_END":return t.streamingRunId&&t.streamingRunId!==a.runId?t:{...t,streamingRunId:null,streamingSessionKey:null,streamingThreadId:null};case"SET_CRON_TASKS":return{...t,cronTasks:a.cronTasks};case"MERGE_SCAN_DATA":{const r=new Map(a.scanTasks.map(d=>[d.cronJobId,d])),s=t.cronTasks.map(d=>{const u=d.openclawCronJobId?r.get(d.openclawCronJobId):null;return u?{...d,schedule:u.schedule||null,instructions:u.instructions||null,model:u.model||null,enabled:u.enabled}:d}),o=t.tasks.map(d=>{const u=d.openclawCronJobId?r.get(d.openclawCronJobId):null;return u?{...d,schedule:u.schedule||null,instructions:u.instructions||null,model:u.model||null,enabled:u.enabled}:d});return{...t,cronTasks:s,tasks:o}}case"UPDATE_CRON_TASK":return{...t,cronTasks:t.cronTasks.map(r=>r.id===a.taskId?{...r,...a.updates}:r),tasks:t.tasks.map(r=>r.id===a.taskId?{...r,...a.updates}:r)};case"SELECT_CRON_TASK":return t.selectedCronTaskId===a.taskId?t:{...t,selectedCronTaskId:a.taskId,cronJobs:[],selectedCronJobId:null,messages:[],selectedSessionKey:null};case"SET_CRON_JOBS":return{...t,cronJobs:a.cronJobs};case"SELECT_CRON_JOB":return{...t,selectedCronJobId:a.jobId,selectedSessionKey:a.sessionKey??t.selectedSessionKey,messages:[]};case"ADD_CRON_JOB":return{...t,cronJobs:[a.job,...t.cronJobs]};case"UPDATE_CRON_JOB":return t.cronJobs.some(s=>s.id===a.job.id)?{...t,cronJobs:t.cronJobs.map(s=>{var d;if(s.id!==a.job.id)return s;const o=s.summary&&s.summary.length>(((d=a.job.summary)==null?void 0:d.length)||0)?s.summary:a.job.summary;return{...s,...a.job,summary:o}})}:{...t,cronJobs:[a.job,...t.cronJobs]};case"APPEND_JOB_OUTPUT":{const r=s=>s.map(o=>o.id===a.jobId?{...o,summary:a.text}:o);return{...t,jobs:r(t.jobs),cronJobs:r(t.cronJobs)}}case"LOGOUT":return{...wd};default:return t}}const od=X.createContext(wd),cd=X.createContext(()=>{});function ra(){return X.useContext(od)}function la(){return X.useContext(cd)}const zh=500;let Xv=1;const wr=[],Eo=new Set;function vr(t,a,r,s){const o={id:Xv++,ts:Date.now(),level:t,tag:a,message:r,detail:s!==void 0?typeof s=="string"?s:JSON.stringify(s,null,2):void 0};wr.push(o),wr.length>zh&&wr.splice(0,wr.length-zh);for(const d of Eo)d()}function Zv(){return wr}function Qv(){wr.length=0;for(const t of Eo)t()}function Jv(t){return Eo.add(t),()=>Eo.delete(t)}const de={info:(t,a,r)=>vr("info",t,a,r),warn:(t,a,r)=>vr("warn",t,a,r),error:(t,a,r)=>vr("error",t,a,r),wsIn:(t,a,r)=>vr("ws-in",t,a,r),wsOut:(t,a,r)=>vr("ws-out",t,a,r),api:(t,a,r)=>vr("api",t,a,r)},Wv="/api";let _o=localStorage.getItem("botschat_token");function Ad(t){_o=t,t?localStorage.setItem("botschat_token",t):localStorage.removeItem("botschat_token")}function Bh(){return _o}async function yt(t,a,r){const s=`${t} ${a}`;de.api("API",`→ ${s}`,r);const o={"Content-Type":"application/json"};_o&&(o.Authorization=`Bearer ${_o}`);const d=performance.now();let u;try{u=await fetch(`${Wv}${a}`,{method:t,headers:o,body:r?JSON.stringify(r):void 0,cache:"no-store"})}catch(m){const g=Math.round(performance.now()-d);throw de.error("API",`✗ ${s} — network error (${g}ms)`,String(m)),m}const p=Math.round(performance.now()-d);if(!u.ok){const g=(await u.json().catch(()=>({error:u.statusText}))).error??`HTTP ${u.status}`;throw de.error("API",`✗ ${s} — ${u.status} (${p}ms): ${g}`),new Error(g)}const h=await u.json();return de.api("API",`✓ ${s} — ${u.status} (${p}ms)`,h),h}const ud={register:(t,a,r)=>yt("POST","/auth/register",{email:t,password:a,displayName:r}),login:(t,a)=>yt("POST","/auth/login",{email:t,password:a}),me:()=>yt("GET","/me")},e0={updateSettings:t=>yt("PATCH","/me",t)},t0={list:()=>yt("GET","/models")},jl={list:()=>yt("GET","/agents")},aa={list:()=>yt("GET","/channels"),get:t=>yt("GET",`/channels/${t}`),create:t=>yt("POST","/channels",t),update:(t,a)=>yt("PATCH",`/channels/${t}`,a),delete:t=>yt("DELETE",`/channels/${t}`)},Ll={list:t=>yt("GET",`/channels/${t}/sessions`),create:(t,a)=>yt("POST",`/channels/${t}/sessions`,{name:a}),rename:(t,a,r)=>yt("PATCH",`/channels/${t}/sessions/${a}`,{name:r}),delete:(t,a)=>yt("DELETE",`/channels/${t}/sessions/${a}`)},Hn={list:t=>yt("GET",`/channels/${t}/tasks`),listAll:(t="background")=>yt("GET",`/tasks?kind=${t}`),scanData:()=>yt("GET","/task-scan"),create:(t,a)=>yt("POST",`/channels/${t}/tasks`,a),update:(t,a,r)=>yt("PATCH",`/channels/${t}/tasks/${a}`,r),delete:(t,a)=>yt("DELETE",`/channels/${t}/tasks/${a}`),run:(t,a)=>yt("POST",`/channels/${t}/tasks/${a}/run`)},dd={list:(t,a)=>yt("GET",`/channels/${t}/tasks/${a}/jobs`),listByTask:t=>yt("GET",`/tasks/${t}/jobs`)},Vg={list:(t,a,r)=>yt("GET",`/messages/${t}?sessionKey=${encodeURIComponent(a)}${r?`&threadId=${encodeURIComponent(r)}`:""}`)};function Cd({value:t,onChange:a,models:r,disabled:s,placeholder:o="Select model...",compact:d}){const p=!r.find(A=>A.id===t)&&t?r.find(A=>A.name===t):null,h=p?p.id:t,m=!h||r.some(A=>A.id===h);X.useEffect(()=>{p&&t!==p.id&&a(p.id)},[p,t,a]);const g=X.useRef(null),[b,E]=X.useState(void 0),v=h||o,k=X.useCallback(()=>{if(!d||!g.current)return;const A=getComputedStyle(g.current),S=document.createElement("canvas").getContext("2d");if(!S)return;S.font=`${A.fontSize} ${A.fontFamily}`;const j=S.measureText(v).width,I=parseFloat(A.paddingLeft)||6,Y=parseFloat(A.paddingRight)||6;E(Math.ceil(j)+I+Y+22)},[d,v]);return X.useEffect(()=>{k()},[k]),y.jsxs("select",{ref:g,value:h,onChange:A=>a(A.target.value),disabled:s,className:`rounded-sm focus:outline-none ${d?"text-caption py-0.5 px-1.5":"text-body py-1.5 px-2.5"}`,style:{background:d?"transparent":"var(--bg-hover)",color:h?"var(--text-primary)":"var(--text-muted)",border:d?"1px solid transparent":"1px solid var(--border)",cursor:s?"not-allowed":"pointer",opacity:s?.5:1,width:d&&b?b:void 0,maxWidth:"100%",fontFamily:"var(--font-mono)",textOverflow:"ellipsis",overflow:"hidden"},children:[!h&&y.jsx("option",{value:"",children:o}),h&&!m&&y.jsx("option",{value:h,children:h}),r.map(A=>y.jsx("option",{value:A.id,children:A.id},A.id))]})}class n0{constructor(a){xr(this,"ws",null);xr(this,"reconnectTimer",null);xr(this,"backoffMs",1e3);xr(this,"intentionalClose",!1);xr(this,"_connected",!1);this.opts=a}get connected(){return this._connected}connect(){this.intentionalClose=!1;const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/ws/${this.opts.userId}/${this.opts.sessionId}`;de.info("WS",`Connecting to ${r}`),this.ws=new WebSocket(r),this.ws.onopen=()=>{de.info("WS","Socket opened, sending auth"),this.ws.send(JSON.stringify({type:"auth",token:this.opts.token}))},this.ws.onmessage=s=>{try{const o=JSON.parse(s.data);o.type==="auth.ok"?(de.info("WS","Auth OK — connected"),this.backoffMs=1e3,this._connected=!0,this.opts.onStatusChange(!0)):this.opts.onMessage(o)}catch{de.warn("WS","Failed to parse incoming message",s.data)}},this.ws.onclose=s=>{this._connected=!1,this.opts.onStatusChange(!1),this.intentionalClose?de.info("WS","Connection closed (intentional)"):(de.warn("WS",`Connection closed (code=${s.code}), reconnecting in ${this.backoffMs}ms`),this.reconnectTimer=setTimeout(()=>{this.backoffMs=Math.min(this.backoffMs*2,3e4),this.connect()},this.backoffMs))},this.ws.onerror=()=>{de.error("WS","WebSocket error (close event will follow)")}}send(a){var r,s;((r=this.ws)==null?void 0:r.readyState)===WebSocket.OPEN?this.ws.send(JSON.stringify(a)):de.warn("WS",`Cannot send — socket not open (readyState=${(s=this.ws)==null?void 0:s.readyState})`,a)}disconnect(){var a;this.intentionalClose=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(a=this.ws)==null||a.close(),this.ws=null,this._connected=!1,this.opts.onStatusChange(!1)}}function i0({onToggleTheme:t,onOpenSettings:a,theme:r}){var h,m,g,b,E,v,k,A;const s=ra(),o=la(),d=()=>{var O;de.info("Auth",`Logout — user ${(O=s.user)==null?void 0:O.email}`),Ad(null),o({type:"LOGOUT"})},u=O=>{de.info("Nav",`Switch view → ${O}`),o({type:"SET_ACTIVE_VIEW",view:O})},p=((g=(m=(h=s.user)==null?void 0:h.displayName)==null?void 0:m[0])==null?void 0:g.toUpperCase())??((v=(E=(b=s.user)==null?void 0:b.email)==null?void 0:E[0])==null?void 0:v.toUpperCase())??"?";return y.jsxs("div",{className:"flex flex-col items-center py-3 gap-2 h-full",style:{width:68,background:"var(--bg-primary)",borderRight:"1px solid var(--border)"},children:[y.jsx("button",{className:"w-9 h-9 rounded-lg flex items-center justify-center text-white font-bold text-sm hover:rounded-xl transition-all",style:{background:"#1264A3"},title:"BotsChat",children:"BC"}),y.jsx("div",{className:"w-8 border-t my-1",style:{borderColor:"var(--sidebar-divider)"}}),y.jsx(Al,{label:"Home",active:!1,icon:y.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12l8.954-8.955a1.126 1.126 0 011.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})})}),y.jsx(Al,{label:"Messages",active:s.activeView==="messages",onClick:()=>u("messages"),icon:y.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 01-.825-.242m9.345-8.334a2.126 2.126 0 00-.476-.095 48.64 48.64 0 00-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0011.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"})})}),y.jsx(Al,{label:"Automations",active:s.activeView==="automations",onClick:()=>u("automations"),icon:y.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})})}),y.jsx("div",{className:"flex-1"}),y.jsx(Al,{label:"Settings",active:!1,onClick:a,icon:y.jsxs("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),y.jsx(Al,{label:r==="dark"?"Light mode":"Dark mode",active:!1,onClick:t,icon:r==="dark"?y.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"})}):y.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"})})}),y.jsx("button",{onClick:d,className:"w-7 h-7 rounded flex items-center justify-center text-xs font-bold text-white mt-1",style:{background:"#9B59B6"},title:`${((k=s.user)==null?void 0:k.displayName)??((A=s.user)==null?void 0:A.email)} (click to logout)`,children:p})]})}function Al({label:t,active:a,icon:r,onClick:s}){return y.jsxs("div",{className:"relative flex items-center justify-center",children:[a&&y.jsx("div",{className:"absolute left-0 w-[3px] h-5 rounded-r-sm",style:{left:-4,background:"var(--text-sidebar-active)"}}),y.jsx("button",{onClick:s,className:`w-9 h-9 rounded-lg flex items-center justify-center transition-colors ${a?"text-[--text-sidebar-active]":"text-[--text-sidebar] hover:text-[--text-sidebar-active]"}`,style:a?{background:"var(--sidebar-hover)"}:void 0,onMouseEnter:o=>{a||(o.currentTarget.style.background="var(--sidebar-hover)")},onMouseLeave:o=>{a||(o.currentTarget.style.background="")},title:t,"aria-label":t,children:r})]})}function a0(){const t=ra(),a=la(),[r,s]=X.useState(!1),[o,d]=X.useState(""),[u,p]=X.useState(""),[h,m]=X.useState(!0),g=async()=>{if(o.trim()){de.info("Channel",`Creating channel: "${o}"${u?` (${u})`:""}`);try{await aa.create({name:o,description:u});const{agents:S}=await jl.list(),{channels:j}=await aa.list();a({type:"SET_AGENTS",agents:S}),a({type:"SET_CHANNELS",channels:j});const I=S.find(Y=>Y.name===o.trim());if(I){de.info("Channel",`Channel created → agent ${I.id}, auto-selected`),a({type:"SELECT_AGENT",agentId:I.id,sessionKey:I.sessionKey});try{localStorage.setItem("botschat_last_agent",I.id)}catch{}}s(!1),d(""),p("")}catch(S){de.error("Channel",`Failed to create channel: ${S}`)}}},[b,E]=X.useState(null),v=(S,j)=>{if(t.selectedAgentId===S)return;const I=t.agents.find(Y=>Y.id===S);de.info("Channel",`Selected channel: ${(I==null?void 0:I.name)??S} (session=${j})`),a({type:"SELECT_AGENT",agentId:S,sessionKey:j});try{localStorage.setItem("botschat_last_agent",S)}catch{}},k=async S=>{const j=t.channels.find(I=>I.id===S);de.info("Channel",`Deleting channel: ${(j==null?void 0:j.name)??S}`);try{await aa.delete(S),de.info("Channel",`Channel deleted: ${(j==null?void 0:j.name)??S}`);const I=t.agents.find(T=>T.channelId===S);I&&t.selectedAgentId===I.id&&a({type:"SELECT_AGENT",agentId:null,sessionKey:null});const{agents:Y}=await jl.list(),{channels:R}=await aa.list();a({type:"SET_AGENTS",agents:Y}),a({type:"SET_CHANNELS",channels:R})}catch(I){de.error("Channel",`Failed to delete channel: ${I}`)}finally{E(null)}},A=t.agents.filter(S=>S.isDefault),O=t.agents.filter(S=>!S.isDefault&&S.name!=="Default");return y.jsxs("div",{className:"flex flex-col h-full",style:{width:220,minWidth:160,background:"var(--bg-secondary)",borderRight:"1px solid var(--border)"},children:[y.jsxs("div",{className:"px-4 py-3 flex items-center gap-2",children:[y.jsx("span",{className:"text-[--text-sidebar-active] font-bold text-h2 truncate flex-1",children:"BotsChat"}),y.jsx("svg",{className:"w-3 h-3 text-[--text-sidebar]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),y.jsx("div",{className:"px-4 pb-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:t.openclawConnected?"var(--accent-green)":"var(--accent-red)"}}),y.jsx("span",{className:"text-tiny text-[--text-muted]",children:t.openclawConnected?"OpenClaw connected":"OpenClaw offline"})]})}),y.jsxs("div",{className:"flex-1 overflow-y-auto sidebar-scroll",children:[y.jsx(r0,{label:"Channels",expanded:h,onToggle:()=>m(!h)}),h&&y.jsxs("div",{children:[A.map(S=>y.jsx(Uh,{label:`# ${S.name}`,active:t.selectedAgentId===S.id,onClick:()=>v(S.id,S.sessionKey)},S.id)),O.map(S=>y.jsx(Uh,{label:`# ${S.name}`,active:t.selectedAgentId===S.id,onClick:()=>v(S.id,S.sessionKey),showDelete:!0,confirmDelete:b===S.channelId,onDeleteClick:j=>{j.stopPropagation(),E(S.channelId)},onDeleteConfirm:j=>{j.stopPropagation(),S.channelId&&k(S.channelId)},onDeleteCancel:j=>{j.stopPropagation(),E(null)}},S.id)),O.length===0&&A.length===0&&y.jsx("div",{className:"px-8 py-2 text-tiny text-[--text-muted]",children:"Loading channels…"})]})]}),r?y.jsxs("div",{className:"p-3 space-y-2",style:{borderTop:"1px solid var(--sidebar-border)"},children:[y.jsx("input",{type:"text",placeholder:"Channel name",value:o,onChange:S=>d(S.target.value),onKeyDown:S=>S.key==="Enter"&&!S.nativeEvent.isComposing&&g(),className:"w-full px-2 py-1.5 text-caption text-[--text-sidebar] rounded-sm focus:outline-none placeholder:text-[--text-muted]",style:{background:"var(--sidebar-hover)",border:"1px solid var(--sidebar-border)"},autoFocus:!0}),y.jsx("input",{type:"text",placeholder:"Description (optional)",value:u,onChange:S=>p(S.target.value),className:"w-full px-2 py-1.5 text-caption text-[--text-sidebar] rounded-sm focus:outline-none placeholder:text-[--text-muted]",style:{background:"var(--sidebar-hover)",border:"1px solid var(--sidebar-border)"}}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx("button",{onClick:g,className:"flex-1 px-3 py-1.5 text-caption bg-[--bg-active] text-white rounded-sm font-bold hover:brightness-110",children:"Create"}),y.jsx("button",{onClick:()=>s(!1),className:"px-3 py-1.5 text-caption text-[--text-muted] hover:text-[--text-sidebar]",children:"Cancel"})]})]}):y.jsx("div",{className:"p-3",style:{borderTop:"1px solid var(--sidebar-border)"},children:y.jsx("button",{onClick:()=>s(!0),className:"w-full px-3 py-1.5 text-caption text-[--text-sidebar] hover:text-[--text-sidebar-active] rounded-sm border border-dashed transition-colors",style:{borderColor:"var(--sidebar-divider)"},children:"+ New channel"})})]})}function r0({label:t,expanded:a,onToggle:r}){return y.jsxs("button",{onClick:r,className:"w-full flex items-center gap-1 px-4 py-1.5 text-tiny uppercase tracking-wider text-[--text-sidebar] hover:text-[--text-sidebar-active] transition-colors",children:[y.jsx("svg",{className:`w-3 h-3 transition-transform ${a?"rotate-0":"-rotate-90"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})}),t]})}function Uh({label:t,active:a,onClick:r,showDelete:s,confirmDelete:o,onDeleteClick:d,onDeleteConfirm:u,onDeleteCancel:p}){const[h,m]=X.useState(!1),g=X.useRef(null);return X.useEffect(()=>{if(!o)return;const b=E=>{g.current&&!g.current.contains(E.target)&&(p==null||p(E))};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[o,p]),o?y.jsxs("div",{ref:g,className:"px-4 py-1.5 flex items-center gap-1.5",style:{paddingLeft:32,background:"var(--sidebar-hover)"},children:[y.jsx("span",{className:"text-caption text-[--text-sidebar] truncate flex-1",children:"Delete?"}),y.jsx("button",{onClick:u,className:"px-1.5 py-0.5 text-tiny rounded-sm font-bold text-white",style:{background:"var(--accent-red, #e53935)"},children:"Yes"}),y.jsx("button",{onClick:p,className:"px-1.5 py-0.5 text-tiny rounded-sm text-[--text-muted] hover:text-[--text-sidebar]",children:"No"})]}):y.jsxs("div",{className:"relative group",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[y.jsx("button",{onClick:r,className:"w-full text-left py-[5px] text-body truncate transition-colors",onMouseEnter:b=>{a||(b.currentTarget.style.background="var(--sidebar-hover)")},onMouseLeave:b=>{a||(b.currentTarget.style.background=a?"var(--bg-hover)":"")},style:{paddingLeft:a?29:32,paddingRight:s?28:void 0,background:a?"var(--bg-hover)":void 0,borderLeft:a?"3px solid var(--bg-active)":"3px solid transparent",color:a?"var(--text-sidebar-active)":"var(--text-sidebar)",fontWeight:a?700:void 0},children:t}),s&&h&&y.jsx("button",{onClick:d,className:"absolute right-2 top-1/2 -translate-y-1/2 w-5 h-5 flex items-center justify-center rounded-sm text-[--text-muted] hover:text-[--accent-red] hover:bg-[--sidebar-hover] transition-colors",title:"Delete channel",children:y.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})}function l0(t,a){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const s0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c0={};function jh(t,a){return(c0.jsx?o0:s0).test(t)}const u0=/[ \t\n\f\r]/g;function d0(t){return typeof t=="object"?t.type==="text"?Hh(t.value):!1:Hh(t)}function Hh(t){return t.replace(u0,"")===""}class ql{constructor(a,r,s){this.normal=r,this.property=a,s&&(this.space=s)}}ql.prototype.normal={};ql.prototype.property={};ql.prototype.space=void 0;function Xg(t,a){const r={},s={};for(const o of t)Object.assign(r,o.property),Object.assign(s,o.normal);return new ql(r,s,a)}function fd(t){return t.toLowerCase()}class bn{constructor(a,r){this.attribute=r,this.property=a}}bn.prototype.attribute="";bn.prototype.booleanish=!1;bn.prototype.boolean=!1;bn.prototype.commaOrSpaceSeparated=!1;bn.prototype.commaSeparated=!1;bn.prototype.defined=!1;bn.prototype.mustUseProperty=!1;bn.prototype.number=!1;bn.prototype.overloadedBoolean=!1;bn.prototype.property="";bn.prototype.spaceSeparated=!1;bn.prototype.space=void 0;let f0=0;const je=Ra(),jt=Ra(),pd=Ra(),ue=Ra(),mt=Ra(),Ar=Ra(),An=Ra();function Ra(){return 2**++f0}const md=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:jt,commaOrSpaceSeparated:An,commaSeparated:Ar,number:ue,overloadedBoolean:pd,spaceSeparated:mt},Symbol.toStringTag,{value:"Module"})),Fu=Object.keys(md);class Od extends bn{constructor(a,r,s,o){let d=-1;if(super(a,r),Fh(this,"space",o),typeof s=="number")for(;++d<Fu.length;){const u=Fu[d];Fh(this,Fu[d],(s&md[u])===md[u])}}}Od.prototype.defined=!0;function Fh(t,a,r){r&&(t[a]=r)}function Or(t){const a={},r={};for(const[s,o]of Object.entries(t.properties)){const d=new Od(s,t.transform(t.attributes||{},s),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(s)&&(d.mustUseProperty=!0),a[s]=d,r[fd(s)]=s,r[fd(d.attribute)]=s}return new ql(a,r,t.space)}const Zg=Or({properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:mt,ariaCurrent:null,ariaDescribedBy:mt,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:mt,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:mt,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mt,ariaLevel:ue,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:mt,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:mt,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:jt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(t,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function Qg(t,a){return a in t?t[a]:a}function Jg(t,a){return Qg(t,a.toLowerCase())}const p0=Or({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ar,acceptCharset:mt,accessKey:mt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:mt,autoFocus:je,autoPlay:je,blocking:mt,capture:null,charSet:null,checked:je,cite:null,className:mt,cols:ue,colSpan:null,content:null,contentEditable:jt,controls:je,controlsList:mt,coords:ue|Ar,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:pd,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:mt,height:ue,hidden:pd,high:ue,href:null,hrefLang:null,htmlFor:mt,httpEquiv:mt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:mt,itemRef:mt,itemScope:je,itemType:mt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:ue,pattern:null,ping:mt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:mt,required:je,reversed:je,rows:ue,rowSpan:ue,sandbox:mt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:jt,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:je,useMap:null,value:jt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mt,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:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:jt,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:je,disableRemotePlayback:je,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:Jg}),m0=Or({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:An,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:mt,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:je,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:Ar,g2:Ar,glyphName:Ar,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:An,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:mt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:An,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:An,rev:An,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:An,requiredFeatures:An,requiredFonts:An,requiredFormats:An,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:An,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:An,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:An,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:Qg}),Wg=Or({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,a){return"xlink:"+a.slice(5).toLowerCase()}}),eb=Or({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Jg}),tb=Or({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,a){return"xml:"+a.slice(3).toLowerCase()}}),h0={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"},g0=/[A-Z]/g,Gh=/-[a-z]/g,b0=/^data[-\w.:]+$/i;function y0(t,a){const r=fd(a);let s=a,o=bn;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&b0.test(a)){if(a.charAt(4)==="-"){const d=a.slice(5).replace(Gh,v0);s="data"+d.charAt(0).toUpperCase()+d.slice(1)}else{const d=a.slice(4);if(!Gh.test(d)){let u=d.replace(g0,x0);u.charAt(0)!=="-"&&(u="-"+u),a="data"+u}}o=Od}return new o(s,a)}function x0(t){return"-"+t.toLowerCase()}function v0(t){return t.charAt(1).toUpperCase()}const E0=Xg([Zg,p0,Wg,eb,tb],"html"),Md=Xg([Zg,m0,Wg,eb,tb],"svg");function _0(t){return t.join(" ").trim()}var Er={},Gu,qh;function S0(){if(qh)return Gu;qh=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,r=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,d=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,p=/^\s+|\s+$/g,h=`
|
|
50
|
+
`,m="/",g="*",b="",E="comment",v="declaration";function k(O,S){if(typeof O!="string")throw new TypeError("First argument must be a string");if(!O)return[];S=S||{};var j=1,I=1;function Y(H){var J=H.match(a);J&&(j+=J.length);var z=H.lastIndexOf(h);I=~z?H.length-z:I+H.length}function R(){var H={line:j,column:I};return function(J){return J.position=new T(H),ce(),J}}function T(H){this.start=H,this.end={line:j,column:I},this.source=S.source}T.prototype.content=O;function $(H){var J=new Error(S.source+":"+j+":"+I+": "+H);if(J.reason=H,J.filename=S.source,J.line=j,J.column=I,J.source=O,!S.silent)throw J}function le(H){var J=H.exec(O);if(J){var z=J[0];return Y(z),O=O.slice(z.length),J}}function ce(){le(r)}function U(H){var J;for(H=H||[];J=W();)J!==!1&&H.push(J);return H}function W(){var H=R();if(!(m!=O.charAt(0)||g!=O.charAt(1))){for(var J=2;b!=O.charAt(J)&&(g!=O.charAt(J)||m!=O.charAt(J+1));)++J;if(J+=2,b===O.charAt(J-1))return $("End of comment missing");var z=O.slice(2,J-2);return I+=2,Y(z),O=O.slice(J),I+=2,H({type:E,comment:z})}}function re(){var H=R(),J=le(s);if(J){if(W(),!le(o))return $("property missing ':'");var z=le(d),ie=H({type:v,property:A(J[0].replace(t,b)),value:z?A(z[0].replace(t,b)):b});return le(u),ie}}function xe(){var H=[];U(H);for(var J;J=re();)J!==!1&&(H.push(J),U(H));return H}return ce(),xe()}function A(O){return O?O.replace(p,b):b}return Gu=k,Gu}var Kh;function k0(){if(Kh)return Er;Kh=1;var t=Er&&Er.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Er,"__esModule",{value:!0}),Er.default=r;const a=t(S0());function r(s,o){let d=null;if(!s||typeof s!="string")return d;const u=(0,a.default)(s),p=typeof o=="function";return u.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:g}=h;p?o(m,g,h):g&&(d=d||{},d[m]=g)}),d}return Er}var Cl={},$h;function N0(){if($h)return Cl;$h=1,Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,r=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,d=function(m){return!m||r.test(m)||t.test(m)},u=function(m,g){return g.toUpperCase()},p=function(m,g){return"".concat(g,"-")},h=function(m,g){return g===void 0&&(g={}),d(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(o,p):m=m.replace(s,p),m.replace(a,u))};return Cl.camelCase=h,Cl}var Ol,Yh;function T0(){if(Yh)return Ol;Yh=1;var t=Ol&&Ol.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},a=t(k0()),r=N0();function s(o,d){var u={};return!o||typeof o!="string"||(0,a.default)(o,function(p,h){p&&h&&(u[(0,r.camelCase)(p,d)]=h)}),u}return s.default=s,Ol=s,Ol}var w0=T0();const A0=Gl(w0),nb=ib("end"),Rd=ib("start");function ib(t){return a;function a(r){const s=r&&r.position&&r.position[t]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function C0(t){const a=Rd(t),r=nb(t);if(a&&r)return{start:a,end:r}}function zl(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Ph(t.position):"start"in t||"end"in t?Ph(t):"line"in t||"column"in t?hd(t):""}function hd(t){return Vh(t&&t.line)+":"+Vh(t&&t.column)}function Ph(t){return hd(t&&t.start)+"-"+hd(t&&t.end)}function Vh(t){return t&&typeof t=="number"?t:1}class Wt extends Error{constructor(a,r,s){super(),typeof r=="string"&&(s=r,r=void 0);let o="",d={},u=!1;if(r&&("line"in r&&"column"in r?d={place:r}:"start"in r&&"end"in r?d={place:r}:"type"in r?d={ancestors:[r],place:r.position}:d={...r}),typeof a=="string"?o=a:!d.cause&&a&&(u=!0,o=a.message,d.cause=a),!d.ruleId&&!d.source&&typeof s=="string"){const h=s.indexOf(":");h===-1?d.ruleId=s:(d.source=s.slice(0,h),d.ruleId=s.slice(h+1))}if(!d.place&&d.ancestors&&d.ancestors){const h=d.ancestors[d.ancestors.length-1];h&&(d.place=h.position)}const p=d.place&&"start"in d.place?d.place.start:d.place;this.ancestors=d.ancestors||void 0,this.cause=d.cause||void 0,this.column=p?p.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=p?p.line:void 0,this.name=zl(d.place)||"1:1",this.place=d.place||void 0,this.reason=this.message,this.ruleId=d.ruleId||void 0,this.source=d.source||void 0,this.stack=u&&d.cause&&typeof d.cause.stack=="string"?d.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Wt.prototype.file="";Wt.prototype.name="";Wt.prototype.reason="";Wt.prototype.message="";Wt.prototype.stack="";Wt.prototype.column=void 0;Wt.prototype.line=void 0;Wt.prototype.ancestors=void 0;Wt.prototype.cause=void 0;Wt.prototype.fatal=void 0;Wt.prototype.place=void 0;Wt.prototype.ruleId=void 0;Wt.prototype.source=void 0;const Dd={}.hasOwnProperty,O0=new Map,M0=/[A-Z]/g,R0=new Set(["table","tbody","thead","tfoot","tr"]),D0=new Set(["td","th"]),ab="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function L0(t,a){if(!a||a.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=a.filePath||void 0;let s;if(a.development){if(typeof a.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=G0(r,a.jsxDEV)}else{if(typeof a.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof a.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=F0(r,a.jsx,a.jsxs)}const o={Fragment:a.Fragment,ancestors:[],components:a.components||{},create:s,elementAttributeNameCase:a.elementAttributeNameCase||"react",evaluater:a.createEvaluater?a.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?Md:E0,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},d=rb(o,t,void 0);return d&&typeof d!="string"?d:o.create(t,o.Fragment,{children:d||void 0},void 0)}function rb(t,a,r){if(a.type==="element")return I0(t,a,r);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return z0(t,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return U0(t,a,r);if(a.type==="mdxjsEsm")return B0(t,a);if(a.type==="root")return j0(t,a,r);if(a.type==="text")return H0(t,a)}function I0(t,a,r){const s=t.schema;let o=s;a.tagName.toLowerCase()==="svg"&&s.space==="html"&&(o=Md,t.schema=o),t.ancestors.push(a);const d=sb(t,a.tagName,!1),u=q0(t,a);let p=Id(t,a);return R0.has(a.tagName)&&(p=p.filter(function(h){return typeof h=="string"?!d0(h):!0})),lb(t,u,d,a),Ld(u,p),t.ancestors.pop(),t.schema=s,t.create(a,d,u,r)}function z0(t,a){if(a.data&&a.data.estree&&t.evaluater){const s=a.data.estree.body[0];return s.type,t.evaluater.evaluateExpression(s.expression)}Hl(t,a.position)}function B0(t,a){if(a.data&&a.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(a.data.estree);Hl(t,a.position)}function U0(t,a,r){const s=t.schema;let o=s;a.name==="svg"&&s.space==="html"&&(o=Md,t.schema=o),t.ancestors.push(a);const d=a.name===null?t.Fragment:sb(t,a.name,!0),u=K0(t,a),p=Id(t,a);return lb(t,u,d,a),Ld(u,p),t.ancestors.pop(),t.schema=s,t.create(a,d,u,r)}function j0(t,a,r){const s={};return Ld(s,Id(t,a)),t.create(a,t.Fragment,s,r)}function H0(t,a){return a.value}function lb(t,a,r,s){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(a.node=s)}function Ld(t,a){if(a.length>0){const r=a.length>1?a:a[0];r&&(t.children=r)}}function F0(t,a,r){return s;function s(o,d,u,p){const m=Array.isArray(u.children)?r:a;return p?m(d,u,p):m(d,u)}}function G0(t,a){return r;function r(s,o,d,u){const p=Array.isArray(d.children),h=Rd(s);return a(o,d,u,p,{columnNumber:h?h.column-1:void 0,fileName:t,lineNumber:h?h.line:void 0},void 0)}}function q0(t,a){const r={};let s,o;for(o in a.properties)if(o!=="children"&&Dd.call(a.properties,o)){const d=$0(t,o,a.properties[o]);if(d){const[u,p]=d;t.tableCellAlignToStyle&&u==="align"&&typeof p=="string"&&D0.has(a.tagName)?s=p:r[u]=p}}if(s){const d=r.style||(r.style={});d[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return r}function K0(t,a){const r={};for(const s of a.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&t.evaluater){const d=s.data.estree.body[0];d.type;const u=d.expression;u.type;const p=u.properties[0];p.type,Object.assign(r,t.evaluater.evaluateExpression(p.argument))}else Hl(t,a.position);else{const o=s.name;let d;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&t.evaluater){const p=s.value.data.estree.body[0];p.type,d=t.evaluater.evaluateExpression(p.expression)}else Hl(t,a.position);else d=s.value===null?!0:s.value;r[o]=d}return r}function Id(t,a){const r=[];let s=-1;const o=t.passKeys?new Map:O0;for(;++s<a.children.length;){const d=a.children[s];let u;if(t.passKeys){const h=d.type==="element"?d.tagName:d.type==="mdxJsxFlowElement"||d.type==="mdxJsxTextElement"?d.name:void 0;if(h){const m=o.get(h)||0;u=h+"-"+m,o.set(h,m+1)}}const p=rb(t,d,u);p!==void 0&&r.push(p)}return r}function $0(t,a,r){const s=y0(t.schema,a);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=s.commaSeparated?l0(r):_0(r)),s.property==="style"){let o=typeof r=="object"?r:Y0(t,String(r));return t.stylePropertyNameCase==="css"&&(o=P0(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&s.space?h0[s.property]||s.property:s.attribute,r]}}function Y0(t,a){try{return A0(a,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const s=r,o=new Wt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=ab+"#cannot-parse-style-attribute",o}}function sb(t,a,r){let s;if(!r)s={type:"Literal",value:a};else if(a.includes(".")){const o=a.split(".");let d=-1,u;for(;++d<o.length;){const p=jh(o[d])?{type:"Identifier",name:o[d]}:{type:"Literal",value:o[d]};u=u?{type:"MemberExpression",object:u,property:p,computed:!!(d&&p.type==="Literal"),optional:!1}:p}s=u}else s=jh(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(s.type==="Literal"){const o=s.value;return Dd.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(s);Hl(t)}function Hl(t,a){const r=new Wt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:a,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=ab+"#cannot-handle-mdx-estrees-without-createevaluater",r}function P0(t){const a={};let r;for(r in t)Dd.call(t,r)&&(a[V0(r)]=t[r]);return a}function V0(t){let a=t.replace(M0,X0);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function X0(t){return"-"+t.toLowerCase()}const qu={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"]},Z0={};function zd(t,a){const r=Z0,s=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return ob(t,s,o)}function ob(t,a,r){if(Q0(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(a&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Xh(t.children,a,r)}return Array.isArray(t)?Xh(t,a,r):""}function Xh(t,a,r){const s=[];let o=-1;for(;++o<t.length;)s[o]=ob(t[o],a,r);return s.join("")}function Q0(t){return!!(t&&typeof t=="object")}const Zh=document.createElement("i");function Bd(t){const a="&"+t+";";Zh.innerHTML=a;const r=Zh.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===a?!1:r}function Cn(t,a,r,s){const o=t.length;let d=0,u;if(a<0?a=-a>o?0:o+a:a=a>o?o:a,r=r>0?r:0,s.length<1e4)u=Array.from(s),u.unshift(a,r),t.splice(...u);else for(r&&t.splice(a,r);d<s.length;)u=s.slice(d,d+1e4),u.unshift(a,0),t.splice(...u),d+=1e4,a+=1e4}function Fn(t,a){return t.length>0?(Cn(t,t.length,0,a),t):a}const Qh={}.hasOwnProperty;function cb(t){const a={};let r=-1;for(;++r<t.length;)J0(a,t[r]);return a}function J0(t,a){let r;for(r in a){const o=(Qh.call(t,r)?t[r]:void 0)||(t[r]={}),d=a[r];let u;if(d)for(u in d){Qh.call(o,u)||(o[u]=[]);const p=d[u];W0(o[u],Array.isArray(p)?p:p?[p]:[])}}}function W0(t,a){let r=-1;const s=[];for(;++r<a.length;)(a[r].add==="after"?t:s).push(a[r]);Cn(t,0,0,s)}function ub(t,a){const r=Number.parseInt(t,a);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Pn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ln=sa(/[A-Za-z]/),Jt=sa(/[\dA-Za-z]/),eE=sa(/[#-'*+\--9=?A-Z^-~]/);function So(t){return t!==null&&(t<32||t===127)}const gd=sa(/\d/),tE=sa(/[\dA-Fa-f]/),nE=sa(/[!-/:-@[-`{-~]/);function Ae(t){return t!==null&&t<-2}function ft(t){return t!==null&&(t<0||t===32)}function Ke(t){return t===-2||t===-1||t===32}const Co=sa(new RegExp("\\p{P}|\\p{S}","u")),Ma=sa(/\s/);function sa(t){return a;function a(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function Mr(t){const a=[];let r=-1,s=0,o=0;for(;++r<t.length;){const d=t.charCodeAt(r);let u="";if(d===37&&Jt(t.charCodeAt(r+1))&&Jt(t.charCodeAt(r+2)))o=2;else if(d<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(d))||(u=String.fromCharCode(d));else if(d>55295&&d<57344){const p=t.charCodeAt(r+1);d<56320&&p>56319&&p<57344?(u=String.fromCharCode(d,p),o=1):u="�"}else u=String.fromCharCode(d);u&&(a.push(t.slice(s,r),encodeURIComponent(u)),s=r+o+1,u=""),o&&(r+=o,o=0)}return a.join("")+t.slice(s)}function Ze(t,a,r,s){const o=s?s-1:Number.POSITIVE_INFINITY;let d=0;return u;function u(h){return Ke(h)?(t.enter(r),p(h)):a(h)}function p(h){return Ke(h)&&d++<o?(t.consume(h),p):(t.exit(r),a(h))}}const iE={tokenize:aE};function aE(t){const a=t.attempt(this.parser.constructs.contentInitial,s,o);let r;return a;function s(p){if(p===null){t.consume(p);return}return t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),Ze(t,a,"linePrefix")}function o(p){return t.enter("paragraph"),d(p)}function d(p){const h=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,u(p)}function u(p){if(p===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(p);return}return Ae(p)?(t.consume(p),t.exit("chunkText"),d):(t.consume(p),u)}}const rE={tokenize:lE},Jh={tokenize:sE};function lE(t){const a=this,r=[];let s=0,o,d,u;return p;function p(I){if(s<r.length){const Y=r[s];return a.containerState=Y[1],t.attempt(Y[0].continuation,h,m)(I)}return m(I)}function h(I){if(s++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,o&&j();const Y=a.events.length;let R=Y,T;for(;R--;)if(a.events[R][0]==="exit"&&a.events[R][1].type==="chunkFlow"){T=a.events[R][1].end;break}S(s);let $=Y;for(;$<a.events.length;)a.events[$][1].end={...T},$++;return Cn(a.events,R+1,0,a.events.slice(Y)),a.events.length=$,m(I)}return p(I)}function m(I){if(s===r.length){if(!o)return E(I);if(o.currentConstruct&&o.currentConstruct.concrete)return k(I);a.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return a.containerState={},t.check(Jh,g,b)(I)}function g(I){return o&&j(),S(s),E(I)}function b(I){return a.parser.lazy[a.now().line]=s!==r.length,u=a.now().offset,k(I)}function E(I){return a.containerState={},t.attempt(Jh,v,k)(I)}function v(I){return s++,r.push([a.currentConstruct,a.containerState]),E(I)}function k(I){if(I===null){o&&j(),S(0),t.consume(I);return}return o=o||a.parser.flow(a.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:d}),A(I)}function A(I){if(I===null){O(t.exit("chunkFlow"),!0),S(0),t.consume(I);return}return Ae(I)?(t.consume(I),O(t.exit("chunkFlow")),s=0,a.interrupt=void 0,p):(t.consume(I),A)}function O(I,Y){const R=a.sliceStream(I);if(Y&&R.push(null),I.previous=d,d&&(d.next=I),d=I,o.defineSkip(I.start),o.write(R),a.parser.lazy[I.start.line]){let T=o.events.length;for(;T--;)if(o.events[T][1].start.offset<u&&(!o.events[T][1].end||o.events[T][1].end.offset>u))return;const $=a.events.length;let le=$,ce,U;for(;le--;)if(a.events[le][0]==="exit"&&a.events[le][1].type==="chunkFlow"){if(ce){U=a.events[le][1].end;break}ce=!0}for(S(s),T=$;T<a.events.length;)a.events[T][1].end={...U},T++;Cn(a.events,le+1,0,a.events.slice($)),a.events.length=T}}function S(I){let Y=r.length;for(;Y-- >I;){const R=r[Y];a.containerState=R[1],R[0].exit.call(a,t)}r.length=I}function j(){o.write([null]),d=void 0,o=void 0,a.containerState._closeFlow=void 0}}function sE(t,a,r){return Ze(t,t.attempt(this.parser.constructs.document,a,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Cr(t){if(t===null||ft(t)||Ma(t))return 1;if(Co(t))return 2}function Oo(t,a,r){const s=[];let o=-1;for(;++o<t.length;){const d=t[o].resolveAll;d&&!s.includes(d)&&(a=d(a,r),s.push(d))}return a}const bd={name:"attention",resolveAll:oE,tokenize:cE};function oE(t,a){let r=-1,s,o,d,u,p,h,m,g;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(s=r;s--;)if(t[s][0]==="exit"&&t[s][1].type==="attentionSequence"&&t[s][1]._open&&a.sliceSerialize(t[s][1]).charCodeAt(0)===a.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[s][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[s][1].end.offset-t[s][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;h=t[s][1].end.offset-t[s][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const b={...t[s][1].end},E={...t[r][1].start};Wh(b,-h),Wh(E,h),u={type:h>1?"strongSequence":"emphasisSequence",start:b,end:{...t[s][1].end}},p={type:h>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:E},d={type:h>1?"strongText":"emphasisText",start:{...t[s][1].end},end:{...t[r][1].start}},o={type:h>1?"strong":"emphasis",start:{...u.start},end:{...p.end}},t[s][1].end={...u.start},t[r][1].start={...p.end},m=[],t[s][1].end.offset-t[s][1].start.offset&&(m=Fn(m,[["enter",t[s][1],a],["exit",t[s][1],a]])),m=Fn(m,[["enter",o,a],["enter",u,a],["exit",u,a],["enter",d,a]]),m=Fn(m,Oo(a.parser.constructs.insideSpan.null,t.slice(s+1,r),a)),m=Fn(m,[["exit",d,a],["enter",p,a],["exit",p,a],["exit",o,a]]),t[r][1].end.offset-t[r][1].start.offset?(g=2,m=Fn(m,[["enter",t[r][1],a],["exit",t[r][1],a]])):g=0,Cn(t,s-1,r-s+3,m),r=s+m.length-g-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function cE(t,a){const r=this.parser.constructs.attentionMarkers.null,s=this.previous,o=Cr(s);let d;return u;function u(h){return d=h,t.enter("attentionSequence"),p(h)}function p(h){if(h===d)return t.consume(h),p;const m=t.exit("attentionSequence"),g=Cr(h),b=!g||g===2&&o||r.includes(h),E=!o||o===2&&g||r.includes(s);return m._open=!!(d===42?b:b&&(o||!E)),m._close=!!(d===42?E:E&&(g||!b)),a(h)}}function Wh(t,a){t.column+=a,t.offset+=a,t._bufferIndex+=a}const uE={name:"autolink",tokenize:dE};function dE(t,a,r){let s=0;return o;function o(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),d}function d(v){return ln(v)?(t.consume(v),u):v===64?r(v):m(v)}function u(v){return v===43||v===45||v===46||Jt(v)?(s=1,p(v)):m(v)}function p(v){return v===58?(t.consume(v),s=0,h):(v===43||v===45||v===46||Jt(v))&&s++<32?(t.consume(v),p):(s=0,m(v))}function h(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),a):v===null||v===32||v===60||So(v)?r(v):(t.consume(v),h)}function m(v){return v===64?(t.consume(v),g):eE(v)?(t.consume(v),m):r(v)}function g(v){return Jt(v)?b(v):r(v)}function b(v){return v===46?(t.consume(v),s=0,g):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),a):E(v)}function E(v){if((v===45||Jt(v))&&s++<63){const k=v===45?E:b;return t.consume(v),k}return r(v)}}const Kl={partial:!0,tokenize:fE};function fE(t,a,r){return s;function s(d){return Ke(d)?Ze(t,o,"linePrefix")(d):o(d)}function o(d){return d===null||Ae(d)?a(d):r(d)}}const db={continuation:{tokenize:mE},exit:hE,name:"blockQuote",tokenize:pE};function pE(t,a,r){const s=this;return o;function o(u){if(u===62){const p=s.containerState;return p.open||(t.enter("blockQuote",{_container:!0}),p.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(u),t.exit("blockQuoteMarker"),d}return r(u)}function d(u){return Ke(u)?(t.enter("blockQuotePrefixWhitespace"),t.consume(u),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),a):(t.exit("blockQuotePrefix"),a(u))}}function mE(t,a,r){const s=this;return o;function o(u){return Ke(u)?Ze(t,d,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):d(u)}function d(u){return t.attempt(db,a,r)(u)}}function hE(t){t.exit("blockQuote")}const fb={name:"characterEscape",tokenize:gE};function gE(t,a,r){return s;function s(d){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(d),t.exit("escapeMarker"),o}function o(d){return nE(d)?(t.enter("characterEscapeValue"),t.consume(d),t.exit("characterEscapeValue"),t.exit("characterEscape"),a):r(d)}}const pb={name:"characterReference",tokenize:bE};function bE(t,a,r){const s=this;let o=0,d,u;return p;function p(b){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(b),t.exit("characterReferenceMarker"),h}function h(b){return b===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(b),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),d=31,u=Jt,g(b))}function m(b){return b===88||b===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(b),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),d=6,u=tE,g):(t.enter("characterReferenceValue"),d=7,u=gd,g(b))}function g(b){if(b===59&&o){const E=t.exit("characterReferenceValue");return u===Jt&&!Bd(s.sliceSerialize(E))?r(b):(t.enter("characterReferenceMarker"),t.consume(b),t.exit("characterReferenceMarker"),t.exit("characterReference"),a)}return u(b)&&o++<d?(t.consume(b),g):r(b)}}const eg={partial:!0,tokenize:xE},tg={concrete:!0,name:"codeFenced",tokenize:yE};function yE(t,a,r){const s=this,o={partial:!0,tokenize:R};let d=0,u=0,p;return h;function h(T){return m(T)}function m(T){const $=s.events[s.events.length-1];return d=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,p=T,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),g(T)}function g(T){return T===p?(u++,t.consume(T),g):u<3?r(T):(t.exit("codeFencedFenceSequence"),Ke(T)?Ze(t,b,"whitespace")(T):b(T))}function b(T){return T===null||Ae(T)?(t.exit("codeFencedFence"),s.interrupt?a(T):t.check(eg,A,Y)(T)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),E(T))}function E(T){return T===null||Ae(T)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),b(T)):Ke(T)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ze(t,v,"whitespace")(T)):T===96&&T===p?r(T):(t.consume(T),E)}function v(T){return T===null||Ae(T)?b(T):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),k(T))}function k(T){return T===null||Ae(T)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),b(T)):T===96&&T===p?r(T):(t.consume(T),k)}function A(T){return t.attempt(o,Y,O)(T)}function O(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),S}function S(T){return d>0&&Ke(T)?Ze(t,j,"linePrefix",d+1)(T):j(T)}function j(T){return T===null||Ae(T)?t.check(eg,A,Y)(T):(t.enter("codeFlowValue"),I(T))}function I(T){return T===null||Ae(T)?(t.exit("codeFlowValue"),j(T)):(t.consume(T),I)}function Y(T){return t.exit("codeFenced"),a(T)}function R(T,$,le){let ce=0;return U;function U(J){return T.enter("lineEnding"),T.consume(J),T.exit("lineEnding"),W}function W(J){return T.enter("codeFencedFence"),Ke(J)?Ze(T,re,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):re(J)}function re(J){return J===p?(T.enter("codeFencedFenceSequence"),xe(J)):le(J)}function xe(J){return J===p?(ce++,T.consume(J),xe):ce>=u?(T.exit("codeFencedFenceSequence"),Ke(J)?Ze(T,H,"whitespace")(J):H(J)):le(J)}function H(J){return J===null||Ae(J)?(T.exit("codeFencedFence"),$(J)):le(J)}}}function xE(t,a,r){const s=this;return o;function o(u){return u===null?r(u):(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),d)}function d(u){return s.parser.lazy[s.now().line]?r(u):a(u)}}const Ku={name:"codeIndented",tokenize:EE},vE={partial:!0,tokenize:_E};function EE(t,a,r){const s=this;return o;function o(m){return t.enter("codeIndented"),Ze(t,d,"linePrefix",5)(m)}function d(m){const g=s.events[s.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?u(m):r(m)}function u(m){return m===null?h(m):Ae(m)?t.attempt(vE,u,h)(m):(t.enter("codeFlowValue"),p(m))}function p(m){return m===null||Ae(m)?(t.exit("codeFlowValue"),u(m)):(t.consume(m),p)}function h(m){return t.exit("codeIndented"),a(m)}}function _E(t,a,r){const s=this;return o;function o(u){return s.parser.lazy[s.now().line]?r(u):Ae(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),o):Ze(t,d,"linePrefix",5)(u)}function d(u){const p=s.events[s.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?a(u):Ae(u)?o(u):r(u)}}const SE={name:"codeText",previous:NE,resolve:kE,tokenize:TE};function kE(t){let a=t.length-4,r=3,s,o;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[a][1].type==="lineEnding"||t[a][1].type==="space")){for(s=r;++s<a;)if(t[s][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[a][1].type="codeTextPadding",r+=2,a-=2;break}}for(s=r-1,a++;++s<=a;)o===void 0?s!==a&&t[s][1].type!=="lineEnding"&&(o=s):(s===a||t[s][1].type==="lineEnding")&&(t[o][1].type="codeTextData",s!==o+2&&(t[o][1].end=t[s-1][1].end,t.splice(o+2,s-o-2),a-=s-o-2,s=o+2),o=void 0);return t}function NE(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function TE(t,a,r){let s=0,o,d;return u;function u(b){return t.enter("codeText"),t.enter("codeTextSequence"),p(b)}function p(b){return b===96?(t.consume(b),s++,p):(t.exit("codeTextSequence"),h(b))}function h(b){return b===null?r(b):b===32?(t.enter("space"),t.consume(b),t.exit("space"),h):b===96?(d=t.enter("codeTextSequence"),o=0,g(b)):Ae(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),h):(t.enter("codeTextData"),m(b))}function m(b){return b===null||b===32||b===96||Ae(b)?(t.exit("codeTextData"),h(b)):(t.consume(b),m)}function g(b){return b===96?(t.consume(b),o++,g):o===s?(t.exit("codeTextSequence"),t.exit("codeText"),a(b)):(d.type="codeTextData",m(b))}}class wE{constructor(a){this.left=a?[...a]:[],this.right=[]}get(a){if(a<0||a>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return a<this.left.length?this.left[a]:this.right[this.right.length-a+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(a,r){const s=r??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(a,s):a>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(a,r,s){const o=r||0;this.setCursor(Math.trunc(a));const d=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return s&&Ml(this.left,s),d.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(a){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(a)}pushMany(a){this.setCursor(Number.POSITIVE_INFINITY),Ml(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),Ml(this.right,a.reverse())}setCursor(a){if(!(a===this.left.length||a>this.left.length&&this.right.length===0||a<0&&this.left.length===0))if(a<this.left.length){const r=this.left.splice(a,Number.POSITIVE_INFINITY);Ml(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);Ml(this.left,r.reverse())}}}function Ml(t,a){let r=0;if(a.length<1e4)t.push(...a);else for(;r<a.length;)t.push(...a.slice(r,r+1e4)),r+=1e4}function mb(t){const a={};let r=-1,s,o,d,u,p,h,m;const g=new wE(t);for(;++r<g.length;){for(;r in a;)r=a[r];if(s=g.get(r),r&&s[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(h=s[1]._tokenizer.events,d=0,d<h.length&&h[d][1].type==="lineEndingBlank"&&(d+=2),d<h.length&&h[d][1].type==="content"))for(;++d<h.length&&h[d][1].type!=="content";)h[d][1].type==="chunkText"&&(h[d][1]._isInFirstContentOfListItem=!0,d++);if(s[0]==="enter")s[1].contentType&&(Object.assign(a,AE(g,r)),r=a[r],m=!0);else if(s[1]._container){for(d=r,o=void 0;d--;)if(u=g.get(d),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=d);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(s[1].end={...g.get(o)[1].start},p=g.slice(o,r),p.unshift(s),g.splice(o,r-o+1,p))}}return Cn(t,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function AE(t,a){const r=t.get(a)[1],s=t.get(a)[2];let o=a-1;const d=[];let u=r._tokenizer;u||(u=s.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const p=u.events,h=[],m={};let g,b,E=-1,v=r,k=0,A=0;const O=[A];for(;v;){for(;t.get(++o)[1]!==v;);d.push(o),v._tokenizer||(g=s.sliceStream(v),v.next||g.push(null),b&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(g),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),b=v,v=v.next}for(v=r;++E<p.length;)p[E][0]==="exit"&&p[E-1][0]==="enter"&&p[E][1].type===p[E-1][1].type&&p[E][1].start.line!==p[E][1].end.line&&(A=E+1,O.push(A),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):O.pop(),E=O.length;E--;){const S=p.slice(O[E],O[E+1]),j=d.pop();h.push([j,j+S.length-1]),t.splice(j,2,S)}for(h.reverse(),E=-1;++E<h.length;)m[k+h[E][0]]=k+h[E][1],k+=h[E][1]-h[E][0]-1;return m}const CE={resolve:ME,tokenize:RE},OE={partial:!0,tokenize:DE};function ME(t){return mb(t),t}function RE(t,a){let r;return s;function s(p){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),o(p)}function o(p){return p===null?d(p):Ae(p)?t.check(OE,u,d)(p):(t.consume(p),o)}function d(p){return t.exit("chunkContent"),t.exit("content"),a(p)}function u(p){return t.consume(p),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function DE(t,a,r){const s=this;return o;function o(u){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),Ze(t,d,"linePrefix")}function d(u){if(u===null||Ae(u))return r(u);const p=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?a(u):t.interrupt(s.parser.constructs.flow,r,a)(u)}}function hb(t,a,r,s,o,d,u,p,h){const m=h||Number.POSITIVE_INFINITY;let g=0;return b;function b(S){return S===60?(t.enter(s),t.enter(o),t.enter(d),t.consume(S),t.exit(d),E):S===null||S===32||S===41||So(S)?r(S):(t.enter(s),t.enter(u),t.enter(p),t.enter("chunkString",{contentType:"string"}),A(S))}function E(S){return S===62?(t.enter(d),t.consume(S),t.exit(d),t.exit(o),t.exit(s),a):(t.enter(p),t.enter("chunkString",{contentType:"string"}),v(S))}function v(S){return S===62?(t.exit("chunkString"),t.exit(p),E(S)):S===null||S===60||Ae(S)?r(S):(t.consume(S),S===92?k:v)}function k(S){return S===60||S===62||S===92?(t.consume(S),v):v(S)}function A(S){return!g&&(S===null||S===41||ft(S))?(t.exit("chunkString"),t.exit(p),t.exit(u),t.exit(s),a(S)):g<m&&S===40?(t.consume(S),g++,A):S===41?(t.consume(S),g--,A):S===null||S===32||S===40||So(S)?r(S):(t.consume(S),S===92?O:A)}function O(S){return S===40||S===41||S===92?(t.consume(S),A):A(S)}}function gb(t,a,r,s,o,d){const u=this;let p=0,h;return m;function m(v){return t.enter(s),t.enter(o),t.consume(v),t.exit(o),t.enter(d),g}function g(v){return p>999||v===null||v===91||v===93&&!h||v===94&&!p&&"_hiddenFootnoteSupport"in u.parser.constructs?r(v):v===93?(t.exit(d),t.enter(o),t.consume(v),t.exit(o),t.exit(s),a):Ae(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),g):(t.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===null||v===91||v===93||Ae(v)||p++>999?(t.exit("chunkString"),g(v)):(t.consume(v),h||(h=!Ke(v)),v===92?E:b)}function E(v){return v===91||v===92||v===93?(t.consume(v),p++,b):b(v)}}function bb(t,a,r,s,o,d){let u;return p;function p(E){return E===34||E===39||E===40?(t.enter(s),t.enter(o),t.consume(E),t.exit(o),u=E===40?41:E,h):r(E)}function h(E){return E===u?(t.enter(o),t.consume(E),t.exit(o),t.exit(s),a):(t.enter(d),m(E))}function m(E){return E===u?(t.exit(d),h(u)):E===null?r(E):Ae(E)?(t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),Ze(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===u||E===null||Ae(E)?(t.exit("chunkString"),m(E)):(t.consume(E),E===92?b:g)}function b(E){return E===u||E===92?(t.consume(E),g):g(E)}}function Bl(t,a){let r;return s;function s(o){return Ae(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),r=!0,s):Ke(o)?Ze(t,s,r?"linePrefix":"lineSuffix")(o):a(o)}}const LE={name:"definition",tokenize:zE},IE={partial:!0,tokenize:BE};function zE(t,a,r){const s=this;let o;return d;function d(v){return t.enter("definition"),u(v)}function u(v){return gb.call(s,t,p,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function p(v){return o=Pn(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),h):r(v)}function h(v){return ft(v)?Bl(t,m)(v):m(v)}function m(v){return hb(t,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return t.attempt(IE,b,b)(v)}function b(v){return Ke(v)?Ze(t,E,"whitespace")(v):E(v)}function E(v){return v===null||Ae(v)?(t.exit("definition"),s.parser.defined.push(o),a(v)):r(v)}}function BE(t,a,r){return s;function s(p){return ft(p)?Bl(t,o)(p):r(p)}function o(p){return bb(t,d,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(p)}function d(p){return Ke(p)?Ze(t,u,"whitespace")(p):u(p)}function u(p){return p===null||Ae(p)?a(p):r(p)}}const UE={name:"hardBreakEscape",tokenize:jE};function jE(t,a,r){return s;function s(d){return t.enter("hardBreakEscape"),t.consume(d),o}function o(d){return Ae(d)?(t.exit("hardBreakEscape"),a(d)):r(d)}}const HE={name:"headingAtx",resolve:FE,tokenize:GE};function FE(t,a){let r=t.length-2,s=3,o,d;return t[s][1].type==="whitespace"&&(s+=2),r-2>s&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(s===r-1||r-4>s&&t[r-2][1].type==="whitespace")&&(r-=s+1===r?2:4),r>s&&(o={type:"atxHeadingText",start:t[s][1].start,end:t[r][1].end},d={type:"chunkText",start:t[s][1].start,end:t[r][1].end,contentType:"text"},Cn(t,s,r-s+1,[["enter",o,a],["enter",d,a],["exit",d,a],["exit",o,a]])),t}function GE(t,a,r){let s=0;return o;function o(g){return t.enter("atxHeading"),d(g)}function d(g){return t.enter("atxHeadingSequence"),u(g)}function u(g){return g===35&&s++<6?(t.consume(g),u):g===null||ft(g)?(t.exit("atxHeadingSequence"),p(g)):r(g)}function p(g){return g===35?(t.enter("atxHeadingSequence"),h(g)):g===null||Ae(g)?(t.exit("atxHeading"),a(g)):Ke(g)?Ze(t,p,"whitespace")(g):(t.enter("atxHeadingText"),m(g))}function h(g){return g===35?(t.consume(g),h):(t.exit("atxHeadingSequence"),p(g))}function m(g){return g===null||g===35||ft(g)?(t.exit("atxHeadingText"),p(g)):(t.consume(g),m)}}const qE=["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"],ng=["pre","script","style","textarea"],KE={concrete:!0,name:"htmlFlow",resolveTo:PE,tokenize:VE},$E={partial:!0,tokenize:ZE},YE={partial:!0,tokenize:XE};function PE(t){let a=t.length;for(;a--&&!(t[a][0]==="enter"&&t[a][1].type==="htmlFlow"););return a>1&&t[a-2][1].type==="linePrefix"&&(t[a][1].start=t[a-2][1].start,t[a+1][1].start=t[a-2][1].start,t.splice(a-2,2)),t}function VE(t,a,r){const s=this;let o,d,u,p,h;return m;function m(N){return g(N)}function g(N){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(N),b}function b(N){return N===33?(t.consume(N),E):N===47?(t.consume(N),d=!0,A):N===63?(t.consume(N),o=3,s.interrupt?a:w):ln(N)?(t.consume(N),u=String.fromCharCode(N),O):r(N)}function E(N){return N===45?(t.consume(N),o=2,v):N===91?(t.consume(N),o=5,p=0,k):ln(N)?(t.consume(N),o=4,s.interrupt?a:w):r(N)}function v(N){return N===45?(t.consume(N),s.interrupt?a:w):r(N)}function k(N){const me="CDATA[";return N===me.charCodeAt(p++)?(t.consume(N),p===me.length?s.interrupt?a:re:k):r(N)}function A(N){return ln(N)?(t.consume(N),u=String.fromCharCode(N),O):r(N)}function O(N){if(N===null||N===47||N===62||ft(N)){const me=N===47,Ne=u.toLowerCase();return!me&&!d&&ng.includes(Ne)?(o=1,s.interrupt?a(N):re(N)):qE.includes(u.toLowerCase())?(o=6,me?(t.consume(N),S):s.interrupt?a(N):re(N)):(o=7,s.interrupt&&!s.parser.lazy[s.now().line]?r(N):d?j(N):I(N))}return N===45||Jt(N)?(t.consume(N),u+=String.fromCharCode(N),O):r(N)}function S(N){return N===62?(t.consume(N),s.interrupt?a:re):r(N)}function j(N){return Ke(N)?(t.consume(N),j):U(N)}function I(N){return N===47?(t.consume(N),U):N===58||N===95||ln(N)?(t.consume(N),Y):Ke(N)?(t.consume(N),I):U(N)}function Y(N){return N===45||N===46||N===58||N===95||Jt(N)?(t.consume(N),Y):R(N)}function R(N){return N===61?(t.consume(N),T):Ke(N)?(t.consume(N),R):I(N)}function T(N){return N===null||N===60||N===61||N===62||N===96?r(N):N===34||N===39?(t.consume(N),h=N,$):Ke(N)?(t.consume(N),T):le(N)}function $(N){return N===h?(t.consume(N),h=null,ce):N===null||Ae(N)?r(N):(t.consume(N),$)}function le(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||ft(N)?R(N):(t.consume(N),le)}function ce(N){return N===47||N===62||Ke(N)?I(N):r(N)}function U(N){return N===62?(t.consume(N),W):r(N)}function W(N){return N===null||Ae(N)?re(N):Ke(N)?(t.consume(N),W):r(N)}function re(N){return N===45&&o===2?(t.consume(N),z):N===60&&o===1?(t.consume(N),ie):N===62&&o===4?(t.consume(N),C):N===63&&o===3?(t.consume(N),w):N===93&&o===5?(t.consume(N),be):Ae(N)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check($E,P,xe)(N)):N===null||Ae(N)?(t.exit("htmlFlowData"),xe(N)):(t.consume(N),re)}function xe(N){return t.check(YE,H,P)(N)}function H(N){return t.enter("lineEnding"),t.consume(N),t.exit("lineEnding"),J}function J(N){return N===null||Ae(N)?xe(N):(t.enter("htmlFlowData"),re(N))}function z(N){return N===45?(t.consume(N),w):re(N)}function ie(N){return N===47?(t.consume(N),u="",ae):re(N)}function ae(N){if(N===62){const me=u.toLowerCase();return ng.includes(me)?(t.consume(N),C):re(N)}return ln(N)&&u.length<8?(t.consume(N),u+=String.fromCharCode(N),ae):re(N)}function be(N){return N===93?(t.consume(N),w):re(N)}function w(N){return N===62?(t.consume(N),C):N===45&&o===2?(t.consume(N),w):re(N)}function C(N){return N===null||Ae(N)?(t.exit("htmlFlowData"),P(N)):(t.consume(N),C)}function P(N){return t.exit("htmlFlow"),a(N)}}function XE(t,a,r){const s=this;return o;function o(u){return Ae(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),d):r(u)}function d(u){return s.parser.lazy[s.now().line]?r(u):a(u)}}function ZE(t,a,r){return s;function s(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(Kl,a,r)}}const QE={name:"htmlText",tokenize:JE};function JE(t,a,r){const s=this;let o,d,u;return p;function p(w){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(w),h}function h(w){return w===33?(t.consume(w),m):w===47?(t.consume(w),R):w===63?(t.consume(w),I):ln(w)?(t.consume(w),le):r(w)}function m(w){return w===45?(t.consume(w),g):w===91?(t.consume(w),d=0,k):ln(w)?(t.consume(w),j):r(w)}function g(w){return w===45?(t.consume(w),v):r(w)}function b(w){return w===null?r(w):w===45?(t.consume(w),E):Ae(w)?(u=b,ie(w)):(t.consume(w),b)}function E(w){return w===45?(t.consume(w),v):b(w)}function v(w){return w===62?z(w):w===45?E(w):b(w)}function k(w){const C="CDATA[";return w===C.charCodeAt(d++)?(t.consume(w),d===C.length?A:k):r(w)}function A(w){return w===null?r(w):w===93?(t.consume(w),O):Ae(w)?(u=A,ie(w)):(t.consume(w),A)}function O(w){return w===93?(t.consume(w),S):A(w)}function S(w){return w===62?z(w):w===93?(t.consume(w),S):A(w)}function j(w){return w===null||w===62?z(w):Ae(w)?(u=j,ie(w)):(t.consume(w),j)}function I(w){return w===null?r(w):w===63?(t.consume(w),Y):Ae(w)?(u=I,ie(w)):(t.consume(w),I)}function Y(w){return w===62?z(w):I(w)}function R(w){return ln(w)?(t.consume(w),T):r(w)}function T(w){return w===45||Jt(w)?(t.consume(w),T):$(w)}function $(w){return Ae(w)?(u=$,ie(w)):Ke(w)?(t.consume(w),$):z(w)}function le(w){return w===45||Jt(w)?(t.consume(w),le):w===47||w===62||ft(w)?ce(w):r(w)}function ce(w){return w===47?(t.consume(w),z):w===58||w===95||ln(w)?(t.consume(w),U):Ae(w)?(u=ce,ie(w)):Ke(w)?(t.consume(w),ce):z(w)}function U(w){return w===45||w===46||w===58||w===95||Jt(w)?(t.consume(w),U):W(w)}function W(w){return w===61?(t.consume(w),re):Ae(w)?(u=W,ie(w)):Ke(w)?(t.consume(w),W):ce(w)}function re(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(t.consume(w),o=w,xe):Ae(w)?(u=re,ie(w)):Ke(w)?(t.consume(w),re):(t.consume(w),H)}function xe(w){return w===o?(t.consume(w),o=void 0,J):w===null?r(w):Ae(w)?(u=xe,ie(w)):(t.consume(w),xe)}function H(w){return w===null||w===34||w===39||w===60||w===61||w===96?r(w):w===47||w===62||ft(w)?ce(w):(t.consume(w),H)}function J(w){return w===47||w===62||ft(w)?ce(w):r(w)}function z(w){return w===62?(t.consume(w),t.exit("htmlTextData"),t.exit("htmlText"),a):r(w)}function ie(w){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),ae}function ae(w){return Ke(w)?Ze(t,be,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):be(w)}function be(w){return t.enter("htmlTextData"),u(w)}}const Ud={name:"labelEnd",resolveAll:n1,resolveTo:i1,tokenize:a1},WE={tokenize:r1},e1={tokenize:l1},t1={tokenize:s1};function n1(t){let a=-1;const r=[];for(;++a<t.length;){const s=t[a][1];if(r.push(t[a]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const o=s.type==="labelImage"?4:2;s.type="data",a+=o}}return t.length!==r.length&&Cn(t,0,t.length,r),t}function i1(t,a){let r=t.length,s=0,o,d,u,p;for(;r--;)if(o=t[r][1],d){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(t[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(d=r,o.type!=="labelLink")){s=2;break}}else o.type==="labelEnd"&&(u=r);const h={type:t[d][1].type==="labelLink"?"link":"image",start:{...t[d][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[d][1].start},end:{...t[u][1].end}},g={type:"labelText",start:{...t[d+s+2][1].end},end:{...t[u-2][1].start}};return p=[["enter",h,a],["enter",m,a]],p=Fn(p,t.slice(d+1,d+s+3)),p=Fn(p,[["enter",g,a]]),p=Fn(p,Oo(a.parser.constructs.insideSpan.null,t.slice(d+s+4,u-3),a)),p=Fn(p,[["exit",g,a],t[u-2],t[u-1],["exit",m,a]]),p=Fn(p,t.slice(u+1)),p=Fn(p,[["exit",h,a]]),Cn(t,d,t.length,p),t}function a1(t,a,r){const s=this;let o=s.events.length,d,u;for(;o--;)if((s.events[o][1].type==="labelImage"||s.events[o][1].type==="labelLink")&&!s.events[o][1]._balanced){d=s.events[o][1];break}return p;function p(E){return d?d._inactive?b(E):(u=s.parser.defined.includes(Pn(s.sliceSerialize({start:d.end,end:s.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(E),t.exit("labelMarker"),t.exit("labelEnd"),h):r(E)}function h(E){return E===40?t.attempt(WE,g,u?g:b)(E):E===91?t.attempt(e1,g,u?m:b)(E):u?g(E):b(E)}function m(E){return t.attempt(t1,g,b)(E)}function g(E){return a(E)}function b(E){return d._balanced=!0,r(E)}}function r1(t,a,r){return s;function s(b){return t.enter("resource"),t.enter("resourceMarker"),t.consume(b),t.exit("resourceMarker"),o}function o(b){return ft(b)?Bl(t,d)(b):d(b)}function d(b){return b===41?g(b):hb(t,u,p,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function u(b){return ft(b)?Bl(t,h)(b):g(b)}function p(b){return r(b)}function h(b){return b===34||b===39||b===40?bb(t,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):g(b)}function m(b){return ft(b)?Bl(t,g)(b):g(b)}function g(b){return b===41?(t.enter("resourceMarker"),t.consume(b),t.exit("resourceMarker"),t.exit("resource"),a):r(b)}}function l1(t,a,r){const s=this;return o;function o(p){return gb.call(s,t,d,u,"reference","referenceMarker","referenceString")(p)}function d(p){return s.parser.defined.includes(Pn(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?a(p):r(p)}function u(p){return r(p)}}function s1(t,a,r){return s;function s(d){return t.enter("reference"),t.enter("referenceMarker"),t.consume(d),t.exit("referenceMarker"),o}function o(d){return d===93?(t.enter("referenceMarker"),t.consume(d),t.exit("referenceMarker"),t.exit("reference"),a):r(d)}}const o1={name:"labelStartImage",resolveAll:Ud.resolveAll,tokenize:c1};function c1(t,a,r){const s=this;return o;function o(p){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(p),t.exit("labelImageMarker"),d}function d(p){return p===91?(t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelImage"),u):r(p)}function u(p){return p===94&&"_hiddenFootnoteSupport"in s.parser.constructs?r(p):a(p)}}const u1={name:"labelStartLink",resolveAll:Ud.resolveAll,tokenize:d1};function d1(t,a,r){const s=this;return o;function o(u){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(u),t.exit("labelMarker"),t.exit("labelLink"),d}function d(u){return u===94&&"_hiddenFootnoteSupport"in s.parser.constructs?r(u):a(u)}}const $u={name:"lineEnding",tokenize:f1};function f1(t,a){return r;function r(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),Ze(t,a,"linePrefix")}}const vo={name:"thematicBreak",tokenize:p1};function p1(t,a,r){let s=0,o;return d;function d(m){return t.enter("thematicBreak"),u(m)}function u(m){return o=m,p(m)}function p(m){return m===o?(t.enter("thematicBreakSequence"),h(m)):s>=3&&(m===null||Ae(m))?(t.exit("thematicBreak"),a(m)):r(m)}function h(m){return m===o?(t.consume(m),s++,h):(t.exit("thematicBreakSequence"),Ke(m)?Ze(t,p,"whitespace")(m):p(m))}}const gn={continuation:{tokenize:b1},exit:x1,name:"list",tokenize:g1},m1={partial:!0,tokenize:v1},h1={partial:!0,tokenize:y1};function g1(t,a,r){const s=this,o=s.events[s.events.length-1];let d=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return p;function p(v){const k=s.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!s.containerState.marker||v===s.containerState.marker:gd(v)){if(s.containerState.type||(s.containerState.type=k,t.enter(k,{_container:!0})),k==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(vo,r,m)(v):m(v);if(!s.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),h(v)}return r(v)}function h(v){return gd(v)&&++u<10?(t.consume(v),h):(!s.interrupt||u<2)&&(s.containerState.marker?v===s.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):r(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||v,t.check(Kl,s.interrupt?r:g,t.attempt(m1,E,b))}function g(v){return s.containerState.initialBlankLine=!0,d++,E(v)}function b(v){return Ke(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),E):r(v)}function E(v){return s.containerState.size=d+s.sliceSerialize(t.exit("listItemPrefix"),!0).length,a(v)}}function b1(t,a,r){const s=this;return s.containerState._closeFlow=void 0,t.check(Kl,o,d);function o(p){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,Ze(t,a,"listItemIndent",s.containerState.size+1)(p)}function d(p){return s.containerState.furtherBlankLines||!Ke(p)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,u(p)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,t.attempt(h1,a,u)(p))}function u(p){return s.containerState._closeFlow=!0,s.interrupt=void 0,Ze(t,t.attempt(gn,a,r),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p)}}function y1(t,a,r){const s=this;return Ze(t,o,"listItemIndent",s.containerState.size+1);function o(d){const u=s.events[s.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===s.containerState.size?a(d):r(d)}}function x1(t){t.exit(this.containerState.type)}function v1(t,a,r){const s=this;return Ze(t,o,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(d){const u=s.events[s.events.length-1];return!Ke(d)&&u&&u[1].type==="listItemPrefixWhitespace"?a(d):r(d)}}const ig={name:"setextUnderline",resolveTo:E1,tokenize:_1};function E1(t,a){let r=t.length,s,o,d;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){s=r;break}t[r][1].type==="paragraph"&&(o=r)}else t[r][1].type==="content"&&t.splice(r,1),!d&&t[r][1].type==="definition"&&(d=r);const u={type:"setextHeading",start:{...t[s][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",d?(t.splice(o,0,["enter",u,a]),t.splice(d+1,0,["exit",t[s][1],a]),t[s][1].end={...t[d][1].end}):t[s][1]=u,t.push(["exit",u,a]),t}function _1(t,a,r){const s=this;let o;return d;function d(m){let g=s.events.length,b;for(;g--;)if(s.events[g][1].type!=="lineEnding"&&s.events[g][1].type!=="linePrefix"&&s.events[g][1].type!=="content"){b=s.events[g][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||b)?(t.enter("setextHeadingLine"),o=m,u(m)):r(m)}function u(m){return t.enter("setextHeadingLineSequence"),p(m)}function p(m){return m===o?(t.consume(m),p):(t.exit("setextHeadingLineSequence"),Ke(m)?Ze(t,h,"lineSuffix")(m):h(m))}function h(m){return m===null||Ae(m)?(t.exit("setextHeadingLine"),a(m)):r(m)}}const S1={tokenize:k1};function k1(t){const a=this,r=t.attempt(Kl,s,t.attempt(this.parser.constructs.flowInitial,o,Ze(t,t.attempt(this.parser.constructs.flow,o,t.attempt(CE,o)),"linePrefix")));return r;function s(d){if(d===null){t.consume(d);return}return t.enter("lineEndingBlank"),t.consume(d),t.exit("lineEndingBlank"),a.currentConstruct=void 0,r}function o(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),a.currentConstruct=void 0,r}}const N1={resolveAll:xb()},T1=yb("string"),w1=yb("text");function yb(t){return{resolveAll:xb(t==="text"?A1:void 0),tokenize:a};function a(r){const s=this,o=this.parser.constructs[t],d=r.attempt(o,u,p);return u;function u(g){return m(g)?d(g):p(g)}function p(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),h}function h(g){return m(g)?(r.exit("data"),d(g)):(r.consume(g),h)}function m(g){if(g===null)return!0;const b=o[g];let E=-1;if(b)for(;++E<b.length;){const v=b[E];if(!v.previous||v.previous.call(s,s.previous))return!0}return!1}}}function xb(t){return a;function a(r,s){let o=-1,d;for(;++o<=r.length;)d===void 0?r[o]&&r[o][1].type==="data"&&(d=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==d+2&&(r[d][1].end=r[o-1][1].end,r.splice(d+2,o-d-2),o=d+2),d=void 0);return t?t(r,s):r}}function A1(t,a){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const s=t[r-1][1],o=a.sliceStream(s);let d=o.length,u=-1,p=0,h;for(;d--;){const m=o[d];if(typeof m=="string"){for(u=m.length;m.charCodeAt(u-1)===32;)p++,u--;if(u)break;u=-1}else if(m===-2)h=!0,p++;else if(m!==-1){d++;break}}if(a._contentTypeTextTrailing&&r===t.length&&(p=0),p){const m={type:r===t.length||h||p<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:d?u:s.start._bufferIndex+u,_index:s.start._index+d,line:s.end.line,column:s.end.column-p,offset:s.end.offset-p},end:{...s.end}};s.end={...m.start},s.start.offset===s.end.offset?Object.assign(s,m):(t.splice(r,0,["enter",m,a],["exit",m,a]),r+=2)}r++}return t}const C1={42:gn,43:gn,45:gn,48:gn,49:gn,50:gn,51:gn,52:gn,53:gn,54:gn,55:gn,56:gn,57:gn,62:db},O1={91:LE},M1={[-2]:Ku,[-1]:Ku,32:Ku},R1={35:HE,42:vo,45:[ig,vo],60:KE,61:ig,95:vo,96:tg,126:tg},D1={38:pb,92:fb},L1={[-5]:$u,[-4]:$u,[-3]:$u,33:o1,38:pb,42:bd,60:[uE,QE],91:u1,92:[UE,fb],93:Ud,95:bd,96:SE},I1={null:[bd,N1]},z1={null:[42,95]},B1={null:[]},U1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:z1,contentInitial:O1,disable:B1,document:C1,flow:R1,flowInitial:M1,insideSpan:I1,string:D1,text:L1},Symbol.toStringTag,{value:"Module"}));function j1(t,a,r){let s={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},d=[];let u=[],p=[];const h={attempt:$(R),check:$(T),consume:j,enter:I,exit:Y,interrupt:$(T,{interrupt:!0})},m={code:null,containerState:{},defineSkip:A,events:[],now:k,parser:t,previous:null,sliceSerialize:E,sliceStream:v,write:b};let g=a.tokenize.call(m,h);return a.resolveAll&&d.push(a),m;function b(W){return u=Fn(u,W),O(),u[u.length-1]!==null?[]:(le(a,0),m.events=Oo(d,m.events,m),m.events)}function E(W,re){return F1(v(W),re)}function v(W){return H1(u,W)}function k(){const{_bufferIndex:W,_index:re,line:xe,column:H,offset:J}=s;return{_bufferIndex:W,_index:re,line:xe,column:H,offset:J}}function A(W){o[W.line]=W.column,U()}function O(){let W;for(;s._index<u.length;){const re=u[s._index];if(typeof re=="string")for(W=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===W&&s._bufferIndex<re.length;)S(re.charCodeAt(s._bufferIndex));else S(re)}}function S(W){g=g(W)}function j(W){Ae(W)?(s.line++,s.column=1,s.offset+=W===-3?2:1,U()):W!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===u[s._index].length&&(s._bufferIndex=-1,s._index++)),m.previous=W}function I(W,re){const xe=re||{};return xe.type=W,xe.start=k(),m.events.push(["enter",xe,m]),p.push(xe),xe}function Y(W){const re=p.pop();return re.end=k(),m.events.push(["exit",re,m]),re}function R(W,re){le(W,re.from)}function T(W,re){re.restore()}function $(W,re){return xe;function xe(H,J,z){let ie,ae,be,w;return Array.isArray(H)?P(H):"tokenize"in H?P([H]):C(H);function C(K){return se;function se(ye){const ge=ye!==null&&K[ye],De=ye!==null&&K.null,xt=[...Array.isArray(ge)?ge:ge?[ge]:[],...Array.isArray(De)?De:De?[De]:[]];return P(xt)(ye)}}function P(K){return ie=K,ae=0,K.length===0?z:N(K[ae])}function N(K){return se;function se(ye){return w=ce(),be=K,K.partial||(m.currentConstruct=K),K.name&&m.parser.constructs.disable.null.includes(K.name)?Ne():K.tokenize.call(re?Object.assign(Object.create(m),re):m,h,me,Ne)(ye)}}function me(K){return W(be,w),J}function Ne(K){return w.restore(),++ae<ie.length?N(ie[ae]):z}}}function le(W,re){W.resolveAll&&!d.includes(W)&&d.push(W),W.resolve&&Cn(m.events,re,m.events.length-re,W.resolve(m.events.slice(re),m)),W.resolveTo&&(m.events=W.resolveTo(m.events,m))}function ce(){const W=k(),re=m.previous,xe=m.currentConstruct,H=m.events.length,J=Array.from(p);return{from:H,restore:z};function z(){s=W,m.previous=re,m.currentConstruct=xe,m.events.length=H,p=J,U()}}function U(){s.line in o&&s.column<2&&(s.column=o[s.line],s.offset+=o[s.line]-1)}}function H1(t,a){const r=a.start._index,s=a.start._bufferIndex,o=a.end._index,d=a.end._bufferIndex;let u;if(r===o)u=[t[r].slice(s,d)];else{if(u=t.slice(r,o),s>-1){const p=u[0];typeof p=="string"?u[0]=p.slice(s):u.shift()}d>0&&u.push(t[o].slice(0,d))}return u}function F1(t,a){let r=-1;const s=[];let o;for(;++r<t.length;){const d=t[r];let u;if(typeof d=="string")u=d;else switch(d){case-5:{u="\r";break}case-4:{u=`
|
|
51
|
+
`;break}case-3:{u=`\r
|
|
52
|
+
`;break}case-2:{u=a?" ":" ";break}case-1:{if(!a&&o)continue;u=" ";break}default:u=String.fromCharCode(d)}o=d===-2,s.push(u)}return s.join("")}function G1(t){const s={constructs:cb([U1,...(t||{}).extensions||[]]),content:o(iE),defined:[],document:o(rE),flow:o(S1),lazy:{},string:o(T1),text:o(w1)};return s;function o(d){return u;function u(p){return j1(s,d,p)}}}function q1(t){for(;!mb(t););return t}const ag=/[\0\t\n\r]/g;function K1(){let t=1,a="",r=!0,s;return o;function o(d,u,p){const h=[];let m,g,b,E,v;for(d=a+(typeof d=="string"?d.toString():new TextDecoder(u||void 0).decode(d)),b=0,a="",r&&(d.charCodeAt(0)===65279&&b++,r=void 0);b<d.length;){if(ag.lastIndex=b,m=ag.exec(d),E=m&&m.index!==void 0?m.index:d.length,v=d.charCodeAt(E),!m){a=d.slice(b);break}if(v===10&&b===E&&s)h.push(-3),s=void 0;else switch(s&&(h.push(-5),s=void 0),b<E&&(h.push(d.slice(b,E)),t+=E-b),v){case 0:{h.push(65533),t++;break}case 9:{for(g=Math.ceil(t/4)*4,h.push(-2);t++<g;)h.push(-1);break}case 10:{h.push(-4),t=1;break}default:s=!0,t=1}b=E+1}return p&&(s&&h.push(-5),a&&h.push(a),h.push(null)),h}}const $1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Y1(t){return t.replace($1,P1)}function P1(t,a,r){if(a)return a;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),d=o===120||o===88;return ub(r.slice(d?2:1),d?16:10)}return Bd(r)||t}const vb={}.hasOwnProperty;function V1(t,a,r){return typeof a!="string"&&(r=a,a=void 0),X1(r)(q1(G1(r).document().write(K1()(t,a,!0))))}function X1(t){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:d(Xn),autolinkProtocol:ce,autolinkEmail:ce,atxHeading:d(Vn),blockQuote:d(De),characterEscape:ce,characterReference:ce,codeFenced:d(xt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:d(xt,u),codeText:d(kt,u),codeTextData:ce,data:ce,codeFlowValue:ce,definition:d(wi),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:d(yn),hardBreakEscape:d(Ve),hardBreakTrailing:d(Ve),htmlFlow:d(Gn,u),htmlFlowData:ce,htmlText:d(Gn,u),htmlTextData:ce,image:d(On),label:u,link:d(Xn),listItem:d(oa),listItemValue:E,listOrdered:d(ri,b),listUnordered:d(ri),paragraph:d(Rr),reference:N,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:d(Vn),strong:d(La),thematicBreak:d(Ia)},exit:{atxHeading:h(),atxHeadingSequence:R,autolink:h(),autolinkEmail:ge,autolinkProtocol:ye,blockQuote:h(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:K,characterReference:se,codeFenced:h(O),codeFencedFence:A,codeFencedFenceInfo:v,codeFencedFenceMeta:k,codeFlowValue:U,codeIndented:h(S),codeText:h(J),codeTextData:U,data:U,definition:h(),definitionDestinationString:Y,definitionLabelString:j,definitionTitleString:I,emphasis:h(),hardBreakEscape:h(re),hardBreakTrailing:h(re),htmlFlow:h(xe),htmlFlowData:U,htmlText:h(H),htmlTextData:U,image:h(ie),label:be,labelText:ae,lineEnding:W,link:h(z),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:me,resourceDestinationString:w,resourceTitleString:C,resource:P,setextHeading:h(le),setextHeadingLineSequence:$,setextHeadingText:T,strong:h(),thematicBreak:h()}};Eb(a,(t||{}).mdastExtensions||[]);const r={};return s;function s(Z){let fe={type:"root",children:[]};const Ce={stack:[fe],tokenStack:[],config:a,enter:p,exit:m,buffer:u,resume:g,data:r},He=[];let Qe=-1;for(;++Qe<Z.length;)if(Z[Qe][1].type==="listOrdered"||Z[Qe][1].type==="listUnordered")if(Z[Qe][0]==="enter")He.push(Qe);else{const en=He.pop();Qe=o(Z,en,Qe)}for(Qe=-1;++Qe<Z.length;){const en=a[Z[Qe][0]];vb.call(en,Z[Qe][1].type)&&en[Z[Qe][1].type].call(Object.assign({sliceSerialize:Z[Qe][2].sliceSerialize},Ce),Z[Qe][1])}if(Ce.tokenStack.length>0){const en=Ce.tokenStack[Ce.tokenStack.length-1];(en[1]||rg).call(Ce,void 0,en[0])}for(fe.position={start:na(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:na(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Qe=-1;++Qe<a.transforms.length;)fe=a.transforms[Qe](fe)||fe;return fe}function o(Z,fe,Ce){let He=fe-1,Qe=-1,en=!1,qn,Gt,Nt,Vt;for(;++He<=Ce;){const tt=Z[He];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Qe++:Qe--,Vt=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(qn&&!Vt&&!Qe&&!Nt&&(Nt=He),Vt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vt=void 0}if(!Qe&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Qe===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(qn){let Zn=He;for(Gt=void 0;Zn--;){const tn=Z[Zn];if(tn[1].type==="lineEnding"||tn[1].type==="lineEndingBlank"){if(tn[0]==="exit")continue;Gt&&(Z[Gt][1].type="lineEndingBlank",en=!0),tn[1].type="lineEnding",Gt=Zn}else if(!(tn[1].type==="linePrefix"||tn[1].type==="blockQuotePrefix"||tn[1].type==="blockQuotePrefixWhitespace"||tn[1].type==="blockQuoteMarker"||tn[1].type==="listItemIndent"))break}Nt&&(!Gt||Nt<Gt)&&(qn._spread=!0),qn.end=Object.assign({},Gt?Z[Gt][1].start:tt[1].end),Z.splice(Gt||He,0,["exit",qn,tt[2]]),He++,Ce++}if(tt[1].type==="listItemPrefix"){const Zn={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};qn=Zn,Z.splice(He,0,["enter",Zn,tt[2]]),He++,Ce++,Nt=void 0,Vt=!0}}}return Z[fe][1]._spread=en,Ce}function d(Z,fe){return Ce;function Ce(He){p.call(this,Z(He),He),fe&&fe.call(this,He)}}function u(){this.stack.push({type:"fragment",children:[]})}function p(Z,fe,Ce){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([fe,Ce||void 0]),Z.position={start:na(fe.start),end:void 0}}function h(Z){return fe;function fe(Ce){Z&&Z.call(this,Ce),m.call(this,Ce)}}function m(Z,fe){const Ce=this.stack.pop(),He=this.tokenStack.pop();if(He)He[0].type!==Z.type&&(fe?fe.call(this,Z,He[0]):(He[1]||rg).call(this,Z,He[0]));else throw new Error("Cannot close `"+Z.type+"` ("+zl({start:Z.start,end:Z.end})+"): it’s not open");Ce.position.end=na(Z.end)}function g(){return zd(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function E(Z){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function v(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=Z}function k(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=Z}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function O(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.value=Z.replace(/(\r?\n|\r)$/g,"")}function j(Z){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Pn(this.sliceSerialize(Z)).toLowerCase()}function I(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.title=Z}function Y(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.url=Z}function R(Z){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Ce=this.sliceSerialize(Z).length;fe.depth=Ce}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function $(Z){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function le(){this.data.setextHeadingSlurpLineEnding=void 0}function ce(Z){const Ce=this.stack[this.stack.length-1].children;let He=Ce[Ce.length-1];(!He||He.type!=="text")&&(He=_t(),He.position={start:na(Z.start),end:void 0},Ce.push(He)),this.stack.push(He)}function U(Z){const fe=this.stack.pop();fe.value+=this.sliceSerialize(Z),fe.position.end=na(Z.end)}function W(Z){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=fe.children[fe.children.length-1];Ce.position.end=na(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(fe.type)&&(ce.call(this,Z),U.call(this,Z))}function re(){this.data.atHardBreak=!0}function xe(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.value=Z}function H(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.value=Z}function J(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.value=Z}function z(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=fe,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function ie(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=fe,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function ae(Z){const fe=this.sliceSerialize(Z),Ce=this.stack[this.stack.length-2];Ce.label=Y1(fe),Ce.identifier=Pn(fe).toLowerCase()}function be(){const Z=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 He=Z.children;Ce.children=He}else Ce.alt=fe}function w(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.url=Z}function C(){const Z=this.resume(),fe=this.stack[this.stack.length-1];fe.title=Z}function P(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function me(Z){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Pn(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function Ne(Z){this.data.characterReferenceType=Z.type}function K(Z){const fe=this.sliceSerialize(Z),Ce=this.data.characterReferenceType;let He;Ce?(He=ub(fe,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):He=Bd(fe);const Qe=this.stack[this.stack.length-1];Qe.value+=He}function se(Z){const fe=this.stack.pop();fe.position.end=na(Z.end)}function ye(Z){U.call(this,Z);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(Z)}function ge(Z){U.call(this,Z);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(Z)}function De(){return{type:"blockquote",children:[]}}function xt(){return{type:"code",lang:null,meta:null,value:""}}function kt(){return{type:"inlineCode",value:""}}function wi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function yn(){return{type:"emphasis",children:[]}}function Vn(){return{type:"heading",depth:0,children:[]}}function Ve(){return{type:"break"}}function Gn(){return{type:"html",value:""}}function On(){return{type:"image",title:null,url:"",alt:null}}function Xn(){return{type:"link",title:null,url:"",children:[]}}function ri(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function oa(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Rr(){return{type:"paragraph",children:[]}}function La(){return{type:"strong",children:[]}}function _t(){return{type:"text",value:""}}function Ia(){return{type:"thematicBreak"}}}function na(t){return{line:t.line,column:t.column,offset:t.offset}}function Eb(t,a){let r=-1;for(;++r<a.length;){const s=a[r];Array.isArray(s)?Eb(t,s):Z1(t,s)}}function Z1(t,a){let r;for(r in a)if(vb.call(a,r))switch(r){case"canContainEols":{const s=a[r];s&&t[r].push(...s);break}case"transforms":{const s=a[r];s&&t[r].push(...s);break}case"enter":case"exit":{const s=a[r];s&&Object.assign(t[r],s);break}}}function rg(t,a){throw t?new Error("Cannot close `"+t.type+"` ("+zl({start:t.start,end:t.end})+"): a different token (`"+a.type+"`, "+zl({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+zl({start:a.start,end:a.end})+") is still open")}function Q1(t){const a=this;a.parser=r;function r(s){return V1(s,{...a.data("settings"),...t,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function J1(t,a){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(a),!0)};return t.patch(a,r),t.applyData(a,r)}function W1(t,a){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(a,r),[t.applyData(a,r),{type:"text",value:`
|
|
53
|
+
`}]}function e_(t,a){const r=a.value?a.value+`
|
|
54
|
+
`:"",s={},o=a.lang?a.lang.split(/\s+/):[];o.length>0&&(s.className=["language-"+o[0]]);let d={type:"element",tagName:"code",properties:s,children:[{type:"text",value:r}]};return a.meta&&(d.data={meta:a.meta}),t.patch(a,d),d=t.applyData(a,d),d={type:"element",tagName:"pre",properties:{},children:[d]},t.patch(a,d),d}function t_(t,a){const r={type:"element",tagName:"del",properties:{},children:t.all(a)};return t.patch(a,r),t.applyData(a,r)}function n_(t,a){const r={type:"element",tagName:"em",properties:{},children:t.all(a)};return t.patch(a,r),t.applyData(a,r)}function i_(t,a){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",s=String(a.identifier).toUpperCase(),o=Mr(s.toLowerCase()),d=t.footnoteOrder.indexOf(s);let u,p=t.footnoteCounts.get(s);p===void 0?(p=0,t.footnoteOrder.push(s),u=t.footnoteOrder.length):u=d+1,p+=1,t.footnoteCounts.set(s,p);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(p>1?"-"+p:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};t.patch(a,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return t.patch(a,m),t.applyData(a,m)}function a_(t,a){const r={type:"element",tagName:"h"+a.depth,properties:{},children:t.all(a)};return t.patch(a,r),t.applyData(a,r)}function r_(t,a){if(t.options.allowDangerousHtml){const r={type:"raw",value:a.value};return t.patch(a,r),t.applyData(a,r)}}function _b(t,a){const r=a.referenceType;let s="]";if(r==="collapsed"?s+="[]":r==="full"&&(s+="["+(a.label||a.identifier)+"]"),a.type==="imageReference")return[{type:"text",value:"!["+a.alt+s}];const o=t.all(a),d=o[0];d&&d.type==="text"?d.value="["+d.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=s:o.push({type:"text",value:s}),o}function l_(t,a){const r=String(a.identifier).toUpperCase(),s=t.definitionById.get(r);if(!s)return _b(t,a);const o={src:Mr(s.url||""),alt:a.alt};s.title!==null&&s.title!==void 0&&(o.title=s.title);const d={type:"element",tagName:"img",properties:o,children:[]};return t.patch(a,d),t.applyData(a,d)}function s_(t,a){const r={src:Mr(a.url)};a.alt!==null&&a.alt!==void 0&&(r.alt=a.alt),a.title!==null&&a.title!==void 0&&(r.title=a.title);const s={type:"element",tagName:"img",properties:r,children:[]};return t.patch(a,s),t.applyData(a,s)}function o_(t,a){const r={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};t.patch(a,r);const s={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(a,s),t.applyData(a,s)}function c_(t,a){const r=String(a.identifier).toUpperCase(),s=t.definitionById.get(r);if(!s)return _b(t,a);const o={href:Mr(s.url||"")};s.title!==null&&s.title!==void 0&&(o.title=s.title);const d={type:"element",tagName:"a",properties:o,children:t.all(a)};return t.patch(a,d),t.applyData(a,d)}function u_(t,a){const r={href:Mr(a.url)};a.title!==null&&a.title!==void 0&&(r.title=a.title);const s={type:"element",tagName:"a",properties:r,children:t.all(a)};return t.patch(a,s),t.applyData(a,s)}function d_(t,a,r){const s=t.all(a),o=r?f_(r):Sb(a),d={},u=[];if(typeof a.checked=="boolean"){const g=s[0];let b;g&&g.type==="element"&&g.tagName==="p"?b=g:(b={type:"element",tagName:"p",properties:{},children:[]},s.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:a.checked,disabled:!0},children:[]}),d.className=["task-list-item"]}let p=-1;for(;++p<s.length;){const g=s[p];(o||p!==0||g.type!=="element"||g.tagName!=="p")&&u.push({type:"text",value:`
|
|
55
|
+
`}),g.type==="element"&&g.tagName==="p"&&!o?u.push(...g.children):u.push(g)}const h=s[s.length-1];h&&(o||h.type!=="element"||h.tagName!=="p")&&u.push({type:"text",value:`
|
|
56
|
+
`});const m={type:"element",tagName:"li",properties:d,children:u};return t.patch(a,m),t.applyData(a,m)}function f_(t){let a=!1;if(t.type==="list"){a=t.spread||!1;const r=t.children;let s=-1;for(;!a&&++s<r.length;)a=Sb(r[s])}return a}function Sb(t){const a=t.spread;return a??t.children.length>1}function p_(t,a){const r={},s=t.all(a);let o=-1;for(typeof a.start=="number"&&a.start!==1&&(r.start=a.start);++o<s.length;){const u=s[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const d={type:"element",tagName:a.ordered?"ol":"ul",properties:r,children:t.wrap(s,!0)};return t.patch(a,d),t.applyData(a,d)}function m_(t,a){const r={type:"element",tagName:"p",properties:{},children:t.all(a)};return t.patch(a,r),t.applyData(a,r)}function h_(t,a){const r={type:"root",children:t.wrap(t.all(a))};return t.patch(a,r),t.applyData(a,r)}function g_(t,a){const r={type:"element",tagName:"strong",properties:{},children:t.all(a)};return t.patch(a,r),t.applyData(a,r)}function b_(t,a){const r=t.all(a),s=r.shift(),o=[];if(s){const u={type:"element",tagName:"thead",properties:{},children:t.wrap([s],!0)};t.patch(a.children[0],u),o.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},p=Rd(a.children[1]),h=nb(a.children[a.children.length-1]);p&&h&&(u.position={start:p,end:h}),o.push(u)}const d={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(a,d),t.applyData(a,d)}function y_(t,a,r){const s=r?r.children:void 0,d=(s?s.indexOf(a):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,p=u?u.length:a.children.length;let h=-1;const m=[];for(;++h<p;){const b=a.children[h],E={},v=u?u[h]:void 0;v&&(E.align=v);let k={type:"element",tagName:d,properties:E,children:[]};b&&(k.children=t.all(b),t.patch(b,k),k=t.applyData(b,k)),m.push(k)}const g={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(a,g),t.applyData(a,g)}function x_(t,a){const r={type:"element",tagName:"td",properties:{},children:t.all(a)};return t.patch(a,r),t.applyData(a,r)}const lg=9,sg=32;function v_(t){const a=String(t),r=/\r?\n|\r/g;let s=r.exec(a),o=0;const d=[];for(;s;)d.push(og(a.slice(o,s.index),o>0,!0),s[0]),o=s.index+s[0].length,s=r.exec(a);return d.push(og(a.slice(o),o>0,!1)),d.join("")}function og(t,a,r){let s=0,o=t.length;if(a){let d=t.codePointAt(s);for(;d===lg||d===sg;)s++,d=t.codePointAt(s)}if(r){let d=t.codePointAt(o-1);for(;d===lg||d===sg;)o--,d=t.codePointAt(o-1)}return o>s?t.slice(s,o):""}function E_(t,a){const r={type:"text",value:v_(String(a.value))};return t.patch(a,r),t.applyData(a,r)}function __(t,a){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(a,r),t.applyData(a,r)}const S_={blockquote:J1,break:W1,code:e_,delete:t_,emphasis:n_,footnoteReference:i_,heading:a_,html:r_,imageReference:l_,image:s_,inlineCode:o_,linkReference:c_,link:u_,listItem:d_,list:p_,paragraph:m_,root:h_,strong:g_,table:b_,tableCell:x_,tableRow:y_,text:E_,thematicBreak:__,toml:co,yaml:co,definition:co,footnoteDefinition:co};function co(){}const kb=-1,Mo=0,Ul=1,ko=2,jd=3,Hd=4,Fd=5,Gd=6,Nb=7,Tb=8,cg=typeof self=="object"?self:globalThis,k_=(t,a)=>{const r=(o,d)=>(t.set(d,o),o),s=o=>{if(t.has(o))return t.get(o);const[d,u]=a[o];switch(d){case Mo:case kb:return r(u,o);case Ul:{const p=r([],o);for(const h of u)p.push(s(h));return p}case ko:{const p=r({},o);for(const[h,m]of u)p[s(h)]=s(m);return p}case jd:return r(new Date(u),o);case Hd:{const{source:p,flags:h}=u;return r(new RegExp(p,h),o)}case Fd:{const p=r(new Map,o);for(const[h,m]of u)p.set(s(h),s(m));return p}case Gd:{const p=r(new Set,o);for(const h of u)p.add(s(h));return p}case Nb:{const{name:p,message:h}=u;return r(new cg[p](h),o)}case Tb:return r(BigInt(u),o);case"BigInt":return r(Object(BigInt(u)),o);case"ArrayBuffer":return r(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:p}=new Uint8Array(u);return r(new DataView(p),u)}}return r(new cg[d](u),o)};return s},ug=t=>k_(new Map,t)(0),_r="",{toString:N_}={},{keys:T_}=Object,Rl=t=>{const a=typeof t;if(a!=="object"||!t)return[Mo,a];const r=N_.call(t).slice(8,-1);switch(r){case"Array":return[Ul,_r];case"Object":return[ko,_r];case"Date":return[jd,_r];case"RegExp":return[Hd,_r];case"Map":return[Fd,_r];case"Set":return[Gd,_r];case"DataView":return[Ul,r]}return r.includes("Array")?[Ul,r]:r.includes("Error")?[Nb,r]:[ko,r]},uo=([t,a])=>t===Mo&&(a==="function"||a==="symbol"),w_=(t,a,r,s)=>{const o=(u,p)=>{const h=s.push(u)-1;return r.set(p,h),h},d=u=>{if(r.has(u))return r.get(u);let[p,h]=Rl(u);switch(p){case Mo:{let g=u;switch(h){case"bigint":p=Tb,g=u.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+h);g=null;break;case"undefined":return o([kb],u)}return o([p,g],u)}case Ul:{if(h){let E=u;return h==="DataView"?E=new Uint8Array(u.buffer):h==="ArrayBuffer"&&(E=new Uint8Array(u)),o([h,[...E]],u)}const g=[],b=o([p,g],u);for(const E of u)g.push(d(E));return b}case ko:{if(h)switch(h){case"BigInt":return o([h,u.toString()],u);case"Boolean":case"Number":case"String":return o([h,u.valueOf()],u)}if(a&&"toJSON"in u)return d(u.toJSON());const g=[],b=o([p,g],u);for(const E of T_(u))(t||!uo(Rl(u[E])))&&g.push([d(E),d(u[E])]);return b}case jd:return o([p,u.toISOString()],u);case Hd:{const{source:g,flags:b}=u;return o([p,{source:g,flags:b}],u)}case Fd:{const g=[],b=o([p,g],u);for(const[E,v]of u)(t||!(uo(Rl(E))||uo(Rl(v))))&&g.push([d(E),d(v)]);return b}case Gd:{const g=[],b=o([p,g],u);for(const E of u)(t||!uo(Rl(E)))&&g.push(d(E));return b}}const{message:m}=u;return o([p,{name:h,message:m}],u)};return d},dg=(t,{json:a,lossy:r}={})=>{const s=[];return w_(!(a||r),!!a,new Map,s)(t),s},No=typeof structuredClone=="function"?(t,a)=>a&&("json"in a||"lossy"in a)?ug(dg(t,a)):structuredClone(t):(t,a)=>ug(dg(t,a));function A_(t,a){const r=[{type:"text",value:"↩"}];return a>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(a)}]}),r}function C_(t,a){return"Back to reference "+(t+1)+(a>1?"-"+a:"")}function O_(t){const a=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||A_,s=t.options.footnoteBackLabel||C_,o=t.options.footnoteLabel||"Footnotes",d=t.options.footnoteLabelTagName||"h2",u=t.options.footnoteLabelProperties||{className:["sr-only"]},p=[];let h=-1;for(;++h<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[h]);if(!m)continue;const g=t.all(m),b=String(m.identifier).toUpperCase(),E=Mr(b.toLowerCase());let v=0;const k=[],A=t.footnoteCounts.get(b);for(;A!==void 0&&++v<=A;){k.length>0&&k.push({type:"text",value:" "});let j=typeof r=="string"?r:r(h,v);typeof j=="string"&&(j={type:"text",value:j}),k.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+E+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(h,v),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const O=g[g.length-1];if(O&&O.type==="element"&&O.tagName==="p"){const j=O.children[O.children.length-1];j&&j.type==="text"?j.value+=" ":O.children.push({type:"text",value:" "}),O.children.push(...k)}else g.push(...k);const S={type:"element",tagName:"li",properties:{id:a+"fn-"+E},children:t.wrap(g,!0)};t.patch(m,S),p.push(S)}if(p.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:d,properties:{...No(u),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
57
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(p,!0)},{type:"text",value:`
|
|
58
|
+
`}]}}const $l=(function(t){if(t==null)return L_;if(typeof t=="function")return Ro(t);if(typeof t=="object")return Array.isArray(t)?M_(t):R_(t);if(typeof t=="string")return D_(t);throw new Error("Expected function, string, or object as test")});function M_(t){const a=[];let r=-1;for(;++r<t.length;)a[r]=$l(t[r]);return Ro(s);function s(...o){let d=-1;for(;++d<a.length;)if(a[d].apply(this,o))return!0;return!1}}function R_(t){const a=t;return Ro(r);function r(s){const o=s;let d;for(d in t)if(o[d]!==a[d])return!1;return!0}}function D_(t){return Ro(a);function a(r){return r&&r.type===t}}function Ro(t){return a;function a(r,s,o){return!!(I_(r)&&t.call(this,r,typeof s=="number"?s:void 0,o||void 0))}}function L_(){return!0}function I_(t){return t!==null&&typeof t=="object"&&"type"in t}const wb=[],z_=!0,yd=!1,B_="skip";function Ab(t,a,r,s){let o;typeof a=="function"&&typeof r!="function"?(s=r,r=a):o=a;const d=$l(o),u=s?-1:1;p(t,void 0,[])();function p(h,m,g){const b=h&&typeof h=="object"?h:{};if(typeof b.type=="string"){const v=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(h.type+(v?"<"+v+">":""))+")"})}return E;function E(){let v=wb,k,A,O;if((!a||d(h,m,g[g.length-1]||void 0))&&(v=U_(r(h,g)),v[0]===yd))return v;if("children"in h&&h.children){const S=h;if(S.children&&v[0]!==B_)for(A=(s?S.children.length:-1)+u,O=g.concat(S);A>-1&&A<S.children.length;){const j=S.children[A];if(k=p(j,A,O)(),k[0]===yd)return k;A=typeof k[1]=="number"?k[1]:A+u}}return v}}}function U_(t){return Array.isArray(t)?t:typeof t=="number"?[z_,t]:t==null?wb:[t]}function Do(t,a,r,s){let o,d,u;typeof a=="function"&&typeof r!="function"?(d=void 0,u=a,o=r):(d=a,u=r,o=s),Ab(t,d,p,o);function p(h,m){const g=m[m.length-1],b=g?g.children.indexOf(h):void 0;return u(h,b,g)}}const xd={}.hasOwnProperty,j_={};function H_(t,a){const r=a||j_,s=new Map,o=new Map,d=new Map,u={...S_,...r.handlers},p={all:m,applyData:G_,definitionById:s,footnoteById:o,footnoteCounts:d,footnoteOrder:[],handlers:u,one:h,options:r,patch:F_,wrap:K_};return Do(t,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const b=g.type==="definition"?s:o,E=String(g.identifier).toUpperCase();b.has(E)||b.set(E,g)}}),p;function h(g,b){const E=g.type,v=p.handlers[E];if(xd.call(p.handlers,E)&&v)return v(p,g,b);if(p.options.passThrough&&p.options.passThrough.includes(E)){if("children"in g){const{children:A,...O}=g,S=No(O);return S.children=p.all(g),S}return No(g)}return(p.options.unknownHandler||q_)(p,g,b)}function m(g){const b=[];if("children"in g){const E=g.children;let v=-1;for(;++v<E.length;){const k=p.one(E[v],g);if(k){if(v&&E[v-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=fg(k.value)),!Array.isArray(k)&&k.type==="element")){const A=k.children[0];A&&A.type==="text"&&(A.value=fg(A.value))}Array.isArray(k)?b.push(...k):b.push(k)}}}return b}}function F_(t,a){t.position&&(a.position=C0(t))}function G_(t,a){let r=a;if(t&&t.data){const s=t.data.hName,o=t.data.hChildren,d=t.data.hProperties;if(typeof s=="string")if(r.type==="element")r.tagName=s;else{const u="children"in r?r.children:[r];r={type:"element",tagName:s,properties:{},children:u}}r.type==="element"&&d&&Object.assign(r.properties,No(d)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function q_(t,a){const r=a.data||{},s="value"in a&&!(xd.call(r,"hProperties")||xd.call(r,"hChildren"))?{type:"text",value:a.value}:{type:"element",tagName:"div",properties:{},children:t.all(a)};return t.patch(a,s),t.applyData(a,s)}function K_(t,a){const r=[];let s=-1;for(a&&r.push({type:"text",value:`
|
|
59
|
+
`});++s<t.length;)s&&r.push({type:"text",value:`
|
|
60
|
+
`}),r.push(t[s]);return a&&t.length>0&&r.push({type:"text",value:`
|
|
61
|
+
`}),r}function fg(t){let a=0,r=t.charCodeAt(a);for(;r===9||r===32;)a++,r=t.charCodeAt(a);return t.slice(a)}function pg(t,a){const r=H_(t,a),s=r.one(t,void 0),o=O_(r),d=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return o&&d.children.push({type:"text",value:`
|
|
62
|
+
`},o),d}function $_(t,a){return t&&"run"in t?async function(r,s){const o=pg(r,{file:s,...a});await t.run(o,s)}:function(r,s){return pg(r,{file:s,...t||a})}}function mg(t){if(t)throw t}var Yu,hg;function Y_(){if(hg)return Yu;hg=1;var t=Object.prototype.hasOwnProperty,a=Object.prototype.toString,r=Object.defineProperty,s=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):a.call(m)==="[object Array]"},d=function(m){if(!m||a.call(m)!=="[object Object]")return!1;var g=t.call(m,"constructor"),b=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!b)return!1;var E;for(E in m);return typeof E>"u"||t.call(m,E)},u=function(m,g){r&&g.name==="__proto__"?r(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},p=function(m,g){if(g==="__proto__")if(t.call(m,g)){if(s)return s(m,g).value}else return;return m[g]};return Yu=function h(){var m,g,b,E,v,k,A=arguments[0],O=1,S=arguments.length,j=!1;for(typeof A=="boolean"&&(j=A,A=arguments[1]||{},O=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});O<S;++O)if(m=arguments[O],m!=null)for(g in m)b=p(A,g),E=p(m,g),A!==E&&(j&&E&&(d(E)||(v=o(E)))?(v?(v=!1,k=b&&o(b)?b:[]):k=b&&d(b)?b:{},u(A,{name:g,newValue:h(j,k,E)})):typeof E<"u"&&u(A,{name:g,newValue:E}));return A},Yu}var P_=Y_();const Pu=Gl(P_);function vd(t){if(typeof t!="object"||t===null)return!1;const a=Object.getPrototypeOf(t);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function V_(){const t=[],a={run:r,use:s};return a;function r(...o){let d=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);p(null,...o);function p(h,...m){const g=t[++d];let b=-1;if(h){u(h);return}for(;++b<o.length;)(m[b]===null||m[b]===void 0)&&(m[b]=o[b]);o=m,g?X_(g,p)(...m):u(null,...m)}}function s(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),a}}function X_(t,a){let r;return s;function s(...u){const p=t.length>u.length;let h;p&&u.push(o);try{h=t.apply(this,u)}catch(m){const g=m;if(p&&r)throw g;return o(g)}p||(h&&h.then&&typeof h.then=="function"?h.then(d,o):h instanceof Error?o(h):d(h))}function o(u,...p){r||(r=!0,a(u,...p))}function d(u){o(null,u)}}const ii={basename:Z_,dirname:Q_,extname:J_,join:W_,sep:"/"};function Z_(t,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Yl(t);let r=0,s=-1,o=t.length,d;if(a===void 0||a.length===0||a.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(d){r=o+1;break}}else s<0&&(d=!0,s=o+1);return s<0?"":t.slice(r,s)}if(a===t)return"";let u=-1,p=a.length-1;for(;o--;)if(t.codePointAt(o)===47){if(d){r=o+1;break}}else u<0&&(d=!0,u=o+1),p>-1&&(t.codePointAt(o)===a.codePointAt(p--)?p<0&&(s=o):(p=-1,s=u));return r===s?s=u:s<0&&(s=t.length),t.slice(r,s)}function Q_(t){if(Yl(t),t.length===0)return".";let a=-1,r=t.length,s;for(;--r;)if(t.codePointAt(r)===47){if(s){a=r;break}}else s||(s=!0);return a<0?t.codePointAt(0)===47?"/":".":a===1&&t.codePointAt(0)===47?"//":t.slice(0,a)}function J_(t){Yl(t);let a=t.length,r=-1,s=0,o=-1,d=0,u;for(;a--;){const p=t.codePointAt(a);if(p===47){if(u){s=a+1;break}continue}r<0&&(u=!0,r=a+1),p===46?o<0?o=a:d!==1&&(d=1):o>-1&&(d=-1)}return o<0||r<0||d===0||d===1&&o===r-1&&o===s+1?"":t.slice(o,r)}function W_(...t){let a=-1,r;for(;++a<t.length;)Yl(t[a]),t[a]&&(r=r===void 0?t[a]:r+"/"+t[a]);return r===void 0?".":eS(r)}function eS(t){Yl(t);const a=t.codePointAt(0)===47;let r=tS(t,!a);return r.length===0&&!a&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),a?"/"+r:r}function tS(t,a){let r="",s=0,o=-1,d=0,u=-1,p,h;for(;++u<=t.length;){if(u<t.length)p=t.codePointAt(u);else{if(p===47)break;p=47}if(p===47){if(!(o===u-1||d===1))if(o!==u-1&&d===2){if(r.length<2||s!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",s=0):(r=r.slice(0,h),s=r.length-1-r.lastIndexOf("/")),o=u,d=0;continue}}else if(r.length>0){r="",s=0,o=u,d=0;continue}}a&&(r=r.length>0?r+"/..":"..",s=2)}else r.length>0?r+="/"+t.slice(o+1,u):r=t.slice(o+1,u),s=u-o-1;o=u,d=0}else p===46&&d>-1?d++:d=-1}return r}function Yl(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const nS={cwd:iS};function iS(){return"/"}function Ed(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function aS(t){if(typeof t=="string")t=new URL(t);else if(!Ed(t)){const a=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw a.code="ERR_INVALID_ARG_TYPE",a}if(t.protocol!=="file:"){const a=new TypeError("The URL must be of scheme file");throw a.code="ERR_INVALID_URL_SCHEME",a}return rS(t)}function rS(t){if(t.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const a=t.pathname;let r=-1;for(;++r<a.length;)if(a.codePointAt(r)===37&&a.codePointAt(r+1)===50){const s=a.codePointAt(r+2);if(s===70||s===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(a)}const Vu=["history","path","basename","stem","extname","dirname"];class Cb{constructor(a){let r;a?Ed(a)?r={path:a}:typeof a=="string"||lS(a)?r={value:a}:r=a:r={},this.cwd="cwd"in r?"":nS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<Vu.length;){const d=Vu[s];d in r&&r[d]!==void 0&&r[d]!==null&&(this[d]=d==="history"?[...r[d]]:r[d])}let o;for(o in r)Vu.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?ii.basename(this.path):void 0}set basename(a){Zu(a,"basename"),Xu(a,"basename"),this.path=ii.join(this.dirname||"",a)}get dirname(){return typeof this.path=="string"?ii.dirname(this.path):void 0}set dirname(a){gg(this.basename,"dirname"),this.path=ii.join(a||"",this.basename)}get extname(){return typeof this.path=="string"?ii.extname(this.path):void 0}set extname(a){if(Xu(a,"extname"),gg(this.dirname,"extname"),a){if(a.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(a.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ii.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){Ed(a)&&(a=aS(a)),Zu(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return typeof this.path=="string"?ii.basename(this.path,this.extname):void 0}set stem(a){Zu(a,"stem"),Xu(a,"stem"),this.path=ii.join(this.dirname||"",a+(this.extname||""))}fail(a,r,s){const o=this.message(a,r,s);throw o.fatal=!0,o}info(a,r,s){const o=this.message(a,r,s);return o.fatal=void 0,o}message(a,r,s){const o=new Wt(a,r,s);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(a){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(a||void 0).decode(this.value)}}function Xu(t,a){if(t&&t.includes(ii.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+ii.sep+"`")}function Zu(t,a){if(!t)throw new Error("`"+a+"` cannot be empty")}function gg(t,a){if(!t)throw new Error("Setting `"+a+"` requires `path` to be set too")}function lS(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const sS=(function(t){const s=this.constructor.prototype,o=s[t],d=function(){return o.apply(d,arguments)};return Object.setPrototypeOf(d,s),d}),oS={}.hasOwnProperty;class qd extends sS{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=V_()}copy(){const a=new qd;let r=-1;for(;++r<this.attachers.length;){const s=this.attachers[r];a.use(...s)}return a.data(Pu(!0,{},this.namespace)),a}data(a,r){return typeof a=="string"?arguments.length===2?(Wu("data",this.frozen),this.namespace[a]=r,this):oS.call(this.namespace,a)&&this.namespace[a]||void 0:a?(Wu("data",this.frozen),this.namespace=a,this):this.namespace}freeze(){if(this.frozen)return this;const a=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const o=r.call(a,...s);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(a){this.freeze();const r=fo(a),s=this.parser||this.Parser;return Qu("parse",s),s(String(r),r)}process(a,r){const s=this;return this.freeze(),Qu("process",this.parser||this.Parser),Ju("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(d,u){const p=fo(a),h=s.parse(p);s.run(h,p,function(g,b,E){if(g||!b||!E)return m(g);const v=b,k=s.stringify(v,E);dS(k)?E.value=k:E.result=k,m(g,E)});function m(g,b){g||!b?u(g):d?d(b):r(void 0,b)}}}processSync(a){let r=!1,s;return this.freeze(),Qu("processSync",this.parser||this.Parser),Ju("processSync",this.compiler||this.Compiler),this.process(a,o),yg("processSync","process",r),s;function o(d,u){r=!0,mg(d),s=u}}run(a,r,s){bg(a),this.freeze();const o=this.transformers;return!s&&typeof r=="function"&&(s=r,r=void 0),s?d(void 0,s):new Promise(d);function d(u,p){const h=fo(r);o.run(a,h,m);function m(g,b,E){const v=b||a;g?p(g):u?u(v):s(void 0,v,E)}}}runSync(a,r){let s=!1,o;return this.run(a,r,d),yg("runSync","run",s),o;function d(u,p){mg(u),o=p,s=!0}}stringify(a,r){this.freeze();const s=fo(r),o=this.compiler||this.Compiler;return Ju("stringify",o),bg(a),o(a,s)}use(a,...r){const s=this.attachers,o=this.namespace;if(Wu("use",this.frozen),a!=null)if(typeof a=="function")h(a,r);else if(typeof a=="object")Array.isArray(a)?p(a):u(a);else throw new TypeError("Expected usable value, not `"+a+"`");return this;function d(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...b]=m;h(g,b)}else u(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function u(m){if(!("plugins"in m)&&!("settings"in m))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");p(m.plugins),m.settings&&(o.settings=Pu(!0,o.settings,m.settings))}function p(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const b=m[g];d(b)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,g){let b=-1,E=-1;for(;++b<s.length;)if(s[b][0]===m){E=b;break}if(E===-1)s.push([m,...g]);else if(g.length>0){let[v,...k]=g;const A=s[E][1];vd(A)&&vd(v)&&(v=Pu(!0,A,v)),s[E]=[m,v,...k]}}}}const cS=new qd().freeze();function Qu(t,a){if(typeof a!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Ju(t,a){if(typeof a!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Wu(t,a){if(a)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bg(t){if(!vd(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function yg(t,a,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+a+"` instead")}function fo(t){return uS(t)?t:new Cb(t)}function uS(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function dS(t){return typeof t=="string"||fS(t)}function fS(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const pS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xg=[],vg={allowDangerousHtml:!0},mS=/^(https?|ircs?|mailto|xmpp)$/i,hS=[{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 Ob(t){const a=gS(t),r=bS(t);return yS(a.runSync(a.parse(r),r),t)}function gS(t){const a=t.rehypePlugins||xg,r=t.remarkPlugins||xg,s=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...vg}:vg;return cS().use(Q1).use(r).use($_,s).use(a)}function bS(t){const a=t.children||"",r=new Cb;return typeof a=="string"&&(r.value=a),r}function yS(t,a){const r=a.allowedElements,s=a.allowElement,o=a.components,d=a.disallowedElements,u=a.skipHtml,p=a.unwrapDisallowed,h=a.urlTransform||xS;for(const g of hS)Object.hasOwn(a,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+pS+g.id,void 0);return Do(t,m),L0(t,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function m(g,b,E){if(g.type==="raw"&&E&&typeof b=="number")return u?E.children.splice(b,1):E.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let v;for(v in qu)if(Object.hasOwn(qu,v)&&Object.hasOwn(g.properties,v)){const k=g.properties[v],A=qu[v];(A===null||A.includes(g.tagName))&&(g.properties[v]=h(String(k||""),v,g))}}if(g.type==="element"){let v=r?!r.includes(g.tagName):d?d.includes(g.tagName):!1;if(!v&&s&&typeof b=="number"&&(v=!s(g,b,E)),v&&E&&typeof b=="number")return p&&g.children?E.children.splice(b,1,...g.children):E.children.splice(b,1),b}}}function xS(t){const a=t.indexOf(":"),r=t.indexOf("?"),s=t.indexOf("#"),o=t.indexOf("/");return a===-1||o!==-1&&a>o||r!==-1&&a>r||s!==-1&&a>s||mS.test(t.slice(0,a))?t:""}function Eg(t,a){const r=String(t);if(typeof a!="string")throw new TypeError("Expected character");let s=0,o=r.indexOf(a);for(;o!==-1;)s++,o=r.indexOf(a,o+a.length);return s}function vS(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ES(t,a,r){const o=$l((r||{}).ignore||[]),d=_S(a);let u=-1;for(;++u<d.length;)Ab(t,"text",p);function p(m,g){let b=-1,E;for(;++b<g.length;){const v=g[b],k=E?E.children:void 0;if(o(v,k?k.indexOf(v):void 0,E))return;E=v}if(E)return h(m,g)}function h(m,g){const b=g[g.length-1],E=d[u][0],v=d[u][1];let k=0;const O=b.children.indexOf(m);let S=!1,j=[];E.lastIndex=0;let I=E.exec(m.value);for(;I;){const Y=I.index,R={index:I.index,input:I.input,stack:[...g,m]};let T=v(...I,R);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?E.lastIndex=Y+1:(k!==Y&&j.push({type:"text",value:m.value.slice(k,Y)}),Array.isArray(T)?j.push(...T):T&&j.push(T),k=Y+I[0].length,S=!0),!E.global)break;I=E.exec(m.value)}return S?(k<m.value.length&&j.push({type:"text",value:m.value.slice(k)}),b.children.splice(O,1,...j)):j=[m],O+j.length}}function _S(t){const a=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let s=-1;for(;++s<r.length;){const o=r[s];a.push([SS(o[0]),kS(o[1])])}return a}function SS(t){return typeof t=="string"?new RegExp(vS(t),"g"):t}function kS(t){return typeof t=="function"?t:function(){return t}}const ed="phrasing",td=["autolink","link","image","label"];function NS(){return{transforms:[RS],enter:{literalAutolink:wS,literalAutolinkEmail:nd,literalAutolinkHttp:nd,literalAutolinkWww:nd},exit:{literalAutolink:MS,literalAutolinkEmail:OS,literalAutolinkHttp:AS,literalAutolinkWww:CS}}}function TS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ed,notInConstruct:td},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ed,notInConstruct:td},{character:":",before:"[ps]",after:"\\/",inConstruct:ed,notInConstruct:td}]}}function wS(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function nd(t){this.config.enter.autolinkProtocol.call(this,t)}function AS(t){this.config.exit.autolinkProtocol.call(this,t)}function CS(t){this.config.exit.data.call(this,t);const a=this.stack[this.stack.length-1];a.type,a.url="http://"+this.sliceSerialize(t)}function OS(t){this.config.exit.autolinkEmail.call(this,t)}function MS(t){this.exit(t)}function RS(t){ES(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,DS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),LS]],{ignore:["link","linkReference"]})}function DS(t,a,r,s,o){let d="";if(!Mb(o)||(/^w/i.test(a)&&(r=a+r,a="",d="http://"),!IS(r)))return!1;const u=zS(r+s);if(!u[0])return!1;const p={type:"link",title:null,url:d+a+u[0],children:[{type:"text",value:a+u[0]}]};return u[1]?[p,{type:"text",value:u[1]}]:p}function LS(t,a,r,s){return!Mb(s,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+a+"@"+r,children:[{type:"text",value:a+"@"+r}]}}function IS(t){const a=t.split(".");return!(a.length<2||a[a.length-1]&&(/_/.test(a[a.length-1])||!/[a-zA-Z\d]/.test(a[a.length-1]))||a[a.length-2]&&(/_/.test(a[a.length-2])||!/[a-zA-Z\d]/.test(a[a.length-2])))}function zS(t){const a=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!a)return[t,void 0];t=t.slice(0,a.index);let r=a[0],s=r.indexOf(")");const o=Eg(t,"(");let d=Eg(t,")");for(;s!==-1&&o>d;)t+=r.slice(0,s+1),r=r.slice(s+1),s=r.indexOf(")"),d++;return[t,r]}function Mb(t,a){const r=t.input.charCodeAt(t.index-1);return(t.index===0||Ma(r)||Co(r))&&(!a||r!==47)}Rb.peek=$S;function BS(){this.buffer()}function US(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function jS(){this.buffer()}function HS(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function FS(t){const a=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Pn(this.sliceSerialize(t)).toLowerCase(),r.label=a}function GS(t){this.exit(t)}function qS(t){const a=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Pn(this.sliceSerialize(t)).toLowerCase(),r.label=a}function KS(t){this.exit(t)}function $S(){return"["}function Rb(t,a,r,s){const o=r.createTracker(s);let d=o.move("[^");const u=r.enter("footnoteReference"),p=r.enter("reference");return d+=o.move(r.safe(r.associationId(t),{after:"]",before:d})),p(),u(),d+=o.move("]"),d}function YS(){return{enter:{gfmFootnoteCallString:BS,gfmFootnoteCall:US,gfmFootnoteDefinitionLabelString:jS,gfmFootnoteDefinition:HS},exit:{gfmFootnoteCallString:FS,gfmFootnoteCall:GS,gfmFootnoteDefinitionLabelString:qS,gfmFootnoteDefinition:KS}}}function PS(t){let a=!1;return t&&t.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:r,footnoteReference:Rb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(s,o,d,u){const p=d.createTracker(u);let h=p.move("[^");const m=d.enter("footnoteDefinition"),g=d.enter("label");return h+=p.move(d.safe(d.associationId(s),{before:h,after:"]"})),g(),h+=p.move("]:"),s.children&&s.children.length>0&&(p.shift(4),h+=p.move((a?`
|
|
63
|
+
`:" ")+d.indentLines(d.containerFlow(s,p.current()),a?Db:VS))),m(),h}}function VS(t,a,r){return a===0?t:Db(t,a,r)}function Db(t,a,r){return(r?"":" ")+t}const XS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Lb.peek=ek;function ZS(){return{canContainEols:["delete"],enter:{strikethrough:JS},exit:{strikethrough:WS}}}function QS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:XS}],handlers:{delete:Lb}}}function JS(t){this.enter({type:"delete",children:[]},t)}function WS(t){this.exit(t)}function Lb(t,a,r,s){const o=r.createTracker(s),d=r.enter("strikethrough");let u=o.move("~~");return u+=r.containerPhrasing(t,{...o.current(),before:u,after:"~"}),u+=o.move("~~"),d(),u}function ek(){return"~"}function tk(t){return t.length}function nk(t,a){const r=a||{},s=(r.align||[]).concat(),o=r.stringLength||tk,d=[],u=[],p=[],h=[];let m=0,g=-1;for(;++g<t.length;){const A=[],O=[];let S=-1;for(t[g].length>m&&(m=t[g].length);++S<t[g].length;){const j=ik(t[g][S]);if(r.alignDelimiters!==!1){const I=o(j);O[S]=I,(h[S]===void 0||I>h[S])&&(h[S]=I)}A.push(j)}u[g]=A,p[g]=O}let b=-1;if(typeof s=="object"&&"length"in s)for(;++b<m;)d[b]=_g(s[b]);else{const A=_g(s);for(;++b<m;)d[b]=A}b=-1;const E=[],v=[];for(;++b<m;){const A=d[b];let O="",S="";A===99?(O=":",S=":"):A===108?O=":":A===114&&(S=":");let j=r.alignDelimiters===!1?1:Math.max(1,h[b]-O.length-S.length);const I=O+"-".repeat(j)+S;r.alignDelimiters!==!1&&(j=O.length+j+S.length,j>h[b]&&(h[b]=j),v[b]=j),E[b]=I}u.splice(1,0,E),p.splice(1,0,v),g=-1;const k=[];for(;++g<u.length;){const A=u[g],O=p[g];b=-1;const S=[];for(;++b<m;){const j=A[b]||"";let I="",Y="";if(r.alignDelimiters!==!1){const R=h[b]-(O[b]||0),T=d[b];T===114?I=" ".repeat(R):T===99?R%2?(I=" ".repeat(R/2+.5),Y=" ".repeat(R/2-.5)):(I=" ".repeat(R/2),Y=I):Y=" ".repeat(R)}r.delimiterStart!==!1&&!b&&S.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&j==="")&&(r.delimiterStart!==!1||b)&&S.push(" "),r.alignDelimiters!==!1&&S.push(I),S.push(j),r.alignDelimiters!==!1&&S.push(Y),r.padding!==!1&&S.push(" "),(r.delimiterEnd!==!1||b!==m-1)&&S.push("|")}k.push(r.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return k.join(`
|
|
64
|
+
`)}function ik(t){return t==null?"":String(t)}function _g(t){const a=typeof t=="string"?t.codePointAt(0):0;return a===67||a===99?99:a===76||a===108?108:a===82||a===114?114:0}function ak(t,a,r,s){const o=r.enter("blockquote"),d=r.createTracker(s);d.move("> "),d.shift(2);const u=r.indentLines(r.containerFlow(t,d.current()),rk);return o(),u}function rk(t,a,r){return">"+(r?"":" ")+t}function lk(t,a){return Sg(t,a.inConstruct,!0)&&!Sg(t,a.notInConstruct,!1)}function Sg(t,a,r){if(typeof a=="string"&&(a=[a]),!a||a.length===0)return r;let s=-1;for(;++s<a.length;)if(t.includes(a[s]))return!0;return!1}function kg(t,a,r,s){let o=-1;for(;++o<r.unsafe.length;)if(r.unsafe[o].character===`
|
|
65
|
+
`&&lk(r.stack,r.unsafe[o]))return/[ \t]/.test(s.before)?"":" ";return`\\
|
|
66
|
+
`}function sk(t,a){const r=String(t);let s=r.indexOf(a),o=s,d=0,u=0;if(typeof a!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===o?++d>u&&(u=d):d=1,o=s+a.length,s=r.indexOf(a,o);return u}function ok(t,a){return!!(a.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function ck(t){const a=t.options.fence||"`";if(a!=="`"&&a!=="~")throw new Error("Cannot serialize code with `"+a+"` for `options.fence`, expected `` ` `` or `~`");return a}function uk(t,a,r,s){const o=ck(r),d=t.value||"",u=o==="`"?"GraveAccent":"Tilde";if(ok(t,r)){const b=r.enter("codeIndented"),E=r.indentLines(d,dk);return b(),E}const p=r.createTracker(s),h=o.repeat(Math.max(sk(d,o)+1,3)),m=r.enter("codeFenced");let g=p.move(h);if(t.lang){const b=r.enter(`codeFencedLang${u}`);g+=p.move(r.safe(t.lang,{before:g,after:" ",encode:["`"],...p.current()})),b()}if(t.lang&&t.meta){const b=r.enter(`codeFencedMeta${u}`);g+=p.move(" "),g+=p.move(r.safe(t.meta,{before:g,after:`
|
|
67
|
+
`,encode:["`"],...p.current()})),b()}return g+=p.move(`
|
|
68
|
+
`),d&&(g+=p.move(d+`
|
|
69
|
+
`)),g+=p.move(h),m(),g}function dk(t,a,r){return(r?"":" ")+t}function Kd(t){const a=t.options.quote||'"';if(a!=='"'&&a!=="'")throw new Error("Cannot serialize title with `"+a+"` for `options.quote`, expected `\"`, or `'`");return a}function fk(t,a,r,s){const o=Kd(r),d=o==='"'?"Quote":"Apostrophe",u=r.enter("definition");let p=r.enter("label");const h=r.createTracker(s);let m=h.move("[");return m+=h.move(r.safe(r.associationId(t),{before:m,after:"]",...h.current()})),m+=h.move("]: "),p(),!t.url||/[\0- \u007F]/.test(t.url)?(p=r.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(r.safe(t.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(p=r.enter("destinationRaw"),m+=h.move(r.safe(t.url,{before:m,after:t.title?" ":`
|
|
70
|
+
`,...h.current()}))),p(),t.title&&(p=r.enter(`title${d}`),m+=h.move(" "+o),m+=h.move(r.safe(t.title,{before:m,after:o,...h.current()})),m+=h.move(o),p()),u(),m}function pk(t){const a=t.options.emphasis||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize emphasis with `"+a+"` for `options.emphasis`, expected `*`, or `_`");return a}function Fl(t){return"&#x"+t.toString(16).toUpperCase()+";"}function To(t,a,r){const s=Cr(t),o=Cr(a);return s===void 0?o===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ib.peek=mk;function Ib(t,a,r,s){const o=pk(r),d=r.enter("emphasis"),u=r.createTracker(s),p=u.move(o);let h=u.move(r.containerPhrasing(t,{after:o,before:p,...u.current()}));const m=h.charCodeAt(0),g=To(s.before.charCodeAt(s.before.length-1),m,o);g.inside&&(h=Fl(m)+h.slice(1));const b=h.charCodeAt(h.length-1),E=To(s.after.charCodeAt(0),b,o);E.inside&&(h=h.slice(0,-1)+Fl(b));const v=u.move(o);return d(),r.attentionEncodeSurroundingInfo={after:E.outside,before:g.outside},p+h+v}function mk(t,a,r){return r.options.emphasis||"*"}function hk(t,a){let r=!1;return Do(t,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return r=!0,yd}),!!((!t.depth||t.depth<3)&&zd(t)&&(a.options.setext||r))}function gk(t,a,r,s){const o=Math.max(Math.min(6,t.depth||1),1),d=r.createTracker(s);if(hk(t,r)){const g=r.enter("headingSetext"),b=r.enter("phrasing"),E=r.containerPhrasing(t,{...d.current(),before:`
|
|
71
|
+
`,after:`
|
|
72
|
+
`});return b(),g(),E+`
|
|
73
|
+
`+(o===1?"=":"-").repeat(E.length-(Math.max(E.lastIndexOf("\r"),E.lastIndexOf(`
|
|
74
|
+
`))+1))}const u="#".repeat(o),p=r.enter("headingAtx"),h=r.enter("phrasing");d.move(u+" ");let m=r.containerPhrasing(t,{before:"# ",after:`
|
|
75
|
+
`,...d.current()});return/^[\t ]/.test(m)&&(m=Fl(m.charCodeAt(0))+m.slice(1)),m=m?u+" "+m:u,r.options.closeAtx&&(m+=" "+u),h(),p(),m}zb.peek=bk;function zb(t){return t.value||""}function bk(){return"<"}Bb.peek=yk;function Bb(t,a,r,s){const o=Kd(r),d=o==='"'?"Quote":"Apostrophe",u=r.enter("image");let p=r.enter("label");const h=r.createTracker(s);let m=h.move("![");return m+=h.move(r.safe(t.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=r.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(r.safe(t.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(p=r.enter("destinationRaw"),m+=h.move(r.safe(t.url,{before:m,after:t.title?" ":")",...h.current()}))),p(),t.title&&(p=r.enter(`title${d}`),m+=h.move(" "+o),m+=h.move(r.safe(t.title,{before:m,after:o,...h.current()})),m+=h.move(o),p()),m+=h.move(")"),u(),m}function yk(){return"!"}Ub.peek=xk;function Ub(t,a,r,s){const o=t.referenceType,d=r.enter("imageReference");let u=r.enter("label");const p=r.createTracker(s);let h=p.move("![");const m=r.safe(t.alt,{before:h,after:"]",...p.current()});h+=p.move(m+"]["),u();const g=r.stack;r.stack=[],u=r.enter("reference");const b=r.safe(r.associationId(t),{before:h,after:"]",...p.current()});return u(),r.stack=g,d(),o==="full"||!m||m!==b?h+=p.move(b+"]"):o==="shortcut"?h=h.slice(0,-1):h+=p.move("]"),h}function xk(){return"!"}jb.peek=vk;function jb(t,a,r){let s=t.value||"",o="`",d=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(s);)o+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++d<r.unsafe.length;){const u=r.unsafe[d],p=r.compilePattern(u);let h;if(u.atBreak)for(;h=p.exec(s);){let m=h.index;s.charCodeAt(m)===10&&s.charCodeAt(m-1)===13&&m--,s=s.slice(0,m)+" "+s.slice(h.index+1)}}return o+s+o}function vk(){return"`"}function Hb(t,a){const r=zd(t);return!!(!a.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Fb.peek=Ek;function Fb(t,a,r,s){const o=Kd(r),d=o==='"'?"Quote":"Apostrophe",u=r.createTracker(s);let p,h;if(Hb(t,r)){const g=r.stack;r.stack=[],p=r.enter("autolink");let b=u.move("<");return b+=u.move(r.containerPhrasing(t,{before:b,after:">",...u.current()})),b+=u.move(">"),p(),r.stack=g,b}p=r.enter("link"),h=r.enter("label");let m=u.move("[");return m+=u.move(r.containerPhrasing(t,{before:m,after:"](",...u.current()})),m+=u.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=r.enter("destinationLiteral"),m+=u.move("<"),m+=u.move(r.safe(t.url,{before:m,after:">",...u.current()})),m+=u.move(">")):(h=r.enter("destinationRaw"),m+=u.move(r.safe(t.url,{before:m,after:t.title?" ":")",...u.current()}))),h(),t.title&&(h=r.enter(`title${d}`),m+=u.move(" "+o),m+=u.move(r.safe(t.title,{before:m,after:o,...u.current()})),m+=u.move(o),h()),m+=u.move(")"),p(),m}function Ek(t,a,r){return Hb(t,r)?"<":"["}Gb.peek=_k;function Gb(t,a,r,s){const o=t.referenceType,d=r.enter("linkReference");let u=r.enter("label");const p=r.createTracker(s);let h=p.move("[");const m=r.containerPhrasing(t,{before:h,after:"]",...p.current()});h+=p.move(m+"]["),u();const g=r.stack;r.stack=[],u=r.enter("reference");const b=r.safe(r.associationId(t),{before:h,after:"]",...p.current()});return u(),r.stack=g,d(),o==="full"||!m||m!==b?h+=p.move(b+"]"):o==="shortcut"?h=h.slice(0,-1):h+=p.move("]"),h}function _k(){return"["}function $d(t){const a=t.options.bullet||"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bullet`, expected `*`, `+`, or `-`");return a}function Sk(t){const a=$d(t),r=t.options.bulletOther;if(!r)return a==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===a)throw new Error("Expected `bullet` (`"+a+"`) and `bulletOther` (`"+r+"`) to be different");return r}function kk(t){const a=t.options.bulletOrdered||".";if(a!=="."&&a!==")")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOrdered`, expected `.` or `)`");return a}function qb(t){const a=t.options.rule||"*";if(a!=="*"&&a!=="-"&&a!=="_")throw new Error("Cannot serialize rules with `"+a+"` for `options.rule`, expected `*`, `-`, or `_`");return a}function Nk(t,a,r,s){const o=r.enter("list"),d=r.bulletCurrent;let u=t.ordered?kk(r):$d(r);const p=t.ordered?u==="."?")":".":Sk(r);let h=a&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!t.ordered){const g=t.children?t.children[0]:void 0;if((u==="*"||u==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(h=!0),qb(r)===u&&g){let b=-1;for(;++b<t.children.length;){const E=t.children[b];if(E&&E.type==="listItem"&&E.children&&E.children[0]&&E.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(u=p),r.bulletCurrent=u;const m=r.containerFlow(t,s);return r.bulletLastUsed=u,r.bulletCurrent=d,o(),m}function Tk(t){const a=t.options.listItemIndent||"one";if(a!=="tab"&&a!=="one"&&a!=="mixed")throw new Error("Cannot serialize items with `"+a+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return a}function wk(t,a,r,s){const o=Tk(r);let d=r.bulletCurrent||$d(r);a&&a.type==="list"&&a.ordered&&(d=(typeof a.start=="number"&&a.start>-1?a.start:1)+(r.options.incrementListMarker===!1?0:a.children.indexOf(t))+d);let u=d.length+1;(o==="tab"||o==="mixed"&&(a&&a.type==="list"&&a.spread||t.spread))&&(u=Math.ceil(u/4)*4);const p=r.createTracker(s);p.move(d+" ".repeat(u-d.length)),p.shift(u);const h=r.enter("listItem"),m=r.indentLines(r.containerFlow(t,p.current()),g);return h(),m;function g(b,E,v){return E?(v?"":" ".repeat(u))+b:(v?d:d+" ".repeat(u-d.length))+b}}function Ak(t,a,r,s){const o=r.enter("paragraph"),d=r.enter("phrasing"),u=r.containerPhrasing(t,s);return d(),o(),u}const Ck=$l(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ok(t,a,r,s){return(t.children.some(function(u){return Ck(u)})?r.containerPhrasing:r.containerFlow).call(r,t,s)}function Mk(t){const a=t.options.strong||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}Kb.peek=Rk;function Kb(t,a,r,s){const o=Mk(r),d=r.enter("strong"),u=r.createTracker(s),p=u.move(o+o);let h=u.move(r.containerPhrasing(t,{after:o,before:p,...u.current()}));const m=h.charCodeAt(0),g=To(s.before.charCodeAt(s.before.length-1),m,o);g.inside&&(h=Fl(m)+h.slice(1));const b=h.charCodeAt(h.length-1),E=To(s.after.charCodeAt(0),b,o);E.inside&&(h=h.slice(0,-1)+Fl(b));const v=u.move(o+o);return d(),r.attentionEncodeSurroundingInfo={after:E.outside,before:g.outside},p+h+v}function Rk(t,a,r){return r.options.strong||"*"}function Dk(t,a,r,s){return r.safe(t.value,s)}function Lk(t){const a=t.options.ruleRepetition||3;if(a<3)throw new Error("Cannot serialize rules with repetition `"+a+"` for `options.ruleRepetition`, expected `3` or more");return a}function Ik(t,a,r){const s=(qb(r)+(r.options.ruleSpaces?" ":"")).repeat(Lk(r));return r.options.ruleSpaces?s.slice(0,-1):s}const $b={blockquote:ak,break:kg,code:uk,definition:fk,emphasis:Ib,hardBreak:kg,heading:gk,html:zb,image:Bb,imageReference:Ub,inlineCode:jb,link:Fb,linkReference:Gb,list:Nk,listItem:wk,paragraph:Ak,root:Ok,strong:Kb,text:Dk,thematicBreak:Ik};function zk(){return{enter:{table:Bk,tableData:Ng,tableHeader:Ng,tableRow:jk},exit:{codeText:Hk,table:Uk,tableData:id,tableHeader:id,tableRow:id}}}function Bk(t){const a=t._align;this.enter({type:"table",align:a.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function Uk(t){this.exit(t),this.data.inTable=void 0}function jk(t){this.enter({type:"tableRow",children:[]},t)}function id(t){this.exit(t)}function Ng(t){this.enter({type:"tableCell",children:[]},t)}function Hk(t){let a=this.resume();this.data.inTable&&(a=a.replace(/\\([\\|])/g,Fk));const r=this.stack[this.stack.length-1];r.type,r.value=a,this.exit(t)}function Fk(t,a){return a==="|"?a:t}function Gk(t){const a=t||{},r=a.tableCellPadding,s=a.tablePipeAlign,o=a.stringLength,d=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
76
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:E,table:u,tableCell:h,tableRow:p}};function u(v,k,A,O){return m(g(v,A,O),v.align)}function p(v,k,A,O){const S=b(v,A,O),j=m([S]);return j.slice(0,j.indexOf(`
|
|
77
|
+
`))}function h(v,k,A,O){const S=A.enter("tableCell"),j=A.enter("phrasing"),I=A.containerPhrasing(v,{...O,before:d,after:d});return j(),S(),I}function m(v,k){return nk(v,{align:k,alignDelimiters:s,padding:r,stringLength:o})}function g(v,k,A){const O=v.children;let S=-1;const j=[],I=k.enter("table");for(;++S<O.length;)j[S]=b(O[S],k,A);return I(),j}function b(v,k,A){const O=v.children;let S=-1;const j=[],I=k.enter("tableRow");for(;++S<O.length;)j[S]=h(O[S],v,k,A);return I(),j}function E(v,k,A){let O=$b.inlineCode(v,k,A);return A.stack.includes("tableCell")&&(O=O.replace(/\|/g,"\\$&")),O}}function qk(){return{exit:{taskListCheckValueChecked:Tg,taskListCheckValueUnchecked:Tg,paragraph:$k}}}function Kk(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Yk}}}function Tg(t){const a=this.stack[this.stack.length-2];a.type,a.checked=t.type==="taskListCheckValueChecked"}function $k(t){const a=this.stack[this.stack.length-2];if(a&&a.type==="listItem"&&typeof a.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const s=r.children[0];if(s&&s.type==="text"){const o=a.children;let d=-1,u;for(;++d<o.length;){const p=o[d];if(p.type==="paragraph"){u=p;break}}u===r&&(s.value=s.value.slice(1),s.value.length===0?r.children.shift():r.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,r.position.start=Object.assign({},s.position.start)))}}this.exit(t)}function Yk(t,a,r,s){const o=t.children[0],d=typeof t.checked=="boolean"&&o&&o.type==="paragraph",u="["+(t.checked?"x":" ")+"] ",p=r.createTracker(s);d&&p.move(u);let h=$b.listItem(t,a,r,{...s,...p.current()});return d&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(g){return g+u}}function Pk(){return[NS(),YS(),ZS(),zk(),qk()]}function Vk(t){return{extensions:[TS(),PS(t),QS(),Gk(t),Kk()]}}const Xk={tokenize:tN,partial:!0},Yb={tokenize:nN,partial:!0},Pb={tokenize:iN,partial:!0},Vb={tokenize:aN,partial:!0},Zk={tokenize:rN,partial:!0},Xb={name:"wwwAutolink",tokenize:Wk,previous:Qb},Zb={name:"protocolAutolink",tokenize:eN,previous:Jb},Ti={name:"emailAutolink",tokenize:Jk,previous:Wb},ai={};function Qk(){return{text:ai}}let Oa=48;for(;Oa<123;)ai[Oa]=Ti,Oa++,Oa===58?Oa=65:Oa===91&&(Oa=97);ai[43]=Ti;ai[45]=Ti;ai[46]=Ti;ai[95]=Ti;ai[72]=[Ti,Zb];ai[104]=[Ti,Zb];ai[87]=[Ti,Xb];ai[119]=[Ti,Xb];function Jk(t,a,r){const s=this;let o,d;return u;function u(b){return!_d(b)||!Wb.call(s,s.previous)||Yd(s.events)?r(b):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),p(b))}function p(b){return _d(b)?(t.consume(b),p):b===64?(t.consume(b),h):r(b)}function h(b){return b===46?t.check(Zk,g,m)(b):b===45||b===95||Jt(b)?(d=!0,t.consume(b),h):g(b)}function m(b){return t.consume(b),o=!0,h}function g(b){return d&&o&&ln(s.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),a(b)):r(b)}}function Wk(t,a,r){const s=this;return o;function o(u){return u!==87&&u!==119||!Qb.call(s,s.previous)||Yd(s.events)?r(u):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Xk,t.attempt(Yb,t.attempt(Pb,d),r),r)(u))}function d(u){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),a(u)}}function eN(t,a,r){const s=this;let o="",d=!1;return u;function u(b){return(b===72||b===104)&&Jb.call(s,s.previous)&&!Yd(s.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(b),t.consume(b),p):r(b)}function p(b){if(ln(b)&&o.length<5)return o+=String.fromCodePoint(b),t.consume(b),p;if(b===58){const E=o.toLowerCase();if(E==="http"||E==="https")return t.consume(b),h}return r(b)}function h(b){return b===47?(t.consume(b),d?m:(d=!0,h)):r(b)}function m(b){return b===null||So(b)||ft(b)||Ma(b)||Co(b)?r(b):t.attempt(Yb,t.attempt(Pb,g),r)(b)}function g(b){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),a(b)}}function tN(t,a,r){let s=0;return o;function o(u){return(u===87||u===119)&&s<3?(s++,t.consume(u),o):u===46&&s===3?(t.consume(u),d):r(u)}function d(u){return u===null?r(u):a(u)}}function nN(t,a,r){let s,o,d;return u;function u(m){return m===46||m===95?t.check(Vb,h,p)(m):m===null||ft(m)||Ma(m)||m!==45&&Co(m)?h(m):(d=!0,t.consume(m),u)}function p(m){return m===95?s=!0:(o=s,s=void 0),t.consume(m),u}function h(m){return o||s||!d?r(m):a(m)}}function iN(t,a){let r=0,s=0;return o;function o(u){return u===40?(r++,t.consume(u),o):u===41&&s<r?d(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?t.check(Vb,a,d)(u):u===null||ft(u)||Ma(u)?a(u):(t.consume(u),o)}function d(u){return u===41&&s++,t.consume(u),o}}function aN(t,a,r){return s;function s(p){return p===33||p===34||p===39||p===41||p===42||p===44||p===46||p===58||p===59||p===63||p===95||p===126?(t.consume(p),s):p===38?(t.consume(p),d):p===93?(t.consume(p),o):p===60||p===null||ft(p)||Ma(p)?a(p):r(p)}function o(p){return p===null||p===40||p===91||ft(p)||Ma(p)?a(p):s(p)}function d(p){return ln(p)?u(p):r(p)}function u(p){return p===59?(t.consume(p),s):ln(p)?(t.consume(p),u):r(p)}}function rN(t,a,r){return s;function s(d){return t.consume(d),o}function o(d){return Jt(d)?r(d):a(d)}}function Qb(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ft(t)}function Jb(t){return!ln(t)}function Wb(t){return!(t===47||_d(t))}function _d(t){return t===43||t===45||t===46||t===95||Jt(t)}function Yd(t){let a=t.length,r=!1;for(;a--;){const s=t[a][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){r=!0;break}if(s._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const lN={tokenize:mN,partial:!0};function sN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dN,continuation:{tokenize:fN},exit:pN}},text:{91:{name:"gfmFootnoteCall",tokenize:uN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oN,resolveTo:cN}}}}function oN(t,a,r){const s=this;let o=s.events.length;const d=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let u;for(;o--;){const h=s.events[o][1];if(h.type==="labelImage"){u=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return p;function p(h){if(!u||!u._balanced)return r(h);const m=Pn(s.sliceSerialize({start:u.end,end:s.now()}));return m.codePointAt(0)!==94||!d.includes(m.slice(1))?r(h):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),a(h))}}function cN(t,a){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const d={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},d.start),end:Object.assign({},d.end)},p=[t[r+1],t[r+2],["enter",s,a],t[r+3],t[r+4],["enter",o,a],["exit",o,a],["enter",d,a],["enter",u,a],["exit",u,a],["exit",d,a],t[t.length-2],t[t.length-1],["exit",s,a]];return t.splice(r,t.length-r+1,...p),t}function uN(t,a,r){const s=this,o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let d=0,u;return p;function p(b){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(b),t.exit("gfmFootnoteCallLabelMarker"),h}function h(b){return b!==94?r(b):(t.enter("gfmFootnoteCallMarker"),t.consume(b),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(b){if(d>999||b===93&&!u||b===null||b===91||ft(b))return r(b);if(b===93){t.exit("chunkString");const E=t.exit("gfmFootnoteCallString");return o.includes(Pn(s.sliceSerialize(E)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(b),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),a):r(b)}return ft(b)||(u=!0),d++,t.consume(b),b===92?g:m}function g(b){return b===91||b===92||b===93?(t.consume(b),d++,m):m(b)}}function dN(t,a,r){const s=this,o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let d,u=0,p;return h;function h(k){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(k){return k===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",g):r(k)}function g(k){if(u>999||k===93&&!p||k===null||k===91||ft(k))return r(k);if(k===93){t.exit("chunkString");const A=t.exit("gfmFootnoteDefinitionLabelString");return d=Pn(s.sliceSerialize(A)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),E}return ft(k)||(p=!0),u++,t.consume(k),k===92?b:g}function b(k){return k===91||k===92||k===93?(t.consume(k),u++,g):g(k)}function E(k){return k===58?(t.enter("definitionMarker"),t.consume(k),t.exit("definitionMarker"),o.includes(d)||o.push(d),Ze(t,v,"gfmFootnoteDefinitionWhitespace")):r(k)}function v(k){return a(k)}}function fN(t,a,r){return t.check(Kl,a,t.attempt(lN,a,r))}function pN(t){t.exit("gfmFootnoteDefinition")}function mN(t,a,r){const s=this;return Ze(t,o,"gfmFootnoteDefinitionIndent",5);function o(d){const u=s.events[s.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?a(d):r(d)}}function hN(t){let r=(t||{}).singleTilde;const s={name:"strikethrough",tokenize:d,resolveAll:o};return r==null&&(r=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function o(u,p){let h=-1;for(;++h<u.length;)if(u[h][0]==="enter"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._close){let m=h;for(;m--;)if(u[m][0]==="exit"&&u[m][1].type==="strikethroughSequenceTemporary"&&u[m][1]._open&&u[h][1].end.offset-u[h][1].start.offset===u[m][1].end.offset-u[m][1].start.offset){u[h][1].type="strikethroughSequence",u[m][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},u[m][1].start),end:Object.assign({},u[h][1].end)},b={type:"strikethroughText",start:Object.assign({},u[m][1].end),end:Object.assign({},u[h][1].start)},E=[["enter",g,p],["enter",u[m][1],p],["exit",u[m][1],p],["enter",b,p]],v=p.parser.constructs.insideSpan.null;v&&Cn(E,E.length,0,Oo(v,u.slice(m+1,h),p)),Cn(E,E.length,0,[["exit",b,p],["enter",u[h][1],p],["exit",u[h][1],p],["exit",g,p]]),Cn(u,m-1,h-m+3,E),h=m+E.length-2;break}}for(h=-1;++h<u.length;)u[h][1].type==="strikethroughSequenceTemporary"&&(u[h][1].type="data");return u}function d(u,p,h){const m=this.previous,g=this.events;let b=0;return E;function E(k){return m===126&&g[g.length-1][1].type!=="characterEscape"?h(k):(u.enter("strikethroughSequenceTemporary"),v(k))}function v(k){const A=Cr(m);if(k===126)return b>1?h(k):(u.consume(k),b++,v);if(b<2&&!r)return h(k);const O=u.exit("strikethroughSequenceTemporary"),S=Cr(k);return O._open=!S||S===2&&!!A,O._close=!A||A===2&&!!S,p(k)}}}class gN{constructor(){this.map=[]}add(a,r,s){bN(this,a,r,s)}consume(a){if(this.map.sort(function(d,u){return d[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const s=[];for(;r>0;)r-=1,s.push(a.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),a.length=this.map[r][0];s.push(a.slice()),a.length=0;let o=s.pop();for(;o;){for(const d of o)a.push(d);o=s.pop()}this.map.length=0}}function bN(t,a,r,s){let o=0;if(!(r===0&&s.length===0)){for(;o<t.map.length;){if(t.map[o][0]===a){t.map[o][1]+=r,t.map[o][2].push(...s);return}o+=1}t.map.push([a,r,s])}}function yN(t,a){let r=!1;const s=[];for(;a<t.length;){const o=t[a];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&s.push(t[a+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[a-1][1].type==="tableDelimiterMarker"){const d=s.length-1;s[d]=s[d]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);a+=1}return s}function xN(){return{flow:{null:{name:"table",tokenize:vN,resolveAll:EN}}}}function vN(t,a,r){const s=this;let o=0,d=0,u;return p;function p(U){let W=s.events.length-1;for(;W>-1;){const H=s.events[W][1].type;if(H==="lineEnding"||H==="linePrefix")W--;else break}const re=W>-1?s.events[W][1].type:null,xe=re==="tableHead"||re==="tableRow"?T:h;return xe===T&&s.parser.lazy[s.now().line]?r(U):xe(U)}function h(U){return t.enter("tableHead"),t.enter("tableRow"),m(U)}function m(U){return U===124||(u=!0,d+=1),g(U)}function g(U){return U===null?r(U):Ae(U)?d>1?(d=0,s.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),v):r(U):Ke(U)?Ze(t,g,"whitespace")(U):(d+=1,u&&(u=!1,o+=1),U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),u=!0,g):(t.enter("data"),b(U)))}function b(U){return U===null||U===124||ft(U)?(t.exit("data"),g(U)):(t.consume(U),U===92?E:b)}function E(U){return U===92||U===124?(t.consume(U),b):b(U)}function v(U){return s.interrupt=!1,s.parser.lazy[s.now().line]?r(U):(t.enter("tableDelimiterRow"),u=!1,Ke(U)?Ze(t,k,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):k(U))}function k(U){return U===45||U===58?O(U):U===124?(u=!0,t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),A):R(U)}function A(U){return Ke(U)?Ze(t,O,"whitespace")(U):O(U)}function O(U){return U===58?(d+=1,u=!0,t.enter("tableDelimiterMarker"),t.consume(U),t.exit("tableDelimiterMarker"),S):U===45?(d+=1,S(U)):U===null||Ae(U)?Y(U):R(U)}function S(U){return U===45?(t.enter("tableDelimiterFiller"),j(U)):R(U)}function j(U){return U===45?(t.consume(U),j):U===58?(u=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(U),t.exit("tableDelimiterMarker"),I):(t.exit("tableDelimiterFiller"),I(U))}function I(U){return Ke(U)?Ze(t,Y,"whitespace")(U):Y(U)}function Y(U){return U===124?k(U):U===null||Ae(U)?!u||o!==d?R(U):(t.exit("tableDelimiterRow"),t.exit("tableHead"),a(U)):R(U)}function R(U){return r(U)}function T(U){return t.enter("tableRow"),$(U)}function $(U){return U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),$):U===null||Ae(U)?(t.exit("tableRow"),a(U)):Ke(U)?Ze(t,$,"whitespace")(U):(t.enter("data"),le(U))}function le(U){return U===null||U===124||ft(U)?(t.exit("data"),$(U)):(t.consume(U),U===92?ce:le)}function ce(U){return U===92||U===124?(t.consume(U),le):le(U)}}function EN(t,a){let r=-1,s=!0,o=0,d=[0,0,0,0],u=[0,0,0,0],p=!1,h=0,m,g,b;const E=new gN;for(;++r<t.length;){const v=t[r],k=v[1];v[0]==="enter"?k.type==="tableHead"?(p=!1,h!==0&&(wg(E,a,h,m,g),g=void 0,h=0),m={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},E.add(r,0,[["enter",m,a]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(s=!0,b=void 0,d=[0,0,0,0],u=[0,r+1,0,0],p&&(p=!1,g={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},E.add(r,0,[["enter",g,a]])),o=k.type==="tableDelimiterRow"?2:g?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(s=!1,u[2]===0&&(d[1]!==0&&(u[0]=u[1],b=po(E,a,d,o,void 0,b),d=[0,0,0,0]),u[2]=r)):k.type==="tableCellDivider"&&(s?s=!1:(d[1]!==0&&(u[0]=u[1],b=po(E,a,d,o,void 0,b)),d=u,u=[d[1],r,0,0])):k.type==="tableHead"?(p=!0,h=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(h=r,d[1]!==0?(u[0]=u[1],b=po(E,a,d,o,r,b)):u[1]!==0&&(b=po(E,a,u,o,r,b)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(u[3]=r)}for(h!==0&&wg(E,a,h,m,g),E.consume(a.events),r=-1;++r<a.events.length;){const v=a.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=yN(a.events,r))}return t}function po(t,a,r,s,o,d){const u=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",p="tableContent";r[0]!==0&&(d.end=Object.assign({},kr(a.events,r[0])),t.add(r[0],0,[["exit",d,a]]));const h=kr(a.events,r[1]);if(d={type:u,start:Object.assign({},h),end:Object.assign({},h)},t.add(r[1],0,[["enter",d,a]]),r[2]!==0){const m=kr(a.events,r[2]),g=kr(a.events,r[3]),b={type:p,start:Object.assign({},m),end:Object.assign({},g)};if(t.add(r[2],0,[["enter",b,a]]),s!==2){const E=a.events[r[2]],v=a.events[r[3]];if(E[1].end=Object.assign({},v[1].end),E[1].type="chunkText",E[1].contentType="text",r[3]>r[2]+1){const k=r[2]+1,A=r[3]-r[2]-1;t.add(k,A,[])}}t.add(r[3]+1,0,[["exit",b,a]])}return o!==void 0&&(d.end=Object.assign({},kr(a.events,o)),t.add(o,0,[["exit",d,a]]),d=void 0),d}function wg(t,a,r,s,o){const d=[],u=kr(a.events,r);o&&(o.end=Object.assign({},u),d.push(["exit",o,a])),s.end=Object.assign({},u),d.push(["exit",s,a]),t.add(r+1,0,d)}function kr(t,a){const r=t[a],s=r[0]==="enter"?"start":"end";return r[1][s]}const _N={name:"tasklistCheck",tokenize:kN};function SN(){return{text:{91:_N}}}function kN(t,a,r){const s=this;return o;function o(h){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?r(h):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(h),t.exit("taskListCheckMarker"),d)}function d(h){return ft(h)?(t.enter("taskListCheckValueUnchecked"),t.consume(h),t.exit("taskListCheckValueUnchecked"),u):h===88||h===120?(t.enter("taskListCheckValueChecked"),t.consume(h),t.exit("taskListCheckValueChecked"),u):r(h)}function u(h){return h===93?(t.enter("taskListCheckMarker"),t.consume(h),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),p):r(h)}function p(h){return Ae(h)?a(h):Ke(h)?t.check({tokenize:NN},a,r)(h):r(h)}}function NN(t,a,r){return Ze(t,s,"whitespace");function s(o){return o===null?r(o):a(o)}}function TN(t){return cb([Qk(),sN(),hN(t),xN(),SN()])}const wN={};function ey(t){const a=this,r=t||wN,s=a.data(),o=s.micromarkExtensions||(s.micromarkExtensions=[]),d=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),u=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);o.push(TN(r)),d.push(Pk()),u.push(Vk(r))}const Ag=(function(t,a,r){const s=$l(r);if(!t||!t.type||!t.children)throw new Error("Expected parent node");if(typeof a=="number"){if(a<0||a===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(a=t.children.indexOf(a),a<0)throw new Error("Expected child node or index");for(;++a<t.children.length;)if(s(t.children[a],a,t))return t.children[a]}),Da=(function(t){if(t==null)return ON;if(typeof t=="string")return CN(t);if(typeof t=="object")return AN(t);if(typeof t=="function")return Pd(t);throw new Error("Expected function, string, or array as `test`")});function AN(t){const a=[];let r=-1;for(;++r<t.length;)a[r]=Da(t[r]);return Pd(s);function s(...o){let d=-1;for(;++d<a.length;)if(a[d].apply(this,o))return!0;return!1}}function CN(t){return Pd(a);function a(r){return r.tagName===t}}function Pd(t){return a;function a(r,s,o){return!!(MN(r)&&t.call(this,r,typeof s=="number"?s:void 0,o||void 0))}}function ON(t){return!!(t&&typeof t=="object"&&"type"in t&&t.type==="element"&&"tagName"in t&&typeof t.tagName=="string")}function MN(t){return t!==null&&typeof t=="object"&&"type"in t&&"tagName"in t}const Cg=/\n/g,Og=/[\t ]+/g,Sd=Da("br"),Mg=Da(jN),RN=Da("p"),Rg=Da("tr"),DN=Da(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",UN,HN]),ty=Da(["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 LN(t,a){const r=a||{},s="children"in t?t.children:[],o=ty(t),d=ay(t,{whitespace:r.whitespace||"normal"}),u=[];(t.type==="text"||t.type==="comment")&&u.push(...iy(t,{breakBefore:!0,breakAfter:!0}));let p=-1;for(;++p<s.length;)u.push(...ny(s[p],t,{whitespace:d,breakBefore:p?void 0:o,breakAfter:p<s.length-1?Sd(s[p+1]):o}));const h=[];let m;for(p=-1;++p<u.length;){const g=u[p];typeof g=="number"?m!==void 0&&g>m&&(m=g):g&&(m!==void 0&&m>-1&&h.push(`
|
|
78
|
+
`.repeat(m)||" "),m=-1,h.push(g))}return h.join("")}function ny(t,a,r){return t.type==="element"?IN(t,a,r):t.type==="text"?r.whitespace==="normal"?iy(t,r):zN(t):[]}function IN(t,a,r){const s=ay(t,r),o=t.children||[];let d=-1,u=[];if(DN(t))return u;let p,h;for(Sd(t)||Rg(t)&&Ag(a,t,Rg)?h=`
|
|
79
|
+
`:RN(t)?(p=2,h=2):ty(t)&&(p=1,h=1);++d<o.length;)u=u.concat(ny(o[d],t,{whitespace:s,breakBefore:d?void 0:p,breakAfter:d<o.length-1?Sd(o[d+1]):h}));return Mg(t)&&Ag(a,t,Mg)&&u.push(" "),p&&u.unshift(p),h&&u.push(h),u}function iy(t,a){const r=String(t.value),s=[],o=[];let d=0;for(;d<=r.length;){Cg.lastIndex=d;const h=Cg.exec(r),m=h&&"index"in h?h.index:r.length;s.push(BN(r.slice(d,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),d===0?a.breakBefore:!0,m===r.length?a.breakAfter:!0)),d=m+1}let u=-1,p;for(;++u<s.length;)s[u].charCodeAt(s[u].length-1)===8203||u<s.length-1&&s[u+1].charCodeAt(0)===8203?(o.push(s[u]),p=void 0):s[u]?(typeof p=="number"&&o.push(p),o.push(s[u]),p=0):(u===0||u===s.length-1)&&o.push(0);return o}function zN(t){return[String(t.value)]}function BN(t,a,r){const s=[];let o=0,d;for(;o<t.length;){Og.lastIndex=o;const u=Og.exec(t);d=u?u.index:t.length,!o&&!d&&u&&!a&&s.push(""),o!==d&&s.push(t.slice(o,d)),o=u?d+u[0].length:d}return o!==d&&!r&&s.push(""),s.join(" ")}function ay(t,a){if(t.type==="element"){const r=t.properties||{};switch(t.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":a.whitespace;case"textarea":return"pre-wrap"}}return a.whitespace}function UN(t){return!!(t.properties||{}).hidden}function jN(t){return t.tagName==="td"||t.tagName==="th"}function HN(t){return t.tagName==="dialog"&&!(t.properties||{}).open}function FN(t){const a=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",u="(?!struct)("+s+"|"+a.optional(o)+"[a-zA-Z_]\\w*"+a.optional("<[^<>]+>")+")",p={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.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:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={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},b={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},t.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},E={className:"title",begin:a.optional(o)+t.IDENT_RE,relevance:0},v=a.optional(o)+t.IDENT_RE+"\\s*\\(",k=["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"],A=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],O=["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"],S=["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"],Y={type:A,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:O},R={className:"function.dispatch",relevance:0,keywords:{_hint:S},begin:a.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,a.lookahead(/(<[^<>]+>|)\s*\(/))},T=[R,b,p,r,t.C_BLOCK_COMMENT_MODE,g,m],$={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:Y,contains:T.concat([{begin:/\(/,end:/\)/,keywords:Y,contains:T.concat(["self"]),relevance:0}]),relevance:0},le={className:"function",begin:"("+u+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:Y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:Y,relevance:0},{begin:v,returnBegin:!0,contains:[E],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:Y,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,m,g,p,{begin:/\(/,end:/\)/,keywords:Y,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,m,g,p]}]},p,r,t.C_BLOCK_COMMENT_MODE,b]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:Y,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat($,le,R,T,[b,{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:Y,contains:["self",p]},{begin:t.IDENT_RE+"::",keywords:Y},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function GN(t){const a={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"]},r=FN(t),s=r.keywords;return s.type=[...s.type,...a.type],s.literal=[...s.literal,...a.literal],s.built_in=[...s.built_in,...a.built_in],s._hints=a._hints,r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}function qN(t){const a=t.regex,r={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:a.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},d=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),u={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},p={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,r,o]};o.contains.push(p);const h={match:/\\"/},m={className:"string",begin:/'/,end:/'/},g={match:/\\'/},b={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},E=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=t.SHEBANG({binary:`(${E.join("|")})`,relevance:10}),k={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},A=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],O=["true","false"],S={match:/(\/[a-z._-]+)+/},j=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],I=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],Y=["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"],R=["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:A,literal:O,built_in:[...j,...I,"set","shopt",...Y,...R]},contains:[v,t.SHEBANG(),k,b,d,u,S,p,h,m,g,r]}}function KN(t){const a=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",u="("+s+"|"+a.optional(o)+"[a-zA-Z_]\\w*"+a.optional("<[^<>]+>")+")",p={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.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:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={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},b={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},t.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},E={className:"title",begin:a.optional(o)+t.IDENT_RE,relevance:0},v=a.optional(o)+t.IDENT_RE+"\\s*\\(",O={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"},S=[b,p,r,t.C_BLOCK_COMMENT_MODE,g,m],j={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:S.concat([{begin:/\(/,end:/\)/,keywords:O,contains:S.concat(["self"]),relevance:0}]),relevance:0},I={begin:"("+u+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:O,relevance:0},{begin:v,returnBegin:!0,contains:[t.inherit(E,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,m,g,p,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,m,g,p]}]},p,r,t.C_BLOCK_COMMENT_MODE,b]};return{name:"C",aliases:["h"],keywords:O,disableAutodetect:!0,illegal:"</",contains:[].concat(j,I,S,[b,{begin:t.IDENT_RE+"::",keywords:O},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:b,strings:m,keywords:O}}}function $N(t){const a=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",u="(?!struct)("+s+"|"+a.optional(o)+"[a-zA-Z_]\\w*"+a.optional("<[^<>]+>")+")",p={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.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:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={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},b={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},t.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},E={className:"title",begin:a.optional(o)+t.IDENT_RE,relevance:0},v=a.optional(o)+t.IDENT_RE+"\\s*\\(",k=["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"],A=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],O=["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"],S=["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"],Y={type:A,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:O},R={className:"function.dispatch",relevance:0,keywords:{_hint:S},begin:a.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,a.lookahead(/(<[^<>]+>|)\s*\(/))},T=[R,b,p,r,t.C_BLOCK_COMMENT_MODE,g,m],$={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:Y,contains:T.concat([{begin:/\(/,end:/\)/,keywords:Y,contains:T.concat(["self"]),relevance:0}]),relevance:0},le={className:"function",begin:"("+u+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:Y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:Y,relevance:0},{begin:v,returnBegin:!0,contains:[E],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:Y,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,m,g,p,{begin:/\(/,end:/\)/,keywords:Y,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,m,g,p]}]},p,r,t.C_BLOCK_COMMENT_MODE,b]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:Y,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat($,le,R,T,[b,{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:Y,contains:["self",p]},{begin:t.IDENT_RE+"::",keywords:Y},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function YN(t){const a=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],s=["default","false","null","true"],o=["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"],d=["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"],u={keyword:o.concat(d),built_in:a,literal:s},p=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={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},m={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},b=t.inherit(g,{illegal:/\n/}),E={className:"subst",begin:/\{/,end:/\}/,keywords:u},v=t.inherit(E,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,v]},A={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},E]},O=t.inherit(A,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});E.contains=[A,k,g,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.C_BLOCK_COMMENT_MODE],v.contains=[O,k,b,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const S={variants:[m,A,k,g,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},j={begin:"<",end:">",contains:[{beginKeywords:"in out"},p]},I=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",Y={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:u,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},S,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},p,j,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[p,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[p,j,t.C_LINE_COMMENT_MODE,t.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:"("+I+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:u,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,j],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,relevance:0,contains:[S,h,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},Y]}}const PN=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.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:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.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_-]*/}}),VN=["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"],XN=["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"],ZN=[...VN,...XN],QN=["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(),JN=["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(),WN=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),eT=["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 tT(t){const a=t.regex,r=PN(t),s={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",d=/@-?\w[\w]*(-\w+)*/,u="[a-zA-Z-][a-zA-Z0-9_-]*",p=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,s,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+u,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+JN.join("|")+")"},{begin:":(:)?("+WN.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+eT.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...p,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...p,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:a.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:d},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:QN.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...p,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ZN.join("|")+")\\b"}]}}function nT(t){const a=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:a.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:a.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 iT(t){const d={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:d,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.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:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:d,illegal:/["']/}]}]}}function aT(t){const a=t.regex,r=/[_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:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.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:a.concat(r,a.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function rT(t){const a=t.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},s=t.COMMENT();s.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const o={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},d={className:"literal",begin:/\bon|off|true|false|yes|no\b/},u={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},p={begin:/\[/,end:/\]/,contains:[s,d,o,u,r,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,m=/"(\\"|[^"])*"/,g=/'[^']*'/,b=a.either(h,m,g),E=a.concat(b,"(\\s*\\.\\s*",b,")*",a.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[s,{className:"section",begin:/\[+/,end:/\]+/},{begin:E,className:"attr",starts:{end:/$/,contains:[s,p,d,o,u,r]}}]}}var Nr="[0-9](_*[0-9])*",mo=`\\.(${Nr})`,ho="[0-9a-fA-F](_*[0-9a-fA-F])*",Dg={className:"number",variants:[{begin:`(\\b(${Nr})((${mo})|\\.)?|(${mo}))[eE][+-]?(${Nr})[fFdD]?\\b`},{begin:`\\b(${Nr})((${mo})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${mo})[fFdD]?\\b`},{begin:`\\b(${Nr})[fFdD]\\b`},{begin:`\\b0[xX]((${ho})\\.?|(${ho})?\\.(${ho}))[pP][+-]?(${Nr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ho})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function ry(t,a,r){return r===-1?"":t.replace(a,s=>ry(t,a,r-1))}function lT(t){const a=t.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",s=r+ry("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),h={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"]},m={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[t.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[t.BACKSLASH_ESCAPE]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[a.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[g,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+s+"\\s+)",t.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[m,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,Dg,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},Dg,m]}}const Lg="[A-Za-z$_][0-9A-Za-z$_]*",sT=["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"],oT=["true","false","null","undefined","NaN","Infinity"],ly=["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"],sy=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],oy=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],cT=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],uT=[].concat(oy,ly,sy);function dT(t){const a=t.regex,r=(ae,{after:be})=>{const w="</"+ae[0].slice(1);return ae.input.indexOf(w,be)!==-1},s=Lg,o={begin:"<>",end:"</>"},d=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ae,be)=>{const w=ae[0].length+ae.index,C=ae.input[w];if(C==="<"||C===","){be.ignoreMatch();return}C===">"&&(r(ae,{after:w})||be.ignoreMatch());let P;const N=ae.input.substring(w);if(P=N.match(/^\s*=/)){be.ignoreMatch();return}if((P=N.match(/^\s+extends\s+/))&&P.index===0){be.ignoreMatch();return}}},p={$pattern:Lg,keyword:sT,literal:oT,built_in:uT,"variable.language":cT},h="[0-9](_?[0-9])*",m=`\\.(${h})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",b={className:"number",variants:[{begin:`(\\b(${g})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${g})\\b((${m})\\b|\\.)?|(${m})\\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},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:p,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"css"}},A={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"graphql"}},O={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]},j={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},I=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,v,k,A,O,{match:/\$\d+/},b];E.contains=I.concat({begin:/\{/,end:/\}/,keywords:p,contains:["self"].concat(I)});const Y=[].concat(j,E.contains),R=Y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:p,contains:["self"].concat(Y)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:p,contains:R},$={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,a.concat(s,"(",a.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},le={relevance:0,match:a.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:{_:[...ly,...sy]}},ce={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},W={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function re(ae){return a.concat("(?!",ae.join("|"),")")}const xe={match:a.concat(/\b/,re([...oy,"super","import"].map(ae=>`${ae}\\s*\\(`)),s,a.lookahead(/\s*\(/)),className:"title.function",relevance:0},H={begin:a.concat(/\./,a.lookahead(a.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},J={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},T]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",ie={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,a.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:p,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:le},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),ce,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,v,k,A,O,j,{match:/\$\d+/},b,le,{scope:"attr",match:s+a.lookahead(":"),relevance:0},ie,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[j,t.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:p,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:d},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},U,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,t.inherit(t.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},H,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[T]},xe,W,$,J,{match:/\$[(.]/}]}}function fT(t){const a={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],o={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[a,r,t.QUOTE_STRING_MODE,o,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Tr="[0-9](_*[0-9])*",go=`\\.(${Tr})`,bo="[0-9a-fA-F](_*[0-9a-fA-F])*",pT={className:"number",variants:[{begin:`(\\b(${Tr})((${go})|\\.)?|(${go}))[eE][+-]?(${Tr})[fFdD]?\\b`},{begin:`\\b(${Tr})((${go})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${go})[fFdD]?\\b`},{begin:`\\b(${Tr})[fFdD]\\b`},{begin:`\\b0[xX]((${bo})\\.?|(${bo})?\\.(${bo}))[pP][+-]?(${Tr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${bo})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function mT(t){const a={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"},r={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},s={className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[t.C_NUMBER_MODE]},d={className:"variable",begin:"\\$"+t.UNDERSCORE_IDENT_RE},u={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[d,o]},{begin:"'",end:"'",illegal:/\n/,contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[t.BACKSLASH_ESCAPE,d,o]}]};o.contains.push(u);const p={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+t.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+t.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[t.inherit(u,{className:"string"}),"self"]}]},m=pT,g=t.COMMENT("/\\*","\\*/",{contains:[t.C_BLOCK_COMMENT_MODE]}),b={variants:[{className:"type",begin:t.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},E=b;return E.variants[1].contains=[b],b.variants[1].contains=[E],{name:"Kotlin",aliases:["kt","kts"],keywords:a,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),t.C_LINE_COMMENT_MODE,g,r,s,p,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:a,relevance:5,contains:[{begin:t.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[t.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:a,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[b,t.C_LINE_COMMENT_MODE,g],relevance:0},t.C_LINE_COMMENT_MODE,g,p,h,u,t.C_NUMBER_MODE]},g]},{begin:[/class|interface|trait/,/\s+/,t.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},t.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},p,h]},u,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
80
|
+
`},m]}}const hT=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.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:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.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_-]*/}}),gT=["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"],bT=["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"],yT=[...gT,...bT],xT=["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(),cy=["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(),uy=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),vT=["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(),ET=cy.concat(uy).sort().reverse();function _T(t){const a=hT(t),r=ET,s="and or not only",o="[\\w-]+",d="("+o+"|@\\{"+o+"\\})",u=[],p=[],h=function(I){return{className:"string",begin:"~?"+I+".*?"+I}},m=function(I,Y,R){return{className:I,begin:Y,relevance:R}},g={$pattern:/[a-z-]+/,keyword:s,attribute:xT.join(" ")},b={begin:"\\(",end:"\\)",contains:p,keywords:g,relevance:0};p.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,h("'"),h('"'),a.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},a.HEXCOLOR,b,m("variable","@@?"+o,10),m("variable","@\\{"+o+"\\}"),m("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},a.IMPORTANT,{beginKeywords:"and not"},a.FUNCTION_DISPATCH);const E=p.concat({begin:/\{/,end:/\}/,contains:u}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(p)},k={begin:d+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},a.CSS_VARIABLE,{className:"attribute",begin:"\\b("+vT.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:p}}]},A={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:g,returnEnd:!0,contains:p,relevance:0}},O={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:E}},S={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:d,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,v,m("keyword","all\\b"),m("variable","@\\{"+o+"\\}"),{begin:"\\b("+yT.join("|")+")\\b",className:"selector-tag"},a.CSS_NUMBER_MODE,m("selector-tag",d,0),m("selector-id","#"+d),m("selector-class","\\."+d,0),m("selector-tag","&",0),a.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+cy.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+uy.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:E},{begin:"!important"},a.FUNCTION_DISPATCH]},j={begin:o+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[S]};return u.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,A,O,j,k,S,v,a.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:u}}function ST(t){const a="\\[=*\\[",r="\\]=*\\]",s={begin:a,end:r,contains:["self"]},o=[t.COMMENT("--(?!"+a+")","$"),t.COMMENT("--"+a,r,{contains:[s],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.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:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:a,end:r,contains:[s],relevance:5}])}}function kT(t){const a={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,a]},s={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[a,r]},o={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},d={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},u={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[a]};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:[t.HASH_COMMENT_MODE,a,r,s,o,d,u]}}function NT(t){const a=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},o={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}]},d={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},u={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},p=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:a.concat(/\[.+?\]\(/,p,/:\/\/.*?\)/),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}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},b=t.inherit(m,{contains:[]}),E=t.inherit(g,{contains:[]});m.contains.push(E),g.contains.push(b);let v=[r,h];return[m,g,b,E].forEach(S=>{S.contains=S.contains.concat(v)}),v=v.concat(m,g),{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}]}]},r,d,m,g,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},o,s,h,u,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function TT(t){const a={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+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,p={"variable.language":["this","super"],$pattern:r,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"]},h={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:p,illegal:"</",contains:[a,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.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},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}function wT(t){const a=t.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],s=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:r.join(" ")},d={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},u={begin:/->\{/,end:/\}/},p={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:a.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[p]},m={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},g=[t.BACKSLASH_ESCAPE,d,h],b=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],E=(A,O,S="\\1")=>{const j=S==="\\1"?S:a.concat(S,O);return a.concat(a.concat("(?:",A,")"),O,/(?:\\.|[^\\\/])*?/,j,/(?:\\.|[^\\\/])*?/,S,s)},v=(A,O,S)=>a.concat(a.concat("(?:",A,")"),O,/(?:\\.|[^\\\/])*?/,S,s),k=[h,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),u,{className:"string",contains:g,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:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},m,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:E("s|tr|y",a.either(...b,{capture:!0}))},{begin:E("s|tr|y","\\(","\\)")},{begin:E("s|tr|y","\\[","\\]")},{begin:E("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",a.either(...b,{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:[t.TITLE_MODE,p]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,p,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return d.contains=k,u.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:k}}function AT(t){const a=t.regex,r=/(?![A-Za-z0-9])(?![$])/,s=a.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),o=a.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),d=a.concat(/[A-Z]+/,r),u={scope:"variable",match:"\\$+"+s},p={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},m=t.inherit(t.APOS_STRING_MODE,{illegal:null}),g=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(h)}),b={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(H,J)=>{J.data._beginMatch=H[1]||H[2]},"on:end":(H,J)=>{J.data._beginMatch!==H[1]&&J.ignoreMatch()}},E=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
81
|
+
]`,k={scope:"string",variants:[g,m,b,E]},A={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},O=["false","null","true"],S=["__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"],Y={keyword:S,literal:(H=>{const J=[];return H.forEach(z=>{J.push(z),z.toLowerCase()===z?J.push(z.toUpperCase()):J.push(z.toLowerCase())}),J})(O),built_in:j},R=H=>H.map(J=>J.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,a.concat(v,"+"),a.concat("(?!",R(j).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},$=a.concat(s,"\\b(?!\\()"),le={variants:[{match:[a.concat(/::/,a.lookahead(/(?!class\b)/)),$],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,a.concat(/::/,a.lookahead(/(?!class\b)/)),$],scope:{1:"title.class",3:"variable.constant"}},{match:[o,a.concat("::",a.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},ce={scope:"attr",match:a.concat(s,a.lookahead(":"),a.lookahead(/(?!::)/))},U={relevance:0,begin:/\(/,end:/\)/,keywords:Y,contains:[ce,u,le,t.C_BLOCK_COMMENT_MODE,k,A,T]},W={relevance:0,match:[/\b/,a.concat("(?!fn\\b|function\\b|",R(S).join("\\b|"),"|",R(j).join("\\b|"),"\\b)"),s,a.concat(v,"*"),a.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[U]};U.contains.push(W);const re=[ce,le,t.C_BLOCK_COMMENT_MODE,k,A,T],xe={begin:a.concat(/#\[\s*\\?/,a.either(o,d)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:O,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:O,keyword:["new","array"]},contains:["self",...re]},...re,{scope:"meta",variants:[{match:o},{match:d}]}]};return{case_insensitive:!1,keywords:Y,contains:[xe,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},p,{scope:"variable.language",match:/\$this\b/},u,W,le,{match:[/const/,/\s/,s],scope:{1:"keyword",3:"variable.constant"}},T,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:Y,contains:["self",xe,u,le,t.C_BLOCK_COMMENT_MODE,k,A]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},k,A]}}function CT(t){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},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function OT(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function MT(t){const a=t.regex,r=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],p={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:p,illegal:/#/},g={begin:/\{\{/,relevance:0},b={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,h,g,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,h,g,m]},{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:[t.BACKSLASH_ESCAPE,g,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,g,m]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},E="[0-9](_?[0-9])*",v=`(\\b(${E}))?\\.(${E})|\\b(${E})\\.`,k=`\\b|${s.join("|")}`,A={className:"number",relevance:0,variants:[{begin:`(\\b(${E})|(${v}))[eE][+-]?(${E})[jJ]?(?=${k})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${E})[jJ](?=${k})`}]},O={className:"comment",begin:a.lookahead(/# type:/),end:/$/,keywords:p,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},S={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:p,contains:["self",h,A,b,t.HASH_COMMENT_MODE]}]};return m.contains=[b,A,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:p,illegal:/(<\/|\?)|=>/,contains:[h,A,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},b,O,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[S]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[A,S,b]}]}}function RT(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function DT(t){const a=t.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,s=a.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]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,d=a.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,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:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:a.lookahead(a.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,s]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,s]},{scope:{1:"punctuation",2:"number"},match:[d,s]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,s]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:d},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function LT(t){const a=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=a.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=a.concat(s,/(::\w+)*/),u={"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"]},p={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},m=[t.COMMENT("#","$",{contains:[p]}),t.COMMENT("^=begin","^=end",{contains:[p],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:u},b={className:"string",contains:[t.BACKSLASH_ESCAPE,g],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:a.concat(/<<[-~]?'?/,a.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,g]})]}]},E="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${E})(\\.(${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"}]},A={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:u}]},T=[b,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:u},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:u},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:s,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[A]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[b,{begin:r}],relevance:0},k,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:u},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,g],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(h,m),relevance:0}].concat(h,m);g.contains=T,A.contains=T;const U=[{begin:/^\s*=>/,starts:{end:"$",contains:T}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:u,contains:T}}];return m.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:u,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(U).concat(m).concat(T)}}function IT(t){const a=t.regex,r=/(r#)?/,s=a.concat(r,t.UNDERSCORE_IDENT_RE),o=a.concat(r,t.IDENT_RE),d={className:"title.function.invoke",relevance:0,begin:a.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,a.lookahead(/\s*\(/))},u="([ui](8|16|32|64|128|size)|f(32|64))?",p=["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"],h=["true","false","Some","None","Ok","Err"],m=["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!"],g=["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:t.IDENT_RE+"!?",type:g,keyword:p,literal:h,built_in:m},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.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_]+)"+u},{begin:"\\b0o([0-7_]+)"+u},{begin:"\\b0x([A-Fa-f0-9_]+)"+u},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+u}],relevance:0},{begin:[/fn/,/\s+/,s],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,s],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,s,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:m,type:g}},{className:"punctuation",begin:"->"},d]}}const zT=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.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:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.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_-]*/}}),BT=["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"],UT=["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"],jT=[...BT,...UT],HT=["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(),FT=["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(),GT=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),qT=["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 KT(t){const a=zT(t),r=GT,s=FT,o="@[a-z-]+",d="and or not only",p={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,a.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},a.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+jT.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+s.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},p,{begin:/\(/,end:/\)/,contains:[a.CSS_NUMBER_MODE]},a.CSS_VARIABLE,{className:"attribute",begin:"\\b("+qT.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:[a.BLOCK_COMMENT,p,a.HEXCOLOR,a.CSS_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,a.IMPORTANT,a.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:d,attribute:HT.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},p,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,a.HEXCOLOR,a.CSS_NUMBER_MODE]},a.FUNCTION_DISPATCH]}}function $T(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function YT(t){const a=t.regex,r=t.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},d=["true","false","unknown"],u=["double precision","large object","with timezone","without timezone"],p=["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"],h=["add","asc","collation","desc","final","first","last","view"],m=["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"],g=["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"],b=["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"],E=["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=g,k=[...m,...h].filter(R=>!g.includes(R)),A={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},O={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},S={match:a.concat(/\b/,a.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function j(R){return a.concat(/\b/,a.either(...R.map(T=>T.replace(/\s+/,"\\s+"))),/\b/)}const I={scope:"keyword",match:j(E),relevance:0};function Y(R,{exceptions:T,when:$}={}){const le=$;return T=T||[],R.map(ce=>ce.match(/\|\d+$/)||T.includes(ce)?ce:le(ce)?`${ce}|0`:ce)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:Y(k,{when:R=>R.length<3}),literal:d,type:p,built_in:b},contains:[{scope:"type",match:j(u)},I,S,A,s,o,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,O]}}function dy(t){return t?typeof t=="string"?t:t.source:null}function Dl(t){return ct("(?=",t,")")}function ct(...t){return t.map(r=>dy(r)).join("")}function PT(t){const a=t[t.length-1];return typeof a=="object"&&a.constructor===Object?(t.splice(t.length-1,1),a):{}}function rn(...t){return"("+(PT(t).capture?"":"?:")+t.map(s=>dy(s)).join("|")+")"}const Vd=t=>ct(/\b/,t,/\w$/.test(t)?/\b/:/\B/),VT=["Protocol","Type"].map(Vd),Ig=["init","self"].map(Vd),XT=["Any","Self"],ad=["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"],zg=["false","nil","true"],ZT=["assignment","associativity","higherThan","left","lowerThan","none","right"],QT=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Bg=["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"],fy=rn(/[/=\-+!*%<>&|^~?]/,/[\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]/),py=rn(fy,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),rd=ct(fy,py,"*"),my=rn(/[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]/),wo=rn(my,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),ni=ct(my,wo,"*"),yo=ct(/[A-Z]/,wo,"*"),JT=["attached","autoclosure",ct(/convention\(/,rn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",ct(/objc\(/,ni,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],WT=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function ew(t){const a={match:/\s+/,relevance:0},r=t.COMMENT("/\\*","\\*/",{contains:["self"]}),s=[t.C_LINE_COMMENT_MODE,r],o={match:[/\./,rn(...VT,...Ig)],className:{2:"keyword"}},d={match:ct(/\./,rn(...ad)),relevance:0},u=ad.filter(Ve=>typeof Ve=="string").concat(["_|0"]),p=ad.filter(Ve=>typeof Ve!="string").concat(XT).map(Vd),h={variants:[{className:"keyword",match:rn(...p,...Ig)}]},m={$pattern:rn(/\b\w+/,/#\w+/),keyword:u.concat(QT),literal:zg},g=[o,d,h],b={match:ct(/\./,rn(...Bg)),relevance:0},E={className:"built_in",match:ct(/\b/,rn(...Bg),/(?=\()/)},v=[b,E],k={match:/->/,relevance:0},A={className:"operator",relevance:0,variants:[{match:rd},{match:`\\.(\\.|${py})+`}]},O=[k,A],S="([0-9]_*)+",j="([0-9a-fA-F]_*)+",I={className:"number",relevance:0,variants:[{match:`\\b(${S})(\\.(${S}))?([eE][+-]?(${S}))?\\b`},{match:`\\b0x(${j})(\\.(${j}))?([pP][+-]?(${S}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},Y=(Ve="")=>({className:"subst",variants:[{match:ct(/\\/,Ve,/[0\\tnr"']/)},{match:ct(/\\/,Ve,/u\{[0-9a-fA-F]{1,8}\}/)}]}),R=(Ve="")=>({className:"subst",match:ct(/\\/,Ve,/[\t ]*(?:[\r\n]|\r\n)/)}),T=(Ve="")=>({className:"subst",label:"interpol",begin:ct(/\\/,Ve,/\(/),end:/\)/}),$=(Ve="")=>({begin:ct(Ve,/"""/),end:ct(/"""/,Ve),contains:[Y(Ve),R(Ve),T(Ve)]}),le=(Ve="")=>({begin:ct(Ve,/"/),end:ct(/"/,Ve),contains:[Y(Ve),T(Ve)]}),ce={className:"string",variants:[$(),$("#"),$("##"),$("###"),le(),le("#"),le("##"),le("###")]},U=[t.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[t.BACKSLASH_ESCAPE]}],W={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:U},re=Ve=>{const Gn=ct(Ve,/\//),On=ct(/\//,Ve);return{begin:Gn,end:On,contains:[...U,{scope:"comment",begin:`#(?!.*${On})`,end:/$/}]}},xe={scope:"regexp",variants:[re("###"),re("##"),re("#"),W]},H={match:ct(/`/,ni,/`/)},J={className:"variable",match:/\$\d+/},z={className:"variable",match:`\\$${wo}+`},ie=[H,J,z],ae={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:WT,contains:[...O,I,ce]}]}},be={scope:"keyword",match:ct(/@/,rn(...JT),Dl(rn(/\(/,/\s+/)))},w={scope:"meta",match:ct(/@/,ni)},C=[ae,be,w],P={match:Dl(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:ct(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,wo,"+")},{className:"type",match:yo,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:ct(/\s+&\s+/,Dl(yo)),relevance:0}]},N={begin:/</,end:/>/,keywords:m,contains:[...s,...g,...C,k,P]};P.contains.push(N);const me={match:ct(ni,/\s*:/),keywords:"_|0",relevance:0},Ne={begin:/\(/,end:/\)/,relevance:0,keywords:m,contains:["self",me,...s,xe,...g,...v,...O,I,ce,...ie,...C,P]},K={begin:/</,end:/>/,keywords:"repeat each",contains:[...s,P]},se={begin:rn(Dl(ct(ni,/\s*:/)),Dl(ct(ni,/\s+/,ni,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:ni}]},ye={begin:/\(/,end:/\)/,keywords:m,contains:[se,...s,...g,...O,I,ce,...C,P,Ne],endsParent:!0,illegal:/["']/},ge={match:[/(func|macro)/,/\s+/,rn(H.match,ni,rd)],className:{1:"keyword",3:"title.function"},contains:[K,ye,a],illegal:[/\[/,/%/]},De={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[K,ye,a],illegal:/\[|%/},xt={match:[/operator/,/\s+/,rd],className:{1:"keyword",3:"title"}},kt={begin:[/precedencegroup/,/\s+/,yo],className:{1:"keyword",3:"title"},contains:[P],keywords:[...ZT,...zg],end:/}/},wi={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},yn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Vn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,ni,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:m,contains:[K,...g,{begin:/:/,end:/\{/,keywords:m,contains:[{scope:"title.class.inherited",match:yo},...g],relevance:0}]};for(const Ve of ce.variants){const Gn=Ve.contains.find(Xn=>Xn.label==="interpol");Gn.keywords=m;const On=[...g,...v,...O,I,ce,...ie];Gn.contains=[...On,{begin:/\(/,end:/\)/,contains:["self",...On]}]}return{name:"Swift",keywords:m,contains:[...s,ge,De,wi,yn,Vn,xt,kt,{beginKeywords:"import",end:/$/,contains:[...s],relevance:0},xe,...g,...v,...O,I,ce,...ie,...C,P,Ne]}}const Ao="[A-Za-z$_][0-9A-Za-z$_]*",hy=["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"],gy=["true","false","null","undefined","NaN","Infinity"],by=["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"],yy=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xy=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],vy=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Ey=[].concat(xy,by,yy);function tw(t){const a=t.regex,r=(ae,{after:be})=>{const w="</"+ae[0].slice(1);return ae.input.indexOf(w,be)!==-1},s=Ao,o={begin:"<>",end:"</>"},d=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ae,be)=>{const w=ae[0].length+ae.index,C=ae.input[w];if(C==="<"||C===","){be.ignoreMatch();return}C===">"&&(r(ae,{after:w})||be.ignoreMatch());let P;const N=ae.input.substring(w);if(P=N.match(/^\s*=/)){be.ignoreMatch();return}if((P=N.match(/^\s+extends\s+/))&&P.index===0){be.ignoreMatch();return}}},p={$pattern:Ao,keyword:hy,literal:gy,built_in:Ey,"variable.language":vy},h="[0-9](_?[0-9])*",m=`\\.(${h})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",b={className:"number",variants:[{begin:`(\\b(${g})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${g})\\b((${m})\\b|\\.)?|(${m})\\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},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:p,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"css"}},A={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"graphql"}},O={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]},j={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},I=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,v,k,A,O,{match:/\$\d+/},b];E.contains=I.concat({begin:/\{/,end:/\}/,keywords:p,contains:["self"].concat(I)});const Y=[].concat(j,E.contains),R=Y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:p,contains:["self"].concat(Y)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:p,contains:R},$={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,a.concat(s,"(",a.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},le={relevance:0,match:a.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:{_:[...by,...yy]}},ce={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},W={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function re(ae){return a.concat("(?!",ae.join("|"),")")}const xe={match:a.concat(/\b/,re([...xy,"super","import"].map(ae=>`${ae}\\s*\\(`)),s,a.lookahead(/\s*\(/)),className:"title.function",relevance:0},H={begin:a.concat(/\./,a.lookahead(a.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},J={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},T]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",ie={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,a.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:p,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:le},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),ce,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,v,k,A,O,j,{match:/\$\d+/},b,le,{scope:"attr",match:s+a.lookahead(":"),relevance:0},ie,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[j,t.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:p,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:d},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},U,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,t.inherit(t.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},H,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[T]},xe,W,$,J,{match:/\$[(.]/}]}}function nw(t){const a=t.regex,r=tw(t),s=Ao,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],d={begin:[/namespace/,/\s+/,t.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},u={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[r.exports.CLASS_REFERENCE]},p={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Ao,keyword:hy.concat(h),literal:gy,built_in:Ey.concat(o),"variable.language":vy},g={className:"meta",begin:"@"+s},b=(A,O,S)=>{const j=A.contains.findIndex(I=>I.label===O);if(j===-1)throw new Error("can not find mode to replace");A.contains.splice(j,1,S)};Object.assign(r.keywords,m),r.exports.PARAMS_CONTAINS.push(g);const E=r.contains.find(A=>A.scope==="attr"),v=Object.assign({},E,{match:a.concat(s,a.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,E,v]),r.contains=r.contains.concat([g,d,u,v]),b(r,"shebang",t.SHEBANG()),b(r,"use_strict",p);const k=r.contains.find(A=>A.label==="func.def");return k.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function iw(t){const a=t.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},s={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,d=/\d{4}-\d{1,2}-\d{1,2}/,u=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,p=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:a.concat(/# */,a.either(d,o),/ *#/)},{begin:a.concat(/# */,p,/ *#/)},{begin:a.concat(/# */,u,/ *#/)},{begin:a.concat(/# */,a.either(d,o),/ +/,a.either(u,p),/ *#/)}]},m={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])|[%&])?/}]},g={className:"label",begin:/^\w+:/},b=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),E=t.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:[r,s,h,m,g,b,E,{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:[E]}]}}function aw(t){t.regex;const a=t.COMMENT(/\(;/,/;\)/);a.contains.push("self");const r=t.COMMENT(/;;/,/$/),s=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},d={className:"variable",begin:/\$[\w_]+/},u={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},p={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/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},m={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:s},contains:[r,a,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},d,u,o,t.QUOTE_STRING_MODE,h,m,p]}}function rw(t){const a=t.regex,r=a.concat(/[\p{L}_]/u,a.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},d={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},u=t.inherit(d,{begin:/\(/,end:/\)/}),p=t.inherit(t.APOS_STRING_MODE,{className:"string"}),h=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{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:[d,h,p,u,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[d,u,h,p]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:a.concat(/</,a.lookahead(a.concat(r,a.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:m}]},{className:"tag",begin:a.concat(/<\//,a.lookahead(a.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function lw(t){const a="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},d={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},u={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,o]},p=t.inherit(u,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),E={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:a,relevance:0},k={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},A={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},O=[s,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:a,keywords:{literal:a}},E,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},k,A,d,u],S=[...O];return S.pop(),S.push(p),v.contains=S,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:O}}const sw={arduino:GN,bash:qN,c:KN,cpp:$N,csharp:YN,css:tT,diff:nT,go:iT,graphql:aT,ini:rT,java:lT,javascript:dT,json:fT,kotlin:mT,less:_T,lua:ST,makefile:kT,markdown:NT,objectivec:TT,perl:wT,php:AT,"php-template":CT,plaintext:OT,python:MT,"python-repl":RT,r:DT,ruby:LT,rust:IT,scss:KT,shell:$T,sql:YT,swift:ew,typescript:nw,vbnet:iw,wasm:aw,xml:rw,yaml:lw};var ld,Ug;function ow(){if(Ug)return ld;Ug=1;function t(D){return D instanceof Map?D.clear=D.delete=D.set=function(){throw new Error("map is read-only")}:D instanceof Set&&(D.add=D.clear=D.delete=function(){throw new Error("set is read-only")}),Object.freeze(D),Object.getOwnPropertyNames(D).forEach(ee=>{const he=D[ee],Le=typeof he;(Le==="object"||Le==="function")&&!Object.isFrozen(he)&&t(he)}),D}class a{constructor(ee){ee.data===void 0&&(ee.data={}),this.data=ee.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(D){return D.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(D,...ee){const he=Object.create(null);for(const Le in D)he[Le]=D[Le];return ee.forEach(function(Le){for(const ht in Le)he[ht]=Le[ht]}),he}const o="</span>",d=D=>!!D.scope,u=(D,{prefix:ee})=>{if(D.startsWith("language:"))return D.replace("language:","language-");if(D.includes(".")){const he=D.split(".");return[`${ee}${he.shift()}`,...he.map((Le,ht)=>`${Le}${"_".repeat(ht+1)}`)].join(" ")}return`${ee}${D}`};class p{constructor(ee,he){this.buffer="",this.classPrefix=he.classPrefix,ee.walk(this)}addText(ee){this.buffer+=r(ee)}openNode(ee){if(!d(ee))return;const he=u(ee.scope,{prefix:this.classPrefix});this.span(he)}closeNode(ee){d(ee)&&(this.buffer+=o)}value(){return this.buffer}span(ee){this.buffer+=`<span class="${ee}">`}}const h=(D={})=>{const ee={children:[]};return Object.assign(ee,D),ee};class m{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ee){this.top.children.push(ee)}openNode(ee){const he=h({scope:ee});this.add(he),this.stack.push(he)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ee){return this.constructor._walk(ee,this.rootNode)}static _walk(ee,he){return typeof he=="string"?ee.addText(he):he.children&&(ee.openNode(he),he.children.forEach(Le=>this._walk(ee,Le)),ee.closeNode(he)),ee}static _collapse(ee){typeof ee!="string"&&ee.children&&(ee.children.every(he=>typeof he=="string")?ee.children=[ee.children.join("")]:ee.children.forEach(he=>{m._collapse(he)}))}}class g extends m{constructor(ee){super(),this.options=ee}addText(ee){ee!==""&&this.add(ee)}startScope(ee){this.openNode(ee)}endScope(){this.closeNode()}__addSublanguage(ee,he){const Le=ee.root;he&&(Le.scope=`language:${he}`),this.add(Le)}toHTML(){return new p(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function b(D){return D?typeof D=="string"?D:D.source:null}function E(D){return A("(?=",D,")")}function v(D){return A("(?:",D,")*")}function k(D){return A("(?:",D,")?")}function A(...D){return D.map(he=>b(he)).join("")}function O(D){const ee=D[D.length-1];return typeof ee=="object"&&ee.constructor===Object?(D.splice(D.length-1,1),ee):{}}function S(...D){return"("+(O(D).capture?"":"?:")+D.map(Le=>b(Le)).join("|")+")"}function j(D){return new RegExp(D.toString()+"|").exec("").length-1}function I(D,ee){const he=D&&D.exec(ee);return he&&he.index===0}const Y=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function R(D,{joinWith:ee}){let he=0;return D.map(Le=>{he+=1;const ht=he;let ut=b(Le),_e="";for(;ut.length>0;){const ve=Y.exec(ut);if(!ve){_e+=ut;break}_e+=ut.substring(0,ve.index),ut=ut.substring(ve.index+ve[0].length),ve[0][0]==="\\"&&ve[1]?_e+="\\"+String(Number(ve[1])+ht):(_e+=ve[0],ve[0]==="("&&he++)}return _e}).map(Le=>`(${Le})`).join(ee)}const T=/\b\B/,$="[a-zA-Z]\\w*",le="[a-zA-Z_]\\w*",ce="\\b\\d+(\\.\\d+)?",U="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",W="\\b(0b[01]+)",re="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",xe=(D={})=>{const ee=/^#![ ]*\//;return D.binary&&(D.begin=A(ee,/.*\b/,D.binary,/\b.*/)),s({scope:"meta",begin:ee,end:/$/,relevance:0,"on:begin":(he,Le)=>{he.index!==0&&Le.ignoreMatch()}},D)},H={begin:"\\\\[\\s\\S]",relevance:0},J={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[H]},z={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[H]},ie={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/},ae=function(D,ee,he={}){const Le=s({scope:"comment",begin:D,end:ee,contains:[]},he);Le.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 ht=S("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 Le.contains.push({begin:A(/[ ]+/,"(",ht,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Le},be=ae("//","$"),w=ae("/\\*","\\*/"),C=ae("#","$"),P={scope:"number",begin:ce,relevance:0},N={scope:"number",begin:U,relevance:0},me={scope:"number",begin:W,relevance:0},Ne={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[H,{begin:/\[/,end:/\]/,relevance:0,contains:[H]}]},K={scope:"title",begin:$,relevance:0},se={scope:"title",begin:le,relevance:0},ye={begin:"\\.\\s*"+le,relevance:0};var De=Object.freeze({__proto__:null,APOS_STRING_MODE:J,BACKSLASH_ESCAPE:H,BINARY_NUMBER_MODE:me,BINARY_NUMBER_RE:W,COMMENT:ae,C_BLOCK_COMMENT_MODE:w,C_LINE_COMMENT_MODE:be,C_NUMBER_MODE:N,C_NUMBER_RE:U,END_SAME_AS_BEGIN:function(D){return Object.assign(D,{"on:begin":(ee,he)=>{he.data._beginMatch=ee[1]},"on:end":(ee,he)=>{he.data._beginMatch!==ee[1]&&he.ignoreMatch()}})},HASH_COMMENT_MODE:C,IDENT_RE:$,MATCH_NOTHING_RE:T,METHOD_GUARD:ye,NUMBER_MODE:P,NUMBER_RE:ce,PHRASAL_WORDS_MODE:ie,QUOTE_STRING_MODE:z,REGEXP_MODE:Ne,RE_STARTERS_RE:re,SHEBANG:xe,TITLE_MODE:K,UNDERSCORE_IDENT_RE:le,UNDERSCORE_TITLE_MODE:se});function xt(D,ee){D.input[D.index-1]==="."&&ee.ignoreMatch()}function kt(D,ee){D.className!==void 0&&(D.scope=D.className,delete D.className)}function wi(D,ee){ee&&D.beginKeywords&&(D.begin="\\b("+D.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",D.__beforeBegin=xt,D.keywords=D.keywords||D.beginKeywords,delete D.beginKeywords,D.relevance===void 0&&(D.relevance=0))}function yn(D,ee){Array.isArray(D.illegal)&&(D.illegal=S(...D.illegal))}function Vn(D,ee){if(D.match){if(D.begin||D.end)throw new Error("begin & end are not supported with match");D.begin=D.match,delete D.match}}function Ve(D,ee){D.relevance===void 0&&(D.relevance=1)}const Gn=(D,ee)=>{if(!D.beforeMatch)return;if(D.starts)throw new Error("beforeMatch cannot be used with starts");const he=Object.assign({},D);Object.keys(D).forEach(Le=>{delete D[Le]}),D.keywords=he.keywords,D.begin=A(he.beforeMatch,E(he.begin)),D.starts={relevance:0,contains:[Object.assign(he,{endsParent:!0})]},D.relevance=0,delete he.beforeMatch},On=["of","and","for","in","not","or","if","then","parent","list","value"],Xn="keyword";function ri(D,ee,he=Xn){const Le=Object.create(null);return typeof D=="string"?ht(he,D.split(" ")):Array.isArray(D)?ht(he,D):Object.keys(D).forEach(function(ut){Object.assign(Le,ri(D[ut],ee,ut))}),Le;function ht(ut,_e){ee&&(_e=_e.map(ve=>ve.toLowerCase())),_e.forEach(function(ve){const Re=ve.split("|");Le[Re[0]]=[ut,oa(Re[0],Re[1])]})}}function oa(D,ee){return ee?Number(ee):Rr(D)?0:1}function Rr(D){return On.includes(D.toLowerCase())}const La={},_t=D=>{console.error(D)},Ia=(D,...ee)=>{console.log(`WARN: ${D}`,...ee)},Z=(D,ee)=>{La[`${D}/${ee}`]||(console.log(`Deprecated as of ${D}. ${ee}`),La[`${D}/${ee}`]=!0)},fe=new Error;function Ce(D,ee,{key:he}){let Le=0;const ht=D[he],ut={},_e={};for(let ve=1;ve<=ee.length;ve++)_e[ve+Le]=ht[ve],ut[ve+Le]=!0,Le+=j(ee[ve-1]);D[he]=_e,D[he]._emit=ut,D[he]._multi=!0}function He(D){if(Array.isArray(D.begin)){if(D.skip||D.excludeBegin||D.returnBegin)throw _t("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),fe;if(typeof D.beginScope!="object"||D.beginScope===null)throw _t("beginScope must be object"),fe;Ce(D,D.begin,{key:"beginScope"}),D.begin=R(D.begin,{joinWith:""})}}function Qe(D){if(Array.isArray(D.end)){if(D.skip||D.excludeEnd||D.returnEnd)throw _t("skip, excludeEnd, returnEnd not compatible with endScope: {}"),fe;if(typeof D.endScope!="object"||D.endScope===null)throw _t("endScope must be object"),fe;Ce(D,D.end,{key:"endScope"}),D.end=R(D.end,{joinWith:""})}}function en(D){D.scope&&typeof D.scope=="object"&&D.scope!==null&&(D.beginScope=D.scope,delete D.scope)}function qn(D){en(D),typeof D.beginScope=="string"&&(D.beginScope={_wrap:D.beginScope}),typeof D.endScope=="string"&&(D.endScope={_wrap:D.endScope}),He(D),Qe(D)}function Gt(D){function ee(_e,ve){return new RegExp(b(_e),"m"+(D.case_insensitive?"i":"")+(D.unicodeRegex?"u":"")+(ve?"g":""))}class he{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ve,Re){Re.position=this.position++,this.matchIndexes[this.matchAt]=Re,this.regexes.push([Re,ve]),this.matchAt+=j(ve)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ve=this.regexes.map(Re=>Re[1]);this.matcherRe=ee(R(ve,{joinWith:"|"}),!0),this.lastIndex=0}exec(ve){this.matcherRe.lastIndex=this.lastIndex;const Re=this.matcherRe.exec(ve);if(!Re)return null;const At=Re.findIndex((li,Ba)=>Ba>0&&li!==void 0),vt=this.matchIndexes[At];return Re.splice(0,At),Object.assign(Re,vt)}}class Le{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ve){if(this.multiRegexes[ve])return this.multiRegexes[ve];const Re=new he;return this.rules.slice(ve).forEach(([At,vt])=>Re.addRule(At,vt)),Re.compile(),this.multiRegexes[ve]=Re,Re}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ve,Re){this.rules.push([ve,Re]),Re.type==="begin"&&this.count++}exec(ve){const Re=this.getMatcher(this.regexIndex);Re.lastIndex=this.lastIndex;let At=Re.exec(ve);if(this.resumingScanAtSamePosition()&&!(At&&At.index===this.lastIndex)){const vt=this.getMatcher(0);vt.lastIndex=this.lastIndex+1,At=vt.exec(ve)}return At&&(this.regexIndex+=At.position+1,this.regexIndex===this.count&&this.considerAll()),At}}function ht(_e){const ve=new Le;return _e.contains.forEach(Re=>ve.addRule(Re.begin,{rule:Re,type:"begin"})),_e.terminatorEnd&&ve.addRule(_e.terminatorEnd,{type:"end"}),_e.illegal&&ve.addRule(_e.illegal,{type:"illegal"}),ve}function ut(_e,ve){const Re=_e;if(_e.isCompiled)return Re;[kt,Vn,qn,Gn].forEach(vt=>vt(_e,ve)),D.compilerExtensions.forEach(vt=>vt(_e,ve)),_e.__beforeBegin=null,[wi,yn,Ve].forEach(vt=>vt(_e,ve)),_e.isCompiled=!0;let At=null;return typeof _e.keywords=="object"&&_e.keywords.$pattern&&(_e.keywords=Object.assign({},_e.keywords),At=_e.keywords.$pattern,delete _e.keywords.$pattern),At=At||/\w+/,_e.keywords&&(_e.keywords=ri(_e.keywords,D.case_insensitive)),Re.keywordPatternRe=ee(At,!0),ve&&(_e.begin||(_e.begin=/\B|\b/),Re.beginRe=ee(Re.begin),!_e.end&&!_e.endsWithParent&&(_e.end=/\B|\b/),_e.end&&(Re.endRe=ee(Re.end)),Re.terminatorEnd=b(Re.end)||"",_e.endsWithParent&&ve.terminatorEnd&&(Re.terminatorEnd+=(_e.end?"|":"")+ve.terminatorEnd)),_e.illegal&&(Re.illegalRe=ee(_e.illegal)),_e.contains||(_e.contains=[]),_e.contains=[].concat(..._e.contains.map(function(vt){return Vt(vt==="self"?_e:vt)})),_e.contains.forEach(function(vt){ut(vt,Re)}),_e.starts&&ut(_e.starts,ve),Re.matcher=ht(Re),Re}if(D.compilerExtensions||(D.compilerExtensions=[]),D.contains&&D.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return D.classNameAliases=s(D.classNameAliases||{}),ut(D)}function Nt(D){return D?D.endsWithParent||Nt(D.starts):!1}function Vt(D){return D.variants&&!D.cachedVariants&&(D.cachedVariants=D.variants.map(function(ee){return s(D,{variants:null},ee)})),D.cachedVariants?D.cachedVariants:Nt(D)?s(D,{starts:D.starts?s(D.starts):null}):Object.isFrozen(D)?s(D):D}var tt="11.11.1";class Zn extends Error{constructor(ee,he){super(ee),this.name="HTMLInjectionError",this.html=he}}const tn=r,Pl=s,ca=Symbol("nomatch"),za=7,ua=function(D){const ee=Object.create(null),he=Object.create(null),Le=[];let ht=!0;const ut="Could not find the language '{}', did you forget to load/include a language module?",_e={disableAutodetect:!0,name:"Plain text",contains:[]};let ve={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function Re(oe){return ve.noHighlightRe.test(oe)}function At(oe){let Te=oe.className+" ";Te+=oe.parentNode?oe.parentNode.className:"";const Fe=ve.languageDetectRe.exec(Te);if(Fe){const nt=nn(Fe[1]);return nt||(Ia(ut.replace("{}",Fe[1])),Ia("Falling back to no-highlight mode for this block.",oe)),nt?Fe[1]:"no-highlight"}return Te.split(/\s+/).find(nt=>Re(nt)||nn(nt))}function vt(oe,Te,Fe){let nt="",Ot="";typeof Te=="object"?(nt=oe,Fe=Te.ignoreIllegals,Ot=Te.language):(Z("10.7.0","highlight(lang, code, ...args) has been deprecated."),Z("10.7.0",`Please use highlight(code, options) instead.
|
|
82
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Ot=oe,nt=Te),Fe===void 0&&(Fe=!0);const Zt={code:nt,language:Ot};fa("before:highlight",Zt);const xn=Zt.result?Zt.result:li(Zt.language,Zt.code,Fe);return xn.code=Zt.code,fa("after:highlight",xn),xn}function li(oe,Te,Fe,nt){const Ot=Object.create(null);function Zt(pe,Se){return pe.keywords[Se]}function xn(){if(!Me.keywords){Lt.addText(it);return}let pe=0;Me.keywordPatternRe.lastIndex=0;let Se=Me.keywordPatternRe.exec(it),ze="";for(;Se;){ze+=it.substring(pe,Se.index);const $e=qt.case_insensitive?Se[0].toLowerCase():Se[0],St=Zt(Me,$e);if(St){const[Mn,Ur]=St;if(Lt.addText(ze),ze="",Ot[$e]=(Ot[$e]||0)+1,Ot[$e]<=za&&(Mi+=Ur),Mn.startsWith("_"))ze+=Se[0];else{const es=qt.classNameAliases[Mn]||Mn;vn(Se[0],es)}}else ze+=Se[0];pe=Me.keywordPatternRe.lastIndex,Se=Me.keywordPatternRe.exec(it)}ze+=it.substring(pe),Lt.addText(ze)}function on(){if(it==="")return;let pe=null;if(typeof Me.subLanguage=="string"){if(!ee[Me.subLanguage]){Lt.addText(it);return}pe=li(Me.subLanguage,it,!0,Wl[Me.subLanguage]),Wl[Me.subLanguage]=pe._top}else pe=Ua(it,Me.subLanguage.length?Me.subLanguage:null);Me.relevance>0&&(Mi+=pe.relevance),Lt.__addSublanguage(pe._emitter,pe.language)}function pt(){Me.subLanguage!=null?on():xn(),it=""}function vn(pe,Se){pe!==""&&(Lt.startScope(Se),Lt.addText(pe),Lt.endScope())}function Ql(pe,Se){let ze=1;const $e=Se.length-1;for(;ze<=$e;){if(!pe._emit[ze]){ze++;continue}const St=qt.classNameAliases[pe[ze]]||pe[ze],Mn=Se[ze];St?vn(Mn,St):(it=Mn,xn(),it=""),ze++}}function Ha(pe,Se){return pe.scope&&typeof pe.scope=="string"&&Lt.openNode(qt.classNameAliases[pe.scope]||pe.scope),pe.beginScope&&(pe.beginScope._wrap?(vn(it,qt.classNameAliases[pe.beginScope._wrap]||pe.beginScope._wrap),it=""):pe.beginScope._multi&&(Ql(pe.beginScope,Se),it="")),Me=Object.create(pe,{parent:{value:Me}}),Me}function Ir(pe,Se,ze){let $e=I(pe.endRe,ze);if($e){if(pe["on:end"]){const St=new a(pe);pe["on:end"](Se,St),St.isMatchIgnored&&($e=!1)}if($e){for(;pe.endsParent&&pe.parent;)pe=pe.parent;return pe}}if(pe.endsWithParent)return Ir(pe.parent,Se,ze)}function Fa(pe){return Me.matcher.regexIndex===0?(it+=pe[0],1):(Ri=!0,0)}function Lo(pe){const Se=pe[0],ze=pe.rule,$e=new a(ze),St=[ze.__beforeBegin,ze["on:begin"]];for(const Mn of St)if(Mn&&(Mn(pe,$e),$e.isMatchIgnored))return Fa(Se);return ze.skip?it+=Se:(ze.excludeBegin&&(it+=Se),pt(),!ze.returnBegin&&!ze.excludeBegin&&(it=Se)),Ha(ze,pe),ze.returnBegin?0:Se.length}function cn(pe){const Se=pe[0],ze=Te.substring(pe.index),$e=Ir(Me,pe,ze);if(!$e)return ca;const St=Me;Me.endScope&&Me.endScope._wrap?(pt(),vn(Se,Me.endScope._wrap)):Me.endScope&&Me.endScope._multi?(pt(),Ql(Me.endScope,pe)):St.skip?it+=Se:(St.returnEnd||St.excludeEnd||(it+=Se),pt(),St.excludeEnd&&(it=Se));do Me.scope&&Lt.closeNode(),!Me.skip&&!Me.subLanguage&&(Mi+=Me.relevance),Me=Me.parent;while(Me!==$e.parent);return $e.starts&&Ha($e.starts,pe),St.returnEnd?0:Se.length}function zr(){const pe=[];for(let Se=Me;Se!==qt;Se=Se.parent)Se.scope&&pe.unshift(Se.scope);pe.forEach(Se=>Lt.openNode(Se))}let pa={};function Ga(pe,Se){const ze=Se&&Se[0];if(it+=pe,ze==null)return pt(),0;if(pa.type==="begin"&&Se.type==="end"&&pa.index===Se.index&&ze===""){if(it+=Te.slice(Se.index,Se.index+1),!ht){const $e=new Error(`0 width match regex (${oe})`);throw $e.languageName=oe,$e.badRule=pa.rule,$e}return 1}if(pa=Se,Se.type==="begin")return Lo(Se);if(Se.type==="illegal"&&!Fe){const $e=new Error('Illegal lexeme "'+ze+'" for mode "'+(Me.scope||"<unnamed>")+'"');throw $e.mode=Me,$e}else if(Se.type==="end"){const $e=cn(Se);if($e!==ca)return $e}if(Se.type==="illegal"&&ze==="")return it+=`
|
|
83
|
+
`,1;if(Br>1e5&&Br>Se.index*3)throw new Error("potential infinite loop, way more iterations than matches");return it+=ze,ze.length}const qt=nn(oe);if(!qt)throw _t(ut.replace("{}",oe)),new Error('Unknown language: "'+oe+'"');const Jl=Gt(qt);let qa="",Me=nt||Jl;const Wl={},Lt=new ve.__emitter(ve);zr();let it="",Mi=0,ci=0,Br=0,Ri=!1;try{if(qt.__emitTokens)qt.__emitTokens(Te,Lt);else{for(Me.matcher.considerAll();;){Br++,Ri?Ri=!1:Me.matcher.considerAll(),Me.matcher.lastIndex=ci;const pe=Me.matcher.exec(Te);if(!pe)break;const Se=Te.substring(ci,pe.index),ze=Ga(Se,pe);ci=pe.index+ze}Ga(Te.substring(ci))}return Lt.finalize(),qa=Lt.toHTML(),{language:oe,value:qa,relevance:Mi,illegal:!1,_emitter:Lt,_top:Me}}catch(pe){if(pe.message&&pe.message.includes("Illegal"))return{language:oe,value:tn(Te),illegal:!0,relevance:0,_illegalBy:{message:pe.message,index:ci,context:Te.slice(ci-100,ci+100),mode:pe.mode,resultSoFar:qa},_emitter:Lt};if(ht)return{language:oe,value:tn(Te),illegal:!1,relevance:0,errorRaised:pe,_emitter:Lt,_top:Me};throw pe}}function Ba(oe){const Te={value:tn(oe),illegal:!1,relevance:0,_top:_e,_emitter:new ve.__emitter(ve)};return Te._emitter.addText(oe),Te}function Ua(oe,Te){Te=Te||ve.languages||Object.keys(ee);const Fe=Ba(oe),nt=Te.filter(nn).filter(Ci).map(pt=>li(pt,oe,!1));nt.unshift(Fe);const Ot=nt.sort((pt,vn)=>{if(pt.relevance!==vn.relevance)return vn.relevance-pt.relevance;if(pt.language&&vn.language){if(nn(pt.language).supersetOf===vn.language)return 1;if(nn(vn.language).supersetOf===pt.language)return-1}return 0}),[Zt,xn]=Ot,on=Zt;return on.secondBest=xn,on}function Qn(oe,Te,Fe){const nt=Te&&he[Te]||Fe;oe.classList.add("hljs"),oe.classList.add(`language-${nt}`)}function Ct(oe){let Te=null;const Fe=At(oe);if(Re(Fe))return;if(fa("before:highlightElement",{el:oe,language:Fe}),oe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",oe);return}if(oe.children.length>0&&(ve.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(oe)),ve.throwUnescapedHTML))throw new Zn("One of your code blocks includes unescaped HTML.",oe.innerHTML);Te=oe;const nt=Te.textContent,Ot=Fe?vt(nt,{language:Fe,ignoreIllegals:!0}):Ua(nt);oe.innerHTML=Ot.value,oe.dataset.highlighted="yes",Qn(oe,Fe,Ot.language),oe.result={language:Ot.language,re:Ot.relevance,relevance:Ot.relevance},Ot.secondBest&&(oe.secondBest={language:Ot.secondBest.language,relevance:Ot.secondBest.relevance}),fa("after:highlightElement",{el:oe,result:Ot,text:nt})}function Xt(oe){ve=Pl(ve,oe)}const Ai=()=>{ja(),Z("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Dr(){ja(),Z("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Vl=!1;function ja(){function oe(){ja()}if(document.readyState==="loading"){Vl||window.addEventListener("DOMContentLoaded",oe,!1),Vl=!0;return}document.querySelectorAll(ve.cssSelector).forEach(Ct)}function Xl(oe,Te){let Fe=null;try{Fe=Te(D)}catch(nt){if(_t("Language definition for '{}' could not be registered.".replace("{}",oe)),ht)_t(nt);else throw nt;Fe=_e}Fe.name||(Fe.name=oe),ee[oe]=Fe,Fe.rawDefinition=Te.bind(null,D),Fe.aliases&&si(Fe.aliases,{languageName:oe})}function da(oe){delete ee[oe];for(const Te of Object.keys(he))he[Te]===oe&&delete he[Te]}function Lr(){return Object.keys(ee)}function nn(oe){return oe=(oe||"").toLowerCase(),ee[oe]||ee[he[oe]]}function si(oe,{languageName:Te}){typeof oe=="string"&&(oe=[oe]),oe.forEach(Fe=>{he[Fe.toLowerCase()]=Te})}function Ci(oe){const Te=nn(oe);return Te&&!Te.disableAutodetect}function Oi(oe){oe["before:highlightBlock"]&&!oe["before:highlightElement"]&&(oe["before:highlightElement"]=Te=>{oe["before:highlightBlock"](Object.assign({block:Te.el},Te))}),oe["after:highlightBlock"]&&!oe["after:highlightElement"]&&(oe["after:highlightElement"]=Te=>{oe["after:highlightBlock"](Object.assign({block:Te.el},Te))})}function Dt(oe){Oi(oe),Le.push(oe)}function Zl(oe){const Te=Le.indexOf(oe);Te!==-1&&Le.splice(Te,1)}function fa(oe,Te){const Fe=oe;Le.forEach(function(nt){nt[Fe]&&nt[Fe](Te)})}function oi(oe){return Z("10.7.0","highlightBlock will be removed entirely in v12.0"),Z("10.7.0","Please use highlightElement now."),Ct(oe)}Object.assign(D,{highlight:vt,highlightAuto:Ua,highlightAll:ja,highlightElement:Ct,highlightBlock:oi,configure:Xt,initHighlighting:Ai,initHighlightingOnLoad:Dr,registerLanguage:Xl,unregisterLanguage:da,listLanguages:Lr,getLanguage:nn,registerAliases:si,autoDetection:Ci,inherit:Pl,addPlugin:Dt,removePlugin:Zl}),D.debugMode=function(){ht=!1},D.safeMode=function(){ht=!0},D.versionString=tt,D.regex={concat:A,lookahead:E,either:S,optional:k,anyNumberOfTimes:v};for(const oe in De)typeof De[oe]=="object"&&t(De[oe]);return Object.assign(D,De),D},sn=ua({});return sn.newInstance=()=>ua({}),ld=sn,sn.HighlightJS=sn,sn.default=sn,ld}var cw=ow();const uw=Gl(cw),jg={},dw="hljs-";function fw(t){const a=uw.newInstance();return t&&d(t),{highlight:r,highlightAuto:s,listLanguages:o,register:d,registerAlias:u,registered:p};function r(h,m,g){const b=g||jg,E=typeof b.prefix=="string"?b.prefix:dw;if(!a.getLanguage(h))throw new Error("Unknown language: `"+h+"` is not registered");a.configure({__emitter:pw,classPrefix:E});const v=a.highlight(m,{ignoreIllegals:!0,language:h});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const k=v._emitter.root,A=k.data;return A.language=v.language,A.relevance=v.relevance,k}function s(h,m){const b=(m||jg).subset||o();let E=-1,v=0,k;for(;++E<b.length;){const A=b[E];if(!a.getLanguage(A))continue;const O=r(A,h,m);O.data&&O.data.relevance!==void 0&&O.data.relevance>v&&(v=O.data.relevance,k=O)}return k||{type:"root",children:[],data:{language:void 0,relevance:v}}}function o(){return a.listLanguages()}function d(h,m){if(typeof h=="string")a.registerLanguage(h,m);else{let g;for(g in h)Object.hasOwn(h,g)&&a.registerLanguage(g,h[g])}}function u(h,m){if(typeof h=="string")a.registerAliases(typeof m=="string"?m:[...m],{languageName:h});else{let g;for(g in h)if(Object.hasOwn(h,g)){const b=h[g];a.registerAliases(typeof b=="string"?b:[...b],{languageName:g})}}}function p(h){return!!a.getLanguage(h)}}class pw{constructor(a){this.options=a,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(a){if(a==="")return;const r=this.stack[this.stack.length-1],s=r.children[r.children.length-1];s&&s.type==="text"?s.value+=a:r.children.push({type:"text",value:a})}startScope(a){this.openNode(String(a))}endScope(){this.closeNode()}__addSublanguage(a,r){const s=this.stack[this.stack.length-1],o=a.root.children;r?s.children.push({type:"element",tagName:"span",properties:{className:[r]},children:o}):s.children.push(...o)}openNode(a){const r=this,s=a.split(".").map(function(u,p){return p?u+"_".repeat(p):r.options.classPrefix+u}),o=this.stack[this.stack.length-1],d={type:"element",tagName:"span",properties:{className:s},children:[]};o.children.push(d),this.stack.push(d)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const mw={};function hw(t){const a=t||mw,r=a.aliases,s=a.detect||!1,o=a.languages||sw,d=a.plainText,u=a.prefix,p=a.subset;let h="hljs";const m=fw(o);if(r&&m.registerAlias(r),u){const g=u.indexOf("-");h=g===-1?u:u.slice(0,g)}return function(g,b){Do(g,"element",function(E,v,k){if(E.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const A=gw(E);if(A===!1||!A&&!s||A&&d&&d.includes(A))return;Array.isArray(E.properties.className)||(E.properties.className=[]),E.properties.className.includes(h)||E.properties.className.unshift(h);const O=LN(E,{whitespace:"pre"});let S;try{S=A?m.highlight(A,O,{prefix:u}):m.highlightAuto(O,{prefix:u,subset:p})}catch(j){const I=j;if(A&&/Unknown language/.test(I.message)){b.message("Cannot highlight as `"+A+"`, it’s not registered",{ancestors:[k,E],cause:I,place:E.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw I}!A&&S.data&&S.data.language&&E.properties.className.push("language-"+S.data.language),S.children.length>0&&(E.children=S.children)})}}function gw(t){const a=t.properties.className;let r=-1;if(!Array.isArray(a))return;let s;for(;++r<a.length;){const o=String(a[r]);if(o==="no-highlight"||o==="nohighlight")return!1;!s&&o.slice(0,5)==="lang-"&&(s=o.slice(5)),!s&&o.slice(0,9)==="language-"&&(s=o.slice(9))}return s}function Sr(t){return t?typeof t=="string"?t:"literalString"in t?t.literalString:"dataPath"in t?`{{${t.dataPath}}}`:"":""}function xo(t){return t?Array.isArray(t)?t:"explicitList"in t?t.explicitList:[]:[]}function bw({className:t,children:a}){const[r,s]=X.useState(!1),o=String(a).replace(/\n$/,""),d=(t==null?void 0:t.replace(/^language-/,""))??"",u=X.useCallback(()=>{navigator.clipboard.writeText(o).then(()=>{s(!0),setTimeout(()=>s(!1),2e3)})},[o]);return y.jsxs("div",{className:"group/code relative my-2 rounded-md overflow-hidden",style:{border:"1px solid var(--border)"},children:[y.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",style:{background:"var(--bg-hover)",borderBottom:"1px solid var(--border)"},children:[y.jsx("span",{className:"text-tiny font-mono uppercase",style:{color:"var(--text-muted)"},children:d||"code"}),y.jsx("button",{onClick:u,className:"flex items-center gap-1 px-2 py-0.5 rounded text-tiny transition-colors",style:{color:r?"var(--accent-green)":"var(--text-muted)",background:"transparent"},title:"Copy code",children:r?y.jsxs(y.Fragment,{children:[y.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),"Copied"]}):y.jsxs(y.Fragment,{children:[y.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0013.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 01-.75.75H9.75a.75.75 0 01-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 01-2.25 2.25H6.75A2.25 2.25 0 014.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 011.927-.184"})}),"Copy"]})})]}),y.jsx("pre",{className:"overflow-x-auto p-3 text-[13px] leading-[1.5]",style:{background:"var(--code-bg)",color:"var(--text-primary)",margin:0},children:y.jsx("code",{className:t,style:{fontFamily:"var(--font-mono)"},children:a})})]})}function yw({children:t}){return y.jsx("div",{className:"my-2 overflow-x-auto rounded-md",style:{border:"1px solid var(--border)"},children:y.jsx("table",{className:"min-w-full text-[13px]",style:{borderCollapse:"collapse"},children:t})})}function xw({children:t}){return y.jsx("thead",{style:{background:"var(--bg-hover)"},children:t})}function vw({children:t,...a}){return y.jsx("tr",{...a,style:{borderBottom:"1px solid var(--border)"},className:"hover:bg-[--bg-hover] transition-colors",children:t})}function Hg({children:t,isHeader:a=!1,style:r}){const s=a?"th":"td";return y.jsx(s,{className:`px-3 py-2 text-left ${a?"font-bold":""}`,style:{color:a?"var(--text-primary)":"var(--text-secondary)",whiteSpace:"nowrap",...r},children:t})}function Ew({jsonl:t,onAction:a}){const r=X.useMemo(()=>_w(t),[t]);return r?y.jsx("div",{className:"mt-1",children:Il(r.rootId,r.components,a)}):y.jsxs("div",{className:"mt-2 px-2 py-1.5 rounded-sm text-caption",style:{background:"var(--code-bg)",border:"1px solid var(--border)",color:"var(--text-secondary)"},children:[y.jsx("span",{className:"font-bold text-tiny",style:{color:"var(--text-muted)"},children:"A2UI"}),y.jsx("pre",{className:"mt-1 overflow-x-auto whitespace-pre-wrap break-words max-h-32",style:{fontFamily:"var(--font-mono)",fontSize:12},children:t})]})}function _w(t){try{const a=t.trim().split(`
|
|
84
|
+
`).filter(Boolean),r=new Map;let s="";for(const o of a){const d=JSON.parse(o);if("surfaceUpdate"in d)for(const u of d.surfaceUpdate.components)r.set(u.id,u.component);"beginRendering"in d&&(s=d.beginRendering.root)}return!s||r.size===0?null:{rootId:s,components:r}}catch{return null}}function Il(t,a,r){const s=a.get(t);if(!s)return null;if("Text"in s){const{text:o,usageHint:d}=s.Text,u=Sr(o),p=d??"body",h={h1:"text-h1 font-bold",h2:"text-h2 font-bold",h3:"text-[14px] font-bold",h4:"text-caption font-bold",h5:"text-tiny font-bold uppercase tracking-wide",caption:"text-caption",body:"text-body"};return y.jsx("p",{className:`${h[p]??"text-body"} my-0.5`,style:{color:p.startsWith("h")?"var(--text-primary)":"var(--text-secondary)"},children:u},t)}if("Button"in s){const{label:o,action:d,style:u}=s.Button,p=Sr(o),h=u==="primary"||u==="filled";return y.jsx("button",{onClick:()=>{d!=null&&d.sendMessage&&r&&r(d.sendMessage,d)},className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-sm text-caption font-bold transition-colors ${h?"text-white":"hover:bg-[--bg-hover]"}`,style:{background:h?"var(--bg-active)":"transparent",color:h?"#fff":"var(--text-link)",border:h?"none":"1px solid var(--border)"},children:p},t)}if("Column"in s){const o=xo(s.Column.children),d=s.Column.gap??4;return y.jsx("div",{className:"flex flex-col",style:{gap:d},children:o.map(u=>Il(u,a,r))},t)}if("Row"in s){const o=xo(s.Row.children),d=s.Row.gap??8;return y.jsx("div",{className:"flex flex-row flex-wrap items-center",style:{gap:d},children:o.map(u=>Il(u,a,r))},t)}if("Card"in s){const o=xo(s.Card.children),d=s.Card.title?Sr(s.Card.title):null;return y.jsxs("div",{className:"rounded-md p-3 my-1",style:{background:"var(--bg-hover)",border:"1px solid var(--border)"},children:[d&&y.jsx("p",{className:"text-h2 font-bold mb-2",style:{color:"var(--text-primary)"},children:d}),y.jsx("div",{className:"flex flex-col gap-1",children:o.map(u=>Il(u,a,r))})]},t)}if("List"in s){const o=xo(s.List.children);return y.jsx("div",{className:"flex flex-col gap-0.5 my-1",children:o.map(d=>y.jsxs("div",{className:"flex items-start gap-2 px-2 py-1.5 rounded hover:bg-[--bg-hover] transition-colors",children:[y.jsx("span",{className:"text-tiny mt-1",style:{color:"var(--text-muted)"},children:"•"}),Il(d,a,r)]},d))},t)}if("Image"in s){const o=Sr(s.Image.url),d=s.Image.alt?Sr(s.Image.alt):"";return y.jsx("img",{src:o,alt:d,className:"max-w-[360px] max-h-64 rounded-md object-contain my-1",style:{border:"1px solid var(--border)"}},t)}if("Divider"in s)return y.jsx("hr",{className:"my-2",style:{border:"none",borderTop:"1px solid var(--border)"}},t);if("Icon"in s){const o=Sr(s.Icon.name);return y.jsxs("span",{className:"text-body",style:{color:"var(--text-secondary)"},children:["[",o,"]"]},t)}return null}function Sw(t,a){return{pre({children:r,node:s}){var d,u,p,h;const o=(d=s==null?void 0:s.children)==null?void 0:d[0];if((o==null?void 0:o.tagName)==="code"){const m=(u=o.properties)!=null&&u.className?Array.isArray(o.properties.className)?o.properties.className.join(" "):String(o.properties.className):void 0;if(m!=null&&m.includes("language-action")){const g=String(((p=r==null?void 0:r.props)==null?void 0:p.children)??r).trim();try{const b=JSON.parse(g);if(b&&typeof b=="object"&&b.kind){const E=kw(b.prompt??g),v=a==null?void 0:a[E];return y.jsx(ww,{action:b,resolved:v,onResolve:t?(k,A)=>t(k,A):void 0})}}catch{}}return y.jsx(bw,{className:m,children:((h=r==null?void 0:r.props)==null?void 0:h.children)??r})}return y.jsx("pre",{children:r})},code({className:r,children:s,...o}){return y.jsx("code",{className:"px-1 py-0.5 rounded text-[0.85em]",style:{background:"var(--code-bg)",color:"var(--code-text)",fontFamily:"var(--font-mono)"},...o,children:s})},table({children:r}){return y.jsx(yw,{children:r})},thead({children:r}){return y.jsx(xw,{children:r})},tr({children:r,...s}){return y.jsx(vw,{...s,children:r})},th({children:r,style:s}){return y.jsx(Hg,{isHeader:!0,style:s,children:r})},td({children:r,style:s}){return y.jsx(Hg,{style:s,children:r})},a({href:r,children:s,...o}){return y.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--text-link)"},className:"underline underline-offset-2 hover:opacity-80 transition-opacity",...o,children:s})},blockquote({children:r}){return y.jsx("blockquote",{className:"my-2 pl-3 py-0.5",style:{borderLeft:"3px solid var(--bg-active)",color:"var(--text-secondary)"},children:r})}}}function kw(t){let a=0;for(let r=0;r<t.length;r++)a=(a<<5)-a+t.charCodeAt(r)|0;return a.toString(36)}function Nw(t,a){if(!t.includes("```action"))return t;const r=[];let s=t;const o=/```action\s*\n[\s\S]*?```/g;let d=0,u;for(;(u=o.exec(s))!==null;)u.index>d&&r.push(s.slice(d,u.index)),r.push(u[0]),d=u.index+u[0].length;const p=s.slice(d),h=p.indexOf("```action");return h!==-1&&a?r.push(p.slice(0,h)):r.push(p),r.join("")}function Tw(t){return t.includes("```action")?t.replace(/```action\s*\n[\s\S]*?```/g,"").includes("```action"):!1}function ww({action:t,resolved:a,onResolve:r}){var g,b;const[s,o]=X.useState(""),[d,u]=X.useState(null);if(a)return y.jsxs("div",{className:"mt-2 rounded-lg px-4 py-3 flex items-center gap-2",style:{background:"var(--bg-hover)",border:"1px solid var(--border)",opacity:.85},children:[y.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,style:{color:"var(--accent-green, #34d399)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),y.jsxs("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:["Selected: ",y.jsx("strong",{style:{color:"var(--text-primary)"},children:a.label??a.value})]})]});const p=E=>{r&&r(E.value,E.label)},h=()=>{const E=s.trim();E&&r&&r(E,E)},m=(E,v)=>{const k=d===v;return E.style==="primary"?{background:"var(--bg-active)",color:"#fff",border:"none",opacity:k?.9:1}:E.style==="danger"?{background:k?"rgba(239,68,68,0.15)":"transparent",color:"var(--accent-red, #ef4444)",border:"1px solid var(--accent-red, #ef4444)"}:{background:k?"var(--bg-hover)":"transparent",color:"var(--text-link)",border:"1px solid var(--border)"}};if(t.kind==="confirm"){const E=((g=t.items)==null?void 0:g[0])??{label:"Yes",value:"yes"},v=((b=t.items)==null?void 0:b[1])??{label:"No",value:"no"};return y.jsxs("div",{className:"mt-2 rounded-lg overflow-hidden",style:{border:"1px solid var(--border)",background:"var(--bg-secondary, var(--bg-hover))"},children:[t.prompt&&y.jsx("div",{className:"px-4 py-3",style:{borderBottom:"1px solid var(--border)"},children:y.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:t.prompt})}),y.jsxs("div",{className:"flex",children:[y.jsx("button",{onClick:()=>p(v),onMouseEnter:()=>u(0),onMouseLeave:()=>u(null),className:"flex-1 px-4 py-2.5 text-caption font-bold transition-all cursor-pointer",style:{background:d===0?"var(--bg-hover)":"transparent",color:"var(--text-secondary)",borderRight:"1px solid var(--border)",border:"none",borderRightWidth:1,borderRightStyle:"solid",borderRightColor:"var(--border)"},children:v.label}),y.jsx("button",{onClick:()=>p(E),onMouseEnter:()=>u(1),onMouseLeave:()=>u(null),className:"flex-1 px-4 py-2.5 text-caption font-bold transition-all cursor-pointer",style:{background:"var(--bg-active)",color:"#fff",border:"none",opacity:d===1?.9:1},children:E.label})]})]})}return t.kind==="buttons"&&t.items?y.jsxs("div",{className:"mt-2 rounded-lg overflow-hidden",style:{border:"1px solid var(--border)",background:"var(--bg-secondary, var(--bg-hover))"},children:[t.prompt&&y.jsx("div",{className:"px-4 py-3",style:{borderBottom:"1px solid var(--border)"},children:y.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:t.prompt})}),y.jsx("div",{className:"flex flex-wrap gap-2 px-4 py-3",children:t.items.map((E,v)=>y.jsx("button",{onClick:()=>p(E),onMouseEnter:()=>u(v),onMouseLeave:()=>u(null),className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-md text-caption font-bold transition-all cursor-pointer",style:m(E,v),children:E.label},E.value))})]}):t.kind==="select"&&t.items?y.jsxs("div",{className:"mt-2 rounded-lg overflow-hidden",style:{border:"1px solid var(--border)",background:"var(--bg-secondary, var(--bg-hover))"},children:[t.prompt&&y.jsx("div",{className:"px-4 py-3",style:{borderBottom:"1px solid var(--border)"},children:y.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:t.prompt})}),y.jsx("div",{className:"flex flex-col",children:t.items.map((E,v)=>y.jsxs("button",{onClick:()=>p(E),onMouseEnter:()=>u(v),onMouseLeave:()=>u(null),className:"flex items-center gap-3 px-4 py-2.5 text-left transition-all cursor-pointer",style:{background:d===v?"var(--bg-hover)":"transparent",color:"var(--text-primary)",borderBottom:v<t.items.length-1?"1px solid var(--border)":"none",border:"none",borderBottomWidth:v<t.items.length-1?1:0,borderBottomStyle:"solid",borderBottomColor:"var(--border)"},children:[y.jsx("span",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",style:{border:"2px solid var(--border)",background:d===v?"var(--bg-active)":"transparent"},children:d===v&&y.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:"#fff"}})}),y.jsx("span",{className:"text-caption",children:E.label})]},E.value))})]}):t.kind==="input"?y.jsxs("div",{className:"mt-2 rounded-lg overflow-hidden",style:{border:"1px solid var(--border)",background:"var(--bg-secondary, var(--bg-hover))"},children:[t.prompt&&y.jsx("div",{className:"px-4 py-3",style:{borderBottom:"1px solid var(--border)"},children:y.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:t.prompt})}),y.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[y.jsx("input",{type:"text",value:s,onChange:E=>o(E.target.value),onKeyDown:E=>{E.key==="Enter"&&h()},placeholder:t.placeholder??"Type your answer...",className:"flex-1 px-3 py-2 rounded-md text-caption outline-none",style:{background:"var(--bg-primary, var(--bg))",color:"var(--text-primary)",border:"1px solid var(--border)"}}),y.jsx("button",{onClick:h,disabled:!s.trim(),className:"px-4 py-2 rounded-md text-caption font-bold transition-all cursor-pointer",style:{background:s.trim()?"var(--bg-active)":"var(--bg-hover)",color:s.trim()?"#fff":"var(--text-muted)",border:"none"},children:"Submit"})]})]}):null}function Aw(){return y.jsxs("div",{className:"mt-2 rounded-lg px-4 py-3 flex items-center gap-3",style:{background:"var(--bg-secondary, var(--bg-hover))",border:"1px solid var(--border)"},children:[y.jsx("span",{className:"inline-block w-2 h-2 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),y.jsx("span",{className:"text-caption",style:{color:"var(--text-muted)"},children:"Preparing options..."})]})}function kd({text:t,mediaUrl:a,a2ui:r,className:s="",isStreaming:o,onAction:d,onResolveAction:u,resolvedActions:p}){const h=X.useMemo(()=>Sw(u,p),[u,p]),m=X.useMemo(()=>Nw(t,o),[t,o]),g=o&&Tw(t);return y.jsxs("div",{className:s,children:[a&&y.jsx("div",{className:"mb-2",children:y.jsx(Cw,{url:a})}),m?y.jsx("div",{className:"prose prose-sm max-w-none prose-p:my-1 prose-ul:my-1 prose-ol:my-1 prose-pre:my-0 prose-code:before:content-none prose-code:after:content-none prose-headings:my-2",style:{color:"var(--text-primary)","--tw-prose-headings":"var(--text-primary)","--tw-prose-bold":"var(--text-primary)","--tw-prose-code":"var(--code-text)","--tw-prose-pre-code":"var(--text-primary)","--tw-prose-pre-bg":"var(--code-bg)","--tw-prose-bullets":"var(--text-muted)","--tw-prose-counters":"var(--text-muted)"},children:y.jsx(Ob,{remarkPlugins:[ey],rehypePlugins:[hw],components:h,children:m})}):null,g&&y.jsx(Aw,{}),r&&y.jsx(Ew,{jsonl:r,onAction:d})]})}function Cw({url:t}){var r,s;const a=((r=t.split(".").pop())==null?void 0:r.toLowerCase().split("?")[0])??"";if(["mp3","wav","ogg","m4a","aac","webm"].includes(a))return y.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-md max-w-[360px]",style:{background:"var(--bg-hover)",border:"1px solid var(--border)"},children:[y.jsx("svg",{className:"w-8 h-8 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,style:{color:"var(--text-link)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 010 12.728M16.463 8.288a5.25 5.25 0 010 7.424M6.75 8.25l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"})}),y.jsx("audio",{controls:!0,className:"flex-1 h-8",style:{maxWidth:280},children:y.jsx("source",{src:t})})]});if(["mp4","mov","avi","mkv"].includes(a))return y.jsx("video",{controls:!0,className:"max-w-[360px] max-h-64 rounded-md",style:{border:"1px solid var(--border)"},children:y.jsx("source",{src:t})});if(["pdf","zip","tar","gz","doc","docx","xls","xlsx","csv"].includes(a)){const o=((s=t.split("/").pop())==null?void 0:s.split("?")[0])??"file";return y.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 px-3 py-2.5 rounded-md max-w-[360px] hover:opacity-90 transition-opacity",style:{background:"var(--bg-hover)",border:"1px solid var(--border)",textDecoration:"none"},children:[y.jsx("svg",{className:"w-8 h-8 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,style:{color:"var(--text-link)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("p",{className:"text-caption font-bold truncate",style:{color:"var(--text-primary)"},children:o}),y.jsxs("p",{className:"text-tiny",style:{color:"var(--text-muted)"},children:[a.toUpperCase()," — Click to open"]})]}),y.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,style:{color:"var(--text-muted)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})})]})}return y.jsx("img",{src:t,alt:"",className:"max-w-[360px] max-h-64 rounded-md object-contain cursor-pointer hover:opacity-90 transition-opacity",style:{border:"1px solid var(--border)"},onClick:()=>window.open(t,"_blank")})}function Ow({channelId:t}){const a=ra(),r=la(),[s,o]=X.useState(null),[d,u]=X.useState(""),p=X.useRef(null),h=X.useRef(null),m=a.sessions,g=a.selectedSessionId;X.useEffect(()=>{s&&p.current&&(p.current.focus(),p.current.select())},[s]);const b=X.useCallback(O=>{if(O===g)return;const S=m.find(j=>j.id===O);S&&(de.info("Session",`Switched to session: ${S.name} (${S.id})`),r({type:"SELECT_SESSION",sessionId:S.id,sessionKey:S.sessionKey}))},[g,m,r]),E=X.useCallback(async()=>{try{let O=t;if(!O){de.info("Session","No channel for default agent — auto-creating General channel"),O=(await aa.create({name:"General",openclawAgentId:"main"})).id;const[{agents:I},{channels:Y}]=await Promise.all([jl.list(),aa.list()]);r({type:"SET_AGENTS",agents:I}),r({type:"SET_CHANNELS",channels:Y});const{sessions:R}=await Ll.list(O);r({type:"SET_SESSIONS",sessions:R}),R.length>0&&r({type:"SELECT_SESSION",sessionId:R[0].id,sessionKey:R[0].sessionKey});return}const S=await Ll.create(O);de.info("Session",`Created session: ${S.name} (${S.id})`),r({type:"ADD_SESSION",session:S}),r({type:"SELECT_SESSION",sessionId:S.id,sessionKey:S.sessionKey}),requestAnimationFrame(()=>{h.current&&(h.current.scrollLeft=h.current.scrollWidth)})}catch(O){de.error("Session",`Failed to create session: ${O}`)}},[t,r]),v=X.useCallback(async O=>{if(!(m.length<=1||!t))try{if(await Ll.delete(t,O),de.info("Session",`Deleted session: ${O}`),r({type:"REMOVE_SESSION",sessionId:O}),g===O){const S=m.filter(j=>j.id!==O);S.length>0&&r({type:"SELECT_SESSION",sessionId:S[0].id,sessionKey:S[0].sessionKey})}}catch(S){de.error("Session",`Failed to delete session: ${S}`)}},[t,m,g,r]),k=X.useCallback((O,S)=>{o(O),u(S)},[]),A=X.useCallback(async()=>{if(!s||!d.trim()||!t){o(null);return}try{await Ll.rename(t,s,d.trim()),de.info("Session",`Renamed session ${s} to: ${d.trim()}`),r({type:"RENAME_SESSION",sessionId:s,name:d.trim()})}catch(O){de.error("Session",`Failed to rename session: ${O}`)}o(null)},[t,s,d,r]);return y.jsx("div",{className:"flex items-center gap-0 px-3",style:{height:36,borderBottom:"1px solid var(--border)",background:"var(--bg-surface)"},children:y.jsxs("div",{ref:h,className:"flex items-center gap-0.5 overflow-x-auto no-scrollbar",children:[m.map(O=>{const S=O.id===g,j=O.id===s;return y.jsx("div",{className:"group relative flex items-center shrink-0",children:j?y.jsx("input",{ref:p,value:d,onChange:I=>u(I.target.value),onBlur:A,onKeyDown:I=>{I.key==="Enter"&&!I.nativeEvent.isComposing&&(I.preventDefault(),A()),I.key==="Escape"&&o(null)},className:"px-2.5 py-1 text-caption rounded-t-md focus:outline-none",style:{background:"var(--bg-hover)",color:"var(--text-primary)",border:"1px solid var(--bg-active)",borderBottom:"none",minWidth:60,maxWidth:140}}):y.jsxs("button",{onClick:()=>b(O.id),onDoubleClick:()=>k(O.id,O.name),className:"flex items-center gap-1 px-2.5 py-1 text-caption rounded-t-md transition-colors whitespace-nowrap",style:{background:S?"var(--bg-hover)":"transparent",color:S?"var(--text-primary)":"var(--text-secondary)",fontWeight:S?700:400,borderBottom:S?"2px solid var(--bg-active)":"2px solid transparent",marginBottom:-1},title:`${O.name} (double-click to rename)`,children:[y.jsx("span",{className:"max-w-[120px] truncate",children:O.name}),m.length>1&&y.jsx("span",{onClick:I=>{I.stopPropagation(),v(O.id)},className:"ml-0.5 w-4 h-4 flex items-center justify-center rounded-sm opacity-0 group-hover:opacity-100 transition-opacity hover:bg-[--bg-hover]",style:{color:"var(--text-muted)"},title:"Close session",children:y.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})},O.id)}),y.jsx("button",{onClick:E,className:"shrink-0 w-7 h-7 flex items-center justify-center rounded-md transition-colors ml-0.5",style:{color:"var(--text-muted)"},title:"New session","aria-label":"New session",onMouseEnter:O=>{O.currentTarget.style.background="var(--bg-hover)",O.currentTarget.style.color="var(--text-primary)"},onMouseLeave:O=>{O.currentTarget.style.background="",O.currentTarget.style.color="var(--text-muted)"},children:y.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})})})]})})}function Mw(t){let a=0;for(let r=0;r<t.length;r++)a=(a<<5)-a+t.charCodeAt(r)|0;return a.toString(36)}const Fg=[{cmd:"/help",label:"Help",icon:"?"},{cmd:"/status",label:"Status",icon:"i"},{cmd:"/model",label:"Model",icon:"M"},{cmd:"/clear",label:"Clear",icon:"C"},{cmd:"/think",label:"Think",icon:"T"},{cmd:"/image",label:"Image",icon:"I"},{cmd:"/search",label:"Search",icon:"S"},{cmd:"/summarize",label:"Summarize",icon:"Σ"},{cmd:"/translate",label:"Translate",icon:"翻"},{cmd:"/reset",label:"Reset",icon:"R"}],_y="botschat_skill_freq_v2",Gg="botschat_skill_freq",Rw=2,Dw=14;function Sy(t=new Date){return t.toISOString().slice(0,10)}function ky(t){const a=Date.now()-Dw*864e5;for(const r of Object.values(t))for(const s of Object.keys(r.daily))new Date(s).getTime()<a&&delete r.daily[s]}function Ny(){try{const t=localStorage.getItem(_y);if(t){const r=JSON.parse(t);return ky(r),r}const a=localStorage.getItem(Gg);if(a){const r=JSON.parse(a),s=Sy(),o={};for(const[d,u]of Object.entries(r))o[d]={total:u,daily:{[s]:u}};return Ty(o),localStorage.removeItem(Gg),o}return{}}catch{return{}}}function Ty(t){ky(t),localStorage.setItem(_y,JSON.stringify(t))}function qg(t){const a=t.match(/^\/(\S+)/);if(!a)return null;const r=`/${a[1]}`,s=Ny(),o=Sy();return s[r]||(s[r]={total:0,daily:{}}),s[r].total+=1,s[r].daily[o]=(s[r].daily[o]??0)+1,Ty(s),r}function wy(t){const a=Date.now()-Rw*864e5;let r=0;for(const[s,o]of Object.entries(t.daily))new Date(s).getTime()>=a&&(r+=o);return r}function Kg(t){return wy(t)*5+t.total}function Lw(){const t=Ny(),a=new Set(Fg.map(o=>o.cmd)),r=Object.keys(t).filter(o=>!a.has(o)&&o.startsWith("/")).map(o=>({cmd:o,label:o.slice(1).charAt(0).toUpperCase()+o.slice(2),icon:o.slice(1).charAt(0).toUpperCase()}));return{skills:[...Fg,...r].sort((o,d)=>{const u=t[o.cmd]?Kg(t[o.cmd]):0;return(t[d.cmd]?Kg(t[d.cmd]):0)-u}),store:t}}function Iw({sendMessage:t}){var N,me,Ne;const a=ra(),r=la(),[s,o]=X.useState(""),[d,u]=X.useState(0),[p,h]=X.useState(null),[m,g]=X.useState(!1),[b,E]=X.useState(!1),v=X.useRef(null),k=X.useRef(null),A=X.useRef(null),O=X.useRef(null),S=a.selectedSessionKey,{skills:j,store:I}=X.useMemo(()=>Lw(),[d]);X.useEffect(()=>{var K;(K=v.current)==null||K.scrollIntoView({behavior:"smooth"})},[a.messages]),X.useEffect(()=>{k.current&&(k.current.style.height="auto",k.current.style.height=Math.min(k.current.scrollHeight,160)+"px")},[s]),X.useEffect(()=>{S&&k.current&&requestAnimationFrame(()=>{var K;(K=k.current)==null||K.focus()})},[S]),X.useEffect(()=>{if(S)try{const se=JSON.parse(localStorage.getItem("botschat:sessionModels")||"{}")[S];se&&se!==a.sessionModel?r({type:"SET_SESSION_MODEL",model:se}):!se&&a.sessionModel&&r({type:"SET_SESSION_MODEL",model:null})}catch{}},[S]);const Y=a.sessionModel??a.defaultModel,R=X.useCallback(K=>{var ye;if(!K||!S||K===Y)return;de.info("Chat",`Model change: ${Y??"none"} → ${K}`),r({type:"SET_SESSION_MODEL",model:K});try{const ge=JSON.parse(localStorage.getItem("botschat:sessionModels")||"{}");ge[S]=K,localStorage.setItem("botschat:sessionModels",JSON.stringify(ge))}catch{}qg("/model"),u(ge=>ge+1);const se={id:crypto.randomUUID(),sender:"user",text:`/model ${K}`,timestamp:Date.now()};r({type:"ADD_MESSAGE",message:se}),t({type:"user.message",sessionKey:S,text:`/model ${K}`,userId:((ye=a.user)==null?void 0:ye.id)??"",messageId:se.id}),requestAnimationFrame(()=>{var ge;(ge=v.current)==null||ge.scrollIntoView({behavior:"smooth"})})},[S,Y,(N=a.user)==null?void 0:N.id,t,r]),T=X.useCallback(K=>{var se;de.info("Skill",`Skill button clicked: ${K}`),o(ye=>ye.startsWith(K+" ")||ye===K?ye:K+" "),(se=k.current)==null||se.focus()},[]),$=X.useCallback(K=>{var ge,De;const se=(ge=K.target.files)==null?void 0:ge[0];if(!se||!se.type.startsWith("image/"))return;const ye=URL.createObjectURL(se);h({file:se,preview:ye}),K.target.value="",(De=k.current)==null||De.focus()},[]),le=X.useCallback(()=>{p&&(URL.revokeObjectURL(p.preview),h(null))},[p]),ce=X.useCallback(async K=>{const se=new FormData;se.append("file",K);const ye=localStorage.getItem("botschat_token");try{const ge=await fetch("/api/upload",{method:"POST",headers:ye?{Authorization:`Bearer ${ye}`}:{},body:se});if(!ge.ok){const kt=await ge.json().catch(()=>({error:"Upload failed"}));throw new Error(kt.error??`HTTP ${ge.status}`)}const De=await ge.json();return De.url.startsWith("/")?`${window.location.origin}${De.url}`:De.url}catch(ge){return de.error("Upload",`Image upload failed: ${ge}`),null}},[]),U=X.useCallback(K=>{K.preventDefault(),K.stopPropagation(),K.dataTransfer.types.includes("Files")&&E(!0)},[]),W=X.useCallback(K=>{var ye;K.preventDefault(),K.stopPropagation();const se=(ye=O.current)==null?void 0:ye.getBoundingClientRect();if(se){const{clientX:ge,clientY:De}=K;(ge<se.left||ge>se.right||De<se.top||De>se.bottom)&&E(!1)}},[]),re=X.useCallback(K=>{K.preventDefault(),K.stopPropagation()},[]),xe=X.useCallback(K=>{var ye,ge;K.preventDefault(),K.stopPropagation(),E(!1);const se=(ye=K.dataTransfer.files)==null?void 0:ye[0];if(se&&se.type.startsWith("image/")){const De=URL.createObjectURL(se);h({file:se,preview:De}),(ge=k.current)==null||ge.focus()}},[]),H=X.useCallback(K=>{var ye;const se=(ye=K.clipboardData)==null?void 0:ye.items;if(se){for(let ge=0;ge<se.length;ge++)if(se[ge].type.startsWith("image/")){K.preventDefault();const De=se[ge].getAsFile();if(De){const xt=URL.createObjectURL(De);h({file:De,preview:xt})}return}}},[]),J=async()=>{var xt;if(!s.trim()&&!p||!S)return;const K=s.trim(),se=K.length>0,ye=se&&K.startsWith("/");de.info("Chat",`Send message${ye?" (skill)":""}${p?" +image":""}: ${K.length>120?K.slice(0,120)+"…":K}`,{sessionKey:S,isSkill:ye}),se&&(qg(K),u(kt=>kt+1));let ge;if(p){g(!0);const kt=await ce(p.file);if(g(!1),!kt)return;ge=kt,le()}const De={id:crypto.randomUUID(),sender:"user",text:K,timestamp:Date.now(),mediaUrl:ge};r({type:"ADD_MESSAGE",message:De}),t({type:"user.message",sessionKey:S,text:K,userId:((xt=a.user)==null?void 0:xt.id)??"",messageId:De.id,...ge?{mediaUrl:ge}:{}}),o(""),requestAnimationFrame(()=>{var kt;(kt=v.current)==null||kt.scrollIntoView({behavior:"smooth"})})},z=K=>{de.info("Thread",`Open thread for message: ${K}`),r({type:"OPEN_THREAD",threadId:K,messages:[]})},ie=X.useCallback(K=>{var ye;if(!S)return;de.info("A2UI",`Action triggered: ${K}`);const se={id:crypto.randomUUID(),sender:"user",text:K,timestamp:Date.now()};r({type:"ADD_MESSAGE",message:se}),t({type:"user.message",sessionKey:S,text:K,userId:((ye=a.user)==null?void 0:ye.id)??"",messageId:se.id}),requestAnimationFrame(()=>{var ge;(ge=v.current)==null||ge.scrollIntoView({behavior:"smooth"})})},[S,(me=a.user)==null?void 0:me.id,t,r]),ae=X.useCallback((K,se,ye)=>{var xt;if(!S)return;de.info("ActionCard",`Resolved: "${ye}" (value="${se}")`);const ge=Mw(ye+se);r({type:"RESOLVE_ACTION",messageId:K,promptHash:ge,value:se,label:ye});const De={id:crypto.randomUUID(),sender:"user",text:ye,timestamp:Date.now()};r({type:"ADD_MESSAGE",message:De}),t({type:"user.message",sessionKey:S,text:ye,userId:((xt=a.user)==null?void 0:xt.id)??"",messageId:De.id}),requestAnimationFrame(()=>{var kt;(kt=v.current)==null||kt.scrollIntoView({behavior:"smooth"})})},[S,(Ne=a.user)==null?void 0:Ne.id,t,r]),be=a.agents.find(K=>K.id===a.selectedAgentId),w=(be==null?void 0:be.name)??"channel",C=(be==null?void 0:be.channelId)??null,P=!!be;return S?y.jsxs("div",{ref:O,className:"flex-1 flex flex-col min-w-0 relative",style:{background:"var(--bg-surface)"},onDragEnter:U,onDragLeave:W,onDragOver:re,onDrop:xe,children:[b&&y.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.4)",pointerEvents:"none"},children:y.jsxs("div",{className:"flex flex-col items-center gap-3 p-8 rounded-lg",style:{background:"var(--bg-surface)",border:"2px dashed var(--text-link)"},children:[y.jsx("svg",{className:"w-12 h-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,style:{color:"var(--text-link)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v13.5A1.5 1.5 0 003.75 21z"})}),y.jsx("span",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:"Drop image here"})]})}),y.jsxs("div",{className:"flex items-center justify-between px-5",style:{height:44,borderBottom:"1px solid var(--border)"},children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs("span",{className:"text-h1",style:{color:"var(--text-primary)"},children:["# ",w]}),be&&!be.isDefault&&y.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:"— custom channel"})]}),y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,style:{color:"var(--text-muted)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456z"})}),y.jsx(Cd,{value:Y??"",onChange:R,models:a.models,disabled:!a.openclawConnected,placeholder:"No model",compact:!0})]})]}),P&&y.jsx(Ow,{channelId:C}),y.jsxs("div",{className:"flex-1 overflow-y-auto",children:[a.messages.length===0&&y.jsx("div",{className:"py-12 px-5 text-center",children:y.jsx("p",{className:"text-caption",style:{color:"var(--text-muted)"},children:"No messages yet. Start a conversation."})}),a.messages.map((K,se)=>{const ye=se>0?a.messages[se-1]:null,ge=(ye==null?void 0:ye.sender)===K.sender&&K.timestamp-ye.timestamp<3e5;return y.jsx(zw,{msg:K,grouped:ge,onOpenThread:()=>z(K.id),onAction:ie,onResolveAction:(De,xt)=>ae(K.id,De,xt)},K.id)}),y.jsx("div",{ref:v})]}),y.jsxs("div",{className:"px-5 pb-4 pt-2",children:[y.jsx("div",{className:"flex items-center gap-1.5 pb-1.5 overflow-x-auto no-scrollbar",children:j.map(K=>{const se=I[K.cmd],ye=(se==null?void 0:se.total)??0,ge=se?wy(se):0,De=s.startsWith(K.cmd+" ")||s===K.cmd;return y.jsxs("button",{onClick:()=>T(K.cmd),className:"flex items-center gap-1 px-2 py-1 rounded-md text-xs whitespace-nowrap transition-colors shrink-0",style:{background:De?"var(--bg-active)":"var(--bg-hover)",color:De?"#fff":"var(--text-secondary)",border:"1px solid transparent"},title:`${K.cmd}${ye>0?` (total ${ye}x${ge>0?`, recent ${ge}x`:""})`:""}`,children:[y.jsx("span",{className:"font-mono text-[10px] opacity-70",children:K.cmd}),ye>0&&y.jsx("span",{className:"ml-0.5 px-1 rounded-sm text-[10px] font-bold",style:{background:De?"rgba(255,255,255,0.2)":"var(--bg-surface)",color:De?"#fff":"var(--text-muted)"},children:ye})]},K.cmd)})}),y.jsxs("div",{className:"rounded-md",style:{border:"1px solid var(--border)",background:"var(--bg-surface)"},children:[p&&y.jsxs("div",{className:"px-3 pt-2 flex items-start gap-2",children:[y.jsxs("div",{className:"relative",children:[y.jsx("img",{src:p.preview,alt:"Preview",className:"max-w-[120px] max-h-[80px] rounded-md object-contain",style:{border:"1px solid var(--border)"}}),y.jsx("button",{onClick:le,className:"absolute -top-1.5 -right-1.5 w-5 h-5 rounded-full flex items-center justify-center text-white opacity-80 hover:opacity-100 transition-opacity",style:{background:"#e74c3c",fontSize:11},title:"Remove image",children:"✕"})]}),m&&y.jsx("span",{className:"text-caption",style:{color:"var(--text-muted)"},children:"Uploading…"})]}),y.jsx("textarea",{ref:k,value:s,onChange:K=>o(K.target.value),onKeyDown:K=>{K.key==="Enter"&&!K.shiftKey&&!K.nativeEvent.isComposing&&(K.preventDefault(),J())},onPaste:H,placeholder:a.openclawConnected?`Message #${w}`:"OpenClaw is offline…",disabled:!a.openclawConnected,rows:1,className:"w-full px-3 py-2.5 text-body bg-transparent resize-none focus:outline-none disabled:opacity-50 placeholder:text-[--text-muted]",style:{color:"var(--text-primary)",minHeight:40}}),y.jsxs("div",{className:"flex items-center justify-between px-3 pb-2",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("input",{ref:A,type:"file",accept:"image/*",className:"hidden",onChange:$}),y.jsx("button",{onClick:()=>{var K;return(K=A.current)==null?void 0:K.click()},className:"p-1.5 rounded hover:bg-[--bg-hover] transition-colors",style:{color:"var(--text-muted)"},title:"Upload image","aria-label":"Upload image",disabled:!a.openclawConnected,children:y.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v13.5A1.5 1.5 0 003.75 21zm14.25-15.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"})})})]}),y.jsx("button",{onClick:J,disabled:!s.trim()&&!p||!a.openclawConnected,className:"px-3 py-1.5 rounded-sm text-caption font-bold text-white disabled:opacity-40 disabled:cursor-not-allowed transition-colors",style:{background:"var(--bg-active)"},children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})}),"Send"]})})]})]})]})]}):y.jsx("div",{className:"flex-1 flex items-center justify-center",style:{background:"var(--bg-surface)"},children:y.jsxs("div",{className:"text-center",children:[y.jsx("svg",{className:"w-16 h-16 mx-auto mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,style:{color:"var(--text-muted)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 01-.825-.242m9.345-8.334a2.126 2.126 0 00-.476-.095 48.64 48.64 0 00-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0011.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"})}),y.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-muted)"},children:"Select a channel to get started"}),y.jsx("p",{className:"text-caption mt-1",style:{color:"var(--text-muted)"},children:"Choose a channel from the sidebar"})]})})}function zw({msg:t,grouped:a,onOpenThread:r,onAction:s,onResolveAction:o}){const d=ra(),u=t.sender==="user"?"You":"OpenClaw Agent",p=t.sender==="user"?"#9B59B6":"#2BAC76",h=t.sender==="user"?"U":"A",m=d.threadReplyCounts[t.id]??0;return y.jsxs("div",{className:"group relative px-5 hover:bg-[--bg-hover] transition-colors",style:{paddingTop:a?2:8,paddingBottom:2},children:[y.jsxs("div",{className:"flex gap-2 max-w-message",children:[y.jsx("div",{className:"flex-shrink-0",style:{width:36},children:!a&&y.jsx("div",{className:"w-9 h-9 rounded flex items-center justify-center text-white text-caption font-bold",style:{background:p},children:h})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[!a&&y.jsxs("div",{className:"flex items-baseline gap-2 mb-0.5",children:[y.jsx("span",{className:"text-h2",style:{color:"var(--text-primary)"},children:u}),y.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:new Date(t.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),y.jsx(kd,{text:t.text,mediaUrl:t.mediaUrl,a2ui:t.a2ui,isStreaming:t.isStreaming,onAction:s,onResolveAction:o,resolvedActions:t.resolvedActions}),t.isStreaming&&y.jsx("span",{className:"inline-block w-1.5 h-4 ml-0.5 rounded-sm animate-pulse",style:{background:"var(--text-link)",verticalAlign:"text-bottom"}}),m>0&&y.jsxs("button",{onClick:r,className:"flex items-center gap-2 mt-1 py-1 px-1 -ml-1 rounded hover:bg-[--bg-hover] transition-colors cursor-pointer group/thread",children:[y.jsxs("span",{className:"text-caption font-bold",style:{color:"var(--text-link)"},children:[m," ",m===1?"reply":"replies"]}),y.jsx("span",{className:"text-caption opacity-0 group-hover/thread:opacity-100 transition-opacity",style:{color:"var(--text-secondary)"},children:"View thread"}),y.jsx("svg",{className:"w-4 h-4 opacity-0 group-hover/thread:opacity-100 transition-opacity",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,style:{color:"var(--text-secondary)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})]})]}),y.jsx("div",{className:"absolute top-0 right-5 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-0.5 px-1 py-0.5 rounded",style:{background:"var(--bg-surface)",border:"1px solid var(--border)",boxShadow:"var(--shadow-sm)"},children:y.jsx(Bw,{label:"Reply in thread",icon:y.jsx("svg",{className:"w-[18px] h-[18px]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 01-.825-.242m9.345-8.334a2.126 2.126 0 00-.476-.095 48.64 48.64 0 00-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0011.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"})}),onClick:r})})]})}function Bw({label:t,icon:a,onClick:r}){return y.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-[--bg-hover] transition-colors",style:{color:"var(--text-secondary)"},title:t,"aria-label":t,children:a})}function Uw({sendMessage:t}){const a=ra(),r=la(),[s,o]=X.useState("");if(X.useEffect(()=>{if(!a.activeThreadId||!a.selectedSessionKey||!a.user)return;const p=`${a.selectedSessionKey}:thread:${a.activeThreadId}`;de.info("Thread",`Loading history for thread ${a.activeThreadId}`),Vg.list(a.user.id,p,a.activeThreadId).then(({messages:h})=>{de.info("Thread",`Loaded ${h.length} thread messages`),h.length>0&&r({type:"OPEN_THREAD",threadId:a.activeThreadId,messages:h})}).catch(h=>{de.error("Thread",`Failed to load thread history: ${h}`)})},[a.activeThreadId]),!a.activeThreadId)return null;const d=a.messages.find(p=>p.id===a.activeThreadId),u=()=>{var g;if(!s.trim()||!a.selectedSessionKey)return;const p=s.trim(),h=`${a.selectedSessionKey}:thread:${a.activeThreadId}`;de.info("Thread",`Send reply: ${p.length>120?p.slice(0,120)+"…":p}`,{threadId:a.activeThreadId});const m={id:crypto.randomUUID(),sender:"user",text:p,timestamp:Date.now(),threadId:a.activeThreadId??void 0};r({type:"ADD_THREAD_MESSAGE",message:m}),t({type:"user.message",sessionKey:h,text:p,userId:((g=a.user)==null?void 0:g.id)??"",messageId:m.id}),o("")};return y.jsxs("div",{className:"flex flex-col h-full",style:{width:420,minWidth:320,background:"var(--bg-surface)",borderLeft:"1px solid var(--border)"},children:[y.jsxs("div",{className:"flex items-center justify-between px-4",style:{height:44,borderBottom:"1px solid var(--border)"},children:[y.jsx("h3",{className:"text-h1",style:{color:"var(--text-primary)"},children:"Thread"}),y.jsx("button",{onClick:()=>r({type:"CLOSE_THREAD"}),className:"p-1 rounded hover:bg-[--bg-hover] transition-colors",style:{color:"var(--text-secondary)"},"aria-label":"Close thread",children:y.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),y.jsxs("div",{className:"flex-1 overflow-y-auto",children:[d&&y.jsx("div",{className:"px-5 py-3",style:{borderBottom:"1px solid var(--border)"},children:y.jsxs("div",{className:"flex gap-2",children:[y.jsx("div",{className:"w-9 h-9 rounded flex-shrink-0 flex items-center justify-center text-white text-caption font-bold",style:{background:d.sender==="user"?"#9B59B6":"#2BAC76"},children:d.sender==="user"?"U":"A"}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-baseline gap-2 mb-0.5",children:[y.jsx("span",{className:"text-h2",style:{color:"var(--text-primary)"},children:d.sender==="user"?"You":"OpenClaw Agent"}),y.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:new Date(d.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),y.jsx(kd,{text:d.text,mediaUrl:d.mediaUrl})]})]})}),y.jsx("div",{className:"px-5 py-2",style:{borderBottom:"1px solid var(--border)"},children:y.jsxs("span",{className:"text-caption font-bold",style:{color:"var(--text-link)"},children:[a.threadMessages.length," ",a.threadMessages.length===1?"reply":"replies"]})}),a.threadMessages.map((p,h)=>{const m=h>0?a.threadMessages[h-1]:null,g=(m==null?void 0:m.sender)===p.sender&&p.timestamp-m.timestamp<3e5;return y.jsx("div",{className:"px-5 hover:bg-[--bg-hover] transition-colors",style:{paddingTop:g?2:8,paddingBottom:2},children:y.jsxs("div",{className:"flex gap-2",children:[y.jsx("div",{className:"flex-shrink-0",style:{width:36},children:!g&&y.jsx("div",{className:"w-9 h-9 rounded flex items-center justify-center text-white text-caption font-bold",style:{background:p.sender==="user"?"#9B59B6":"#2BAC76"},children:p.sender==="user"?"U":"A"})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[!g&&y.jsxs("div",{className:"flex items-baseline gap-2 mb-0.5",children:[y.jsx("span",{className:"text-h2",style:{color:"var(--text-primary)"},children:p.sender==="user"?"You":"OpenClaw Agent"}),y.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:new Date(p.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),y.jsx(kd,{text:p.text,mediaUrl:p.mediaUrl,a2ui:p.a2ui})]})]})},p.id)})]})," ",y.jsx("div",{className:"px-4 pb-3 pt-2",children:y.jsxs("div",{className:"rounded-md",style:{border:"1px solid var(--border)",background:"var(--bg-surface)"},children:[y.jsx("textarea",{value:s,onChange:p=>o(p.target.value),onKeyDown:p=>{p.key==="Enter"&&!p.shiftKey&&!p.nativeEvent.isComposing&&(p.preventDefault(),u())},placeholder:"Reply…",rows:1,className:"w-full px-3 py-2 text-body bg-transparent resize-none focus:outline-none placeholder:text-[--text-muted]",style:{color:"var(--text-primary)",minHeight:36}}),y.jsx("div",{className:"flex justify-end px-3 pb-2",children:y.jsx("button",{onClick:u,disabled:!s.trim(),className:"px-3 py-1 rounded-sm text-caption font-bold text-white disabled:opacity-40 disabled:cursor-not-allowed transition-colors",style:{background:"var(--bg-active)"},children:"Send"})})]})})]})}function jw(t){switch(t){case"ok":return"OK";case"error":return"ERR";case"skipped":return"SKIP";case"running":return"RUN";default:return t.toUpperCase()}}function Hw(t){switch(t){case"ok":return{bg:"rgba(43,172,118,0.15)",fg:"var(--accent-green)"};case"error":return{bg:"rgba(224,30,90,0.15)",fg:"var(--accent-red)"};case"running":return{bg:"rgba(29,155,209,0.15)",fg:"var(--text-link)"};default:return{bg:"rgba(232,162,48,0.15)",fg:"var(--accent-yellow)"}}}function Fw({jobs:t,selectedJobId:a,onSelectJob:r}){return t.length===0?y.jsx("div",{className:"flex items-center justify-center",style:{width:192,borderRight:"1px solid var(--border)",background:"var(--bg-surface)"},children:y.jsxs("div",{className:"text-center p-4",children:[y.jsx("svg",{className:"w-8 h-8 mx-auto mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,style:{color:"var(--text-muted)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),y.jsxs("p",{className:"text-tiny",style:{color:"var(--text-muted)"},children:["No runs yet.",y.jsx("br",{}),"Waiting for schedule..."]})]})}):y.jsxs("div",{className:"overflow-y-auto",style:{width:192,borderRight:"1px solid var(--border)",background:"var(--bg-surface)"},children:[y.jsxs("div",{className:"px-3 py-2",style:{borderBottom:"1px solid var(--border)"},children:[y.jsx("span",{className:"text-tiny uppercase tracking-wider font-bold",style:{color:"var(--text-muted)"},children:"Job History"}),y.jsxs("span",{className:"text-tiny ml-1",style:{color:"var(--text-muted)"},children:["(",t.length,")"]})]}),t.map((s,o)=>{const d=Hw(s.status),u=s.number||t.length-o;return y.jsxs("button",{onClick:()=>r(s.id),className:`w-full text-left px-3 py-2 hover:bg-[--bg-hover] transition-colors ${a===s.id?"bg-[--bg-hover]":""}`,style:{borderBottom:"1px solid var(--border)",...a===s.id?{borderLeft:"3px solid var(--bg-active)"}:{}},children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("span",{className:"text-tiny font-mono",style:{color:"var(--text-muted)"},children:["#",u]}),y.jsx("span",{className:"text-tiny px-1.5 py-0.5 rounded-sm font-bold",style:{background:d.bg,color:d.fg},children:jw(s.status)})]}),y.jsxs("div",{className:"text-tiny mt-0.5",style:{color:"var(--text-muted)"},children:[s.time,s.durationMs!=null&&y.jsxs("span",{className:"ml-1",children:["(",(s.durationMs/1e3).toFixed(1),"s)"]})]}),s.summary&&y.jsx("div",{className:"text-caption mt-1 truncate",style:{color:"var(--text-secondary)"},children:s.summary})]},s.id)})]})}function Gw(){const t=la(),[a,r]=X.useState(!1),[s,o]=X.useState(""),[d,u]=X.useState(""),[p,h]=X.useState(""),[m,g]=X.useState(""),[b,E]=X.useState(!1),v=async k=>{k.preventDefault(),g(""),E(!0);try{let A;a?(de.info("Auth",`Registering new account: ${s}`),A=await ud.register(s,d,p||void 0)):(de.info("Auth",`Logging in: ${s}`),A=await ud.login(s,d)),de.info("Auth",`${a?"Register":"Login"} success — user ${A.id} (${A.email})`),Ad(A.token),t({type:"SET_USER",user:{id:A.id,email:A.email,displayName:A.displayName}})}catch(A){const O=A instanceof Error?A.message:"Something went wrong";de.error("Auth",`${a?"Register":"Login"} failed: ${O}`),g(O)}finally{E(!1)}};return y.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{background:"var(--bg-secondary)"},children:y.jsxs("div",{className:"w-full max-w-md",children:[y.jsxs("div",{className:"text-center mb-8",children:[y.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-xl text-white text-2xl font-bold mb-4",style:{background:"#1264A3"},children:"BC"}),y.jsx("h1",{className:"text-3xl font-bold",style:{color:"var(--text-primary)"},children:"BotsChat"}),y.jsx("p",{className:"mt-2",style:{color:"var(--text-secondary)"},children:"Multi-channel AI chat powered by OpenClaw"})]}),y.jsxs("div",{className:"rounded-md p-8",style:{background:"var(--bg-surface)",boxShadow:"var(--shadow-lg)"},children:[y.jsx("h2",{className:"text-h1 mb-6",style:{color:"var(--text-primary)"},children:a?"Create account":"Sign in"}),y.jsxs("form",{onSubmit:v,className:"space-y-4",children:[a&&y.jsxs("div",{children:[y.jsx("label",{className:"block text-caption font-bold mb-1",style:{color:"var(--text-secondary)"},children:"Display Name"}),y.jsx("input",{type:"text",value:p,onChange:k=>h(k.target.value),className:"w-full px-3 py-2.5 text-body rounded-sm focus:outline-none placeholder:text-[--text-muted]",style:{background:"var(--bg-surface)",color:"var(--text-primary)",border:"1px solid var(--border)"},placeholder:"Your name"})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-caption font-bold mb-1",style:{color:"var(--text-secondary)"},children:"Email"}),y.jsx("input",{type:"email",value:s,onChange:k=>o(k.target.value),required:!0,className:"w-full px-3 py-2.5 text-body rounded-sm focus:outline-none placeholder:text-[--text-muted]",style:{background:"var(--bg-surface)",color:"var(--text-primary)",border:"1px solid var(--border)"},placeholder:"you@example.com"})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-caption font-bold mb-1",style:{color:"var(--text-secondary)"},children:"Password"}),y.jsx("input",{type:"password",value:d,onChange:k=>u(k.target.value),required:!0,className:"w-full px-3 py-2.5 text-body rounded-sm focus:outline-none placeholder:text-[--text-muted]",style:{background:"var(--bg-surface)",color:"var(--text-primary)",border:"1px solid var(--border)"},placeholder:"Enter password"})]}),m&&y.jsx("div",{className:"text-caption px-3 py-2 rounded-sm",style:{background:"rgba(224,30,90,0.1)",color:"var(--accent-red)"},children:m}),y.jsx("button",{type:"submit",disabled:b,className:"w-full py-2.5 font-bold text-body text-white rounded-sm disabled:opacity-50 transition-colors hover:brightness-110",style:{background:"var(--bg-active)"},children:b?"...":a?"Create account":"Sign in"})]}),y.jsx("div",{className:"mt-6 text-center",children:y.jsx("button",{onClick:()=>{r(!a),g("")},className:"text-caption hover:underline",style:{color:"var(--text-link)"},children:a?"Already have an account? Sign in":"Don't have an account? Register"})})]})]})})}const Ay={info:"var(--text-muted)",warn:"var(--accent-yellow)",error:"var(--accent-red)","ws-in":"#6BCB77","ws-out":"#4D96FF",api:"#C77DFF"},Cy={info:"INF",warn:"WRN",error:"ERR","ws-in":"WS↓","ws-out":"WS↑",api:"API"};function qw(t){const a=new Date(t);return a.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})+"."+String(a.getMilliseconds()).padStart(3,"0")}function Kw(){const t=X.useSyncExternalStore(Jv,Zv),[a,r]=X.useState(!1),[s,o]=X.useState("all"),[d,u]=X.useState(new Set),p=X.useRef(null),h=X.useRef(!0);X.useEffect(()=>{a&&h.current&&p.current&&(p.current.scrollTop=p.current.scrollHeight)},[t.length,a]);const m=()=>{if(!p.current)return;const{scrollTop:v,scrollHeight:k,clientHeight:A}=p.current;h.current=k-v-A<40},g=v=>{u(k=>{const A=new Set(k);return A.has(v)?A.delete(v):A.add(v),A})},b=s==="all"?t:t.filter(v=>v.level===s),E=t.length;return y.jsxs("div",{style:{flexShrink:0,fontFamily:"var(--font-mono)",fontSize:12,lineHeight:1.5},children:[y.jsxs("div",{onClick:()=>r(!a),style:{display:"flex",alignItems:"center",gap:8,padding:"3px 12px",background:"var(--bg-secondary)",borderTop:"1px solid var(--border)",cursor:"pointer",userSelect:"none"},children:[y.jsx("svg",{width:10,height:10,viewBox:"0 0 10 10",style:{transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s",flexShrink:0},children:y.jsx("path",{d:"M1 7L5 3l4 4",stroke:"var(--text-muted)",strokeWidth:1.5,fill:"none"})}),y.jsx("span",{style:{color:"var(--text-muted)",fontWeight:600,fontSize:11},children:"Debug Log"}),y.jsxs("span",{style:{color:"var(--text-muted)",fontSize:10},children:["(",E,")"]}),a&&y.jsx("div",{style:{display:"flex",gap:2,marginLeft:8},onClick:v=>v.stopPropagation(),children:["all","ws-in","ws-out","api","info","warn","error"].map(v=>y.jsx("button",{onClick:()=>o(v),style:{padding:"1px 6px",borderRadius:3,border:"none",fontSize:10,fontFamily:"var(--font-mono)",cursor:"pointer",background:s===v?"var(--bg-active)":"var(--bg-hover)",color:s===v?"#fff":v==="all"?"var(--text-muted)":Ay[v]},children:v==="all"?"ALL":Cy[v]},v))}),a&&y.jsx("button",{onClick:v=>{v.stopPropagation(),Qv()},style:{marginLeft:"auto",padding:"1px 8px",borderRadius:3,border:"none",fontSize:10,fontFamily:"var(--font-mono)",cursor:"pointer",background:"var(--bg-hover)",color:"var(--text-muted)"},children:"Clear"})]}),a&&y.jsxs("div",{ref:p,onScroll:m,style:{height:220,overflowY:"auto",overflowX:"hidden",background:"var(--bg-primary)",borderTop:"1px solid var(--border)"},children:[b.length===0&&y.jsx("div",{style:{padding:"16px 12px",color:"var(--text-muted)",textAlign:"center"},children:"No log entries yet."}),b.map(v=>y.jsx($w,{entry:v,expanded:d.has(v.id),onToggleExpand:()=>g(v.id)},v.id))]})]})}function $w({entry:t,expanded:a,onToggleExpand:r}){const s=Ay[t.level],o=Cy[t.level];return y.jsxs("div",{style:{padding:"1px 12px",borderBottom:"1px solid var(--border)",wordBreak:"break-all"},onMouseEnter:d=>d.currentTarget.style.background="var(--bg-hover)",onMouseLeave:d=>d.currentTarget.style.background="",children:[y.jsxs("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[y.jsx("span",{style:{color:"var(--text-muted)",flexShrink:0,width:85},children:qw(t.ts)}),y.jsx("span",{style:{color:s,fontWeight:700,flexShrink:0,width:28,textAlign:"center"},children:o}),y.jsxs("span",{style:{color:"var(--text-secondary)",flexShrink:0,minWidth:50},children:["[",t.tag,"]"]}),y.jsx("span",{style:{color:"var(--text-primary)",flex:1},children:t.message}),t.detail&&y.jsx("button",{onClick:r,style:{border:"none",background:"none",cursor:"pointer",color:"var(--text-muted)",fontSize:10,padding:"0 4px",flexShrink:0},children:a?"▼":"▶"})]}),a&&t.detail&&y.jsx("pre",{style:{margin:"2px 0 4px 121px",padding:"4px 8px",background:"var(--code-bg)",borderRadius:3,color:"var(--text-secondary)",fontSize:11,whiteSpace:"pre-wrap",wordBreak:"break-all",maxHeight:200,overflowY:"auto"},children:t.detail})]})}function Yw(){const t=ra(),a=la(),r=s=>{a({type:"SELECT_CRON_TASK",taskId:s})};return y.jsxs("div",{className:"flex flex-col h-full",style:{width:220,minWidth:160,background:"var(--bg-secondary)",borderRight:"1px solid var(--border)"},children:[y.jsx("div",{className:"px-4 py-3 flex items-center gap-2",children:y.jsx("span",{className:"text-[--text-sidebar-active] font-bold text-h2 truncate flex-1",children:"Automations"})}),y.jsx("div",{className:"px-4 pb-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:t.openclawConnected?"var(--accent-green)":"var(--accent-red)"}}),y.jsx("span",{className:"text-tiny text-[--text-muted]",children:t.openclawConnected?"OpenClaw connected":"OpenClaw offline"})]})}),y.jsx("div",{className:"px-4 pb-2",children:y.jsxs("span",{className:"text-tiny text-[--text-muted]",children:[t.cronTasks.length," cron job",t.cronTasks.length!==1?"s":""]})}),y.jsx("div",{className:"flex-1 overflow-y-auto sidebar-scroll",children:t.cronTasks.length===0?y.jsxs("div",{className:"px-4 py-8 text-center",children:[y.jsx("svg",{className:"w-10 h-10 mx-auto mb-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,style:{color:"var(--text-muted)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),y.jsx("p",{className:"text-caption text-[--text-muted]",children:"No automations yet."}),y.jsx("p",{className:"text-tiny text-[--text-muted] mt-1",children:"Cron jobs from OpenClaw will appear here automatically."})]}):t.cronTasks.map(s=>{const o=t.selectedCronTaskId===s.id,d=s.enabled;let u="var(--accent-green)";return d||(u="var(--text-muted)"),y.jsxs("button",{onClick:()=>r(s.id),className:"w-full text-left py-2 transition-colors",style:{paddingLeft:o?13:16,paddingRight:16,background:o?"var(--bg-hover)":void 0,borderLeft:o?"3px solid var(--bg-active)":"3px solid transparent",color:o?"var(--text-sidebar-active)":"var(--text-sidebar)"},onMouseEnter:p=>{o||(p.currentTarget.style.background="var(--sidebar-hover)")},onMouseLeave:p=>{o||(p.currentTarget.style.background=o?"var(--bg-hover)":"")},children:[y.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:u}}),y.jsx("span",{className:`text-body truncate ${o?"font-bold":""}`,children:s.name})]}),y.jsxs("div",{className:"flex items-center gap-2 mt-0.5 pl-4",children:[y.jsx("span",{className:"text-tiny truncate",style:{color:"var(--text-muted)"},children:s.schedule??"no schedule"}),!d&&y.jsx("span",{className:"text-tiny",style:{color:"var(--text-muted)"},children:"paused"})]})]},s.id)})})]})}function Nd(t){if(!t)return null;const a=t.trim().toLowerCase(),r=a.match(/^every\s+(\d+(?:\.\d+)?)\s*(s|m|h)$/);if(r)return{kind:"every",intervalValue:parseFloat(r[1]),intervalUnit:r[2]};const s=a.match(/^at\s+(\d{1,2}:\d{2})$/);return s?{kind:"at",atTime:s[1].padStart(5,"0")}:null}function Pw(t){return t.kind==="every"&&t.intervalValue&&t.intervalUnit?`every ${t.intervalValue}${t.intervalUnit}`:t.kind==="at"&&t.atTime?`at ${t.atTime}`:""}function Vw({value:t,onChange:a,onSave:r,onCancel:s,saving:o}){const d=Nd(t),[u,p]=X.useState((d==null?void 0:d.kind)??"every"),[h,m]=X.useState((d==null?void 0:d.intervalValue)??1),[g,b]=X.useState((d==null?void 0:d.intervalUnit)??"h"),[E,v]=X.useState((d==null?void 0:d.atTime)??"09:00");X.useEffect(()=>{const Y=Nd(t);Y&&(p(Y.kind),Y.kind==="every"?(m(Y.intervalValue??1),b(Y.intervalUnit??"h")):v(Y.atTime??"09:00"))},[t]);const k=X.useCallback((Y,R,T,$)=>{const le=Pw(Y==="every"?{kind:"every",intervalValue:R,intervalUnit:T}:{kind:"at",atTime:$});a(le)},[a]),A=Y=>{p(Y),k(Y,h,g,E)},O=Y=>{const R=Math.max(1,Math.min(Y,999));m(R),k(u,R,g,E)},S=Y=>{b(Y),k(u,h,Y,E)},j=Y=>{v(Y),k(u,h,g,Y)},I=Y=>{Y.key==="Escape"&&s(),Y.key==="Enter"&&(Y.preventDefault(),r())};return y.jsxs("div",{className:"flex flex-col gap-2",onKeyDown:I,children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx($g,{active:u==="every",onClick:()=>A("every"),label:"Interval",icon:y.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182"})})}),y.jsx($g,{active:u==="at",onClick:()=>A("at"),label:"Daily at",icon:y.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})})})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[u==="every"?y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"text-caption flex-shrink-0",style:{color:"var(--text-muted)"},children:"Every"}),y.jsx("input",{type:"number",min:1,max:999,value:h,onChange:Y=>O(parseInt(Y.target.value,10)||1),className:"text-body px-2 py-1 rounded-sm focus:outline-none w-16 text-center",style:{background:"var(--bg-hover)",color:"var(--text-primary)",border:"1px solid var(--bg-active)"},autoFocus:!0}),y.jsxs("div",{className:"flex items-center gap-0.5",children:[y.jsx(sd,{active:g==="m",onClick:()=>S("m"),label:"min"}),y.jsx(sd,{active:g==="h",onClick:()=>S("h"),label:"hr"}),y.jsx(sd,{active:g==="s",onClick:()=>S("s"),label:"sec"})]})]}):y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"text-caption flex-shrink-0",style:{color:"var(--text-muted)"},children:"Daily at"}),y.jsx("input",{type:"time",value:E,onChange:Y=>j(Y.target.value),className:"text-body px-2 py-1 rounded-sm focus:outline-none",style:{background:"var(--bg-hover)",color:"var(--text-primary)",border:"1px solid var(--bg-active)"},autoFocus:!0})]}),y.jsxs("div",{className:"flex items-center gap-1 ml-auto flex-shrink-0",children:[y.jsx("button",{onClick:r,disabled:o,className:"px-2 py-1 text-tiny font-bold text-white rounded-sm disabled:opacity-50",style:{background:"var(--bg-active)"},children:o?"...":"Save"}),y.jsx("button",{onClick:s,className:"px-2 py-1 text-tiny rounded-sm",style:{color:"var(--text-muted)"},children:"Cancel"})]})]}),y.jsx("div",{className:"text-tiny",style:{color:"var(--text-muted)"},children:u==="every"?`Runs every ${h} ${g==="h"?"hour":g==="m"?"minute":"second"}${h!==1?"s":""}`:`Runs daily at ${E}`})]})}function Xw({schedule:t,onClick:a}){if(!t)return y.jsx("span",{className:"text-body cursor-pointer hover:underline",style:{color:"var(--text-muted)"},onClick:a,title:"Click to set schedule",children:"Not set"});const r=Nd(t);return r?y.jsx("button",{className:"flex items-center gap-1.5 cursor-pointer group",onClick:a,title:"Click to edit schedule",children:r.kind==="every"?y.jsxs(y.Fragment,{children:[y.jsx("svg",{className:"w-3.5 h-3.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,style:{color:"var(--text-muted)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182"})}),y.jsxs("span",{className:"text-body group-hover:underline",style:{color:"var(--text-primary)"},children:["Every ",r.intervalValue,r.intervalUnit==="h"?"h":r.intervalUnit==="m"?"m":"s"]})]}):y.jsxs(y.Fragment,{children:[y.jsx("svg",{className:"w-3.5 h-3.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,style:{color:"var(--text-muted)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),y.jsxs("span",{className:"text-body group-hover:underline",style:{color:"var(--text-primary)"},children:["Daily at ",r.atTime]})]})}):y.jsx("span",{className:"text-body cursor-pointer hover:underline",style:{color:"var(--text-primary)"},onClick:a,title:"Click to edit schedule",children:t})}function $g({active:t,onClick:a,label:r,icon:s}){return y.jsxs("button",{onClick:a,className:"flex items-center gap-1.5 px-2.5 py-1 text-caption rounded-sm transition-colors",style:{background:t?"rgba(29,155,209,0.15)":"transparent",color:t?"var(--text-link)":"var(--text-muted)",border:t?"1px solid rgba(29,155,209,0.3)":"1px solid transparent"},children:[s,r]})}function sd({active:t,onClick:a,label:r}){return y.jsx("button",{onClick:a,className:"px-2 py-1 text-caption rounded-sm transition-colors",style:{background:t?"var(--bg-active)":"var(--bg-hover)",color:t?"#fff":"var(--text-secondary)",border:t?"1px solid var(--bg-active)":"1px solid var(--border)"},children:r})}function Yg(t){return new Date(t*1e3).toLocaleString()}function Oy(t){switch(t){case"ok":return"OK";case"error":return"ERR";case"skipped":return"SKIP";case"running":return"RUN";default:return t.toUpperCase()}}function My(t){switch(t){case"ok":return{bg:"rgba(43,172,118,0.15)",fg:"var(--accent-green)"};case"error":return{bg:"rgba(224,30,90,0.15)",fg:"var(--accent-red)"};case"running":return{bg:"rgba(29,155,209,0.15)",fg:"var(--text-link)"};default:return{bg:"rgba(232,162,48,0.15)",fg:"var(--accent-yellow)"}}}function Zw(){const t=ra(),a=la(),r=t.cronTasks.find(H=>H.id===t.selectedCronTaskId),[s,o]=X.useState(null),[d,u]=X.useState(""),[p,h]=X.useState(!1),[m,g]=X.useState(!1),[b,E]=X.useState(!1),[v,k]=X.useState(!1),[A,O]=X.useState(!0),S=X.useRef(null);X.useEffect(()=>{o(null),g(!1)},[t.selectedCronTaskId]),X.useEffect(()=>{s&&S.current&&S.current.focus()},[s]);const j=X.useCallback(()=>{r&&(de.info("Cron",`Loading jobs for task: ${r.name} (${r.id})`),dd.listByTask(r.id).then(({jobs:H})=>{de.info("Cron",`Loaded ${H.length} jobs for task ${r.name}`);const J=I.current,z=new Map;for(const ae of J)ae.summary&&z.set(ae.id,ae.summary);const ie=H.map(ae=>{var w;const be=z.get(ae.id);return be&&be.length>(((w=ae.summary)==null?void 0:w.length)||0)?{...ae,summary:be}:ae});a({type:"SET_CRON_JOBS",cronJobs:ie}),H.length>0&&!t.selectedCronJobId&&a({type:"SELECT_CRON_JOB",jobId:H[0].id,sessionKey:H[0].sessionKey})}).catch(H=>{de.error("Cron",`Failed to load jobs: ${H}`)}))},[r==null?void 0:r.id]);X.useEffect(()=>{j()},[j]);const I=X.useRef(t.cronJobs);X.useEffect(()=>{I.current=t.cronJobs},[t.cronJobs]),X.useEffect(()=>{if(!t.cronJobs.some(ie=>ie.status==="running")||!r)return;const J=r.id,z=setInterval(()=>{de.info("Cron","Auto-refreshing jobs (running job detected)"),dd.listByTask(J).then(({jobs:ie})=>{const ae=I.current,be=new Map;for(const C of ae)C.summary&&be.set(C.id,C.summary);const w=ie.map(C=>{var N;const P=be.get(C.id);return P&&P.length>(((N=C.summary)==null?void 0:N.length)||0)?{...C,summary:P}:C});a({type:"SET_CRON_JOBS",cronJobs:w})}).catch(()=>{})},3e3);return()=>clearInterval(z)},[t.cronJobs,r==null?void 0:r.id]);const Y=X.useCallback(async()=>{if(!r)return;const H=!r.enabled;de.info("Cron",`Toggle task "${r.name}": ${r.enabled?"enabled → disabled":"disabled → enabled"}`),a({type:"UPDATE_CRON_TASK",taskId:r.id,updates:{enabled:H}});try{await Hn.update(r.channelId,r.id,{schedule:r.schedule??"",instructions:r.instructions??"",enabled:H,model:r.model??""})}catch(J){de.error("Cron",`Failed to toggle task: ${J}`),a({type:"UPDATE_CRON_TASK",taskId:r.id,updates:{enabled:r.enabled}})}},[r]),R=X.useCallback(H=>{const J=t.cronJobs.find(z=>z.id===H);J&&(de.info("Cron",`Selected job #${J.number||H} (status=${J.status})`),a({type:"SELECT_CRON_JOB",jobId:J.id,sessionKey:J.sessionKey||void 0}))},[t.cronJobs]),T=H=>{if(!r)return;const J=H==="name"?r.name:H==="schedule"?r.schedule??"":r.instructions??"";u(J),o(H)},$=X.useCallback(async H=>{if(!r)return;de.info("Cron",`Change model for "${r.name}": → ${H||"default"}`);const J=r.model;a({type:"UPDATE_CRON_TASK",taskId:r.id,updates:{model:H||null}});try{await Hn.update(r.channelId,r.id,{schedule:r.schedule??"",instructions:r.instructions??"",enabled:r.enabled,model:H})}catch(z){de.error("Cron",`Failed to update task model: ${z}`),a({type:"UPDATE_CRON_TASK",taskId:r.id,updates:{model:J}})}},[r]),le=X.useCallback(async()=>{if(!(!r||v)){de.info("Cron",`Triggering immediate run for "${r.name}"`),k(!0);try{await Hn.run(r.channelId,r.id),de.info("Cron",`Task "${r.name}" triggered successfully`),setTimeout(()=>{j()},1500)}catch(H){de.error("Cron",`Failed to trigger task: ${H}`)}finally{k(!1)}}},[r,v,j]),ce=()=>{o(null),u("")},U=async()=>{if(!(!r||!s)){de.info("Cron",`Save edit "${s}" for "${r.name}": ${d.length>80?d.slice(0,80)+"…":d}`),h(!0);try{if(s==="name")a({type:"UPDATE_CRON_TASK",taskId:r.id,updates:{name:d}}),await Hn.update(r.channelId,r.id,{name:d});else{const H={[s]:d};a({type:"UPDATE_CRON_TASK",taskId:r.id,updates:H}),await Hn.update(r.channelId,r.id,{schedule:s==="schedule"?d:r.schedule??"",instructions:s==="instructions"?d:r.instructions??"",enabled:r.enabled,model:r.model??""})}o(null)}catch(H){de.error("Cron",`Failed to update task field "${s}": ${H}`)}finally{h(!1)}}},W=async()=>{if(r){de.info("Cron",`Deleting task: "${r.name}" (${r.id})`),E(!0);try{await Hn.delete(r.channelId,r.id),de.info("Cron",`Task deleted: "${r.name}"`);const{tasks:H}=await Hn.listAll("background");a({type:"SET_CRON_TASKS",cronTasks:H}),a({type:"SELECT_CRON_TASK",taskId:H.length>0?H[0].id:null}),g(!1)}catch(H){de.error("Cron",`Failed to delete task: ${H}`)}finally{E(!1)}}},re=H=>{H.key==="Escape"&&ce(),H.key==="Enter"&&!H.shiftKey&&s!=="instructions"&&(H.preventDefault(),U())};if(!r)return y.jsx("div",{className:"flex-1 flex items-center justify-center",style:{background:"var(--bg-surface)"},children:y.jsxs("div",{className:"text-center",children:[y.jsx("svg",{className:"w-16 h-16 mx-auto mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,style:{color:"var(--text-muted)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),y.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-muted)"},children:"Select an automation"}),y.jsx("p",{className:"text-caption mt-1",style:{color:"var(--text-muted)"},children:"Choose a cron job from the sidebar to view details"})]})});const xe=t.channels.find(H=>H.id===r.channelId);return y.jsxs("div",{className:"flex-1 flex flex-col min-w-0",style:{background:"var(--bg-surface)"},children:[y.jsxs("div",{className:"flex items-center justify-between px-5 py-3",style:{borderBottom:"1px solid var(--border)"},children:[y.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[y.jsx("svg",{className:"w-5 h-5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,style:{color:"var(--text-secondary)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),s==="name"?y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("input",{ref:S,value:d,onChange:H=>u(H.target.value),onKeyDown:re,className:"text-h2 font-bold px-2 py-0.5 rounded-sm focus:outline-none",style:{background:"var(--bg-hover)",color:"var(--text-primary)",border:"1px solid var(--bg-active)",minWidth:200}}),y.jsx(Pg,{saving:p,onSave:U,onCancel:ce})]}):y.jsx("h2",{className:"text-h2 font-bold truncate cursor-pointer hover:underline",style:{color:"var(--text-primary)"},onClick:()=>T("name"),title:"Click to edit name",children:r.name}),!r.enabled&&y.jsx("span",{className:"text-tiny px-2 py-0.5 rounded-sm font-bold flex-shrink-0",style:{background:"rgba(232,162,48,0.15)",color:"var(--accent-yellow)"},children:"PAUSED"})]}),y.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[y.jsxs("button",{onClick:le,disabled:v,className:"flex items-center gap-1.5 px-3 py-1.5 text-caption rounded-sm transition-colors disabled:opacity-50",style:{background:"rgba(29,155,209,0.15)",color:"var(--text-link)"},title:"Run task now (one-time)",children:[y.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{d:"M8 5v14l11-7z"})}),v?"Running...":"Run Now"]}),y.jsx("button",{onClick:()=>g(!0),className:"p-1.5 rounded-sm transition-colors hover:bg-[--bg-hover]",style:{color:"var(--text-muted)"},title:"Delete task",children:y.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})})}),y.jsxs("button",{onClick:Y,className:"flex items-center gap-2 px-3 py-1.5 text-caption rounded-sm transition-colors",style:{background:r.enabled?"rgba(43,172,118,0.15)":"rgba(107,111,118,0.15)",color:r.enabled?"var(--accent-green)":"var(--text-muted)"},children:[y.jsx("div",{className:"w-7 h-4 rounded-full relative transition-colors",style:{background:r.enabled?"var(--accent-green)":"var(--text-muted)"},children:y.jsx("div",{className:"w-3 h-3 rounded-full bg-white absolute top-0.5 transition-all",style:{left:r.enabled?14:2}})}),r.enabled?"Enabled":"Disabled"]})]})]}),m&&y.jsxs("div",{className:"px-5 py-3 flex items-center justify-between",style:{background:"rgba(224,30,90,0.08)",borderBottom:"1px solid var(--border)"},children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,style:{color:"var(--accent-red)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),y.jsxs("span",{className:"text-caption",style:{color:"var(--accent-red)"},children:['Delete "',r.name,'"? This will remove the task, all execution history, and the OpenClaw cron job.']})]}),y.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[y.jsx("button",{onClick:W,disabled:b,className:"px-3 py-1.5 text-caption font-bold text-white rounded-sm disabled:opacity-50",style:{background:"var(--accent-red)"},children:b?"Deleting...":"Delete"}),y.jsx("button",{onClick:()=>g(!1),className:"px-3 py-1.5 text-caption rounded-sm",style:{color:"var(--text-muted)"},children:"Cancel"})]})]}),y.jsxs("div",{style:{borderBottom:"1px solid var(--border)"},children:[y.jsxs("button",{className:"w-full flex items-center gap-2 px-5 py-2 text-tiny uppercase tracking-wider hover:bg-[--bg-hover] transition-colors",style:{color:"var(--text-muted)"},onClick:()=>O(!A),children:[y.jsx("svg",{className:`w-3 h-3 transition-transform ${A?"rotate-0":"-rotate-90"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})}),"Task Details"]}),A&&y.jsxs("div",{className:"px-5 pb-4 space-y-4",children:[s==="schedule"?y.jsx("div",{children:y.jsx(ia,{label:"Schedule",children:y.jsx(Vw,{value:d,onChange:u,onSave:U,onCancel:ce,saving:p})})}):y.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[y.jsx(ia,{label:"Schedule",children:y.jsx(Xw,{schedule:r.schedule,onClick:()=>T("schedule")})}),y.jsx(ia,{label:"Model",children:y.jsx(Cd,{value:r.model??"",onChange:$,models:t.models,placeholder:"Default"})}),y.jsx(ia,{label:"Channel",children:y.jsx("span",{className:"text-body",style:{color:"var(--text-primary)"},children:(xe==null?void 0:xe.name)??"Default"})}),y.jsx(ia,{label:"Status",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:r.enabled?"var(--accent-green)":"var(--accent-yellow)"}}),y.jsx("span",{className:"text-body",style:{color:"var(--text-primary)"},children:r.enabled?"Active":"Paused"})]})})]}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsx(ia,{label:"Cron Job ID",children:y.jsx("span",{className:"text-caption font-mono",style:{color:"var(--text-secondary)"},children:r.openclawCronJobId??"N/A"})}),y.jsx(ia,{label:"Created",children:y.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:r.createdAt?Yg(r.createdAt):"N/A"})}),y.jsx(ia,{label:"Updated",children:y.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:r.updatedAt?Yg(r.updatedAt):"N/A"})})]}),y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsx("span",{className:"text-tiny uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"Prompt / Instructions"}),s!=="instructions"&&y.jsx("button",{onClick:()=>T("instructions"),className:"text-tiny px-2 py-0.5 rounded-sm transition-colors hover:bg-[--bg-hover]",style:{color:"var(--text-link)"},children:"Edit"})]}),s==="instructions"?y.jsxs("div",{children:[y.jsx("textarea",{ref:S,value:d,onChange:H=>u(H.target.value),onKeyDown:H=>{H.key==="Escape"&&ce(),H.key==="Enter"&&(H.metaKey||H.ctrlKey)&&(H.preventDefault(),U())},placeholder:"Enter the prompt or instructions for this cron task...",rows:6,className:"w-full text-caption p-3 rounded-md resize-y focus:outline-none",style:{background:"var(--bg-hover)",color:"var(--text-primary)",border:"1px solid var(--bg-active)",minHeight:80,maxHeight:300}}),y.jsxs("div",{className:"flex items-center justify-between mt-2",children:[y.jsx("span",{className:"text-tiny",style:{color:"var(--text-muted)"},children:"Cmd/Ctrl+Enter to save, Esc to cancel"}),y.jsx(Pg,{saving:p,onSave:U,onCancel:ce})]})]}):y.jsx("div",{className:"text-caption p-3 rounded-md whitespace-pre-wrap cursor-pointer hover:border-[--text-muted] transition-colors",style:{background:"var(--bg-hover)",color:r.instructions?"var(--text-primary)":"var(--text-muted)",border:"1px solid transparent",minHeight:48},onClick:()=>T("instructions"),title:"Click to edit",children:r.instructions||"No instructions set. Click to add a prompt for this cron task."})]})]})]}),y.jsxs("div",{className:"flex-1 flex min-h-0",children:[y.jsxs("div",{className:"overflow-y-auto flex-shrink-0",style:{width:220,borderRight:"1px solid var(--border)"},children:[y.jsxs("div",{className:"px-3 py-2",style:{borderBottom:"1px solid var(--border)"},children:[y.jsx("span",{className:"text-tiny uppercase tracking-wider font-bold",style:{color:"var(--text-muted)"},children:"Execution History"}),y.jsxs("span",{className:"text-tiny ml-1",style:{color:"var(--text-muted)"},children:["(",t.cronJobs.length,")"]})]}),t.cronJobs.length===0?y.jsxs("div",{className:"px-4 py-6 text-center",children:[y.jsx("p",{className:"text-tiny",style:{color:"var(--text-muted)"},children:"No runs yet."}),y.jsx("p",{className:"text-tiny mt-1",style:{color:"var(--text-muted)"},children:"Waiting for schedule..."})]}):t.cronJobs.map((H,J)=>{const z=My(H.status),ie=H.number||t.cronJobs.length-J,ae=t.selectedCronJobId===H.id;return y.jsxs("button",{onClick:()=>R(H.id),className:`w-full text-left px-3 py-2 hover:bg-[--bg-hover] transition-colors ${ae?"bg-[--bg-hover]":""}`,style:{borderBottom:"1px solid var(--border)",...ae?{borderLeft:"3px solid var(--bg-active)"}:{}},children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("span",{className:"text-tiny font-mono",style:{color:"var(--text-muted)"},children:["#",ie]}),y.jsxs("span",{className:"text-tiny px-1.5 py-0.5 rounded-sm font-bold flex items-center gap-1",style:{background:z.bg,color:z.fg},children:[H.status==="running"&&y.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),Oy(H.status)]})]}),y.jsxs("div",{className:"text-tiny mt-0.5",style:{color:"var(--text-muted)"},children:[H.time,H.durationMs!=null&&y.jsxs("span",{className:"ml-1",children:["(",(H.durationMs/1e3).toFixed(1),"s)"]})]}),H.summary&&y.jsx("div",{className:"text-caption mt-1 truncate",style:{color:"var(--text-secondary)"},children:H.summary})]},H.id)})]}),y.jsx(eA,{jobs:t.cronJobs,selectedJobId:t.selectedCronJobId})]})]})}const Qw=`prose prose-sm max-w-none
|
|
85
|
+
prose-p:my-1.5 prose-ul:my-1.5 prose-ol:my-1.5
|
|
86
|
+
prose-pre:my-2 prose-pre:rounded-md prose-pre:text-caption
|
|
87
|
+
prose-code:before:content-none prose-code:after:content-none
|
|
88
|
+
prose-code:px-1 prose-code:py-0.5 prose-code:rounded-sm prose-code:text-caption
|
|
89
|
+
prose-table:my-2 prose-th:px-3 prose-th:py-1.5 prose-td:px-3 prose-td:py-1.5
|
|
90
|
+
prose-h1:text-lg prose-h2:text-base prose-h3:text-sm
|
|
91
|
+
prose-li:my-0.5
|
|
92
|
+
prose-blockquote:border-l-2 prose-blockquote:pl-4 prose-blockquote:my-2
|
|
93
|
+
prose-hr:my-4`,Jw={color:"var(--text-primary)","--tw-prose-headings":"var(--text-primary)","--tw-prose-bold":"var(--text-primary)","--tw-prose-links":"var(--text-link)","--tw-prose-code":"var(--text-primary)","--tw-prose-pre-code":"var(--text-primary)","--tw-prose-pre-bg":"var(--code-bg)","--tw-prose-th-borders":"var(--border)","--tw-prose-td-borders":"var(--border)","--tw-prose-quotes":"var(--text-secondary)","--tw-prose-quote-borders":"var(--border)","--tw-prose-bullets":"var(--text-muted)","--tw-prose-counters":"var(--text-muted)","--tw-prose-hr":"var(--border)"};function Ww(t){return t.split(/\n\n---\n\n/).filter(a=>a.trim())}function eA({jobs:t,selectedJobId:a}){const r=a?t.find(p=>p.id===a):null,s=X.useRef(null);if(X.useEffect(()=>{s.current&&(r==null?void 0:r.status)==="running"&&(s.current.scrollTop=s.current.scrollHeight)},[r==null?void 0:r.summary,r==null?void 0:r.status]),!r)return y.jsx("div",{className:"flex-1 flex items-center justify-center",style:{background:"var(--bg-surface)"},children:y.jsx("p",{className:"text-caption",style:{color:"var(--text-muted)"},children:t.length>0?"Select a run to view output":"No execution history yet"})});const o=My(r.status),d=r.status==="running",u=r.summary?Ww(r.summary):[];return y.jsxs("div",{className:"flex-1 flex flex-col min-w-0",style:{background:"var(--bg-surface)"},children:[y.jsxs("div",{className:"flex items-center gap-3 px-5 py-2.5 flex-shrink-0",style:{borderBottom:"1px solid var(--border)"},children:[y.jsx("span",{className:"text-tiny px-2 py-0.5 rounded-sm font-bold",style:{background:o.bg,color:o.fg},children:Oy(r.status)}),d&&y.jsx("span",{className:"inline-block w-2 h-2 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),y.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:r.time}),r.durationMs!=null&&y.jsx("span",{className:"text-caption",style:{color:"var(--text-muted)"},children:r.durationMs>=6e4?`${(r.durationMs/6e4).toFixed(1)}m`:`${(r.durationMs/1e3).toFixed(1)}s`})]}),y.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",ref:s,children:u.length>0?y.jsxs("div",{className:"flex flex-col gap-3",children:[u.map((p,h)=>{const m=h===u.length-1,g=d&&m;return y.jsxs("div",{className:"rounded-md px-4 py-3",style:{background:"var(--bg-primary)",border:g?"1px solid var(--text-link)":"1px solid var(--border)"},children:[y.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[y.jsx("span",{className:"text-tiny font-bold px-1.5 py-0.5 rounded-sm",style:{background:g?"var(--text-link)":"var(--bg-surface)",color:g?"#fff":"var(--text-muted)"},children:u.length>1?`#${h+1}`:"Output"}),g&&y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),y.jsx("span",{className:"text-tiny",style:{color:"var(--text-link)"},children:"streaming..."})]}),!g&&!d&&u.length>1&&y.jsx("span",{className:"text-tiny",style:{color:"var(--text-muted)"},children:"completed"})]}),y.jsx("div",{className:Qw,style:Jw,children:y.jsx(Ob,{remarkPlugins:[ey],children:p})})]},h)}),d&&y.jsxs("div",{className:"flex items-center gap-1.5 pl-2",children:[y.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),y.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)",animationDelay:"0.2s"}}),y.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)",animationDelay:"0.4s"}})]})]}):d?y.jsxs("div",{className:"flex items-center gap-1.5 py-2 pl-1",children:[y.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),y.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)",animationDelay:"0.2s"}}),y.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)",animationDelay:"0.4s"}})]}):y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("p",{className:"text-caption",style:{color:"var(--text-muted)"},children:"No output recorded for this run."})})})]})}function ia({label:t,children:a}){return y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"text-tiny uppercase tracking-wider mb-1",style:{color:"var(--text-muted)"},children:t}),a]})}function Pg({saving:t,onSave:a,onCancel:r}){return y.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[y.jsx("button",{onClick:a,disabled:t,className:"px-2 py-1 text-tiny font-bold text-white rounded-sm disabled:opacity-50",style:{background:"var(--bg-active)"},children:t?"...":"Save"}),y.jsx("button",{onClick:r,className:"px-2 py-1 text-tiny rounded-sm",style:{color:"var(--text-muted)"},children:"Cancel"})]})}function tA(){var Y;const[t,a]=X.useReducer(Vv,wd,R=>{try{const T=localStorage.getItem("botschat_active_view");if(T==="messages"||T==="automations")return{...R,activeView:T}}catch{}return R}),r=X.useRef(null),s=X.useRef(()=>{}),[o,d]=X.useState(!1),[u,p]=X.useState(()=>{var T;const R=localStorage.getItem("botschat_theme");return R==="light"||R==="dark"?R:(T=window.matchMedia)!=null&&T.call(window,"(prefers-color-scheme: light)").matches?"light":"dark"});X.useEffect(()=>{document.documentElement.setAttribute("data-theme",u),localStorage.setItem("botschat_theme",u)},[u]),X.useEffect(()=>{localStorage.setItem("botschat_active_view",t.activeView)},[t.activeView]),X.useEffect(()=>{t.selectedCronTaskId&&localStorage.setItem("botschat_last_cron_task",t.selectedCronTaskId)},[t.selectedCronTaskId]),X.useEffect(()=>{if(t.selectedSessionId){const R=t.agents.find(T=>T.id===t.selectedAgentId);R!=null&&R.channelId&&localStorage.setItem(`botschat_last_session_${R.channelId}`,t.selectedSessionId)}},[t.selectedSessionId,t.selectedAgentId,t.agents]);const h=X.useCallback(()=>{p(R=>R==="dark"?"light":"dark")},[]);X.useEffect(()=>{Bh()&&(de.api("Auth","Auto-login with stored token"),ud.me().then(T=>{var $;de.info("Auth",`Logged in as ${T.email} (${T.id})`),a({type:"SET_USER",user:T}),($=T.settings)!=null&&$.defaultModel&&a({type:"SET_DEFAULT_MODEL",model:T.settings.defaultModel})}).catch(T=>{de.warn("Auth",`Auto-login failed: ${T}`),Ad(null)}))},[]),X.useEffect(()=>{if(!t.user)return;const R=setTimeout(()=>{t.models.length===0&&t0.list().then(({models:T})=>{T.length>0&&a({type:"SET_MODELS",models:T})}).catch(()=>{})},2e3);return()=>clearTimeout(R)},[t.user,t.models.length]),X.useEffect(()=>{t.user&&(de.api("Agents","Loading agents list"),jl.list().then(({agents:R})=>{if(de.info("Agents",`Loaded ${R.length} agents`,R.map(T=>({id:T.id,name:T.name,channelId:T.channelId}))),a({type:"SET_AGENTS",agents:R}),R.length>0&&!t.selectedAgentId){let T=R[0];try{const $=localStorage.getItem("botschat_last_agent");if($){const le=R.find(ce=>ce.id===$);le&&(de.info("Agents",`Restoring last channel: ${le.name} (${le.id})`),T=le)}}catch{}a({type:"SELECT_AGENT",agentId:T.id,sessionKey:T.sessionKey})}}),de.api("Channels","Loading channels list"),aa.list().then(({channels:R})=>{de.info("Channels",`Loaded ${R.length} channels`,R.map(T=>({id:T.id,name:T.name}))),a({type:"SET_CHANNELS",channels:R})}))},[t.user]),X.useEffect(()=>{t.user&&t.activeView==="automations"&&(de.api("Cron","Loading all background tasks + scan data"),Promise.all([Hn.listAll("background"),Hn.scanData()]).then(([{tasks:R},{tasks:T}])=>{if(de.info("Cron",`Loaded ${R.length} cron tasks + ${T.length} scan entries`),a({type:"SET_CRON_TASKS",cronTasks:R}),a({type:"MERGE_SCAN_DATA",scanTasks:T.map($=>({cronJobId:$.cronJobId,schedule:$.schedule,instructions:$.instructions,model:$.model||void 0,enabled:$.enabled}))}),R.length>0&&!t.selectedCronTaskId){let $=R[0].id;try{const le=localStorage.getItem("botschat_last_cron_task");if(le){const ce=R.find(U=>U.id===le);ce&&(de.info("Cron",`Restoring last cron task: ${ce.name} (${ce.id})`),$=ce.id)}}catch{}a({type:"SELECT_CRON_TASK",taskId:$})}}))},[t.user,t.activeView]);const m=(Y=t.agents.find(R=>R.id===t.selectedAgentId))==null?void 0:Y.channelId,g=t.activeView==="messages";X.useEffect(()=>{if(!g)return;if(!t.selectedAgentId){a({type:"SET_TASKS",tasks:[]}),a({type:"SELECT_TASK",taskId:null}),a({type:"SET_SESSIONS",sessions:[]});return}const R=t.agents.find(T=>T.id===t.selectedAgentId);R!=null&&R.channelId?(R.isDefault?(a({type:"SET_TASKS",tasks:[]}),a({type:"SELECT_TASK",taskId:null})):Hn.list(R.channelId).then(({tasks:T})=>{if(a({type:"SET_TASKS",tasks:T}),T.length>0){const $=T[0];a({type:"SELECT_TASK",taskId:$.id})}}),Ll.list(R.channelId).then(({sessions:T})=>{if(de.info("Sessions",`Loaded ${T.length} sessions for channel ${R.channelId}`),a({type:"SET_SESSIONS",sessions:T}),T.length>0){let $=T[0];try{const le=localStorage.getItem(`botschat_last_session_${R.channelId}`);if(le){const ce=T.find(U=>U.id===le);ce&&(de.info("Sessions",`Restoring last session: ${ce.name} (${ce.id})`),$=ce)}}catch{}a({type:"SELECT_SESSION",sessionId:$.id,sessionKey:$.sessionKey})}}).catch(T=>{de.error("Sessions",`Failed to load sessions: ${T}`)})):(a({type:"SET_TASKS",tasks:[]}),a({type:"SELECT_TASK",taskId:null}),a({type:"SET_SESSIONS",sessions:[]}))},[t.selectedAgentId,m,g]),X.useEffect(()=>{if(!t.selectedTaskId)return;const R=t.tasks.find($=>$.id===t.selectedTaskId);if(!R||R.kind!=="background"){a({type:"SET_JOBS",jobs:[]});return}const T=t.agents.find($=>$.id===t.selectedAgentId);T!=null&&T.channelId&&dd.list(T.channelId,R.id).then(({jobs:$})=>{a({type:"SET_JOBS",jobs:$}),$.length>0&&!t.selectedJobId&&a({type:"SELECT_JOB",jobId:$[0].id,sessionKey:$[0].sessionKey})}).catch($=>{console.error("Failed to load jobs:",$)})},[t.selectedTaskId,t.tasks]),X.useEffect(()=>{if(!t.user||!t.selectedSessionKey)return;let R=!1;return Vg.list(t.user.id,t.selectedSessionKey).then(({messages:T,replyCounts:$})=>{R||a({type:"SET_MESSAGES",messages:T,replyCounts:$})}).catch(T=>{console.error("Failed to load message history:",T)}),()=>{R=!0}},[t.user,t.selectedSessionKey]);const b=X.useRef(t);X.useEffect(()=>{b.current=t},[t]);const E=X.useCallback(R=>{var U;const T=R.sessionKey,$=R.threadId??R.replyToId;de.wsIn("WS",`${R.type}`,R);const le=W=>{if(W)return W.replace(/:thread:.+$/,"")},ce=W=>W?le(W)===b.current.selectedSessionKey:!0;switch(R.type){case"connection.status":de.info("Connection",`OpenClaw ${R.openclawConnected?"connected":"disconnected"}${R.defaultModel?` (default: ${R.defaultModel})`:""}`),a({type:"SET_OPENCLAW_CONNECTED",connected:R.openclawConnected,defaultModel:R.defaultModel||void 0}),Array.isArray(R.models)&&R.models.length>0&&a({type:"SET_MODELS",models:R.models});break;case"openclaw.disconnected":de.warn("Connection","OpenClaw disconnected"),a({type:"SET_OPENCLAW_CONNECTED",connected:!1});break;case"model.changed":if(R.model&&R.sessionKey){de.info("Model",`Session model changed to: ${R.model} (session: ${R.sessionKey})`),a({type:"SET_SESSION_MODEL",model:R.model});try{const W=JSON.parse(localStorage.getItem("botschat:sessionModels")||"{}");W[R.sessionKey]=R.model,localStorage.setItem("botschat:sessionModels",JSON.stringify(W))}catch{}}break;case"agent.stream.start":if(T&&ce(T)){const W=$??((U=T.match(/:thread:(.+)$/))==null?void 0:U[1]);a({type:"STREAM_START",runId:R.runId,sessionKey:T,threadId:W})}break;case"agent.stream.chunk":a({type:"STREAM_CHUNK",runId:R.runId,sessionKey:T??"",text:R.text});break;case"agent.stream.end":a({type:"STREAM_END",runId:R.runId});break;case"agent.text":{if(!ce(T))break;const W={id:crypto.randomUUID(),sender:"agent",text:R.text,timestamp:Date.now(),threadId:$};a($&&T?{type:"ADD_THREAD_MESSAGE",message:W}:{type:"ADD_MESSAGE",message:W});break}case"agent.media":{if(!ce(T))break;const W={id:crypto.randomUUID(),sender:"agent",text:R.caption??"",mediaUrl:R.mediaUrl,timestamp:Date.now(),threadId:$};a($&&T?{type:"ADD_THREAD_MESSAGE",message:W}:{type:"ADD_MESSAGE",message:W});break}case"agent.a2ui":{if(!ce(T))break;const W={id:crypto.randomUUID(),sender:"agent",text:"",a2ui:R.jsonl,timestamp:Date.now(),threadId:$};a($&&T?{type:"ADD_THREAD_MESSAGE",message:W}:{type:"ADD_MESSAGE",message:W});break}case"job.update":{const W={id:R.jobId,number:0,sessionKey:R.sessionKey,status:R.status,startedAt:R.startedAt,finishedAt:R.finishedAt??null,durationMs:R.durationMs??null,summary:R.summary??"",time:new Date((R.startedAt??0)*1e3).toLocaleString()};if(W.status==="running")a({type:"ADD_JOB",job:W});else{const re=b.current,xe=re.jobs.some(H=>H.id===W.id);a(xe?{type:"SET_JOBS",jobs:re.jobs.map(H=>H.id===W.id?{...H,...W}:H)}:{type:"ADD_JOB",job:W})}W.status==="running"?a({type:"ADD_CRON_JOB",job:W}):a({type:"UPDATE_CRON_JOB",job:W});break}case"job.output":{const W=R.jobId,re=R.text;W&&re&&a({type:"APPEND_JOB_OUTPUT",jobId:W,text:re});break}case"task.scan.result":{const W=R.tasks??[];de.info("TaskScan",`Scan result: ${W.length} tasks reported`,W),jl.list().then(({agents:xe})=>{de.info("TaskScan",`Reloaded ${xe.length} agents`),a({type:"SET_AGENTS",agents:xe})}),aa.list().then(({channels:xe})=>{de.info("TaskScan",`Reloaded ${xe.length} channels`),a({type:"SET_CHANNELS",channels:xe})}),Hn.listAll("background").then(({tasks:xe})=>{de.info("TaskScan",`Reloaded ${xe.length} cron tasks, merging scan data`),a({type:"SET_CRON_TASKS",cronTasks:xe}),a({type:"MERGE_SCAN_DATA",scanTasks:W.map(H=>({cronJobId:H.cronJobId,schedule:H.schedule,instructions:H.instructions??"",model:H.model,enabled:H.enabled}))})});const re=b.current;if(re.selectedAgentId){const xe=re.agents.find(H=>H.id===re.selectedAgentId);xe!=null&&xe.channelId&&Hn.list(xe.channelId).then(({tasks:H})=>{a({type:"SET_TASKS",tasks:H})})}break}case"status":break;case"models.list":Array.isArray(R.models)&&a({type:"SET_MODELS",models:R.models});break;case"task.schedule.ack":R.ok?de.info("Task",`Schedule applied to OpenClaw: ${R.cronJobId}`):de.error("Task",`Schedule push to OpenClaw failed: ${R.error}`,R);break;case"error":de.error("Server",R.message,R);break}},[]);X.useEffect(()=>{s.current=E},[E]),X.useEffect(()=>{if(!t.user)return;const R=Bh();if(!R)return;const T=crypto.randomUUID();de.info("WS",`Connecting WebSocket (session=${T.slice(0,8)}...)`);const $=new n0({userId:t.user.id,sessionId:T,token:R,onMessage:le=>{s.current(le)},onStatusChange:le=>{de.info("WS",le?"WebSocket connected":"WebSocket disconnected"),a({type:"SET_WS_CONNECTED",connected:le})}});return $.connect(),r.current=$,()=>{$.disconnect(),r.current=null}},[t.user]);const v=X.useCallback(R=>{var T;de.wsOut("WS",`${R.type}`,R),(T=r.current)==null||T.send(R)},[]),k=X.useCallback(async R=>{a({type:"SET_DEFAULT_MODEL",model:R||null});try{await e0.updateSettings({defaultModel:R||void 0})}catch(T){console.error("Failed to update default model:",T)}},[]),A=X.useCallback(R=>{const T=t.jobs.find($=>$.id===R);T&&a({type:"SELECT_JOB",jobId:T.id,sessionKey:T.sessionKey||void 0})},[t.jobs]);if(!t.user)return y.jsx(od.Provider,{value:t,children:y.jsx(cd.Provider,{value:a,children:y.jsx(Gw,{})})});t.agents.find(R=>R.id===t.selectedAgentId);const O=t.tasks.find(R=>R.id===t.selectedTaskId),S=(O==null?void 0:O.kind)==="background",j=!!t.selectedSessionKey,I=t.activeView==="automations";return y.jsx(od.Provider,{value:t,children:y.jsxs(cd.Provider,{value:a,children:[y.jsxs("div",{className:"flex flex-col h-screen",children:[y.jsxs("div",{className:"flex flex-1 min-h-0",children:[y.jsx(i0,{onToggleTheme:h,onOpenSettings:()=>d(!0),theme:u}),I?y.jsx(Yw,{}):y.jsx(a0,{}),I?y.jsx(Zw,{}):y.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:j?y.jsx(y.Fragment,{children:y.jsxs("div",{className:"flex-1 flex min-h-0",children:[S&&y.jsx(Fw,{jobs:t.jobs,selectedJobId:t.selectedJobId,onSelectJob:A}),y.jsx(Iw,{sendMessage:v}),y.jsx(Uw,{sendMessage:v})]})}):y.jsx("div",{className:"flex-1 flex items-center justify-center",style:{background:"var(--bg-surface)"},children:y.jsxs("div",{className:"text-center",children:[y.jsx("svg",{className:"w-20 h-20 mx-auto mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,style:{color:"var(--text-muted)"},children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),y.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-muted)"},children:"Select a channel to get started"}),y.jsx("p",{className:"text-caption mt-1",style:{color:"var(--text-muted)"},children:"Choose a channel from the sidebar"})]})})})]}),y.jsx(Kw,{})]}),o&&y.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50",style:{background:"rgba(0,0,0,0.5)"},onClick:()=>d(!1),children:y.jsxs("div",{className:"rounded-lg p-6 w-[420px] max-w-[90vw]",style:{background:"var(--bg-surface)",boxShadow:"var(--shadow-lg)"},onClick:R=>R.stopPropagation(),children:[y.jsxs("div",{className:"flex items-center justify-between mb-5",children:[y.jsx("h2",{className:"text-h1 font-bold",style:{color:"var(--text-primary)"},children:"Settings"}),y.jsx("button",{onClick:()=>d(!1),className:"p-1 hover:bg-[--bg-hover] rounded",style:{color:"var(--text-muted)"},children:y.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),y.jsxs("div",{className:"space-y-5",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-caption font-bold mb-1.5",style:{color:"var(--text-secondary)"},children:"Default Model"}),y.jsx(Cd,{value:t.defaultModel??"",onChange:k,models:t.models,placeholder:"Not set (use agent default)"}),y.jsxs("p",{className:"text-tiny mt-1.5",style:{color:"var(--text-muted)"},children:["Default model for new conversations. You can override per session using"," ",y.jsx("code",{children:"/model"})," or per automation in its settings."]})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-caption font-bold mb-1.5",style:{color:"var(--text-secondary)"},children:"Current Session Model"}),y.jsx("span",{className:"text-body font-mono",style:{color:t.sessionModel||t.defaultModel?"var(--text-primary)":"var(--text-muted)"},children:t.sessionModel??t.defaultModel??"Not connected"})]})]}),y.jsx("div",{className:"mt-6 pt-4 flex justify-end",style:{borderTop:"1px solid var(--border)"},children:y.jsx("button",{onClick:()=>d(!1),className:"px-4 py-1.5 text-caption font-bold text-white rounded-sm",style:{background:"var(--bg-active)"},children:"Done"})})]})})]})})}Pv.createRoot(document.getElementById("root")).render(y.jsx(jv.StrictMode,{children:y.jsx(tA,{})}));
|