botschat 0.1.4 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +64 -24
  2. package/migrations/0011_e2e_encryption.sql +35 -0
  3. package/package.json +7 -2
  4. package/packages/api/package.json +2 -1
  5. package/packages/api/src/do/connection-do.ts +162 -42
  6. package/packages/api/src/index.ts +132 -13
  7. package/packages/api/src/routes/auth.ts +127 -30
  8. package/packages/api/src/routes/pairing.ts +14 -1
  9. package/packages/api/src/routes/setup.ts +72 -24
  10. package/packages/api/src/routes/upload.ts +12 -8
  11. package/packages/api/src/utils/auth.ts +212 -43
  12. package/packages/api/src/utils/id.ts +30 -14
  13. package/packages/api/src/utils/rate-limit.ts +73 -0
  14. package/packages/plugin/dist/src/accounts.d.ts.map +1 -1
  15. package/packages/plugin/dist/src/accounts.js +1 -0
  16. package/packages/plugin/dist/src/accounts.js.map +1 -1
  17. package/packages/plugin/dist/src/channel.d.ts +1 -0
  18. package/packages/plugin/dist/src/channel.d.ts.map +1 -1
  19. package/packages/plugin/dist/src/channel.js +151 -9
  20. package/packages/plugin/dist/src/channel.js.map +1 -1
  21. package/packages/plugin/dist/src/types.d.ts +16 -0
  22. package/packages/plugin/dist/src/types.d.ts.map +1 -1
  23. package/packages/plugin/dist/src/ws-client.d.ts +2 -0
  24. package/packages/plugin/dist/src/ws-client.d.ts.map +1 -1
  25. package/packages/plugin/dist/src/ws-client.js +14 -3
  26. package/packages/plugin/dist/src/ws-client.js.map +1 -1
  27. package/packages/plugin/package.json +4 -3
  28. package/packages/web/dist/architecture.png +0 -0
  29. package/packages/web/dist/assets/index-BoNQoJjQ.js +1497 -0
  30. package/packages/web/dist/assets/{index-DuGeoFJT.css → index-ewBIratI.css} +1 -1
  31. package/packages/web/dist/botschat-icon.svg +4 -0
  32. package/packages/web/dist/index.html +23 -3
  33. package/packages/web/dist/manifest.json +24 -0
  34. package/packages/web/dist/sw.js +40 -0
  35. package/packages/web/index.html +21 -1
  36. package/packages/web/package.json +1 -0
  37. package/packages/web/src/App.tsx +286 -103
  38. package/packages/web/src/analytics.ts +57 -0
  39. package/packages/web/src/api.ts +67 -3
  40. package/packages/web/src/components/ChatWindow.tsx +11 -11
  41. package/packages/web/src/components/ConnectionSettings.tsx +477 -0
  42. package/packages/web/src/components/CronDetail.tsx +475 -235
  43. package/packages/web/src/components/CronSidebar.tsx +1 -1
  44. package/packages/web/src/components/DebugLogPanel.tsx +116 -3
  45. package/packages/web/src/components/E2ESettings.tsx +122 -0
  46. package/packages/web/src/components/IconRail.tsx +56 -27
  47. package/packages/web/src/components/JobList.tsx +2 -6
  48. package/packages/web/src/components/LoginPage.tsx +143 -104
  49. package/packages/web/src/components/MobileLayout.tsx +480 -0
  50. package/packages/web/src/components/OnboardingPage.tsx +159 -21
  51. package/packages/web/src/components/ResizeHandle.tsx +34 -0
  52. package/packages/web/src/components/Sidebar.tsx +1 -1
  53. package/packages/web/src/components/TaskBar.tsx +2 -2
  54. package/packages/web/src/components/ThreadPanel.tsx +2 -5
  55. package/packages/web/src/e2e.ts +133 -0
  56. package/packages/web/src/hooks/useIsMobile.ts +27 -0
  57. package/packages/web/src/index.css +59 -0
  58. package/packages/web/src/main.tsx +12 -0
  59. package/packages/web/src/store.ts +16 -8
  60. package/packages/web/src/ws.ts +78 -4
  61. package/scripts/dev.sh +16 -16
  62. package/scripts/test-e2e-live.ts +194 -0
  63. package/scripts/verify-e2e-db.ts +48 -0
  64. package/scripts/verify-e2e.ts +56 -0
  65. package/wrangler.toml +3 -1
  66. package/packages/web/dist/assets/index-DyzTR_Y4.js +0 -847
@@ -1,847 +0,0 @@
1
- var m0=Object.defineProperty;var g0=(t,i,r)=>i in t?m0(t,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[i]=r;var Aa=(t,i,r)=>g0(t,typeof i!="symbol"?i+"":i,r);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&l(u)}).observe(document,{childList:!0,subtree:!0});function r(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function l(o){if(o.ep)return;o.ep=!0;const c=r(o);fetch(o.href,c)}})();function ls(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hd={exports:{}},jl={};/**
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 vg;function b0(){if(vg)return jl;vg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(l,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var h in o)h!=="key"&&(c[h]=o[h])}else c=o;return o=c.ref,{$$typeof:t,type:l,key:u,ref:o!==void 0?o:null,props:c}}return jl.Fragment=i,jl.jsx=r,jl.jsxs=r,jl}var xg;function y0(){return xg||(xg=1,hd.exports=b0()),hd.exports}var g=y0(),pd={exports:{}},Le={};/**
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 Eg;function v0(){if(Eg)return Le;Eg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),E=Symbol.iterator;function x(O){return O===null||typeof O!="object"?null:(O=E&&O[E]||O["@@iterator"],typeof O=="function"?O:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,C={};function S(O,q,N){this.props=O,this.context=q,this.refs=C,this.updater=N||k}S.prototype.isReactComponent={},S.prototype.setState=function(O,q){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,q,"setState")},S.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function U(){}U.prototype=S.prototype;function I(O,q,N){this.props=O,this.context=q,this.refs=C,this.updater=N||k}var G=I.prototype=new U;G.constructor=I,A(G,S.prototype),G.isPureReactComponent=!0;var re=Array.isArray;function B(){}var ae={H:null,A:null,T:null,S:null},fe=Object.prototype.hasOwnProperty;function me(O,q,N){var pe=N.ref;return{$$typeof:t,type:O,key:q,ref:pe!==void 0?pe:null,props:N}}function w(O,q){return me(O.type,q,O.props)}function H(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function X(O){var q={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(N){return q[N]})}var ye=/\/+/g;function j(O,q){return typeof O=="object"&&O!==null&&O.key!=null?X(""+O.key):q.toString(36)}function Z(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(B,B):(O.status="pending",O.then(function(q){O.status==="pending"&&(O.status="fulfilled",O.value=q)},function(q){O.status==="pending"&&(O.status="rejected",O.reason=q)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function D(O,q,N,pe,Ne){var K=typeof O;(K==="undefined"||K==="boolean")&&(O=null);var le=!1;if(O===null)le=!0;else switch(K){case"bigint":case"string":case"number":le=!0;break;case"object":switch(O.$$typeof){case t:case i:le=!0;break;case b:return le=O._init,D(le(O._payload),q,N,pe,Ne)}}if(le)return Ne=Ne(O),le=pe===""?"."+j(O,0):pe,re(Ne)?(N="",le!=null&&(N=le.replace(ye,"$&/")+"/"),D(Ne,q,N,"",function(De){return De})):Ne!=null&&(H(Ne)&&(Ne=w(Ne,N+(Ne.key==null||O&&O.key===Ne.key?"":(""+Ne.key).replace(ye,"$&/")+"/")+le)),q.push(Ne)),1;le=0;var ve=pe===""?".":pe+":";if(re(O))for(var be=0;be<O.length;be++)pe=O[be],K=ve+j(pe,be),le+=D(pe,q,N,K,Ne);else if(be=x(O),typeof be=="function")for(O=be.call(O),be=0;!(pe=O.next()).done;)pe=pe.value,K=ve+j(pe,be++),le+=D(pe,q,N,K,Ne);else if(K==="object"){if(typeof O.then=="function")return D(Z(O),q,N,pe,Ne);throw q=String(O),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return le}function W(O,q,N){if(O==null)return O;var pe=[],Ne=0;return D(O,pe,"","",function(K){return q.call(N,K,Ne++)}),pe}function ee(O){if(O._status===-1){var q=O._result;q=q(),q.then(function(N){(O._status===0||O._status===-1)&&(O._status=1,O._result=N)},function(N){(O._status===0||O._status===-1)&&(O._status=2,O._result=N)}),O._status===-1&&(O._status=0,O._result=q)}if(O._status===1)return O._result.default;throw O._result}var ue=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},T={map:W,forEach:function(O,q,N){W(O,function(){q.apply(this,arguments)},N)},count:function(O){var q=0;return W(O,function(){q++}),q},toArray:function(O){return W(O,function(q){return q})||[]},only:function(O){if(!H(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Le.Activity=y,Le.Children=T,Le.Component=S,Le.Fragment=r,Le.Profiler=o,Le.PureComponent=I,Le.StrictMode=l,Le.Suspense=m,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ae,Le.__COMPILER_RUNTIME={__proto__:null,c:function(O){return ae.H.useMemoCache(O)}},Le.cache=function(O){return function(){return O.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(O,q,N){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var pe=A({},O.props),Ne=O.key;if(q!=null)for(K in q.key!==void 0&&(Ne=""+q.key),q)!fe.call(q,K)||K==="key"||K==="__self"||K==="__source"||K==="ref"&&q.ref===void 0||(pe[K]=q[K]);var K=arguments.length-2;if(K===1)pe.children=N;else if(1<K){for(var le=Array(K),ve=0;ve<K;ve++)le[ve]=arguments[ve+2];pe.children=le}return me(O.type,Ne,pe)},Le.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},Le.createElement=function(O,q,N){var pe,Ne={},K=null;if(q!=null)for(pe in q.key!==void 0&&(K=""+q.key),q)fe.call(q,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(Ne[pe]=q[pe]);var le=arguments.length-2;if(le===1)Ne.children=N;else if(1<le){for(var ve=Array(le),be=0;be<le;be++)ve[be]=arguments[be+2];Ne.children=ve}if(O&&O.defaultProps)for(pe in le=O.defaultProps,le)Ne[pe]===void 0&&(Ne[pe]=le[pe]);return me(O,K,Ne)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(O){return{$$typeof:h,render:O}},Le.isValidElement=H,Le.lazy=function(O){return{$$typeof:b,_payload:{_status:-1,_result:O},_init:ee}},Le.memo=function(O,q){return{$$typeof:p,type:O,compare:q===void 0?null:q}},Le.startTransition=function(O){var q=ae.T,N={};ae.T=N;try{var pe=O(),Ne=ae.S;Ne!==null&&Ne(N,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(B,ue)}catch(K){ue(K)}finally{q!==null&&N.types!==null&&(q.types=N.types),ae.T=q}},Le.unstable_useCacheRefresh=function(){return ae.H.useCacheRefresh()},Le.use=function(O){return ae.H.use(O)},Le.useActionState=function(O,q,N){return ae.H.useActionState(O,q,N)},Le.useCallback=function(O,q){return ae.H.useCallback(O,q)},Le.useContext=function(O){return ae.H.useContext(O)},Le.useDebugValue=function(){},Le.useDeferredValue=function(O,q){return ae.H.useDeferredValue(O,q)},Le.useEffect=function(O,q){return ae.H.useEffect(O,q)},Le.useEffectEvent=function(O){return ae.H.useEffectEvent(O)},Le.useId=function(){return ae.H.useId()},Le.useImperativeHandle=function(O,q,N){return ae.H.useImperativeHandle(O,q,N)},Le.useInsertionEffect=function(O,q){return ae.H.useInsertionEffect(O,q)},Le.useLayoutEffect=function(O,q){return ae.H.useLayoutEffect(O,q)},Le.useMemo=function(O,q){return ae.H.useMemo(O,q)},Le.useOptimistic=function(O,q){return ae.H.useOptimistic(O,q)},Le.useReducer=function(O,q,N){return ae.H.useReducer(O,q,N)},Le.useRef=function(O){return ae.H.useRef(O)},Le.useState=function(O){return ae.H.useState(O)},Le.useSyncExternalStore=function(O,q,N){return ae.H.useSyncExternalStore(O,q,N)},Le.useTransition=function(){return ae.H.useTransition()},Le.version="19.2.4",Le}var _g;function gf(){return _g||(_g=1,pd.exports=v0()),pd.exports}var V=gf();const x0=ls(V);var md={exports:{}},Hl={},gd={exports:{}},bd={};/**
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 Sg;function E0(){return Sg||(Sg=1,(function(t){function i(D,W){var ee=D.length;D.push(W);e:for(;0<ee;){var ue=ee-1>>>1,T=D[ue];if(0<o(T,W))D[ue]=W,D[ee]=T,ee=ue;else break e}}function r(D){return D.length===0?null:D[0]}function l(D){if(D.length===0)return null;var W=D[0],ee=D.pop();if(ee!==W){D[0]=ee;e:for(var ue=0,T=D.length,O=T>>>1;ue<O;){var q=2*(ue+1)-1,N=D[q],pe=q+1,Ne=D[pe];if(0>o(N,ee))pe<T&&0>o(Ne,N)?(D[ue]=Ne,D[pe]=ee,ue=pe):(D[ue]=N,D[q]=ee,ue=q);else if(pe<T&&0>o(Ne,ee))D[ue]=Ne,D[pe]=ee,ue=pe;else break e}}return W}function o(D,W){var ee=D.sortIndex-W.sortIndex;return ee!==0?ee:D.id-W.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();t.unstable_now=function(){return u.now()-h}}var m=[],p=[],b=1,y=null,E=3,x=!1,k=!1,A=!1,C=!1,S=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function G(D){for(var W=r(p);W!==null;){if(W.callback===null)l(p);else if(W.startTime<=D)l(p),W.sortIndex=W.expirationTime,i(m,W);else break;W=r(p)}}function re(D){if(A=!1,G(D),!k)if(r(m)!==null)k=!0,B||(B=!0,X());else{var W=r(p);W!==null&&Z(re,W.startTime-D)}}var B=!1,ae=-1,fe=5,me=-1;function w(){return C?!0:!(t.unstable_now()-me<fe)}function H(){if(C=!1,B){var D=t.unstable_now();me=D;var W=!0;try{e:{k=!1,A&&(A=!1,U(ae),ae=-1),x=!0;var ee=E;try{t:{for(G(D),y=r(m);y!==null&&!(y.expirationTime>D&&w());){var ue=y.callback;if(typeof ue=="function"){y.callback=null,E=y.priorityLevel;var T=ue(y.expirationTime<=D);if(D=t.unstable_now(),typeof T=="function"){y.callback=T,G(D),W=!0;break t}y===r(m)&&l(m),G(D)}else l(m);y=r(m)}if(y!==null)W=!0;else{var O=r(p);O!==null&&Z(re,O.startTime-D),W=!1}}break e}finally{y=null,E=ee,x=!1}W=void 0}}finally{W?X():B=!1}}}var X;if(typeof I=="function")X=function(){I(H)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,j=ye.port2;ye.port1.onmessage=H,X=function(){j.postMessage(null)}}else X=function(){S(H,0)};function Z(D,W){ae=S(function(){D(t.unstable_now())},W)}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(D){D.callback=null},t.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<D?Math.floor(1e3/D):5},t.unstable_getCurrentPriorityLevel=function(){return E},t.unstable_next=function(D){switch(E){case 1:case 2:case 3:var W=3;break;default:W=E}var ee=E;E=W;try{return D()}finally{E=ee}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function(D,W){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ee=E;E=D;try{return W()}finally{E=ee}},t.unstable_scheduleCallback=function(D,W,ee){var ue=t.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ue+ee:ue):ee=ue,D){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=ee+T,D={id:b++,callback:W,priorityLevel:D,startTime:ee,expirationTime:T,sortIndex:-1},ee>ue?(D.sortIndex=ee,i(p,D),r(m)===null&&D===r(p)&&(A?(U(ae),ae=-1):A=!0,Z(re,ee-ue))):(D.sortIndex=T,i(m,D),k||x||(k=!0,B||(B=!0,X()))),D},t.unstable_shouldYield=w,t.unstable_wrapCallback=function(D){var W=E;return function(){var ee=E;E=W;try{return D.apply(this,arguments)}finally{E=ee}}}})(bd)),bd}var kg;function _0(){return kg||(kg=1,gd.exports=E0()),gd.exports}var yd={exports:{}},Wt={};/**
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 Ng;function S0(){if(Ng)return Wt;Ng=1;var t=gf();function i(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={d:{f:r,r:function(){throw Error(i(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 c(m,p,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:m,containerInfo:p,implementation:b}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Wt.createPortal=function(m,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return c(m,p,null,b)},Wt.flushSync=function(m){var p=u.T,b=l.p;try{if(u.T=null,l.p=2,m)return m()}finally{u.T=p,l.p=b,l.d.f()}},Wt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,l.d.C(m,p))},Wt.prefetchDNS=function(m){typeof m=="string"&&l.d.D(m)},Wt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var b=p.as,y=h(b,p.crossOrigin),E=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?l.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:E,fetchPriority:x}):b==="script"&&l.d.X(m,{crossOrigin:y,integrity:E,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Wt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=h(p.as,p.crossOrigin);l.d.M(m,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&l.d.M(m)},Wt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,y=h(b,p.crossOrigin);l.d.L(m,b,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Wt.preloadModule=function(m,p){if(typeof m=="string")if(p){var b=h(p.as,p.crossOrigin);l.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else l.d.m(m)},Wt.requestFormReset=function(m){l.d.r(m)},Wt.unstable_batchedUpdates=function(m,p){return m(p)},Wt.useFormState=function(m,p,b){return u.H.useFormState(m,p,b)},Wt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Wt.version="19.2.4",Wt}var wg;function k0(){if(wg)return yd.exports;wg=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(i){console.error(i)}}return t(),yd.exports=S0(),yd.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 Tg;function N0(){if(Tg)return Hl;Tg=1;var t=_0(),i=gf(),r=k0();function l(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}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 c(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a: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 h(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 m(e){if(c(e)!==e)throw Error(l(188))}function p(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(l(188));return n!==e?null:e}for(var a=e,s=n;;){var d=a.return;if(d===null)break;var f=d.alternate;if(f===null){if(s=d.return,s!==null){a=s;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===a)return m(d),e;if(f===s)return m(d),n;f=f.sibling}throw Error(l(188))}if(a.return!==s.return)a=d,s=f;else{for(var v=!1,_=d.child;_;){if(_===a){v=!0,a=d,s=f;break}if(_===s){v=!0,s=d,a=f;break}_=_.sibling}if(!v){for(_=f.child;_;){if(_===a){v=!0,a=f,s=d;break}if(_===s){v=!0,s=f,a=d;break}_=_.sibling}if(!v)throw Error(l(189))}}if(a.alternate!==s)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?e:n}function b(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=b(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,E=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),I=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),w=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function X(e){return e===null||typeof e!="object"?null:(e=H&&e[H]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Symbol.for("react.client.reference");function j(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case S:return"Profiler";case C:return"StrictMode";case re:return"Suspense";case B:return"SuspenseList";case me:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case I:return e.displayName||"Context";case U:return(e._context.displayName||"Context")+".Consumer";case G:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ae:return n=e.displayName||null,n!==null?n:j(e.type)||"Memo";case fe:n=e._payload,e=e._init;try{return j(e(n))}catch{}}return null}var Z=Array.isArray,D=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ue=[],T=-1;function O(e){return{current:e}}function q(e){0>T||(e.current=ue[T],ue[T]=null,T--)}function N(e,n){T++,ue[T]=e.current,e.current=n}var pe=O(null),Ne=O(null),K=O(null),le=O(null);function ve(e,n){switch(N(K,n),N(Ne,e),N(pe,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Pm(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Pm(n),e=Gm(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(pe),N(pe,e)}function be(){q(pe),q(Ne),q(K)}function De(e){e.memoizedState!==null&&N(le,e);var n=pe.current,a=Gm(n,e.type);n!==a&&(N(Ne,e),N(pe,a))}function Et(e){Ne.current===e&&(q(pe),q(Ne)),le.current===e&&(q(le),Ll._currentValue=ee)}var wt,Di;function xn(e){if(wt===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);wt=n&&n[1]||"",Di=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+wt+e+Di}var Zn=!1;function Ye(e,n){if(!e||Zn)return"";Zn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(Y){var $=Y}Reflect.construct(e,[],ie)}else{try{ie.call()}catch(Y){$=Y}e.call(ie.prototype)}}else{try{throw Error()}catch(Y){$=Y}(ie=e())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(Y){if(Y&&$&&typeof Y.stack=="string")return[Y.stack,$.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=s.DetermineComponentFrameRoot(),v=f[0],_=f[1];if(v&&_){var M=v.split(`
44
- `),P=_.split(`
45
- `);for(d=s=0;s<M.length&&!M[s].includes("DetermineComponentFrameRoot");)s++;for(;d<P.length&&!P[d].includes("DetermineComponentFrameRoot");)d++;if(s===M.length||d===P.length)for(s=M.length-1,d=P.length-1;1<=s&&0<=d&&M[s]!==P[d];)d--;for(;1<=s&&0<=d;s--,d--)if(M[s]!==P[d]){if(s!==1||d!==1)do if(s--,d--,0>d||M[s]!==P[d]){var J=`
46
- `+M[s].replace(" at new "," at ");return e.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",e.displayName)),J}while(1<=s&&0<=d);break}}}finally{Zn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?xn(a):""}function $n(e,n){switch(e.tag){case 26:case 27:case 5:return xn(e.type);case 16:return xn("Lazy");case 13:return e.child!==n&&n!==null?xn("Suspense Fallback"):xn("Suspense");case 19:return xn("SuspenseList");case 0:case 15:return Ye(e.type,!1);case 11:return Ye(e.type.render,!1);case 1:return Ye(e.type,!0);case 31:return xn("Activity");default:return""}}function Rn(e){try{var n="",a=null;do n+=$n(e,a),a=e,e=e.return;while(e);return n}catch(s){return`
47
- Error generating stack: `+s.message+`
48
- `+s.stack}}var Qn=Object.prototype.hasOwnProperty,ci=t.unstable_scheduleCallback,mr=t.unstable_cancelCallback,Ka=t.unstable_shouldYield,Gr=t.unstable_requestPaint,kt=t.unstable_now,$r=t.unstable_getCurrentPriorityLevel,Q=t.unstable_ImmediatePriority,de=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,He=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,nn=t.log,Kn=t.unstable_setDisableYieldValue,$t=null,Tt=null;function Zt(e){if(typeof nn=="function"&&Kn(e),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode($t,e)}catch{}}var it=Math.clz32?Math.clz32:hs,Jn=Math.log,rn=Math.LN2;function hs(e){return e>>>=0,e===0?32:31-(Jn(e)/rn|0)|0}var gr=256,Kr=262144,br=4194304;function cn(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 R(e,n,a){var s=e.pendingLanes;if(s===0)return 0;var d=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var _=s&134217727;return _!==0?(s=_&~f,s!==0?d=cn(s):(v&=_,v!==0?d=cn(v):a||(a=_&~e,a!==0&&(d=cn(a))))):(_=s&~f,_!==0?d=cn(_):v!==0?d=cn(v):a||(a=s&~e,a!==0&&(d=cn(a)))),d===0?0:n!==0&&n!==d&&(n&f)===0&&(f=d&-d,a=n&-n,f>=a||f===32&&(a&4194048)!==0)?n:d}function te(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function ge(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 Ie(){var e=br;return br<<=1,(br&62914560)===0&&(br=4194304),e}function yt(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function ft(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _e(e,n,a,s,d,f){var v=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var _=e.entanglements,M=e.expirationTimes,P=e.hiddenUpdates;for(a=v&~a;0<a;){var J=31-it(a),ie=1<<J;_[J]=0,M[J]=-1;var $=P[J];if($!==null)for(P[J]=null,J=0;J<$.length;J++){var Y=$[J];Y!==null&&(Y.lane&=-536870913)}a&=~ie}s!==0&&xe(e,s,0),f!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~n))}function xe(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var s=31-it(n);e.entangledLanes|=n,e.entanglements[s]=e.entanglements[s]|1073741824|a&261930}function Re(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var s=31-it(a),d=1<<s;d&n|e[s]&n&&(e[s]|=n),a&=~d}}function Ot(e,n){var a=n&-n;return a=(a&42)!==0?1:_t(a),(a&(e.suspendedLanes|n))!==0?0:a}function _t(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 ui(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qr(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:fg(e.type))}function Vr(e,n){var a=W.p;try{return W.p=e,n()}finally{W.p=a}}var Wn=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Wn,Qt="__reactProps$"+Wn,Ii="__reactContainer$"+Wn,qa="__reactEvents$"+Wn,ps="__reactListeners$"+Wn,Yr="__reactHandles$"+Wn,ms="__reactResources$"+Wn,yr="__reactMarker$"+Wn;function Va(e){delete e[Mt],delete e[Qt],delete e[qa],delete e[ps],delete e[Yr]}function an(e){var n=e[Mt];if(n)return n;for(var a=e.parentNode;a;){if(n=a[Ii]||a[Mt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Zm(e);e!==null;){if(a=e[Mt])return a;e=Zm(e)}return n}e=a,a=e.parentNode}return null}function di(e){if(e=e[Mt]||e[Ii]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Li(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(l(33))}function Ui(e){var n=e[ms];return n||(n=e[ms]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Lt(e){e[yr]=!0}var gs=new Set,vr={};function fi(e,n){se(e,n),se(e+"Capture",n)}function se(e,n){for(vr[e]=n,e=0;e<n.length;e++)gs.add(n[e])}var we=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Fe={},rt={};function Rt(e){return Qn.call(rt,e)?!0:Qn.call(Fe,e)?!1:we.test(e)?rt[e]=!0:(Fe[e]=!0,!1)}function Jt(e,n,a){if(Rt(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function En(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function un(e,n,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+s)}}function gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _n(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function bs(e,n,a){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,f=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(v){a=""+v,f.call(this,v)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Xr(e){if(!e._valueTracker){var n=_n(e)?"checked":"value";e._valueTracker=bs(e,n,""+e[n])}}function Ya(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),s="";return e&&(s=_n(e)?e.checked?"true":"false":e.value),e=s,e!==a?(n.setValue(e),!0):!1}function Zr(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 fc=/[\n"\\]/g;function dn(e){return e.replace(fc,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Xa(e,n,a,s,d,f,v,_){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+gt(n)):e.value!==""+gt(n)&&(e.value=""+gt(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?Qr(e,v,gt(n)):a!=null?Qr(e,v,gt(a)):s!=null&&e.removeAttribute("value"),d==null&&f!=null&&(e.defaultChecked=!!f),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+gt(_):e.removeAttribute("name")}function xr(e,n,a,s,d,f,v,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),n!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||n!=null)){Xr(e);return}a=a!=null?""+gt(a):"",n=n!=null?""+gt(n):a,_||n===e.value||(e.value=n),e.defaultValue=n}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=_?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Xr(e)}function Qr(e,n,a){n==="number"&&Zr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Kt(e,n,a,s){if(e=e.options,n){n={};for(var d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<e.length;a++)d=n.hasOwnProperty("$"+e[a].value),e[a].selected!==d&&(e[a].selected=d),d&&s&&(e[a].defaultSelected=!0)}else{for(a=""+gt(a),n=null,d=0;d<e.length;d++){if(e[d].value===a){e[d].selected=!0,s&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function ys(e,n,a){if(n!=null&&(n=""+gt(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+gt(a):""}function Jr(e,n,a,s){if(n==null){if(s!=null){if(a!=null)throw Error(l(92));if(Z(s)){if(1<s.length)throw Error(l(93));s=s[0]}a=s}a==null&&(a=""),n=a}a=gt(n),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s),Xr(e)}function Me(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var vs=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 Ut(e,n,a){var s=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":s?e.setProperty(n,a):typeof a!="number"||a===0||vs.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function at(e,n,a){if(n!=null&&typeof n!="object")throw Error(l(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var d in n)s=n[d],n.hasOwnProperty(d)&&a[d]!==s&&Ut(e,d,s)}else for(var f in n)n.hasOwnProperty(f)&&Ut(e,f,n[f])}function Bi(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 hi=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"]]),Za=/^[\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 zi(e){return Za.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function he(){}var Se=null;function Ue(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ke=null,Nt=null;function Dn(e){var n=di(e);if(n&&(e=n.stateNode)){var a=e[Qt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Xa(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+dn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var s=a[n];if(s!==e&&s.form===e.form){var d=s[Qt]||null;if(!d)throw Error(l(90));Xa(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)s=a[n],s.form===e.form&&Ya(s)}break e;case"textarea":ys(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Kt(e,!!a.multiple,n,!1)}}}var Qa=!1;function xs(e,n,a){if(Qa)return e(n,a);Qa=!0;try{var s=e(n);return s}finally{if(Qa=!1,(Ke!==null||Nt!==null)&&(so(),Ke&&(n=Ke,e=Nt,Nt=Ke=null,Dn(n),e)))for(n=0;n<e.length;n++)Dn(e[n])}}function Ja(e,n){var a=e.stateNode;if(a===null)return null;var s=a[Qt]||null;if(s===null)return null;a=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(l(231,n,typeof a));return a}var pi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hc=!1;if(pi)try{var Wa={};Object.defineProperty(Wa,"passive",{get:function(){hc=!0}}),window.addEventListener("test",Wa,Wa),window.removeEventListener("test",Wa,Wa)}catch{hc=!1}var ji=null,pc=null,Es=null;function Gf(){if(Es)return Es;var e,n=pc,a=n.length,s,d="value"in ji?ji.value:ji.textContent,f=d.length;for(e=0;e<a&&n[e]===d[e];e++);var v=a-e;for(s=1;s<=v&&n[a-s]===d[f-s];s++);return Es=d.slice(e,1<s?1-s:void 0)}function _s(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 Ss(){return!0}function $f(){return!1}function fn(e){function n(a,s,d,f,v){this._reactName=a,this._targetInst=d,this.type=s,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(a=e[_],this[_]=a?a(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Ss:$f,this.isPropagationStopped=$f,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ss)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ss)},persist:function(){},isPersistent:Ss}),n}var Er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ks=fn(Er),el=y({},Er,{view:0,detail:0}),hx=fn(el),mc,gc,tl,Ns=y({},el,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yc,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!==tl&&(tl&&e.type==="mousemove"?(mc=e.screenX-tl.screenX,gc=e.screenY-tl.screenY):gc=mc=0,tl=e),mc)},movementY:function(e){return"movementY"in e?e.movementY:gc}}),Kf=fn(Ns),px=y({},Ns,{dataTransfer:0}),mx=fn(px),gx=y({},el,{relatedTarget:0}),bc=fn(gx),bx=y({},Er,{animationName:0,elapsedTime:0,pseudoElement:0}),yx=fn(bx),vx=y({},Er,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xx=fn(vx),Ex=y({},Er,{data:0}),qf=fn(Ex),_x={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sx={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"},kx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nx(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=kx[e])?!!n[e]:!1}function yc(){return Nx}var wx=y({},el,{key:function(e){if(e.key){var n=_x[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=_s(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yc,charCode:function(e){return e.type==="keypress"?_s(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_s(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Tx=fn(wx),Ax=y({},Ns,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vf=fn(Ax),Cx=y({},el,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yc}),Ox=fn(Cx),Mx=y({},Er,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rx=fn(Mx),Dx=y({},Ns,{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}),Ix=fn(Dx),Lx=y({},Er,{newState:0,oldState:0}),Ux=fn(Lx),Bx=[9,13,27,32],vc=pi&&"CompositionEvent"in window,nl=null;pi&&"documentMode"in document&&(nl=document.documentMode);var zx=pi&&"TextEvent"in window&&!nl,Yf=pi&&(!vc||nl&&8<nl&&11>=nl),Xf=" ",Zf=!1;function Qf(e,n){switch(e){case"keyup":return Bx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function jx(e,n){switch(e){case"compositionend":return Jf(n);case"keypress":return n.which!==32?null:(Zf=!0,Xf);case"textInput":return e=n.data,e===Xf&&Zf?null:e;default:return null}}function Hx(e,n){if(Wr)return e==="compositionend"||!vc&&Qf(e,n)?(e=Gf(),Es=pc=ji=null,Wr=!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 Yf&&n.locale!=="ko"?null:n.data;default:return null}}var Fx={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 Wf(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Fx[e.type]:n==="textarea"}function eh(e,n,a,s){Ke?Nt?Nt.push(s):Nt=[s]:Ke=s,n=mo(n,"onChange"),0<n.length&&(a=new ks("onChange","change",null,a,s),e.push({event:a,listeners:n}))}var il=null,rl=null;function Px(e){Um(e,0)}function ws(e){var n=Li(e);if(Ya(n))return e}function th(e,n){if(e==="change")return n}var nh=!1;if(pi){var xc;if(pi){var Ec="oninput"in document;if(!Ec){var ih=document.createElement("div");ih.setAttribute("oninput","return;"),Ec=typeof ih.oninput=="function"}xc=Ec}else xc=!1;nh=xc&&(!document.documentMode||9<document.documentMode)}function rh(){il&&(il.detachEvent("onpropertychange",ah),rl=il=null)}function ah(e){if(e.propertyName==="value"&&ws(rl)){var n=[];eh(n,rl,e,Ue(e)),xs(Px,n)}}function Gx(e,n,a){e==="focusin"?(rh(),il=n,rl=a,il.attachEvent("onpropertychange",ah)):e==="focusout"&&rh()}function $x(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ws(rl)}function Kx(e,n){if(e==="click")return ws(n)}function qx(e,n){if(e==="input"||e==="change")return ws(n)}function Vx(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Sn=typeof Object.is=="function"?Object.is:Vx;function al(e,n){if(Sn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),s=Object.keys(n);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var d=a[s];if(!Qn.call(n,d)||!Sn(e[d],n[d]))return!1}return!0}function lh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sh(e,n){var a=lh(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=n&&s>=n)return{node:a,offset:n-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=lh(a)}}function oh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?oh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function ch(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Zr(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Zr(e.document)}return n}function _c(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 Yx=pi&&"documentMode"in document&&11>=document.documentMode,ea=null,Sc=null,ll=null,kc=!1;function uh(e,n,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;kc||ea==null||ea!==Zr(s)||(s=ea,"selectionStart"in s&&_c(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),ll&&al(ll,s)||(ll=s,s=mo(Sc,"onSelect"),0<s.length&&(n=new ks("onSelect","select",null,n,a),e.push({event:n,listeners:s}),n.target=ea)))}function _r(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var ta={animationend:_r("Animation","AnimationEnd"),animationiteration:_r("Animation","AnimationIteration"),animationstart:_r("Animation","AnimationStart"),transitionrun:_r("Transition","TransitionRun"),transitionstart:_r("Transition","TransitionStart"),transitioncancel:_r("Transition","TransitionCancel"),transitionend:_r("Transition","TransitionEnd")},Nc={},dh={};pi&&(dh=document.createElement("div").style,"AnimationEvent"in window||(delete ta.animationend.animation,delete ta.animationiteration.animation,delete ta.animationstart.animation),"TransitionEvent"in window||delete ta.transitionend.transition);function Sr(e){if(Nc[e])return Nc[e];if(!ta[e])return e;var n=ta[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in dh)return Nc[e]=n[a];return e}var fh=Sr("animationend"),hh=Sr("animationiteration"),ph=Sr("animationstart"),Xx=Sr("transitionrun"),Zx=Sr("transitionstart"),Qx=Sr("transitioncancel"),mh=Sr("transitionend"),gh=new Map,wc="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(" ");wc.push("scrollEnd");function qn(e,n){gh.set(e,n),fi(n,[e])}var Ts=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)},In=[],na=0,Tc=0;function As(){for(var e=na,n=Tc=na=0;n<e;){var a=In[n];In[n++]=null;var s=In[n];In[n++]=null;var d=In[n];In[n++]=null;var f=In[n];if(In[n++]=null,s!==null&&d!==null){var v=s.pending;v===null?d.next=d:(d.next=v.next,v.next=d),s.pending=d}f!==0&&bh(a,d,f)}}function Cs(e,n,a,s){In[na++]=e,In[na++]=n,In[na++]=a,In[na++]=s,Tc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Ac(e,n,a,s){return Cs(e,n,a,s),Os(e)}function kr(e,n){return Cs(e,null,null,n),Os(e)}function bh(e,n,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var d=!1,f=e.return;f!==null;)f.childLanes|=a,s=f.alternate,s!==null&&(s.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(d=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,d&&n!==null&&(d=31-it(a),e=f.hiddenUpdates,s=e[d],s===null?e[d]=[n]:s.push(n),n.lane=a|536870912),f):null}function Os(e){if(50<Al)throw Al=0,Bu=null,Error(l(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ia={};function Jx(e,n,a,s){this.tag=e,this.key=a,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kn(e,n,a,s){return new Jx(e,n,a,s)}function Cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mi(e,n){var a=e.alternate;return a===null?(a=kn(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function yh(e,n){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Ms(e,n,a,s,d,f){var v=0;if(s=e,typeof e=="function")Cc(e)&&(v=1);else if(typeof e=="string")v=i0(e,a,pe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case me:return e=kn(31,a,n,d),e.elementType=me,e.lanes=f,e;case A:return Nr(a.children,d,f,n);case C:v=8,d|=24;break;case S:return e=kn(12,a,n,d|2),e.elementType=S,e.lanes=f,e;case re:return e=kn(13,a,n,d),e.elementType=re,e.lanes=f,e;case B:return e=kn(19,a,n,d),e.elementType=B,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case I:v=10;break e;case U:v=9;break e;case G:v=11;break e;case ae:v=14;break e;case fe:v=16,s=null;break e}v=29,a=Error(l(130,e===null?"null":typeof e,"")),s=null}return n=kn(v,a,n,d),n.elementType=e,n.type=s,n.lanes=f,n}function Nr(e,n,a,s){return e=kn(7,e,s,n),e.lanes=a,e}function Oc(e,n,a){return e=kn(6,e,null,n),e.lanes=a,e}function vh(e){var n=kn(18,null,null,0);return n.stateNode=e,n}function Mc(e,n,a){return n=kn(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var xh=new WeakMap;function Ln(e,n){if(typeof e=="object"&&e!==null){var a=xh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Rn(n)},xh.set(e,n),n)}return{value:e,source:n,stack:Rn(n)}}var ra=[],aa=0,Rs=null,sl=0,Un=[],Bn=0,Hi=null,ei=1,ti="";function gi(e,n){ra[aa++]=sl,ra[aa++]=Rs,Rs=e,sl=n}function Eh(e,n,a){Un[Bn++]=ei,Un[Bn++]=ti,Un[Bn++]=Hi,Hi=e;var s=ei;e=ti;var d=32-it(s)-1;s&=~(1<<d),a+=1;var f=32-it(n)+d;if(30<f){var v=d-d%5;f=(s&(1<<v)-1).toString(32),s>>=v,d-=v,ei=1<<32-it(n)+d|a<<d|s,ti=f+e}else ei=1<<f|a<<d|s,ti=e}function Rc(e){e.return!==null&&(gi(e,1),Eh(e,1,0))}function Dc(e){for(;e===Rs;)Rs=ra[--aa],ra[aa]=null,sl=ra[--aa],ra[aa]=null;for(;e===Hi;)Hi=Un[--Bn],Un[Bn]=null,ti=Un[--Bn],Un[Bn]=null,ei=Un[--Bn],Un[Bn]=null}function _h(e,n){Un[Bn++]=ei,Un[Bn++]=ti,Un[Bn++]=Hi,ei=n.id,ti=n.overflow,Hi=e}var qt=null,vt=null,Xe=!1,Fi=null,zn=!1,Ic=Error(l(519));function Pi(e){var n=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ol(Ln(n,e)),Ic}function Sh(e){var n=e.stateNode,a=e.type,s=e.memoizedProps;switch(n[Mt]=e,n[Qt]=s,a){case"dialog":Ge("cancel",n),Ge("close",n);break;case"iframe":case"object":case"embed":Ge("load",n);break;case"video":case"audio":for(a=0;a<Ol.length;a++)Ge(Ol[a],n);break;case"source":Ge("error",n);break;case"img":case"image":case"link":Ge("error",n),Ge("load",n);break;case"details":Ge("toggle",n);break;case"input":Ge("invalid",n),xr(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ge("invalid",n);break;case"textarea":Ge("invalid",n),Jr(n,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||s.suppressHydrationWarning===!0||Hm(n.textContent,a)?(s.popover!=null&&(Ge("beforetoggle",n),Ge("toggle",n)),s.onScroll!=null&&Ge("scroll",n),s.onScrollEnd!=null&&Ge("scrollend",n),s.onClick!=null&&(n.onclick=he),n=!0):n=!1,n||Pi(e,!0)}function kh(e){for(qt=e.return;qt;)switch(qt.tag){case 5:case 31:case 13:zn=!1;return;case 27:case 3:zn=!0;return;default:qt=qt.return}}function la(e){if(e!==qt)return!1;if(!Xe)return kh(e),Xe=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Ju(e.type,e.memoizedProps)),a=!a),a&&vt&&Pi(e),kh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));vt=Xm(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));vt=Xm(e)}else n===27?(n=vt,nr(e.type)?(e=id,id=null,vt=e):vt=n):vt=qt?Hn(e.stateNode.nextSibling):null;return!0}function wr(){vt=qt=null,Xe=!1}function Lc(){var e=Fi;return e!==null&&(gn===null?gn=e:gn.push.apply(gn,e),Fi=null),e}function ol(e){Fi===null?Fi=[e]:Fi.push(e)}var Uc=O(null),Tr=null,bi=null;function Gi(e,n,a){N(Uc,n._currentValue),n._currentValue=a}function yi(e){e._currentValue=Uc.current,q(Uc)}function Bc(e,n,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===a)break;e=e.return}}function zc(e,n,a,s){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var f=d.dependencies;if(f!==null){var v=d.child;f=f.firstContext;e:for(;f!==null;){var _=f;f=d;for(var M=0;M<n.length;M++)if(_.context===n[M]){f.lanes|=a,_=f.alternate,_!==null&&(_.lanes|=a),Bc(f.return,a,e),s||(v=null);break e}f=_.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(l(341));v.lanes|=a,f=v.alternate,f!==null&&(f.lanes|=a),Bc(v,a,e),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===e){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function sa(e,n,a,s){e=null;for(var d=n,f=!1;d!==null;){if(!f){if((d.flags&524288)!==0)f=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(l(387));if(v=v.memoizedProps,v!==null){var _=d.type;Sn(d.pendingProps.value,v.value)||(e!==null?e.push(_):e=[_])}}else if(d===le.current){if(v=d.alternate,v===null)throw Error(l(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Ll):e=[Ll])}d=d.return}e!==null&&zc(n,e,a,s),n.flags|=262144}function Ds(e){for(e=e.firstContext;e!==null;){if(!Sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ar(e){Tr=e,bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Vt(e){return Nh(Tr,e)}function Is(e,n){return Tr===null&&Ar(e),Nh(e,n)}function Nh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},bi===null){if(e===null)throw Error(l(308));bi=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else bi=bi.next=n;return a}var Wx=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},eE=t.unstable_scheduleCallback,tE=t.unstable_NormalPriority,Bt={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jc(){return{controller:new Wx,data:new Map,refCount:0}}function cl(e){e.refCount--,e.refCount===0&&eE(tE,function(){e.controller.abort()})}var ul=null,Hc=0,oa=0,ca=null;function nE(e,n){if(ul===null){var a=ul=[];Hc=0,oa=Gu(),ca={status:"pending",value:void 0,then:function(s){a.push(s)}}}return Hc++,n.then(wh,wh),n}function wh(){if(--Hc===0&&ul!==null){ca!==null&&(ca.status="fulfilled");var e=ul;ul=null,oa=0,ca=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function iE(e,n){var a=[],s={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return e.then(function(){s.status="fulfilled",s.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(s.status="rejected",s.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),s}var Th=D.S;D.S=function(e,n){um=kt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&nE(e,n),Th!==null&&Th(e,n)};var Cr=O(null);function Fc(){var e=Cr.current;return e!==null?e:ht.pooledCache}function Ls(e,n){n===null?N(Cr,Cr.current):N(Cr,n.pool)}function Ah(){var e=Fc();return e===null?null:{parent:Bt._currentValue,pool:e}}var ua=Error(l(460)),Pc=Error(l(474)),Us=Error(l(542)),Bs={then:function(){}};function Ch(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Oh(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(he,he),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Rh(e),e;default:if(typeof n.status=="string")n.then(he,he);else{if(e=ht,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=n,e.status="pending",e.then(function(s){if(n.status==="pending"){var d=n;d.status="fulfilled",d.value=s}},function(s){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Rh(e),e}throw Mr=n,ua}}function Or(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Mr=a,ua):a}}var Mr=null;function Mh(){if(Mr===null)throw Error(l(459));var e=Mr;return Mr=null,e}function Rh(e){if(e===ua||e===Us)throw Error(l(483))}var da=null,dl=0;function zs(e){var n=dl;return dl+=1,da===null&&(da=[]),Oh(da,e,n)}function fl(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function js(e,n){throw n.$$typeof===E?Error(l(525)):(e=Object.prototype.toString.call(n),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Dh(e){function n(z,L){if(e){var F=z.deletions;F===null?(z.deletions=[L],z.flags|=16):F.push(L)}}function a(z,L){if(!e)return null;for(;L!==null;)n(z,L),L=L.sibling;return null}function s(z){for(var L=new Map;z!==null;)z.key!==null?L.set(z.key,z):L.set(z.index,z),z=z.sibling;return L}function d(z,L){return z=mi(z,L),z.index=0,z.sibling=null,z}function f(z,L,F){return z.index=F,e?(F=z.alternate,F!==null?(F=F.index,F<L?(z.flags|=67108866,L):F):(z.flags|=67108866,L)):(z.flags|=1048576,L)}function v(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function _(z,L,F,ne){return L===null||L.tag!==6?(L=Oc(F,z.mode,ne),L.return=z,L):(L=d(L,F),L.return=z,L)}function M(z,L,F,ne){var Te=F.type;return Te===A?J(z,L,F.props.children,ne,F.key):L!==null&&(L.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===fe&&Or(Te)===L.type)?(L=d(L,F.props),fl(L,F),L.return=z,L):(L=Ms(F.type,F.key,F.props,null,z.mode,ne),fl(L,F),L.return=z,L)}function P(z,L,F,ne){return L===null||L.tag!==4||L.stateNode.containerInfo!==F.containerInfo||L.stateNode.implementation!==F.implementation?(L=Mc(F,z.mode,ne),L.return=z,L):(L=d(L,F.children||[]),L.return=z,L)}function J(z,L,F,ne,Te){return L===null||L.tag!==7?(L=Nr(F,z.mode,ne,Te),L.return=z,L):(L=d(L,F),L.return=z,L)}function ie(z,L,F){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=Oc(""+L,z.mode,F),L.return=z,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case x:return F=Ms(L.type,L.key,L.props,null,z.mode,F),fl(F,L),F.return=z,F;case k:return L=Mc(L,z.mode,F),L.return=z,L;case fe:return L=Or(L),ie(z,L,F)}if(Z(L)||X(L))return L=Nr(L,z.mode,F,null),L.return=z,L;if(typeof L.then=="function")return ie(z,zs(L),F);if(L.$$typeof===I)return ie(z,Is(z,L),F);js(z,L)}return null}function $(z,L,F,ne){var Te=L!==null?L.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return Te!==null?null:_(z,L,""+F,ne);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case x:return F.key===Te?M(z,L,F,ne):null;case k:return F.key===Te?P(z,L,F,ne):null;case fe:return F=Or(F),$(z,L,F,ne)}if(Z(F)||X(F))return Te!==null?null:J(z,L,F,ne,null);if(typeof F.then=="function")return $(z,L,zs(F),ne);if(F.$$typeof===I)return $(z,L,Is(z,F),ne);js(z,F)}return null}function Y(z,L,F,ne,Te){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return z=z.get(F)||null,_(L,z,""+ne,Te);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return z=z.get(ne.key===null?F:ne.key)||null,M(L,z,ne,Te);case k:return z=z.get(ne.key===null?F:ne.key)||null,P(L,z,ne,Te);case fe:return ne=Or(ne),Y(z,L,F,ne,Te)}if(Z(ne)||X(ne))return z=z.get(F)||null,J(L,z,ne,Te,null);if(typeof ne.then=="function")return Y(z,L,F,zs(ne),Te);if(ne.$$typeof===I)return Y(z,L,F,Is(L,ne),Te);js(L,ne)}return null}function Ee(z,L,F,ne){for(var Te=null,Je=null,ke=L,ze=L=0,Ve=null;ke!==null&&ze<F.length;ze++){ke.index>ze?(Ve=ke,ke=null):Ve=ke.sibling;var We=$(z,ke,F[ze],ne);if(We===null){ke===null&&(ke=Ve);break}e&&ke&&We.alternate===null&&n(z,ke),L=f(We,L,ze),Je===null?Te=We:Je.sibling=We,Je=We,ke=Ve}if(ze===F.length)return a(z,ke),Xe&&gi(z,ze),Te;if(ke===null){for(;ze<F.length;ze++)ke=ie(z,F[ze],ne),ke!==null&&(L=f(ke,L,ze),Je===null?Te=ke:Je.sibling=ke,Je=ke);return Xe&&gi(z,ze),Te}for(ke=s(ke);ze<F.length;ze++)Ve=Y(ke,z,ze,F[ze],ne),Ve!==null&&(e&&Ve.alternate!==null&&ke.delete(Ve.key===null?ze:Ve.key),L=f(Ve,L,ze),Je===null?Te=Ve:Je.sibling=Ve,Je=Ve);return e&&ke.forEach(function(sr){return n(z,sr)}),Xe&&gi(z,ze),Te}function Oe(z,L,F,ne){if(F==null)throw Error(l(151));for(var Te=null,Je=null,ke=L,ze=L=0,Ve=null,We=F.next();ke!==null&&!We.done;ze++,We=F.next()){ke.index>ze?(Ve=ke,ke=null):Ve=ke.sibling;var sr=$(z,ke,We.value,ne);if(sr===null){ke===null&&(ke=Ve);break}e&&ke&&sr.alternate===null&&n(z,ke),L=f(sr,L,ze),Je===null?Te=sr:Je.sibling=sr,Je=sr,ke=Ve}if(We.done)return a(z,ke),Xe&&gi(z,ze),Te;if(ke===null){for(;!We.done;ze++,We=F.next())We=ie(z,We.value,ne),We!==null&&(L=f(We,L,ze),Je===null?Te=We:Je.sibling=We,Je=We);return Xe&&gi(z,ze),Te}for(ke=s(ke);!We.done;ze++,We=F.next())We=Y(ke,z,ze,We.value,ne),We!==null&&(e&&We.alternate!==null&&ke.delete(We.key===null?ze:We.key),L=f(We,L,ze),Je===null?Te=We:Je.sibling=We,Je=We);return e&&ke.forEach(function(p0){return n(z,p0)}),Xe&&gi(z,ze),Te}function ut(z,L,F,ne){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 x:e:{for(var Te=F.key;L!==null;){if(L.key===Te){if(Te=F.type,Te===A){if(L.tag===7){a(z,L.sibling),ne=d(L,F.props.children),ne.return=z,z=ne;break e}}else if(L.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===fe&&Or(Te)===L.type){a(z,L.sibling),ne=d(L,F.props),fl(ne,F),ne.return=z,z=ne;break e}a(z,L);break}else n(z,L);L=L.sibling}F.type===A?(ne=Nr(F.props.children,z.mode,ne,F.key),ne.return=z,z=ne):(ne=Ms(F.type,F.key,F.props,null,z.mode,ne),fl(ne,F),ne.return=z,z=ne)}return v(z);case k:e:{for(Te=F.key;L!==null;){if(L.key===Te)if(L.tag===4&&L.stateNode.containerInfo===F.containerInfo&&L.stateNode.implementation===F.implementation){a(z,L.sibling),ne=d(L,F.children||[]),ne.return=z,z=ne;break e}else{a(z,L);break}else n(z,L);L=L.sibling}ne=Mc(F,z.mode,ne),ne.return=z,z=ne}return v(z);case fe:return F=Or(F),ut(z,L,F,ne)}if(Z(F))return Ee(z,L,F,ne);if(X(F)){if(Te=X(F),typeof Te!="function")throw Error(l(150));return F=Te.call(F),Oe(z,L,F,ne)}if(typeof F.then=="function")return ut(z,L,zs(F),ne);if(F.$$typeof===I)return ut(z,L,Is(z,F),ne);js(z,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,L!==null&&L.tag===6?(a(z,L.sibling),ne=d(L,F),ne.return=z,z=ne):(a(z,L),ne=Oc(F,z.mode,ne),ne.return=z,z=ne),v(z)):a(z,L)}return function(z,L,F,ne){try{dl=0;var Te=ut(z,L,F,ne);return da=null,Te}catch(ke){if(ke===ua||ke===Us)throw ke;var Je=kn(29,ke,null,z.mode);return Je.lanes=ne,Je.return=z,Je}finally{}}}var Rr=Dh(!0),Ih=Dh(!1),$i=!1;function Gc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $c(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 Ki(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qi(e,n,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(et&2)!==0){var d=s.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),s.pending=n,n=Os(e),bh(e,null,a),n}return Cs(e,s,n,a),Os(e)}function hl(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var s=n.lanes;s&=e.pendingLanes,a|=s,n.lanes=a,Re(e,a)}}function Kc(e,n){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var d=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?d=f=v:f=f.next=v,a=a.next}while(a!==null);f===null?d=f=n:f=f.next=n}else d=f=n;a={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:f,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var qc=!1;function pl(){if(qc){var e=ca;if(e!==null)throw e}}function ml(e,n,a,s){qc=!1;var d=e.updateQueue;$i=!1;var f=d.firstBaseUpdate,v=d.lastBaseUpdate,_=d.shared.pending;if(_!==null){d.shared.pending=null;var M=_,P=M.next;M.next=null,v===null?f=P:v.next=P,v=M;var J=e.alternate;J!==null&&(J=J.updateQueue,_=J.lastBaseUpdate,_!==v&&(_===null?J.firstBaseUpdate=P:_.next=P,J.lastBaseUpdate=M))}if(f!==null){var ie=d.baseState;v=0,J=P=M=null,_=f;do{var $=_.lane&-536870913,Y=$!==_.lane;if(Y?(qe&$)===$:(s&$)===$){$!==0&&$===oa&&(qc=!0),J!==null&&(J=J.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Ee=e,Oe=_;$=n;var ut=a;switch(Oe.tag){case 1:if(Ee=Oe.payload,typeof Ee=="function"){ie=Ee.call(ut,ie,$);break e}ie=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Oe.payload,$=typeof Ee=="function"?Ee.call(ut,ie,$):Ee,$==null)break e;ie=y({},ie,$);break e;case 2:$i=!0}}$=_.callback,$!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=d.callbacks,Y===null?d.callbacks=[$]:Y.push($))}else Y={lane:$,tag:_.tag,payload:_.payload,callback:_.callback,next:null},J===null?(P=J=Y,M=ie):J=J.next=Y,v|=$;if(_=_.next,_===null){if(_=d.shared.pending,_===null)break;Y=_,_=Y.next,Y.next=null,d.lastBaseUpdate=Y,d.shared.pending=null}}while(!0);J===null&&(M=ie),d.baseState=M,d.firstBaseUpdate=P,d.lastBaseUpdate=J,f===null&&(d.shared.lanes=0),Qi|=v,e.lanes=v,e.memoizedState=ie}}function Lh(e,n){if(typeof e!="function")throw Error(l(191,e));e.call(n)}function Uh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Lh(a[e],n)}var fa=O(null),Hs=O(0);function Bh(e,n){e=Ti,N(Hs,e),N(fa,n),Ti=e|n.baseLanes}function Vc(){N(Hs,Ti),N(fa,fa.current)}function Yc(){Ti=Hs.current,q(fa),q(Hs)}var Nn=O(null),jn=null;function Vi(e){var n=e.alternate;N(Dt,Dt.current&1),N(Nn,e),jn===null&&(n===null||fa.current!==null||n.memoizedState!==null)&&(jn=e)}function Xc(e){N(Dt,Dt.current),N(Nn,e),jn===null&&(jn=e)}function zh(e){e.tag===22?(N(Dt,Dt.current),N(Nn,e),jn===null&&(jn=e)):Yi()}function Yi(){N(Dt,Dt.current),N(Nn,Nn.current)}function wn(e){q(Nn),jn===e&&(jn=null),q(Dt)}var Dt=O(0);function Fs(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||td(a)||nd(a)))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 vi=0,Be=null,ot=null,zt=null,Ps=!1,ha=!1,Dr=!1,Gs=0,gl=0,pa=null,rE=0;function At(){throw Error(l(321))}function Zc(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!Sn(e[a],n[a]))return!1;return!0}function Qc(e,n,a,s,d,f){return vi=f,Be=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,D.H=e===null||e.memoizedState===null?Ep:fu,Dr=!1,f=a(s,d),Dr=!1,ha&&(f=Hh(n,a,s,d)),jh(e),f}function jh(e){D.H=vl;var n=ot!==null&&ot.next!==null;if(vi=0,zt=ot=Be=null,Ps=!1,gl=0,pa=null,n)throw Error(l(300));e===null||jt||(e=e.dependencies,e!==null&&Ds(e)&&(jt=!0))}function Hh(e,n,a,s){Be=e;var d=0;do{if(ha&&(pa=null),gl=0,ha=!1,25<=d)throw Error(l(301));if(d+=1,zt=ot=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}D.H=_p,f=n(a,s)}while(ha);return f}function aE(){var e=D.H,n=e.useState()[0];return n=typeof n.then=="function"?bl(n):n,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(Be.flags|=1024),n}function Jc(){var e=Gs!==0;return Gs=0,e}function Wc(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function eu(e){if(Ps){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Ps=!1}vi=0,zt=ot=Be=null,ha=!1,gl=Gs=0,pa=null}function ln(){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 It(){if(ot===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var n=zt===null?Be.memoizedState:zt.next;if(n!==null)zt=n,ot=e;else{if(e===null)throw Be.alternate===null?Error(l(467)):Error(l(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},zt===null?Be.memoizedState=zt=e:zt=zt.next=e}return zt}function $s(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bl(e){var n=gl;return gl+=1,pa===null&&(pa=[]),e=Oh(pa,e,n),n=Be,(zt===null?n.memoizedState:zt.next)===null&&(n=n.alternate,D.H=n===null||n.memoizedState===null?Ep:fu),e}function Ks(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bl(e);if(e.$$typeof===I)return Vt(e)}throw Error(l(438,String(e)))}function tu(e){var n=null,a=Be.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var s=Be.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=$s(),Be.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),s=0;s<e;s++)a[s]=w;return n.index++,a}function xi(e,n){return typeof n=="function"?n(e):n}function qs(e){var n=It();return nu(n,ot,e)}function nu(e,n,a){var s=e.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=a;var d=e.baseQueue,f=s.pending;if(f!==null){if(d!==null){var v=d.next;d.next=f.next,f.next=v}n.baseQueue=d=f,s.pending=null}if(f=e.baseState,d===null)e.memoizedState=f;else{n=d.next;var _=v=null,M=null,P=n,J=!1;do{var ie=P.lane&-536870913;if(ie!==P.lane?(qe&ie)===ie:(vi&ie)===ie){var $=P.revertLane;if($===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),ie===oa&&(J=!0);else if((vi&$)===$){P=P.next,$===oa&&(J=!0);continue}else ie={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},M===null?(_=M=ie,v=f):M=M.next=ie,Be.lanes|=$,Qi|=$;ie=P.action,Dr&&a(f,ie),f=P.hasEagerState?P.eagerState:a(f,ie)}else $={lane:ie,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},M===null?(_=M=$,v=f):M=M.next=$,Be.lanes|=ie,Qi|=ie;P=P.next}while(P!==null&&P!==n);if(M===null?v=f:M.next=_,!Sn(f,e.memoizedState)&&(jt=!0,J&&(a=ca,a!==null)))throw a;e.memoizedState=f,e.baseState=v,e.baseQueue=M,s.lastRenderedState=f}return d===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function iu(e){var n=It(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var s=a.dispatch,d=a.pending,f=n.memoizedState;if(d!==null){a.pending=null;var v=d=d.next;do f=e(f,v.action),v=v.next;while(v!==d);Sn(f,n.memoizedState)||(jt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,s]}function Fh(e,n,a){var s=Be,d=It(),f=Xe;if(f){if(a===void 0)throw Error(l(407));a=a()}else a=n();var v=!Sn((ot||d).memoizedState,a);if(v&&(d.memoizedState=a,jt=!0),d=d.queue,lu($h.bind(null,s,d,e),[e]),d.getSnapshot!==n||v||zt!==null&&zt.memoizedState.tag&1){if(s.flags|=2048,ma(9,{destroy:void 0},Gh.bind(null,s,d,a,n),null),ht===null)throw Error(l(349));f||(vi&127)!==0||Ph(s,n,a)}return a}function Ph(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Be.updateQueue,n===null?(n=$s(),Be.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Gh(e,n,a,s){n.value=a,n.getSnapshot=s,Kh(n)&&qh(e)}function $h(e,n,a){return a(function(){Kh(n)&&qh(e)})}function Kh(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!Sn(e,a)}catch{return!0}}function qh(e){var n=kr(e,2);n!==null&&bn(n,e,2)}function ru(e){var n=ln();if(typeof e=="function"){var a=e;if(e=a(),Dr){Zt(!0);try{a()}finally{Zt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:e},n}function Vh(e,n,a,s){return e.baseState=a,nu(e,ot,typeof s=="function"?s:xi)}function lE(e,n,a,s,d){if(Xs(e))throw Error(l(485));if(e=n.action,e!==null){var f={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};D.T!==null?a(!0):f.isTransition=!1,s(f),a=n.pending,a===null?(f.next=n.pending=f,Yh(n,f)):(f.next=a.next,n.pending=a.next=f)}}function Yh(e,n){var a=n.action,s=n.payload,d=e.state;if(n.isTransition){var f=D.T,v={};D.T=v;try{var _=a(d,s),M=D.S;M!==null&&M(v,_),Xh(e,n,_)}catch(P){au(e,n,P)}finally{f!==null&&v.types!==null&&(f.types=v.types),D.T=f}}else try{f=a(d,s),Xh(e,n,f)}catch(P){au(e,n,P)}}function Xh(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){Zh(e,n,s)},function(s){return au(e,n,s)}):Zh(e,n,a)}function Zh(e,n,a){n.status="fulfilled",n.value=a,Qh(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,Yh(e,a)))}function au(e,n,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=a,Qh(n),n=n.next;while(n!==s)}e.action=null}function Qh(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Jh(e,n){return n}function Wh(e,n){if(Xe){var a=ht.formState;if(a!==null){e:{var s=Be;if(Xe){if(vt){t:{for(var d=vt,f=zn;d.nodeType!==8;){if(!f){d=null;break t}if(d=Hn(d.nextSibling),d===null){d=null;break t}}f=d.data,d=f==="F!"||f==="F"?d:null}if(d){vt=Hn(d.nextSibling),s=d.data==="F!";break e}}Pi(s)}s=!1}s&&(n=a[0])}}return a=ln(),a.memoizedState=a.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:n},a.queue=s,a=yp.bind(null,Be,s),s.dispatch=a,s=ru(!1),f=du.bind(null,Be,!1,s.queue),s=ln(),d={state:n,dispatch:null,action:e,pending:null},s.queue=d,a=lE.bind(null,Be,d,f,a),d.dispatch=a,s.memoizedState=e,[n,a,!1]}function ep(e){var n=It();return tp(n,ot,e)}function tp(e,n,a){if(n=nu(e,n,Jh)[0],e=qs(xi)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=bl(n)}catch(v){throw v===ua?Us:v}else s=n;n=It();var d=n.queue,f=d.dispatch;return a!==n.memoizedState&&(Be.flags|=2048,ma(9,{destroy:void 0},sE.bind(null,d,a),null)),[s,f,e]}function sE(e,n){e.action=n}function np(e){var n=It(),a=ot;if(a!==null)return tp(n,a,e);It(),n=n.memoizedState,a=It();var s=a.queue.dispatch;return a.memoizedState=e,[n,s,!1]}function ma(e,n,a,s){return e={tag:e,create:a,deps:s,inst:n,next:null},n=Be.updateQueue,n===null&&(n=$s(),Be.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,n.lastEffect=e),e}function ip(){return It().memoizedState}function Vs(e,n,a,s){var d=ln();Be.flags|=e,d.memoizedState=ma(1|n,{destroy:void 0},a,s===void 0?null:s)}function Ys(e,n,a,s){var d=It();s=s===void 0?null:s;var f=d.memoizedState.inst;ot!==null&&s!==null&&Zc(s,ot.memoizedState.deps)?d.memoizedState=ma(n,f,a,s):(Be.flags|=e,d.memoizedState=ma(1|n,f,a,s))}function rp(e,n){Vs(8390656,8,e,n)}function lu(e,n){Ys(2048,8,e,n)}function oE(e){Be.flags|=4;var n=Be.updateQueue;if(n===null)n=$s(),Be.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function ap(e){var n=It().memoizedState;return oE({ref:n,nextImpl:e}),function(){if((et&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}function lp(e,n){return Ys(4,2,e,n)}function sp(e,n){return Ys(4,4,e,n)}function op(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function cp(e,n,a){a=a!=null?a.concat([e]):null,Ys(4,4,op.bind(null,n,e),a)}function su(){}function up(e,n){var a=It();n=n===void 0?null:n;var s=a.memoizedState;return n!==null&&Zc(n,s[1])?s[0]:(a.memoizedState=[e,n],e)}function dp(e,n){var a=It();n=n===void 0?null:n;var s=a.memoizedState;if(n!==null&&Zc(n,s[1]))return s[0];if(s=e(),Dr){Zt(!0);try{e()}finally{Zt(!1)}}return a.memoizedState=[s,n],s}function ou(e,n,a){return a===void 0||(vi&1073741824)!==0&&(qe&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=fm(),Be.lanes|=e,Qi|=e,a)}function fp(e,n,a,s){return Sn(a,n)?a:fa.current!==null?(e=ou(e,a,s),Sn(e,n)||(jt=!0),e):(vi&42)===0||(vi&1073741824)!==0&&(qe&261930)===0?(jt=!0,e.memoizedState=a):(e=fm(),Be.lanes|=e,Qi|=e,n)}function hp(e,n,a,s,d){var f=W.p;W.p=f!==0&&8>f?f:8;var v=D.T,_={};D.T=_,du(e,!1,n,a);try{var M=d(),P=D.S;if(P!==null&&P(_,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var J=iE(M,s);yl(e,n,J,Cn(e))}else yl(e,n,s,Cn(e))}catch(ie){yl(e,n,{then:function(){},status:"rejected",reason:ie},Cn())}finally{W.p=f,v!==null&&_.types!==null&&(v.types=_.types),D.T=v}}function cE(){}function cu(e,n,a,s){if(e.tag!==5)throw Error(l(476));var d=pp(e).queue;hp(e,d,n,ee,a===null?cE:function(){return mp(e),a(s)})}function pp(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:ee},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function mp(e){var n=pp(e);n.next===null&&(n=e.alternate.memoizedState),yl(e,n.next.queue,{},Cn())}function uu(){return Vt(Ll)}function gp(){return It().memoizedState}function bp(){return It().memoizedState}function uE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=Cn();e=Ki(a);var s=qi(n,e,a);s!==null&&(bn(s,n,a),hl(s,n,a)),n={cache:jc()},e.payload=n;return}n=n.return}}function dE(e,n,a){var s=Cn();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Xs(e)?vp(n,a):(a=Ac(e,n,a,s),a!==null&&(bn(a,e,s),xp(a,n,s)))}function yp(e,n,a){var s=Cn();yl(e,n,a,s)}function yl(e,n,a,s){var d={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Xs(e))vp(n,d);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var v=n.lastRenderedState,_=f(v,a);if(d.hasEagerState=!0,d.eagerState=_,Sn(_,v))return Cs(e,n,d,0),ht===null&&As(),!1}catch{}finally{}if(a=Ac(e,n,d,s),a!==null)return bn(a,e,s),xp(a,n,s),!0}return!1}function du(e,n,a,s){if(s={lane:2,revertLane:Gu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Xs(e)){if(n)throw Error(l(479))}else n=Ac(e,a,s,2),n!==null&&bn(n,e,2)}function Xs(e){var n=e.alternate;return e===Be||n!==null&&n===Be}function vp(e,n){ha=Ps=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function xp(e,n,a){if((a&4194048)!==0){var s=n.lanes;s&=e.pendingLanes,a|=s,n.lanes=a,Re(e,a)}}var vl={readContext:Vt,use:Ks,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};vl.useEffectEvent=At;var Ep={readContext:Vt,use:Ks,useCallback:function(e,n){return ln().memoizedState=[e,n===void 0?null:n],e},useContext:Vt,useEffect:rp,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,Vs(4194308,4,op.bind(null,n,e),a)},useLayoutEffect:function(e,n){return Vs(4194308,4,e,n)},useInsertionEffect:function(e,n){Vs(4,2,e,n)},useMemo:function(e,n){var a=ln();n=n===void 0?null:n;var s=e();if(Dr){Zt(!0);try{e()}finally{Zt(!1)}}return a.memoizedState=[s,n],s},useReducer:function(e,n,a){var s=ln();if(a!==void 0){var d=a(n);if(Dr){Zt(!0);try{a(n)}finally{Zt(!1)}}}else d=n;return s.memoizedState=s.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},s.queue=e,e=e.dispatch=dE.bind(null,Be,e),[s.memoizedState,e]},useRef:function(e){var n=ln();return e={current:e},n.memoizedState=e},useState:function(e){e=ru(e);var n=e.queue,a=yp.bind(null,Be,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:su,useDeferredValue:function(e,n){var a=ln();return ou(a,e,n)},useTransition:function(){var e=ru(!1);return e=hp.bind(null,Be,e.queue,!0,!1),ln().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var s=Be,d=ln();if(Xe){if(a===void 0)throw Error(l(407));a=a()}else{if(a=n(),ht===null)throw Error(l(349));(qe&127)!==0||Ph(s,n,a)}d.memoizedState=a;var f={value:a,getSnapshot:n};return d.queue=f,rp($h.bind(null,s,f,e),[e]),s.flags|=2048,ma(9,{destroy:void 0},Gh.bind(null,s,f,a,n),null),a},useId:function(){var e=ln(),n=ht.identifierPrefix;if(Xe){var a=ti,s=ei;a=(s&~(1<<32-it(s)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Gs++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=rE++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:uu,useFormState:Wh,useActionState:Wh,useOptimistic:function(e){var n=ln();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=du.bind(null,Be,!0,a),a.dispatch=n,[e,n]},useMemoCache:tu,useCacheRefresh:function(){return ln().memoizedState=uE.bind(null,Be)},useEffectEvent:function(e){var n=ln(),a={impl:e};return n.memoizedState=a,function(){if((et&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},fu={readContext:Vt,use:Ks,useCallback:up,useContext:Vt,useEffect:lu,useImperativeHandle:cp,useInsertionEffect:lp,useLayoutEffect:sp,useMemo:dp,useReducer:qs,useRef:ip,useState:function(){return qs(xi)},useDebugValue:su,useDeferredValue:function(e,n){var a=It();return fp(a,ot.memoizedState,e,n)},useTransition:function(){var e=qs(xi)[0],n=It().memoizedState;return[typeof e=="boolean"?e:bl(e),n]},useSyncExternalStore:Fh,useId:gp,useHostTransitionStatus:uu,useFormState:ep,useActionState:ep,useOptimistic:function(e,n){var a=It();return Vh(a,ot,e,n)},useMemoCache:tu,useCacheRefresh:bp};fu.useEffectEvent=ap;var _p={readContext:Vt,use:Ks,useCallback:up,useContext:Vt,useEffect:lu,useImperativeHandle:cp,useInsertionEffect:lp,useLayoutEffect:sp,useMemo:dp,useReducer:iu,useRef:ip,useState:function(){return iu(xi)},useDebugValue:su,useDeferredValue:function(e,n){var a=It();return ot===null?ou(a,e,n):fp(a,ot.memoizedState,e,n)},useTransition:function(){var e=iu(xi)[0],n=It().memoizedState;return[typeof e=="boolean"?e:bl(e),n]},useSyncExternalStore:Fh,useId:gp,useHostTransitionStatus:uu,useFormState:np,useActionState:np,useOptimistic:function(e,n){var a=It();return ot!==null?Vh(a,ot,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:tu,useCacheRefresh:bp};_p.useEffectEvent=ap;function hu(e,n,a,s){n=e.memoizedState,a=a(s,n),a=a==null?n:y({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var pu={enqueueSetState:function(e,n,a){e=e._reactInternals;var s=Cn(),d=Ki(s);d.payload=n,a!=null&&(d.callback=a),n=qi(e,d,s),n!==null&&(bn(n,e,s),hl(n,e,s))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var s=Cn(),d=Ki(s);d.tag=1,d.payload=n,a!=null&&(d.callback=a),n=qi(e,d,s),n!==null&&(bn(n,e,s),hl(n,e,s))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=Cn(),s=Ki(a);s.tag=2,n!=null&&(s.callback=n),n=qi(e,s,a),n!==null&&(bn(n,e,a),hl(n,e,a))}};function Sp(e,n,a,s,d,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,v):n.prototype&&n.prototype.isPureReactComponent?!al(a,s)||!al(d,f):!0}function kp(e,n,a,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,s),n.state!==e&&pu.enqueueReplaceState(n,n.state,null)}function Ir(e,n){var a=n;if("ref"in n){a={};for(var s in n)s!=="ref"&&(a[s]=n[s])}if(e=e.defaultProps){a===n&&(a=y({},a));for(var d in e)a[d]===void 0&&(a[d]=e[d])}return a}function Np(e){Ts(e)}function wp(e){console.error(e)}function Tp(e){Ts(e)}function Zs(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Ap(e,n,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function mu(e,n,a){return a=Ki(a),a.tag=3,a.payload={element:null},a.callback=function(){Zs(e,n)},a}function Cp(e){return e=Ki(e),e.tag=3,e}function Op(e,n,a,s){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var f=s.value;e.payload=function(){return d(f)},e.callback=function(){Ap(n,a,s)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Ap(n,a,s),typeof d!="function"&&(Ji===null?Ji=new Set([this]):Ji.add(this));var _=s.stack;this.componentDidCatch(s.value,{componentStack:_!==null?_:""})})}function fE(e,n,a,s,d){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=a.alternate,n!==null&&sa(n,a,d,!0),a=Nn.current,a!==null){switch(a.tag){case 31:case 13:return jn===null?oo():a.alternate===null&&Ct===0&&(Ct=3),a.flags&=-257,a.flags|=65536,a.lanes=d,s===Bs?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([s]):n.add(s),Hu(e,s,d)),!1;case 22:return a.flags|=65536,s===Bs?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([s]):a.add(s)),Hu(e,s,d)),!1}throw Error(l(435,a.tag))}return Hu(e,s,d),oo(),!1}if(Xe)return n=Nn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,s!==Ic&&(e=Error(l(422),{cause:s}),ol(Ln(e,a)))):(s!==Ic&&(n=Error(l(423),{cause:s}),ol(Ln(n,a))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,s=Ln(s,a),d=mu(e.stateNode,s,d),Kc(e,d),Ct!==4&&(Ct=2)),!1;var f=Error(l(520),{cause:s});if(f=Ln(f,a),Tl===null?Tl=[f]:Tl.push(f),Ct!==4&&(Ct=2),n===null)return!0;s=Ln(s,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=d&-d,a.lanes|=e,e=mu(a.stateNode,s,e),Kc(a,e),!1;case 1:if(n=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Ji===null||!Ji.has(f))))return a.flags|=65536,d&=-d,a.lanes|=d,d=Cp(d),Op(d,e,a,s),Kc(a,d),!1}a=a.return}while(a!==null);return!1}var gu=Error(l(461)),jt=!1;function Yt(e,n,a,s){n.child=e===null?Ih(n,null,a,s):Rr(n,e.child,a,s)}function Mp(e,n,a,s,d){a=a.render;var f=n.ref;if("ref"in s){var v={};for(var _ in s)_!=="ref"&&(v[_]=s[_])}else v=s;return Ar(n),s=Qc(e,n,a,v,f,d),_=Jc(),e!==null&&!jt?(Wc(e,n,d),Ei(e,n,d)):(Xe&&_&&Rc(n),n.flags|=1,Yt(e,n,s,d),n.child)}function Rp(e,n,a,s,d){if(e===null){var f=a.type;return typeof f=="function"&&!Cc(f)&&f.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=f,Dp(e,n,f,s,d)):(e=Ms(a.type,null,s,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!ku(e,d)){var v=f.memoizedProps;if(a=a.compare,a=a!==null?a:al,a(v,s)&&e.ref===n.ref)return Ei(e,n,d)}return n.flags|=1,e=mi(f,s),e.ref=n.ref,e.return=n,n.child=e}function Dp(e,n,a,s,d){if(e!==null){var f=e.memoizedProps;if(al(f,s)&&e.ref===n.ref)if(jt=!1,n.pendingProps=s=f,ku(e,d))(e.flags&131072)!==0&&(jt=!0);else return n.lanes=e.lanes,Ei(e,n,d)}return bu(e,n,a,s,d)}function Ip(e,n,a,s){var d=s.children,f=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(s=n.child=e.child,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~f}else s=0,n.child=null;return Lp(e,n,f,a,s)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ls(n,f!==null?f.cachePool:null),f!==null?Bh(n,f):Vc(),zh(n);else return s=n.lanes=536870912,Lp(e,n,f!==null?f.baseLanes|a:a,a,s)}else f!==null?(Ls(n,f.cachePool),Bh(n,f),Yi(),n.memoizedState=null):(e!==null&&Ls(n,null),Vc(),Yi());return Yt(e,n,d,a),n.child}function xl(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Lp(e,n,a,s,d){var f=Fc();return f=f===null?null:{parent:Bt._currentValue,pool:f},n.memoizedState={baseLanes:a,cachePool:f},e!==null&&Ls(n,null),Vc(),zh(n),e!==null&&sa(e,n,s,!0),n.childLanes=d,null}function Qs(e,n){return n=Ws({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Up(e,n,a){return Rr(n,e.child,null,a),e=Qs(n,n.pendingProps),e.flags|=2,wn(n),n.memoizedState=null,e}function hE(e,n,a){var s=n.pendingProps,d=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Xe){if(s.mode==="hidden")return e=Qs(n,s),n.lanes=536870912,xl(null,e);if(Xc(n),(e=vt)?(e=Ym(e,zn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Hi!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},a=vh(e),a.return=n,n.child=a,qt=n,vt=null)):e=null,e===null)throw Pi(n);return n.lanes=536870912,null}return Qs(n,s)}var f=e.memoizedState;if(f!==null){var v=f.dehydrated;if(Xc(n),d)if(n.flags&256)n.flags&=-257,n=Up(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(l(558));else if(jt||sa(e,n,a,!1),d=(a&e.childLanes)!==0,jt||d){if(s=ht,s!==null&&(v=Ot(s,a),v!==0&&v!==f.retryLane))throw f.retryLane=v,kr(e,v),bn(s,e,v),gu;oo(),n=Up(e,n,a)}else e=f.treeContext,vt=Hn(v.nextSibling),qt=n,Xe=!0,Fi=null,zn=!1,e!==null&&_h(n,e),n=Qs(n,s),n.flags|=4096;return n}return e=mi(e.child,{mode:s.mode,children:s.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Js(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function bu(e,n,a,s,d){return Ar(n),a=Qc(e,n,a,s,void 0,d),s=Jc(),e!==null&&!jt?(Wc(e,n,d),Ei(e,n,d)):(Xe&&s&&Rc(n),n.flags|=1,Yt(e,n,a,d),n.child)}function Bp(e,n,a,s,d,f){return Ar(n),n.updateQueue=null,a=Hh(n,s,a,d),jh(e),s=Jc(),e!==null&&!jt?(Wc(e,n,f),Ei(e,n,f)):(Xe&&s&&Rc(n),n.flags|=1,Yt(e,n,a,f),n.child)}function zp(e,n,a,s,d){if(Ar(n),n.stateNode===null){var f=ia,v=a.contextType;typeof v=="object"&&v!==null&&(f=Vt(v)),f=new a(s,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=pu,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=s,f.state=n.memoizedState,f.refs={},Gc(n),v=a.contextType,f.context=typeof v=="object"&&v!==null?Vt(v):ia,f.state=n.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(hu(n,a,v,s),f.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&pu.enqueueReplaceState(f,f.state,null),ml(n,s,f,d),pl(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(e===null){f=n.stateNode;var _=n.memoizedProps,M=Ir(a,_);f.props=M;var P=f.context,J=a.contextType;v=ia,typeof J=="object"&&J!==null&&(v=Vt(J));var ie=a.getDerivedStateFromProps;J=typeof ie=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,J||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||P!==v)&&kp(n,f,s,v),$i=!1;var $=n.memoizedState;f.state=$,ml(n,s,f,d),pl(),P=n.memoizedState,_||$!==P||$i?(typeof ie=="function"&&(hu(n,a,ie,s),P=n.memoizedState),(M=$i||Sp(n,a,M,s,$,P,v))?(J||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=s,n.memoizedState=P),f.props=s,f.state=P,f.context=v,s=M):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{f=n.stateNode,$c(e,n),v=n.memoizedProps,J=Ir(a,v),f.props=J,ie=n.pendingProps,$=f.context,P=a.contextType,M=ia,typeof P=="object"&&P!==null&&(M=Vt(P)),_=a.getDerivedStateFromProps,(P=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==ie||$!==M)&&kp(n,f,s,M),$i=!1,$=n.memoizedState,f.state=$,ml(n,s,f,d),pl();var Y=n.memoizedState;v!==ie||$!==Y||$i||e!==null&&e.dependencies!==null&&Ds(e.dependencies)?(typeof _=="function"&&(hu(n,a,_,s),Y=n.memoizedState),(J=$i||Sp(n,a,J,s,$,Y,M)||e!==null&&e.dependencies!==null&&Ds(e.dependencies))?(P||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,Y,M),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,Y,M)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=Y),f.props=s,f.state=Y,f.context=M,s=J):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(n.flags|=1024),s=!1)}return f=s,Js(e,n),s=(n.flags&128)!==0,f||s?(f=n.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:f.render(),n.flags|=1,e!==null&&s?(n.child=Rr(n,e.child,null,d),n.child=Rr(n,null,a,d)):Yt(e,n,a,d),n.memoizedState=f.state,e=n.child):e=Ei(e,n,d),e}function jp(e,n,a,s){return wr(),n.flags|=256,Yt(e,n,a,s),n.child}var yu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vu(e){return{baseLanes:e,cachePool:Ah()}}function xu(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=An),e}function Hp(e,n,a){var s=n.pendingProps,d=!1,f=(n.flags&128)!==0,v;if((v=f)||(v=e!==null&&e.memoizedState===null?!1:(Dt.current&2)!==0),v&&(d=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if(Xe){if(d?Vi(n):Yi(),(e=vt)?(e=Ym(e,zn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Hi!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},a=vh(e),a.return=n,n.child=a,qt=n,vt=null)):e=null,e===null)throw Pi(n);return nd(e)?n.lanes=32:n.lanes=536870912,null}var _=s.children;return s=s.fallback,d?(Yi(),d=n.mode,_=Ws({mode:"hidden",children:_},d),s=Nr(s,d,a,null),_.return=n,s.return=n,_.sibling=s,n.child=_,s=n.child,s.memoizedState=vu(a),s.childLanes=xu(e,v,a),n.memoizedState=yu,xl(null,s)):(Vi(n),Eu(n,_))}var M=e.memoizedState;if(M!==null&&(_=M.dehydrated,_!==null)){if(f)n.flags&256?(Vi(n),n.flags&=-257,n=_u(e,n,a)):n.memoizedState!==null?(Yi(),n.child=e.child,n.flags|=128,n=null):(Yi(),_=s.fallback,d=n.mode,s=Ws({mode:"visible",children:s.children},d),_=Nr(_,d,a,null),_.flags|=2,s.return=n,_.return=n,s.sibling=_,n.child=s,Rr(n,e.child,null,a),s=n.child,s.memoizedState=vu(a),s.childLanes=xu(e,v,a),n.memoizedState=yu,n=xl(null,s));else if(Vi(n),nd(_)){if(v=_.nextSibling&&_.nextSibling.dataset,v)var P=v.dgst;v=P,s=Error(l(419)),s.stack="",s.digest=v,ol({value:s,source:null,stack:null}),n=_u(e,n,a)}else if(jt||sa(e,n,a,!1),v=(a&e.childLanes)!==0,jt||v){if(v=ht,v!==null&&(s=Ot(v,a),s!==0&&s!==M.retryLane))throw M.retryLane=s,kr(e,s),bn(v,e,s),gu;td(_)||oo(),n=_u(e,n,a)}else td(_)?(n.flags|=192,n.child=e.child,n=null):(e=M.treeContext,vt=Hn(_.nextSibling),qt=n,Xe=!0,Fi=null,zn=!1,e!==null&&_h(n,e),n=Eu(n,s.children),n.flags|=4096);return n}return d?(Yi(),_=s.fallback,d=n.mode,M=e.child,P=M.sibling,s=mi(M,{mode:"hidden",children:s.children}),s.subtreeFlags=M.subtreeFlags&65011712,P!==null?_=mi(P,_):(_=Nr(_,d,a,null),_.flags|=2),_.return=n,s.return=n,s.sibling=_,n.child=s,xl(null,s),s=n.child,_=e.child.memoizedState,_===null?_=vu(a):(d=_.cachePool,d!==null?(M=Bt._currentValue,d=d.parent!==M?{parent:M,pool:M}:d):d=Ah(),_={baseLanes:_.baseLanes|a,cachePool:d}),s.memoizedState=_,s.childLanes=xu(e,v,a),n.memoizedState=yu,xl(e.child,s)):(Vi(n),a=e.child,e=a.sibling,a=mi(a,{mode:"visible",children:s.children}),a.return=n,a.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=a,n.memoizedState=null,a)}function Eu(e,n){return n=Ws({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Ws(e,n){return e=kn(22,e,null,n),e.lanes=0,e}function _u(e,n,a){return Rr(n,e.child,null,a),e=Eu(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Fp(e,n,a){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),Bc(e.return,n,a)}function Su(e,n,a,s,d,f){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:d,treeForkCount:f}:(v.isBackwards=n,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=a,v.tailMode=d,v.treeForkCount=f)}function Pp(e,n,a){var s=n.pendingProps,d=s.revealOrder,f=s.tail;s=s.children;var v=Dt.current,_=(v&2)!==0;if(_?(v=v&1|2,n.flags|=128):v&=1,N(Dt,v),Yt(e,n,s,a),s=Xe?sl:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fp(e,a,n);else if(e.tag===19)Fp(e,a,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(d){case"forwards":for(a=n.child,d=null;a!==null;)e=a.alternate,e!==null&&Fs(e)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),Su(n,!1,d,a,f,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&Fs(e)===null){n.child=d;break}e=d.sibling,d.sibling=a,a=d,d=e}Su(n,!0,a,null,f,s);break;case"together":Su(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function Ei(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Qi|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(sa(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(l(153));if(n.child!==null){for(e=n.child,a=mi(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=mi(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function ku(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Ds(e)))}function pE(e,n,a){switch(n.tag){case 3:ve(n,n.stateNode.containerInfo),Gi(n,Bt,e.memoizedState.cache),wr();break;case 27:case 5:De(n);break;case 4:ve(n,n.stateNode.containerInfo);break;case 10:Gi(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Xc(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(Vi(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Hp(e,n,a):(Vi(n),e=Ei(e,n,a),e!==null?e.sibling:null);Vi(n);break;case 19:var d=(e.flags&128)!==0;if(s=(a&n.childLanes)!==0,s||(sa(e,n,a,!1),s=(a&n.childLanes)!==0),d){if(s)return Pp(e,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),N(Dt,Dt.current),s)break;return null;case 22:return n.lanes=0,Ip(e,n,a,n.pendingProps);case 24:Gi(n,Bt,e.memoizedState.cache)}return Ei(e,n,a)}function Gp(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)jt=!0;else{if(!ku(e,a)&&(n.flags&128)===0)return jt=!1,pE(e,n,a);jt=(e.flags&131072)!==0}else jt=!1,Xe&&(n.flags&1048576)!==0&&Eh(n,sl,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(e=Or(n.elementType),n.type=e,typeof e=="function")Cc(e)?(s=Ir(e,s),n.tag=1,n=zp(null,n,e,s,a)):(n.tag=0,n=bu(null,n,e,s,a));else{if(e!=null){var d=e.$$typeof;if(d===G){n.tag=11,n=Mp(null,n,e,s,a);break e}else if(d===ae){n.tag=14,n=Rp(null,n,e,s,a);break e}}throw n=j(e)||e,Error(l(306,n,""))}}return n;case 0:return bu(e,n,n.type,n.pendingProps,a);case 1:return s=n.type,d=Ir(s,n.pendingProps),zp(e,n,s,d,a);case 3:e:{if(ve(n,n.stateNode.containerInfo),e===null)throw Error(l(387));s=n.pendingProps;var f=n.memoizedState;d=f.element,$c(e,n),ml(n,s,null,a);var v=n.memoizedState;if(s=v.cache,Gi(n,Bt,s),s!==f.cache&&zc(n,[Bt],a,!0),pl(),s=v.element,f.isDehydrated)if(f={element:s,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=jp(e,n,s,a);break e}else if(s!==d){d=Ln(Error(l(424)),n),ol(d),n=jp(e,n,s,a);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(vt=Hn(e.firstChild),qt=n,Xe=!0,Fi=null,zn=!0,a=Ih(n,null,s,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(wr(),s===d){n=Ei(e,n,a);break e}Yt(e,n,s,a)}n=n.child}return n;case 26:return Js(e,n),e===null?(a=eg(n.type,null,n.pendingProps,null))?n.memoizedState=a:Xe||(a=n.type,e=n.pendingProps,s=go(K.current).createElement(a),s[Mt]=n,s[Qt]=e,Xt(s,a,e),Lt(s),n.stateNode=s):n.memoizedState=eg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return De(n),e===null&&Xe&&(s=n.stateNode=Qm(n.type,n.pendingProps,K.current),qt=n,zn=!0,d=vt,nr(n.type)?(id=d,vt=Hn(s.firstChild)):vt=d),Yt(e,n,n.pendingProps.children,a),Js(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Xe&&((d=s=vt)&&(s=$E(s,n.type,n.pendingProps,zn),s!==null?(n.stateNode=s,qt=n,vt=Hn(s.firstChild),zn=!1,d=!0):d=!1),d||Pi(n)),De(n),d=n.type,f=n.pendingProps,v=e!==null?e.memoizedProps:null,s=f.children,Ju(d,f)?s=null:v!==null&&Ju(d,v)&&(n.flags|=32),n.memoizedState!==null&&(d=Qc(e,n,aE,null,null,a),Ll._currentValue=d),Js(e,n),Yt(e,n,s,a),n.child;case 6:return e===null&&Xe&&((e=a=vt)&&(a=KE(a,n.pendingProps,zn),a!==null?(n.stateNode=a,qt=n,vt=null,e=!0):e=!1),e||Pi(n)),null;case 13:return Hp(e,n,a);case 4:return ve(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Rr(n,null,s,a):Yt(e,n,s,a),n.child;case 11:return Mp(e,n,n.type,n.pendingProps,a);case 7:return Yt(e,n,n.pendingProps,a),n.child;case 8:return Yt(e,n,n.pendingProps.children,a),n.child;case 12:return Yt(e,n,n.pendingProps.children,a),n.child;case 10:return s=n.pendingProps,Gi(n,n.type,s.value),Yt(e,n,s.children,a),n.child;case 9:return d=n.type._context,s=n.pendingProps.children,Ar(n),d=Vt(d),s=s(d),n.flags|=1,Yt(e,n,s,a),n.child;case 14:return Rp(e,n,n.type,n.pendingProps,a);case 15:return Dp(e,n,n.type,n.pendingProps,a);case 19:return Pp(e,n,a);case 31:return hE(e,n,a);case 22:return Ip(e,n,a,n.pendingProps);case 24:return Ar(n),s=Vt(Bt),e===null?(d=Fc(),d===null&&(d=ht,f=jc(),d.pooledCache=f,f.refCount++,f!==null&&(d.pooledCacheLanes|=a),d=f),n.memoizedState={parent:s,cache:d},Gc(n),Gi(n,Bt,d)):((e.lanes&a)!==0&&($c(e,n),ml(n,null,null,a),pl()),d=e.memoizedState,f=n.memoizedState,d.parent!==s?(d={parent:s,cache:s},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),Gi(n,Bt,s)):(s=f.cache,Gi(n,Bt,s),s!==d.cache&&zc(n,[Bt],a,!0))),Yt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(l(156,n.tag))}function _i(e){e.flags|=4}function Nu(e,n,a,s,d){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(gm())e.flags|=8192;else throw Mr=Bs,Pc}else e.flags&=-16777217}function $p(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ag(n))if(gm())e.flags|=8192;else throw Mr=Bs,Pc}function eo(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Ie():536870912,e.lanes|=n,va|=n)}function El(e,n){if(!Xe)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function xt(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(n)for(var d=e.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=s,e.childLanes=a,n}function mE(e,n,a){var s=n.pendingProps;switch(Dc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(n),null;case 1:return xt(n),null;case 3:return a=n.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),yi(Bt),be(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(la(n)?_i(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Lc())),xt(n),null;case 26:var d=n.type,f=n.memoizedState;return e===null?(_i(n),f!==null?(xt(n),$p(n,f)):(xt(n),Nu(n,d,null,s,a))):f?f!==e.memoizedState?(_i(n),xt(n),$p(n,f)):(xt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==s&&_i(n),xt(n),Nu(n,d,e,s,a)),null;case 27:if(Et(n),a=K.current,d=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&_i(n);else{if(!s){if(n.stateNode===null)throw Error(l(166));return xt(n),null}e=pe.current,la(n)?Sh(n):(e=Qm(d,s,a),n.stateNode=e,_i(n))}return xt(n),null;case 5:if(Et(n),d=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&_i(n);else{if(!s){if(n.stateNode===null)throw Error(l(166));return xt(n),null}if(f=pe.current,la(n))Sh(n);else{var v=go(K.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?f.multiple=!0:s.size&&(f.size=s.size);break;default:f=typeof s.is=="string"?v.createElement(d,{is:s.is}):v.createElement(d)}}f[Mt]=n,f[Qt]=s;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=f;e:switch(Xt(f,d,s),d){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&_i(n)}}return xt(n),Nu(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==s&&_i(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(l(166));if(e=K.current,la(n)){if(e=n.stateNode,a=n.memoizedProps,s=null,d=qt,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}e[Mt]=n,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||Hm(e.nodeValue,a)),e||Pi(n,!0)}else e=go(e).createTextNode(s),e[Mt]=n,n.stateNode=e}return xt(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(s=la(n),a!==null){if(e===null){if(!s)throw Error(l(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[Mt]=n}else wr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;xt(n),e=!1}else a=Lc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(wn(n),n):(wn(n),null);if((n.flags&128)!==0)throw Error(l(558))}return xt(n),null;case 13:if(s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=la(n),s!==null&&s.dehydrated!==null){if(e===null){if(!d)throw Error(l(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(l(317));d[Mt]=n}else wr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;xt(n),d=!1}else d=Lc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(wn(n),n):(wn(n),null)}return wn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=s!==null,e=e!==null&&e.memoizedState!==null,a&&(s=n.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==d&&(s.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),eo(n,n.updateQueue),xt(n),null);case 4:return be(),e===null&&Vu(n.stateNode.containerInfo),xt(n),null;case 10:return yi(n.type),xt(n),null;case 19:if(q(Dt),s=n.memoizedState,s===null)return xt(n),null;if(d=(n.flags&128)!==0,f=s.rendering,f===null)if(d)El(s,!1);else{if(Ct!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=Fs(e),f!==null){for(n.flags|=128,El(s,!1),e=f.updateQueue,n.updateQueue=e,eo(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)yh(a,e),a=a.sibling;return N(Dt,Dt.current&1|2),Xe&&gi(n,s.treeForkCount),n.child}e=e.sibling}s.tail!==null&&kt()>ao&&(n.flags|=128,d=!0,El(s,!1),n.lanes=4194304)}else{if(!d)if(e=Fs(f),e!==null){if(n.flags|=128,d=!0,e=e.updateQueue,n.updateQueue=e,eo(n,e),El(s,!0),s.tail===null&&s.tailMode==="hidden"&&!f.alternate&&!Xe)return xt(n),null}else 2*kt()-s.renderingStartTime>ao&&a!==536870912&&(n.flags|=128,d=!0,El(s,!1),n.lanes=4194304);s.isBackwards?(f.sibling=n.child,n.child=f):(e=s.last,e!==null?e.sibling=f:n.child=f,s.last=f)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=kt(),e.sibling=null,a=Dt.current,N(Dt,d?a&1|2:a&1),Xe&&gi(n,s.treeForkCount),e):(xt(n),null);case 22:case 23:return wn(n),Yc(),s=n.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(a&536870912)!==0&&(n.flags&128)===0&&(xt(n),n.subtreeFlags&6&&(n.flags|=8192)):xt(n),a=n.updateQueue,a!==null&&eo(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==a&&(n.flags|=2048),e!==null&&q(Cr),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),yi(Bt),xt(n),null;case 25:return null;case 30:return null}throw Error(l(156,n.tag))}function gE(e,n){switch(Dc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return yi(Bt),be(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Et(n),null;case 31:if(n.memoizedState!==null){if(wn(n),n.alternate===null)throw Error(l(340));wr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(wn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(l(340));wr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return q(Dt),null;case 4:return be(),null;case 10:return yi(n.type),null;case 22:case 23:return wn(n),Yc(),e!==null&&q(Cr),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return yi(Bt),null;case 25:return null;default:return null}}function Kp(e,n){switch(Dc(n),n.tag){case 3:yi(Bt),be();break;case 26:case 27:case 5:Et(n);break;case 4:be();break;case 31:n.memoizedState!==null&&wn(n);break;case 13:wn(n);break;case 19:q(Dt);break;case 10:yi(n.type);break;case 22:case 23:wn(n),Yc(),e!==null&&q(Cr);break;case 24:yi(Bt)}}function _l(e,n){try{var a=n.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var d=s.next;a=d;do{if((a.tag&e)===e){s=void 0;var f=a.create,v=a.inst;s=f(),v.destroy=s}a=a.next}while(a!==d)}}catch(_){st(n,n.return,_)}}function Xi(e,n,a){try{var s=n.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var f=d.next;s=f;do{if((s.tag&e)===e){var v=s.inst,_=v.destroy;if(_!==void 0){v.destroy=void 0,d=n;var M=a,P=_;try{P()}catch(J){st(d,M,J)}}}s=s.next}while(s!==f)}}catch(J){st(n,n.return,J)}}function qp(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Uh(n,a)}catch(s){st(e,e.return,s)}}}function Vp(e,n,a){a.props=Ir(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){st(e,n,s)}}function Sl(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(d){st(e,n,d)}}function ni(e,n){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(d){st(e,n,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){st(e,n,d)}else a.current=null}function Yp(e){var n=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(d){st(e,e.return,d)}}function wu(e,n,a){try{var s=e.stateNode;zE(s,e.type,a,n),s[Qt]=n}catch(d){st(e,e.return,d)}}function Xp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nr(e.type)||e.tag===4}function Tu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xp(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&&nr(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 Au(e,n,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=he));else if(s!==4&&(s===27&&nr(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Au(e,n,a),e=e.sibling;e!==null;)Au(e,n,a),e=e.sibling}function to(e,n,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(s!==4&&(s===27&&nr(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(to(e,n,a),e=e.sibling;e!==null;)to(e,n,a),e=e.sibling}function Zp(e){var n=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);Xt(n,s,a),n[Mt]=e,n[Qt]=a}catch(f){st(e,e.return,f)}}var Si=!1,Ht=!1,Cu=!1,Qp=typeof WeakSet=="function"?WeakSet:Set,Gt=null;function bE(e,n){if(e=e.containerInfo,Zu=So,e=ch(e),_c(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var d=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var v=0,_=-1,M=-1,P=0,J=0,ie=e,$=null;t:for(;;){for(var Y;ie!==a||d!==0&&ie.nodeType!==3||(_=v+d),ie!==f||s!==0&&ie.nodeType!==3||(M=v+s),ie.nodeType===3&&(v+=ie.nodeValue.length),(Y=ie.firstChild)!==null;)$=ie,ie=Y;for(;;){if(ie===e)break t;if($===a&&++P===d&&(_=v),$===f&&++J===s&&(M=v),(Y=ie.nextSibling)!==null)break;ie=$,$=ie.parentNode}ie=Y}a=_===-1||M===-1?null:{start:_,end:M}}else a=null}a=a||{start:0,end:0}}else a=null;for(Qu={focusedElem:e,selectionRange:a},So=!1,Gt=n;Gt!==null;)if(n=Gt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Gt=e;else for(;Gt!==null;){switch(n=Gt,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(a=0;a<e.length;a++)d=e[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=n,d=f.memoizedProps,f=f.memoizedState,s=a.stateNode;try{var Ee=Ir(a.type,d);e=s.getSnapshotBeforeUpdate(Ee,f),s.__reactInternalSnapshotBeforeUpdate=e}catch(Oe){st(a,a.return,Oe)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)ed(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ed(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(l(163))}if(e=n.sibling,e!==null){e.return=n.return,Gt=e;break}Gt=n.return}}function Jp(e,n,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:Ni(e,a),s&4&&_l(5,a);break;case 1:if(Ni(e,a),s&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(v){st(a,a.return,v)}else{var d=Ir(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(d,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){st(a,a.return,v)}}s&64&&qp(a),s&512&&Sl(a,a.return);break;case 3:if(Ni(e,a),s&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Uh(e,n)}catch(v){st(a,a.return,v)}}break;case 27:n===null&&s&4&&Zp(a);case 26:case 5:Ni(e,a),n===null&&s&4&&Yp(a),s&512&&Sl(a,a.return);break;case 12:Ni(e,a);break;case 31:Ni(e,a),s&4&&tm(e,a);break;case 13:Ni(e,a),s&4&&nm(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=wE.bind(null,a),qE(e,a))));break;case 22:if(s=a.memoizedState!==null||Si,!s){n=n!==null&&n.memoizedState!==null||Ht,d=Si;var f=Ht;Si=s,(Ht=n)&&!f?wi(e,a,(a.subtreeFlags&8772)!==0):Ni(e,a),Si=d,Ht=f}break;case 30:break;default:Ni(e,a)}}function Wp(e){var n=e.alternate;n!==null&&(e.alternate=null,Wp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Va(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 St=null,hn=!1;function ki(e,n,a){for(a=a.child;a!==null;)em(e,n,a),a=a.sibling}function em(e,n,a){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount($t,a)}catch{}switch(a.tag){case 26:Ht||ni(a,n),ki(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ht||ni(a,n);var s=St,d=hn;nr(a.type)&&(St=a.stateNode,hn=!1),ki(e,n,a),Rl(a.stateNode),St=s,hn=d;break;case 5:Ht||ni(a,n);case 6:if(s=St,d=hn,St=null,ki(e,n,a),St=s,hn=d,St!==null)if(hn)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(a.stateNode)}catch(f){st(a,n,f)}else try{St.removeChild(a.stateNode)}catch(f){st(a,n,f)}break;case 18:St!==null&&(hn?(e=St,qm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ta(e)):qm(St,a.stateNode));break;case 4:s=St,d=hn,St=a.stateNode.containerInfo,hn=!0,ki(e,n,a),St=s,hn=d;break;case 0:case 11:case 14:case 15:Xi(2,a,n),Ht||Xi(4,a,n),ki(e,n,a);break;case 1:Ht||(ni(a,n),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Vp(a,n,s)),ki(e,n,a);break;case 21:ki(e,n,a);break;case 22:Ht=(s=Ht)||a.memoizedState!==null,ki(e,n,a),Ht=s;break;default:ki(e,n,a)}}function tm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ta(e)}catch(a){st(n,n.return,a)}}}function nm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ta(e)}catch(a){st(n,n.return,a)}}function yE(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Qp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Qp),n;default:throw Error(l(435,e.tag))}}function no(e,n){var a=yE(e);n.forEach(function(s){if(!a.has(s)){a.add(s);var d=TE.bind(null,e,s);s.then(d,d)}})}function pn(e,n){var a=n.deletions;if(a!==null)for(var s=0;s<a.length;s++){var d=a[s],f=e,v=n,_=v;e:for(;_!==null;){switch(_.tag){case 27:if(nr(_.type)){St=_.stateNode,hn=!1;break e}break;case 5:St=_.stateNode,hn=!1;break e;case 3:case 4:St=_.stateNode.containerInfo,hn=!0;break e}_=_.return}if(St===null)throw Error(l(160));em(f,v,d),St=null,hn=!1,f=d.alternate,f!==null&&(f.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)im(n,e),n=n.sibling}var Vn=null;function im(e,n){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pn(n,e),mn(e),s&4&&(Xi(3,e,e.return),_l(3,e),Xi(5,e,e.return));break;case 1:pn(n,e),mn(e),s&512&&(Ht||a===null||ni(a,a.return)),s&64&&Si&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var d=Vn;if(pn(n,e),mn(e),s&512&&(Ht||a===null||ni(a,a.return)),s&4){var f=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,d=d.ownerDocument||d;t:switch(s){case"title":f=d.getElementsByTagName("title")[0],(!f||f[yr]||f[Mt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=d.createElement(s),d.head.insertBefore(f,d.querySelector("head > title"))),Xt(f,s,a),f[Mt]=e,Lt(f),s=f;break e;case"link":var v=ig("link","href",d).get(s+(a.href||""));if(v){for(var _=0;_<v.length;_++)if(f=v[_],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(_,1);break t}}f=d.createElement(s),Xt(f,s,a),d.head.appendChild(f);break;case"meta":if(v=ig("meta","content",d).get(s+(a.content||""))){for(_=0;_<v.length;_++)if(f=v[_],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(_,1);break t}}f=d.createElement(s),Xt(f,s,a),d.head.appendChild(f);break;default:throw Error(l(468,s))}f[Mt]=e,Lt(f),s=f}e.stateNode=s}else rg(d,e.type,e.stateNode);else e.stateNode=ng(d,s,e.memoizedProps);else f!==s?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,s===null?rg(d,e.type,e.stateNode):ng(d,s,e.memoizedProps)):s===null&&e.stateNode!==null&&wu(e,e.memoizedProps,a.memoizedProps)}break;case 27:pn(n,e),mn(e),s&512&&(Ht||a===null||ni(a,a.return)),a!==null&&s&4&&wu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(pn(n,e),mn(e),s&512&&(Ht||a===null||ni(a,a.return)),e.flags&32){d=e.stateNode;try{Me(d,"")}catch(Ee){st(e,e.return,Ee)}}s&4&&e.stateNode!=null&&(d=e.memoizedProps,wu(e,d,a!==null?a.memoizedProps:d)),s&1024&&(Cu=!0);break;case 6:if(pn(n,e),mn(e),s&4){if(e.stateNode===null)throw Error(l(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(Ee){st(e,e.return,Ee)}}break;case 3:if(vo=null,d=Vn,Vn=bo(n.containerInfo),pn(n,e),Vn=d,mn(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{Ta(n.containerInfo)}catch(Ee){st(e,e.return,Ee)}Cu&&(Cu=!1,rm(e));break;case 4:s=Vn,Vn=bo(e.stateNode.containerInfo),pn(n,e),mn(e),Vn=s;break;case 12:pn(n,e),mn(e);break;case 31:pn(n,e),mn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,no(e,s)));break;case 13:pn(n,e),mn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ro=kt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,no(e,s)));break;case 22:d=e.memoizedState!==null;var M=a!==null&&a.memoizedState!==null,P=Si,J=Ht;if(Si=P||d,Ht=J||M,pn(n,e),Ht=J,Si=P,mn(e),s&8192)e:for(n=e.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(a===null||M||Si||Ht||Lr(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){M=a=n;try{if(f=M.stateNode,d)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{_=M.stateNode;var ie=M.memoizedProps.style,$=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;_.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(Ee){st(M,M.return,Ee)}}}else if(n.tag===6){if(a===null){M=n;try{M.stateNode.nodeValue=d?"":M.memoizedProps}catch(Ee){st(M,M.return,Ee)}}}else if(n.tag===18){if(a===null){M=n;try{var Y=M.stateNode;d?Vm(Y,!0):Vm(M.stateNode,!1)}catch(Ee){st(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;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,no(e,a))));break;case 19:pn(n,e),mn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,no(e,s)));break;case 30:break;case 21:break;default:pn(n,e),mn(e)}}function mn(e){var n=e.flags;if(n&2){try{for(var a,s=e.return;s!==null;){if(Xp(s)){a=s;break}s=s.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var d=a.stateNode,f=Tu(e);to(e,f,d);break;case 5:var v=a.stateNode;a.flags&32&&(Me(v,""),a.flags&=-33);var _=Tu(e);to(e,_,v);break;case 3:case 4:var M=a.stateNode.containerInfo,P=Tu(e);Au(e,P,M);break;default:throw Error(l(161))}}catch(J){st(e,e.return,J)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function rm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;rm(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Ni(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Jp(e,n.alternate,n),n=n.sibling}function Lr(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Xi(4,n,n.return),Lr(n);break;case 1:ni(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&Vp(n,n.return,a),Lr(n);break;case 27:Rl(n.stateNode);case 26:case 5:ni(n,n.return),Lr(n);break;case 22:n.memoizedState===null&&Lr(n);break;case 30:Lr(n);break;default:Lr(n)}e=e.sibling}}function wi(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,d=e,f=n,v=f.flags;switch(f.tag){case 0:case 11:case 15:wi(d,f,a),_l(4,f);break;case 1:if(wi(d,f,a),s=f,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(P){st(s,s.return,P)}if(s=f,d=s.updateQueue,d!==null){var _=s.stateNode;try{var M=d.shared.hiddenCallbacks;if(M!==null)for(d.shared.hiddenCallbacks=null,d=0;d<M.length;d++)Lh(M[d],_)}catch(P){st(s,s.return,P)}}a&&v&64&&qp(f),Sl(f,f.return);break;case 27:Zp(f);case 26:case 5:wi(d,f,a),a&&s===null&&v&4&&Yp(f),Sl(f,f.return);break;case 12:wi(d,f,a);break;case 31:wi(d,f,a),a&&v&4&&tm(d,f);break;case 13:wi(d,f,a),a&&v&4&&nm(d,f);break;case 22:f.memoizedState===null&&wi(d,f,a),Sl(f,f.return);break;case 30:break;default:wi(d,f,a)}n=n.sibling}}function Ou(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&cl(a))}function Mu(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&cl(e))}function Yn(e,n,a,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)am(e,n,a,s),n=n.sibling}function am(e,n,a,s){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Yn(e,n,a,s),d&2048&&_l(9,n);break;case 1:Yn(e,n,a,s);break;case 3:Yn(e,n,a,s),d&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&cl(e)));break;case 12:if(d&2048){Yn(e,n,a,s),e=n.stateNode;try{var f=n.memoizedProps,v=f.id,_=f.onPostCommit;typeof _=="function"&&_(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(M){st(n,n.return,M)}}else Yn(e,n,a,s);break;case 31:Yn(e,n,a,s);break;case 13:Yn(e,n,a,s);break;case 23:break;case 22:f=n.stateNode,v=n.alternate,n.memoizedState!==null?f._visibility&2?Yn(e,n,a,s):kl(e,n):f._visibility&2?Yn(e,n,a,s):(f._visibility|=2,ga(e,n,a,s,(n.subtreeFlags&10256)!==0||!1)),d&2048&&Ou(v,n);break;case 24:Yn(e,n,a,s),d&2048&&Mu(n.alternate,n);break;default:Yn(e,n,a,s)}}function ga(e,n,a,s,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var f=e,v=n,_=a,M=s,P=v.flags;switch(v.tag){case 0:case 11:case 15:ga(f,v,_,M,d),_l(8,v);break;case 23:break;case 22:var J=v.stateNode;v.memoizedState!==null?J._visibility&2?ga(f,v,_,M,d):kl(f,v):(J._visibility|=2,ga(f,v,_,M,d)),d&&P&2048&&Ou(v.alternate,v);break;case 24:ga(f,v,_,M,d),d&&P&2048&&Mu(v.alternate,v);break;default:ga(f,v,_,M,d)}n=n.sibling}}function kl(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,s=n,d=s.flags;switch(s.tag){case 22:kl(a,s),d&2048&&Ou(s.alternate,s);break;case 24:kl(a,s),d&2048&&Mu(s.alternate,s);break;default:kl(a,s)}n=n.sibling}}var Nl=8192;function ba(e,n,a){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)lm(e,n,a),e=e.sibling}function lm(e,n,a){switch(e.tag){case 26:ba(e,n,a),e.flags&Nl&&e.memoizedState!==null&&r0(a,Vn,e.memoizedState,e.memoizedProps);break;case 5:ba(e,n,a);break;case 3:case 4:var s=Vn;Vn=bo(e.stateNode.containerInfo),ba(e,n,a),Vn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Nl,Nl=16777216,ba(e,n,a),Nl=s):ba(e,n,a));break;default:ba(e,n,a)}}function sm(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 wl(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];Gt=s,cm(s,e)}sm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)om(e),e=e.sibling}function om(e){switch(e.tag){case 0:case 11:case 15:wl(e),e.flags&2048&&Xi(9,e,e.return);break;case 3:wl(e);break;case 12:wl(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,io(e)):wl(e);break;default:wl(e)}}function io(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];Gt=s,cm(s,e)}sm(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Xi(8,n,n.return),io(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,io(n));break;default:io(n)}e=e.sibling}}function cm(e,n){for(;Gt!==null;){var a=Gt;switch(a.tag){case 0:case 11:case 15:Xi(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:cl(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,Gt=s;else e:for(a=e;Gt!==null;){s=Gt;var d=s.sibling,f=s.return;if(Wp(s),s===a){Gt=null;break e}if(d!==null){d.return=f,Gt=d;break e}Gt=f}}}var vE={getCacheForType:function(e){var n=Vt(Bt),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return Vt(Bt).controller.signal}},xE=typeof WeakMap=="function"?WeakMap:Map,et=0,ht=null,Pe=null,qe=0,lt=0,Tn=null,Zi=!1,ya=!1,Ru=!1,Ti=0,Ct=0,Qi=0,Ur=0,Du=0,An=0,va=0,Tl=null,gn=null,Iu=!1,ro=0,um=0,ao=1/0,lo=null,Ji=null,Pt=0,Wi=null,xa=null,Ai=0,Lu=0,Uu=null,dm=null,Al=0,Bu=null;function Cn(){return(et&2)!==0&&qe!==0?qe&-qe:D.T!==null?Gu():qr()}function fm(){if(An===0)if((qe&536870912)===0||Xe){var e=Kr;Kr<<=1,(Kr&3932160)===0&&(Kr=262144),An=e}else An=536870912;return e=Nn.current,e!==null&&(e.flags|=32),An}function bn(e,n,a){(e===ht&&(lt===2||lt===9)||e.cancelPendingCommit!==null)&&(Ea(e,0),er(e,qe,An,!1)),ft(e,a),((et&2)===0||e!==ht)&&(e===ht&&((et&2)===0&&(Ur|=a),Ct===4&&er(e,qe,An,!1)),ii(e))}function hm(e,n,a){if((et&6)!==0)throw Error(l(327));var s=!a&&(n&127)===0&&(n&e.expiredLanes)===0||te(e,n),d=s?SE(e,n):ju(e,n,!0),f=s;do{if(d===0){ya&&!s&&er(e,n,0,!1);break}else{if(a=e.current.alternate,f&&!EE(a)){d=ju(e,n,!1),f=!1;continue}if(d===2){if(f=n,e.errorRecoveryDisabledLanes&f)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var _=e;d=Tl;var M=_.current.memoizedState.isDehydrated;if(M&&(Ea(_,v).flags|=256),v=ju(_,v,!1),v!==2){if(Ru&&!M){_.errorRecoveryDisabledLanes|=f,Ur|=f,d=4;break e}f=gn,gn=d,f!==null&&(gn===null?gn=f:gn.push.apply(gn,f))}d=v}if(f=!1,d!==2)continue}}if(d===1){Ea(e,0),er(e,n,0,!0);break}e:{switch(s=e,f=d,f){case 0:case 1:throw Error(l(345));case 4:if((n&4194048)!==n)break;case 6:er(s,n,An,!Zi);break e;case 2:gn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((n&62914560)===n&&(d=ro+300-kt(),10<d)){if(er(s,n,An,!Zi),R(s,0,!0)!==0)break e;Ai=n,s.timeoutHandle=$m(pm.bind(null,s,a,gn,lo,Iu,n,An,Ur,va,Zi,f,"Throttled",-0,0),d);break e}pm(s,a,gn,lo,Iu,n,An,Ur,va,Zi,f,null,-0,0)}}break}while(!0);ii(e)}function pm(e,n,a,s,d,f,v,_,M,P,J,ie,$,Y){if(e.timeoutHandle=-1,ie=n.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:he},lm(n,f,ie);var Ee=(f&62914560)===f?ro-kt():(f&4194048)===f?um-kt():0;if(Ee=a0(ie,Ee),Ee!==null){Ai=f,e.cancelPendingCommit=Ee(_m.bind(null,e,n,f,a,s,d,v,_,M,J,ie,null,$,Y)),er(e,f,v,!P);return}}_m(e,n,f,a,s,d,v,_,M)}function EE(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var d=a[s],f=d.getSnapshot;d=d.value;try{if(!Sn(f(),d))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;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 er(e,n,a,s){n&=~Du,n&=~Ur,e.suspendedLanes|=n,e.pingedLanes&=~n,s&&(e.warmLanes|=n),s=e.expirationTimes;for(var d=n;0<d;){var f=31-it(d),v=1<<f;s[f]=-1,d&=~v}a!==0&&xe(e,a,n)}function so(){return(et&6)===0?(Cl(0),!1):!0}function zu(){if(Pe!==null){if(lt===0)var e=Pe.return;else e=Pe,bi=Tr=null,eu(e),da=null,dl=0,e=Pe;for(;e!==null;)Kp(e.alternate,e),e=e.return;Pe=null}}function Ea(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,FE(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ai=0,zu(),ht=e,Pe=a=mi(e.current,null),qe=n,lt=0,Tn=null,Zi=!1,ya=te(e,n),Ru=!1,va=An=Du=Ur=Qi=Ct=0,gn=Tl=null,Iu=!1,(n&8)!==0&&(n|=n&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=n;0<s;){var d=31-it(s),f=1<<d;n|=e[d],s&=~f}return Ti=n,As(),a}function mm(e,n){Be=null,D.H=vl,n===ua||n===Us?(n=Mh(),lt=3):n===Pc?(n=Mh(),lt=4):lt=n===gu?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Tn=n,Pe===null&&(Ct=1,Zs(e,Ln(n,e.current)))}function gm(){var e=Nn.current;return e===null?!0:(qe&4194048)===qe?jn===null:(qe&62914560)===qe||(qe&536870912)!==0?e===jn:!1}function bm(){var e=D.H;return D.H=vl,e===null?vl:e}function ym(){var e=D.A;return D.A=vE,e}function oo(){Ct=4,Zi||(qe&4194048)!==qe&&Nn.current!==null||(ya=!0),(Qi&134217727)===0&&(Ur&134217727)===0||ht===null||er(ht,qe,An,!1)}function ju(e,n,a){var s=et;et|=2;var d=bm(),f=ym();(ht!==e||qe!==n)&&(lo=null,Ea(e,n)),n=!1;var v=Ct;e:do try{if(lt!==0&&Pe!==null){var _=Pe,M=Tn;switch(lt){case 8:zu(),v=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(n=!0);var P=lt;if(lt=0,Tn=null,_a(e,_,M,P),a&&ya){v=0;break e}break;default:P=lt,lt=0,Tn=null,_a(e,_,M,P)}}_E(),v=Ct;break}catch(J){mm(e,J)}while(!0);return n&&e.shellSuspendCounter++,bi=Tr=null,et=s,D.H=d,D.A=f,Pe===null&&(ht=null,qe=0,As()),v}function _E(){for(;Pe!==null;)vm(Pe)}function SE(e,n){var a=et;et|=2;var s=bm(),d=ym();ht!==e||qe!==n?(lo=null,ao=kt()+500,Ea(e,n)):ya=te(e,n);e:do try{if(lt!==0&&Pe!==null){n=Pe;var f=Tn;t:switch(lt){case 1:lt=0,Tn=null,_a(e,n,f,1);break;case 2:case 9:if(Ch(f)){lt=0,Tn=null,xm(n);break}n=function(){lt!==2&&lt!==9||ht!==e||(lt=7),ii(e)},f.then(n,n);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:Ch(f)?(lt=0,Tn=null,xm(n)):(lt=0,Tn=null,_a(e,n,f,7));break;case 5:var v=null;switch(Pe.tag){case 26:v=Pe.memoizedState;case 5:case 27:var _=Pe;if(v?ag(v):_.stateNode.complete){lt=0,Tn=null;var M=_.sibling;if(M!==null)Pe=M;else{var P=_.return;P!==null?(Pe=P,co(P)):Pe=null}break t}}lt=0,Tn=null,_a(e,n,f,5);break;case 6:lt=0,Tn=null,_a(e,n,f,6);break;case 8:zu(),Ct=6;break e;default:throw Error(l(462))}}kE();break}catch(J){mm(e,J)}while(!0);return bi=Tr=null,D.H=s,D.A=d,et=a,Pe!==null?0:(ht=null,qe=0,As(),Ct)}function kE(){for(;Pe!==null&&!Ka();)vm(Pe)}function vm(e){var n=Gp(e.alternate,e,Ti);e.memoizedProps=e.pendingProps,n===null?co(e):Pe=n}function xm(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Bp(a,n,n.pendingProps,n.type,void 0,qe);break;case 11:n=Bp(a,n,n.pendingProps,n.type.render,n.ref,qe);break;case 5:eu(n);default:Kp(a,n),n=Pe=yh(n,Ti),n=Gp(a,n,Ti)}e.memoizedProps=e.pendingProps,n===null?co(e):Pe=n}function _a(e,n,a,s){bi=Tr=null,eu(n),da=null,dl=0;var d=n.return;try{if(fE(e,d,n,a,qe)){Ct=1,Zs(e,Ln(a,e.current)),Pe=null;return}}catch(f){if(d!==null)throw Pe=d,f;Ct=1,Zs(e,Ln(a,e.current)),Pe=null;return}n.flags&32768?(Xe||s===1?e=!0:ya||(qe&536870912)!==0?e=!1:(Zi=e=!0,(s===2||s===9||s===3||s===6)&&(s=Nn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Em(n,e)):co(n)}function co(e){var n=e;do{if((n.flags&32768)!==0){Em(n,Zi);return}e=n.return;var a=mE(n.alternate,n,Ti);if(a!==null){Pe=a;return}if(n=n.sibling,n!==null){Pe=n;return}Pe=n=e}while(n!==null);Ct===0&&(Ct=5)}function Em(e,n){do{var a=gE(e.alternate,e);if(a!==null){a.flags&=32767,Pe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Pe=e;return}Pe=e=a}while(e!==null);Ct=6,Pe=null}function _m(e,n,a,s,d,f,v,_,M){e.cancelPendingCommit=null;do uo();while(Pt!==0);if((et&6)!==0)throw Error(l(327));if(n!==null){if(n===e.current)throw Error(l(177));if(f=n.lanes|n.childLanes,f|=Tc,_e(e,a,f,v,_,M),e===ht&&(Pe=ht=null,qe=0),xa=n,Wi=e,Ai=a,Lu=f,Uu=d,dm=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,AE(Ce,function(){return Tm(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=D.T,D.T=null,d=W.p,W.p=2,v=et,et|=4;try{bE(e,n,a)}finally{et=v,W.p=d,D.T=s}}Pt=1,Sm(),km(),Nm()}}function Sm(){if(Pt===1){Pt=0;var e=Wi,n=xa,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var s=W.p;W.p=2;var d=et;et|=4;try{im(n,e);var f=Qu,v=ch(e.containerInfo),_=f.focusedElem,M=f.selectionRange;if(v!==_&&_&&_.ownerDocument&&oh(_.ownerDocument.documentElement,_)){if(M!==null&&_c(_)){var P=M.start,J=M.end;if(J===void 0&&(J=P),"selectionStart"in _)_.selectionStart=P,_.selectionEnd=Math.min(J,_.value.length);else{var ie=_.ownerDocument||document,$=ie&&ie.defaultView||window;if($.getSelection){var Y=$.getSelection(),Ee=_.textContent.length,Oe=Math.min(M.start,Ee),ut=M.end===void 0?Oe:Math.min(M.end,Ee);!Y.extend&&Oe>ut&&(v=ut,ut=Oe,Oe=v);var z=sh(_,Oe),L=sh(_,ut);if(z&&L&&(Y.rangeCount!==1||Y.anchorNode!==z.node||Y.anchorOffset!==z.offset||Y.focusNode!==L.node||Y.focusOffset!==L.offset)){var F=ie.createRange();F.setStart(z.node,z.offset),Y.removeAllRanges(),Oe>ut?(Y.addRange(F),Y.extend(L.node,L.offset)):(F.setEnd(L.node,L.offset),Y.addRange(F))}}}}for(ie=[],Y=_;Y=Y.parentNode;)Y.nodeType===1&&ie.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ie.length;_++){var ne=ie[_];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}So=!!Zu,Qu=Zu=null}finally{et=d,W.p=s,D.T=a}}e.current=n,Pt=2}}function km(){if(Pt===2){Pt=0;var e=Wi,n=xa,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var s=W.p;W.p=2;var d=et;et|=4;try{Jp(e,n.alternate,n)}finally{et=d,W.p=s,D.T=a}}Pt=3}}function Nm(){if(Pt===4||Pt===3){Pt=0,Gr();var e=Wi,n=xa,a=Ai,s=dm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Pt=5:(Pt=0,xa=Wi=null,wm(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Ji=null),ui(a),n=n.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot($t,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=D.T,d=W.p,W.p=2,D.T=null;try{for(var f=e.onRecoverableError,v=0;v<s.length;v++){var _=s[v];f(_.value,{componentStack:_.stack})}}finally{D.T=n,W.p=d}}(Ai&3)!==0&&uo(),ii(e),d=e.pendingLanes,(a&261930)!==0&&(d&42)!==0?e===Bu?Al++:(Al=0,Bu=e):Al=0,Cl(0)}}function wm(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,cl(n)))}function uo(){return Sm(),km(),Nm(),Tm()}function Tm(){if(Pt!==5)return!1;var e=Wi,n=Lu;Lu=0;var a=ui(Ai),s=D.T,d=W.p;try{W.p=32>a?32:a,D.T=null,a=Uu,Uu=null;var f=Wi,v=Ai;if(Pt=0,xa=Wi=null,Ai=0,(et&6)!==0)throw Error(l(331));var _=et;if(et|=4,om(f.current),am(f,f.current,v,a),et=_,Cl(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot($t,f)}catch{}return!0}finally{W.p=d,D.T=s,wm(e,n)}}function Am(e,n,a){n=Ln(a,n),n=mu(e.stateNode,n,2),e=qi(e,n,2),e!==null&&(ft(e,2),ii(e))}function st(e,n,a){if(e.tag===3)Am(e,e,a);else for(;n!==null;){if(n.tag===3){Am(n,e,a);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ji===null||!Ji.has(s))){e=Ln(a,e),a=Cp(2),s=qi(n,a,2),s!==null&&(Op(a,s,n,e),ft(s,2),ii(s));break}}n=n.return}}function Hu(e,n,a){var s=e.pingCache;if(s===null){s=e.pingCache=new xE;var d=new Set;s.set(n,d)}else d=s.get(n),d===void 0&&(d=new Set,s.set(n,d));d.has(a)||(Ru=!0,d.add(a),e=NE.bind(null,e,n,a),n.then(e,e))}function NE(e,n,a){var s=e.pingCache;s!==null&&s.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ht===e&&(qe&a)===a&&(Ct===4||Ct===3&&(qe&62914560)===qe&&300>kt()-ro?(et&2)===0&&Ea(e,0):Du|=a,va===qe&&(va=0)),ii(e)}function Cm(e,n){n===0&&(n=Ie()),e=kr(e,n),e!==null&&(ft(e,n),ii(e))}function wE(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Cm(e,a)}function TE(e,n){var a=0;switch(e.tag){case 31:case 13:var s=e.stateNode,d=e.memoizedState;d!==null&&(a=d.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(n),Cm(e,a)}function AE(e,n){return ci(e,n)}var fo=null,Sa=null,Fu=!1,ho=!1,Pu=!1,tr=0;function ii(e){e!==Sa&&e.next===null&&(Sa===null?fo=Sa=e:Sa=Sa.next=e),ho=!0,Fu||(Fu=!0,OE())}function Cl(e,n){if(!Pu&&ho){Pu=!0;do for(var a=!1,s=fo;s!==null;){if(e!==0){var d=s.pendingLanes;if(d===0)var f=0;else{var v=s.suspendedLanes,_=s.pingedLanes;f=(1<<31-it(42|e)+1)-1,f&=d&~(v&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Dm(s,f))}else f=qe,f=R(s,s===ht?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||te(s,f)||(a=!0,Dm(s,f));s=s.next}while(a);Pu=!1}}function CE(){Om()}function Om(){ho=Fu=!1;var e=0;tr!==0&&HE()&&(e=tr);for(var n=kt(),a=null,s=fo;s!==null;){var d=s.next,f=Mm(s,n);f===0?(s.next=null,a===null?fo=d:a.next=d,d===null&&(Sa=a)):(a=s,(e!==0||(f&3)!==0)&&(ho=!0)),s=d}Pt!==0&&Pt!==5||Cl(e),tr!==0&&(tr=0)}function Mm(e,n){for(var a=e.suspendedLanes,s=e.pingedLanes,d=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-it(f),_=1<<v,M=d[v];M===-1?((_&a)===0||(_&s)!==0)&&(d[v]=ge(_,n)):M<=n&&(e.expiredLanes|=_),f&=~_}if(n=ht,a=qe,a=R(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===n&&(lt===2||lt===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&mr(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||te(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(s!==null&&mr(s),ui(a)){case 2:case 8:a=de;break;case 32:a=Ce;break;case 268435456:a=Qe;break;default:a=Ce}return s=Rm.bind(null,e),a=ci(a,s),e.callbackPriority=n,e.callbackNode=a,n}return s!==null&&s!==null&&mr(s),e.callbackPriority=2,e.callbackNode=null,2}function Rm(e,n){if(Pt!==0&&Pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(uo()&&e.callbackNode!==a)return null;var s=qe;return s=R(e,e===ht?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(hm(e,s,n),Mm(e,kt()),e.callbackNode!=null&&e.callbackNode===a?Rm.bind(null,e):null)}function Dm(e,n){if(uo())return null;hm(e,n,!0)}function OE(){PE(function(){(et&6)!==0?ci(Q,CE):Om()})}function Gu(){if(tr===0){var e=oa;e===0&&(e=gr,gr<<=1,(gr&261888)===0&&(gr=256)),tr=e}return tr}function Im(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:zi(""+e)}function Lm(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function ME(e,n,a,s,d){if(n==="submit"&&a&&a.stateNode===d){var f=Im((d[Qt]||null).action),v=s.submitter;v&&(n=(n=v[Qt]||null)?Im(n.formAction):v.getAttribute("formAction"),n!==null&&(f=n,v=null));var _=new ks("action","action",null,s,d);e.push({event:_,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(tr!==0){var M=v?Lm(d,v):new FormData(d);cu(a,{pending:!0,data:M,method:d.method,action:f},null,M)}}else typeof f=="function"&&(_.preventDefault(),M=v?Lm(d,v):new FormData(d),cu(a,{pending:!0,data:M,method:d.method,action:f},f,M))},currentTarget:d}]})}}for(var $u=0;$u<wc.length;$u++){var Ku=wc[$u],RE=Ku.toLowerCase(),DE=Ku[0].toUpperCase()+Ku.slice(1);qn(RE,"on"+DE)}qn(fh,"onAnimationEnd"),qn(hh,"onAnimationIteration"),qn(ph,"onAnimationStart"),qn("dblclick","onDoubleClick"),qn("focusin","onFocus"),qn("focusout","onBlur"),qn(Xx,"onTransitionRun"),qn(Zx,"onTransitionStart"),qn(Qx,"onTransitionCancel"),qn(mh,"onTransitionEnd"),se("onMouseEnter",["mouseout","mouseover"]),se("onMouseLeave",["mouseout","mouseover"]),se("onPointerEnter",["pointerout","pointerover"]),se("onPointerLeave",["pointerout","pointerover"]),fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fi("onBeforeInput",["compositionend","keypress","textInput","paste"]),fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ol="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(" "),IE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ol));function Um(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],d=s.event;s=s.listeners;e:{var f=void 0;if(n)for(var v=s.length-1;0<=v;v--){var _=s[v],M=_.instance,P=_.currentTarget;if(_=_.listener,M!==f&&d.isPropagationStopped())break e;f=_,d.currentTarget=P;try{f(d)}catch(J){Ts(J)}d.currentTarget=null,f=M}else for(v=0;v<s.length;v++){if(_=s[v],M=_.instance,P=_.currentTarget,_=_.listener,M!==f&&d.isPropagationStopped())break e;f=_,d.currentTarget=P;try{f(d)}catch(J){Ts(J)}d.currentTarget=null,f=M}}}}function Ge(e,n){var a=n[qa];a===void 0&&(a=n[qa]=new Set);var s=e+"__bubble";a.has(s)||(Bm(n,e,2,!1),a.add(s))}function qu(e,n,a){var s=0;n&&(s|=4),Bm(a,e,s,n)}var po="_reactListening"+Math.random().toString(36).slice(2);function Vu(e){if(!e[po]){e[po]=!0,gs.forEach(function(a){a!=="selectionchange"&&(IE.has(a)||qu(a,!1,e),qu(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[po]||(n[po]=!0,qu("selectionchange",!1,n))}}function Bm(e,n,a,s){switch(fg(n)){case 2:var d=o0;break;case 8:d=c0;break;default:d=od}a=d.bind(null,n,a,e),d=void 0,!hc||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),s?d!==void 0?e.addEventListener(n,a,{capture:!0,passive:d}):e.addEventListener(n,a,!0):d!==void 0?e.addEventListener(n,a,{passive:d}):e.addEventListener(n,a,!1)}function Yu(e,n,a,s,d){var f=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var _=s.stateNode.containerInfo;if(_===d)break;if(v===4)for(v=s.return;v!==null;){var M=v.tag;if((M===3||M===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;_!==null;){if(v=an(_),v===null)return;if(M=v.tag,M===5||M===6||M===26||M===27){s=f=v;continue e}_=_.parentNode}}s=s.return}xs(function(){var P=f,J=Ue(a),ie=[];e:{var $=gh.get(e);if($!==void 0){var Y=ks,Ee=e;switch(e){case"keypress":if(_s(a)===0)break e;case"keydown":case"keyup":Y=Tx;break;case"focusin":Ee="focus",Y=bc;break;case"focusout":Ee="blur",Y=bc;break;case"beforeblur":case"afterblur":Y=bc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=Kf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=mx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=Ox;break;case fh:case hh:case ph:Y=yx;break;case mh:Y=Rx;break;case"scroll":case"scrollend":Y=hx;break;case"wheel":Y=Ix;break;case"copy":case"cut":case"paste":Y=xx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Vf;break;case"toggle":case"beforetoggle":Y=Ux}var Oe=(n&4)!==0,ut=!Oe&&(e==="scroll"||e==="scrollend"),z=Oe?$!==null?$+"Capture":null:$;Oe=[];for(var L=P,F;L!==null;){var ne=L;if(F=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||F===null||z===null||(ne=Ja(L,z),ne!=null&&Oe.push(Ml(L,ne,F))),ut)break;L=L.return}0<Oe.length&&($=new Y($,Ee,null,a,J),ie.push({event:$,listeners:Oe}))}}if((n&7)===0){e:{if($=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",$&&a!==Se&&(Ee=a.relatedTarget||a.fromElement)&&(an(Ee)||Ee[Ii]))break e;if((Y||$)&&($=J.window===J?J:($=J.ownerDocument)?$.defaultView||$.parentWindow:window,Y?(Ee=a.relatedTarget||a.toElement,Y=P,Ee=Ee?an(Ee):null,Ee!==null&&(ut=c(Ee),Oe=Ee.tag,Ee!==ut||Oe!==5&&Oe!==27&&Oe!==6)&&(Ee=null)):(Y=null,Ee=P),Y!==Ee)){if(Oe=Kf,ne="onMouseLeave",z="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(Oe=Vf,ne="onPointerLeave",z="onPointerEnter",L="pointer"),ut=Y==null?$:Li(Y),F=Ee==null?$:Li(Ee),$=new Oe(ne,L+"leave",Y,a,J),$.target=ut,$.relatedTarget=F,ne=null,an(J)===P&&(Oe=new Oe(z,L+"enter",Ee,a,J),Oe.target=F,Oe.relatedTarget=ut,ne=Oe),ut=ne,Y&&Ee)t:{for(Oe=LE,z=Y,L=Ee,F=0,ne=z;ne;ne=Oe(ne))F++;ne=0;for(var Te=L;Te;Te=Oe(Te))ne++;for(;0<F-ne;)z=Oe(z),F--;for(;0<ne-F;)L=Oe(L),ne--;for(;F--;){if(z===L||L!==null&&z===L.alternate){Oe=z;break t}z=Oe(z),L=Oe(L)}Oe=null}else Oe=null;Y!==null&&zm(ie,$,Y,Oe,!1),Ee!==null&&ut!==null&&zm(ie,ut,Ee,Oe,!0)}}e:{if($=P?Li(P):window,Y=$.nodeName&&$.nodeName.toLowerCase(),Y==="select"||Y==="input"&&$.type==="file")var Je=th;else if(Wf($))if(nh)Je=qx;else{Je=$x;var ke=Gx}else Y=$.nodeName,!Y||Y.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?P&&Bi(P.elementType)&&(Je=th):Je=Kx;if(Je&&(Je=Je(e,P))){eh(ie,Je,a,J);break e}ke&&ke(e,$,P),e==="focusout"&&P&&$.type==="number"&&P.memoizedProps.value!=null&&Qr($,"number",$.value)}switch(ke=P?Li(P):window,e){case"focusin":(Wf(ke)||ke.contentEditable==="true")&&(ea=ke,Sc=P,ll=null);break;case"focusout":ll=Sc=ea=null;break;case"mousedown":kc=!0;break;case"contextmenu":case"mouseup":case"dragend":kc=!1,uh(ie,a,J);break;case"selectionchange":if(Yx)break;case"keydown":case"keyup":uh(ie,a,J)}var ze;if(vc)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Wr?Qf(e,a)&&(Ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ve="onCompositionStart");Ve&&(Yf&&a.locale!=="ko"&&(Wr||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Wr&&(ze=Gf()):(ji=J,pc="value"in ji?ji.value:ji.textContent,Wr=!0)),ke=mo(P,Ve),0<ke.length&&(Ve=new qf(Ve,e,null,a,J),ie.push({event:Ve,listeners:ke}),ze?Ve.data=ze:(ze=Jf(a),ze!==null&&(Ve.data=ze)))),(ze=zx?jx(e,a):Hx(e,a))&&(Ve=mo(P,"onBeforeInput"),0<Ve.length&&(ke=new qf("onBeforeInput","beforeinput",null,a,J),ie.push({event:ke,listeners:Ve}),ke.data=ze)),ME(ie,e,P,a,J)}Um(ie,n)})}function Ml(e,n,a){return{instance:e,listener:n,currentTarget:a}}function mo(e,n){for(var a=n+"Capture",s=[];e!==null;){var d=e,f=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||f===null||(d=Ja(e,a),d!=null&&s.unshift(Ml(e,d,f)),d=Ja(e,n),d!=null&&s.push(Ml(e,d,f))),e.tag===3)return s;e=e.return}return[]}function LE(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zm(e,n,a,s,d){for(var f=n._reactName,v=[];a!==null&&a!==s;){var _=a,M=_.alternate,P=_.stateNode;if(_=_.tag,M!==null&&M===s)break;_!==5&&_!==26&&_!==27||P===null||(M=P,d?(P=Ja(a,f),P!=null&&v.unshift(Ml(a,P,M))):d||(P=Ja(a,f),P!=null&&v.push(Ml(a,P,M)))),a=a.return}v.length!==0&&e.push({event:n,listeners:v})}var UE=/\r\n?/g,BE=/\u0000|\uFFFD/g;function jm(e){return(typeof e=="string"?e:""+e).replace(UE,`
49
- `).replace(BE,"")}function Hm(e,n){return n=jm(n),jm(e)===n}function ct(e,n,a,s,d,f){switch(a){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||Me(e,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&Me(e,""+s);break;case"className":En(e,"class",s);break;case"tabIndex":En(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":En(e,a,s);break;case"style":at(e,s,f);break;case"data":if(n!=="object"){En(e,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=zi(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"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"&&(a==="formAction"?(n!=="input"&&ct(e,n,"name",d.name,d,null),ct(e,n,"formEncType",d.formEncType,d,null),ct(e,n,"formMethod",d.formMethod,d,null),ct(e,n,"formTarget",d.formTarget,d,null)):(ct(e,n,"encType",d.encType,d,null),ct(e,n,"method",d.method,d,null),ct(e,n,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=zi(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=he);break;case"onScroll":s!=null&&Ge("scroll",e);break;case"onScrollEnd":s!=null&&Ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(d.children!=null)throw Error(l(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=zi(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":Ge("beforetoggle",e),Ge("toggle",e),Jt(e,"popover",s);break;case"xlinkActuate":un(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":un(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":un(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":un(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":un(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":un(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":un(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":un(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":un(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Jt(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=hi.get(a)||a,Jt(e,a,s))}}function Xu(e,n,a,s,d,f){switch(a){case"style":at(e,s,f);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(d.children!=null)throw Error(l(60));e.innerHTML=a}}break;case"children":typeof s=="string"?Me(e,s):(typeof s=="number"||typeof s=="bigint")&&Me(e,""+s);break;case"onScroll":s!=null&&Ge("scroll",e);break;case"onScrollEnd":s!=null&&Ge("scrollend",e);break;case"onClick":s!=null&&(e.onclick=he);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),f=e[Qt]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(n,f,d),typeof s=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,s,d);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):Jt(e,a,s)}}}function Xt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",e),Ge("load",e);var s=!1,d=!1,f;for(f in a)if(a.hasOwnProperty(f)){var v=a[f];if(v!=null)switch(f){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:ct(e,n,f,v,a,null)}}d&&ct(e,n,"srcSet",a.srcSet,a,null),s&&ct(e,n,"src",a.src,a,null);return;case"input":Ge("invalid",e);var _=f=v=d=null,M=null,P=null;for(s in a)if(a.hasOwnProperty(s)){var J=a[s];if(J!=null)switch(s){case"name":d=J;break;case"type":v=J;break;case"checked":M=J;break;case"defaultChecked":P=J;break;case"value":f=J;break;case"defaultValue":_=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(l(137,n));break;default:ct(e,n,s,J,a,null)}}xr(e,f,_,M,P,v,d,!1);return;case"select":Ge("invalid",e),s=v=f=null;for(d in a)if(a.hasOwnProperty(d)&&(_=a[d],_!=null))switch(d){case"value":f=_;break;case"defaultValue":v=_;break;case"multiple":s=_;default:ct(e,n,d,_,a,null)}n=f,a=v,e.multiple=!!s,n!=null?Kt(e,!!s,n,!1):a!=null&&Kt(e,!!s,a,!0);return;case"textarea":Ge("invalid",e),f=d=s=null;for(v in a)if(a.hasOwnProperty(v)&&(_=a[v],_!=null))switch(v){case"value":s=_;break;case"defaultValue":d=_;break;case"children":f=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(l(91));break;default:ct(e,n,v,_,a,null)}Jr(e,s,d,f);return;case"option":for(M in a)if(a.hasOwnProperty(M)&&(s=a[M],s!=null))switch(M){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ct(e,n,M,s,a,null)}return;case"dialog":Ge("beforetoggle",e),Ge("toggle",e),Ge("cancel",e),Ge("close",e);break;case"iframe":case"object":Ge("load",e);break;case"video":case"audio":for(s=0;s<Ol.length;s++)Ge(Ol[s],e);break;case"image":Ge("error",e),Ge("load",e);break;case"details":Ge("toggle",e);break;case"embed":case"source":case"link":Ge("error",e),Ge("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(P in a)if(a.hasOwnProperty(P)&&(s=a[P],s!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:ct(e,n,P,s,a,null)}return;default:if(Bi(n)){for(J in a)a.hasOwnProperty(J)&&(s=a[J],s!==void 0&&Xu(e,n,J,s,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(s=a[_],s!=null&&ct(e,n,_,s,a,null))}function zE(e,n,a,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,f=null,v=null,_=null,M=null,P=null,J=null;for(Y in a){var ie=a[Y];if(a.hasOwnProperty(Y)&&ie!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":M=ie;default:s.hasOwnProperty(Y)||ct(e,n,Y,null,s,ie)}}for(var $ in s){var Y=s[$];if(ie=a[$],s.hasOwnProperty($)&&(Y!=null||ie!=null))switch($){case"type":f=Y;break;case"name":d=Y;break;case"checked":P=Y;break;case"defaultChecked":J=Y;break;case"value":v=Y;break;case"defaultValue":_=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(l(137,n));break;default:Y!==ie&&ct(e,n,$,Y,s,ie)}}Xa(e,v,_,M,P,J,f,d);return;case"select":Y=v=_=$=null;for(f in a)if(M=a[f],a.hasOwnProperty(f)&&M!=null)switch(f){case"value":break;case"multiple":Y=M;default:s.hasOwnProperty(f)||ct(e,n,f,null,s,M)}for(d in s)if(f=s[d],M=a[d],s.hasOwnProperty(d)&&(f!=null||M!=null))switch(d){case"value":$=f;break;case"defaultValue":_=f;break;case"multiple":v=f;default:f!==M&&ct(e,n,d,f,s,M)}n=_,a=v,s=Y,$!=null?Kt(e,!!a,$,!1):!!s!=!!a&&(n!=null?Kt(e,!!a,n,!0):Kt(e,!!a,a?[]:"",!1));return;case"textarea":Y=$=null;for(_ in a)if(d=a[_],a.hasOwnProperty(_)&&d!=null&&!s.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:ct(e,n,_,null,s,d)}for(v in s)if(d=s[v],f=a[v],s.hasOwnProperty(v)&&(d!=null||f!=null))switch(v){case"value":$=d;break;case"defaultValue":Y=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(l(91));break;default:d!==f&&ct(e,n,v,d,s,f)}ys(e,$,Y);return;case"option":for(var Ee in a)if($=a[Ee],a.hasOwnProperty(Ee)&&$!=null&&!s.hasOwnProperty(Ee))switch(Ee){case"selected":e.selected=!1;break;default:ct(e,n,Ee,null,s,$)}for(M in s)if($=s[M],Y=a[M],s.hasOwnProperty(M)&&$!==Y&&($!=null||Y!=null))switch(M){case"selected":e.selected=$&&typeof $!="function"&&typeof $!="symbol";break;default:ct(e,n,M,$,s,Y)}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 a)$=a[Oe],a.hasOwnProperty(Oe)&&$!=null&&!s.hasOwnProperty(Oe)&&ct(e,n,Oe,null,s,$);for(P in s)if($=s[P],Y=a[P],s.hasOwnProperty(P)&&$!==Y&&($!=null||Y!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(l(137,n));break;default:ct(e,n,P,$,s,Y)}return;default:if(Bi(n)){for(var ut in a)$=a[ut],a.hasOwnProperty(ut)&&$!==void 0&&!s.hasOwnProperty(ut)&&Xu(e,n,ut,void 0,s,$);for(J in s)$=s[J],Y=a[J],!s.hasOwnProperty(J)||$===Y||$===void 0&&Y===void 0||Xu(e,n,J,$,s,Y);return}}for(var z in a)$=a[z],a.hasOwnProperty(z)&&$!=null&&!s.hasOwnProperty(z)&&ct(e,n,z,null,s,$);for(ie in s)$=s[ie],Y=a[ie],!s.hasOwnProperty(ie)||$===Y||$==null&&Y==null||ct(e,n,ie,$,s,Y)}function Fm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jE(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var d=a[s],f=d.transferSize,v=d.initiatorType,_=d.duration;if(f&&_&&Fm(v)){for(v=0,_=d.responseEnd,s+=1;s<a.length;s++){var M=a[s],P=M.startTime;if(P>_)break;var J=M.transferSize,ie=M.initiatorType;J&&Fm(ie)&&(M=M.responseEnd,v+=J*(M<_?1:(_-P)/(M-P)))}if(--s,n+=8*(f+v)/(d.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 Zu=null,Qu=null;function go(e){return e.nodeType===9?e:e.ownerDocument}function Pm(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 Gm(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 Ju(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 Wu=null;function HE(){var e=window.event;return e&&e.type==="popstate"?e===Wu?!1:(Wu=e,!0):(Wu=null,!1)}var $m=typeof setTimeout=="function"?setTimeout:void 0,FE=typeof clearTimeout=="function"?clearTimeout:void 0,Km=typeof Promise=="function"?Promise:void 0,PE=typeof queueMicrotask=="function"?queueMicrotask:typeof Km<"u"?function(e){return Km.resolve(null).then(e).catch(GE)}:$m;function GE(e){setTimeout(function(){throw e})}function nr(e){return e==="head"}function qm(e,n){var a=n,s=0;do{var d=a.nextSibling;if(e.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(s===0){e.removeChild(d),Ta(n);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")Rl(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Rl(a);for(var f=a.firstChild;f;){var v=f.nextSibling,_=f.nodeName;f[yr]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=v}}else a==="body"&&Rl(e.ownerDocument.body);a=d}while(a);Ta(n)}function Vm(e,n){var a=e;e=0;do{var s=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=s}while(a)}function ed(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":ed(a),Va(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function $E(e,n,a,s){for(;e.nodeType===1;){var d=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[yr])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!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var f=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Hn(e.nextSibling),e===null)break}return null}function KE(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Hn(e.nextSibling),e===null))return null;return e}function Ym(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Hn(e.nextSibling),e===null))return null;return e}function td(e){return e.data==="$?"||e.data==="$~"}function nd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function qE(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var s=function(){n(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Hn(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 id=null;function Xm(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return Hn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function Zm(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function Qm(e,n,a){switch(n=go(a),e){case"html":if(e=n.documentElement,!e)throw Error(l(452));return e;case"head":if(e=n.head,!e)throw Error(l(453));return e;case"body":if(e=n.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Rl(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Va(e)}var Fn=new Map,Jm=new Set;function bo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ci=W.d;W.d={f:VE,r:YE,D:XE,C:ZE,L:QE,m:JE,X:e0,S:WE,M:t0};function VE(){var e=Ci.f(),n=so();return e||n}function YE(e){var n=di(e);n!==null&&n.tag===5&&n.type==="form"?mp(n):Ci.r(e)}var ka=typeof document>"u"?null:document;function Wm(e,n,a){var s=ka;if(s&&typeof n=="string"&&n){var d=dn(n);d='link[rel="'+e+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),Jm.has(d)||(Jm.add(d),e={rel:e,crossOrigin:a,href:n},s.querySelector(d)===null&&(n=s.createElement("link"),Xt(n,"link",e),Lt(n),s.head.appendChild(n)))}}function XE(e){Ci.D(e),Wm("dns-prefetch",e,null)}function ZE(e,n){Ci.C(e,n),Wm("preconnect",e,n)}function QE(e,n,a){Ci.L(e,n,a);var s=ka;if(s&&e&&n){var d='link[rel="preload"][as="'+dn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+dn(a.imageSizes)+'"]')):d+='[href="'+dn(e)+'"]';var f=d;switch(n){case"style":f=Na(e);break;case"script":f=wa(e)}Fn.has(f)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),Fn.set(f,e),s.querySelector(d)!==null||n==="style"&&s.querySelector(Dl(f))||n==="script"&&s.querySelector(Il(f))||(n=s.createElement("link"),Xt(n,"link",e),Lt(n),s.head.appendChild(n)))}}function JE(e,n){Ci.m(e,n);var a=ka;if(a&&e){var s=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+dn(s)+'"][href="'+dn(e)+'"]',f=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=wa(e)}if(!Fn.has(f)&&(e=y({rel:"modulepreload",href:e},n),Fn.set(f,e),a.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Il(f)))return}s=a.createElement("link"),Xt(s,"link",e),Lt(s),a.head.appendChild(s)}}}function WE(e,n,a){Ci.S(e,n,a);var s=ka;if(s&&e){var d=Ui(s).hoistableStyles,f=Na(e);n=n||"default";var v=d.get(f);if(!v){var _={loading:0,preload:null};if(v=s.querySelector(Dl(f)))_.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Fn.get(f))&&rd(e,a);var M=v=s.createElement("link");Lt(M),Xt(M,"link",e),M._p=new Promise(function(P,J){M.onload=P,M.onerror=J}),M.addEventListener("load",function(){_.loading|=1}),M.addEventListener("error",function(){_.loading|=2}),_.loading|=4,yo(v,n,s)}v={type:"stylesheet",instance:v,count:1,state:_},d.set(f,v)}}}function e0(e,n){Ci.X(e,n);var a=ka;if(a&&e){var s=Ui(a).hoistableScripts,d=wa(e),f=s.get(d);f||(f=a.querySelector(Il(d)),f||(e=y({src:e,async:!0},n),(n=Fn.get(d))&&ad(e,n),f=a.createElement("script"),Lt(f),Xt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(d,f))}}function t0(e,n){Ci.M(e,n);var a=ka;if(a&&e){var s=Ui(a).hoistableScripts,d=wa(e),f=s.get(d);f||(f=a.querySelector(Il(d)),f||(e=y({src:e,async:!0,type:"module"},n),(n=Fn.get(d))&&ad(e,n),f=a.createElement("script"),Lt(f),Xt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(d,f))}}function eg(e,n,a,s){var d=(d=K.current)?bo(d):null;if(!d)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Na(a.href),a=Ui(d).hoistableStyles,s=a.get(n),s||(s={type:"style",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Na(a.href);var f=Ui(d).hoistableStyles,v=f.get(e);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,v),(f=d.querySelector(Dl(e)))&&!f._p&&(v.instance=f,v.state.loading=5),Fn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Fn.set(e,a),f||n0(d,e,a,v.state))),n&&s===null)throw Error(l(528,""));return v}if(n&&s!==null)throw Error(l(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=wa(a),a=Ui(d).hoistableScripts,s=a.get(n),s||(s={type:"script",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Na(e){return'href="'+dn(e)+'"'}function Dl(e){return'link[rel="stylesheet"]['+e+"]"}function tg(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function n0(e,n,a,s){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=e.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),Xt(n,"link",a),Lt(n),e.head.appendChild(n))}function wa(e){return'[src="'+dn(e)+'"]'}function Il(e){return"script[async]"+e}function ng(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var s=e.querySelector('style[data-href~="'+dn(a.href)+'"]');if(s)return n.instance=s,Lt(s),s;var d=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Lt(s),Xt(s,"style",d),yo(s,a.precedence,e),n.instance=s;case"stylesheet":d=Na(a.href);var f=e.querySelector(Dl(d));if(f)return n.state.loading|=4,n.instance=f,Lt(f),f;s=tg(a),(d=Fn.get(d))&&rd(s,d),f=(e.ownerDocument||e).createElement("link"),Lt(f);var v=f;return v._p=new Promise(function(_,M){v.onload=_,v.onerror=M}),Xt(f,"link",s),n.state.loading|=4,yo(f,a.precedence,e),n.instance=f;case"script":return f=wa(a.src),(d=e.querySelector(Il(f)))?(n.instance=d,Lt(d),d):(s=a,(d=Fn.get(f))&&(s=y({},a),ad(s,d)),e=e.ownerDocument||e,d=e.createElement("script"),Lt(d),Xt(d,"link",s),e.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(l(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,yo(s,a.precedence,e));return n.instance}function yo(e,n,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,f=d,v=0;v<s.length;v++){var _=s[v];if(_.dataset.precedence===n)f=_;else if(f!==d)break}f?f.parentNode.insertBefore(e,f.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function rd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function ad(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var vo=null;function ig(e,n,a){if(vo===null){var s=new Map,d=vo=new Map;d.set(a,s)}else d=vo,s=d.get(a),s||(s=new Map,d.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),d=0;d<a.length;d++){var f=a[d];if(!(f[yr]||f[Mt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(n)||"";v=e+v;var _=s.get(v);_?_.push(f):s.set(v,[f])}}return s}function rg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function i0(e,n,a){if(a===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 ag(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function r0(e,n,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=Na(s.href),f=n.querySelector(Dl(d));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=xo.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=f,Lt(f);return}f=n.ownerDocument||n,s=tg(s),(d=Fn.get(d))&&rd(s,d),f=f.createElement("link"),Lt(f);var v=f;v._p=new Promise(function(_,M){v.onload=_,v.onerror=M}),Xt(f,"link",s),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=xo.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var ld=0;function a0(e,n){return e.stylesheets&&e.count===0&&_o(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&_o(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+n);0<e.imgBytes&&ld===0&&(ld=62500*jE());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&_o(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>ld?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function xo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_o(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Eo=null;function _o(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Eo=new Map,n.forEach(l0,e),Eo=null,xo.call(e))}function l0(e,n){if(!(n.state.loading&4)){var a=Eo.get(e);if(a)var s=a.get(null);else{a=new Map,Eo.set(e,a);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<d.length;f++){var v=d[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),s=v)}s&&a.set(null,s)}d=n.instance,v=d.getAttribute("data-precedence"),f=a.get(v)||s,f===s&&a.set(null,d),a.set(v,d),this.count++,s=xo.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),f?f.parentNode.insertBefore(d,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),n.state.loading|=4}}var Ll={$$typeof:I,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function s0(e,n,a,s,d,f,v,_,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=yt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yt(0),this.hiddenUpdates=yt(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function lg(e,n,a,s,d,f,v,_,M,P,J,ie){return e=new s0(e,n,a,v,M,P,J,ie,_),n=1,f===!0&&(n|=24),f=kn(3,null,null,n),e.current=f,f.stateNode=e,n=jc(),n.refCount++,e.pooledCache=n,n.refCount++,f.memoizedState={element:s,isDehydrated:a,cache:n},Gc(f),e}function sg(e){return e?(e=ia,e):ia}function og(e,n,a,s,d,f){d=sg(d),s.context===null?s.context=d:s.pendingContext=d,s=Ki(n),s.payload={element:a},f=f===void 0?null:f,f!==null&&(s.callback=f),a=qi(e,s,n),a!==null&&(bn(a,e,n),hl(a,e,n))}function cg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function sd(e,n){cg(e,n),(e=e.alternate)&&cg(e,n)}function ug(e){if(e.tag===13||e.tag===31){var n=kr(e,67108864);n!==null&&bn(n,e,67108864),sd(e,67108864)}}function dg(e){if(e.tag===13||e.tag===31){var n=Cn();n=_t(n);var a=kr(e,n);a!==null&&bn(a,e,n),sd(e,n)}}var So=!0;function o0(e,n,a,s){var d=D.T;D.T=null;var f=W.p;try{W.p=2,od(e,n,a,s)}finally{W.p=f,D.T=d}}function c0(e,n,a,s){var d=D.T;D.T=null;var f=W.p;try{W.p=8,od(e,n,a,s)}finally{W.p=f,D.T=d}}function od(e,n,a,s){if(So){var d=cd(s);if(d===null)Yu(e,n,s,ko,a),hg(e,s);else if(d0(d,e,n,a,s))s.stopPropagation();else if(hg(e,s),n&4&&-1<u0.indexOf(e)){for(;d!==null;){var f=di(d);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=cn(f.pendingLanes);if(v!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;v;){var M=1<<31-it(v);_.entanglements[1]|=M,v&=~M}ii(f),(et&6)===0&&(ao=kt()+500,Cl(0))}}break;case 31:case 13:_=kr(f,2),_!==null&&bn(_,f,2),so(),sd(f,2)}if(f=cd(s),f===null&&Yu(e,n,s,ko,a),f===d)break;d=f}d!==null&&s.stopPropagation()}else Yu(e,n,s,null,a)}}function cd(e){return e=Ue(e),ud(e)}var ko=null;function ud(e){if(ko=null,e=an(e),e!==null){var n=c(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=u(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return ko=e,null}function fg(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($r()){case Q:return 2;case de:return 8;case Ce:case He:return 32;case Qe:return 268435456;default:return 32}default:return 32}}var dd=!1,ir=null,rr=null,ar=null,Ul=new Map,Bl=new Map,lr=[],u0="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 hg(e,n){switch(e){case"focusin":case"focusout":ir=null;break;case"dragenter":case"dragleave":rr=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":Ul.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(n.pointerId)}}function zl(e,n,a,s,d,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:a,eventSystemFlags:s,nativeEvent:f,targetContainers:[d]},n!==null&&(n=di(n),n!==null&&ug(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function d0(e,n,a,s,d){switch(n){case"focusin":return ir=zl(ir,e,n,a,s,d),!0;case"dragenter":return rr=zl(rr,e,n,a,s,d),!0;case"mouseover":return ar=zl(ar,e,n,a,s,d),!0;case"pointerover":var f=d.pointerId;return Ul.set(f,zl(Ul.get(f)||null,e,n,a,s,d)),!0;case"gotpointercapture":return f=d.pointerId,Bl.set(f,zl(Bl.get(f)||null,e,n,a,s,d)),!0}return!1}function pg(e){var n=an(e.target);if(n!==null){var a=c(n);if(a!==null){if(n=a.tag,n===13){if(n=u(a),n!==null){e.blockedOn=n,Vr(e.priority,function(){dg(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,Vr(e.priority,function(){dg(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function No(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=cd(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Se=s,a.target.dispatchEvent(s),Se=null}else return n=di(a),n!==null&&ug(n),e.blockedOn=a,!1;n.shift()}return!0}function mg(e,n,a){No(e)&&a.delete(n)}function f0(){dd=!1,ir!==null&&No(ir)&&(ir=null),rr!==null&&No(rr)&&(rr=null),ar!==null&&No(ar)&&(ar=null),Ul.forEach(mg),Bl.forEach(mg)}function wo(e,n){e.blockedOn===n&&(e.blockedOn=null,dd||(dd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,f0)))}var To=null;function gg(e){To!==e&&(To=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){To===e&&(To=null);for(var n=0;n<e.length;n+=3){var a=e[n],s=e[n+1],d=e[n+2];if(typeof s!="function"){if(ud(s||a)===null)continue;break}var f=di(a);f!==null&&(e.splice(n,3),n-=3,cu(f,{pending:!0,data:d,method:a.method,action:s},s,d))}}))}function Ta(e){function n(M){return wo(M,e)}ir!==null&&wo(ir,e),rr!==null&&wo(rr,e),ar!==null&&wo(ar,e),Ul.forEach(n),Bl.forEach(n);for(var a=0;a<lr.length;a++){var s=lr[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<lr.length&&(a=lr[0],a.blockedOn===null);)pg(a),a.blockedOn===null&&lr.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var d=a[s],f=a[s+1],v=d[Qt]||null;if(typeof f=="function")v||gg(a);else if(v){var _=null;if(f&&f.hasAttribute("formAction")){if(d=f,v=f[Qt]||null)_=v.formAction;else if(ud(d)!==null)continue}else _=v.action;typeof _=="function"?a[s+1]=_:(a.splice(s,3),s-=3),gg(a)}}}function bg(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=null),s||setTimeout(a,20)}function a(){if(!s&&!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 s=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),d!==null&&(d(),d=null)}}}function fd(e){this._internalRoot=e}Ao.prototype.render=fd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(l(409));var a=n.current,s=Cn();og(a,s,e,n,null,null)},Ao.prototype.unmount=fd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;og(e.current,2,null,e,null,null),so(),n[Ii]=null}};function Ao(e){this._internalRoot=e}Ao.prototype.unstable_scheduleHydration=function(e){if(e){var n=qr();e={blockedOn:null,target:e,priority:n};for(var a=0;a<lr.length&&n!==0&&n<lr[a].priority;a++);lr.splice(a,0,e),a===0&&pg(e)}};var yg=i.version;if(yg!=="19.2.4")throw Error(l(527,yg,"19.2.4"));W.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=p(n),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var h0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Co=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Co.isDisabled&&Co.supportsFiber)try{$t=Co.inject(h0),Tt=Co}catch{}}return Hl.createRoot=function(e,n){if(!o(e))throw Error(l(299));var a=!1,s="",d=Np,f=wp,v=Tp;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError)),n=lg(e,1,!1,null,null,a,s,null,d,f,v,bg),e[Ii]=n.current,Vu(e),new fd(n)},Hl.hydrateRoot=function(e,n,a){if(!o(e))throw Error(l(299));var s=!1,d="",f=Np,v=wp,_=Tp,M=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&(M=a.formState)),n=lg(e,1,!0,n,a??null,s,d,M,f,v,_,bg),n.context=sg(null),a=n.current,s=Cn(),s=_t(s),d=Ki(s),d.callback=null,qi(a,d,s),a=s,n.current.lanes=a,ft(n,a),ii(n),e[Ii]=n.current,Vu(e),new Ao(n)},Hl.version="19.2.4",Hl}var Ag;function w0(){if(Ag)return md.exports;Ag=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(i){console.error(i)}}return t(),md.exports=N0(),md.exports}var T0=w0();const A0=ls(T0),bf={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 C0(t,i){switch(i.type){case"SET_USER":return{...t,user:i.user};case"SET_ACTIVE_VIEW":return{...t,activeView:i.view};case"SET_AGENTS":return{...t,agents:i.agents};case"SELECT_AGENT":return{...t,selectedAgentId:i.agentId,selectedSessionKey:i.sessionKey,sessions:[],selectedSessionId:null,messages:[],jobs:[],selectedJobId:null,activeThreadId:null,threadMessages:[]};case"SET_CHANNELS":return{...t,channels:i.channels};case"SELECT_CHANNEL":return{...t,selectedChannelId:i.channelId,sessions:[],selectedSessionId:null,tasks:[],selectedTaskId:null,jobs:[],selectedJobId:null,messages:[]};case"SET_SESSIONS":return{...t,sessions:i.sessions};case"SELECT_SESSION":return{...t,selectedSessionId:i.sessionId,selectedSessionKey:i.sessionKey??t.selectedSessionKey,messages:[],activeThreadId:null,threadMessages:[]};case"ADD_SESSION":return{...t,sessions:[...t.sessions,i.session]};case"REMOVE_SESSION":return{...t,sessions:t.sessions.filter(r=>r.id!==i.sessionId),...t.selectedSessionId===i.sessionId?{selectedSessionId:null,selectedSessionKey:null,messages:[]}:{}};case"RENAME_SESSION":return{...t,sessions:t.sessions.map(r=>r.id===i.sessionId?{...r,name:i.name}:r)};case"SET_TASKS":return{...t,tasks:i.tasks};case"SELECT_TASK":{const r=i.sessionKey??t.selectedSessionKey,l=r!==t.selectedSessionKey;return{...t,selectedTaskId:i.taskId,selectedSessionKey:r,messages:l?[]:t.messages,jobs:[],selectedJobId:null}}case"SET_JOBS":return{...t,jobs:i.jobs};case"SELECT_JOB":return{...t,selectedJobId:i.jobId,selectedSessionKey:i.sessionKey??t.selectedSessionKey,messages:[]};case"ADD_JOB":return{...t,jobs:[i.job,...t.jobs]};case"ADD_MESSAGE":{const r=t.messages[t.messages.length-1];return i.message.sender==="agent"&&(r!=null&&r.isStreaming)?{...t,streamingRunId:null,streamingSessionKey:null,messages:[...t.messages.slice(0,-1),{...i.message,isStreaming:!1}]}:{...t,messages:[...t.messages,i.message]}}case"SET_MESSAGES":return{...t,messages:i.messages,...i.replyCounts?{threadReplyCounts:{...t.threadReplyCounts,...i.replyCounts}}:{}};case"OPEN_THREAD":return{...t,activeThreadId:i.threadId,threadMessages:i.messages,threadReplyCounts:{...t.threadReplyCounts,...i.messages.length>0?{[i.threadId]:i.messages.length}:{}}};case"CLOSE_THREAD":return{...t,activeThreadId:null,threadMessages:[]};case"ADD_THREAD_MESSAGE":{const r=i.message.threadId??t.activeThreadId,l=!!(r&&r===t.activeThreadId);let o=t.threadMessages,c={};if(l){const h=t.threadMessages[t.threadMessages.length-1];i.message.sender==="agent"&&(h!=null&&h.isStreaming)?(o=[...t.threadMessages.slice(0,-1),{...i.message,isStreaming:!1}],c={streamingRunId:null,streamingSessionKey:null,streamingThreadId:null}):o=[...t.threadMessages,i.message]}const u={...t.threadReplyCounts};return r&&(l?u[r]=o.length:u[r]=(u[r]??0)+1),{...t,...c,threadMessages:o,threadReplyCounts:u}}case"SET_OPENCLAW_CONNECTED":return{...t,openclawConnected:i.connected,defaultModel:i.defaultModel??t.defaultModel};case"SET_SESSION_MODEL":return{...t,sessionModel:i.model};case"SET_WS_CONNECTED":return{...t,wsConnected:i.connected};case"SET_MODELS":return{...t,models:i.models};case"SET_DEFAULT_MODEL":return{...t,defaultModel:i.model};case"RESOLVE_ACTION":return{...t,messages:t.messages.map(r=>r.id===i.messageId?{...r,resolvedActions:{...r.resolvedActions,[i.promptHash]:{value:i.value,label:i.label}}}:r)};case"STREAM_START":{const r={id:`stream_${i.runId}`,sender:"agent",text:"",timestamp:Date.now(),isStreaming:!0},l=!!i.threadId;return{...t,streamingRunId:i.runId,streamingSessionKey:i.sessionKey,streamingThreadId:i.threadId??null,...l?{threadMessages:[...t.threadMessages,r]}:{messages:[...t.messages,r]}}}case"STREAM_CHUNK":{if(t.streamingRunId!==i.runId)return t;const r=`stream_${i.runId}`;return t.streamingThreadId?{...t,threadMessages:t.threadMessages.map(l=>l.id===r?{...l,text:i.text}:l)}:{...t,messages:t.messages.map(l=>l.id===r?{...l,text:i.text}:l)}}case"STREAM_END":return t.streamingRunId&&t.streamingRunId!==i.runId?t:{...t,streamingRunId:null,streamingSessionKey:null,streamingThreadId:null};case"SET_CRON_TASKS":return{...t,cronTasks:i.cronTasks};case"MERGE_SCAN_DATA":{const r=new Map(i.scanTasks.map(c=>[c.cronJobId,c])),l=t.cronTasks.map(c=>{const u=c.openclawCronJobId?r.get(c.openclawCronJobId):null;return u?{...c,schedule:u.schedule||null,instructions:u.instructions||null,model:u.model||null,enabled:u.enabled}:c}),o=t.tasks.map(c=>{const u=c.openclawCronJobId?r.get(c.openclawCronJobId):null;return u?{...c,schedule:u.schedule||null,instructions:u.instructions||null,model:u.model||null,enabled:u.enabled}:c});return{...t,cronTasks:l,tasks:o}}case"UPDATE_CRON_TASK":return{...t,cronTasks:t.cronTasks.map(r=>r.id===i.taskId?{...r,...i.updates}:r),tasks:t.tasks.map(r=>r.id===i.taskId?{...r,...i.updates}:r)};case"SELECT_CRON_TASK":return t.selectedCronTaskId===i.taskId?t:{...t,selectedCronTaskId:i.taskId,cronJobs:[],selectedCronJobId:null,messages:[],selectedSessionKey:null};case"SET_CRON_JOBS":return{...t,cronJobs:i.cronJobs};case"SELECT_CRON_JOB":return{...t,selectedCronJobId:i.jobId,selectedSessionKey:i.sessionKey??t.selectedSessionKey,messages:[]};case"ADD_CRON_JOB":return{...t,cronJobs:[i.job,...t.cronJobs]};case"UPDATE_CRON_JOB":return t.cronJobs.some(l=>l.id===i.job.id)?{...t,cronJobs:t.cronJobs.map(l=>{var c;if(l.id!==i.job.id)return l;const o=l.summary&&l.summary.length>(((c=i.job.summary)==null?void 0:c.length)||0)?l.summary:i.job.summary;return{...l,...i.job,summary:o}})}:{...t,cronJobs:[i.job,...t.cronJobs]};case"APPEND_JOB_OUTPUT":{const r=l=>l.map(o=>o.id===i.jobId?{...o,summary:i.text}:o);return{...t,jobs:r(t.jobs),cronJobs:r(t.cronJobs)}}case"LOGOUT":return{...bf};default:return t}}const Po=V.createContext(bf),Go=V.createContext(()=>{});function Mi(){return V.useContext(Po)}function hr(){return V.useContext(Go)}const Cg=500;let O0=1;const Ba=[],Vo=new Set;function Ca(t,i,r,l){const o={id:O0++,ts:Date.now(),level:t,tag:i,message:r,detail:l!==void 0?typeof l=="string"?l:JSON.stringify(l,null,2):void 0};Ba.push(o),Ba.length>Cg&&Ba.splice(0,Ba.length-Cg);for(const c of Vo)c()}function M0(){return Ba}function R0(){Ba.length=0;for(const t of Vo)t()}function D0(t){return Vo.add(t),()=>Vo.delete(t)}const oe={info:(t,i,r)=>Ca("info",t,i,r),warn:(t,i,r)=>Ca("warn",t,i,r),error:(t,i,r)=>Ca("error",t,i,r),wsIn:(t,i,r)=>Ca("ws-in",t,i,r),wsOut:(t,i,r)=>Ca("ws-out",t,i,r),api:(t,i,r)=>Ca("api",t,i,r)},I0="/api";let Yo=localStorage.getItem("botschat_token");function yf(t){Yo=t,t?localStorage.setItem("botschat_token",t):localStorage.removeItem("botschat_token")}function Og(){return Yo}async function nt(t,i,r){const l=`${t} ${i}`;oe.api("API",`→ ${l}`,r);const o={"Content-Type":"application/json"};Yo&&(o.Authorization=`Bearer ${Yo}`);const c=performance.now();let u;try{u=await fetch(`${I0}${i}`,{method:t,headers:o,body:r?JSON.stringify(r):void 0,cache:"no-store"})}catch(p){const b=Math.round(performance.now()-c);throw oe.error("API",`✗ ${l} — network error (${b}ms)`,String(p)),p}const h=Math.round(performance.now()-c);if(!u.ok){const b=(await u.json().catch(()=>({error:u.statusText}))).error??`HTTP ${u.status}`;throw oe.error("API",`✗ ${l} — ${u.status} (${h}ms): ${b}`),new Error(b)}const m=await u.json();return oe.api("API",`✓ ${l} — ${u.status} (${h}ms)`,m),m}const Yd={register:(t,i,r)=>nt("POST","/auth/register",{email:t,password:i,displayName:r}),login:(t,i)=>nt("POST","/auth/login",{email:t,password:i}),firebase:t=>nt("POST","/auth/firebase",{idToken:t}),me:()=>nt("GET","/me")},L0={updateSettings:t=>nt("PATCH","/me",t)},U0={list:()=>nt("GET","/models")},es={list:()=>nt("GET","/agents")},dr={list:()=>nt("GET","/channels"),get:t=>nt("GET",`/channels/${t}`),create:t=>nt("POST","/channels",t),update:(t,i)=>nt("PATCH",`/channels/${t}`,i),delete:t=>nt("DELETE",`/channels/${t}`)},Vl={list:t=>nt("GET",`/channels/${t}/sessions`),create:(t,i)=>nt("POST",`/channels/${t}/sessions`,{name:i}),rename:(t,i,r)=>nt("PATCH",`/channels/${t}/sessions/${i}`,{name:r}),delete:(t,i)=>nt("DELETE",`/channels/${t}/sessions/${i}`)},Pn={list:t=>nt("GET",`/channels/${t}/tasks`),listAll:(t="background")=>nt("GET",`/tasks?kind=${t}`),scanData:()=>nt("GET","/task-scan"),create:(t,i)=>nt("POST",`/channels/${t}/tasks`,i),update:(t,i,r)=>nt("PATCH",`/channels/${t}/tasks/${i}`,r),delete:(t,i)=>nt("DELETE",`/channels/${t}/tasks/${i}`),run:(t,i)=>nt("POST",`/channels/${t}/tasks/${i}/run`)},Xd={list:(t,i)=>nt("GET",`/channels/${t}/tasks/${i}/jobs`),listByTask:t=>nt("GET",`/tasks/${t}/jobs`)},ly={list:(t,i,r)=>nt("GET",`/messages/${t}?sessionKey=${encodeURIComponent(i)}${r?`&threadId=${encodeURIComponent(r)}`:""}`)},vd={list:()=>nt("GET","/pairing-tokens"),create:t=>nt("POST","/pairing-tokens",{label:t}),delete:t=>nt("DELETE",`/pairing-tokens/${t}`)},B0={cloudUrl:()=>nt("GET","/setup/cloud-url")};function vf({value:t,onChange:i,models:r,disabled:l,placeholder:o="Select model...",compact:c}){const h=!r.find(A=>A.id===t)&&t?r.find(A=>A.name===t):null,m=h?h.id:t,p=!m||r.some(A=>A.id===m);V.useEffect(()=>{h&&t!==h.id&&i(h.id)},[h,t,i]);const b=V.useRef(null),[y,E]=V.useState(void 0),x=m||o,k=V.useCallback(()=>{if(!c||!b.current)return;const A=getComputedStyle(b.current),S=document.createElement("canvas").getContext("2d");if(!S)return;S.font=`${A.fontSize} ${A.fontFamily}`;const U=S.measureText(x).width,I=parseFloat(A.paddingLeft)||6,G=parseFloat(A.paddingRight)||6;E(Math.ceil(U)+I+G+22)},[c,x]);return V.useEffect(()=>{k()},[k]),g.jsxs("select",{ref:b,value:m,onChange:A=>i(A.target.value),disabled:l,className:`rounded-sm focus:outline-none ${c?"text-caption py-0.5 px-1.5":"text-body py-1.5 px-2.5"}`,style:{background:c?"transparent":"var(--bg-hover)",color:m?"var(--text-primary)":"var(--text-muted)",border:c?"1px solid transparent":"1px solid var(--border)",cursor:l?"not-allowed":"pointer",opacity:l?.5:1,width:c&&y?y:void 0,maxWidth:"100%",fontFamily:"var(--font-mono)",textOverflow:"ellipsis",overflow:"hidden"},children:[!m&&g.jsx("option",{value:"",children:o}),m&&!p&&g.jsx("option",{value:m,children:m}),r.map(A=>g.jsx("option",{value:A.id,children:A.id},A.id))]})}class z0{constructor(i){Aa(this,"ws",null);Aa(this,"reconnectTimer",null);Aa(this,"backoffMs",1e3);Aa(this,"intentionalClose",!1);Aa(this,"_connected",!1);this.opts=i}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}`;oe.info("WS",`Connecting to ${r}`),this.ws=new WebSocket(r),this.ws.onopen=()=>{oe.info("WS","Socket opened, sending auth"),this.ws.send(JSON.stringify({type:"auth",token:this.opts.token}))},this.ws.onmessage=l=>{try{const o=JSON.parse(l.data);o.type==="auth.ok"?(oe.info("WS","Auth OK — connected"),this.backoffMs=1e3,this._connected=!0,this.opts.onStatusChange(!0)):this.opts.onMessage(o)}catch{oe.warn("WS","Failed to parse incoming message",l.data)}},this.ws.onclose=l=>{this._connected=!1,this.opts.onStatusChange(!1),this.intentionalClose?oe.info("WS","Connection closed (intentional)"):(oe.warn("WS",`Connection closed (code=${l.code}), reconnecting in ${this.backoffMs}ms`),this.reconnectTimer=setTimeout(()=>{this.backoffMs=Math.min(this.backoffMs*2,3e4),this.connect()},this.backoffMs))},this.ws.onerror=()=>{oe.error("WS","WebSocket error (close event will follow)")}}send(i){var r,l;((r=this.ws)==null?void 0:r.readyState)===WebSocket.OPEN?this.ws.send(JSON.stringify(i)):oe.warn("WS",`Cannot send — socket not open (readyState=${(l=this.ws)==null?void 0:l.readyState})`,i)}disconnect(){var i;this.intentionalClose=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(i=this.ws)==null||i.close(),this.ws=null,this._connected=!1,this.opts.onStatusChange(!1)}}function j0({onToggleTheme:t,onOpenSettings:i,theme:r}){var m,p,b,y,E,x,k,A;const l=Mi(),o=hr(),c=()=>{var C;oe.info("Auth",`Logout — user ${(C=l.user)==null?void 0:C.email}`),yf(null),o({type:"LOGOUT"})},u=C=>{oe.info("Nav",`Switch view → ${C}`),o({type:"SET_ACTIVE_VIEW",view:C})},h=((b=(p=(m=l.user)==null?void 0:m.displayName)==null?void 0:p[0])==null?void 0:b.toUpperCase())??((x=(E=(y=l.user)==null?void 0:y.email)==null?void 0:E[0])==null?void 0:x.toUpperCase())??"?";return g.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:[g.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"}),g.jsx("div",{className:"w-8 border-t my-1",style:{borderColor:"var(--sidebar-divider)"}}),g.jsx(Fl,{label:"Home",active:!1,icon:g.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.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"})})}),g.jsx(Fl,{label:"Messages",active:l.activeView==="messages",onClick:()=>u("messages"),icon:g.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.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"})})}),g.jsx(Fl,{label:"Automations",active:l.activeView==="automations",onClick:()=>u("automations"),icon:g.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})})}),g.jsx("div",{className:"flex-1"}),g.jsx(Fl,{label:"Settings",active:!1,onClick:i,icon:g.jsxs("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[g.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"}),g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),g.jsx(Fl,{label:r==="dark"?"Light mode":"Dark mode",active:!1,onClick:t,icon:r==="dark"?g.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.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"})}):g.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.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"})})}),g.jsx("button",{onClick:c,className:"w-7 h-7 rounded flex items-center justify-center text-xs font-bold text-white mt-1",style:{background:"#9B59B6"},title:`${((k=l.user)==null?void 0:k.displayName)??((A=l.user)==null?void 0:A.email)} (click to logout)`,children:h})]})}function Fl({label:t,active:i,icon:r,onClick:l}){return g.jsxs("div",{className:"relative flex items-center justify-center",children:[i&&g.jsx("div",{className:"absolute left-0 w-[3px] h-5 rounded-r-sm",style:{left:-4,background:"var(--text-sidebar-active)"}}),g.jsx("button",{onClick:l,className:`w-9 h-9 rounded-lg flex items-center justify-center transition-colors ${i?"text-[--text-sidebar-active]":"text-[--text-sidebar] hover:text-[--text-sidebar-active]"}`,style:i?{background:"var(--sidebar-hover)"}:void 0,onMouseEnter:o=>{i||(o.currentTarget.style.background="var(--sidebar-hover)")},onMouseLeave:o=>{i||(o.currentTarget.style.background="")},title:t,"aria-label":t,children:r})]})}function H0(){const t=Mi(),i=hr(),[r,l]=V.useState(!1),[o,c]=V.useState(""),[u,h]=V.useState(""),[m,p]=V.useState(!0),b=async()=>{if(o.trim()){oe.info("Channel",`Creating channel: "${o}"${u?` (${u})`:""}`);try{await dr.create({name:o,description:u});const{agents:S}=await es.list(),{channels:U}=await dr.list();i({type:"SET_AGENTS",agents:S}),i({type:"SET_CHANNELS",channels:U});const I=S.find(G=>G.name===o.trim());if(I){oe.info("Channel",`Channel created → agent ${I.id}, auto-selected`),i({type:"SELECT_AGENT",agentId:I.id,sessionKey:I.sessionKey});try{localStorage.setItem("botschat_last_agent",I.id)}catch{}}l(!1),c(""),h("")}catch(S){oe.error("Channel",`Failed to create channel: ${S}`)}}},[y,E]=V.useState(null),x=(S,U)=>{if(t.selectedAgentId===S)return;const I=t.agents.find(G=>G.id===S);oe.info("Channel",`Selected channel: ${(I==null?void 0:I.name)??S} (session=${U})`),i({type:"SELECT_AGENT",agentId:S,sessionKey:U});try{localStorage.setItem("botschat_last_agent",S)}catch{}},k=async S=>{const U=t.channels.find(I=>I.id===S);oe.info("Channel",`Deleting channel: ${(U==null?void 0:U.name)??S}`);try{await dr.delete(S),oe.info("Channel",`Channel deleted: ${(U==null?void 0:U.name)??S}`);const I=t.agents.find(B=>B.channelId===S);I&&t.selectedAgentId===I.id&&i({type:"SELECT_AGENT",agentId:null,sessionKey:null});const{agents:G}=await es.list(),{channels:re}=await dr.list();i({type:"SET_AGENTS",agents:G}),i({type:"SET_CHANNELS",channels:re})}catch(I){oe.error("Channel",`Failed to delete channel: ${I}`)}finally{E(null)}},A=t.agents.filter(S=>S.isDefault),C=t.agents.filter(S=>!S.isDefault&&S.name!=="Default");return g.jsxs("div",{className:"flex flex-col h-full",style:{width:220,minWidth:160,background:"var(--bg-secondary)",borderRight:"1px solid var(--border)"},children:[g.jsxs("div",{className:"px-4 py-3 flex items-center gap-2",children:[g.jsx("span",{className:"text-[--text-sidebar-active] font-bold text-h2 truncate flex-1",children:"BotsChat"}),g.jsx("svg",{className:"w-3 h-3 text-[--text-sidebar]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),g.jsx("div",{className:"px-4 pb-2",children:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:t.openclawConnected?"var(--accent-green)":"var(--accent-red)"}}),g.jsx("span",{className:"text-tiny text-[--text-muted]",children:t.openclawConnected?"OpenClaw connected":"OpenClaw offline"})]})}),g.jsxs("div",{className:"flex-1 overflow-y-auto sidebar-scroll",children:[g.jsx(F0,{label:"Channels",expanded:m,onToggle:()=>p(!m)}),m&&g.jsxs("div",{children:[A.map(S=>g.jsx(Mg,{label:`# ${S.name}`,active:t.selectedAgentId===S.id,onClick:()=>x(S.id,S.sessionKey)},S.id)),C.map(S=>g.jsx(Mg,{label:`# ${S.name}`,active:t.selectedAgentId===S.id,onClick:()=>x(S.id,S.sessionKey),showDelete:!0,confirmDelete:y===S.channelId,onDeleteClick:U=>{U.stopPropagation(),E(S.channelId)},onDeleteConfirm:U=>{U.stopPropagation(),S.channelId&&k(S.channelId)},onDeleteCancel:U=>{U.stopPropagation(),E(null)}},S.id)),C.length===0&&A.length===0&&g.jsx("div",{className:"px-8 py-2 text-tiny text-[--text-muted]",children:"Loading channels…"})]})]}),r?g.jsxs("div",{className:"p-3 space-y-2",style:{borderTop:"1px solid var(--sidebar-border)"},children:[g.jsx("input",{type:"text",placeholder:"Channel name",value:o,onChange:S=>c(S.target.value),onKeyDown:S=>S.key==="Enter"&&!S.nativeEvent.isComposing&&b(),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}),g.jsx("input",{type:"text",placeholder:"Description (optional)",value:u,onChange:S=>h(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)"}}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{onClick:b,className:"flex-1 px-3 py-1.5 text-caption bg-[--bg-active] text-white rounded-sm font-bold hover:brightness-110",children:"Create"}),g.jsx("button",{onClick:()=>l(!1),className:"px-3 py-1.5 text-caption text-[--text-muted] hover:text-[--text-sidebar]",children:"Cancel"})]})]}):g.jsx("div",{className:"p-3",style:{borderTop:"1px solid var(--sidebar-border)"},children:g.jsx("button",{onClick:()=>l(!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 F0({label:t,expanded:i,onToggle:r}){return g.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:[g.jsx("svg",{className:`w-3 h-3 transition-transform ${i?"rotate-0":"-rotate-90"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})}),t]})}function Mg({label:t,active:i,onClick:r,showDelete:l,confirmDelete:o,onDeleteClick:c,onDeleteConfirm:u,onDeleteCancel:h}){const[m,p]=V.useState(!1),b=V.useRef(null);return V.useEffect(()=>{if(!o)return;const y=E=>{b.current&&!b.current.contains(E.target)&&(h==null||h(E))};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[o,h]),o?g.jsxs("div",{ref:b,className:"px-4 py-1.5 flex items-center gap-1.5",style:{paddingLeft:32,background:"var(--sidebar-hover)"},children:[g.jsx("span",{className:"text-caption text-[--text-sidebar] truncate flex-1",children:"Delete?"}),g.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"}),g.jsx("button",{onClick:h,className:"px-1.5 py-0.5 text-tiny rounded-sm text-[--text-muted] hover:text-[--text-sidebar]",children:"No"})]}):g.jsxs("div",{className:"relative group",onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[g.jsx("button",{onClick:r,className:"w-full text-left py-[5px] text-body truncate transition-colors",onMouseEnter:y=>{i||(y.currentTarget.style.background="var(--sidebar-hover)")},onMouseLeave:y=>{i||(y.currentTarget.style.background=i?"var(--bg-hover)":"")},style:{paddingLeft:i?29:32,paddingRight:l?28:void 0,background:i?"var(--bg-hover)":void 0,borderLeft:i?"3px solid var(--bg-active)":"3px solid transparent",color:i?"var(--text-sidebar-active)":"var(--text-sidebar)",fontWeight:i?700:void 0},children:t}),l&&m&&g.jsx("button",{onClick:c,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:g.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:g.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 P0(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const G0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,K0={};function Rg(t,i){return(K0.jsx?$0:G0).test(t)}const q0=/[ \t\n\f\r]/g;function V0(t){return typeof t=="object"?t.type==="text"?Dg(t.value):!1:Dg(t)}function Dg(t){return t.replace(q0,"")===""}class ss{constructor(i,r,l){this.normal=r,this.property=i,l&&(this.space=l)}}ss.prototype.normal={};ss.prototype.property={};ss.prototype.space=void 0;function sy(t,i){const r={},l={};for(const o of t)Object.assign(r,o.property),Object.assign(l,o.normal);return new ss(r,l,i)}function Zd(t){return t.toLowerCase()}class vn{constructor(i,r){this.attribute=r,this.property=i}}vn.prototype.attribute="";vn.prototype.booleanish=!1;vn.prototype.boolean=!1;vn.prototype.commaOrSpaceSeparated=!1;vn.prototype.commaSeparated=!1;vn.prototype.defined=!1;vn.prototype.mustUseProperty=!1;vn.prototype.number=!1;vn.prototype.overloadedBoolean=!1;vn.prototype.property="";vn.prototype.spaceSeparated=!1;vn.prototype.space=void 0;let Y0=0;const je=Hr(),Ft=Hr(),Qd=Hr(),ce=Hr(),bt=Hr(),za=Hr(),On=Hr();function Hr(){return 2**++Y0}const Jd=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Ft,commaOrSpaceSeparated:On,commaSeparated:za,number:ce,overloadedBoolean:Qd,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),xd=Object.keys(Jd);class xf extends vn{constructor(i,r,l,o){let c=-1;if(super(i,r),Ig(this,"space",o),typeof l=="number")for(;++c<xd.length;){const u=xd[c];Ig(this,xd[c],(l&Jd[u])===Jd[u])}}}xf.prototype.defined=!0;function Ig(t,i,r){r&&(t[i]=r)}function Ga(t){const i={},r={};for(const[l,o]of Object.entries(t.properties)){const c=new xf(l,t.transform(t.attributes||{},l),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(l)&&(c.mustUseProperty=!0),i[l]=c,r[Zd(l)]=l,r[Zd(c.attribute)]=l}return new ss(i,r,t.space)}const oy=Ga({properties:{ariaActiveDescendant:null,ariaAtomic:Ft,ariaAutoComplete:null,ariaBusy:Ft,ariaChecked:Ft,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:Ft,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:Ft,ariaFlowTo:bt,ariaGrabbed:Ft,ariaHasPopup:null,ariaHidden:Ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:ce,ariaLive:null,ariaModal:Ft,ariaMultiLine:Ft,ariaMultiSelectable:Ft,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:Ft,ariaReadOnly:Ft,ariaRelevant:null,ariaRequired:Ft,ariaRoleDescription:bt,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:Ft,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function cy(t,i){return i in t?t[i]:i}function uy(t,i){return cy(t,i.toLowerCase())}const X0=Ga({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:za,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:bt,autoFocus:je,autoPlay:je,blocking:bt,capture:null,charSet:null,checked:je,cite:null,className:bt,cols:ce,colSpan:null,content:null,contentEditable:Ft,controls:je,controlsList:bt,coords:ce|za,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Qd,draggable:Ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:bt,height:ce,hidden:Qd,high:ce,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:bt,itemRef:bt,itemScope:je,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,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:ce,pattern:null,ping:bt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:bt,required:je,reversed:je,rows:ce,rowSpan:ce,sandbox:bt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:Ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Ft,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,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:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:Ft,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:uy}),Z0=Ga({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:On,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:bt,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:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,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:za,g2:za,glyphName:za,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:On,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,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:ce,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:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:On,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:On,rev:On,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:On,requiredFeatures:On,requiredFonts:On,requiredFormats:On,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:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:On,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:On,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:On,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:cy}),dy=Ga({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),fy=Ga({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:uy}),hy=Ga({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),Q0={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"},J0=/[A-Z]/g,Lg=/-[a-z]/g,W0=/^data[-\w.:]+$/i;function e_(t,i){const r=Zd(i);let l=i,o=vn;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&W0.test(i)){if(i.charAt(4)==="-"){const c=i.slice(5).replace(Lg,n_);l="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=i.slice(4);if(!Lg.test(c)){let u=c.replace(J0,t_);u.charAt(0)!=="-"&&(u="-"+u),i="data"+u}}o=xf}return new o(l,i)}function t_(t){return"-"+t.toLowerCase()}function n_(t){return t.charAt(1).toUpperCase()}const i_=sy([oy,X0,dy,fy,hy],"html"),Ef=sy([oy,Z0,dy,fy,hy],"svg");function r_(t){return t.join(" ").trim()}var Oa={},Ed,Ug;function a_(){if(Ug)return Ed;Ug=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,h=/^\s+|\s+$/g,m=`
50
- `,p="/",b="*",y="",E="comment",x="declaration";function k(C,S){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];S=S||{};var U=1,I=1;function G(j){var Z=j.match(i);Z&&(U+=Z.length);var D=j.lastIndexOf(m);I=~D?j.length-D:I+j.length}function re(){var j={line:U,column:I};return function(Z){return Z.position=new B(j),me(),Z}}function B(j){this.start=j,this.end={line:U,column:I},this.source=S.source}B.prototype.content=C;function ae(j){var Z=new Error(S.source+":"+U+":"+I+": "+j);if(Z.reason=j,Z.filename=S.source,Z.line=U,Z.column=I,Z.source=C,!S.silent)throw Z}function fe(j){var Z=j.exec(C);if(Z){var D=Z[0];return G(D),C=C.slice(D.length),Z}}function me(){fe(r)}function w(j){var Z;for(j=j||[];Z=H();)Z!==!1&&j.push(Z);return j}function H(){var j=re();if(!(p!=C.charAt(0)||b!=C.charAt(1))){for(var Z=2;y!=C.charAt(Z)&&(b!=C.charAt(Z)||p!=C.charAt(Z+1));)++Z;if(Z+=2,y===C.charAt(Z-1))return ae("End of comment missing");var D=C.slice(2,Z-2);return I+=2,G(D),C=C.slice(Z),I+=2,j({type:E,comment:D})}}function X(){var j=re(),Z=fe(l);if(Z){if(H(),!fe(o))return ae("property missing ':'");var D=fe(c),W=j({type:x,property:A(Z[0].replace(t,y)),value:D?A(D[0].replace(t,y)):y});return fe(u),W}}function ye(){var j=[];w(j);for(var Z;Z=X();)Z!==!1&&(j.push(Z),w(j));return j}return me(),ye()}function A(C){return C?C.replace(h,y):y}return Ed=k,Ed}var Bg;function l_(){if(Bg)return Oa;Bg=1;var t=Oa&&Oa.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.default=r;const i=t(a_());function r(l,o){let c=null;if(!l||typeof l!="string")return c;const u=(0,i.default)(l),h=typeof o=="function";return u.forEach(m=>{if(m.type!=="declaration")return;const{property:p,value:b}=m;h?o(p,b,m):b&&(c=c||{},c[p]=b)}),c}return Oa}var Pl={},zg;function s_(){if(zg)return Pl;zg=1,Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,c=function(p){return!p||r.test(p)||t.test(p)},u=function(p,b){return b.toUpperCase()},h=function(p,b){return"".concat(b,"-")},m=function(p,b){return b===void 0&&(b={}),c(p)?p:(p=p.toLowerCase(),b.reactCompat?p=p.replace(o,h):p=p.replace(l,h),p.replace(i,u))};return Pl.camelCase=m,Pl}var Gl,jg;function o_(){if(jg)return Gl;jg=1;var t=Gl&&Gl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},i=t(l_()),r=s_();function l(o,c){var u={};return!o||typeof o!="string"||(0,i.default)(o,function(h,m){h&&m&&(u[(0,r.camelCase)(h,c)]=m)}),u}return l.default=l,Gl=l,Gl}var c_=o_();const u_=ls(c_),py=my("end"),_f=my("start");function my(t){return i;function i(r){const l=r&&r.position&&r.position[t]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function d_(t){const i=_f(t),r=py(t);if(i&&r)return{start:i,end:r}}function Xl(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Hg(t.position):"start"in t||"end"in t?Hg(t):"line"in t||"column"in t?Wd(t):""}function Wd(t){return Fg(t&&t.line)+":"+Fg(t&&t.column)}function Hg(t){return Wd(t&&t.start)+"-"+Wd(t&&t.end)}function Fg(t){return t&&typeof t=="number"?t:1}class tn extends Error{constructor(i,r,l){super(),typeof r=="string"&&(l=r,r=void 0);let o="",c={},u=!1;if(r&&("line"in r&&"column"in r?c={place:r}:"start"in r&&"end"in r?c={place:r}:"type"in r?c={ancestors:[r],place:r.position}:c={...r}),typeof i=="string"?o=i:!c.cause&&i&&(u=!0,o=i.message,c.cause=i),!c.ruleId&&!c.source&&typeof l=="string"){const m=l.indexOf(":");m===-1?c.ruleId=l:(c.source=l.slice(0,m),c.ruleId=l.slice(m+1))}if(!c.place&&c.ancestors&&c.ancestors){const m=c.ancestors[c.ancestors.length-1];m&&(c.place=m.position)}const h=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=h?h.line:void 0,this.name=Xl(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=u&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tn.prototype.file="";tn.prototype.name="";tn.prototype.reason="";tn.prototype.message="";tn.prototype.stack="";tn.prototype.column=void 0;tn.prototype.line=void 0;tn.prototype.ancestors=void 0;tn.prototype.cause=void 0;tn.prototype.fatal=void 0;tn.prototype.place=void 0;tn.prototype.ruleId=void 0;tn.prototype.source=void 0;const Sf={}.hasOwnProperty,f_=new Map,h_=/[A-Z]/g,p_=new Set(["table","tbody","thead","tfoot","tr"]),m_=new Set(["td","th"]),gy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function g_(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let l;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=k_(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=S_(r,i.jsx,i.jsxs)}const o={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:l,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Ef:i_,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},c=by(o,t,void 0);return c&&typeof c!="string"?c:o.create(t,o.Fragment,{children:c||void 0},void 0)}function by(t,i,r){if(i.type==="element")return b_(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return y_(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return x_(t,i,r);if(i.type==="mdxjsEsm")return v_(t,i);if(i.type==="root")return E_(t,i,r);if(i.type==="text")return __(t,i)}function b_(t,i,r){const l=t.schema;let o=l;i.tagName.toLowerCase()==="svg"&&l.space==="html"&&(o=Ef,t.schema=o),t.ancestors.push(i);const c=vy(t,i.tagName,!1),u=N_(t,i);let h=Nf(t,i);return p_.has(i.tagName)&&(h=h.filter(function(m){return typeof m=="string"?!V0(m):!0})),yy(t,u,c,i),kf(u,h),t.ancestors.pop(),t.schema=l,t.create(i,c,u,r)}function y_(t,i){if(i.data&&i.data.estree&&t.evaluater){const l=i.data.estree.body[0];return l.type,t.evaluater.evaluateExpression(l.expression)}ts(t,i.position)}function v_(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);ts(t,i.position)}function x_(t,i,r){const l=t.schema;let o=l;i.name==="svg"&&l.space==="html"&&(o=Ef,t.schema=o),t.ancestors.push(i);const c=i.name===null?t.Fragment:vy(t,i.name,!0),u=w_(t,i),h=Nf(t,i);return yy(t,u,c,i),kf(u,h),t.ancestors.pop(),t.schema=l,t.create(i,c,u,r)}function E_(t,i,r){const l={};return kf(l,Nf(t,i)),t.create(i,t.Fragment,l,r)}function __(t,i){return i.value}function yy(t,i,r,l){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=l)}function kf(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function S_(t,i,r){return l;function l(o,c,u,h){const p=Array.isArray(u.children)?r:i;return h?p(c,u,h):p(c,u)}}function k_(t,i){return r;function r(l,o,c,u){const h=Array.isArray(c.children),m=_f(l);return i(o,c,u,h,{columnNumber:m?m.column-1:void 0,fileName:t,lineNumber:m?m.line:void 0},void 0)}}function N_(t,i){const r={};let l,o;for(o in i.properties)if(o!=="children"&&Sf.call(i.properties,o)){const c=T_(t,o,i.properties[o]);if(c){const[u,h]=c;t.tableCellAlignToStyle&&u==="align"&&typeof h=="string"&&m_.has(i.tagName)?l=h:r[u]=h}}if(l){const c=r.style||(r.style={});c[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return r}function w_(t,i){const r={};for(const l of i.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&t.evaluater){const c=l.data.estree.body[0];c.type;const u=c.expression;u.type;const h=u.properties[0];h.type,Object.assign(r,t.evaluater.evaluateExpression(h.argument))}else ts(t,i.position);else{const o=l.name;let c;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&t.evaluater){const h=l.value.data.estree.body[0];h.type,c=t.evaluater.evaluateExpression(h.expression)}else ts(t,i.position);else c=l.value===null?!0:l.value;r[o]=c}return r}function Nf(t,i){const r=[];let l=-1;const o=t.passKeys?new Map:f_;for(;++l<i.children.length;){const c=i.children[l];let u;if(t.passKeys){const m=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(m){const p=o.get(m)||0;u=m+"-"+p,o.set(m,p+1)}}const h=by(t,c,u);h!==void 0&&r.push(h)}return r}function T_(t,i,r){const l=e_(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=l.commaSeparated?P0(r):r_(r)),l.property==="style"){let o=typeof r=="object"?r:A_(t,String(r));return t.stylePropertyNameCase==="css"&&(o=C_(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&l.space?Q0[l.property]||l.property:l.attribute,r]}}function A_(t,i){try{return u_(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const l=r,o=new tn("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=gy+"#cannot-parse-style-attribute",o}}function vy(t,i,r){let l;if(!r)l={type:"Literal",value:i};else if(i.includes(".")){const o=i.split(".");let c=-1,u;for(;++c<o.length;){const h=Rg(o[c])?{type:"Identifier",name:o[c]}:{type:"Literal",value:o[c]};u=u?{type:"MemberExpression",object:u,property:h,computed:!!(c&&h.type==="Literal"),optional:!1}:h}l=u}else l=Rg(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(l.type==="Literal"){const o=l.value;return Sf.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(l);ts(t)}function ts(t,i){const r=new tn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=gy+"#cannot-handle-mdx-estrees-without-createevaluater",r}function C_(t){const i={};let r;for(r in t)Sf.call(t,r)&&(i[O_(r)]=t[r]);return i}function O_(t){let i=t.replace(h_,M_);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function M_(t){return"-"+t.toLowerCase()}const _d={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"]},R_={};function wf(t,i){const r=R_,l=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return xy(t,l,o)}function xy(t,i,r){if(D_(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Pg(t.children,i,r)}return Array.isArray(t)?Pg(t,i,r):""}function Pg(t,i,r){const l=[];let o=-1;for(;++o<t.length;)l[o]=xy(t[o],i,r);return l.join("")}function D_(t){return!!(t&&typeof t=="object")}const Gg=document.createElement("i");function Tf(t){const i="&"+t+";";Gg.innerHTML=i;const r=Gg.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function Mn(t,i,r,l){const o=t.length;let c=0,u;if(i<0?i=-i>o?0:o+i:i=i>o?o:i,r=r>0?r:0,l.length<1e4)u=Array.from(l),u.unshift(i,r),t.splice(...u);else for(r&&t.splice(i,r);c<l.length;)u=l.slice(c,c+1e4),u.unshift(i,0),t.splice(...u),c+=1e4,i+=1e4}function Gn(t,i){return t.length>0?(Mn(t,t.length,0,i),t):i}const $g={}.hasOwnProperty;function Ey(t){const i={};let r=-1;for(;++r<t.length;)I_(i,t[r]);return i}function I_(t,i){let r;for(r in i){const o=($g.call(t,r)?t[r]:void 0)||(t[r]={}),c=i[r];let u;if(c)for(u in c){$g.call(o,u)||(o[u]=[]);const h=c[u];L_(o[u],Array.isArray(h)?h:h?[h]:[])}}}function L_(t,i){let r=-1;const l=[];for(;++r<i.length;)(i[r].add==="after"?t:l).push(i[r]);Mn(t,0,0,l)}function _y(t,i){const r=Number.parseInt(t,i);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 Xn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const on=pr(/[A-Za-z]/),en=pr(/[\dA-Za-z]/),U_=pr(/[#-'*+\--9=?A-Z^-~]/);function Xo(t){return t!==null&&(t<32||t===127)}const ef=pr(/\d/),B_=pr(/[\dA-Fa-f]/),z_=pr(/[!-/:-@[-`{-~]/);function Ae(t){return t!==null&&t<-2}function mt(t){return t!==null&&(t<0||t===32)}function $e(t){return t===-2||t===-1||t===32}const ac=pr(new RegExp("\\p{P}|\\p{S}","u")),jr=pr(/\s/);function pr(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function $a(t){const i=[];let r=-1,l=0,o=0;for(;++r<t.length;){const c=t.charCodeAt(r);let u="";if(c===37&&en(t.charCodeAt(r+1))&&en(t.charCodeAt(r+2)))o=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(u=String.fromCharCode(c));else if(c>55295&&c<57344){const h=t.charCodeAt(r+1);c<56320&&h>56319&&h<57344?(u=String.fromCharCode(c,h),o=1):u="�"}else u=String.fromCharCode(c);u&&(i.push(t.slice(l,r),encodeURIComponent(u)),l=r+o+1,u=""),o&&(r+=o,o=0)}return i.join("")+t.slice(l)}function Ze(t,i,r,l){const o=l?l-1:Number.POSITIVE_INFINITY;let c=0;return u;function u(m){return $e(m)?(t.enter(r),h(m)):i(m)}function h(m){return $e(m)&&c++<o?(t.consume(m),h):(t.exit(r),i(m))}}const j_={tokenize:H_};function H_(t){const i=t.attempt(this.parser.constructs.contentInitial,l,o);let r;return i;function l(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),Ze(t,i,"linePrefix")}function o(h){return t.enter("paragraph"),c(h)}function c(h){const m=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,u(h)}function u(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return Ae(h)?(t.consume(h),t.exit("chunkText"),c):(t.consume(h),u)}}const F_={tokenize:P_},Kg={tokenize:G_};function P_(t){const i=this,r=[];let l=0,o,c,u;return h;function h(I){if(l<r.length){const G=r[l];return i.containerState=G[1],t.attempt(G[0].continuation,m,p)(I)}return p(I)}function m(I){if(l++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,o&&U();const G=i.events.length;let re=G,B;for(;re--;)if(i.events[re][0]==="exit"&&i.events[re][1].type==="chunkFlow"){B=i.events[re][1].end;break}S(l);let ae=G;for(;ae<i.events.length;)i.events[ae][1].end={...B},ae++;return Mn(i.events,re+1,0,i.events.slice(G)),i.events.length=ae,p(I)}return h(I)}function p(I){if(l===r.length){if(!o)return E(I);if(o.currentConstruct&&o.currentConstruct.concrete)return k(I);i.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(Kg,b,y)(I)}function b(I){return o&&U(),S(l),E(I)}function y(I){return i.parser.lazy[i.now().line]=l!==r.length,u=i.now().offset,k(I)}function E(I){return i.containerState={},t.attempt(Kg,x,k)(I)}function x(I){return l++,r.push([i.currentConstruct,i.containerState]),E(I)}function k(I){if(I===null){o&&U(),S(0),t.consume(I);return}return o=o||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:c}),A(I)}function A(I){if(I===null){C(t.exit("chunkFlow"),!0),S(0),t.consume(I);return}return Ae(I)?(t.consume(I),C(t.exit("chunkFlow")),l=0,i.interrupt=void 0,h):(t.consume(I),A)}function C(I,G){const re=i.sliceStream(I);if(G&&re.push(null),I.previous=c,c&&(c.next=I),c=I,o.defineSkip(I.start),o.write(re),i.parser.lazy[I.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<u&&(!o.events[B][1].end||o.events[B][1].end.offset>u))return;const ae=i.events.length;let fe=ae,me,w;for(;fe--;)if(i.events[fe][0]==="exit"&&i.events[fe][1].type==="chunkFlow"){if(me){w=i.events[fe][1].end;break}me=!0}for(S(l),B=ae;B<i.events.length;)i.events[B][1].end={...w},B++;Mn(i.events,fe+1,0,i.events.slice(ae)),i.events.length=B}}function S(I){let G=r.length;for(;G-- >I;){const re=r[G];i.containerState=re[1],re[0].exit.call(i,t)}r.length=I}function U(){o.write([null]),c=void 0,o=void 0,i.containerState._closeFlow=void 0}}function G_(t,i,r){return Ze(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Pa(t){if(t===null||mt(t)||jr(t))return 1;if(ac(t))return 2}function lc(t,i,r){const l=[];let o=-1;for(;++o<t.length;){const c=t[o].resolveAll;c&&!l.includes(c)&&(i=c(i,r),l.push(c))}return i}const tf={name:"attention",resolveAll:$_,tokenize:K_};function $_(t,i){let r=-1,l,o,c,u,h,m,p,b;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(l=r;l--;)if(t[l][0]==="exit"&&t[l][1].type==="attentionSequence"&&t[l][1]._open&&i.sliceSerialize(t[l][1]).charCodeAt(0)===i.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[l][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[l][1].end.offset-t[l][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;m=t[l][1].end.offset-t[l][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const y={...t[l][1].end},E={...t[r][1].start};qg(y,-m),qg(E,m),u={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...t[l][1].end}},h={type:m>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:E},c={type:m>1?"strongText":"emphasisText",start:{...t[l][1].end},end:{...t[r][1].start}},o={type:m>1?"strong":"emphasis",start:{...u.start},end:{...h.end}},t[l][1].end={...u.start},t[r][1].start={...h.end},p=[],t[l][1].end.offset-t[l][1].start.offset&&(p=Gn(p,[["enter",t[l][1],i],["exit",t[l][1],i]])),p=Gn(p,[["enter",o,i],["enter",u,i],["exit",u,i],["enter",c,i]]),p=Gn(p,lc(i.parser.constructs.insideSpan.null,t.slice(l+1,r),i)),p=Gn(p,[["exit",c,i],["enter",h,i],["exit",h,i],["exit",o,i]]),t[r][1].end.offset-t[r][1].start.offset?(b=2,p=Gn(p,[["enter",t[r][1],i],["exit",t[r][1],i]])):b=0,Mn(t,l-1,r-l+3,p),r=l+p.length-b-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function K_(t,i){const r=this.parser.constructs.attentionMarkers.null,l=this.previous,o=Pa(l);let c;return u;function u(m){return c=m,t.enter("attentionSequence"),h(m)}function h(m){if(m===c)return t.consume(m),h;const p=t.exit("attentionSequence"),b=Pa(m),y=!b||b===2&&o||r.includes(m),E=!o||o===2&&b||r.includes(l);return p._open=!!(c===42?y:y&&(o||!E)),p._close=!!(c===42?E:E&&(b||!y)),i(m)}}function qg(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const q_={name:"autolink",tokenize:V_};function V_(t,i,r){let l=0;return o;function o(x){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),c}function c(x){return on(x)?(t.consume(x),u):x===64?r(x):p(x)}function u(x){return x===43||x===45||x===46||en(x)?(l=1,h(x)):p(x)}function h(x){return x===58?(t.consume(x),l=0,m):(x===43||x===45||x===46||en(x))&&l++<32?(t.consume(x),h):(l=0,p(x))}function m(x){return x===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),i):x===null||x===32||x===60||Xo(x)?r(x):(t.consume(x),m)}function p(x){return x===64?(t.consume(x),b):U_(x)?(t.consume(x),p):r(x)}function b(x){return en(x)?y(x):r(x)}function y(x){return x===46?(t.consume(x),l=0,b):x===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),i):E(x)}function E(x){if((x===45||en(x))&&l++<63){const k=x===45?E:y;return t.consume(x),k}return r(x)}}const os={partial:!0,tokenize:Y_};function Y_(t,i,r){return l;function l(c){return $e(c)?Ze(t,o,"linePrefix")(c):o(c)}function o(c){return c===null||Ae(c)?i(c):r(c)}}const Sy={continuation:{tokenize:Z_},exit:Q_,name:"blockQuote",tokenize:X_};function X_(t,i,r){const l=this;return o;function o(u){if(u===62){const h=l.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(u),t.exit("blockQuoteMarker"),c}return r(u)}function c(u){return $e(u)?(t.enter("blockQuotePrefixWhitespace"),t.consume(u),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(u))}}function Z_(t,i,r){const l=this;return o;function o(u){return $e(u)?Ze(t,c,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):c(u)}function c(u){return t.attempt(Sy,i,r)(u)}}function Q_(t){t.exit("blockQuote")}const ky={name:"characterEscape",tokenize:J_};function J_(t,i,r){return l;function l(c){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(c),t.exit("escapeMarker"),o}function o(c){return z_(c)?(t.enter("characterEscapeValue"),t.consume(c),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(c)}}const Ny={name:"characterReference",tokenize:W_};function W_(t,i,r){const l=this;let o=0,c,u;return h;function h(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),m}function m(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),p):(t.enter("characterReferenceValue"),c=31,u=en,b(y))}function p(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),c=6,u=B_,b):(t.enter("characterReferenceValue"),c=7,u=ef,b(y))}function b(y){if(y===59&&o){const E=t.exit("characterReferenceValue");return u===en&&!Tf(l.sliceSerialize(E))?r(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return u(y)&&o++<c?(t.consume(y),b):r(y)}}const Vg={partial:!0,tokenize:t1},Yg={concrete:!0,name:"codeFenced",tokenize:e1};function e1(t,i,r){const l=this,o={partial:!0,tokenize:re};let c=0,u=0,h;return m;function m(B){return p(B)}function p(B){const ae=l.events[l.events.length-1];return c=ae&&ae[1].type==="linePrefix"?ae[2].sliceSerialize(ae[1],!0).length:0,h=B,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),b(B)}function b(B){return B===h?(u++,t.consume(B),b):u<3?r(B):(t.exit("codeFencedFenceSequence"),$e(B)?Ze(t,y,"whitespace")(B):y(B))}function y(B){return B===null||Ae(B)?(t.exit("codeFencedFence"),l.interrupt?i(B):t.check(Vg,A,G)(B)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),E(B))}function E(B){return B===null||Ae(B)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(B)):$e(B)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ze(t,x,"whitespace")(B)):B===96&&B===h?r(B):(t.consume(B),E)}function x(B){return B===null||Ae(B)?y(B):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),k(B))}function k(B){return B===null||Ae(B)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(B)):B===96&&B===h?r(B):(t.consume(B),k)}function A(B){return t.attempt(o,G,C)(B)}function C(B){return t.enter("lineEnding"),t.consume(B),t.exit("lineEnding"),S}function S(B){return c>0&&$e(B)?Ze(t,U,"linePrefix",c+1)(B):U(B)}function U(B){return B===null||Ae(B)?t.check(Vg,A,G)(B):(t.enter("codeFlowValue"),I(B))}function I(B){return B===null||Ae(B)?(t.exit("codeFlowValue"),U(B)):(t.consume(B),I)}function G(B){return t.exit("codeFenced"),i(B)}function re(B,ae,fe){let me=0;return w;function w(Z){return B.enter("lineEnding"),B.consume(Z),B.exit("lineEnding"),H}function H(Z){return B.enter("codeFencedFence"),$e(Z)?Ze(B,X,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):X(Z)}function X(Z){return Z===h?(B.enter("codeFencedFenceSequence"),ye(Z)):fe(Z)}function ye(Z){return Z===h?(me++,B.consume(Z),ye):me>=u?(B.exit("codeFencedFenceSequence"),$e(Z)?Ze(B,j,"whitespace")(Z):j(Z)):fe(Z)}function j(Z){return Z===null||Ae(Z)?(B.exit("codeFencedFence"),ae(Z)):fe(Z)}}}function t1(t,i,r){const l=this;return o;function o(u){return u===null?r(u):(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),c)}function c(u){return l.parser.lazy[l.now().line]?r(u):i(u)}}const Sd={name:"codeIndented",tokenize:i1},n1={partial:!0,tokenize:r1};function i1(t,i,r){const l=this;return o;function o(p){return t.enter("codeIndented"),Ze(t,c,"linePrefix",5)(p)}function c(p){const b=l.events[l.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?u(p):r(p)}function u(p){return p===null?m(p):Ae(p)?t.attempt(n1,u,m)(p):(t.enter("codeFlowValue"),h(p))}function h(p){return p===null||Ae(p)?(t.exit("codeFlowValue"),u(p)):(t.consume(p),h)}function m(p){return t.exit("codeIndented"),i(p)}}function r1(t,i,r){const l=this;return o;function o(u){return l.parser.lazy[l.now().line]?r(u):Ae(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),o):Ze(t,c,"linePrefix",5)(u)}function c(u){const h=l.events[l.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(u):Ae(u)?o(u):r(u)}}const a1={name:"codeText",previous:s1,resolve:l1,tokenize:o1};function l1(t){let i=t.length-4,r=3,l,o;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(l=r;++l<i;)if(t[l][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(l=r-1,i++;++l<=i;)o===void 0?l!==i&&t[l][1].type!=="lineEnding"&&(o=l):(l===i||t[l][1].type==="lineEnding")&&(t[o][1].type="codeTextData",l!==o+2&&(t[o][1].end=t[l-1][1].end,t.splice(o+2,l-o-2),i-=l-o-2,l=o+2),o=void 0);return t}function s1(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function o1(t,i,r){let l=0,o,c;return u;function u(y){return t.enter("codeText"),t.enter("codeTextSequence"),h(y)}function h(y){return y===96?(t.consume(y),l++,h):(t.exit("codeTextSequence"),m(y))}function m(y){return y===null?r(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),m):y===96?(c=t.enter("codeTextSequence"),o=0,b(y)):Ae(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),m):(t.enter("codeTextData"),p(y))}function p(y){return y===null||y===32||y===96||Ae(y)?(t.exit("codeTextData"),m(y)):(t.consume(y),p)}function b(y){return y===96?(t.consume(y),o++,b):o===l?(t.exit("codeTextSequence"),t.exit("codeText"),i(y)):(c.type="codeTextData",p(y))}}class c1{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const l=r??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(i,l):i>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(i,r,l){const o=r||0;this.setCursor(Math.trunc(i));const c=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return l&&$l(this.left,l),c.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),$l(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),$l(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);$l(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);$l(this.left,r.reverse())}}}function $l(t,i){let r=0;if(i.length<1e4)t.push(...i);else for(;r<i.length;)t.push(...i.slice(r,r+1e4)),r+=1e4}function wy(t){const i={};let r=-1,l,o,c,u,h,m,p;const b=new c1(t);for(;++r<b.length;){for(;r in i;)r=i[r];if(l=b.get(r),r&&l[1].type==="chunkFlow"&&b.get(r-1)[1].type==="listItemPrefix"&&(m=l[1]._tokenizer.events,c=0,c<m.length&&m[c][1].type==="lineEndingBlank"&&(c+=2),c<m.length&&m[c][1].type==="content"))for(;++c<m.length&&m[c][1].type!=="content";)m[c][1].type==="chunkText"&&(m[c][1]._isInFirstContentOfListItem=!0,c++);if(l[0]==="enter")l[1].contentType&&(Object.assign(i,u1(b,r)),r=i[r],p=!0);else if(l[1]._container){for(c=r,o=void 0;c--;)if(u=b.get(c),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(b.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=c);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(l[1].end={...b.get(o)[1].start},h=b.slice(o,r),h.unshift(l),b.splice(o,r-o+1,h))}}return Mn(t,0,Number.POSITIVE_INFINITY,b.slice(0)),!p}function u1(t,i){const r=t.get(i)[1],l=t.get(i)[2];let o=i-1;const c=[];let u=r._tokenizer;u||(u=l.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const h=u.events,m=[],p={};let b,y,E=-1,x=r,k=0,A=0;const C=[A];for(;x;){for(;t.get(++o)[1]!==x;);c.push(o),x._tokenizer||(b=l.sliceStream(x),x.next||b.push(null),y&&u.defineSkip(x.start),x._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(b),x._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),y=x,x=x.next}for(x=r;++E<h.length;)h[E][0]==="exit"&&h[E-1][0]==="enter"&&h[E][1].type===h[E-1][1].type&&h[E][1].start.line!==h[E][1].end.line&&(A=E+1,C.push(A),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(u.events=[],x?(x._tokenizer=void 0,x.previous=void 0):C.pop(),E=C.length;E--;){const S=h.slice(C[E],C[E+1]),U=c.pop();m.push([U,U+S.length-1]),t.splice(U,2,S)}for(m.reverse(),E=-1;++E<m.length;)p[k+m[E][0]]=k+m[E][1],k+=m[E][1]-m[E][0]-1;return p}const d1={resolve:h1,tokenize:p1},f1={partial:!0,tokenize:m1};function h1(t){return wy(t),t}function p1(t,i){let r;return l;function l(h){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),o(h)}function o(h){return h===null?c(h):Ae(h)?t.check(f1,u,c)(h):(t.consume(h),o)}function c(h){return t.exit("chunkContent"),t.exit("content"),i(h)}function u(h){return t.consume(h),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function m1(t,i,r){const l=this;return o;function o(u){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),Ze(t,c,"linePrefix")}function c(u){if(u===null||Ae(u))return r(u);const h=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(u):t.interrupt(l.parser.constructs.flow,r,i)(u)}}function Ty(t,i,r,l,o,c,u,h,m){const p=m||Number.POSITIVE_INFINITY;let b=0;return y;function y(S){return S===60?(t.enter(l),t.enter(o),t.enter(c),t.consume(S),t.exit(c),E):S===null||S===32||S===41||Xo(S)?r(S):(t.enter(l),t.enter(u),t.enter(h),t.enter("chunkString",{contentType:"string"}),A(S))}function E(S){return S===62?(t.enter(c),t.consume(S),t.exit(c),t.exit(o),t.exit(l),i):(t.enter(h),t.enter("chunkString",{contentType:"string"}),x(S))}function x(S){return S===62?(t.exit("chunkString"),t.exit(h),E(S)):S===null||S===60||Ae(S)?r(S):(t.consume(S),S===92?k:x)}function k(S){return S===60||S===62||S===92?(t.consume(S),x):x(S)}function A(S){return!b&&(S===null||S===41||mt(S))?(t.exit("chunkString"),t.exit(h),t.exit(u),t.exit(l),i(S)):b<p&&S===40?(t.consume(S),b++,A):S===41?(t.consume(S),b--,A):S===null||S===32||S===40||Xo(S)?r(S):(t.consume(S),S===92?C:A)}function C(S){return S===40||S===41||S===92?(t.consume(S),A):A(S)}}function Ay(t,i,r,l,o,c){const u=this;let h=0,m;return p;function p(x){return t.enter(l),t.enter(o),t.consume(x),t.exit(o),t.enter(c),b}function b(x){return h>999||x===null||x===91||x===93&&!m||x===94&&!h&&"_hiddenFootnoteSupport"in u.parser.constructs?r(x):x===93?(t.exit(c),t.enter(o),t.consume(x),t.exit(o),t.exit(l),i):Ae(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),b):(t.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===null||x===91||x===93||Ae(x)||h++>999?(t.exit("chunkString"),b(x)):(t.consume(x),m||(m=!$e(x)),x===92?E:y)}function E(x){return x===91||x===92||x===93?(t.consume(x),h++,y):y(x)}}function Cy(t,i,r,l,o,c){let u;return h;function h(E){return E===34||E===39||E===40?(t.enter(l),t.enter(o),t.consume(E),t.exit(o),u=E===40?41:E,m):r(E)}function m(E){return E===u?(t.enter(o),t.consume(E),t.exit(o),t.exit(l),i):(t.enter(c),p(E))}function p(E){return E===u?(t.exit(c),m(u)):E===null?r(E):Ae(E)?(t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),Ze(t,p,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===u||E===null||Ae(E)?(t.exit("chunkString"),p(E)):(t.consume(E),E===92?y:b)}function y(E){return E===u||E===92?(t.consume(E),b):b(E)}}function Zl(t,i){let r;return l;function l(o){return Ae(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),r=!0,l):$e(o)?Ze(t,l,r?"linePrefix":"lineSuffix")(o):i(o)}}const g1={name:"definition",tokenize:y1},b1={partial:!0,tokenize:v1};function y1(t,i,r){const l=this;let o;return c;function c(x){return t.enter("definition"),u(x)}function u(x){return Ay.call(l,t,h,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function h(x){return o=Xn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),x===58?(t.enter("definitionMarker"),t.consume(x),t.exit("definitionMarker"),m):r(x)}function m(x){return mt(x)?Zl(t,p)(x):p(x)}function p(x){return Ty(t,b,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function b(x){return t.attempt(b1,y,y)(x)}function y(x){return $e(x)?Ze(t,E,"whitespace")(x):E(x)}function E(x){return x===null||Ae(x)?(t.exit("definition"),l.parser.defined.push(o),i(x)):r(x)}}function v1(t,i,r){return l;function l(h){return mt(h)?Zl(t,o)(h):r(h)}function o(h){return Cy(t,c,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function c(h){return $e(h)?Ze(t,u,"whitespace")(h):u(h)}function u(h){return h===null||Ae(h)?i(h):r(h)}}const x1={name:"hardBreakEscape",tokenize:E1};function E1(t,i,r){return l;function l(c){return t.enter("hardBreakEscape"),t.consume(c),o}function o(c){return Ae(c)?(t.exit("hardBreakEscape"),i(c)):r(c)}}const _1={name:"headingAtx",resolve:S1,tokenize:k1};function S1(t,i){let r=t.length-2,l=3,o,c;return t[l][1].type==="whitespace"&&(l+=2),r-2>l&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(l===r-1||r-4>l&&t[r-2][1].type==="whitespace")&&(r-=l+1===r?2:4),r>l&&(o={type:"atxHeadingText",start:t[l][1].start,end:t[r][1].end},c={type:"chunkText",start:t[l][1].start,end:t[r][1].end,contentType:"text"},Mn(t,l,r-l+1,[["enter",o,i],["enter",c,i],["exit",c,i],["exit",o,i]])),t}function k1(t,i,r){let l=0;return o;function o(b){return t.enter("atxHeading"),c(b)}function c(b){return t.enter("atxHeadingSequence"),u(b)}function u(b){return b===35&&l++<6?(t.consume(b),u):b===null||mt(b)?(t.exit("atxHeadingSequence"),h(b)):r(b)}function h(b){return b===35?(t.enter("atxHeadingSequence"),m(b)):b===null||Ae(b)?(t.exit("atxHeading"),i(b)):$e(b)?Ze(t,h,"whitespace")(b):(t.enter("atxHeadingText"),p(b))}function m(b){return b===35?(t.consume(b),m):(t.exit("atxHeadingSequence"),h(b))}function p(b){return b===null||b===35||mt(b)?(t.exit("atxHeadingText"),h(b)):(t.consume(b),p)}}const N1=["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"],Xg=["pre","script","style","textarea"],w1={concrete:!0,name:"htmlFlow",resolveTo:C1,tokenize:O1},T1={partial:!0,tokenize:R1},A1={partial:!0,tokenize:M1};function C1(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function O1(t,i,r){const l=this;let o,c,u,h,m;return p;function p(N){return b(N)}function b(N){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(N),y}function y(N){return N===33?(t.consume(N),E):N===47?(t.consume(N),c=!0,A):N===63?(t.consume(N),o=3,l.interrupt?i:T):on(N)?(t.consume(N),u=String.fromCharCode(N),C):r(N)}function E(N){return N===45?(t.consume(N),o=2,x):N===91?(t.consume(N),o=5,h=0,k):on(N)?(t.consume(N),o=4,l.interrupt?i:T):r(N)}function x(N){return N===45?(t.consume(N),l.interrupt?i:T):r(N)}function k(N){const pe="CDATA[";return N===pe.charCodeAt(h++)?(t.consume(N),h===pe.length?l.interrupt?i:X:k):r(N)}function A(N){return on(N)?(t.consume(N),u=String.fromCharCode(N),C):r(N)}function C(N){if(N===null||N===47||N===62||mt(N)){const pe=N===47,Ne=u.toLowerCase();return!pe&&!c&&Xg.includes(Ne)?(o=1,l.interrupt?i(N):X(N)):N1.includes(u.toLowerCase())?(o=6,pe?(t.consume(N),S):l.interrupt?i(N):X(N)):(o=7,l.interrupt&&!l.parser.lazy[l.now().line]?r(N):c?U(N):I(N))}return N===45||en(N)?(t.consume(N),u+=String.fromCharCode(N),C):r(N)}function S(N){return N===62?(t.consume(N),l.interrupt?i:X):r(N)}function U(N){return $e(N)?(t.consume(N),U):w(N)}function I(N){return N===47?(t.consume(N),w):N===58||N===95||on(N)?(t.consume(N),G):$e(N)?(t.consume(N),I):w(N)}function G(N){return N===45||N===46||N===58||N===95||en(N)?(t.consume(N),G):re(N)}function re(N){return N===61?(t.consume(N),B):$e(N)?(t.consume(N),re):I(N)}function B(N){return N===null||N===60||N===61||N===62||N===96?r(N):N===34||N===39?(t.consume(N),m=N,ae):$e(N)?(t.consume(N),B):fe(N)}function ae(N){return N===m?(t.consume(N),m=null,me):N===null||Ae(N)?r(N):(t.consume(N),ae)}function fe(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||mt(N)?re(N):(t.consume(N),fe)}function me(N){return N===47||N===62||$e(N)?I(N):r(N)}function w(N){return N===62?(t.consume(N),H):r(N)}function H(N){return N===null||Ae(N)?X(N):$e(N)?(t.consume(N),H):r(N)}function X(N){return N===45&&o===2?(t.consume(N),D):N===60&&o===1?(t.consume(N),W):N===62&&o===4?(t.consume(N),O):N===63&&o===3?(t.consume(N),T):N===93&&o===5?(t.consume(N),ue):Ae(N)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(T1,q,ye)(N)):N===null||Ae(N)?(t.exit("htmlFlowData"),ye(N)):(t.consume(N),X)}function ye(N){return t.check(A1,j,q)(N)}function j(N){return t.enter("lineEnding"),t.consume(N),t.exit("lineEnding"),Z}function Z(N){return N===null||Ae(N)?ye(N):(t.enter("htmlFlowData"),X(N))}function D(N){return N===45?(t.consume(N),T):X(N)}function W(N){return N===47?(t.consume(N),u="",ee):X(N)}function ee(N){if(N===62){const pe=u.toLowerCase();return Xg.includes(pe)?(t.consume(N),O):X(N)}return on(N)&&u.length<8?(t.consume(N),u+=String.fromCharCode(N),ee):X(N)}function ue(N){return N===93?(t.consume(N),T):X(N)}function T(N){return N===62?(t.consume(N),O):N===45&&o===2?(t.consume(N),T):X(N)}function O(N){return N===null||Ae(N)?(t.exit("htmlFlowData"),q(N)):(t.consume(N),O)}function q(N){return t.exit("htmlFlow"),i(N)}}function M1(t,i,r){const l=this;return o;function o(u){return Ae(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),c):r(u)}function c(u){return l.parser.lazy[l.now().line]?r(u):i(u)}}function R1(t,i,r){return l;function l(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(os,i,r)}}const D1={name:"htmlText",tokenize:I1};function I1(t,i,r){const l=this;let o,c,u;return h;function h(T){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(T),m}function m(T){return T===33?(t.consume(T),p):T===47?(t.consume(T),re):T===63?(t.consume(T),I):on(T)?(t.consume(T),fe):r(T)}function p(T){return T===45?(t.consume(T),b):T===91?(t.consume(T),c=0,k):on(T)?(t.consume(T),U):r(T)}function b(T){return T===45?(t.consume(T),x):r(T)}function y(T){return T===null?r(T):T===45?(t.consume(T),E):Ae(T)?(u=y,W(T)):(t.consume(T),y)}function E(T){return T===45?(t.consume(T),x):y(T)}function x(T){return T===62?D(T):T===45?E(T):y(T)}function k(T){const O="CDATA[";return T===O.charCodeAt(c++)?(t.consume(T),c===O.length?A:k):r(T)}function A(T){return T===null?r(T):T===93?(t.consume(T),C):Ae(T)?(u=A,W(T)):(t.consume(T),A)}function C(T){return T===93?(t.consume(T),S):A(T)}function S(T){return T===62?D(T):T===93?(t.consume(T),S):A(T)}function U(T){return T===null||T===62?D(T):Ae(T)?(u=U,W(T)):(t.consume(T),U)}function I(T){return T===null?r(T):T===63?(t.consume(T),G):Ae(T)?(u=I,W(T)):(t.consume(T),I)}function G(T){return T===62?D(T):I(T)}function re(T){return on(T)?(t.consume(T),B):r(T)}function B(T){return T===45||en(T)?(t.consume(T),B):ae(T)}function ae(T){return Ae(T)?(u=ae,W(T)):$e(T)?(t.consume(T),ae):D(T)}function fe(T){return T===45||en(T)?(t.consume(T),fe):T===47||T===62||mt(T)?me(T):r(T)}function me(T){return T===47?(t.consume(T),D):T===58||T===95||on(T)?(t.consume(T),w):Ae(T)?(u=me,W(T)):$e(T)?(t.consume(T),me):D(T)}function w(T){return T===45||T===46||T===58||T===95||en(T)?(t.consume(T),w):H(T)}function H(T){return T===61?(t.consume(T),X):Ae(T)?(u=H,W(T)):$e(T)?(t.consume(T),H):me(T)}function X(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(t.consume(T),o=T,ye):Ae(T)?(u=X,W(T)):$e(T)?(t.consume(T),X):(t.consume(T),j)}function ye(T){return T===o?(t.consume(T),o=void 0,Z):T===null?r(T):Ae(T)?(u=ye,W(T)):(t.consume(T),ye)}function j(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||mt(T)?me(T):(t.consume(T),j)}function Z(T){return T===47||T===62||mt(T)?me(T):r(T)}function D(T){return T===62?(t.consume(T),t.exit("htmlTextData"),t.exit("htmlText"),i):r(T)}function W(T){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),ee}function ee(T){return $e(T)?Ze(t,ue,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):ue(T)}function ue(T){return t.enter("htmlTextData"),u(T)}}const Af={name:"labelEnd",resolveAll:z1,resolveTo:j1,tokenize:H1},L1={tokenize:F1},U1={tokenize:P1},B1={tokenize:G1};function z1(t){let i=-1;const r=[];for(;++i<t.length;){const l=t[i][1];if(r.push(t[i]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const o=l.type==="labelImage"?4:2;l.type="data",i+=o}}return t.length!==r.length&&Mn(t,0,t.length,r),t}function j1(t,i){let r=t.length,l=0,o,c,u,h;for(;r--;)if(o=t[r][1],c){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&&(c=r,o.type!=="labelLink")){l=2;break}}else o.type==="labelEnd"&&(u=r);const m={type:t[c][1].type==="labelLink"?"link":"image",start:{...t[c][1].start},end:{...t[t.length-1][1].end}},p={type:"label",start:{...t[c][1].start},end:{...t[u][1].end}},b={type:"labelText",start:{...t[c+l+2][1].end},end:{...t[u-2][1].start}};return h=[["enter",m,i],["enter",p,i]],h=Gn(h,t.slice(c+1,c+l+3)),h=Gn(h,[["enter",b,i]]),h=Gn(h,lc(i.parser.constructs.insideSpan.null,t.slice(c+l+4,u-3),i)),h=Gn(h,[["exit",b,i],t[u-2],t[u-1],["exit",p,i]]),h=Gn(h,t.slice(u+1)),h=Gn(h,[["exit",m,i]]),Mn(t,c,t.length,h),t}function H1(t,i,r){const l=this;let o=l.events.length,c,u;for(;o--;)if((l.events[o][1].type==="labelImage"||l.events[o][1].type==="labelLink")&&!l.events[o][1]._balanced){c=l.events[o][1];break}return h;function h(E){return c?c._inactive?y(E):(u=l.parser.defined.includes(Xn(l.sliceSerialize({start:c.end,end:l.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(E),t.exit("labelMarker"),t.exit("labelEnd"),m):r(E)}function m(E){return E===40?t.attempt(L1,b,u?b:y)(E):E===91?t.attempt(U1,b,u?p:y)(E):u?b(E):y(E)}function p(E){return t.attempt(B1,b,y)(E)}function b(E){return i(E)}function y(E){return c._balanced=!0,r(E)}}function F1(t,i,r){return l;function l(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),o}function o(y){return mt(y)?Zl(t,c)(y):c(y)}function c(y){return y===41?b(y):Ty(t,u,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function u(y){return mt(y)?Zl(t,m)(y):b(y)}function h(y){return r(y)}function m(y){return y===34||y===39||y===40?Cy(t,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):b(y)}function p(y){return mt(y)?Zl(t,b)(y):b(y)}function b(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),i):r(y)}}function P1(t,i,r){const l=this;return o;function o(h){return Ay.call(l,t,c,u,"reference","referenceMarker","referenceString")(h)}function c(h){return l.parser.defined.includes(Xn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?i(h):r(h)}function u(h){return r(h)}}function G1(t,i,r){return l;function l(c){return t.enter("reference"),t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),o}function o(c){return c===93?(t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),t.exit("reference"),i):r(c)}}const $1={name:"labelStartImage",resolveAll:Af.resolveAll,tokenize:K1};function K1(t,i,r){const l=this;return o;function o(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),c}function c(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),u):r(h)}function u(h){return h===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(h):i(h)}}const q1={name:"labelStartLink",resolveAll:Af.resolveAll,tokenize:V1};function V1(t,i,r){const l=this;return o;function o(u){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(u),t.exit("labelMarker"),t.exit("labelLink"),c}function c(u){return u===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(u):i(u)}}const kd={name:"lineEnding",tokenize:Y1};function Y1(t,i){return r;function r(l){return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),Ze(t,i,"linePrefix")}}const $o={name:"thematicBreak",tokenize:X1};function X1(t,i,r){let l=0,o;return c;function c(p){return t.enter("thematicBreak"),u(p)}function u(p){return o=p,h(p)}function h(p){return p===o?(t.enter("thematicBreakSequence"),m(p)):l>=3&&(p===null||Ae(p))?(t.exit("thematicBreak"),i(p)):r(p)}function m(p){return p===o?(t.consume(p),l++,m):(t.exit("thematicBreakSequence"),$e(p)?Ze(t,h,"whitespace")(p):h(p))}}const yn={continuation:{tokenize:W1},exit:tS,name:"list",tokenize:J1},Z1={partial:!0,tokenize:nS},Q1={partial:!0,tokenize:eS};function J1(t,i,r){const l=this,o=l.events[l.events.length-1];let c=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return h;function h(x){const k=l.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!l.containerState.marker||x===l.containerState.marker:ef(x)){if(l.containerState.type||(l.containerState.type=k,t.enter(k,{_container:!0})),k==="listUnordered")return t.enter("listItemPrefix"),x===42||x===45?t.check($o,r,p)(x):p(x);if(!l.interrupt||x===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),m(x)}return r(x)}function m(x){return ef(x)&&++u<10?(t.consume(x),m):(!l.interrupt||u<2)&&(l.containerState.marker?x===l.containerState.marker:x===41||x===46)?(t.exit("listItemValue"),p(x)):r(x)}function p(x){return t.enter("listItemMarker"),t.consume(x),t.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||x,t.check(os,l.interrupt?r:b,t.attempt(Z1,E,y))}function b(x){return l.containerState.initialBlankLine=!0,c++,E(x)}function y(x){return $e(x)?(t.enter("listItemPrefixWhitespace"),t.consume(x),t.exit("listItemPrefixWhitespace"),E):r(x)}function E(x){return l.containerState.size=c+l.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(x)}}function W1(t,i,r){const l=this;return l.containerState._closeFlow=void 0,t.check(os,o,c);function o(h){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Ze(t,i,"listItemIndent",l.containerState.size+1)(h)}function c(h){return l.containerState.furtherBlankLines||!$e(h)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,u(h)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,t.attempt(Q1,i,u)(h))}function u(h){return l.containerState._closeFlow=!0,l.interrupt=void 0,Ze(t,t.attempt(yn,i,r),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function eS(t,i,r){const l=this;return Ze(t,o,"listItemIndent",l.containerState.size+1);function o(c){const u=l.events[l.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===l.containerState.size?i(c):r(c)}}function tS(t){t.exit(this.containerState.type)}function nS(t,i,r){const l=this;return Ze(t,o,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(c){const u=l.events[l.events.length-1];return!$e(c)&&u&&u[1].type==="listItemPrefixWhitespace"?i(c):r(c)}}const Zg={name:"setextUnderline",resolveTo:iS,tokenize:rS};function iS(t,i){let r=t.length,l,o,c;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){l=r;break}t[r][1].type==="paragraph"&&(o=r)}else t[r][1].type==="content"&&t.splice(r,1),!c&&t[r][1].type==="definition"&&(c=r);const u={type:"setextHeading",start:{...t[l][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",c?(t.splice(o,0,["enter",u,i]),t.splice(c+1,0,["exit",t[l][1],i]),t[l][1].end={...t[c][1].end}):t[l][1]=u,t.push(["exit",u,i]),t}function rS(t,i,r){const l=this;let o;return c;function c(p){let b=l.events.length,y;for(;b--;)if(l.events[b][1].type!=="lineEnding"&&l.events[b][1].type!=="linePrefix"&&l.events[b][1].type!=="content"){y=l.events[b][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||y)?(t.enter("setextHeadingLine"),o=p,u(p)):r(p)}function u(p){return t.enter("setextHeadingLineSequence"),h(p)}function h(p){return p===o?(t.consume(p),h):(t.exit("setextHeadingLineSequence"),$e(p)?Ze(t,m,"lineSuffix")(p):m(p))}function m(p){return p===null||Ae(p)?(t.exit("setextHeadingLine"),i(p)):r(p)}}const aS={tokenize:lS};function lS(t){const i=this,r=t.attempt(os,l,t.attempt(this.parser.constructs.flowInitial,o,Ze(t,t.attempt(this.parser.constructs.flow,o,t.attempt(d1,o)),"linePrefix")));return r;function l(c){if(c===null){t.consume(c);return}return t.enter("lineEndingBlank"),t.consume(c),t.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function o(c){if(c===null){t.consume(c);return}return t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const sS={resolveAll:My()},oS=Oy("string"),cS=Oy("text");function Oy(t){return{resolveAll:My(t==="text"?uS:void 0),tokenize:i};function i(r){const l=this,o=this.parser.constructs[t],c=r.attempt(o,u,h);return u;function u(b){return p(b)?c(b):h(b)}function h(b){if(b===null){r.consume(b);return}return r.enter("data"),r.consume(b),m}function m(b){return p(b)?(r.exit("data"),c(b)):(r.consume(b),m)}function p(b){if(b===null)return!0;const y=o[b];let E=-1;if(y)for(;++E<y.length;){const x=y[E];if(!x.previous||x.previous.call(l,l.previous))return!0}return!1}}}function My(t){return i;function i(r,l){let o=-1,c;for(;++o<=r.length;)c===void 0?r[o]&&r[o][1].type==="data"&&(c=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==c+2&&(r[c][1].end=r[o-1][1].end,r.splice(c+2,o-c-2),o=c+2),c=void 0);return t?t(r,l):r}}function uS(t,i){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const l=t[r-1][1],o=i.sliceStream(l);let c=o.length,u=-1,h=0,m;for(;c--;){const p=o[c];if(typeof p=="string"){for(u=p.length;p.charCodeAt(u-1)===32;)h++,u--;if(u)break;u=-1}else if(p===-2)m=!0,h++;else if(p!==-1){c++;break}}if(i._contentTypeTextTrailing&&r===t.length&&(h=0),h){const p={type:r===t.length||m||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?u:l.start._bufferIndex+u,_index:l.start._index+c,line:l.end.line,column:l.end.column-h,offset:l.end.offset-h},end:{...l.end}};l.end={...p.start},l.start.offset===l.end.offset?Object.assign(l,p):(t.splice(r,0,["enter",p,i],["exit",p,i]),r+=2)}r++}return t}const dS={42:yn,43:yn,45:yn,48:yn,49:yn,50:yn,51:yn,52:yn,53:yn,54:yn,55:yn,56:yn,57:yn,62:Sy},fS={91:g1},hS={[-2]:Sd,[-1]:Sd,32:Sd},pS={35:_1,42:$o,45:[Zg,$o],60:w1,61:Zg,95:$o,96:Yg,126:Yg},mS={38:Ny,92:ky},gS={[-5]:kd,[-4]:kd,[-3]:kd,33:$1,38:Ny,42:tf,60:[q_,D1],91:q1,92:[x1,ky],93:Af,95:tf,96:a1},bS={null:[tf,sS]},yS={null:[42,95]},vS={null:[]},xS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yS,contentInitial:fS,disable:vS,document:dS,flow:pS,flowInitial:hS,insideSpan:bS,string:mS,text:gS},Symbol.toStringTag,{value:"Module"}));function ES(t,i,r){let l={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},c=[];let u=[],h=[];const m={attempt:ae(re),check:ae(B),consume:U,enter:I,exit:G,interrupt:ae(B,{interrupt:!0})},p={code:null,containerState:{},defineSkip:A,events:[],now:k,parser:t,previous:null,sliceSerialize:E,sliceStream:x,write:y};let b=i.tokenize.call(p,m);return i.resolveAll&&c.push(i),p;function y(H){return u=Gn(u,H),C(),u[u.length-1]!==null?[]:(fe(i,0),p.events=lc(c,p.events,p),p.events)}function E(H,X){return SS(x(H),X)}function x(H){return _S(u,H)}function k(){const{_bufferIndex:H,_index:X,line:ye,column:j,offset:Z}=l;return{_bufferIndex:H,_index:X,line:ye,column:j,offset:Z}}function A(H){o[H.line]=H.column,w()}function C(){let H;for(;l._index<u.length;){const X=u[l._index];if(typeof X=="string")for(H=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===H&&l._bufferIndex<X.length;)S(X.charCodeAt(l._bufferIndex));else S(X)}}function S(H){b=b(H)}function U(H){Ae(H)?(l.line++,l.column=1,l.offset+=H===-3?2:1,w()):H!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===u[l._index].length&&(l._bufferIndex=-1,l._index++)),p.previous=H}function I(H,X){const ye=X||{};return ye.type=H,ye.start=k(),p.events.push(["enter",ye,p]),h.push(ye),ye}function G(H){const X=h.pop();return X.end=k(),p.events.push(["exit",X,p]),X}function re(H,X){fe(H,X.from)}function B(H,X){X.restore()}function ae(H,X){return ye;function ye(j,Z,D){let W,ee,ue,T;return Array.isArray(j)?q(j):"tokenize"in j?q([j]):O(j);function O(K){return le;function le(ve){const be=ve!==null&&K[ve],De=ve!==null&&K.null,Et=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(De)?De:De?[De]:[]];return q(Et)(ve)}}function q(K){return W=K,ee=0,K.length===0?D:N(K[ee])}function N(K){return le;function le(ve){return T=me(),ue=K,K.partial||(p.currentConstruct=K),K.name&&p.parser.constructs.disable.null.includes(K.name)?Ne():K.tokenize.call(X?Object.assign(Object.create(p),X):p,m,pe,Ne)(ve)}}function pe(K){return H(ue,T),Z}function Ne(K){return T.restore(),++ee<W.length?N(W[ee]):D}}}function fe(H,X){H.resolveAll&&!c.includes(H)&&c.push(H),H.resolve&&Mn(p.events,X,p.events.length-X,H.resolve(p.events.slice(X),p)),H.resolveTo&&(p.events=H.resolveTo(p.events,p))}function me(){const H=k(),X=p.previous,ye=p.currentConstruct,j=p.events.length,Z=Array.from(h);return{from:j,restore:D};function D(){l=H,p.previous=X,p.currentConstruct=ye,p.events.length=j,h=Z,w()}}function w(){l.line in o&&l.column<2&&(l.column=o[l.line],l.offset+=o[l.line]-1)}}function _S(t,i){const r=i.start._index,l=i.start._bufferIndex,o=i.end._index,c=i.end._bufferIndex;let u;if(r===o)u=[t[r].slice(l,c)];else{if(u=t.slice(r,o),l>-1){const h=u[0];typeof h=="string"?u[0]=h.slice(l):u.shift()}c>0&&u.push(t[o].slice(0,c))}return u}function SS(t,i){let r=-1;const l=[];let o;for(;++r<t.length;){const c=t[r];let u;if(typeof c=="string")u=c;else switch(c){case-5:{u="\r";break}case-4:{u=`
51
- `;break}case-3:{u=`\r
52
- `;break}case-2:{u=i?" ":" ";break}case-1:{if(!i&&o)continue;u=" ";break}default:u=String.fromCharCode(c)}o=c===-2,l.push(u)}return l.join("")}function kS(t){const l={constructs:Ey([xS,...(t||{}).extensions||[]]),content:o(j_),defined:[],document:o(F_),flow:o(aS),lazy:{},string:o(oS),text:o(cS)};return l;function o(c){return u;function u(h){return ES(l,c,h)}}}function NS(t){for(;!wy(t););return t}const Qg=/[\0\t\n\r]/g;function wS(){let t=1,i="",r=!0,l;return o;function o(c,u,h){const m=[];let p,b,y,E,x;for(c=i+(typeof c=="string"?c.toString():new TextDecoder(u||void 0).decode(c)),y=0,i="",r&&(c.charCodeAt(0)===65279&&y++,r=void 0);y<c.length;){if(Qg.lastIndex=y,p=Qg.exec(c),E=p&&p.index!==void 0?p.index:c.length,x=c.charCodeAt(E),!p){i=c.slice(y);break}if(x===10&&y===E&&l)m.push(-3),l=void 0;else switch(l&&(m.push(-5),l=void 0),y<E&&(m.push(c.slice(y,E)),t+=E-y),x){case 0:{m.push(65533),t++;break}case 9:{for(b=Math.ceil(t/4)*4,m.push(-2);t++<b;)m.push(-1);break}case 10:{m.push(-4),t=1;break}default:l=!0,t=1}y=E+1}return h&&(l&&m.push(-5),i&&m.push(i),m.push(null)),m}}const TS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function AS(t){return t.replace(TS,CS)}function CS(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),c=o===120||o===88;return _y(r.slice(c?2:1),c?16:10)}return Tf(r)||t}const Ry={}.hasOwnProperty;function OS(t,i,r){return typeof i!="string"&&(r=i,i=void 0),MS(r)(NS(kS(r).document().write(wS()(t,i,!0))))}function MS(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(Qn),autolinkProtocol:me,autolinkEmail:me,atxHeading:c(Zn),blockQuote:c(De),characterEscape:me,characterReference:me,codeFenced:c(Et),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:c(Et,u),codeText:c(wt,u),codeTextData:me,data:me,codeFlowValue:me,definition:c(Di),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:c(xn),hardBreakEscape:c(Ye),hardBreakTrailing:c(Ye),htmlFlow:c($n,u),htmlFlowData:me,htmlText:c($n,u),htmlTextData:me,image:c(Rn),label:u,link:c(Qn),listItem:c(mr),listItemValue:E,listOrdered:c(ci,y),listUnordered:c(ci),paragraph:c(Ka),reference:N,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:c(Zn),strong:c(Gr),thematicBreak:c($r)},exit:{atxHeading:m(),atxHeadingSequence:re,autolink:m(),autolinkEmail:be,autolinkProtocol:ve,blockQuote:m(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:K,characterReference:le,codeFenced:m(C),codeFencedFence:A,codeFencedFenceInfo:x,codeFencedFenceMeta:k,codeFlowValue:w,codeIndented:m(S),codeText:m(Z),codeTextData:w,data:w,definition:m(),definitionDestinationString:G,definitionLabelString:U,definitionTitleString:I,emphasis:m(),hardBreakEscape:m(X),hardBreakTrailing:m(X),htmlFlow:m(ye),htmlFlowData:w,htmlText:m(j),htmlTextData:w,image:m(W),label:ue,labelText:ee,lineEnding:H,link:m(D),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:pe,resourceDestinationString:T,resourceTitleString:O,resource:q,setextHeading:m(fe),setextHeadingLineSequence:ae,setextHeadingText:B,strong:m(),thematicBreak:m()}};Dy(i,(t||{}).mdastExtensions||[]);const r={};return l;function l(Q){let de={type:"root",children:[]};const Ce={stack:[de],tokenStack:[],config:i,enter:h,exit:p,buffer:u,resume:b,data:r},He=[];let Qe=-1;for(;++Qe<Q.length;)if(Q[Qe][1].type==="listOrdered"||Q[Qe][1].type==="listUnordered")if(Q[Qe][0]==="enter")He.push(Qe);else{const nn=He.pop();Qe=o(Q,nn,Qe)}for(Qe=-1;++Qe<Q.length;){const nn=i[Q[Qe][0]];Ry.call(nn,Q[Qe][1].type)&&nn[Q[Qe][1].type].call(Object.assign({sliceSerialize:Q[Qe][2].sliceSerialize},Ce),Q[Qe][1])}if(Ce.tokenStack.length>0){const nn=Ce.tokenStack[Ce.tokenStack.length-1];(nn[1]||Jg).call(Ce,void 0,nn[0])}for(de.position={start:or(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:or(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Qe=-1;++Qe<i.transforms.length;)de=i.transforms[Qe](de)||de;return de}function o(Q,de,Ce){let He=de-1,Qe=-1,nn=!1,Kn,$t,Tt,Zt;for(;++He<=Ce;){const it=Q[He];switch(it[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{it[0]==="enter"?Qe++:Qe--,Zt=void 0;break}case"lineEndingBlank":{it[0]==="enter"&&(Kn&&!Zt&&!Qe&&!Tt&&(Tt=He),Zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Zt=void 0}if(!Qe&&it[0]==="enter"&&it[1].type==="listItemPrefix"||Qe===-1&&it[0]==="exit"&&(it[1].type==="listUnordered"||it[1].type==="listOrdered")){if(Kn){let Jn=He;for($t=void 0;Jn--;){const rn=Q[Jn];if(rn[1].type==="lineEnding"||rn[1].type==="lineEndingBlank"){if(rn[0]==="exit")continue;$t&&(Q[$t][1].type="lineEndingBlank",nn=!0),rn[1].type="lineEnding",$t=Jn}else if(!(rn[1].type==="linePrefix"||rn[1].type==="blockQuotePrefix"||rn[1].type==="blockQuotePrefixWhitespace"||rn[1].type==="blockQuoteMarker"||rn[1].type==="listItemIndent"))break}Tt&&(!$t||Tt<$t)&&(Kn._spread=!0),Kn.end=Object.assign({},$t?Q[$t][1].start:it[1].end),Q.splice($t||He,0,["exit",Kn,it[2]]),He++,Ce++}if(it[1].type==="listItemPrefix"){const Jn={type:"listItem",_spread:!1,start:Object.assign({},it[1].start),end:void 0};Kn=Jn,Q.splice(He,0,["enter",Jn,it[2]]),He++,Ce++,Tt=void 0,Zt=!0}}}return Q[de][1]._spread=nn,Ce}function c(Q,de){return Ce;function Ce(He){h.call(this,Q(He),He),de&&de.call(this,He)}}function u(){this.stack.push({type:"fragment",children:[]})}function h(Q,de,Ce){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([de,Ce||void 0]),Q.position={start:or(de.start),end:void 0}}function m(Q){return de;function de(Ce){Q&&Q.call(this,Ce),p.call(this,Ce)}}function p(Q,de){const Ce=this.stack.pop(),He=this.tokenStack.pop();if(He)He[0].type!==Q.type&&(de?de.call(this,Q,He[0]):(He[1]||Jg).call(this,Q,He[0]));else throw new Error("Cannot close `"+Q.type+"` ("+Xl({start:Q.start,end:Q.end})+"): it’s not open");Ce.position.end=or(Q.end)}function b(){return wf(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function E(Q){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function x(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.lang=Q}function k(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.meta=Q}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q.replace(/(\r?\n|\r)$/g,"")}function U(Q){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=Xn(this.sliceSerialize(Q)).toLowerCase()}function I(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.title=Q}function G(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.url=Q}function re(Q){const de=this.stack[this.stack.length-1];if(!de.depth){const Ce=this.sliceSerialize(Q).length;de.depth=Ce}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function ae(Q){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function fe(){this.data.setextHeadingSlurpLineEnding=void 0}function me(Q){const Ce=this.stack[this.stack.length-1].children;let He=Ce[Ce.length-1];(!He||He.type!=="text")&&(He=kt(),He.position={start:or(Q.start),end:void 0},Ce.push(He)),this.stack.push(He)}function w(Q){const de=this.stack.pop();de.value+=this.sliceSerialize(Q),de.position.end=or(Q.end)}function H(Q){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=de.children[de.children.length-1];Ce.position.end=or(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(de.type)&&(me.call(this,Q),w.call(this,Q))}function X(){this.data.atHardBreak=!0}function ye(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q}function j(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q}function Z(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q}function D(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=de,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function W(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=de,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function ee(Q){const de=this.sliceSerialize(Q),Ce=this.stack[this.stack.length-2];Ce.label=AS(de),Ce.identifier=Xn(de).toLowerCase()}function ue(){const Q=this.stack[this.stack.length-1],de=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const He=Q.children;Ce.children=He}else Ce.alt=de}function T(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.url=Q}function O(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.title=Q}function q(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function pe(Q){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=Xn(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function Ne(Q){this.data.characterReferenceType=Q.type}function K(Q){const de=this.sliceSerialize(Q),Ce=this.data.characterReferenceType;let He;Ce?(He=_y(de,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):He=Tf(de);const Qe=this.stack[this.stack.length-1];Qe.value+=He}function le(Q){const de=this.stack.pop();de.position.end=or(Q.end)}function ve(Q){w.call(this,Q);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(Q)}function be(Q){w.call(this,Q);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(Q)}function De(){return{type:"blockquote",children:[]}}function Et(){return{type:"code",lang:null,meta:null,value:""}}function wt(){return{type:"inlineCode",value:""}}function Di(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xn(){return{type:"emphasis",children:[]}}function Zn(){return{type:"heading",depth:0,children:[]}}function Ye(){return{type:"break"}}function $n(){return{type:"html",value:""}}function Rn(){return{type:"image",title:null,url:"",alt:null}}function Qn(){return{type:"link",title:null,url:"",children:[]}}function ci(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function mr(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Ka(){return{type:"paragraph",children:[]}}function Gr(){return{type:"strong",children:[]}}function kt(){return{type:"text",value:""}}function $r(){return{type:"thematicBreak"}}}function or(t){return{line:t.line,column:t.column,offset:t.offset}}function Dy(t,i){let r=-1;for(;++r<i.length;){const l=i[r];Array.isArray(l)?Dy(t,l):RS(t,l)}}function RS(t,i){let r;for(r in i)if(Ry.call(i,r))switch(r){case"canContainEols":{const l=i[r];l&&t[r].push(...l);break}case"transforms":{const l=i[r];l&&t[r].push(...l);break}case"enter":case"exit":{const l=i[r];l&&Object.assign(t[r],l);break}}}function Jg(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+Xl({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+Xl({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+Xl({start:i.start,end:i.end})+") is still open")}function DS(t){const i=this;i.parser=r;function r(l){return OS(l,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function IS(t,i){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,r),t.applyData(i,r)}function LS(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
53
- `}]}function US(t,i){const r=i.value?i.value+`
54
- `:"",l={},o=i.lang?i.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let c={type:"element",tagName:"code",properties:l,children:[{type:"text",value:r}]};return i.meta&&(c.data={meta:i.meta}),t.patch(i,c),c=t.applyData(i,c),c={type:"element",tagName:"pre",properties:{},children:[c]},t.patch(i,c),c}function BS(t,i){const r={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function zS(t,i){const r={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function jS(t,i){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",l=String(i.identifier).toUpperCase(),o=$a(l.toLowerCase()),c=t.footnoteOrder.indexOf(l);let u,h=t.footnoteCounts.get(l);h===void 0?(h=0,t.footnoteOrder.push(l),u=t.footnoteOrder.length):u=c+1,h+=1,t.footnoteCounts.set(l,h);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};t.patch(i,m);const p={type:"element",tagName:"sup",properties:{},children:[m]};return t.patch(i,p),t.applyData(i,p)}function HS(t,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function FS(t,i){if(t.options.allowDangerousHtml){const r={type:"raw",value:i.value};return t.patch(i,r),t.applyData(i,r)}}function Iy(t,i){const r=i.referenceType;let l="]";if(r==="collapsed"?l+="[]":r==="full"&&(l+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+l}];const o=t.all(i),c=o[0];c&&c.type==="text"?c.value="["+c.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=l:o.push({type:"text",value:l}),o}function PS(t,i){const r=String(i.identifier).toUpperCase(),l=t.definitionById.get(r);if(!l)return Iy(t,i);const o={src:$a(l.url||""),alt:i.alt};l.title!==null&&l.title!==void 0&&(o.title=l.title);const c={type:"element",tagName:"img",properties:o,children:[]};return t.patch(i,c),t.applyData(i,c)}function GS(t,i){const r={src:$a(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const l={type:"element",tagName:"img",properties:r,children:[]};return t.patch(i,l),t.applyData(i,l)}function $S(t,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};t.patch(i,r);const l={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(i,l),t.applyData(i,l)}function KS(t,i){const r=String(i.identifier).toUpperCase(),l=t.definitionById.get(r);if(!l)return Iy(t,i);const o={href:$a(l.url||"")};l.title!==null&&l.title!==void 0&&(o.title=l.title);const c={type:"element",tagName:"a",properties:o,children:t.all(i)};return t.patch(i,c),t.applyData(i,c)}function qS(t,i){const r={href:$a(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const l={type:"element",tagName:"a",properties:r,children:t.all(i)};return t.patch(i,l),t.applyData(i,l)}function VS(t,i,r){const l=t.all(i),o=r?YS(r):Ly(i),c={},u=[];if(typeof i.checked=="boolean"){const b=l[0];let y;b&&b.type==="element"&&b.tagName==="p"?y=b:(y={type:"element",tagName:"p",properties:{},children:[]},l.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),c.className=["task-list-item"]}let h=-1;for(;++h<l.length;){const b=l[h];(o||h!==0||b.type!=="element"||b.tagName!=="p")&&u.push({type:"text",value:`
55
- `}),b.type==="element"&&b.tagName==="p"&&!o?u.push(...b.children):u.push(b)}const m=l[l.length-1];m&&(o||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
56
- `});const p={type:"element",tagName:"li",properties:c,children:u};return t.patch(i,p),t.applyData(i,p)}function YS(t){let i=!1;if(t.type==="list"){i=t.spread||!1;const r=t.children;let l=-1;for(;!i&&++l<r.length;)i=Ly(r[l])}return i}function Ly(t){const i=t.spread;return i??t.children.length>1}function XS(t,i){const r={},l=t.all(i);let o=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++o<l.length;){const u=l[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 c={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:t.wrap(l,!0)};return t.patch(i,c),t.applyData(i,c)}function ZS(t,i){const r={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function QS(t,i){const r={type:"root",children:t.wrap(t.all(i))};return t.patch(i,r),t.applyData(i,r)}function JS(t,i){const r={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function WS(t,i){const r=t.all(i),l=r.shift(),o=[];if(l){const u={type:"element",tagName:"thead",properties:{},children:t.wrap([l],!0)};t.patch(i.children[0],u),o.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},h=_f(i.children[1]),m=py(i.children[i.children.length-1]);h&&m&&(u.position={start:h,end:m}),o.push(u)}const c={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(i,c),t.applyData(i,c)}function ek(t,i,r){const l=r?r.children:void 0,c=(l?l.indexOf(i):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,h=u?u.length:i.children.length;let m=-1;const p=[];for(;++m<h;){const y=i.children[m],E={},x=u?u[m]:void 0;x&&(E.align=x);let k={type:"element",tagName:c,properties:E,children:[]};y&&(k.children=t.all(y),t.patch(y,k),k=t.applyData(y,k)),p.push(k)}const b={type:"element",tagName:"tr",properties:{},children:t.wrap(p,!0)};return t.patch(i,b),t.applyData(i,b)}function tk(t,i){const r={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}const Wg=9,eb=32;function nk(t){const i=String(t),r=/\r?\n|\r/g;let l=r.exec(i),o=0;const c=[];for(;l;)c.push(tb(i.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=r.exec(i);return c.push(tb(i.slice(o),o>0,!1)),c.join("")}function tb(t,i,r){let l=0,o=t.length;if(i){let c=t.codePointAt(l);for(;c===Wg||c===eb;)l++,c=t.codePointAt(l)}if(r){let c=t.codePointAt(o-1);for(;c===Wg||c===eb;)o--,c=t.codePointAt(o-1)}return o>l?t.slice(l,o):""}function ik(t,i){const r={type:"text",value:nk(String(i.value))};return t.patch(i,r),t.applyData(i,r)}function rk(t,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,r),t.applyData(i,r)}const ak={blockquote:IS,break:LS,code:US,delete:BS,emphasis:zS,footnoteReference:jS,heading:HS,html:FS,imageReference:PS,image:GS,inlineCode:$S,linkReference:KS,link:qS,listItem:VS,list:XS,paragraph:ZS,root:QS,strong:JS,table:WS,tableCell:tk,tableRow:ek,text:ik,thematicBreak:rk,toml:Oo,yaml:Oo,definition:Oo,footnoteDefinition:Oo};function Oo(){}const Uy=-1,sc=0,Ql=1,Zo=2,Cf=3,Of=4,Mf=5,Rf=6,By=7,zy=8,nb=typeof self=="object"?self:globalThis,lk=(t,i)=>{const r=(o,c)=>(t.set(c,o),o),l=o=>{if(t.has(o))return t.get(o);const[c,u]=i[o];switch(c){case sc:case Uy:return r(u,o);case Ql:{const h=r([],o);for(const m of u)h.push(l(m));return h}case Zo:{const h=r({},o);for(const[m,p]of u)h[l(m)]=l(p);return h}case Cf:return r(new Date(u),o);case Of:{const{source:h,flags:m}=u;return r(new RegExp(h,m),o)}case Mf:{const h=r(new Map,o);for(const[m,p]of u)h.set(l(m),l(p));return h}case Rf:{const h=r(new Set,o);for(const m of u)h.add(l(m));return h}case By:{const{name:h,message:m}=u;return r(new nb[h](m),o)}case zy: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:h}=new Uint8Array(u);return r(new DataView(h),u)}}return r(new nb[c](u),o)};return l},ib=t=>lk(new Map,t)(0),Ma="",{toString:sk}={},{keys:ok}=Object,Kl=t=>{const i=typeof t;if(i!=="object"||!t)return[sc,i];const r=sk.call(t).slice(8,-1);switch(r){case"Array":return[Ql,Ma];case"Object":return[Zo,Ma];case"Date":return[Cf,Ma];case"RegExp":return[Of,Ma];case"Map":return[Mf,Ma];case"Set":return[Rf,Ma];case"DataView":return[Ql,r]}return r.includes("Array")?[Ql,r]:r.includes("Error")?[By,r]:[Zo,r]},Mo=([t,i])=>t===sc&&(i==="function"||i==="symbol"),ck=(t,i,r,l)=>{const o=(u,h)=>{const m=l.push(u)-1;return r.set(h,m),m},c=u=>{if(r.has(u))return r.get(u);let[h,m]=Kl(u);switch(h){case sc:{let b=u;switch(m){case"bigint":h=zy,b=u.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+m);b=null;break;case"undefined":return o([Uy],u)}return o([h,b],u)}case Ql:{if(m){let E=u;return m==="DataView"?E=new Uint8Array(u.buffer):m==="ArrayBuffer"&&(E=new Uint8Array(u)),o([m,[...E]],u)}const b=[],y=o([h,b],u);for(const E of u)b.push(c(E));return y}case Zo:{if(m)switch(m){case"BigInt":return o([m,u.toString()],u);case"Boolean":case"Number":case"String":return o([m,u.valueOf()],u)}if(i&&"toJSON"in u)return c(u.toJSON());const b=[],y=o([h,b],u);for(const E of ok(u))(t||!Mo(Kl(u[E])))&&b.push([c(E),c(u[E])]);return y}case Cf:return o([h,u.toISOString()],u);case Of:{const{source:b,flags:y}=u;return o([h,{source:b,flags:y}],u)}case Mf:{const b=[],y=o([h,b],u);for(const[E,x]of u)(t||!(Mo(Kl(E))||Mo(Kl(x))))&&b.push([c(E),c(x)]);return y}case Rf:{const b=[],y=o([h,b],u);for(const E of u)(t||!Mo(Kl(E)))&&b.push(c(E));return y}}const{message:p}=u;return o([h,{name:m,message:p}],u)};return c},rb=(t,{json:i,lossy:r}={})=>{const l=[];return ck(!(i||r),!!i,new Map,l)(t),l},Qo=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?ib(rb(t,i)):structuredClone(t):(t,i)=>ib(rb(t,i));function uk(t,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function dk(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function fk(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||uk,l=t.options.footnoteBackLabel||dk,o=t.options.footnoteLabel||"Footnotes",c=t.options.footnoteLabelTagName||"h2",u=t.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let m=-1;for(;++m<t.footnoteOrder.length;){const p=t.footnoteById.get(t.footnoteOrder[m]);if(!p)continue;const b=t.all(p),y=String(p.identifier).toUpperCase(),E=$a(y.toLowerCase());let x=0;const k=[],A=t.footnoteCounts.get(y);for(;A!==void 0&&++x<=A;){k.length>0&&k.push({type:"text",value:" "});let U=typeof r=="string"?r:r(m,x);typeof U=="string"&&(U={type:"text",value:U}),k.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+E+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(m,x),className:["data-footnote-backref"]},children:Array.isArray(U)?U:[U]})}const C=b[b.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const U=C.children[C.children.length-1];U&&U.type==="text"?U.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...k)}else b.push(...k);const S={type:"element",tagName:"li",properties:{id:i+"fn-"+E},children:t.wrap(b,!0)};t.patch(p,S),h.push(S)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...Qo(u),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
57
- `},{type:"element",tagName:"ol",properties:{},children:t.wrap(h,!0)},{type:"text",value:`
58
- `}]}}const cs=(function(t){if(t==null)return gk;if(typeof t=="function")return oc(t);if(typeof t=="object")return Array.isArray(t)?hk(t):pk(t);if(typeof t=="string")return mk(t);throw new Error("Expected function, string, or object as test")});function hk(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=cs(t[r]);return oc(l);function l(...o){let c=-1;for(;++c<i.length;)if(i[c].apply(this,o))return!0;return!1}}function pk(t){const i=t;return oc(r);function r(l){const o=l;let c;for(c in t)if(o[c]!==i[c])return!1;return!0}}function mk(t){return oc(i);function i(r){return r&&r.type===t}}function oc(t){return i;function i(r,l,o){return!!(bk(r)&&t.call(this,r,typeof l=="number"?l:void 0,o||void 0))}}function gk(){return!0}function bk(t){return t!==null&&typeof t=="object"&&"type"in t}const jy=[],yk=!0,nf=!1,vk="skip";function Hy(t,i,r,l){let o;typeof i=="function"&&typeof r!="function"?(l=r,r=i):o=i;const c=cs(o),u=l?-1:1;h(t,void 0,[])();function h(m,p,b){const y=m&&typeof m=="object"?m:{};if(typeof y.type=="string"){const x=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(m.type+(x?"<"+x+">":""))+")"})}return E;function E(){let x=jy,k,A,C;if((!i||c(m,p,b[b.length-1]||void 0))&&(x=xk(r(m,b)),x[0]===nf))return x;if("children"in m&&m.children){const S=m;if(S.children&&x[0]!==vk)for(A=(l?S.children.length:-1)+u,C=b.concat(S);A>-1&&A<S.children.length;){const U=S.children[A];if(k=h(U,A,C)(),k[0]===nf)return k;A=typeof k[1]=="number"?k[1]:A+u}}return x}}}function xk(t){return Array.isArray(t)?t:typeof t=="number"?[yk,t]:t==null?jy:[t]}function cc(t,i,r,l){let o,c,u;typeof i=="function"&&typeof r!="function"?(c=void 0,u=i,o=r):(c=i,u=r,o=l),Hy(t,c,h,o);function h(m,p){const b=p[p.length-1],y=b?b.children.indexOf(m):void 0;return u(m,y,b)}}const rf={}.hasOwnProperty,Ek={};function _k(t,i){const r=i||Ek,l=new Map,o=new Map,c=new Map,u={...ak,...r.handlers},h={all:p,applyData:kk,definitionById:l,footnoteById:o,footnoteCounts:c,footnoteOrder:[],handlers:u,one:m,options:r,patch:Sk,wrap:wk};return cc(t,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const y=b.type==="definition"?l:o,E=String(b.identifier).toUpperCase();y.has(E)||y.set(E,b)}}),h;function m(b,y){const E=b.type,x=h.handlers[E];if(rf.call(h.handlers,E)&&x)return x(h,b,y);if(h.options.passThrough&&h.options.passThrough.includes(E)){if("children"in b){const{children:A,...C}=b,S=Qo(C);return S.children=h.all(b),S}return Qo(b)}return(h.options.unknownHandler||Nk)(h,b,y)}function p(b){const y=[];if("children"in b){const E=b.children;let x=-1;for(;++x<E.length;){const k=h.one(E[x],b);if(k){if(x&&E[x-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=ab(k.value)),!Array.isArray(k)&&k.type==="element")){const A=k.children[0];A&&A.type==="text"&&(A.value=ab(A.value))}Array.isArray(k)?y.push(...k):y.push(k)}}}return y}}function Sk(t,i){t.position&&(i.position=d_(t))}function kk(t,i){let r=i;if(t&&t.data){const l=t.data.hName,o=t.data.hChildren,c=t.data.hProperties;if(typeof l=="string")if(r.type==="element")r.tagName=l;else{const u="children"in r?r.children:[r];r={type:"element",tagName:l,properties:{},children:u}}r.type==="element"&&c&&Object.assign(r.properties,Qo(c)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function Nk(t,i){const r=i.data||{},l="value"in i&&!(rf.call(r,"hProperties")||rf.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:t.all(i)};return t.patch(i,l),t.applyData(i,l)}function wk(t,i){const r=[];let l=-1;for(i&&r.push({type:"text",value:`
59
- `});++l<t.length;)l&&r.push({type:"text",value:`
60
- `}),r.push(t[l]);return i&&t.length>0&&r.push({type:"text",value:`
61
- `}),r}function ab(t){let i=0,r=t.charCodeAt(i);for(;r===9||r===32;)i++,r=t.charCodeAt(i);return t.slice(i)}function lb(t,i){const r=_k(t,i),l=r.one(t,void 0),o=fk(r),c=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return o&&c.children.push({type:"text",value:`
62
- `},o),c}function Tk(t,i){return t&&"run"in t?async function(r,l){const o=lb(r,{file:l,...i});await t.run(o,l)}:function(r,l){return lb(r,{file:l,...t||i})}}function sb(t){if(t)throw t}var Nd,ob;function Ak(){if(ob)return Nd;ob=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):i.call(p)==="[object Array]"},c=function(p){if(!p||i.call(p)!=="[object Object]")return!1;var b=t.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&t.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!b&&!y)return!1;var E;for(E in p);return typeof E>"u"||t.call(p,E)},u=function(p,b){r&&b.name==="__proto__"?r(p,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):p[b.name]=b.newValue},h=function(p,b){if(b==="__proto__")if(t.call(p,b)){if(l)return l(p,b).value}else return;return p[b]};return Nd=function m(){var p,b,y,E,x,k,A=arguments[0],C=1,S=arguments.length,U=!1;for(typeof A=="boolean"&&(U=A,A=arguments[1]||{},C=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});C<S;++C)if(p=arguments[C],p!=null)for(b in p)y=h(A,b),E=h(p,b),A!==E&&(U&&E&&(c(E)||(x=o(E)))?(x?(x=!1,k=y&&o(y)?y:[]):k=y&&c(y)?y:{},u(A,{name:b,newValue:m(U,k,E)})):typeof E<"u"&&u(A,{name:b,newValue:E}));return A},Nd}var Ck=Ak();const wd=ls(Ck);function af(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Ok(){const t=[],i={run:r,use:l};return i;function r(...o){let c=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);h(null,...o);function h(m,...p){const b=t[++c];let y=-1;if(m){u(m);return}for(;++y<o.length;)(p[y]===null||p[y]===void 0)&&(p[y]=o[y]);o=p,b?Mk(b,h)(...p):u(null,...p)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),i}}function Mk(t,i){let r;return l;function l(...u){const h=t.length>u.length;let m;h&&u.push(o);try{m=t.apply(this,u)}catch(p){const b=p;if(h&&r)throw b;return o(b)}h||(m&&m.then&&typeof m.then=="function"?m.then(c,o):m instanceof Error?o(m):c(m))}function o(u,...h){r||(r=!0,i(u,...h))}function c(u){o(null,u)}}const ai={basename:Rk,dirname:Dk,extname:Ik,join:Lk,sep:"/"};function Rk(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');us(t);let r=0,l=-1,o=t.length,c;if(i===void 0||i.length===0||i.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(c){r=o+1;break}}else l<0&&(c=!0,l=o+1);return l<0?"":t.slice(r,l)}if(i===t)return"";let u=-1,h=i.length-1;for(;o--;)if(t.codePointAt(o)===47){if(c){r=o+1;break}}else u<0&&(c=!0,u=o+1),h>-1&&(t.codePointAt(o)===i.codePointAt(h--)?h<0&&(l=o):(h=-1,l=u));return r===l?l=u:l<0&&(l=t.length),t.slice(r,l)}function Dk(t){if(us(t),t.length===0)return".";let i=-1,r=t.length,l;for(;--r;)if(t.codePointAt(r)===47){if(l){i=r;break}}else l||(l=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function Ik(t){us(t);let i=t.length,r=-1,l=0,o=-1,c=0,u;for(;i--;){const h=t.codePointAt(i);if(h===47){if(u){l=i+1;break}continue}r<0&&(u=!0,r=i+1),h===46?o<0?o=i:c!==1&&(c=1):o>-1&&(c=-1)}return o<0||r<0||c===0||c===1&&o===r-1&&o===l+1?"":t.slice(o,r)}function Lk(...t){let i=-1,r;for(;++i<t.length;)us(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":Uk(r)}function Uk(t){us(t);const i=t.codePointAt(0)===47;let r=Bk(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function Bk(t,i){let r="",l=0,o=-1,c=0,u=-1,h,m;for(;++u<=t.length;){if(u<t.length)h=t.codePointAt(u);else{if(h===47)break;h=47}if(h===47){if(!(o===u-1||c===1))if(o!==u-1&&c===2){if(r.length<2||l!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",l=0):(r=r.slice(0,m),l=r.length-1-r.lastIndexOf("/")),o=u,c=0;continue}}else if(r.length>0){r="",l=0,o=u,c=0;continue}}i&&(r=r.length>0?r+"/..":"..",l=2)}else r.length>0?r+="/"+t.slice(o+1,u):r=t.slice(o+1,u),l=u-o-1;o=u,c=0}else h===46&&c>-1?c++:c=-1}return r}function us(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const zk={cwd:jk};function jk(){return"/"}function lf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Hk(t){if(typeof t=="string")t=new URL(t);else if(!lf(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return Fk(t)}function Fk(t){if(t.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const i=t.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const l=i.codePointAt(r+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(i)}const Td=["history","path","basename","stem","extname","dirname"];class Fy{constructor(i){let r;i?lf(i)?r={path:i}:typeof i=="string"||Pk(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":zk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Td.length;){const c=Td[l];c in r&&r[c]!==void 0&&r[c]!==null&&(this[c]=c==="history"?[...r[c]]:r[c])}let o;for(o in r)Td.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?ai.basename(this.path):void 0}set basename(i){Cd(i,"basename"),Ad(i,"basename"),this.path=ai.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?ai.dirname(this.path):void 0}set dirname(i){cb(this.basename,"dirname"),this.path=ai.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?ai.extname(this.path):void 0}set extname(i){if(Ad(i,"extname"),cb(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ai.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){lf(i)&&(i=Hk(i)),Cd(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?ai.basename(this.path,this.extname):void 0}set stem(i){Cd(i,"stem"),Ad(i,"stem"),this.path=ai.join(this.dirname||"",i+(this.extname||""))}fail(i,r,l){const o=this.message(i,r,l);throw o.fatal=!0,o}info(i,r,l){const o=this.message(i,r,l);return o.fatal=void 0,o}message(i,r,l){const o=new tn(i,r,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function Ad(t,i){if(t&&t.includes(ai.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+ai.sep+"`")}function Cd(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function cb(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function Pk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Gk=(function(t){const l=this.constructor.prototype,o=l[t],c=function(){return o.apply(c,arguments)};return Object.setPrototypeOf(c,l),c}),$k={}.hasOwnProperty;class Df extends Gk{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=Ok()}copy(){const i=new Df;let r=-1;for(;++r<this.attachers.length;){const l=this.attachers[r];i.use(...l)}return i.data(wd(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(Rd("data",this.frozen),this.namespace[i]=r,this):$k.call(this.namespace,i)&&this.namespace[i]||void 0:i?(Rd("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=r.call(i,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=Ro(i),l=this.parser||this.Parser;return Od("parse",l),l(String(r),r)}process(i,r){const l=this;return this.freeze(),Od("process",this.parser||this.Parser),Md("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(c,u){const h=Ro(i),m=l.parse(h);l.run(m,h,function(b,y,E){if(b||!y||!E)return p(b);const x=y,k=l.stringify(x,E);Vk(k)?E.value=k:E.result=k,p(b,E)});function p(b,y){b||!y?u(b):c?c(y):r(void 0,y)}}}processSync(i){let r=!1,l;return this.freeze(),Od("processSync",this.parser||this.Parser),Md("processSync",this.compiler||this.Compiler),this.process(i,o),db("processSync","process",r),l;function o(c,u){r=!0,sb(c),l=u}}run(i,r,l){ub(i),this.freeze();const o=this.transformers;return!l&&typeof r=="function"&&(l=r,r=void 0),l?c(void 0,l):new Promise(c);function c(u,h){const m=Ro(r);o.run(i,m,p);function p(b,y,E){const x=y||i;b?h(b):u?u(x):l(void 0,x,E)}}}runSync(i,r){let l=!1,o;return this.run(i,r,c),db("runSync","run",l),o;function c(u,h){sb(u),o=h,l=!0}}stringify(i,r){this.freeze();const l=Ro(r),o=this.compiler||this.Compiler;return Md("stringify",o),ub(i),o(i,l)}use(i,...r){const l=this.attachers,o=this.namespace;if(Rd("use",this.frozen),i!=null)if(typeof i=="function")m(i,r);else if(typeof i=="object")Array.isArray(i)?h(i):u(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function c(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[b,...y]=p;m(b,y)}else u(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function u(p){if(!("plugins"in p)&&!("settings"in p))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");h(p.plugins),p.settings&&(o.settings=wd(!0,o.settings,p.settings))}function h(p){let b=-1;if(p!=null)if(Array.isArray(p))for(;++b<p.length;){const y=p[b];c(y)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,b){let y=-1,E=-1;for(;++y<l.length;)if(l[y][0]===p){E=y;break}if(E===-1)l.push([p,...b]);else if(b.length>0){let[x,...k]=b;const A=l[E][1];af(A)&&af(x)&&(x=wd(!0,A,x)),l[E]=[p,x,...k]}}}}const Kk=new Df().freeze();function Od(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Md(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Rd(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ub(t){if(!af(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function db(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function Ro(t){return qk(t)?t:new Fy(t)}function qk(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Vk(t){return typeof t=="string"||Yk(t)}function Yk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Xk="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",fb=[],hb={allowDangerousHtml:!0},Zk=/^(https?|ircs?|mailto|xmpp)$/i,Qk=[{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 Py(t){const i=Jk(t),r=Wk(t);return eN(i.runSync(i.parse(r),r),t)}function Jk(t){const i=t.rehypePlugins||fb,r=t.remarkPlugins||fb,l=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...hb}:hb;return Kk().use(DS).use(r).use(Tk,l).use(i)}function Wk(t){const i=t.children||"",r=new Fy;return typeof i=="string"&&(r.value=i),r}function eN(t,i){const r=i.allowedElements,l=i.allowElement,o=i.components,c=i.disallowedElements,u=i.skipHtml,h=i.unwrapDisallowed,m=i.urlTransform||tN;for(const b of Qk)Object.hasOwn(i,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+Xk+b.id,void 0);return cc(t,p),g_(t,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function p(b,y,E){if(b.type==="raw"&&E&&typeof y=="number")return u?E.children.splice(y,1):E.children[y]={type:"text",value:b.value},y;if(b.type==="element"){let x;for(x in _d)if(Object.hasOwn(_d,x)&&Object.hasOwn(b.properties,x)){const k=b.properties[x],A=_d[x];(A===null||A.includes(b.tagName))&&(b.properties[x]=m(String(k||""),x,b))}}if(b.type==="element"){let x=r?!r.includes(b.tagName):c?c.includes(b.tagName):!1;if(!x&&l&&typeof y=="number"&&(x=!l(b,y,E)),x&&E&&typeof y=="number")return h&&b.children?E.children.splice(y,1,...b.children):E.children.splice(y,1),y}}}function tN(t){const i=t.indexOf(":"),r=t.indexOf("?"),l=t.indexOf("#"),o=t.indexOf("/");return i===-1||o!==-1&&i>o||r!==-1&&i>r||l!==-1&&i>l||Zk.test(t.slice(0,i))?t:""}function pb(t,i){const r=String(t);if(typeof i!="string")throw new TypeError("Expected character");let l=0,o=r.indexOf(i);for(;o!==-1;)l++,o=r.indexOf(i,o+i.length);return l}function nN(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function iN(t,i,r){const o=cs((r||{}).ignore||[]),c=rN(i);let u=-1;for(;++u<c.length;)Hy(t,"text",h);function h(p,b){let y=-1,E;for(;++y<b.length;){const x=b[y],k=E?E.children:void 0;if(o(x,k?k.indexOf(x):void 0,E))return;E=x}if(E)return m(p,b)}function m(p,b){const y=b[b.length-1],E=c[u][0],x=c[u][1];let k=0;const C=y.children.indexOf(p);let S=!1,U=[];E.lastIndex=0;let I=E.exec(p.value);for(;I;){const G=I.index,re={index:I.index,input:I.input,stack:[...b,p]};let B=x(...I,re);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?E.lastIndex=G+1:(k!==G&&U.push({type:"text",value:p.value.slice(k,G)}),Array.isArray(B)?U.push(...B):B&&U.push(B),k=G+I[0].length,S=!0),!E.global)break;I=E.exec(p.value)}return S?(k<p.value.length&&U.push({type:"text",value:p.value.slice(k)}),y.children.splice(C,1,...U)):U=[p],C+U.length}}function rN(t){const i=[];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 l=-1;for(;++l<r.length;){const o=r[l];i.push([aN(o[0]),lN(o[1])])}return i}function aN(t){return typeof t=="string"?new RegExp(nN(t),"g"):t}function lN(t){return typeof t=="function"?t:function(){return t}}const Dd="phrasing",Id=["autolink","link","image","label"];function sN(){return{transforms:[pN],enter:{literalAutolink:cN,literalAutolinkEmail:Ld,literalAutolinkHttp:Ld,literalAutolinkWww:Ld},exit:{literalAutolink:hN,literalAutolinkEmail:fN,literalAutolinkHttp:uN,literalAutolinkWww:dN}}}function oN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Dd,notInConstruct:Id},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Dd,notInConstruct:Id},{character:":",before:"[ps]",after:"\\/",inConstruct:Dd,notInConstruct:Id}]}}function cN(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Ld(t){this.config.enter.autolinkProtocol.call(this,t)}function uN(t){this.config.exit.autolinkProtocol.call(this,t)}function dN(t){this.config.exit.data.call(this,t);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(t)}function fN(t){this.config.exit.autolinkEmail.call(this,t)}function hN(t){this.exit(t)}function pN(t){iN(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,mN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),gN]],{ignore:["link","linkReference"]})}function mN(t,i,r,l,o){let c="";if(!Gy(o)||(/^w/i.test(i)&&(r=i+r,i="",c="http://"),!bN(r)))return!1;const u=yN(r+l);if(!u[0])return!1;const h={type:"link",title:null,url:c+i+u[0],children:[{type:"text",value:i+u[0]}]};return u[1]?[h,{type:"text",value:u[1]}]:h}function gN(t,i,r,l){return!Gy(l,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function bN(t){const i=t.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function yN(t){const i=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!i)return[t,void 0];t=t.slice(0,i.index);let r=i[0],l=r.indexOf(")");const o=pb(t,"(");let c=pb(t,")");for(;l!==-1&&o>c;)t+=r.slice(0,l+1),r=r.slice(l+1),l=r.indexOf(")"),c++;return[t,r]}function Gy(t,i){const r=t.input.charCodeAt(t.index-1);return(t.index===0||jr(r)||ac(r))&&(!i||r!==47)}$y.peek=TN;function vN(){this.buffer()}function xN(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function EN(){this.buffer()}function _N(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function SN(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Xn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function kN(t){this.exit(t)}function NN(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Xn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function wN(t){this.exit(t)}function TN(){return"["}function $y(t,i,r,l){const o=r.createTracker(l);let c=o.move("[^");const u=r.enter("footnoteReference"),h=r.enter("reference");return c+=o.move(r.safe(r.associationId(t),{after:"]",before:c})),h(),u(),c+=o.move("]"),c}function AN(){return{enter:{gfmFootnoteCallString:vN,gfmFootnoteCall:xN,gfmFootnoteDefinitionLabelString:EN,gfmFootnoteDefinition:_N},exit:{gfmFootnoteCallString:SN,gfmFootnoteCall:kN,gfmFootnoteDefinitionLabelString:NN,gfmFootnoteDefinition:wN}}}function CN(t){let i=!1;return t&&t.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:$y},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(l,o,c,u){const h=c.createTracker(u);let m=h.move("[^");const p=c.enter("footnoteDefinition"),b=c.enter("label");return m+=h.move(c.safe(c.associationId(l),{before:m,after:"]"})),b(),m+=h.move("]:"),l.children&&l.children.length>0&&(h.shift(4),m+=h.move((i?`
63
- `:" ")+c.indentLines(c.containerFlow(l,h.current()),i?Ky:ON))),p(),m}}function ON(t,i,r){return i===0?t:Ky(t,i,r)}function Ky(t,i,r){return(r?"":" ")+t}const MN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qy.peek=UN;function RN(){return{canContainEols:["delete"],enter:{strikethrough:IN},exit:{strikethrough:LN}}}function DN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:MN}],handlers:{delete:qy}}}function IN(t){this.enter({type:"delete",children:[]},t)}function LN(t){this.exit(t)}function qy(t,i,r,l){const o=r.createTracker(l),c=r.enter("strikethrough");let u=o.move("~~");return u+=r.containerPhrasing(t,{...o.current(),before:u,after:"~"}),u+=o.move("~~"),c(),u}function UN(){return"~"}function BN(t){return t.length}function zN(t,i){const r=i||{},l=(r.align||[]).concat(),o=r.stringLength||BN,c=[],u=[],h=[],m=[];let p=0,b=-1;for(;++b<t.length;){const A=[],C=[];let S=-1;for(t[b].length>p&&(p=t[b].length);++S<t[b].length;){const U=jN(t[b][S]);if(r.alignDelimiters!==!1){const I=o(U);C[S]=I,(m[S]===void 0||I>m[S])&&(m[S]=I)}A.push(U)}u[b]=A,h[b]=C}let y=-1;if(typeof l=="object"&&"length"in l)for(;++y<p;)c[y]=mb(l[y]);else{const A=mb(l);for(;++y<p;)c[y]=A}y=-1;const E=[],x=[];for(;++y<p;){const A=c[y];let C="",S="";A===99?(C=":",S=":"):A===108?C=":":A===114&&(S=":");let U=r.alignDelimiters===!1?1:Math.max(1,m[y]-C.length-S.length);const I=C+"-".repeat(U)+S;r.alignDelimiters!==!1&&(U=C.length+U+S.length,U>m[y]&&(m[y]=U),x[y]=U),E[y]=I}u.splice(1,0,E),h.splice(1,0,x),b=-1;const k=[];for(;++b<u.length;){const A=u[b],C=h[b];y=-1;const S=[];for(;++y<p;){const U=A[y]||"";let I="",G="";if(r.alignDelimiters!==!1){const re=m[y]-(C[y]||0),B=c[y];B===114?I=" ".repeat(re):B===99?re%2?(I=" ".repeat(re/2+.5),G=" ".repeat(re/2-.5)):(I=" ".repeat(re/2),G=I):G=" ".repeat(re)}r.delimiterStart!==!1&&!y&&S.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&U==="")&&(r.delimiterStart!==!1||y)&&S.push(" "),r.alignDelimiters!==!1&&S.push(I),S.push(U),r.alignDelimiters!==!1&&S.push(G),r.padding!==!1&&S.push(" "),(r.delimiterEnd!==!1||y!==p-1)&&S.push("|")}k.push(r.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return k.join(`
64
- `)}function jN(t){return t==null?"":String(t)}function mb(t){const i=typeof t=="string"?t.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}function HN(t,i,r,l){const o=r.enter("blockquote"),c=r.createTracker(l);c.move("> "),c.shift(2);const u=r.indentLines(r.containerFlow(t,c.current()),FN);return o(),u}function FN(t,i,r){return">"+(r?"":" ")+t}function PN(t,i){return gb(t,i.inConstruct,!0)&&!gb(t,i.notInConstruct,!1)}function gb(t,i,r){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return r;let l=-1;for(;++l<i.length;)if(t.includes(i[l]))return!0;return!1}function bb(t,i,r,l){let o=-1;for(;++o<r.unsafe.length;)if(r.unsafe[o].character===`
65
- `&&PN(r.stack,r.unsafe[o]))return/[ \t]/.test(l.before)?"":" ";return`\\
66
- `}function GN(t,i){const r=String(t);let l=r.indexOf(i),o=l,c=0,u=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===o?++c>u&&(u=c):c=1,o=l+i.length,l=r.indexOf(i,o);return u}function $N(t,i){return!!(i.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function KN(t){const i=t.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function qN(t,i,r,l){const o=KN(r),c=t.value||"",u=o==="`"?"GraveAccent":"Tilde";if($N(t,r)){const y=r.enter("codeIndented"),E=r.indentLines(c,VN);return y(),E}const h=r.createTracker(l),m=o.repeat(Math.max(GN(c,o)+1,3)),p=r.enter("codeFenced");let b=h.move(m);if(t.lang){const y=r.enter(`codeFencedLang${u}`);b+=h.move(r.safe(t.lang,{before:b,after:" ",encode:["`"],...h.current()})),y()}if(t.lang&&t.meta){const y=r.enter(`codeFencedMeta${u}`);b+=h.move(" "),b+=h.move(r.safe(t.meta,{before:b,after:`
67
- `,encode:["`"],...h.current()})),y()}return b+=h.move(`
68
- `),c&&(b+=h.move(c+`
69
- `)),b+=h.move(m),p(),b}function VN(t,i,r){return(r?"":" ")+t}function If(t){const i=t.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function YN(t,i,r,l){const o=If(r),c=o==='"'?"Quote":"Apostrophe",u=r.enter("definition");let h=r.enter("label");const m=r.createTracker(l);let p=m.move("[");return p+=m.move(r.safe(r.associationId(t),{before:p,after:"]",...m.current()})),p+=m.move("]: "),h(),!t.url||/[\0- \u007F]/.test(t.url)?(h=r.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(r.safe(t.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(h=r.enter("destinationRaw"),p+=m.move(r.safe(t.url,{before:p,after:t.title?" ":`
70
- `,...m.current()}))),h(),t.title&&(h=r.enter(`title${c}`),p+=m.move(" "+o),p+=m.move(r.safe(t.title,{before:p,after:o,...m.current()})),p+=m.move(o),h()),u(),p}function XN(t){const i=t.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function ns(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Jo(t,i,r){const l=Pa(t),o=Pa(i);return l===void 0?o===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===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}}Vy.peek=ZN;function Vy(t,i,r,l){const o=XN(r),c=r.enter("emphasis"),u=r.createTracker(l),h=u.move(o);let m=u.move(r.containerPhrasing(t,{after:o,before:h,...u.current()}));const p=m.charCodeAt(0),b=Jo(l.before.charCodeAt(l.before.length-1),p,o);b.inside&&(m=ns(p)+m.slice(1));const y=m.charCodeAt(m.length-1),E=Jo(l.after.charCodeAt(0),y,o);E.inside&&(m=m.slice(0,-1)+ns(y));const x=u.move(o);return c(),r.attentionEncodeSurroundingInfo={after:E.outside,before:b.outside},h+m+x}function ZN(t,i,r){return r.options.emphasis||"*"}function QN(t,i){let r=!1;return cc(t,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return r=!0,nf}),!!((!t.depth||t.depth<3)&&wf(t)&&(i.options.setext||r))}function JN(t,i,r,l){const o=Math.max(Math.min(6,t.depth||1),1),c=r.createTracker(l);if(QN(t,r)){const b=r.enter("headingSetext"),y=r.enter("phrasing"),E=r.containerPhrasing(t,{...c.current(),before:`
71
- `,after:`
72
- `});return y(),b(),E+`
73
- `+(o===1?"=":"-").repeat(E.length-(Math.max(E.lastIndexOf("\r"),E.lastIndexOf(`
74
- `))+1))}const u="#".repeat(o),h=r.enter("headingAtx"),m=r.enter("phrasing");c.move(u+" ");let p=r.containerPhrasing(t,{before:"# ",after:`
75
- `,...c.current()});return/^[\t ]/.test(p)&&(p=ns(p.charCodeAt(0))+p.slice(1)),p=p?u+" "+p:u,r.options.closeAtx&&(p+=" "+u),m(),h(),p}Yy.peek=WN;function Yy(t){return t.value||""}function WN(){return"<"}Xy.peek=ew;function Xy(t,i,r,l){const o=If(r),c=o==='"'?"Quote":"Apostrophe",u=r.enter("image");let h=r.enter("label");const m=r.createTracker(l);let p=m.move("![");return p+=m.move(r.safe(t.alt,{before:p,after:"]",...m.current()})),p+=m.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=r.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(r.safe(t.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(h=r.enter("destinationRaw"),p+=m.move(r.safe(t.url,{before:p,after:t.title?" ":")",...m.current()}))),h(),t.title&&(h=r.enter(`title${c}`),p+=m.move(" "+o),p+=m.move(r.safe(t.title,{before:p,after:o,...m.current()})),p+=m.move(o),h()),p+=m.move(")"),u(),p}function ew(){return"!"}Zy.peek=tw;function Zy(t,i,r,l){const o=t.referenceType,c=r.enter("imageReference");let u=r.enter("label");const h=r.createTracker(l);let m=h.move("![");const p=r.safe(t.alt,{before:m,after:"]",...h.current()});m+=h.move(p+"]["),u();const b=r.stack;r.stack=[],u=r.enter("reference");const y=r.safe(r.associationId(t),{before:m,after:"]",...h.current()});return u(),r.stack=b,c(),o==="full"||!p||p!==y?m+=h.move(y+"]"):o==="shortcut"?m=m.slice(0,-1):m+=h.move("]"),m}function tw(){return"!"}Qy.peek=nw;function Qy(t,i,r){let l=t.value||"",o="`",c=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(l);)o+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++c<r.unsafe.length;){const u=r.unsafe[c],h=r.compilePattern(u);let m;if(u.atBreak)for(;m=h.exec(l);){let p=m.index;l.charCodeAt(p)===10&&l.charCodeAt(p-1)===13&&p--,l=l.slice(0,p)+" "+l.slice(m.index+1)}}return o+l+o}function nw(){return"`"}function Jy(t,i){const r=wf(t);return!!(!i.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))}Wy.peek=iw;function Wy(t,i,r,l){const o=If(r),c=o==='"'?"Quote":"Apostrophe",u=r.createTracker(l);let h,m;if(Jy(t,r)){const b=r.stack;r.stack=[],h=r.enter("autolink");let y=u.move("<");return y+=u.move(r.containerPhrasing(t,{before:y,after:">",...u.current()})),y+=u.move(">"),h(),r.stack=b,y}h=r.enter("link"),m=r.enter("label");let p=u.move("[");return p+=u.move(r.containerPhrasing(t,{before:p,after:"](",...u.current()})),p+=u.move("]("),m(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(m=r.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(r.safe(t.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(m=r.enter("destinationRaw"),p+=u.move(r.safe(t.url,{before:p,after:t.title?" ":")",...u.current()}))),m(),t.title&&(m=r.enter(`title${c}`),p+=u.move(" "+o),p+=u.move(r.safe(t.title,{before:p,after:o,...u.current()})),p+=u.move(o),m()),p+=u.move(")"),h(),p}function iw(t,i,r){return Jy(t,r)?"<":"["}ev.peek=rw;function ev(t,i,r,l){const o=t.referenceType,c=r.enter("linkReference");let u=r.enter("label");const h=r.createTracker(l);let m=h.move("[");const p=r.containerPhrasing(t,{before:m,after:"]",...h.current()});m+=h.move(p+"]["),u();const b=r.stack;r.stack=[],u=r.enter("reference");const y=r.safe(r.associationId(t),{before:m,after:"]",...h.current()});return u(),r.stack=b,c(),o==="full"||!p||p!==y?m+=h.move(y+"]"):o==="shortcut"?m=m.slice(0,-1):m+=h.move("]"),m}function rw(){return"["}function Lf(t){const i=t.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function aw(t){const i=Lf(t),r=t.options.bulletOther;if(!r)return i==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+r+"`) to be different");return r}function lw(t){const i=t.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function tv(t){const i=t.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function sw(t,i,r,l){const o=r.enter("list"),c=r.bulletCurrent;let u=t.ordered?lw(r):Lf(r);const h=t.ordered?u==="."?")":".":aw(r);let m=i&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!t.ordered){const b=t.children?t.children[0]:void 0;if((u==="*"||u==="-")&&b&&(!b.children||!b.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&&(m=!0),tv(r)===u&&b){let y=-1;for(;++y<t.children.length;){const E=t.children[y];if(E&&E.type==="listItem"&&E.children&&E.children[0]&&E.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(u=h),r.bulletCurrent=u;const p=r.containerFlow(t,l);return r.bulletLastUsed=u,r.bulletCurrent=c,o(),p}function ow(t){const i=t.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function cw(t,i,r,l){const o=ow(r);let c=r.bulletCurrent||Lf(r);i&&i.type==="list"&&i.ordered&&(c=(typeof i.start=="number"&&i.start>-1?i.start:1)+(r.options.incrementListMarker===!1?0:i.children.indexOf(t))+c);let u=c.length+1;(o==="tab"||o==="mixed"&&(i&&i.type==="list"&&i.spread||t.spread))&&(u=Math.ceil(u/4)*4);const h=r.createTracker(l);h.move(c+" ".repeat(u-c.length)),h.shift(u);const m=r.enter("listItem"),p=r.indentLines(r.containerFlow(t,h.current()),b);return m(),p;function b(y,E,x){return E?(x?"":" ".repeat(u))+y:(x?c:c+" ".repeat(u-c.length))+y}}function uw(t,i,r,l){const o=r.enter("paragraph"),c=r.enter("phrasing"),u=r.containerPhrasing(t,l);return c(),o(),u}const dw=cs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function fw(t,i,r,l){return(t.children.some(function(u){return dw(u)})?r.containerPhrasing:r.containerFlow).call(r,t,l)}function hw(t){const i=t.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}nv.peek=pw;function nv(t,i,r,l){const o=hw(r),c=r.enter("strong"),u=r.createTracker(l),h=u.move(o+o);let m=u.move(r.containerPhrasing(t,{after:o,before:h,...u.current()}));const p=m.charCodeAt(0),b=Jo(l.before.charCodeAt(l.before.length-1),p,o);b.inside&&(m=ns(p)+m.slice(1));const y=m.charCodeAt(m.length-1),E=Jo(l.after.charCodeAt(0),y,o);E.inside&&(m=m.slice(0,-1)+ns(y));const x=u.move(o+o);return c(),r.attentionEncodeSurroundingInfo={after:E.outside,before:b.outside},h+m+x}function pw(t,i,r){return r.options.strong||"*"}function mw(t,i,r,l){return r.safe(t.value,l)}function gw(t){const i=t.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function bw(t,i,r){const l=(tv(r)+(r.options.ruleSpaces?" ":"")).repeat(gw(r));return r.options.ruleSpaces?l.slice(0,-1):l}const iv={blockquote:HN,break:bb,code:qN,definition:YN,emphasis:Vy,hardBreak:bb,heading:JN,html:Yy,image:Xy,imageReference:Zy,inlineCode:Qy,link:Wy,linkReference:ev,list:sw,listItem:cw,paragraph:uw,root:fw,strong:nv,text:mw,thematicBreak:bw};function yw(){return{enter:{table:vw,tableData:yb,tableHeader:yb,tableRow:Ew},exit:{codeText:_w,table:xw,tableData:Ud,tableHeader:Ud,tableRow:Ud}}}function vw(t){const i=t._align;this.enter({type:"table",align:i.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function xw(t){this.exit(t),this.data.inTable=void 0}function Ew(t){this.enter({type:"tableRow",children:[]},t)}function Ud(t){this.exit(t)}function yb(t){this.enter({type:"tableCell",children:[]},t)}function _w(t){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,Sw));const r=this.stack[this.stack.length-1];r.type,r.value=i,this.exit(t)}function Sw(t,i){return i==="|"?i:t}function kw(t){const i=t||{},r=i.tableCellPadding,l=i.tablePipeAlign,o=i.stringLength,c=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:m,tableRow:h}};function u(x,k,A,C){return p(b(x,A,C),x.align)}function h(x,k,A,C){const S=y(x,A,C),U=p([S]);return U.slice(0,U.indexOf(`
77
- `))}function m(x,k,A,C){const S=A.enter("tableCell"),U=A.enter("phrasing"),I=A.containerPhrasing(x,{...C,before:c,after:c});return U(),S(),I}function p(x,k){return zN(x,{align:k,alignDelimiters:l,padding:r,stringLength:o})}function b(x,k,A){const C=x.children;let S=-1;const U=[],I=k.enter("table");for(;++S<C.length;)U[S]=y(C[S],k,A);return I(),U}function y(x,k,A){const C=x.children;let S=-1;const U=[],I=k.enter("tableRow");for(;++S<C.length;)U[S]=m(C[S],x,k,A);return I(),U}function E(x,k,A){let C=iv.inlineCode(x,k,A);return A.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Nw(){return{exit:{taskListCheckValueChecked:vb,taskListCheckValueUnchecked:vb,paragraph:Tw}}}function ww(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Aw}}}function vb(t){const i=this.stack[this.stack.length-2];i.type,i.checked=t.type==="taskListCheckValueChecked"}function Tw(t){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const l=r.children[0];if(l&&l.type==="text"){const o=i.children;let c=-1,u;for(;++c<o.length;){const h=o[c];if(h.type==="paragraph"){u=h;break}}u===r&&(l.value=l.value.slice(1),l.value.length===0?r.children.shift():r.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,r.position.start=Object.assign({},l.position.start)))}}this.exit(t)}function Aw(t,i,r,l){const o=t.children[0],c=typeof t.checked=="boolean"&&o&&o.type==="paragraph",u="["+(t.checked?"x":" ")+"] ",h=r.createTracker(l);c&&h.move(u);let m=iv.listItem(t,i,r,{...l,...h.current()});return c&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),m;function p(b){return b+u}}function Cw(){return[sN(),AN(),RN(),yw(),Nw()]}function Ow(t){return{extensions:[oN(),CN(t),DN(),kw(t),ww()]}}const Mw={tokenize:Bw,partial:!0},rv={tokenize:zw,partial:!0},av={tokenize:jw,partial:!0},lv={tokenize:Hw,partial:!0},Rw={tokenize:Fw,partial:!0},sv={name:"wwwAutolink",tokenize:Lw,previous:cv},ov={name:"protocolAutolink",tokenize:Uw,previous:uv},Ri={name:"emailAutolink",tokenize:Iw,previous:dv},oi={};function Dw(){return{text:oi}}let Br=48;for(;Br<123;)oi[Br]=Ri,Br++,Br===58?Br=65:Br===91&&(Br=97);oi[43]=Ri;oi[45]=Ri;oi[46]=Ri;oi[95]=Ri;oi[72]=[Ri,ov];oi[104]=[Ri,ov];oi[87]=[Ri,sv];oi[119]=[Ri,sv];function Iw(t,i,r){const l=this;let o,c;return u;function u(y){return!sf(y)||!dv.call(l,l.previous)||Uf(l.events)?r(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(y))}function h(y){return sf(y)?(t.consume(y),h):y===64?(t.consume(y),m):r(y)}function m(y){return y===46?t.check(Rw,b,p)(y):y===45||y===95||en(y)?(c=!0,t.consume(y),m):b(y)}function p(y){return t.consume(y),o=!0,m}function b(y){return c&&o&&on(l.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(y)):r(y)}}function Lw(t,i,r){const l=this;return o;function o(u){return u!==87&&u!==119||!cv.call(l,l.previous)||Uf(l.events)?r(u):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Mw,t.attempt(rv,t.attempt(av,c),r),r)(u))}function c(u){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(u)}}function Uw(t,i,r){const l=this;let o="",c=!1;return u;function u(y){return(y===72||y===104)&&uv.call(l,l.previous)&&!Uf(l.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(y),t.consume(y),h):r(y)}function h(y){if(on(y)&&o.length<5)return o+=String.fromCodePoint(y),t.consume(y),h;if(y===58){const E=o.toLowerCase();if(E==="http"||E==="https")return t.consume(y),m}return r(y)}function m(y){return y===47?(t.consume(y),c?p:(c=!0,m)):r(y)}function p(y){return y===null||Xo(y)||mt(y)||jr(y)||ac(y)?r(y):t.attempt(rv,t.attempt(av,b),r)(y)}function b(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(y)}}function Bw(t,i,r){let l=0;return o;function o(u){return(u===87||u===119)&&l<3?(l++,t.consume(u),o):u===46&&l===3?(t.consume(u),c):r(u)}function c(u){return u===null?r(u):i(u)}}function zw(t,i,r){let l,o,c;return u;function u(p){return p===46||p===95?t.check(lv,m,h)(p):p===null||mt(p)||jr(p)||p!==45&&ac(p)?m(p):(c=!0,t.consume(p),u)}function h(p){return p===95?l=!0:(o=l,l=void 0),t.consume(p),u}function m(p){return o||l||!c?r(p):i(p)}}function jw(t,i){let r=0,l=0;return o;function o(u){return u===40?(r++,t.consume(u),o):u===41&&l<r?c(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(lv,i,c)(u):u===null||mt(u)||jr(u)?i(u):(t.consume(u),o)}function c(u){return u===41&&l++,t.consume(u),o}}function Hw(t,i,r){return l;function l(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(t.consume(h),l):h===38?(t.consume(h),c):h===93?(t.consume(h),o):h===60||h===null||mt(h)||jr(h)?i(h):r(h)}function o(h){return h===null||h===40||h===91||mt(h)||jr(h)?i(h):l(h)}function c(h){return on(h)?u(h):r(h)}function u(h){return h===59?(t.consume(h),l):on(h)?(t.consume(h),u):r(h)}}function Fw(t,i,r){return l;function l(c){return t.consume(c),o}function o(c){return en(c)?r(c):i(c)}}function cv(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||mt(t)}function uv(t){return!on(t)}function dv(t){return!(t===47||sf(t))}function sf(t){return t===43||t===45||t===46||t===95||en(t)}function Uf(t){let i=t.length,r=!1;for(;i--;){const l=t[i][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){r=!0;break}if(l._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const Pw={tokenize:Zw,partial:!0};function Gw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Vw,continuation:{tokenize:Yw},exit:Xw}},text:{91:{name:"gfmFootnoteCall",tokenize:qw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$w,resolveTo:Kw}}}}function $w(t,i,r){const l=this;let o=l.events.length;const c=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u;for(;o--;){const m=l.events[o][1];if(m.type==="labelImage"){u=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return h;function h(m){if(!u||!u._balanced)return r(m);const p=Xn(l.sliceSerialize({start:u.end,end:l.now()}));return p.codePointAt(0)!==94||!c.includes(p.slice(1))?r(m):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(m),t.exit("gfmFootnoteCallLabelMarker"),i(m))}}function Kw(t,i){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 l={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 c={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},c.start),end:Object.assign({},c.end)},h=[t[r+1],t[r+2],["enter",l,i],t[r+3],t[r+4],["enter",o,i],["exit",o,i],["enter",c,i],["enter",u,i],["exit",u,i],["exit",c,i],t[t.length-2],t[t.length-1],["exit",l,i]];return t.splice(r,t.length-r+1,...h),t}function qw(t,i,r){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c=0,u;return h;function h(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),m}function m(y){return y!==94?r(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",p)}function p(y){if(c>999||y===93&&!u||y===null||y===91||mt(y))return r(y);if(y===93){t.exit("chunkString");const E=t.exit("gfmFootnoteCallString");return o.includes(Xn(l.sliceSerialize(E)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):r(y)}return mt(y)||(u=!0),c++,t.consume(y),y===92?b:p}function b(y){return y===91||y===92||y===93?(t.consume(y),c++,p):p(y)}}function Vw(t,i,r){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c,u=0,h;return m;function m(k){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(k){return k===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",b):r(k)}function b(k){if(u>999||k===93&&!h||k===null||k===91||mt(k))return r(k);if(k===93){t.exit("chunkString");const A=t.exit("gfmFootnoteDefinitionLabelString");return c=Xn(l.sliceSerialize(A)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),E}return mt(k)||(h=!0),u++,t.consume(k),k===92?y:b}function y(k){return k===91||k===92||k===93?(t.consume(k),u++,b):b(k)}function E(k){return k===58?(t.enter("definitionMarker"),t.consume(k),t.exit("definitionMarker"),o.includes(c)||o.push(c),Ze(t,x,"gfmFootnoteDefinitionWhitespace")):r(k)}function x(k){return i(k)}}function Yw(t,i,r){return t.check(os,i,t.attempt(Pw,i,r))}function Xw(t){t.exit("gfmFootnoteDefinition")}function Zw(t,i,r){const l=this;return Ze(t,o,"gfmFootnoteDefinitionIndent",5);function o(c){const u=l.events[l.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?i(c):r(c)}}function Qw(t){let r=(t||{}).singleTilde;const l={name:"strikethrough",tokenize:c,resolveAll:o};return r==null&&(r=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(u,h){let m=-1;for(;++m<u.length;)if(u[m][0]==="enter"&&u[m][1].type==="strikethroughSequenceTemporary"&&u[m][1]._close){let p=m;for(;p--;)if(u[p][0]==="exit"&&u[p][1].type==="strikethroughSequenceTemporary"&&u[p][1]._open&&u[m][1].end.offset-u[m][1].start.offset===u[p][1].end.offset-u[p][1].start.offset){u[m][1].type="strikethroughSequence",u[p][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},u[p][1].start),end:Object.assign({},u[m][1].end)},y={type:"strikethroughText",start:Object.assign({},u[p][1].end),end:Object.assign({},u[m][1].start)},E=[["enter",b,h],["enter",u[p][1],h],["exit",u[p][1],h],["enter",y,h]],x=h.parser.constructs.insideSpan.null;x&&Mn(E,E.length,0,lc(x,u.slice(p+1,m),h)),Mn(E,E.length,0,[["exit",y,h],["enter",u[m][1],h],["exit",u[m][1],h],["exit",b,h]]),Mn(u,p-1,m-p+3,E),m=p+E.length-2;break}}for(m=-1;++m<u.length;)u[m][1].type==="strikethroughSequenceTemporary"&&(u[m][1].type="data");return u}function c(u,h,m){const p=this.previous,b=this.events;let y=0;return E;function E(k){return p===126&&b[b.length-1][1].type!=="characterEscape"?m(k):(u.enter("strikethroughSequenceTemporary"),x(k))}function x(k){const A=Pa(p);if(k===126)return y>1?m(k):(u.consume(k),y++,x);if(y<2&&!r)return m(k);const C=u.exit("strikethroughSequenceTemporary"),S=Pa(k);return C._open=!S||S===2&&!!A,C._close=!A||A===2&&!!S,h(k)}}}class Jw{constructor(){this.map=[]}add(i,r,l){Ww(this,i,r,l)}consume(i){if(this.map.sort(function(c,u){return c[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const l=[];for(;r>0;)r-=1,l.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];l.push(i.slice()),i.length=0;let o=l.pop();for(;o;){for(const c of o)i.push(c);o=l.pop()}this.map.length=0}}function Ww(t,i,r,l){let o=0;if(!(r===0&&l.length===0)){for(;o<t.map.length;){if(t.map[o][0]===i){t.map[o][1]+=r,t.map[o][2].push(...l);return}o+=1}t.map.push([i,r,l])}}function eT(t,i){let r=!1;const l=[];for(;i<t.length;){const o=t[i];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const c=l.length-1;l[c]=l[c]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return l}function tT(){return{flow:{null:{name:"table",tokenize:nT,resolveAll:iT}}}}function nT(t,i,r){const l=this;let o=0,c=0,u;return h;function h(w){let H=l.events.length-1;for(;H>-1;){const j=l.events[H][1].type;if(j==="lineEnding"||j==="linePrefix")H--;else break}const X=H>-1?l.events[H][1].type:null,ye=X==="tableHead"||X==="tableRow"?B:m;return ye===B&&l.parser.lazy[l.now().line]?r(w):ye(w)}function m(w){return t.enter("tableHead"),t.enter("tableRow"),p(w)}function p(w){return w===124||(u=!0,c+=1),b(w)}function b(w){return w===null?r(w):Ae(w)?c>1?(c=0,l.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),x):r(w):$e(w)?Ze(t,b,"whitespace")(w):(c+=1,u&&(u=!1,o+=1),w===124?(t.enter("tableCellDivider"),t.consume(w),t.exit("tableCellDivider"),u=!0,b):(t.enter("data"),y(w)))}function y(w){return w===null||w===124||mt(w)?(t.exit("data"),b(w)):(t.consume(w),w===92?E:y)}function E(w){return w===92||w===124?(t.consume(w),y):y(w)}function x(w){return l.interrupt=!1,l.parser.lazy[l.now().line]?r(w):(t.enter("tableDelimiterRow"),u=!1,$e(w)?Ze(t,k,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):k(w))}function k(w){return w===45||w===58?C(w):w===124?(u=!0,t.enter("tableCellDivider"),t.consume(w),t.exit("tableCellDivider"),A):re(w)}function A(w){return $e(w)?Ze(t,C,"whitespace")(w):C(w)}function C(w){return w===58?(c+=1,u=!0,t.enter("tableDelimiterMarker"),t.consume(w),t.exit("tableDelimiterMarker"),S):w===45?(c+=1,S(w)):w===null||Ae(w)?G(w):re(w)}function S(w){return w===45?(t.enter("tableDelimiterFiller"),U(w)):re(w)}function U(w){return w===45?(t.consume(w),U):w===58?(u=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(w),t.exit("tableDelimiterMarker"),I):(t.exit("tableDelimiterFiller"),I(w))}function I(w){return $e(w)?Ze(t,G,"whitespace")(w):G(w)}function G(w){return w===124?k(w):w===null||Ae(w)?!u||o!==c?re(w):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(w)):re(w)}function re(w){return r(w)}function B(w){return t.enter("tableRow"),ae(w)}function ae(w){return w===124?(t.enter("tableCellDivider"),t.consume(w),t.exit("tableCellDivider"),ae):w===null||Ae(w)?(t.exit("tableRow"),i(w)):$e(w)?Ze(t,ae,"whitespace")(w):(t.enter("data"),fe(w))}function fe(w){return w===null||w===124||mt(w)?(t.exit("data"),ae(w)):(t.consume(w),w===92?me:fe)}function me(w){return w===92||w===124?(t.consume(w),fe):fe(w)}}function iT(t,i){let r=-1,l=!0,o=0,c=[0,0,0,0],u=[0,0,0,0],h=!1,m=0,p,b,y;const E=new Jw;for(;++r<t.length;){const x=t[r],k=x[1];x[0]==="enter"?k.type==="tableHead"?(h=!1,m!==0&&(xb(E,i,m,p,b),b=void 0,m=0),p={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},E.add(r,0,[["enter",p,i]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(l=!0,y=void 0,c=[0,0,0,0],u=[0,r+1,0,0],h&&(h=!1,b={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},E.add(r,0,[["enter",b,i]])),o=k.type==="tableDelimiterRow"?2:b?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(l=!1,u[2]===0&&(c[1]!==0&&(u[0]=u[1],y=Do(E,i,c,o,void 0,y),c=[0,0,0,0]),u[2]=r)):k.type==="tableCellDivider"&&(l?l=!1:(c[1]!==0&&(u[0]=u[1],y=Do(E,i,c,o,void 0,y)),c=u,u=[c[1],r,0,0])):k.type==="tableHead"?(h=!0,m=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(m=r,c[1]!==0?(u[0]=u[1],y=Do(E,i,c,o,r,y)):u[1]!==0&&(y=Do(E,i,u,o,r,y)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(u[3]=r)}for(m!==0&&xb(E,i,m,p,b),E.consume(i.events),r=-1;++r<i.events.length;){const x=i.events[r];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=eT(i.events,r))}return t}function Do(t,i,r,l,o,c){const u=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",h="tableContent";r[0]!==0&&(c.end=Object.assign({},Da(i.events,r[0])),t.add(r[0],0,[["exit",c,i]]));const m=Da(i.events,r[1]);if(c={type:u,start:Object.assign({},m),end:Object.assign({},m)},t.add(r[1],0,[["enter",c,i]]),r[2]!==0){const p=Da(i.events,r[2]),b=Da(i.events,r[3]),y={type:h,start:Object.assign({},p),end:Object.assign({},b)};if(t.add(r[2],0,[["enter",y,i]]),l!==2){const E=i.events[r[2]],x=i.events[r[3]];if(E[1].end=Object.assign({},x[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",y,i]])}return o!==void 0&&(c.end=Object.assign({},Da(i.events,o)),t.add(o,0,[["exit",c,i]]),c=void 0),c}function xb(t,i,r,l,o){const c=[],u=Da(i.events,r);o&&(o.end=Object.assign({},u),c.push(["exit",o,i])),l.end=Object.assign({},u),c.push(["exit",l,i]),t.add(r+1,0,c)}function Da(t,i){const r=t[i],l=r[0]==="enter"?"start":"end";return r[1][l]}const rT={name:"tasklistCheck",tokenize:lT};function aT(){return{text:{91:rT}}}function lT(t,i,r){const l=this;return o;function o(m){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?r(m):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),c)}function c(m){return mt(m)?(t.enter("taskListCheckValueUnchecked"),t.consume(m),t.exit("taskListCheckValueUnchecked"),u):m===88||m===120?(t.enter("taskListCheckValueChecked"),t.consume(m),t.exit("taskListCheckValueChecked"),u):r(m)}function u(m){return m===93?(t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):r(m)}function h(m){return Ae(m)?i(m):$e(m)?t.check({tokenize:sT},i,r)(m):r(m)}}function sT(t,i,r){return Ze(t,l,"whitespace");function l(o){return o===null?r(o):i(o)}}function oT(t){return Ey([Dw(),Gw(),Qw(t),tT(),aT()])}const cT={};function fv(t){const i=this,r=t||cT,l=i.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),c=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),u=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(oT(r)),c.push(Cw()),u.push(Ow(r))}const Eb=(function(t,i,r){const l=cs(r);if(!t||!t.type||!t.children)throw new Error("Expected parent node");if(typeof i=="number"){if(i<0||i===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(i=t.children.indexOf(i),i<0)throw new Error("Expected child node or index");for(;++i<t.children.length;)if(l(t.children[i],i,t))return t.children[i]}),Fr=(function(t){if(t==null)return fT;if(typeof t=="string")return dT(t);if(typeof t=="object")return uT(t);if(typeof t=="function")return Bf(t);throw new Error("Expected function, string, or array as `test`")});function uT(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=Fr(t[r]);return Bf(l);function l(...o){let c=-1;for(;++c<i.length;)if(i[c].apply(this,o))return!0;return!1}}function dT(t){return Bf(i);function i(r){return r.tagName===t}}function Bf(t){return i;function i(r,l,o){return!!(hT(r)&&t.call(this,r,typeof l=="number"?l:void 0,o||void 0))}}function fT(t){return!!(t&&typeof t=="object"&&"type"in t&&t.type==="element"&&"tagName"in t&&typeof t.tagName=="string")}function hT(t){return t!==null&&typeof t=="object"&&"type"in t&&"tagName"in t}const _b=/\n/g,Sb=/[\t ]+/g,of=Fr("br"),kb=Fr(ET),pT=Fr("p"),Nb=Fr("tr"),mT=Fr(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",xT,_T]),hv=Fr(["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 gT(t,i){const r=i||{},l="children"in t?t.children:[],o=hv(t),c=gv(t,{whitespace:r.whitespace||"normal"}),u=[];(t.type==="text"||t.type==="comment")&&u.push(...mv(t,{breakBefore:!0,breakAfter:!0}));let h=-1;for(;++h<l.length;)u.push(...pv(l[h],t,{whitespace:c,breakBefore:h?void 0:o,breakAfter:h<l.length-1?of(l[h+1]):o}));const m=[];let p;for(h=-1;++h<u.length;){const b=u[h];typeof b=="number"?p!==void 0&&b>p&&(p=b):b&&(p!==void 0&&p>-1&&m.push(`
78
- `.repeat(p)||" "),p=-1,m.push(b))}return m.join("")}function pv(t,i,r){return t.type==="element"?bT(t,i,r):t.type==="text"?r.whitespace==="normal"?mv(t,r):yT(t):[]}function bT(t,i,r){const l=gv(t,r),o=t.children||[];let c=-1,u=[];if(mT(t))return u;let h,m;for(of(t)||Nb(t)&&Eb(i,t,Nb)?m=`
79
- `:pT(t)?(h=2,m=2):hv(t)&&(h=1,m=1);++c<o.length;)u=u.concat(pv(o[c],t,{whitespace:l,breakBefore:c?void 0:h,breakAfter:c<o.length-1?of(o[c+1]):m}));return kb(t)&&Eb(i,t,kb)&&u.push(" "),h&&u.unshift(h),m&&u.push(m),u}function mv(t,i){const r=String(t.value),l=[],o=[];let c=0;for(;c<=r.length;){_b.lastIndex=c;const m=_b.exec(r),p=m&&"index"in m?m.index:r.length;l.push(vT(r.slice(c,p).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),c===0?i.breakBefore:!0,p===r.length?i.breakAfter:!0)),c=p+1}let u=-1,h;for(;++u<l.length;)l[u].charCodeAt(l[u].length-1)===8203||u<l.length-1&&l[u+1].charCodeAt(0)===8203?(o.push(l[u]),h=void 0):l[u]?(typeof h=="number"&&o.push(h),o.push(l[u]),h=0):(u===0||u===l.length-1)&&o.push(0);return o}function yT(t){return[String(t.value)]}function vT(t,i,r){const l=[];let o=0,c;for(;o<t.length;){Sb.lastIndex=o;const u=Sb.exec(t);c=u?u.index:t.length,!o&&!c&&u&&!i&&l.push(""),o!==c&&l.push(t.slice(o,c)),o=u?c+u[0].length:c}return o!==c&&!r&&l.push(""),l.join(" ")}function gv(t,i){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":i.whitespace;case"textarea":return"pre-wrap"}}return i.whitespace}function xT(t){return!!(t.properties||{}).hidden}function ET(t){return t.tagName==="td"||t.tagName==="th"}function _T(t){return t.tagName==="dialog"&&!(t.properties||{}).open}function ST(t){const i=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),l="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",u="(?!struct)("+l+"|"+i.optional(o)+"[a-zA-Z_]\\w*"+i.optional("<[^<>]+>")+")",h={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={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})"/})]},b={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},y={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(p,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},E={className:"title",begin:i.optional(o)+t.IDENT_RE,relevance:0},x=i.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"],C=["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"],G={type:A,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:C},re={className:"function.dispatch",relevance:0,keywords:{_hint:S},begin:i.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,i.lookahead(/(<[^<>]+>|)\s*\(/))},B=[re,y,h,r,t.C_BLOCK_COMMENT_MODE,b,p],ae={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:G,contains:B.concat([{begin:/\(/,end:/\)/,keywords:G,contains:B.concat(["self"]),relevance:0}]),relevance:0},fe={className:"function",begin:"("+u+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:G,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:l,keywords:G,relevance:0},{begin:x,returnBegin:!0,contains:[E],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:G,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,p,b,h,{begin:/\(/,end:/\)/,keywords:G,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,p,b,h]}]},h,r,t.C_BLOCK_COMMENT_MODE,y]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:G,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(ae,fe,re,B,[y,{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:G,contains:["self",h]},{begin:t.IDENT_RE+"::",keywords:G},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function kT(t){const i={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=ST(t),l=r.keywords;return l.type=[...l.type,...i.type],l.literal=[...l.literal,...i.literal],l.built_in=[...l.built_in,...i.built_in],l._hints=i._hints,r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}function NT(t){const i=t.regex,r={},l={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:i.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},l]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},c=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"})]}},h={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,r,o]};o.contains.push(h);const m={match:/\\"/},p={className:"string",begin:/'/,end:/'/},b={match:/\\'/},y={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},E=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],x=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"],C=["true","false"],S={match:/(\/[a-z._-]+)+/},U=["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"],G=["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"],re=["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:C,built_in:[...U,...I,"set","shopt",...G,...re]},contains:[x,t.SHEBANG(),k,y,c,u,S,h,m,p,b,r]}}function wT(t){const i=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),l="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",u="("+l+"|"+i.optional(o)+"[a-zA-Z_]\\w*"+i.optional("<[^<>]+>")+")",h={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},p={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})"/})]},b={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},y={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(p,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},E={className:"title",begin:i.optional(o)+t.IDENT_RE,relevance:0},x=i.optional(o)+t.IDENT_RE+"\\s*\\(",C={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=[y,h,r,t.C_BLOCK_COMMENT_MODE,b,p],U={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:S.concat([{begin:/\(/,end:/\)/,keywords:C,contains:S.concat(["self"]),relevance:0}]),relevance:0},I={begin:"("+u+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:l,keywords:C,relevance:0},{begin:x,returnBegin:!0,contains:[t.inherit(E,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,p,b,h,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,p,b,h]}]},h,r,t.C_BLOCK_COMMENT_MODE,y]};return{name:"C",aliases:["h"],keywords:C,disableAutodetect:!0,illegal:"</",contains:[].concat(U,I,S,[y,{begin:t.IDENT_RE+"::",keywords:C},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:y,strings:p,keywords:C}}}function TT(t){const i=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),l="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",u="(?!struct)("+l+"|"+i.optional(o)+"[a-zA-Z_]\\w*"+i.optional("<[^<>]+>")+")",h={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={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})"/})]},b={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},y={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(p,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},E={className:"title",begin:i.optional(o)+t.IDENT_RE,relevance:0},x=i.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"],C=["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"],G={type:A,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:C},re={className:"function.dispatch",relevance:0,keywords:{_hint:S},begin:i.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,i.lookahead(/(<[^<>]+>|)\s*\(/))},B=[re,y,h,r,t.C_BLOCK_COMMENT_MODE,b,p],ae={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:G,contains:B.concat([{begin:/\(/,end:/\)/,keywords:G,contains:B.concat(["self"]),relevance:0}]),relevance:0},fe={className:"function",begin:"("+u+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:G,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:l,keywords:G,relevance:0},{begin:x,returnBegin:!0,contains:[E],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:G,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,p,b,h,{begin:/\(/,end:/\)/,keywords:G,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,p,b,h]}]},h,r,t.C_BLOCK_COMMENT_MODE,y]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:G,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(ae,fe,re,B,[y,{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:G,contains:["self",h]},{begin:t.IDENT_RE+"::",keywords:G},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function AT(t){const i=["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"],l=["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"],c=["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(c),built_in:i,literal:l},h=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),m={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},p={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},y=t.inherit(b,{illegal:/\n/}),E={className:"subst",begin:/\{/,end:/\}/,keywords:u},x=t.inherit(E,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,x]},A={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},E]},C=t.inherit(A,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]});E.contains=[A,k,b,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,m,t.C_BLOCK_COMMENT_MODE],x.contains=[C,k,y,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,m,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const S={variants:[p,A,k,b,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},U={begin:"<",end:">",contains:[{beginKeywords:"in out"},h]},I=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",G={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,m,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},h,U,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[h,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[h,U,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,U],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,relevance:0,contains:[S,m,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},G]}}const CT=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_-]*/}}),OT=["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"],MT=["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"],RT=[...OT,...MT],DT=["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(),IT=["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(),LT=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),UT=["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 BT(t){const i=t.regex,r=CT(t),l={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",c=/@-?\w[\w]*(-\w+)*/,u="[a-zA-Z-][a-zA-Z0-9_-]*",h=[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,l,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:":("+IT.join("|")+")"},{begin:":(:)?("+LT.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+UT.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...h,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...h,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:i.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:c},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:DT.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...h,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+RT.join("|")+")\\b"}]}}function zT(t){const i=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:i.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:i.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 jT(t){const c={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:c,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:c,illegal:/["']/}]}]}}function HT(t){const i=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:i.concat(r,i.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function FT(t){const i=t.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},l=t.COMMENT();l.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const o={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},c={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:"'"}]},h={begin:/\[/,end:/\]/,contains:[l,c,o,u,r,"self"],relevance:0},m=/[A-Za-z0-9_-]+/,p=/"(\\"|[^"])*"/,b=/'[^']*'/,y=i.either(m,p,b),E=i.concat(y,"(\\s*\\.\\s*",y,")*",i.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[l,{className:"section",begin:/\[+/,end:/\]+/},{begin:E,className:"attr",starts:{end:/$/,contains:[l,h,c,o,u,r]}}]}}var Ia="[0-9](_*[0-9])*",Io=`\\.(${Ia})`,Lo="[0-9a-fA-F](_*[0-9a-fA-F])*",wb={className:"number",variants:[{begin:`(\\b(${Ia})((${Io})|\\.)?|(${Io}))[eE][+-]?(${Ia})[fFdD]?\\b`},{begin:`\\b(${Ia})((${Io})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Io})[fFdD]?\\b`},{begin:`\\b(${Ia})[fFdD]\\b`},{begin:`\\b0[xX]((${Lo})\\.?|(${Lo})?\\.(${Lo}))[pP][+-]?(${Ia})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Lo})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function bv(t,i,r){return r===-1?"":t.replace(i,l=>bv(t,i,r-1))}function PT(t){const i=t.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",l=r+bv("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),m={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"]},p={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[t.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:m,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:[i.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[b,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+l+"\\s+)",t.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:m,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[p,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,wb,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},wb,p]}}const Tb="[A-Za-z$_][0-9A-Za-z$_]*",GT=["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"],$T=["true","false","null","undefined","NaN","Infinity"],yv=["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"],vv=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xv=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],KT=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],qT=[].concat(xv,yv,vv);function VT(t){const i=t.regex,r=(ee,{after:ue})=>{const T="</"+ee[0].slice(1);return ee.input.indexOf(T,ue)!==-1},l=Tb,o={begin:"<>",end:"</>"},c=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ee,ue)=>{const T=ee[0].length+ee.index,O=ee.input[T];if(O==="<"||O===","){ue.ignoreMatch();return}O===">"&&(r(ee,{after:T})||ue.ignoreMatch());let q;const N=ee.input.substring(T);if(q=N.match(/^\s*=/)){ue.ignoreMatch();return}if((q=N.match(/^\s+extends\s+/))&&q.index===0){ue.ignoreMatch();return}}},h={$pattern:Tb,keyword:GT,literal:$T,built_in:qT,"variable.language":KT},m="[0-9](_?[0-9])*",p=`\\.(${m})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={className:"number",variants:[{begin:`(\\b(${b})((${p})|\\.)?|(${p}))[eE][+-]?(${m})\\b`},{begin:`\\b(${b})\\b((${p})\\b|\\.)?|(${p})\\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:h,contains:[]},x={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"}},C={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]},U={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:l+"(?=\\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,x,k,A,C,{match:/\$\d+/},y];E.contains=I.concat({begin:/\{/,end:/\}/,keywords:h,contains:["self"].concat(I)});const G=[].concat(U,E.contains),re=G.concat([{begin:/(\s*)\(/,end:/\)/,keywords:h,contains:["self"].concat(G)}]),B={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:re},ae={variants:[{match:[/class/,/\s+/,l,/\s+/,/extends/,/\s+/,i.concat(l,"(",i.concat(/\./,l),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,l],scope:{1:"keyword",3:"title.class"}}]},fe={relevance:0,match:i.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:{_:[...yv,...vv]}},me={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},w={variants:[{match:[/function/,/\s+/,l,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[B],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function X(ee){return i.concat("(?!",ee.join("|"),")")}const ye={match:i.concat(/\b/,X([...xv,"super","import"].map(ee=>`${ee}\\s*\\(`)),l,i.lookahead(/\s*\(/)),className:"title.function",relevance:0},j={begin:i.concat(/\./,i.lookahead(i.concat(l,/(?![0-9A-Za-z$_(])/))),end:l,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,l,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},B]},D="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,l,/\s*/,/=\s*/,/(async\s*)?/,i.lookahead(D)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[B]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:h,exports:{PARAMS_CONTAINS:re,CLASS_REFERENCE:fe},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),me,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,x,k,A,C,U,{match:/\$\d+/},y,fe,{scope:"attr",match:l+i.lookahead(":"),relevance:0},W,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[U,t.REGEXP_MODE,{className:"function",begin:D,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:h,contains:re}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:c},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},w,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[B,t.inherit(t.TITLE_MODE,{begin:l,className:"title.function"})]},{match:/\.\.\./,relevance:0},j,{match:"\\$"+l,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[B]},ye,H,ae,Z,{match:/\$[(.]/}]}}function YT(t){const i={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},l=["true","false","null"],o={scope:"literal",beginKeywords:l.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:l},contains:[i,r,t.QUOTE_STRING_MODE,o,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var La="[0-9](_*[0-9])*",Uo=`\\.(${La})`,Bo="[0-9a-fA-F](_*[0-9a-fA-F])*",XT={className:"number",variants:[{begin:`(\\b(${La})((${Uo})|\\.)?|(${Uo}))[eE][+-]?(${La})[fFdD]?\\b`},{begin:`\\b(${La})((${Uo})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Uo})[fFdD]?\\b`},{begin:`\\b(${La})[fFdD]\\b`},{begin:`\\b0[xX]((${Bo})\\.?|(${Bo})?\\.(${Bo}))[pP][+-]?(${La})[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 ZT(t){const i={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+/}]}},l={className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[t.C_NUMBER_MODE]},c={className:"variable",begin:"\\$"+t.UNDERSCORE_IDENT_RE},u={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[c,o]},{begin:"'",end:"'",illegal:/\n/,contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[t.BACKSLASH_ESCAPE,c,o]}]};o.contains.push(u);const h={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+t.UNDERSCORE_IDENT_RE+")?"},m={className:"meta",begin:"@"+t.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[t.inherit(u,{className:"string"}),"self"]}]},p=XT,b=t.COMMENT("/\\*","\\*/",{contains:[t.C_BLOCK_COMMENT_MODE]}),y={variants:[{className:"type",begin:t.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},E=y;return E.variants[1].contains=[y],y.variants[1].contains=[E],{name:"Kotlin",aliases:["kt","kts"],keywords:i,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),t.C_LINE_COMMENT_MODE,b,r,l,h,m,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:i,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:i,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[y,t.C_LINE_COMMENT_MODE,b],relevance:0},t.C_LINE_COMMENT_MODE,b,h,m,u,t.C_NUMBER_MODE]},b]},{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},h,m]},u,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
80
- `},p]}}const QT=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_-]*/}}),JT=["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"],WT=["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"],eA=[...JT,...WT],tA=["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(),Ev=["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(),_v=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),nA=["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(),iA=Ev.concat(_v).sort().reverse();function rA(t){const i=QT(t),r=iA,l="and or not only",o="[\\w-]+",c="("+o+"|@\\{"+o+"\\})",u=[],h=[],m=function(I){return{className:"string",begin:"~?"+I+".*?"+I}},p=function(I,G,re){return{className:I,begin:G,relevance:re}},b={$pattern:/[a-z-]+/,keyword:l,attribute:tA.join(" ")},y={begin:"\\(",end:"\\)",contains:h,keywords:b,relevance:0};h.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,m("'"),m('"'),i.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},i.HEXCOLOR,y,p("variable","@@?"+o,10),p("variable","@\\{"+o+"\\}"),p("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},i.IMPORTANT,{beginKeywords:"and not"},i.FUNCTION_DISPATCH);const E=h.concat({begin:/\{/,end:/\}/,contains:u}),x={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(h)},k={begin:c+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+nA.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:h}}]},A={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:b,returnEnd:!0,contains:h,relevance:0}},C={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:E}},S={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:c,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,x,p("keyword","all\\b"),p("variable","@\\{"+o+"\\}"),{begin:"\\b("+eA.join("|")+")\\b",className:"selector-tag"},i.CSS_NUMBER_MODE,p("selector-tag",c,0),p("selector-id","#"+c),p("selector-class","\\."+c,0),p("selector-tag","&",0),i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Ev.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+_v.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:E},{begin:"!important"},i.FUNCTION_DISPATCH]},U={begin:o+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[S]};return u.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,A,C,U,k,S,x,i.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:u}}function aA(t){const i="\\[=*\\[",r="\\]=*\\]",l={begin:i,end:r,contains:["self"]},o=[t.COMMENT("--(?!"+i+")","$"),t.COMMENT("--"+i,r,{contains:[l],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:i,end:r,contains:[l],relevance:5}])}}function lA(t){const i={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,i]},l={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:[i,r]},o={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},c={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},u={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[i]};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,i,r,l,o,c,u]}}function sA(t){const i=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},l={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}]},c={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}]},h=/[A-Za-z][A-Za-z0-9+.-]*/,m={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:i.concat(/\[.+?\]\(/,h,/:\/\/.*?\)/),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}]},p={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},y=t.inherit(p,{contains:[]}),E=t.inherit(b,{contains:[]});p.contains.push(E),b.contains.push(y);let x=[r,m];return[p,b,y,E].forEach(S=>{S.contains=S.contains.concat(x)}),x=x.concat(p,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:x},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:x}]}]},r,c,p,b,{className:"quote",begin:"^>\\s+",contains:x,end:"$"},o,l,m,u,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function oA(t){const i={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_]*/,h={"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"]},m={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:h,illegal:"</",contains:[i,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:"("+m.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:m,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}function cA(t){const i=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"],l=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:r.join(" ")},c={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},u={begin:/->\{/,end:/\}/},h={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},m={scope:"variable",variants:[{begin:/\$\d/},{begin:i.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[h]},p={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},b=[t.BACKSLASH_ESCAPE,c,m],y=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],E=(A,C,S="\\1")=>{const U=S==="\\1"?S:i.concat(S,C);return i.concat(i.concat("(?:",A,")"),C,/(?:\\.|[^\\\/])*?/,U,/(?:\\.|[^\\\/])*?/,S,l)},x=(A,C,S)=>i.concat(i.concat("(?:",A,")"),C,/(?:\\.|[^\\\/])*?/,S,l),k=[m,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),u,{className:"string",contains:b,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}]},p,{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",i.either(...y,{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:x("(?:m|qr)?",/\//,/\//)},{begin:x("m|qr",i.either(...y,{capture:!0}),/\1/)},{begin:x("m|qr",/\(/,/\)/)},{begin:x("m|qr",/\[/,/\]/)},{begin:x("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,h]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,h,p]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return c.contains=k,u.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:k}}function uA(t){const i=t.regex,r=/(?![A-Za-z0-9])(?![$])/,l=i.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),o=i.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),c=i.concat(/[A-Z]+/,r),u={scope:"variable",match:"\\$+"+l},h={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},m={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},p=t.inherit(t.APOS_STRING_MODE,{illegal:null}),b=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(m)}),y={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(m),"on:begin":(j,Z)=>{Z.data._beginMatch=j[1]||j[2]},"on:end":(j,Z)=>{Z.data._beginMatch!==j[1]&&Z.ignoreMatch()}},E=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),x=`[
81
- ]`,k={scope:"string",variants:[b,p,y,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},C=["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"],U=["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"],G={keyword:S,literal:(j=>{const Z=[];return j.forEach(D=>{Z.push(D),D.toLowerCase()===D?Z.push(D.toUpperCase()):Z.push(D.toLowerCase())}),Z})(C),built_in:U},re=j=>j.map(Z=>Z.replace(/\|\d+$/,"")),B={variants:[{match:[/new/,i.concat(x,"+"),i.concat("(?!",re(U).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},ae=i.concat(l,"\\b(?!\\()"),fe={variants:[{match:[i.concat(/::/,i.lookahead(/(?!class\b)/)),ae],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,i.concat(/::/,i.lookahead(/(?!class\b)/)),ae],scope:{1:"title.class",3:"variable.constant"}},{match:[o,i.concat("::",i.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},me={scope:"attr",match:i.concat(l,i.lookahead(":"),i.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:G,contains:[me,u,fe,t.C_BLOCK_COMMENT_MODE,k,A,B]},H={relevance:0,match:[/\b/,i.concat("(?!fn\\b|function\\b|",re(S).join("\\b|"),"|",re(U).join("\\b|"),"\\b)"),l,i.concat(x,"*"),i.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(H);const X=[me,fe,t.C_BLOCK_COMMENT_MODE,k,A,B],ye={begin:i.concat(/#\[\s*\\?/,i.either(o,c)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:C,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:C,keyword:["new","array"]},contains:["self",...X]},...X,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:G,contains:[ye,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}]}},h,{scope:"variable.language",match:/\$this\b/},u,H,fe,{match:[/const/,/\s/,l],scope:{1:"keyword",3:"variable.constant"}},B,{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:G,contains:["self",ye,u,fe,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 dA(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 fA(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function hA(t){const i=t.regex,r=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),l=["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"],h={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:l,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"]},m={className:"meta",begin:/^(>>>|\.\.\.) /},p={className:"subst",begin:/\{/,end:/\}/,keywords:h,illegal:/#/},b={begin:/\{\{/,relevance:0},y={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,m],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,m],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,m,b,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,m,b,p]},{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,b,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,b,p]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},E="[0-9](_?[0-9])*",x=`(\\b(${E}))?\\.(${E})|\\b(${E})\\.`,k=`\\b|${l.join("|")}`,A={className:"number",relevance:0,variants:[{begin:`(\\b(${E})|(${x}))[eE][+-]?(${E})[jJ]?(?=${k})`},{begin:`(${x})[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})`}]},C={className:"comment",begin:i.lookahead(/# type:/),end:/$/,keywords:h,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:h,contains:["self",m,A,y,t.HASH_COMMENT_MODE]}]};return p.contains=[y,A,m],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:h,illegal:/(<\/|\?)|=>/,contains:[m,A,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},y,C,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,y]}]}}function pA(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function mA(t){const i=t.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,l=i.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=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,c=i.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:i.lookahead(i.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,l]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,l]},{scope:{1:"punctuation",2:"number"},match:[c,l]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,l]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:c},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function gA(t){const i=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",l=i.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=i.concat(l,/(::\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"]},h={className:"doctag",begin:"@[A-Za-z]+"},m={begin:"#<",end:">"},p=[t.COMMENT("#","$",{contains:[h]}),t.COMMENT("^=begin","^=end",{contains:[h],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:u},y={className:"string",contains:[t.BACKSLASH_ESCAPE,b],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:i.concat(/<<[-~]?'?/,i.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,b]})]}]},E="[1-9](_?[0-9])*|0",x="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${E})(\\.(${x}))?([eE][+-]?(${x})|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}]},B=[y,{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:l,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:[y,{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,b],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(m,p),relevance:0}].concat(m,p);b.contains=B,A.contains=B;const w=[{begin:/^\s*=>/,starts:{end:"$",contains:B}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:u,contains:B}}];return p.unshift(m),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:u,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(w).concat(p).concat(B)}}function bA(t){const i=t.regex,r=/(r#)?/,l=i.concat(r,t.UNDERSCORE_IDENT_RE),o=i.concat(r,t.IDENT_RE),c={className:"title.function.invoke",relevance:0,begin:i.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,i.lookahead(/\s*\(/))},u="([ui](8|16|32|64|128|size)|f(32|64))?",h=["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"],m=["true","false","Some","None","Ok","Err"],p=["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!"],b=["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:b,keyword:h,literal:m,built_in:p},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+/,l],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,l],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,l,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,l],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,l],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:p,type:b}},{className:"punctuation",begin:"->"},c]}}const yA=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_-]*/}}),vA=["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"],xA=["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"],EA=[...vA,...xA],_A=["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(),SA=["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(),kA=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),NA=["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 wA(t){const i=yA(t),r=kA,l=SA,o="@[a-z-]+",c="and or not only",h={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,i.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+EA.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+l.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},h,{begin:/\(/,end:/\)/,contains:[i.CSS_NUMBER_MODE]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+NA.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:[i.BLOCK_COMMENT,h,i.HEXCOLOR,i.CSS_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,i.IMPORTANT,i.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:c,attribute:_A.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},h,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,i.HEXCOLOR,i.CSS_NUMBER_MODE]},i.FUNCTION_DISPATCH]}}function TA(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function AA(t){const i=t.regex,r=t.COMMENT("--","$"),l={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},c=["true","false","unknown"],u=["double precision","large object","with timezone","without timezone"],h=["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"],m=["add","asc","collation","desc","final","first","last","view"],p=["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"],b=["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"],y=["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"],x=b,k=[...p,...m].filter(re=>!b.includes(re)),A={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},C={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},S={match:i.concat(/\b/,i.either(...x),/\s*\(/),relevance:0,keywords:{built_in:x}};function U(re){return i.concat(/\b/,i.either(...re.map(B=>B.replace(/\s+/,"\\s+"))),/\b/)}const I={scope:"keyword",match:U(E),relevance:0};function G(re,{exceptions:B,when:ae}={}){const fe=ae;return B=B||[],re.map(me=>me.match(/\|\d+$/)||B.includes(me)?me:fe(me)?`${me}|0`:me)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:G(k,{when:re=>re.length<3}),literal:c,type:h,built_in:y},contains:[{scope:"type",match:U(u)},I,S,A,l,o,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,C]}}function Sv(t){return t?typeof t=="string"?t:t.source:null}function ql(t){return dt("(?=",t,")")}function dt(...t){return t.map(r=>Sv(r)).join("")}function CA(t){const i=t[t.length-1];return typeof i=="object"&&i.constructor===Object?(t.splice(t.length-1,1),i):{}}function sn(...t){return"("+(CA(t).capture?"":"?:")+t.map(l=>Sv(l)).join("|")+")"}const zf=t=>dt(/\b/,t,/\w$/.test(t)?/\b/:/\B/),OA=["Protocol","Type"].map(zf),Ab=["init","self"].map(zf),MA=["Any","Self"],Bd=["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"],Cb=["false","nil","true"],RA=["assignment","associativity","higherThan","left","lowerThan","none","right"],DA=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Ob=["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"],kv=sn(/[/=\-+!*%<>&|^~?]/,/[\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]/),Nv=sn(kv,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),zd=dt(kv,Nv,"*"),wv=sn(/[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=sn(wv,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),ri=dt(wv,Wo,"*"),zo=dt(/[A-Z]/,Wo,"*"),IA=["attached","autoclosure",dt(/convention\(/,sn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",dt(/objc\(/,ri,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],LA=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function UA(t){const i={match:/\s+/,relevance:0},r=t.COMMENT("/\\*","\\*/",{contains:["self"]}),l=[t.C_LINE_COMMENT_MODE,r],o={match:[/\./,sn(...OA,...Ab)],className:{2:"keyword"}},c={match:dt(/\./,sn(...Bd)),relevance:0},u=Bd.filter(Ye=>typeof Ye=="string").concat(["_|0"]),h=Bd.filter(Ye=>typeof Ye!="string").concat(MA).map(zf),m={variants:[{className:"keyword",match:sn(...h,...Ab)}]},p={$pattern:sn(/\b\w+/,/#\w+/),keyword:u.concat(DA),literal:Cb},b=[o,c,m],y={match:dt(/\./,sn(...Ob)),relevance:0},E={className:"built_in",match:dt(/\b/,sn(...Ob),/(?=\()/)},x=[y,E],k={match:/->/,relevance:0},A={className:"operator",relevance:0,variants:[{match:zd},{match:`\\.(\\.|${Nv})+`}]},C=[k,A],S="([0-9]_*)+",U="([0-9a-fA-F]_*)+",I={className:"number",relevance:0,variants:[{match:`\\b(${S})(\\.(${S}))?([eE][+-]?(${S}))?\\b`},{match:`\\b0x(${U})(\\.(${U}))?([pP][+-]?(${S}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},G=(Ye="")=>({className:"subst",variants:[{match:dt(/\\/,Ye,/[0\\tnr"']/)},{match:dt(/\\/,Ye,/u\{[0-9a-fA-F]{1,8}\}/)}]}),re=(Ye="")=>({className:"subst",match:dt(/\\/,Ye,/[\t ]*(?:[\r\n]|\r\n)/)}),B=(Ye="")=>({className:"subst",label:"interpol",begin:dt(/\\/,Ye,/\(/),end:/\)/}),ae=(Ye="")=>({begin:dt(Ye,/"""/),end:dt(/"""/,Ye),contains:[G(Ye),re(Ye),B(Ye)]}),fe=(Ye="")=>({begin:dt(Ye,/"/),end:dt(/"/,Ye),contains:[G(Ye),B(Ye)]}),me={className:"string",variants:[ae(),ae("#"),ae("##"),ae("###"),fe(),fe("#"),fe("##"),fe("###")]},w=[t.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[t.BACKSLASH_ESCAPE]}],H={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:w},X=Ye=>{const $n=dt(Ye,/\//),Rn=dt(/\//,Ye);return{begin:$n,end:Rn,contains:[...w,{scope:"comment",begin:`#(?!.*${Rn})`,end:/$/}]}},ye={scope:"regexp",variants:[X("###"),X("##"),X("#"),H]},j={match:dt(/`/,ri,/`/)},Z={className:"variable",match:/\$\d+/},D={className:"variable",match:`\\$${Wo}+`},W=[j,Z,D],ee={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:LA,contains:[...C,I,me]}]}},ue={scope:"keyword",match:dt(/@/,sn(...IA),ql(sn(/\(/,/\s+/)))},T={scope:"meta",match:dt(/@/,ri)},O=[ee,ue,T],q={match:ql(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:dt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Wo,"+")},{className:"type",match:zo,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:dt(/\s+&\s+/,ql(zo)),relevance:0}]},N={begin:/</,end:/>/,keywords:p,contains:[...l,...b,...O,k,q]};q.contains.push(N);const pe={match:dt(ri,/\s*:/),keywords:"_|0",relevance:0},Ne={begin:/\(/,end:/\)/,relevance:0,keywords:p,contains:["self",pe,...l,ye,...b,...x,...C,I,me,...W,...O,q]},K={begin:/</,end:/>/,keywords:"repeat each",contains:[...l,q]},le={begin:sn(ql(dt(ri,/\s*:/)),ql(dt(ri,/\s+/,ri,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:ri}]},ve={begin:/\(/,end:/\)/,keywords:p,contains:[le,...l,...b,...C,I,me,...O,q,Ne],endsParent:!0,illegal:/["']/},be={match:[/(func|macro)/,/\s+/,sn(j.match,ri,zd)],className:{1:"keyword",3:"title.function"},contains:[K,ve,i],illegal:[/\[/,/%/]},De={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[K,ve,i],illegal:/\[|%/},Et={match:[/operator/,/\s+/,zd],className:{1:"keyword",3:"title"}},wt={begin:[/precedencegroup/,/\s+/,zo],className:{1:"keyword",3:"title"},contains:[q],keywords:[...RA,...Cb],end:/}/},Di={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},xn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Zn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,ri,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:p,contains:[K,...b,{begin:/:/,end:/\{/,keywords:p,contains:[{scope:"title.class.inherited",match:zo},...b],relevance:0}]};for(const Ye of me.variants){const $n=Ye.contains.find(Qn=>Qn.label==="interpol");$n.keywords=p;const Rn=[...b,...x,...C,I,me,...W];$n.contains=[...Rn,{begin:/\(/,end:/\)/,contains:["self",...Rn]}]}return{name:"Swift",keywords:p,contains:[...l,be,De,Di,xn,Zn,Et,wt,{beginKeywords:"import",end:/$/,contains:[...l],relevance:0},ye,...b,...x,...C,I,me,...W,...O,q,Ne]}}const ec="[A-Za-z$_][0-9A-Za-z$_]*",Tv=["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"],Av=["true","false","null","undefined","NaN","Infinity"],Cv=["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"],Ov=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Mv=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Rv=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Dv=[].concat(Mv,Cv,Ov);function BA(t){const i=t.regex,r=(ee,{after:ue})=>{const T="</"+ee[0].slice(1);return ee.input.indexOf(T,ue)!==-1},l=ec,o={begin:"<>",end:"</>"},c=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ee,ue)=>{const T=ee[0].length+ee.index,O=ee.input[T];if(O==="<"||O===","){ue.ignoreMatch();return}O===">"&&(r(ee,{after:T})||ue.ignoreMatch());let q;const N=ee.input.substring(T);if(q=N.match(/^\s*=/)){ue.ignoreMatch();return}if((q=N.match(/^\s+extends\s+/))&&q.index===0){ue.ignoreMatch();return}}},h={$pattern:ec,keyword:Tv,literal:Av,built_in:Dv,"variable.language":Rv},m="[0-9](_?[0-9])*",p=`\\.(${m})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={className:"number",variants:[{begin:`(\\b(${b})((${p})|\\.)?|(${p}))[eE][+-]?(${m})\\b`},{begin:`\\b(${b})\\b((${p})\\b|\\.)?|(${p})\\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:h,contains:[]},x={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"}},C={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]},U={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:l+"(?=\\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,x,k,A,C,{match:/\$\d+/},y];E.contains=I.concat({begin:/\{/,end:/\}/,keywords:h,contains:["self"].concat(I)});const G=[].concat(U,E.contains),re=G.concat([{begin:/(\s*)\(/,end:/\)/,keywords:h,contains:["self"].concat(G)}]),B={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:re},ae={variants:[{match:[/class/,/\s+/,l,/\s+/,/extends/,/\s+/,i.concat(l,"(",i.concat(/\./,l),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,l],scope:{1:"keyword",3:"title.class"}}]},fe={relevance:0,match:i.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:{_:[...Cv,...Ov]}},me={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},w={variants:[{match:[/function/,/\s+/,l,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[B],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function X(ee){return i.concat("(?!",ee.join("|"),")")}const ye={match:i.concat(/\b/,X([...Mv,"super","import"].map(ee=>`${ee}\\s*\\(`)),l,i.lookahead(/\s*\(/)),className:"title.function",relevance:0},j={begin:i.concat(/\./,i.lookahead(i.concat(l,/(?![0-9A-Za-z$_(])/))),end:l,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,l,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},B]},D="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,l,/\s*/,/=\s*/,/(async\s*)?/,i.lookahead(D)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[B]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:h,exports:{PARAMS_CONTAINS:re,CLASS_REFERENCE:fe},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),me,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,x,k,A,C,U,{match:/\$\d+/},y,fe,{scope:"attr",match:l+i.lookahead(":"),relevance:0},W,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[U,t.REGEXP_MODE,{className:"function",begin:D,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:h,contains:re}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:c},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},w,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[B,t.inherit(t.TITLE_MODE,{begin:l,className:"title.function"})]},{match:/\.\.\./,relevance:0},j,{match:"\\$"+l,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[B]},ye,H,ae,Z,{match:/\$[(.]/}]}}function zA(t){const i=t.regex,r=BA(t),l=ec,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],c={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]},h={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},m=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],p={$pattern:ec,keyword:Tv.concat(m),literal:Av,built_in:Dv.concat(o),"variable.language":Rv},b={className:"meta",begin:"@"+l},y=(A,C,S)=>{const U=A.contains.findIndex(I=>I.label===C);if(U===-1)throw new Error("can not find mode to replace");A.contains.splice(U,1,S)};Object.assign(r.keywords,p),r.exports.PARAMS_CONTAINS.push(b);const E=r.contains.find(A=>A.scope==="attr"),x=Object.assign({},E,{match:i.concat(l,i.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,E,x]),r.contains=r.contains.concat([b,c,u,x]),y(r,"shebang",t.SHEBANG()),y(r,"use_strict",h);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 jA(t){const i=t.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},l={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,c=/\d{4}-\d{1,2}-\d{1,2}/,u=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,h=/\d{1,2}(:\d{1,2}){1,2}/,m={className:"literal",variants:[{begin:i.concat(/# */,i.either(c,o),/ *#/)},{begin:i.concat(/# */,h,/ *#/)},{begin:i.concat(/# */,u,/ *#/)},{begin:i.concat(/# */,i.either(c,o),/ +/,i.either(u,h),/ *#/)}]},p={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])|[%&])?/}]},b={className:"label",begin:/^\w+:/},y=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,l,m,p,b,y,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 HA(t){t.regex;const i=t.COMMENT(/\(;/,/;\)/);i.contains.push("self");const r=t.COMMENT(/;;/,/$/),l=["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"}},c={className:"variable",begin:/\$[\w_]+/},u={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},h={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/},m={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},p={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:l},contains:[r,i,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},c,u,o,t.QUOTE_STRING_MODE,m,p,h]}}function FA(t){const i=t.regex,r=i.concat(/[\p{L}_]/u,i.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),l=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},u=t.inherit(c,{begin:/\(/,end:/\)/}),h=t.inherit(t.APOS_STRING_MODE,{className:"string"}),m=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),p={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:l,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:[c,m,h,u,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[c,u,m,h]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[m]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[p],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[p],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:i.concat(/</,i.lookahead(i.concat(r,i.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:p}]},{className:"tag",begin:i.concat(/<\//,i.lookahead(i.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function PA(t){const i="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",l={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},c={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]},h=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"},x={end:",",endsWithParent:!0,excludeEnd:!0,keywords:i,relevance:0},k={begin:/\{/,end:/\}/,contains:[x],illegal:"\\n",relevance:0},A={begin:"\\[",end:"\\]",contains:[x],illegal:"\\n",relevance:0},C=[l,{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:i,keywords:{literal:i}},E,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},k,A,c,u],S=[...C];return S.pop(),S.push(h),x.contains=S,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:C}}const GA={arduino:kT,bash:NT,c:wT,cpp:TT,csharp:AT,css:BT,diff:zT,go:jT,graphql:HT,ini:FT,java:PT,javascript:VT,json:YT,kotlin:ZT,less:rA,lua:aA,makefile:lA,markdown:sA,objectivec:oA,perl:cA,php:uA,"php-template":dA,plaintext:fA,python:hA,"python-repl":pA,r:mA,ruby:gA,rust:bA,scss:wA,shell:TA,sql:AA,swift:UA,typescript:zA,vbnet:jA,wasm:HA,xml:FA,yaml:PA};var jd,Mb;function $A(){if(Mb)return jd;Mb=1;function t(R){return R instanceof Map?R.clear=R.delete=R.set=function(){throw new Error("map is read-only")}:R instanceof Set&&(R.add=R.clear=R.delete=function(){throw new Error("set is read-only")}),Object.freeze(R),Object.getOwnPropertyNames(R).forEach(te=>{const ge=R[te],Ie=typeof ge;(Ie==="object"||Ie==="function")&&!Object.isFrozen(ge)&&t(ge)}),R}class i{constructor(te){te.data===void 0&&(te.data={}),this.data=te.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(R){return R.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function l(R,...te){const ge=Object.create(null);for(const Ie in R)ge[Ie]=R[Ie];return te.forEach(function(Ie){for(const yt in Ie)ge[yt]=Ie[yt]}),ge}const o="</span>",c=R=>!!R.scope,u=(R,{prefix:te})=>{if(R.startsWith("language:"))return R.replace("language:","language-");if(R.includes(".")){const ge=R.split(".");return[`${te}${ge.shift()}`,...ge.map((Ie,yt)=>`${Ie}${"_".repeat(yt+1)}`)].join(" ")}return`${te}${R}`};class h{constructor(te,ge){this.buffer="",this.classPrefix=ge.classPrefix,te.walk(this)}addText(te){this.buffer+=r(te)}openNode(te){if(!c(te))return;const ge=u(te.scope,{prefix:this.classPrefix});this.span(ge)}closeNode(te){c(te)&&(this.buffer+=o)}value(){return this.buffer}span(te){this.buffer+=`<span class="${te}">`}}const m=(R={})=>{const te={children:[]};return Object.assign(te,R),te};class p{constructor(){this.rootNode=m(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(te){this.top.children.push(te)}openNode(te){const ge=m({scope:te});this.add(ge),this.stack.push(ge)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(te){return this.constructor._walk(te,this.rootNode)}static _walk(te,ge){return typeof ge=="string"?te.addText(ge):ge.children&&(te.openNode(ge),ge.children.forEach(Ie=>this._walk(te,Ie)),te.closeNode(ge)),te}static _collapse(te){typeof te!="string"&&te.children&&(te.children.every(ge=>typeof ge=="string")?te.children=[te.children.join("")]:te.children.forEach(ge=>{p._collapse(ge)}))}}class b extends p{constructor(te){super(),this.options=te}addText(te){te!==""&&this.add(te)}startScope(te){this.openNode(te)}endScope(){this.closeNode()}__addSublanguage(te,ge){const Ie=te.root;ge&&(Ie.scope=`language:${ge}`),this.add(Ie)}toHTML(){return new h(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function y(R){return R?typeof R=="string"?R:R.source:null}function E(R){return A("(?=",R,")")}function x(R){return A("(?:",R,")*")}function k(R){return A("(?:",R,")?")}function A(...R){return R.map(ge=>y(ge)).join("")}function C(R){const te=R[R.length-1];return typeof te=="object"&&te.constructor===Object?(R.splice(R.length-1,1),te):{}}function S(...R){return"("+(C(R).capture?"":"?:")+R.map(Ie=>y(Ie)).join("|")+")"}function U(R){return new RegExp(R.toString()+"|").exec("").length-1}function I(R,te){const ge=R&&R.exec(te);return ge&&ge.index===0}const G=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function re(R,{joinWith:te}){let ge=0;return R.map(Ie=>{ge+=1;const yt=ge;let ft=y(Ie),_e="";for(;ft.length>0;){const xe=G.exec(ft);if(!xe){_e+=ft;break}_e+=ft.substring(0,xe.index),ft=ft.substring(xe.index+xe[0].length),xe[0][0]==="\\"&&xe[1]?_e+="\\"+String(Number(xe[1])+yt):(_e+=xe[0],xe[0]==="("&&ge++)}return _e}).map(Ie=>`(${Ie})`).join(te)}const B=/\b\B/,ae="[a-zA-Z]\\w*",fe="[a-zA-Z_]\\w*",me="\\b\\d+(\\.\\d+)?",w="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",H="\\b(0b[01]+)",X="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ye=(R={})=>{const te=/^#![ ]*\//;return R.binary&&(R.begin=A(te,/.*\b/,R.binary,/\b.*/)),l({scope:"meta",begin:te,end:/$/,relevance:0,"on:begin":(ge,Ie)=>{ge.index!==0&&Ie.ignoreMatch()}},R)},j={begin:"\\\\[\\s\\S]",relevance:0},Z={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[j]},D={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[j]},W={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/},ee=function(R,te,ge={}){const Ie=l({scope:"comment",begin:R,end:te,contains:[]},ge);Ie.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 yt=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 Ie.contains.push({begin:A(/[ ]+/,"(",yt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ie},ue=ee("//","$"),T=ee("/\\*","\\*/"),O=ee("#","$"),q={scope:"number",begin:me,relevance:0},N={scope:"number",begin:w,relevance:0},pe={scope:"number",begin:H,relevance:0},Ne={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[j,{begin:/\[/,end:/\]/,relevance:0,contains:[j]}]},K={scope:"title",begin:ae,relevance:0},le={scope:"title",begin:fe,relevance:0},ve={begin:"\\.\\s*"+fe,relevance:0};var De=Object.freeze({__proto__:null,APOS_STRING_MODE:Z,BACKSLASH_ESCAPE:j,BINARY_NUMBER_MODE:pe,BINARY_NUMBER_RE:H,COMMENT:ee,C_BLOCK_COMMENT_MODE:T,C_LINE_COMMENT_MODE:ue,C_NUMBER_MODE:N,C_NUMBER_RE:w,END_SAME_AS_BEGIN:function(R){return Object.assign(R,{"on:begin":(te,ge)=>{ge.data._beginMatch=te[1]},"on:end":(te,ge)=>{ge.data._beginMatch!==te[1]&&ge.ignoreMatch()}})},HASH_COMMENT_MODE:O,IDENT_RE:ae,MATCH_NOTHING_RE:B,METHOD_GUARD:ve,NUMBER_MODE:q,NUMBER_RE:me,PHRASAL_WORDS_MODE:W,QUOTE_STRING_MODE:D,REGEXP_MODE:Ne,RE_STARTERS_RE:X,SHEBANG:ye,TITLE_MODE:K,UNDERSCORE_IDENT_RE:fe,UNDERSCORE_TITLE_MODE:le});function Et(R,te){R.input[R.index-1]==="."&&te.ignoreMatch()}function wt(R,te){R.className!==void 0&&(R.scope=R.className,delete R.className)}function Di(R,te){te&&R.beginKeywords&&(R.begin="\\b("+R.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",R.__beforeBegin=Et,R.keywords=R.keywords||R.beginKeywords,delete R.beginKeywords,R.relevance===void 0&&(R.relevance=0))}function xn(R,te){Array.isArray(R.illegal)&&(R.illegal=S(...R.illegal))}function Zn(R,te){if(R.match){if(R.begin||R.end)throw new Error("begin & end are not supported with match");R.begin=R.match,delete R.match}}function Ye(R,te){R.relevance===void 0&&(R.relevance=1)}const $n=(R,te)=>{if(!R.beforeMatch)return;if(R.starts)throw new Error("beforeMatch cannot be used with starts");const ge=Object.assign({},R);Object.keys(R).forEach(Ie=>{delete R[Ie]}),R.keywords=ge.keywords,R.begin=A(ge.beforeMatch,E(ge.begin)),R.starts={relevance:0,contains:[Object.assign(ge,{endsParent:!0})]},R.relevance=0,delete ge.beforeMatch},Rn=["of","and","for","in","not","or","if","then","parent","list","value"],Qn="keyword";function ci(R,te,ge=Qn){const Ie=Object.create(null);return typeof R=="string"?yt(ge,R.split(" ")):Array.isArray(R)?yt(ge,R):Object.keys(R).forEach(function(ft){Object.assign(Ie,ci(R[ft],te,ft))}),Ie;function yt(ft,_e){te&&(_e=_e.map(xe=>xe.toLowerCase())),_e.forEach(function(xe){const Re=xe.split("|");Ie[Re[0]]=[ft,mr(Re[0],Re[1])]})}}function mr(R,te){return te?Number(te):Ka(R)?0:1}function Ka(R){return Rn.includes(R.toLowerCase())}const Gr={},kt=R=>{console.error(R)},$r=(R,...te)=>{console.log(`WARN: ${R}`,...te)},Q=(R,te)=>{Gr[`${R}/${te}`]||(console.log(`Deprecated as of ${R}. ${te}`),Gr[`${R}/${te}`]=!0)},de=new Error;function Ce(R,te,{key:ge}){let Ie=0;const yt=R[ge],ft={},_e={};for(let xe=1;xe<=te.length;xe++)_e[xe+Ie]=yt[xe],ft[xe+Ie]=!0,Ie+=U(te[xe-1]);R[ge]=_e,R[ge]._emit=ft,R[ge]._multi=!0}function He(R){if(Array.isArray(R.begin)){if(R.skip||R.excludeBegin||R.returnBegin)throw kt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),de;if(typeof R.beginScope!="object"||R.beginScope===null)throw kt("beginScope must be object"),de;Ce(R,R.begin,{key:"beginScope"}),R.begin=re(R.begin,{joinWith:""})}}function Qe(R){if(Array.isArray(R.end)){if(R.skip||R.excludeEnd||R.returnEnd)throw kt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),de;if(typeof R.endScope!="object"||R.endScope===null)throw kt("endScope must be object"),de;Ce(R,R.end,{key:"endScope"}),R.end=re(R.end,{joinWith:""})}}function nn(R){R.scope&&typeof R.scope=="object"&&R.scope!==null&&(R.beginScope=R.scope,delete R.scope)}function Kn(R){nn(R),typeof R.beginScope=="string"&&(R.beginScope={_wrap:R.beginScope}),typeof R.endScope=="string"&&(R.endScope={_wrap:R.endScope}),He(R),Qe(R)}function $t(R){function te(_e,xe){return new RegExp(y(_e),"m"+(R.case_insensitive?"i":"")+(R.unicodeRegex?"u":"")+(xe?"g":""))}class ge{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(xe,Re){Re.position=this.position++,this.matchIndexes[this.matchAt]=Re,this.regexes.push([Re,xe]),this.matchAt+=U(xe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const xe=this.regexes.map(Re=>Re[1]);this.matcherRe=te(re(xe,{joinWith:"|"}),!0),this.lastIndex=0}exec(xe){this.matcherRe.lastIndex=this.lastIndex;const Re=this.matcherRe.exec(xe);if(!Re)return null;const Ot=Re.findIndex((ui,qr)=>qr>0&&ui!==void 0),_t=this.matchIndexes[Ot];return Re.splice(0,Ot),Object.assign(Re,_t)}}class Ie{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(xe){if(this.multiRegexes[xe])return this.multiRegexes[xe];const Re=new ge;return this.rules.slice(xe).forEach(([Ot,_t])=>Re.addRule(Ot,_t)),Re.compile(),this.multiRegexes[xe]=Re,Re}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(xe,Re){this.rules.push([xe,Re]),Re.type==="begin"&&this.count++}exec(xe){const Re=this.getMatcher(this.regexIndex);Re.lastIndex=this.lastIndex;let Ot=Re.exec(xe);if(this.resumingScanAtSamePosition()&&!(Ot&&Ot.index===this.lastIndex)){const _t=this.getMatcher(0);_t.lastIndex=this.lastIndex+1,Ot=_t.exec(xe)}return Ot&&(this.regexIndex+=Ot.position+1,this.regexIndex===this.count&&this.considerAll()),Ot}}function yt(_e){const xe=new Ie;return _e.contains.forEach(Re=>xe.addRule(Re.begin,{rule:Re,type:"begin"})),_e.terminatorEnd&&xe.addRule(_e.terminatorEnd,{type:"end"}),_e.illegal&&xe.addRule(_e.illegal,{type:"illegal"}),xe}function ft(_e,xe){const Re=_e;if(_e.isCompiled)return Re;[wt,Zn,Kn,$n].forEach(_t=>_t(_e,xe)),R.compilerExtensions.forEach(_t=>_t(_e,xe)),_e.__beforeBegin=null,[Di,xn,Ye].forEach(_t=>_t(_e,xe)),_e.isCompiled=!0;let Ot=null;return typeof _e.keywords=="object"&&_e.keywords.$pattern&&(_e.keywords=Object.assign({},_e.keywords),Ot=_e.keywords.$pattern,delete _e.keywords.$pattern),Ot=Ot||/\w+/,_e.keywords&&(_e.keywords=ci(_e.keywords,R.case_insensitive)),Re.keywordPatternRe=te(Ot,!0),xe&&(_e.begin||(_e.begin=/\B|\b/),Re.beginRe=te(Re.begin),!_e.end&&!_e.endsWithParent&&(_e.end=/\B|\b/),_e.end&&(Re.endRe=te(Re.end)),Re.terminatorEnd=y(Re.end)||"",_e.endsWithParent&&xe.terminatorEnd&&(Re.terminatorEnd+=(_e.end?"|":"")+xe.terminatorEnd)),_e.illegal&&(Re.illegalRe=te(_e.illegal)),_e.contains||(_e.contains=[]),_e.contains=[].concat(..._e.contains.map(function(_t){return Zt(_t==="self"?_e:_t)})),_e.contains.forEach(function(_t){ft(_t,Re)}),_e.starts&&ft(_e.starts,xe),Re.matcher=yt(Re),Re}if(R.compilerExtensions||(R.compilerExtensions=[]),R.contains&&R.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return R.classNameAliases=l(R.classNameAliases||{}),ft(R)}function Tt(R){return R?R.endsWithParent||Tt(R.starts):!1}function Zt(R){return R.variants&&!R.cachedVariants&&(R.cachedVariants=R.variants.map(function(te){return l(R,{variants:null},te)})),R.cachedVariants?R.cachedVariants:Tt(R)?l(R,{starts:R.starts?l(R.starts):null}):Object.isFrozen(R)?l(R):R}var it="11.11.1";class Jn extends Error{constructor(te,ge){super(te),this.name="HTMLInjectionError",this.html=ge}}const rn=r,hs=l,gr=Symbol("nomatch"),Kr=7,br=function(R){const te=Object.create(null),ge=Object.create(null),Ie=[];let yt=!0;const ft="Could not find the language '{}', did you forget to load/include a language module?",_e={disableAutodetect:!0,name:"Plain text",contains:[]};let xe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:b};function Re(se){return xe.noHighlightRe.test(se)}function Ot(se){let we=se.className+" ";we+=se.parentNode?se.parentNode.className:"";const Fe=xe.languageDetectRe.exec(we);if(Fe){const rt=an(Fe[1]);return rt||($r(ft.replace("{}",Fe[1])),$r("Falling back to no-highlight mode for this block.",se)),rt?Fe[1]:"no-highlight"}return we.split(/\s+/).find(rt=>Re(rt)||an(rt))}function _t(se,we,Fe){let rt="",Rt="";typeof we=="object"?(rt=se,Fe=we.ignoreIllegals,Rt=we.language):(Q("10.7.0","highlight(lang, code, ...args) has been deprecated."),Q("10.7.0",`Please use highlight(code, options) instead.
82
- https://github.com/highlightjs/highlight.js/issues/2277`),Rt=se,rt=we),Fe===void 0&&(Fe=!0);const Jt={code:rt,language:Rt};vr("before:highlight",Jt);const En=Jt.result?Jt.result:ui(Jt.language,Jt.code,Fe);return En.code=Jt.code,vr("after:highlight",En),En}function ui(se,we,Fe,rt){const Rt=Object.create(null);function Jt(he,Se){return he.keywords[Se]}function En(){if(!Me.keywords){Ut.addText(at);return}let he=0;Me.keywordPatternRe.lastIndex=0;let Se=Me.keywordPatternRe.exec(at),Ue="";for(;Se;){Ue+=at.substring(he,Se.index);const Ke=Kt.case_insensitive?Se[0].toLowerCase():Se[0],Nt=Jt(Me,Ke);if(Nt){const[Dn,Qa]=Nt;if(Ut.addText(Ue),Ue="",Rt[Ke]=(Rt[Ke]||0)+1,Rt[Ke]<=Kr&&(Bi+=Qa),Dn.startsWith("_"))Ue+=Se[0];else{const xs=Kt.classNameAliases[Dn]||Dn;_n(Se[0],xs)}}else Ue+=Se[0];he=Me.keywordPatternRe.lastIndex,Se=Me.keywordPatternRe.exec(at)}Ue+=at.substring(he),Ut.addText(Ue)}function un(){if(at==="")return;let he=null;if(typeof Me.subLanguage=="string"){if(!te[Me.subLanguage]){Ut.addText(at);return}he=ui(Me.subLanguage,at,!0,vs[Me.subLanguage]),vs[Me.subLanguage]=he._top}else he=Vr(at,Me.subLanguage.length?Me.subLanguage:null);Me.relevance>0&&(Bi+=he.relevance),Ut.__addSublanguage(he._emitter,he.language)}function gt(){Me.subLanguage!=null?un():En(),at=""}function _n(he,Se){he!==""&&(Ut.startScope(Se),Ut.addText(he),Ut.endScope())}function bs(he,Se){let Ue=1;const Ke=Se.length-1;for(;Ue<=Ke;){if(!he._emit[Ue]){Ue++;continue}const Nt=Kt.classNameAliases[he[Ue]]||he[Ue],Dn=Se[Ue];Nt?_n(Dn,Nt):(at=Dn,En(),at=""),Ue++}}function Xr(he,Se){return he.scope&&typeof he.scope=="string"&&Ut.openNode(Kt.classNameAliases[he.scope]||he.scope),he.beginScope&&(he.beginScope._wrap?(_n(at,Kt.classNameAliases[he.beginScope._wrap]||he.beginScope._wrap),at=""):he.beginScope._multi&&(bs(he.beginScope,Se),at="")),Me=Object.create(he,{parent:{value:Me}}),Me}function Ya(he,Se,Ue){let Ke=I(he.endRe,Ue);if(Ke){if(he["on:end"]){const Nt=new i(he);he["on:end"](Se,Nt),Nt.isMatchIgnored&&(Ke=!1)}if(Ke){for(;he.endsParent&&he.parent;)he=he.parent;return he}}if(he.endsWithParent)return Ya(he.parent,Se,Ue)}function Zr(he){return Me.matcher.regexIndex===0?(at+=he[0],1):(zi=!0,0)}function fc(he){const Se=he[0],Ue=he.rule,Ke=new i(Ue),Nt=[Ue.__beforeBegin,Ue["on:begin"]];for(const Dn of Nt)if(Dn&&(Dn(he,Ke),Ke.isMatchIgnored))return Zr(Se);return Ue.skip?at+=Se:(Ue.excludeBegin&&(at+=Se),gt(),!Ue.returnBegin&&!Ue.excludeBegin&&(at=Se)),Xr(Ue,he),Ue.returnBegin?0:Se.length}function dn(he){const Se=he[0],Ue=we.substring(he.index),Ke=Ya(Me,he,Ue);if(!Ke)return gr;const Nt=Me;Me.endScope&&Me.endScope._wrap?(gt(),_n(Se,Me.endScope._wrap)):Me.endScope&&Me.endScope._multi?(gt(),bs(Me.endScope,he)):Nt.skip?at+=Se:(Nt.returnEnd||Nt.excludeEnd||(at+=Se),gt(),Nt.excludeEnd&&(at=Se));do Me.scope&&Ut.closeNode(),!Me.skip&&!Me.subLanguage&&(Bi+=Me.relevance),Me=Me.parent;while(Me!==Ke.parent);return Ke.starts&&Xr(Ke.starts,he),Nt.returnEnd?0:Se.length}function Xa(){const he=[];for(let Se=Me;Se!==Kt;Se=Se.parent)Se.scope&&he.unshift(Se.scope);he.forEach(Se=>Ut.openNode(Se))}let xr={};function Qr(he,Se){const Ue=Se&&Se[0];if(at+=he,Ue==null)return gt(),0;if(xr.type==="begin"&&Se.type==="end"&&xr.index===Se.index&&Ue===""){if(at+=we.slice(Se.index,Se.index+1),!yt){const Ke=new Error(`0 width match regex (${se})`);throw Ke.languageName=se,Ke.badRule=xr.rule,Ke}return 1}if(xr=Se,Se.type==="begin")return fc(Se);if(Se.type==="illegal"&&!Fe){const Ke=new Error('Illegal lexeme "'+Ue+'" for mode "'+(Me.scope||"<unnamed>")+'"');throw Ke.mode=Me,Ke}else if(Se.type==="end"){const Ke=dn(Se);if(Ke!==gr)return Ke}if(Se.type==="illegal"&&Ue==="")return at+=`
83
- `,1;if(Za>1e5&&Za>Se.index*3)throw new Error("potential infinite loop, way more iterations than matches");return at+=Ue,Ue.length}const Kt=an(se);if(!Kt)throw kt(ft.replace("{}",se)),new Error('Unknown language: "'+se+'"');const ys=$t(Kt);let Jr="",Me=rt||ys;const vs={},Ut=new xe.__emitter(xe);Xa();let at="",Bi=0,hi=0,Za=0,zi=!1;try{if(Kt.__emitTokens)Kt.__emitTokens(we,Ut);else{for(Me.matcher.considerAll();;){Za++,zi?zi=!1:Me.matcher.considerAll(),Me.matcher.lastIndex=hi;const he=Me.matcher.exec(we);if(!he)break;const Se=we.substring(hi,he.index),Ue=Qr(Se,he);hi=he.index+Ue}Qr(we.substring(hi))}return Ut.finalize(),Jr=Ut.toHTML(),{language:se,value:Jr,relevance:Bi,illegal:!1,_emitter:Ut,_top:Me}}catch(he){if(he.message&&he.message.includes("Illegal"))return{language:se,value:rn(we),illegal:!0,relevance:0,_illegalBy:{message:he.message,index:hi,context:we.slice(hi-100,hi+100),mode:he.mode,resultSoFar:Jr},_emitter:Ut};if(yt)return{language:se,value:rn(we),illegal:!1,relevance:0,errorRaised:he,_emitter:Ut,_top:Me};throw he}}function qr(se){const we={value:rn(se),illegal:!1,relevance:0,_top:_e,_emitter:new xe.__emitter(xe)};return we._emitter.addText(se),we}function Vr(se,we){we=we||xe.languages||Object.keys(te);const Fe=qr(se),rt=we.filter(an).filter(Li).map(gt=>ui(gt,se,!1));rt.unshift(Fe);const Rt=rt.sort((gt,_n)=>{if(gt.relevance!==_n.relevance)return _n.relevance-gt.relevance;if(gt.language&&_n.language){if(an(gt.language).supersetOf===_n.language)return 1;if(an(_n.language).supersetOf===gt.language)return-1}return 0}),[Jt,En]=Rt,un=Jt;return un.secondBest=En,un}function Wn(se,we,Fe){const rt=we&&ge[we]||Fe;se.classList.add("hljs"),se.classList.add(`language-${rt}`)}function Mt(se){let we=null;const Fe=Ot(se);if(Re(Fe))return;if(vr("before:highlightElement",{el:se,language:Fe}),se.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",se);return}if(se.children.length>0&&(xe.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(se)),xe.throwUnescapedHTML))throw new Jn("One of your code blocks includes unescaped HTML.",se.innerHTML);we=se;const rt=we.textContent,Rt=Fe?_t(rt,{language:Fe,ignoreIllegals:!0}):Vr(rt);se.innerHTML=Rt.value,se.dataset.highlighted="yes",Wn(se,Fe,Rt.language),se.result={language:Rt.language,re:Rt.relevance,relevance:Rt.relevance},Rt.secondBest&&(se.secondBest={language:Rt.secondBest.language,relevance:Rt.secondBest.relevance}),vr("after:highlightElement",{el:se,result:Rt,text:rt})}function Qt(se){xe=hs(xe,se)}const Ii=()=>{Yr(),Q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function qa(){Yr(),Q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ps=!1;function Yr(){function se(){Yr()}if(document.readyState==="loading"){ps||window.addEventListener("DOMContentLoaded",se,!1),ps=!0;return}document.querySelectorAll(xe.cssSelector).forEach(Mt)}function ms(se,we){let Fe=null;try{Fe=we(R)}catch(rt){if(kt("Language definition for '{}' could not be registered.".replace("{}",se)),yt)kt(rt);else throw rt;Fe=_e}Fe.name||(Fe.name=se),te[se]=Fe,Fe.rawDefinition=we.bind(null,R),Fe.aliases&&di(Fe.aliases,{languageName:se})}function yr(se){delete te[se];for(const we of Object.keys(ge))ge[we]===se&&delete ge[we]}function Va(){return Object.keys(te)}function an(se){return se=(se||"").toLowerCase(),te[se]||te[ge[se]]}function di(se,{languageName:we}){typeof se=="string"&&(se=[se]),se.forEach(Fe=>{ge[Fe.toLowerCase()]=we})}function Li(se){const we=an(se);return we&&!we.disableAutodetect}function Ui(se){se["before:highlightBlock"]&&!se["before:highlightElement"]&&(se["before:highlightElement"]=we=>{se["before:highlightBlock"](Object.assign({block:we.el},we))}),se["after:highlightBlock"]&&!se["after:highlightElement"]&&(se["after:highlightElement"]=we=>{se["after:highlightBlock"](Object.assign({block:we.el},we))})}function Lt(se){Ui(se),Ie.push(se)}function gs(se){const we=Ie.indexOf(se);we!==-1&&Ie.splice(we,1)}function vr(se,we){const Fe=se;Ie.forEach(function(rt){rt[Fe]&&rt[Fe](we)})}function fi(se){return Q("10.7.0","highlightBlock will be removed entirely in v12.0"),Q("10.7.0","Please use highlightElement now."),Mt(se)}Object.assign(R,{highlight:_t,highlightAuto:Vr,highlightAll:Yr,highlightElement:Mt,highlightBlock:fi,configure:Qt,initHighlighting:Ii,initHighlightingOnLoad:qa,registerLanguage:ms,unregisterLanguage:yr,listLanguages:Va,getLanguage:an,registerAliases:di,autoDetection:Li,inherit:hs,addPlugin:Lt,removePlugin:gs}),R.debugMode=function(){yt=!1},R.safeMode=function(){yt=!0},R.versionString=it,R.regex={concat:A,lookahead:E,either:S,optional:k,anyNumberOfTimes:x};for(const se in De)typeof De[se]=="object"&&t(De[se]);return Object.assign(R,De),R},cn=br({});return cn.newInstance=()=>br({}),jd=cn,cn.HighlightJS=cn,cn.default=cn,jd}var KA=$A();const qA=ls(KA),Rb={},VA="hljs-";function YA(t){const i=qA.newInstance();return t&&c(t),{highlight:r,highlightAuto:l,listLanguages:o,register:c,registerAlias:u,registered:h};function r(m,p,b){const y=b||Rb,E=typeof y.prefix=="string"?y.prefix:VA;if(!i.getLanguage(m))throw new Error("Unknown language: `"+m+"` is not registered");i.configure({__emitter:XA,classPrefix:E});const x=i.highlight(p,{ignoreIllegals:!0,language:m});if(x.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:x.errorRaised});const k=x._emitter.root,A=k.data;return A.language=x.language,A.relevance=x.relevance,k}function l(m,p){const y=(p||Rb).subset||o();let E=-1,x=0,k;for(;++E<y.length;){const A=y[E];if(!i.getLanguage(A))continue;const C=r(A,m,p);C.data&&C.data.relevance!==void 0&&C.data.relevance>x&&(x=C.data.relevance,k=C)}return k||{type:"root",children:[],data:{language:void 0,relevance:x}}}function o(){return i.listLanguages()}function c(m,p){if(typeof m=="string")i.registerLanguage(m,p);else{let b;for(b in m)Object.hasOwn(m,b)&&i.registerLanguage(b,m[b])}}function u(m,p){if(typeof m=="string")i.registerAliases(typeof p=="string"?p:[...p],{languageName:m});else{let b;for(b in m)if(Object.hasOwn(m,b)){const y=m[b];i.registerAliases(typeof y=="string"?y:[...y],{languageName:b})}}}function h(m){return!!i.getLanguage(m)}}class XA{constructor(i){this.options=i,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(i){if(i==="")return;const r=this.stack[this.stack.length-1],l=r.children[r.children.length-1];l&&l.type==="text"?l.value+=i:r.children.push({type:"text",value:i})}startScope(i){this.openNode(String(i))}endScope(){this.closeNode()}__addSublanguage(i,r){const l=this.stack[this.stack.length-1],o=i.root.children;r?l.children.push({type:"element",tagName:"span",properties:{className:[r]},children:o}):l.children.push(...o)}openNode(i){const r=this,l=i.split(".").map(function(u,h){return h?u+"_".repeat(h):r.options.classPrefix+u}),o=this.stack[this.stack.length-1],c={type:"element",tagName:"span",properties:{className:l},children:[]};o.children.push(c),this.stack.push(c)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const ZA={};function QA(t){const i=t||ZA,r=i.aliases,l=i.detect||!1,o=i.languages||GA,c=i.plainText,u=i.prefix,h=i.subset;let m="hljs";const p=YA(o);if(r&&p.registerAlias(r),u){const b=u.indexOf("-");m=b===-1?u:u.slice(0,b)}return function(b,y){cc(b,"element",function(E,x,k){if(E.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const A=JA(E);if(A===!1||!A&&!l||A&&c&&c.includes(A))return;Array.isArray(E.properties.className)||(E.properties.className=[]),E.properties.className.includes(m)||E.properties.className.unshift(m);const C=gT(E,{whitespace:"pre"});let S;try{S=A?p.highlight(A,C,{prefix:u}):p.highlightAuto(C,{prefix:u,subset:h})}catch(U){const I=U;if(A&&/Unknown language/.test(I.message)){y.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 JA(t){const i=t.properties.className;let r=-1;if(!Array.isArray(i))return;let l;for(;++r<i.length;){const o=String(i[r]);if(o==="no-highlight"||o==="nohighlight")return!1;!l&&o.slice(0,5)==="lang-"&&(l=o.slice(5)),!l&&o.slice(0,9)==="language-"&&(l=o.slice(9))}return l}function Ra(t){return t?typeof t=="string"?t:"literalString"in t?t.literalString:"dataPath"in t?`{{${t.dataPath}}}`:"":""}function jo(t){return t?Array.isArray(t)?t:"explicitList"in t?t.explicitList:[]:[]}function WA({className:t,children:i}){const[r,l]=V.useState(!1),o=String(i).replace(/\n$/,""),c=(t==null?void 0:t.replace(/^language-/,""))??"",u=V.useCallback(()=>{navigator.clipboard.writeText(o).then(()=>{l(!0),setTimeout(()=>l(!1),2e3)})},[o]);return g.jsxs("div",{className:"group/code relative my-2 rounded-md overflow-hidden",style:{border:"1px solid var(--border)"},children:[g.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",style:{background:"var(--bg-hover)",borderBottom:"1px solid var(--border)"},children:[g.jsx("span",{className:"text-tiny font-mono uppercase",style:{color:"var(--text-muted)"},children:c||"code"}),g.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?g.jsxs(g.Fragment,{children:[g.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),"Copied"]}):g.jsxs(g.Fragment,{children:[g.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:g.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"]})})]}),g.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:g.jsx("code",{className:t,style:{fontFamily:"var(--font-mono)"},children:i})})]})}function eC({children:t}){return g.jsx("div",{className:"my-2 overflow-x-auto rounded-md",style:{border:"1px solid var(--border)"},children:g.jsx("table",{className:"min-w-full text-[13px]",style:{borderCollapse:"collapse"},children:t})})}function tC({children:t}){return g.jsx("thead",{style:{background:"var(--bg-hover)"},children:t})}function nC({children:t,...i}){return g.jsx("tr",{...i,style:{borderBottom:"1px solid var(--border)"},className:"hover:bg-[--bg-hover] transition-colors",children:t})}function Db({children:t,isHeader:i=!1,style:r}){const l=i?"th":"td";return g.jsx(l,{className:`px-3 py-2 text-left ${i?"font-bold":""}`,style:{color:i?"var(--text-primary)":"var(--text-secondary)",whiteSpace:"nowrap",...r},children:t})}function iC({jsonl:t,onAction:i}){const r=V.useMemo(()=>rC(t),[t]);return r?g.jsx("div",{className:"mt-1",children:Yl(r.rootId,r.components,i)}):g.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:[g.jsx("span",{className:"font-bold text-tiny",style:{color:"var(--text-muted)"},children:"A2UI"}),g.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 rC(t){try{const i=t.trim().split(`
84
- `).filter(Boolean),r=new Map;let l="";for(const o of i){const c=JSON.parse(o);if("surfaceUpdate"in c)for(const u of c.surfaceUpdate.components)r.set(u.id,u.component);"beginRendering"in c&&(l=c.beginRendering.root)}return!l||r.size===0?null:{rootId:l,components:r}}catch{return null}}function Yl(t,i,r){const l=i.get(t);if(!l)return null;if("Text"in l){const{text:o,usageHint:c}=l.Text,u=Ra(o),h=c??"body",m={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 g.jsx("p",{className:`${m[h]??"text-body"} my-0.5`,style:{color:h.startsWith("h")?"var(--text-primary)":"var(--text-secondary)"},children:u},t)}if("Button"in l){const{label:o,action:c,style:u}=l.Button,h=Ra(o),m=u==="primary"||u==="filled";return g.jsx("button",{onClick:()=>{c!=null&&c.sendMessage&&r&&r(c.sendMessage,c)},className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-sm text-caption font-bold transition-colors ${m?"text-white":"hover:bg-[--bg-hover]"}`,style:{background:m?"var(--bg-active)":"transparent",color:m?"#fff":"var(--text-link)",border:m?"none":"1px solid var(--border)"},children:h},t)}if("Column"in l){const o=jo(l.Column.children),c=l.Column.gap??4;return g.jsx("div",{className:"flex flex-col",style:{gap:c},children:o.map(u=>Yl(u,i,r))},t)}if("Row"in l){const o=jo(l.Row.children),c=l.Row.gap??8;return g.jsx("div",{className:"flex flex-row flex-wrap items-center",style:{gap:c},children:o.map(u=>Yl(u,i,r))},t)}if("Card"in l){const o=jo(l.Card.children),c=l.Card.title?Ra(l.Card.title):null;return g.jsxs("div",{className:"rounded-md p-3 my-1",style:{background:"var(--bg-hover)",border:"1px solid var(--border)"},children:[c&&g.jsx("p",{className:"text-h2 font-bold mb-2",style:{color:"var(--text-primary)"},children:c}),g.jsx("div",{className:"flex flex-col gap-1",children:o.map(u=>Yl(u,i,r))})]},t)}if("List"in l){const o=jo(l.List.children);return g.jsx("div",{className:"flex flex-col gap-0.5 my-1",children:o.map(c=>g.jsxs("div",{className:"flex items-start gap-2 px-2 py-1.5 rounded hover:bg-[--bg-hover] transition-colors",children:[g.jsx("span",{className:"text-tiny mt-1",style:{color:"var(--text-muted)"},children:"•"}),Yl(c,i,r)]},c))},t)}if("Image"in l){const o=Ra(l.Image.url),c=l.Image.alt?Ra(l.Image.alt):"";return g.jsx("img",{src:o,alt:c,className:"max-w-[360px] max-h-64 rounded-md object-contain my-1",style:{border:"1px solid var(--border)"}},t)}if("Divider"in l)return g.jsx("hr",{className:"my-2",style:{border:"none",borderTop:"1px solid var(--border)"}},t);if("Icon"in l){const o=Ra(l.Icon.name);return g.jsxs("span",{className:"text-body",style:{color:"var(--text-secondary)"},children:["[",o,"]"]},t)}return null}function aC(t,i){return{pre({children:r,node:l}){var c,u,h,m;const o=(c=l==null?void 0:l.children)==null?void 0:c[0];if((o==null?void 0:o.tagName)==="code"){const p=(u=o.properties)!=null&&u.className?Array.isArray(o.properties.className)?o.properties.className.join(" "):String(o.properties.className):void 0;if(p!=null&&p.includes("language-action")){const b=String(((h=r==null?void 0:r.props)==null?void 0:h.children)??r).trim();try{const y=JSON.parse(b);if(y&&typeof y=="object"&&y.kind){const E=lC(y.prompt??b),x=i==null?void 0:i[E];return g.jsx(cC,{action:y,resolved:x,onResolve:t?(k,A)=>t(k,A):void 0})}}catch{}}return g.jsx(WA,{className:p,children:((m=r==null?void 0:r.props)==null?void 0:m.children)??r})}return g.jsx("pre",{children:r})},code({className:r,children:l,...o}){return g.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:l})},table({children:r}){return g.jsx(eC,{children:r})},thead({children:r}){return g.jsx(tC,{children:r})},tr({children:r,...l}){return g.jsx(nC,{...l,children:r})},th({children:r,style:l}){return g.jsx(Db,{isHeader:!0,style:l,children:r})},td({children:r,style:l}){return g.jsx(Db,{style:l,children:r})},a({href:r,children:l,...o}){return g.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:l})},blockquote({children:r}){return g.jsx("blockquote",{className:"my-2 pl-3 py-0.5",style:{borderLeft:"3px solid var(--bg-active)",color:"var(--text-secondary)"},children:r})}}}function lC(t){let i=0;for(let r=0;r<t.length;r++)i=(i<<5)-i+t.charCodeAt(r)|0;return i.toString(36)}function sC(t,i){if(!t.includes("```action"))return t;const r=[];let l=t;const o=/```action\s*\n[\s\S]*?```/g;let c=0,u;for(;(u=o.exec(l))!==null;)u.index>c&&r.push(l.slice(c,u.index)),r.push(u[0]),c=u.index+u[0].length;const h=l.slice(c),m=h.indexOf("```action");return m!==-1&&i?r.push(h.slice(0,m)):r.push(h),r.join("")}function oC(t){return t.includes("```action")?t.replace(/```action\s*\n[\s\S]*?```/g,"").includes("```action"):!1}function cC({action:t,resolved:i,onResolve:r}){var b,y;const[l,o]=V.useState(""),[c,u]=V.useState(null);if(i)return g.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:[g.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:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),g.jsxs("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:["Selected: ",g.jsx("strong",{style:{color:"var(--text-primary)"},children:i.label??i.value})]})]});const h=E=>{r&&r(E.value,E.label)},m=()=>{const E=l.trim();E&&r&&r(E,E)},p=(E,x)=>{const k=c===x;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=((b=t.items)==null?void 0:b[0])??{label:"Yes",value:"yes"},x=((y=t.items)==null?void 0:y[1])??{label:"No",value:"no"};return g.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&&g.jsx("div",{className:"px-4 py-3",style:{borderBottom:"1px solid var(--border)"},children:g.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:t.prompt})}),g.jsxs("div",{className:"flex",children:[g.jsx("button",{onClick:()=>h(x),onMouseEnter:()=>u(0),onMouseLeave:()=>u(null),className:"flex-1 px-4 py-2.5 text-caption font-bold transition-all cursor-pointer",style:{background:c===0?"var(--bg-hover)":"transparent",color:"var(--text-secondary)",borderRight:"1px solid var(--border)",border:"none",borderRightWidth:1,borderRightStyle:"solid",borderRightColor:"var(--border)"},children:x.label}),g.jsx("button",{onClick:()=>h(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:c===1?.9:1},children:E.label})]})]})}return t.kind==="buttons"&&t.items?g.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&&g.jsx("div",{className:"px-4 py-3",style:{borderBottom:"1px solid var(--border)"},children:g.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:t.prompt})}),g.jsx("div",{className:"flex flex-wrap gap-2 px-4 py-3",children:t.items.map((E,x)=>g.jsx("button",{onClick:()=>h(E),onMouseEnter:()=>u(x),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:p(E,x),children:E.label},E.value))})]}):t.kind==="select"&&t.items?g.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&&g.jsx("div",{className:"px-4 py-3",style:{borderBottom:"1px solid var(--border)"},children:g.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:t.prompt})}),g.jsx("div",{className:"flex flex-col",children:t.items.map((E,x)=>g.jsxs("button",{onClick:()=>h(E),onMouseEnter:()=>u(x),onMouseLeave:()=>u(null),className:"flex items-center gap-3 px-4 py-2.5 text-left transition-all cursor-pointer",style:{background:c===x?"var(--bg-hover)":"transparent",color:"var(--text-primary)",borderBottom:x<t.items.length-1?"1px solid var(--border)":"none",border:"none",borderBottomWidth:x<t.items.length-1?1:0,borderBottomStyle:"solid",borderBottomColor:"var(--border)"},children:[g.jsx("span",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",style:{border:"2px solid var(--border)",background:c===x?"var(--bg-active)":"transparent"},children:c===x&&g.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:"#fff"}})}),g.jsx("span",{className:"text-caption",children:E.label})]},E.value))})]}):t.kind==="input"?g.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&&g.jsx("div",{className:"px-4 py-3",style:{borderBottom:"1px solid var(--border)"},children:g.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:t.prompt})}),g.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[g.jsx("input",{type:"text",value:l,onChange:E=>o(E.target.value),onKeyDown:E=>{E.key==="Enter"&&m()},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)"}}),g.jsx("button",{onClick:m,disabled:!l.trim(),className:"px-4 py-2 rounded-md text-caption font-bold transition-all cursor-pointer",style:{background:l.trim()?"var(--bg-active)":"var(--bg-hover)",color:l.trim()?"#fff":"var(--text-muted)",border:"none"},children:"Submit"})]})]}):null}function uC(){return g.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:[g.jsx("span",{className:"inline-block w-2 h-2 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),g.jsx("span",{className:"text-caption",style:{color:"var(--text-muted)"},children:"Preparing options..."})]})}function cf({text:t,mediaUrl:i,a2ui:r,className:l="",isStreaming:o,onAction:c,onResolveAction:u,resolvedActions:h}){const m=V.useMemo(()=>aC(u,h),[u,h]),p=V.useMemo(()=>sC(t,o),[t,o]),b=o&&oC(t);return g.jsxs("div",{className:l,children:[i&&g.jsx("div",{className:"mb-2",children:g.jsx(dC,{url:i})}),p?g.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:g.jsx(Py,{remarkPlugins:[fv],rehypePlugins:[QA],components:m,children:p})}):null,b&&g.jsx(uC,{}),r&&g.jsx(iC,{jsonl:r,onAction:c})]})}function dC({url:t}){var r,l;const i=((r=t.split(".").pop())==null?void 0:r.toLowerCase().split("?")[0])??"";if(["mp3","wav","ogg","m4a","aac","webm"].includes(i))return g.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:[g.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:g.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"})}),g.jsx("audio",{controls:!0,className:"flex-1 h-8",style:{maxWidth:280},children:g.jsx("source",{src:t})})]});if(["mp4","mov","avi","mkv"].includes(i))return g.jsx("video",{controls:!0,className:"max-w-[360px] max-h-64 rounded-md",style:{border:"1px solid var(--border)"},children:g.jsx("source",{src:t})});if(["pdf","zip","tar","gz","doc","docx","xls","xlsx","csv"].includes(i)){const o=((l=t.split("/").pop())==null?void 0:l.split("?")[0])??"file";return g.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:[g.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:g.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"})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("p",{className:"text-caption font-bold truncate",style:{color:"var(--text-primary)"},children:o}),g.jsxs("p",{className:"text-tiny",style:{color:"var(--text-muted)"},children:[i.toUpperCase()," — Click to open"]})]}),g.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:g.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 g.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 fC({channelId:t}){const i=Mi(),r=hr(),[l,o]=V.useState(null),[c,u]=V.useState(""),h=V.useRef(null),m=V.useRef(null),p=i.sessions,b=i.selectedSessionId;V.useEffect(()=>{l&&h.current&&(h.current.focus(),h.current.select())},[l]);const y=V.useCallback(C=>{if(C===b)return;const S=p.find(U=>U.id===C);S&&(oe.info("Session",`Switched to session: ${S.name} (${S.id})`),r({type:"SELECT_SESSION",sessionId:S.id,sessionKey:S.sessionKey}))},[b,p,r]),E=V.useCallback(async()=>{try{let C=t;if(!C){oe.info("Session","No channel for default agent — auto-creating General channel"),C=(await dr.create({name:"General",openclawAgentId:"main"})).id;const[{agents:I},{channels:G}]=await Promise.all([es.list(),dr.list()]);r({type:"SET_AGENTS",agents:I}),r({type:"SET_CHANNELS",channels:G});const{sessions:re}=await Vl.list(C);r({type:"SET_SESSIONS",sessions:re}),re.length>0&&r({type:"SELECT_SESSION",sessionId:re[0].id,sessionKey:re[0].sessionKey});return}const S=await Vl.create(C);oe.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(()=>{m.current&&(m.current.scrollLeft=m.current.scrollWidth)})}catch(C){oe.error("Session",`Failed to create session: ${C}`)}},[t,r]),x=V.useCallback(async C=>{if(!(p.length<=1||!t))try{if(await Vl.delete(t,C),oe.info("Session",`Deleted session: ${C}`),r({type:"REMOVE_SESSION",sessionId:C}),b===C){const S=p.filter(U=>U.id!==C);S.length>0&&r({type:"SELECT_SESSION",sessionId:S[0].id,sessionKey:S[0].sessionKey})}}catch(S){oe.error("Session",`Failed to delete session: ${S}`)}},[t,p,b,r]),k=V.useCallback((C,S)=>{o(C),u(S)},[]),A=V.useCallback(async()=>{if(!l||!c.trim()||!t){o(null);return}try{await Vl.rename(t,l,c.trim()),oe.info("Session",`Renamed session ${l} to: ${c.trim()}`),r({type:"RENAME_SESSION",sessionId:l,name:c.trim()})}catch(C){oe.error("Session",`Failed to rename session: ${C}`)}o(null)},[t,l,c,r]);return g.jsx("div",{className:"flex items-center gap-0 px-3",style:{height:36,borderBottom:"1px solid var(--border)",background:"var(--bg-surface)"},children:g.jsxs("div",{ref:m,className:"flex items-center gap-0.5 overflow-x-auto no-scrollbar",children:[p.map(C=>{const S=C.id===b,U=C.id===l;return g.jsx("div",{className:"group relative flex items-center shrink-0",children:U?g.jsx("input",{ref:h,value:c,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}}):g.jsxs("button",{onClick:()=>y(C.id),onDoubleClick:()=>k(C.id,C.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:`${C.name} (double-click to rename)`,children:[g.jsx("span",{className:"max-w-[120px] truncate",children:C.name}),p.length>1&&g.jsx("span",{onClick:I=>{I.stopPropagation(),x(C.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:g.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})},C.id)}),g.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:C=>{C.currentTarget.style.background="var(--bg-hover)",C.currentTarget.style.color="var(--text-primary)"},onMouseLeave:C=>{C.currentTarget.style.background="",C.currentTarget.style.color="var(--text-muted)"},children:g.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})})})]})})}function hC(t){let i=0;for(let r=0;r<t.length;r++)i=(i<<5)-i+t.charCodeAt(r)|0;return i.toString(36)}const Ib=[{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"}],Iv="botschat_skill_freq_v2",Lb="botschat_skill_freq",pC=2,mC=14;function Lv(t=new Date){return t.toISOString().slice(0,10)}function Uv(t){const i=Date.now()-mC*864e5;for(const r of Object.values(t))for(const l of Object.keys(r.daily))new Date(l).getTime()<i&&delete r.daily[l]}function Bv(){try{const t=localStorage.getItem(Iv);if(t){const r=JSON.parse(t);return Uv(r),r}const i=localStorage.getItem(Lb);if(i){const r=JSON.parse(i),l=Lv(),o={};for(const[c,u]of Object.entries(r))o[c]={total:u,daily:{[l]:u}};return zv(o),localStorage.removeItem(Lb),o}return{}}catch{return{}}}function zv(t){Uv(t),localStorage.setItem(Iv,JSON.stringify(t))}function Ub(t){const i=t.match(/^\/(\S+)/);if(!i)return null;const r=`/${i[1]}`,l=Bv(),o=Lv();return l[r]||(l[r]={total:0,daily:{}}),l[r].total+=1,l[r].daily[o]=(l[r].daily[o]??0)+1,zv(l),r}function jv(t){const i=Date.now()-pC*864e5;let r=0;for(const[l,o]of Object.entries(t.daily))new Date(l).getTime()>=i&&(r+=o);return r}function Bb(t){return jv(t)*5+t.total}function gC(){const t=Bv(),i=new Set(Ib.map(o=>o.cmd)),r=Object.keys(t).filter(o=>!i.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:[...Ib,...r].sort((o,c)=>{const u=t[o.cmd]?Bb(t[o.cmd]):0;return(t[c.cmd]?Bb(t[c.cmd]):0)-u}),store:t}}function bC({sendMessage:t}){var N,pe,Ne;const i=Mi(),r=hr(),[l,o]=V.useState(""),[c,u]=V.useState(0),[h,m]=V.useState(null),[p,b]=V.useState(!1),[y,E]=V.useState(!1),x=V.useRef(null),k=V.useRef(null),A=V.useRef(null),C=V.useRef(null),S=i.selectedSessionKey,{skills:U,store:I}=V.useMemo(()=>gC(),[c]);V.useEffect(()=>{var K;(K=x.current)==null||K.scrollIntoView({behavior:"smooth"})},[i.messages]),V.useEffect(()=>{k.current&&(k.current.style.height="auto",k.current.style.height=Math.min(k.current.scrollHeight,160)+"px")},[l]),V.useEffect(()=>{S&&k.current&&requestAnimationFrame(()=>{var K;(K=k.current)==null||K.focus()})},[S]),V.useEffect(()=>{if(S)try{const le=JSON.parse(localStorage.getItem("botschat:sessionModels")||"{}")[S];le&&le!==i.sessionModel?r({type:"SET_SESSION_MODEL",model:le}):!le&&i.sessionModel&&r({type:"SET_SESSION_MODEL",model:null})}catch{}},[S]);const G=i.sessionModel??i.defaultModel,re=V.useCallback(K=>{var ve;if(!K||!S||K===G)return;oe.info("Chat",`Model change: ${G??"none"} → ${K}`),r({type:"SET_SESSION_MODEL",model:K});try{const be=JSON.parse(localStorage.getItem("botschat:sessionModels")||"{}");be[S]=K,localStorage.setItem("botschat:sessionModels",JSON.stringify(be))}catch{}Ub("/model"),u(be=>be+1);const le={id:crypto.randomUUID(),sender:"user",text:`/model ${K}`,timestamp:Date.now()};r({type:"ADD_MESSAGE",message:le}),t({type:"user.message",sessionKey:S,text:`/model ${K}`,userId:((ve=i.user)==null?void 0:ve.id)??"",messageId:le.id}),requestAnimationFrame(()=>{var be;(be=x.current)==null||be.scrollIntoView({behavior:"smooth"})})},[S,G,(N=i.user)==null?void 0:N.id,t,r]),B=V.useCallback(K=>{var le;oe.info("Skill",`Skill button clicked: ${K}`),o(ve=>ve.startsWith(K+" ")||ve===K?ve:K+" "),(le=k.current)==null||le.focus()},[]),ae=V.useCallback(K=>{var be,De;const le=(be=K.target.files)==null?void 0:be[0];if(!le||!le.type.startsWith("image/"))return;const ve=URL.createObjectURL(le);m({file:le,preview:ve}),K.target.value="",(De=k.current)==null||De.focus()},[]),fe=V.useCallback(()=>{h&&(URL.revokeObjectURL(h.preview),m(null))},[h]),me=V.useCallback(async K=>{const le=new FormData;le.append("file",K);const ve=localStorage.getItem("botschat_token");try{const be=await fetch("/api/upload",{method:"POST",headers:ve?{Authorization:`Bearer ${ve}`}:{},body:le});if(!be.ok){const wt=await be.json().catch(()=>({error:"Upload failed"}));throw new Error(wt.error??`HTTP ${be.status}`)}const De=await be.json();return De.url.startsWith("/")?`${window.location.origin}${De.url}`:De.url}catch(be){return oe.error("Upload",`Image upload failed: ${be}`),null}},[]),w=V.useCallback(K=>{K.preventDefault(),K.stopPropagation(),K.dataTransfer.types.includes("Files")&&E(!0)},[]),H=V.useCallback(K=>{var ve;K.preventDefault(),K.stopPropagation();const le=(ve=C.current)==null?void 0:ve.getBoundingClientRect();if(le){const{clientX:be,clientY:De}=K;(be<le.left||be>le.right||De<le.top||De>le.bottom)&&E(!1)}},[]),X=V.useCallback(K=>{K.preventDefault(),K.stopPropagation()},[]),ye=V.useCallback(K=>{var ve,be;K.preventDefault(),K.stopPropagation(),E(!1);const le=(ve=K.dataTransfer.files)==null?void 0:ve[0];if(le&&le.type.startsWith("image/")){const De=URL.createObjectURL(le);m({file:le,preview:De}),(be=k.current)==null||be.focus()}},[]),j=V.useCallback(K=>{var ve;const le=(ve=K.clipboardData)==null?void 0:ve.items;if(le){for(let be=0;be<le.length;be++)if(le[be].type.startsWith("image/")){K.preventDefault();const De=le[be].getAsFile();if(De){const Et=URL.createObjectURL(De);m({file:De,preview:Et})}return}}},[]),Z=async()=>{var Et;if(!l.trim()&&!h||!S)return;const K=l.trim(),le=K.length>0,ve=le&&K.startsWith("/");oe.info("Chat",`Send message${ve?" (skill)":""}${h?" +image":""}: ${K.length>120?K.slice(0,120)+"…":K}`,{sessionKey:S,isSkill:ve}),le&&(Ub(K),u(wt=>wt+1));let be;if(h){b(!0);const wt=await me(h.file);if(b(!1),!wt)return;be=wt,fe()}const De={id:crypto.randomUUID(),sender:"user",text:K,timestamp:Date.now(),mediaUrl:be};r({type:"ADD_MESSAGE",message:De}),t({type:"user.message",sessionKey:S,text:K,userId:((Et=i.user)==null?void 0:Et.id)??"",messageId:De.id,...be?{mediaUrl:be}:{}}),o(""),requestAnimationFrame(()=>{var wt;(wt=x.current)==null||wt.scrollIntoView({behavior:"smooth"})})},D=K=>{oe.info("Thread",`Open thread for message: ${K}`),r({type:"OPEN_THREAD",threadId:K,messages:[]})},W=V.useCallback(K=>{var ve;if(!S)return;oe.info("A2UI",`Action triggered: ${K}`);const le={id:crypto.randomUUID(),sender:"user",text:K,timestamp:Date.now()};r({type:"ADD_MESSAGE",message:le}),t({type:"user.message",sessionKey:S,text:K,userId:((ve=i.user)==null?void 0:ve.id)??"",messageId:le.id}),requestAnimationFrame(()=>{var be;(be=x.current)==null||be.scrollIntoView({behavior:"smooth"})})},[S,(pe=i.user)==null?void 0:pe.id,t,r]),ee=V.useCallback((K,le,ve)=>{var Et;if(!S)return;oe.info("ActionCard",`Resolved: "${ve}" (value="${le}")`);const be=hC(ve+le);r({type:"RESOLVE_ACTION",messageId:K,promptHash:be,value:le,label:ve});const De={id:crypto.randomUUID(),sender:"user",text:ve,timestamp:Date.now()};r({type:"ADD_MESSAGE",message:De}),t({type:"user.message",sessionKey:S,text:ve,userId:((Et=i.user)==null?void 0:Et.id)??"",messageId:De.id}),requestAnimationFrame(()=>{var wt;(wt=x.current)==null||wt.scrollIntoView({behavior:"smooth"})})},[S,(Ne=i.user)==null?void 0:Ne.id,t,r]),ue=i.agents.find(K=>K.id===i.selectedAgentId),T=(ue==null?void 0:ue.name)??"channel",O=(ue==null?void 0:ue.channelId)??null,q=!!ue;return S?g.jsxs("div",{ref:C,className:"flex-1 flex flex-col min-w-0 relative",style:{background:"var(--bg-surface)"},onDragEnter:w,onDragLeave:H,onDragOver:X,onDrop:ye,children:[y&&g.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.4)",pointerEvents:"none"},children:g.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:[g.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:g.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"})}),g.jsx("span",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:"Drop image here"})]})}),g.jsxs("div",{className:"flex items-center justify-between px-5",style:{height:44,borderBottom:"1px solid var(--border)"},children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"text-h1",style:{color:"var(--text-primary)"},children:["# ",T]}),ue&&!ue.isDefault&&g.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:"— custom channel"})]}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.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:g.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"})}),g.jsx(vf,{value:G??"",onChange:re,models:i.models,disabled:!i.openclawConnected,placeholder:"No model",compact:!0})]})]}),q&&g.jsx(fC,{channelId:O}),g.jsxs("div",{className:"flex-1 overflow-y-auto",children:[i.messages.length===0&&g.jsx("div",{className:"py-12 px-5 text-center",children:g.jsx("p",{className:"text-caption",style:{color:"var(--text-muted)"},children:"No messages yet. Start a conversation."})}),i.messages.map((K,le)=>{const ve=le>0?i.messages[le-1]:null,be=(ve==null?void 0:ve.sender)===K.sender&&K.timestamp-ve.timestamp<3e5;return g.jsx(yC,{msg:K,grouped:be,onOpenThread:()=>D(K.id),onAction:W,onResolveAction:(De,Et)=>ee(K.id,De,Et)},K.id)}),g.jsx("div",{ref:x})]}),g.jsxs("div",{className:"px-5 pb-4 pt-2",children:[g.jsx("div",{className:"flex items-center gap-1.5 pb-1.5 overflow-x-auto no-scrollbar",children:U.map(K=>{const le=I[K.cmd],ve=(le==null?void 0:le.total)??0,be=le?jv(le):0,De=l.startsWith(K.cmd+" ")||l===K.cmd;return g.jsxs("button",{onClick:()=>B(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}${ve>0?` (total ${ve}x${be>0?`, recent ${be}x`:""})`:""}`,children:[g.jsx("span",{className:"font-mono text-[10px] opacity-70",children:K.cmd}),ve>0&&g.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:ve})]},K.cmd)})}),g.jsxs("div",{className:"rounded-md",style:{border:"1px solid var(--border)",background:"var(--bg-surface)"},children:[h&&g.jsxs("div",{className:"px-3 pt-2 flex items-start gap-2",children:[g.jsxs("div",{className:"relative",children:[g.jsx("img",{src:h.preview,alt:"Preview",className:"max-w-[120px] max-h-[80px] rounded-md object-contain",style:{border:"1px solid var(--border)"}}),g.jsx("button",{onClick:fe,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:"✕"})]}),p&&g.jsx("span",{className:"text-caption",style:{color:"var(--text-muted)"},children:"Uploading…"})]}),g.jsx("textarea",{ref:k,value:l,onChange:K=>o(K.target.value),onKeyDown:K=>{K.key==="Enter"&&!K.shiftKey&&!K.nativeEvent.isComposing&&(K.preventDefault(),Z())},onPaste:j,placeholder:i.openclawConnected?`Message #${T}`:"OpenClaw is offline…",disabled:!i.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}}),g.jsxs("div",{className:"flex items-center justify-between px-3 pb-2",children:[g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("input",{ref:A,type:"file",accept:"image/*",className:"hidden",onChange:ae}),g.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:!i.openclawConnected,children:g.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.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"})})})]}),g.jsx("button",{onClick:Z,disabled:!l.trim()&&!h||!i.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:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:g.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"]})})]})]})]})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center",style:{background:"var(--bg-surface)"},children:g.jsxs("div",{className:"text-center",children:[g.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:g.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"})}),g.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-muted)"},children:"Select a channel to get started"}),g.jsx("p",{className:"text-caption mt-1",style:{color:"var(--text-muted)"},children:"Choose a channel from the sidebar"})]})})}function yC({msg:t,grouped:i,onOpenThread:r,onAction:l,onResolveAction:o}){const c=Mi(),u=t.sender==="user"?"You":"OpenClaw Agent",h=t.sender==="user"?"#9B59B6":"#2BAC76",m=t.sender==="user"?"U":"A",p=c.threadReplyCounts[t.id]??0;return g.jsxs("div",{className:"group relative px-5 hover:bg-[--bg-hover] transition-colors",style:{paddingTop:i?2:8,paddingBottom:2},children:[g.jsxs("div",{className:"flex gap-2 max-w-message",children:[g.jsx("div",{className:"flex-shrink-0",style:{width:36},children:!i&&g.jsx("div",{className:"w-9 h-9 rounded flex items-center justify-center text-white text-caption font-bold",style:{background:h},children:m})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[!i&&g.jsxs("div",{className:"flex items-baseline gap-2 mb-0.5",children:[g.jsx("span",{className:"text-h2",style:{color:"var(--text-primary)"},children:u}),g.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:new Date(t.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),g.jsx(cf,{text:t.text,mediaUrl:t.mediaUrl,a2ui:t.a2ui,isStreaming:t.isStreaming,onAction:l,onResolveAction:o,resolvedActions:t.resolvedActions}),t.isStreaming&&g.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"}}),p>0&&g.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:[g.jsxs("span",{className:"text-caption font-bold",style:{color:"var(--text-link)"},children:[p," ",p===1?"reply":"replies"]}),g.jsx("span",{className:"text-caption opacity-0 group-hover/thread:opacity-100 transition-opacity",style:{color:"var(--text-secondary)"},children:"View thread"}),g.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:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})]})]}),g.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:g.jsx(vC,{label:"Reply in thread",icon:g.jsx("svg",{className:"w-[18px] h-[18px]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.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 vC({label:t,icon:i,onClick:r}){return g.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:i})}function xC({sendMessage:t}){const i=Mi(),r=hr(),[l,o]=V.useState("");if(V.useEffect(()=>{if(!i.activeThreadId||!i.selectedSessionKey||!i.user)return;const h=`${i.selectedSessionKey}:thread:${i.activeThreadId}`;oe.info("Thread",`Loading history for thread ${i.activeThreadId}`),ly.list(i.user.id,h,i.activeThreadId).then(({messages:m})=>{oe.info("Thread",`Loaded ${m.length} thread messages`),m.length>0&&r({type:"OPEN_THREAD",threadId:i.activeThreadId,messages:m})}).catch(m=>{oe.error("Thread",`Failed to load thread history: ${m}`)})},[i.activeThreadId]),!i.activeThreadId)return null;const c=i.messages.find(h=>h.id===i.activeThreadId),u=()=>{var b;if(!l.trim()||!i.selectedSessionKey)return;const h=l.trim(),m=`${i.selectedSessionKey}:thread:${i.activeThreadId}`;oe.info("Thread",`Send reply: ${h.length>120?h.slice(0,120)+"…":h}`,{threadId:i.activeThreadId});const p={id:crypto.randomUUID(),sender:"user",text:h,timestamp:Date.now(),threadId:i.activeThreadId??void 0};r({type:"ADD_THREAD_MESSAGE",message:p}),t({type:"user.message",sessionKey:m,text:h,userId:((b=i.user)==null?void 0:b.id)??"",messageId:p.id}),o("")};return g.jsxs("div",{className:"flex flex-col h-full",style:{width:420,minWidth:320,background:"var(--bg-surface)",borderLeft:"1px solid var(--border)"},children:[g.jsxs("div",{className:"flex items-center justify-between px-4",style:{height:44,borderBottom:"1px solid var(--border)"},children:[g.jsx("h3",{className:"text-h1",style:{color:"var(--text-primary)"},children:"Thread"}),g.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:g.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),g.jsxs("div",{className:"flex-1 overflow-y-auto",children:[c&&g.jsx("div",{className:"px-5 py-3",style:{borderBottom:"1px solid var(--border)"},children:g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"w-9 h-9 rounded flex-shrink-0 flex items-center justify-center text-white text-caption font-bold",style:{background:c.sender==="user"?"#9B59B6":"#2BAC76"},children:c.sender==="user"?"U":"A"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"flex items-baseline gap-2 mb-0.5",children:[g.jsx("span",{className:"text-h2",style:{color:"var(--text-primary)"},children:c.sender==="user"?"You":"OpenClaw Agent"}),g.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:new Date(c.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),g.jsx(cf,{text:c.text,mediaUrl:c.mediaUrl})]})]})}),g.jsx("div",{className:"px-5 py-2",style:{borderBottom:"1px solid var(--border)"},children:g.jsxs("span",{className:"text-caption font-bold",style:{color:"var(--text-link)"},children:[i.threadMessages.length," ",i.threadMessages.length===1?"reply":"replies"]})}),i.threadMessages.map((h,m)=>{const p=m>0?i.threadMessages[m-1]:null,b=(p==null?void 0:p.sender)===h.sender&&h.timestamp-p.timestamp<3e5;return g.jsx("div",{className:"px-5 hover:bg-[--bg-hover] transition-colors",style:{paddingTop:b?2:8,paddingBottom:2},children:g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"flex-shrink-0",style:{width:36},children:!b&&g.jsx("div",{className:"w-9 h-9 rounded flex items-center justify-center text-white text-caption font-bold",style:{background:h.sender==="user"?"#9B59B6":"#2BAC76"},children:h.sender==="user"?"U":"A"})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[!b&&g.jsxs("div",{className:"flex items-baseline gap-2 mb-0.5",children:[g.jsx("span",{className:"text-h2",style:{color:"var(--text-primary)"},children:h.sender==="user"?"You":"OpenClaw Agent"}),g.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:new Date(h.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),g.jsx(cf,{text:h.text,mediaUrl:h.mediaUrl,a2ui:h.a2ui})]})]})},h.id)})]})," ",g.jsx("div",{className:"px-4 pb-3 pt-2",children:g.jsxs("div",{className:"rounded-md",style:{border:"1px solid var(--border)",background:"var(--bg-surface)"},children:[g.jsx("textarea",{value:l,onChange:h=>o(h.target.value),onKeyDown:h=>{h.key==="Enter"&&!h.shiftKey&&!h.nativeEvent.isComposing&&(h.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}}),g.jsx("div",{className:"flex justify-end px-3 pb-2",children:g.jsx("button",{onClick:u,disabled:!l.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 EC(t){switch(t){case"ok":return"OK";case"error":return"ERR";case"skipped":return"SKIP";case"running":return"RUN";default:return t.toUpperCase()}}function _C(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 SC({jobs:t,selectedJobId:i,onSelectJob:r}){return t.length===0?g.jsx("div",{className:"flex items-center justify-center",style:{width:192,borderRight:"1px solid var(--border)",background:"var(--bg-surface)"},children:g.jsxs("div",{className:"text-center p-4",children:[g.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:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),g.jsxs("p",{className:"text-tiny",style:{color:"var(--text-muted)"},children:["No runs yet.",g.jsx("br",{}),"Waiting for schedule..."]})]})}):g.jsxs("div",{className:"overflow-y-auto",style:{width:192,borderRight:"1px solid var(--border)",background:"var(--bg-surface)"},children:[g.jsxs("div",{className:"px-3 py-2",style:{borderBottom:"1px solid var(--border)"},children:[g.jsx("span",{className:"text-tiny uppercase tracking-wider font-bold",style:{color:"var(--text-muted)"},children:"Job History"}),g.jsxs("span",{className:"text-tiny ml-1",style:{color:"var(--text-muted)"},children:["(",t.length,")"]})]}),t.map((l,o)=>{const c=_C(l.status),u=l.number||t.length-o;return g.jsxs("button",{onClick:()=>r(l.id),className:`w-full text-left px-3 py-2 hover:bg-[--bg-hover] transition-colors ${i===l.id?"bg-[--bg-hover]":""}`,style:{borderBottom:"1px solid var(--border)",...i===l.id?{borderLeft:"3px solid var(--bg-active)"}:{}},children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("span",{className:"text-tiny font-mono",style:{color:"var(--text-muted)"},children:["#",u]}),g.jsx("span",{className:"text-tiny px-1.5 py-0.5 rounded-sm font-bold",style:{background:c.bg,color:c.fg},children:EC(l.status)})]}),g.jsxs("div",{className:"text-tiny mt-0.5",style:{color:"var(--text-muted)"},children:[l.time,l.durationMs!=null&&g.jsxs("span",{className:"ml-1",children:["(",(l.durationMs/1e3).toFixed(1),"s)"]})]}),l.summary&&g.jsx("div",{className:"text-caption mt-1 truncate",style:{color:"var(--text-secondary)"},children:l.summary})]},l.id)})]})}const kC=()=>{};var zb={};/**
85
- * @license
86
- * Copyright 2017 Google LLC
87
- *
88
- * Licensed under the Apache License, Version 2.0 (the "License");
89
- * you may not use this file except in compliance with the License.
90
- * You may obtain a copy of the License at
91
- *
92
- * http://www.apache.org/licenses/LICENSE-2.0
93
- *
94
- * Unless required by applicable law or agreed to in writing, software
95
- * distributed under the License is distributed on an "AS IS" BASIS,
96
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
97
- * See the License for the specific language governing permissions and
98
- * limitations under the License.
99
- */const Hv=function(t){const i=[];let r=0;for(let l=0;l<t.length;l++){let o=t.charCodeAt(l);o<128?i[r++]=o:o<2048?(i[r++]=o>>6|192,i[r++]=o&63|128):(o&64512)===55296&&l+1<t.length&&(t.charCodeAt(l+1)&64512)===56320?(o=65536+((o&1023)<<10)+(t.charCodeAt(++l)&1023),i[r++]=o>>18|240,i[r++]=o>>12&63|128,i[r++]=o>>6&63|128,i[r++]=o&63|128):(i[r++]=o>>12|224,i[r++]=o>>6&63|128,i[r++]=o&63|128)}return i},NC=function(t){const i=[];let r=0,l=0;for(;r<t.length;){const o=t[r++];if(o<128)i[l++]=String.fromCharCode(o);else if(o>191&&o<224){const c=t[r++];i[l++]=String.fromCharCode((o&31)<<6|c&63)}else if(o>239&&o<365){const c=t[r++],u=t[r++],h=t[r++],m=((o&7)<<18|(c&63)<<12|(u&63)<<6|h&63)-65536;i[l++]=String.fromCharCode(55296+(m>>10)),i[l++]=String.fromCharCode(56320+(m&1023))}else{const c=t[r++],u=t[r++];i[l++]=String.fromCharCode((o&15)<<12|(c&63)<<6|u&63)}}return i.join("")},Fv={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,i){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=i?this.byteToCharMapWebSafe_:this.byteToCharMap_,l=[];for(let o=0;o<t.length;o+=3){const c=t[o],u=o+1<t.length,h=u?t[o+1]:0,m=o+2<t.length,p=m?t[o+2]:0,b=c>>2,y=(c&3)<<4|h>>4;let E=(h&15)<<2|p>>6,x=p&63;m||(x=64,u||(E=64)),l.push(r[b],r[y],r[E],r[x])}return l.join("")},encodeString(t,i){return this.HAS_NATIVE_SUPPORT&&!i?btoa(t):this.encodeByteArray(Hv(t),i)},decodeString(t,i){return this.HAS_NATIVE_SUPPORT&&!i?atob(t):NC(this.decodeStringToByteArray(t,i))},decodeStringToByteArray(t,i){this.init_();const r=i?this.charToByteMapWebSafe_:this.charToByteMap_,l=[];for(let o=0;o<t.length;){const c=r[t.charAt(o++)],h=o<t.length?r[t.charAt(o)]:0;++o;const p=o<t.length?r[t.charAt(o)]:64;++o;const y=o<t.length?r[t.charAt(o)]:64;if(++o,c==null||h==null||p==null||y==null)throw new wC;const E=c<<2|h>>4;if(l.push(E),p!==64){const x=h<<4&240|p>>2;if(l.push(x),y!==64){const k=p<<6&192|y;l.push(k)}}}return l},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class wC extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const TC=function(t){const i=Hv(t);return Fv.encodeByteArray(i,!0)},Pv=function(t){return TC(t).replace(/\./g,"")},Gv=function(t){try{return Fv.decodeString(t,!0)}catch(i){console.error("base64Decode failed: ",i)}return null};/**
100
- * @license
101
- * Copyright 2022 Google LLC
102
- *
103
- * Licensed under the Apache License, Version 2.0 (the "License");
104
- * you may not use this file except in compliance with the License.
105
- * You may obtain a copy of the License at
106
- *
107
- * http://www.apache.org/licenses/LICENSE-2.0
108
- *
109
- * Unless required by applicable law or agreed to in writing, software
110
- * distributed under the License is distributed on an "AS IS" BASIS,
111
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112
- * See the License for the specific language governing permissions and
113
- * limitations under the License.
114
- */function AC(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
115
- * @license
116
- * Copyright 2022 Google LLC
117
- *
118
- * Licensed under the Apache License, Version 2.0 (the "License");
119
- * you may not use this file except in compliance with the License.
120
- * You may obtain a copy of the License at
121
- *
122
- * http://www.apache.org/licenses/LICENSE-2.0
123
- *
124
- * Unless required by applicable law or agreed to in writing, software
125
- * distributed under the License is distributed on an "AS IS" BASIS,
126
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127
- * See the License for the specific language governing permissions and
128
- * limitations under the License.
129
- */const CC=()=>AC().__FIREBASE_DEFAULTS__,OC=()=>{if(typeof process>"u"||typeof zb>"u")return;const t=zb.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},MC=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const i=t&&Gv(t[1]);return i&&JSON.parse(i)},RC=()=>{try{return kC()||CC()||OC()||MC()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},DC=t=>{var i;return(i=RC())==null?void 0:i[`_${t}`]};/**
130
- * @license
131
- * Copyright 2025 Google LLC
132
- *
133
- * Licensed under the Apache License, Version 2.0 (the "License");
134
- * you may not use this file except in compliance with the License.
135
- * You may obtain a copy of the License at
136
- *
137
- * http://www.apache.org/licenses/LICENSE-2.0
138
- *
139
- * Unless required by applicable law or agreed to in writing, software
140
- * distributed under the License is distributed on an "AS IS" BASIS,
141
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
142
- * See the License for the specific language governing permissions and
143
- * limitations under the License.
144
- */function $v(t){try{return(t.startsWith("http://")||t.startsWith("https://")?new URL(t).hostname:t).endsWith(".cloudworkstations.dev")}catch{return!1}}/**
145
- * @license
146
- * Copyright 2017 Google LLC
147
- *
148
- * Licensed under the Apache License, Version 2.0 (the "License");
149
- * you may not use this file except in compliance with the License.
150
- * You may obtain a copy of the License at
151
- *
152
- * http://www.apache.org/licenses/LICENSE-2.0
153
- *
154
- * Unless required by applicable law or agreed to in writing, software
155
- * distributed under the License is distributed on an "AS IS" BASIS,
156
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
157
- * See the License for the specific language governing permissions and
158
- * limitations under the License.
159
- */function si(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function IC(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(si())}function LC(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function UC(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function BC(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function zC(){try{return typeof indexedDB=="object"}catch{return!1}}function jC(){return new Promise((t,i)=>{try{let r=!0;const l="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(l);o.onsuccess=()=>{o.result.close(),r||self.indexedDB.deleteDatabase(l),t(!0)},o.onupgradeneeded=()=>{r=!1},o.onerror=()=>{var c;i(((c=o.error)==null?void 0:c.message)||"")}}catch(r){i(r)}})}/**
160
- * @license
161
- * Copyright 2017 Google LLC
162
- *
163
- * Licensed under the Apache License, Version 2.0 (the "License");
164
- * you may not use this file except in compliance with the License.
165
- * You may obtain a copy of the License at
166
- *
167
- * http://www.apache.org/licenses/LICENSE-2.0
168
- *
169
- * Unless required by applicable law or agreed to in writing, software
170
- * distributed under the License is distributed on an "AS IS" BASIS,
171
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
172
- * See the License for the specific language governing permissions and
173
- * limitations under the License.
174
- */const HC="FirebaseError";class Pr extends Error{constructor(i,r,l){super(r),this.code=i,this.customData=l,this.name=HC,Object.setPrototypeOf(this,Pr.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,ds.prototype.create)}}class ds{constructor(i,r,l){this.service=i,this.serviceName=r,this.errors=l}create(i,...r){const l=r[0]||{},o=`${this.service}/${i}`,c=this.errors[i],u=c?FC(c,l):"Error",h=`${this.serviceName}: ${u} (${o}).`;return new Pr(o,h,l)}}function FC(t,i){return t.replace(PC,(r,l)=>{const o=i[l];return o!=null?String(o):`<${l}?>`})}const PC=/\{\$([^}]+)}/g;/**
175
- * @license
176
- * Copyright 2017 Google LLC
177
- *
178
- * Licensed under the Apache License, Version 2.0 (the "License");
179
- * you may not use this file except in compliance with the License.
180
- * You may obtain a copy of the License at
181
- *
182
- * http://www.apache.org/licenses/LICENSE-2.0
183
- *
184
- * Unless required by applicable law or agreed to in writing, software
185
- * distributed under the License is distributed on an "AS IS" BASIS,
186
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
187
- * See the License for the specific language governing permissions and
188
- * limitations under the License.
189
- */function Kv(t){const i=[];for(const[r,l]of Object.entries(t))Array.isArray(l)?l.forEach(o=>{i.push(encodeURIComponent(r)+"="+encodeURIComponent(o))}):i.push(encodeURIComponent(r)+"="+encodeURIComponent(l));return i.length?"&"+i.join("&"):""}function GC(t,i){const r=new $C(t,i);return r.subscribe.bind(r)}class $C{constructor(i,r){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=r,this.task.then(()=>{i(this)}).catch(l=>{this.error(l)})}next(i){this.forEachObserver(r=>{r.next(i)})}error(i){this.forEachObserver(r=>{r.error(i)}),this.close(i)}complete(){this.forEachObserver(i=>{i.complete()}),this.close()}subscribe(i,r,l){let o;if(i===void 0&&r===void 0&&l===void 0)throw new Error("Missing Observer.");KC(i,["next","error","complete"])?o=i:o={next:i,error:r,complete:l},o.next===void 0&&(o.next=Hd),o.error===void 0&&(o.error=Hd),o.complete===void 0&&(o.complete=Hd);const c=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?o.error(this.finalError):o.complete()}catch{}}),this.observers.push(o),c}unsubscribeOne(i){this.observers===void 0||this.observers[i]===void 0||(delete this.observers[i],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(i){if(!this.finalized)for(let r=0;r<this.observers.length;r++)this.sendOne(r,i)}sendOne(i,r){this.task.then(()=>{if(this.observers!==void 0&&this.observers[i]!==void 0)try{r(this.observers[i])}catch(l){typeof console<"u"&&console.error&&console.error(l)}})}close(i){this.finalized||(this.finalized=!0,i!==void 0&&(this.finalError=i),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function KC(t,i){if(typeof t!="object"||t===null)return!1;for(const r of i)if(r in t&&typeof t[r]=="function")return!0;return!1}function Hd(){}/**
190
- * @license
191
- * Copyright 2021 Google LLC
192
- *
193
- * Licensed under the Apache License, Version 2.0 (the "License");
194
- * you may not use this file except in compliance with the License.
195
- * You may obtain a copy of the License at
196
- *
197
- * http://www.apache.org/licenses/LICENSE-2.0
198
- *
199
- * Unless required by applicable law or agreed to in writing, software
200
- * distributed under the License is distributed on an "AS IS" BASIS,
201
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
- * See the License for the specific language governing permissions and
203
- * limitations under the License.
204
- */function uc(t){return t&&t._delegate?t._delegate:t}class is{constructor(i,r,l){this.name=i,this.instanceFactory=r,this.type=l,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(i){return this.instantiationMode=i,this}setMultipleInstances(i){return this.multipleInstances=i,this}setServiceProps(i){return this.serviceProps=i,this}setInstanceCreatedCallback(i){return this.onInstanceCreated=i,this}}/**
205
- * @license
206
- * Copyright 2017 Google LLC
207
- *
208
- * Licensed under the Apache License, Version 2.0 (the "License");
209
- * you may not use this file except in compliance with the License.
210
- * You may obtain a copy of the License at
211
- *
212
- * http://www.apache.org/licenses/LICENSE-2.0
213
- *
214
- * Unless required by applicable law or agreed to in writing, software
215
- * distributed under the License is distributed on an "AS IS" BASIS,
216
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
217
- * See the License for the specific language governing permissions and
218
- * limitations under the License.
219
- */var pt;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(pt||(pt={}));const qC={debug:pt.DEBUG,verbose:pt.VERBOSE,info:pt.INFO,warn:pt.WARN,error:pt.ERROR,silent:pt.SILENT},VC=pt.INFO,YC={[pt.DEBUG]:"log",[pt.VERBOSE]:"log",[pt.INFO]:"info",[pt.WARN]:"warn",[pt.ERROR]:"error"},XC=(t,i,...r)=>{if(i<t.logLevel)return;const l=new Date().toISOString(),o=YC[i];if(o)console[o](`[${l}] ${t.name}:`,...r);else throw new Error(`Attempted to log a message with an invalid logType (value: ${i})`)};class qv{constructor(i){this.name=i,this._logLevel=VC,this._logHandler=XC,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(i){if(!(i in pt))throw new TypeError(`Invalid value "${i}" assigned to \`logLevel\``);this._logLevel=i}setLogLevel(i){this._logLevel=typeof i=="string"?qC[i]:i}get logHandler(){return this._logHandler}set logHandler(i){if(typeof i!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=i}get userLogHandler(){return this._userLogHandler}set userLogHandler(i){this._userLogHandler=i}debug(...i){this._userLogHandler&&this._userLogHandler(this,pt.DEBUG,...i),this._logHandler(this,pt.DEBUG,...i)}log(...i){this._userLogHandler&&this._userLogHandler(this,pt.VERBOSE,...i),this._logHandler(this,pt.VERBOSE,...i)}info(...i){this._userLogHandler&&this._userLogHandler(this,pt.INFO,...i),this._logHandler(this,pt.INFO,...i)}warn(...i){this._userLogHandler&&this._userLogHandler(this,pt.WARN,...i),this._logHandler(this,pt.WARN,...i)}error(...i){this._userLogHandler&&this._userLogHandler(this,pt.ERROR,...i),this._logHandler(this,pt.ERROR,...i)}}const ZC=(t,i)=>i.some(r=>t instanceof r);let jb,Hb;function QC(){return jb||(jb=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function JC(){return Hb||(Hb=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Vv=new WeakMap,uf=new WeakMap,Yv=new WeakMap,Fd=new WeakMap,jf=new WeakMap;function WC(t){const i=new Promise((r,l)=>{const o=()=>{t.removeEventListener("success",c),t.removeEventListener("error",u)},c=()=>{r(fr(t.result)),o()},u=()=>{l(t.error),o()};t.addEventListener("success",c),t.addEventListener("error",u)});return i.then(r=>{r instanceof IDBCursor&&Vv.set(r,t)}).catch(()=>{}),jf.set(i,t),i}function e2(t){if(uf.has(t))return;const i=new Promise((r,l)=>{const o=()=>{t.removeEventListener("complete",c),t.removeEventListener("error",u),t.removeEventListener("abort",u)},c=()=>{r(),o()},u=()=>{l(t.error||new DOMException("AbortError","AbortError")),o()};t.addEventListener("complete",c),t.addEventListener("error",u),t.addEventListener("abort",u)});uf.set(t,i)}let df={get(t,i,r){if(t instanceof IDBTransaction){if(i==="done")return uf.get(t);if(i==="objectStoreNames")return t.objectStoreNames||Yv.get(t);if(i==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return fr(t[i])},set(t,i,r){return t[i]=r,!0},has(t,i){return t instanceof IDBTransaction&&(i==="done"||i==="store")?!0:i in t}};function t2(t){df=t(df)}function n2(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(i,...r){const l=t.call(Pd(this),i,...r);return Yv.set(l,i.sort?i.sort():[i]),fr(l)}:JC().includes(t)?function(...i){return t.apply(Pd(this),i),fr(Vv.get(this))}:function(...i){return fr(t.apply(Pd(this),i))}}function i2(t){return typeof t=="function"?n2(t):(t instanceof IDBTransaction&&e2(t),ZC(t,QC())?new Proxy(t,df):t)}function fr(t){if(t instanceof IDBRequest)return WC(t);if(Fd.has(t))return Fd.get(t);const i=i2(t);return i!==t&&(Fd.set(t,i),jf.set(i,t)),i}const Pd=t=>jf.get(t);function r2(t,i,{blocked:r,upgrade:l,blocking:o,terminated:c}={}){const u=indexedDB.open(t,i),h=fr(u);return l&&u.addEventListener("upgradeneeded",m=>{l(fr(u.result),m.oldVersion,m.newVersion,fr(u.transaction),m)}),r&&u.addEventListener("blocked",m=>r(m.oldVersion,m.newVersion,m)),h.then(m=>{c&&m.addEventListener("close",()=>c()),o&&m.addEventListener("versionchange",p=>o(p.oldVersion,p.newVersion,p))}).catch(()=>{}),h}const a2=["get","getKey","getAll","getAllKeys","count"],l2=["put","add","delete","clear"],Gd=new Map;function Fb(t,i){if(!(t instanceof IDBDatabase&&!(i in t)&&typeof i=="string"))return;if(Gd.get(i))return Gd.get(i);const r=i.replace(/FromIndex$/,""),l=i!==r,o=l2.includes(r);if(!(r in(l?IDBIndex:IDBObjectStore).prototype)||!(o||a2.includes(r)))return;const c=async function(u,...h){const m=this.transaction(u,o?"readwrite":"readonly");let p=m.store;return l&&(p=p.index(h.shift())),(await Promise.all([p[r](...h),o&&m.done]))[0]};return Gd.set(i,c),c}t2(t=>({...t,get:(i,r,l)=>Fb(i,r)||t.get(i,r,l),has:(i,r)=>!!Fb(i,r)||t.has(i,r)}));/**
220
- * @license
221
- * Copyright 2019 Google LLC
222
- *
223
- * Licensed under the Apache License, Version 2.0 (the "License");
224
- * you may not use this file except in compliance with the License.
225
- * You may obtain a copy of the License at
226
- *
227
- * http://www.apache.org/licenses/LICENSE-2.0
228
- *
229
- * Unless required by applicable law or agreed to in writing, software
230
- * distributed under the License is distributed on an "AS IS" BASIS,
231
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
232
- * See the License for the specific language governing permissions and
233
- * limitations under the License.
234
- */class s2{constructor(i){this.container=i}getPlatformInfoString(){return this.container.getProviders().map(r=>{if(o2(r)){const l=r.getImmediate();return`${l.library}/${l.version}`}else return null}).filter(r=>r).join(" ")}}function o2(t){const i=t.getComponent();return(i==null?void 0:i.type)==="VERSION"}const ff="@firebase/app",Pb="0.14.8";/**
235
- * @license
236
- * Copyright 2019 Google LLC
237
- *
238
- * Licensed under the Apache License, Version 2.0 (the "License");
239
- * you may not use this file except in compliance with the License.
240
- * You may obtain a copy of the License at
241
- *
242
- * http://www.apache.org/licenses/LICENSE-2.0
243
- *
244
- * Unless required by applicable law or agreed to in writing, software
245
- * distributed under the License is distributed on an "AS IS" BASIS,
246
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
247
- * See the License for the specific language governing permissions and
248
- * limitations under the License.
249
- */const Oi=new qv("@firebase/app"),c2="@firebase/app-compat",u2="@firebase/analytics-compat",d2="@firebase/analytics",f2="@firebase/app-check-compat",h2="@firebase/app-check",p2="@firebase/auth",m2="@firebase/auth-compat",g2="@firebase/database",b2="@firebase/data-connect",y2="@firebase/database-compat",v2="@firebase/functions",x2="@firebase/functions-compat",E2="@firebase/installations",_2="@firebase/installations-compat",S2="@firebase/messaging",k2="@firebase/messaging-compat",N2="@firebase/performance",w2="@firebase/performance-compat",T2="@firebase/remote-config",A2="@firebase/remote-config-compat",C2="@firebase/storage",O2="@firebase/storage-compat",M2="@firebase/firestore",R2="@firebase/ai",D2="@firebase/firestore-compat",I2="firebase",L2="12.9.0",U2={[ff]:"fire-core",[c2]:"fire-core-compat",[d2]:"fire-analytics",[u2]:"fire-analytics-compat",[h2]:"fire-app-check",[f2]:"fire-app-check-compat",[p2]:"fire-auth",[m2]:"fire-auth-compat",[g2]:"fire-rtdb",[b2]:"fire-data-connect",[y2]:"fire-rtdb-compat",[v2]:"fire-fn",[x2]:"fire-fn-compat",[E2]:"fire-iid",[_2]:"fire-iid-compat",[S2]:"fire-fcm",[k2]:"fire-fcm-compat",[N2]:"fire-perf",[w2]:"fire-perf-compat",[T2]:"fire-rc",[A2]:"fire-rc-compat",[C2]:"fire-gcs",[O2]:"fire-gcs-compat",[M2]:"fire-fst",[D2]:"fire-fst-compat",[R2]:"fire-vertex","fire-js":"fire-js",[I2]:"fire-js-all"};/**
250
- * @license
251
- * Copyright 2019 Google LLC
252
- *
253
- * Licensed under the Apache License, Version 2.0 (the "License");
254
- * you may not use this file except in compliance with the License.
255
- * You may obtain a copy of the License at
256
- *
257
- * http://www.apache.org/licenses/LICENSE-2.0
258
- *
259
- * Unless required by applicable law or agreed to in writing, software
260
- * distributed under the License is distributed on an "AS IS" BASIS,
261
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
262
- * See the License for the specific language governing permissions and
263
- * limitations under the License.
264
- */const B2=new Map,z2=new Map,Gb=new Map;function $b(t,i){try{t.container.addComponent(i)}catch(r){Oi.debug(`Component ${i.name} failed to register with FirebaseApp ${t.name}`,r)}}function rs(t){const i=t.name;if(Gb.has(i))return Oi.debug(`There were multiple attempts to register component ${i}.`),!1;Gb.set(i,t);for(const r of B2.values())$b(r,t);for(const r of z2.values())$b(r,t);return!0}function Ua(t){return t==null?!1:t.settings!==void 0}/**
265
- * @license
266
- * Copyright 2019 Google LLC
267
- *
268
- * Licensed under the Apache License, Version 2.0 (the "License");
269
- * you may not use this file except in compliance with the License.
270
- * You may obtain a copy of the License at
271
- *
272
- * http://www.apache.org/licenses/LICENSE-2.0
273
- *
274
- * Unless required by applicable law or agreed to in writing, software
275
- * distributed under the License is distributed on an "AS IS" BASIS,
276
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
277
- * See the License for the specific language governing permissions and
278
- * limitations under the License.
279
- */const j2={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Hf=new ds("app","Firebase",j2);/**
280
- * @license
281
- * Copyright 2019 Google LLC
282
- *
283
- * Licensed under the Apache License, Version 2.0 (the "License");
284
- * you may not use this file except in compliance with the License.
285
- * You may obtain a copy of the License at
286
- *
287
- * http://www.apache.org/licenses/LICENSE-2.0
288
- *
289
- * Unless required by applicable law or agreed to in writing, software
290
- * distributed under the License is distributed on an "AS IS" BASIS,
291
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
292
- * See the License for the specific language governing permissions and
293
- * limitations under the License.
294
- */const Ff=L2;function ja(t,i,r){let l=U2[t]??t;r&&(l+=`-${r}`);const o=l.match(/\s|\//),c=i.match(/\s|\//);if(o||c){const u=[`Unable to register library "${l}" with version "${i}":`];o&&u.push(`library name "${l}" contains illegal characters (whitespace or "/")`),o&&c&&u.push("and"),c&&u.push(`version name "${i}" contains illegal characters (whitespace or "/")`),Oi.warn(u.join(" "));return}rs(new is(`${l}-version`,()=>({library:l,version:i}),"VERSION"))}/**
295
- * @license
296
- * Copyright 2021 Google LLC
297
- *
298
- * Licensed under the Apache License, Version 2.0 (the "License");
299
- * you may not use this file except in compliance with the License.
300
- * You may obtain a copy of the License at
301
- *
302
- * http://www.apache.org/licenses/LICENSE-2.0
303
- *
304
- * Unless required by applicable law or agreed to in writing, software
305
- * distributed under the License is distributed on an "AS IS" BASIS,
306
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
307
- * See the License for the specific language governing permissions and
308
- * limitations under the License.
309
- */const H2="firebase-heartbeat-database",F2=1,as="firebase-heartbeat-store";let $d=null;function Xv(){return $d||($d=r2(H2,F2,{upgrade:(t,i)=>{switch(i){case 0:try{t.createObjectStore(as)}catch(r){console.warn(r)}}}}).catch(t=>{throw Hf.create("idb-open",{originalErrorMessage:t.message})})),$d}async function P2(t){try{const r=(await Xv()).transaction(as),l=await r.objectStore(as).get(Zv(t));return await r.done,l}catch(i){if(i instanceof Pr)Oi.warn(i.message);else{const r=Hf.create("idb-get",{originalErrorMessage:i==null?void 0:i.message});Oi.warn(r.message)}}}async function Kb(t,i){try{const l=(await Xv()).transaction(as,"readwrite");await l.objectStore(as).put(i,Zv(t)),await l.done}catch(r){if(r instanceof Pr)Oi.warn(r.message);else{const l=Hf.create("idb-set",{originalErrorMessage:r==null?void 0:r.message});Oi.warn(l.message)}}}function Zv(t){return`${t.name}!${t.options.appId}`}/**
310
- * @license
311
- * Copyright 2021 Google LLC
312
- *
313
- * Licensed under the Apache License, Version 2.0 (the "License");
314
- * you may not use this file except in compliance with the License.
315
- * You may obtain a copy of the License at
316
- *
317
- * http://www.apache.org/licenses/LICENSE-2.0
318
- *
319
- * Unless required by applicable law or agreed to in writing, software
320
- * distributed under the License is distributed on an "AS IS" BASIS,
321
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
322
- * See the License for the specific language governing permissions and
323
- * limitations under the License.
324
- */const G2=1024,$2=30;class K2{constructor(i){this.container=i,this._heartbeatsCache=null;const r=this.container.getProvider("app").getImmediate();this._storage=new V2(r),this._heartbeatsCachePromise=this._storage.read().then(l=>(this._heartbeatsCache=l,l))}async triggerHeartbeat(){var i,r;try{const o=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),c=qb();if(((i=this._heartbeatsCache)==null?void 0:i.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((r=this._heartbeatsCache)==null?void 0:r.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===c||this._heartbeatsCache.heartbeats.some(u=>u.date===c))return;if(this._heartbeatsCache.heartbeats.push({date:c,agent:o}),this._heartbeatsCache.heartbeats.length>$2){const u=Y2(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(u,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(l){Oi.warn(l)}}async getHeartbeatsHeader(){var i;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((i=this._heartbeatsCache)==null?void 0:i.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const r=qb(),{heartbeatsToSend:l,unsentEntries:o}=q2(this._heartbeatsCache.heartbeats),c=Pv(JSON.stringify({version:2,heartbeats:l}));return this._heartbeatsCache.lastSentHeartbeatDate=r,o.length>0?(this._heartbeatsCache.heartbeats=o,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),c}catch(r){return Oi.warn(r),""}}}function qb(){return new Date().toISOString().substring(0,10)}function q2(t,i=G2){const r=[];let l=t.slice();for(const o of t){const c=r.find(u=>u.agent===o.agent);if(c){if(c.dates.push(o.date),Vb(r)>i){c.dates.pop();break}}else if(r.push({agent:o.agent,dates:[o.date]}),Vb(r)>i){r.pop();break}l=l.slice(1)}return{heartbeatsToSend:r,unsentEntries:l}}class V2{constructor(i){this.app=i,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return zC()?jC().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const r=await P2(this.app);return r!=null&&r.heartbeats?r:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(i){if(await this._canUseIndexedDBPromise){const l=await this.read();return Kb(this.app,{lastSentHeartbeatDate:i.lastSentHeartbeatDate??l.lastSentHeartbeatDate,heartbeats:i.heartbeats})}else return}async add(i){if(await this._canUseIndexedDBPromise){const l=await this.read();return Kb(this.app,{lastSentHeartbeatDate:i.lastSentHeartbeatDate??l.lastSentHeartbeatDate,heartbeats:[...l.heartbeats,...i.heartbeats]})}else return}}function Vb(t){return Pv(JSON.stringify({version:2,heartbeats:t})).length}function Y2(t){if(t.length===0)return-1;let i=0,r=t[0].date;for(let l=1;l<t.length;l++)t[l].date<r&&(r=t[l].date,i=l);return i}/**
325
- * @license
326
- * Copyright 2019 Google LLC
327
- *
328
- * Licensed under the Apache License, Version 2.0 (the "License");
329
- * you may not use this file except in compliance with the License.
330
- * You may obtain a copy of the License at
331
- *
332
- * http://www.apache.org/licenses/LICENSE-2.0
333
- *
334
- * Unless required by applicable law or agreed to in writing, software
335
- * distributed under the License is distributed on an "AS IS" BASIS,
336
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
337
- * See the License for the specific language governing permissions and
338
- * limitations under the License.
339
- */function X2(t){rs(new is("platform-logger",i=>new s2(i),"PRIVATE")),rs(new is("heartbeat",i=>new K2(i),"PRIVATE")),ja(ff,Pb,t),ja(ff,Pb,"esm2020"),ja("fire-js","")}X2("");var Z2="firebase",Q2="12.9.0";/**
340
- * @license
341
- * Copyright 2020 Google LLC
342
- *
343
- * Licensed under the Apache License, Version 2.0 (the "License");
344
- * you may not use this file except in compliance with the License.
345
- * You may obtain a copy of the License at
346
- *
347
- * http://www.apache.org/licenses/LICENSE-2.0
348
- *
349
- * Unless required by applicable law or agreed to in writing, software
350
- * distributed under the License is distributed on an "AS IS" BASIS,
351
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
352
- * See the License for the specific language governing permissions and
353
- * limitations under the License.
354
- */ja(Z2,Q2,"app");function Qv(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const J2=Qv,Jv=new ds("auth","Firebase",Qv());/**
355
- * @license
356
- * Copyright 2020 Google LLC
357
- *
358
- * Licensed under the Apache License, Version 2.0 (the "License");
359
- * you may not use this file except in compliance with the License.
360
- * You may obtain a copy of the License at
361
- *
362
- * http://www.apache.org/licenses/LICENSE-2.0
363
- *
364
- * Unless required by applicable law or agreed to in writing, software
365
- * distributed under the License is distributed on an "AS IS" BASIS,
366
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
367
- * See the License for the specific language governing permissions and
368
- * limitations under the License.
369
- */const tc=new qv("@firebase/auth");function W2(t,...i){tc.logLevel<=pt.WARN&&tc.warn(`Auth (${Ff}): ${t}`,...i)}function Ko(t,...i){tc.logLevel<=pt.ERROR&&tc.error(`Auth (${Ff}): ${t}`,...i)}/**
370
- * @license
371
- * Copyright 2020 Google LLC
372
- *
373
- * Licensed under the Apache License, Version 2.0 (the "License");
374
- * you may not use this file except in compliance with the License.
375
- * You may obtain a copy of the License at
376
- *
377
- * http://www.apache.org/licenses/LICENSE-2.0
378
- *
379
- * Unless required by applicable law or agreed to in writing, software
380
- * distributed under the License is distributed on an "AS IS" BASIS,
381
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
382
- * See the License for the specific language governing permissions and
383
- * limitations under the License.
384
- */function Yb(t,...i){throw Pf(t,...i)}function Wv(t,...i){return Pf(t,...i)}function ex(t,i,r){const l={...J2(),[i]:r};return new ds("auth","Firebase",l).create(i,{appName:t.name})}function qo(t){return ex(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Pf(t,...i){if(typeof t!="string"){const r=i[0],l=[...i.slice(1)];return l[0]&&(l[0].appName=t.name),t._errorFactory.create(r,...l)}return Jv.create(t,...i)}function tt(t,i,...r){if(!t)throw Pf(i,...r)}function Jl(t){const i="INTERNAL ASSERTION FAILED: "+t;throw Ko(i),new Error(i)}function nc(t,i){t||Jl(i)}function eO(){return Xb()==="http:"||Xb()==="https:"}function Xb(){var t;return typeof self<"u"&&((t=self.location)==null?void 0:t.protocol)||null}/**
385
- * @license
386
- * Copyright 2020 Google LLC
387
- *
388
- * Licensed under the Apache License, Version 2.0 (the "License");
389
- * you may not use this file except in compliance with the License.
390
- * You may obtain a copy of the License at
391
- *
392
- * http://www.apache.org/licenses/LICENSE-2.0
393
- *
394
- * Unless required by applicable law or agreed to in writing, software
395
- * distributed under the License is distributed on an "AS IS" BASIS,
396
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
397
- * See the License for the specific language governing permissions and
398
- * limitations under the License.
399
- */function tO(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(eO()||UC()||"connection"in navigator)?navigator.onLine:!0}function nO(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/**
400
- * @license
401
- * Copyright 2020 Google LLC
402
- *
403
- * Licensed under the Apache License, Version 2.0 (the "License");
404
- * you may not use this file except in compliance with the License.
405
- * You may obtain a copy of the License at
406
- *
407
- * http://www.apache.org/licenses/LICENSE-2.0
408
- *
409
- * Unless required by applicable law or agreed to in writing, software
410
- * distributed under the License is distributed on an "AS IS" BASIS,
411
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
412
- * See the License for the specific language governing permissions and
413
- * limitations under the License.
414
- */class fs{constructor(i,r){this.shortDelay=i,this.longDelay=r,nc(r>i,"Short delay should be less than long delay!"),this.isMobile=IC()||BC()}get(){return tO()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
415
- * @license
416
- * Copyright 2020 Google LLC
417
- *
418
- * Licensed under the Apache License, Version 2.0 (the "License");
419
- * you may not use this file except in compliance with the License.
420
- * You may obtain a copy of the License at
421
- *
422
- * http://www.apache.org/licenses/LICENSE-2.0
423
- *
424
- * Unless required by applicable law or agreed to in writing, software
425
- * distributed under the License is distributed on an "AS IS" BASIS,
426
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
427
- * See the License for the specific language governing permissions and
428
- * limitations under the License.
429
- */function iO(t,i){nc(t.emulator,"Emulator should always be set here");const{url:r}=t.emulator;return i?`${r}${i.startsWith("/")?i.slice(1):i}`:r}/**
430
- * @license
431
- * Copyright 2020 Google LLC
432
- *
433
- * Licensed under the Apache License, Version 2.0 (the "License");
434
- * you may not use this file except in compliance with the License.
435
- * You may obtain a copy of the License at
436
- *
437
- * http://www.apache.org/licenses/LICENSE-2.0
438
- *
439
- * Unless required by applicable law or agreed to in writing, software
440
- * distributed under the License is distributed on an "AS IS" BASIS,
441
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
442
- * See the License for the specific language governing permissions and
443
- * limitations under the License.
444
- */class tx{static initialize(i,r,l){this.fetchImpl=i,r&&(this.headersImpl=r),l&&(this.responseImpl=l)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Jl("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Jl("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Jl("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
445
- * @license
446
- * Copyright 2020 Google LLC
447
- *
448
- * Licensed under the Apache License, Version 2.0 (the "License");
449
- * you may not use this file except in compliance with the License.
450
- * You may obtain a copy of the License at
451
- *
452
- * http://www.apache.org/licenses/LICENSE-2.0
453
- *
454
- * Unless required by applicable law or agreed to in writing, software
455
- * distributed under the License is distributed on an "AS IS" BASIS,
456
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
457
- * See the License for the specific language governing permissions and
458
- * limitations under the License.
459
- */const rO={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/**
460
- * @license
461
- * Copyright 2020 Google LLC
462
- *
463
- * Licensed under the Apache License, Version 2.0 (the "License");
464
- * you may not use this file except in compliance with the License.
465
- * You may obtain a copy of the License at
466
- *
467
- * http://www.apache.org/licenses/LICENSE-2.0
468
- *
469
- * Unless required by applicable law or agreed to in writing, software
470
- * distributed under the License is distributed on an "AS IS" BASIS,
471
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
472
- * See the License for the specific language governing permissions and
473
- * limitations under the License.
474
- */const aO=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],lO=new fs(3e4,6e4);function nx(t,i){return t.tenantId&&!i.tenantId?{...i,tenantId:t.tenantId}:i}async function dc(t,i,r,l,o={}){return ix(t,o,async()=>{let c={},u={};l&&(i==="GET"?u=l:c={body:JSON.stringify(l)});const h=Kv({key:t.config.apiKey,...u}).slice(1),m=await t._getAdditionalHeaders();m["Content-Type"]="application/json",t.languageCode&&(m["X-Firebase-Locale"]=t.languageCode);const p={method:i,headers:m,...c};return LC()||(p.referrerPolicy="no-referrer"),t.emulatorConfig&&$v(t.emulatorConfig.host)&&(p.credentials="include"),tx.fetch()(await rx(t,t.config.apiHost,r,h),p)})}async function ix(t,i,r){t._canInitEmulator=!1;const l={...rO,...i};try{const o=new sO(t),c=await Promise.race([r(),o.promise]);o.clearNetworkTimeout();const u=await c.json();if("needConfirmation"in u)throw Ho(t,"account-exists-with-different-credential",u);if(c.ok&&!("errorMessage"in u))return u;{const h=c.ok?u.errorMessage:u.error.message,[m,p]=h.split(" : ");if(m==="FEDERATED_USER_ID_ALREADY_LINKED")throw Ho(t,"credential-already-in-use",u);if(m==="EMAIL_EXISTS")throw Ho(t,"email-already-in-use",u);if(m==="USER_DISABLED")throw Ho(t,"user-disabled",u);const b=l[m]||m.toLowerCase().replace(/[_\s]+/g,"-");if(p)throw ex(t,b,p);Yb(t,b)}}catch(o){if(o instanceof Pr)throw o;Yb(t,"network-request-failed",{message:String(o)})}}async function rx(t,i,r,l){const o=`${i}${r}?${l}`,c=t,u=c.config.emulator?iO(t.config,o):`${t.config.apiScheme}://${o}`;return aO.includes(r)&&(await c._persistenceManagerAvailable,c._getPersistenceType()==="COOKIE")?c._getPersistence()._getFinalTarget(u).toString():u}class sO{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(i){this.auth=i,this.timer=null,this.promise=new Promise((r,l)=>{this.timer=setTimeout(()=>l(Wv(this.auth,"network-request-failed")),lO.get())})}}function Ho(t,i,r){const l={appName:t.name};r.email&&(l.email=r.email),r.phoneNumber&&(l.phoneNumber=r.phoneNumber);const o=Wv(t,i,l);return o.customData._tokenResponse=r,o}/**
475
- * @license
476
- * Copyright 2020 Google LLC
477
- *
478
- * Licensed under the Apache License, Version 2.0 (the "License");
479
- * you may not use this file except in compliance with the License.
480
- * You may obtain a copy of the License at
481
- *
482
- * http://www.apache.org/licenses/LICENSE-2.0
483
- *
484
- * Unless required by applicable law or agreed to in writing, software
485
- * distributed under the License is distributed on an "AS IS" BASIS,
486
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
487
- * See the License for the specific language governing permissions and
488
- * limitations under the License.
489
- */async function oO(t,i){return dc(t,"POST","/v1/accounts:delete",i)}async function ic(t,i){return dc(t,"POST","/v1/accounts:lookup",i)}/**
490
- * @license
491
- * Copyright 2020 Google LLC
492
- *
493
- * Licensed under the Apache License, Version 2.0 (the "License");
494
- * you may not use this file except in compliance with the License.
495
- * You may obtain a copy of the License at
496
- *
497
- * http://www.apache.org/licenses/LICENSE-2.0
498
- *
499
- * Unless required by applicable law or agreed to in writing, software
500
- * distributed under the License is distributed on an "AS IS" BASIS,
501
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
502
- * See the License for the specific language governing permissions and
503
- * limitations under the License.
504
- */function Wl(t){if(t)try{const i=new Date(Number(t));if(!isNaN(i.getTime()))return i.toUTCString()}catch{}}async function cO(t,i=!1){const r=uc(t),l=await r.getIdToken(i),o=ax(l);tt(o&&o.exp&&o.auth_time&&o.iat,r.auth,"internal-error");const c=typeof o.firebase=="object"?o.firebase:void 0,u=c==null?void 0:c.sign_in_provider;return{claims:o,token:l,authTime:Wl(Kd(o.auth_time)),issuedAtTime:Wl(Kd(o.iat)),expirationTime:Wl(Kd(o.exp)),signInProvider:u||null,signInSecondFactor:(c==null?void 0:c.sign_in_second_factor)||null}}function Kd(t){return Number(t)*1e3}function ax(t){const[i,r,l]=t.split(".");if(i===void 0||r===void 0||l===void 0)return Ko("JWT malformed, contained fewer than 3 sections"),null;try{const o=Gv(r);return o?JSON.parse(o):(Ko("Failed to decode base64 JWT payload"),null)}catch(o){return Ko("Caught error parsing JWT payload as JSON",o==null?void 0:o.toString()),null}}function Zb(t){const i=ax(t);return tt(i,"internal-error"),tt(typeof i.exp<"u","internal-error"),tt(typeof i.iat<"u","internal-error"),Number(i.exp)-Number(i.iat)}/**
505
- * @license
506
- * Copyright 2020 Google LLC
507
- *
508
- * Licensed under the Apache License, Version 2.0 (the "License");
509
- * you may not use this file except in compliance with the License.
510
- * You may obtain a copy of the License at
511
- *
512
- * http://www.apache.org/licenses/LICENSE-2.0
513
- *
514
- * Unless required by applicable law or agreed to in writing, software
515
- * distributed under the License is distributed on an "AS IS" BASIS,
516
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
517
- * See the License for the specific language governing permissions and
518
- * limitations under the License.
519
- */async function hf(t,i,r=!1){if(r)return i;try{return await i}catch(l){throw l instanceof Pr&&uO(l)&&t.auth.currentUser===t&&await t.auth.signOut(),l}}function uO({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/**
520
- * @license
521
- * Copyright 2020 Google LLC
522
- *
523
- * Licensed under the Apache License, Version 2.0 (the "License");
524
- * you may not use this file except in compliance with the License.
525
- * You may obtain a copy of the License at
526
- *
527
- * http://www.apache.org/licenses/LICENSE-2.0
528
- *
529
- * Unless required by applicable law or agreed to in writing, software
530
- * distributed under the License is distributed on an "AS IS" BASIS,
531
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
532
- * See the License for the specific language governing permissions and
533
- * limitations under the License.
534
- */class dO{constructor(i){this.user=i,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(i){if(i){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const l=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,l)}}schedule(i=!1){if(!this.isRunning)return;const r=this.getInterval(i);this.timerId=setTimeout(async()=>{await this.iteration()},r)}async iteration(){try{await this.user.getIdToken(!0)}catch(i){(i==null?void 0:i.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
535
- * @license
536
- * Copyright 2020 Google LLC
537
- *
538
- * Licensed under the Apache License, Version 2.0 (the "License");
539
- * you may not use this file except in compliance with the License.
540
- * You may obtain a copy of the License at
541
- *
542
- * http://www.apache.org/licenses/LICENSE-2.0
543
- *
544
- * Unless required by applicable law or agreed to in writing, software
545
- * distributed under the License is distributed on an "AS IS" BASIS,
546
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
547
- * See the License for the specific language governing permissions and
548
- * limitations under the License.
549
- */class pf{constructor(i,r){this.createdAt=i,this.lastLoginAt=r,this._initializeTime()}_initializeTime(){this.lastSignInTime=Wl(this.lastLoginAt),this.creationTime=Wl(this.createdAt)}_copy(i){this.createdAt=i.createdAt,this.lastLoginAt=i.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
550
- * @license
551
- * Copyright 2019 Google LLC
552
- *
553
- * Licensed under the Apache License, Version 2.0 (the "License");
554
- * you may not use this file except in compliance with the License.
555
- * You may obtain a copy of the License at
556
- *
557
- * http://www.apache.org/licenses/LICENSE-2.0
558
- *
559
- * Unless required by applicable law or agreed to in writing, software
560
- * distributed under the License is distributed on an "AS IS" BASIS,
561
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
562
- * See the License for the specific language governing permissions and
563
- * limitations under the License.
564
- */async function rc(t){var y;const i=t.auth,r=await t.getIdToken(),l=await hf(t,ic(i,{idToken:r}));tt(l==null?void 0:l.users.length,i,"internal-error");const o=l.users[0];t._notifyReloadListener(o);const c=(y=o.providerUserInfo)!=null&&y.length?lx(o.providerUserInfo):[],u=hO(t.providerData,c),h=t.isAnonymous,m=!(t.email&&o.passwordHash)&&!(u!=null&&u.length),p=h?m:!1,b={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:u,metadata:new pf(o.createdAt,o.lastLoginAt),isAnonymous:p};Object.assign(t,b)}async function fO(t){const i=uc(t);await rc(i),await i.auth._persistUserIfCurrent(i),i.auth._notifyListenersIfCurrent(i)}function hO(t,i){return[...t.filter(l=>!i.some(o=>o.providerId===l.providerId)),...i]}function lx(t){return t.map(({providerId:i,...r})=>({providerId:i,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}))}/**
565
- * @license
566
- * Copyright 2020 Google LLC
567
- *
568
- * Licensed under the Apache License, Version 2.0 (the "License");
569
- * you may not use this file except in compliance with the License.
570
- * You may obtain a copy of the License at
571
- *
572
- * http://www.apache.org/licenses/LICENSE-2.0
573
- *
574
- * Unless required by applicable law or agreed to in writing, software
575
- * distributed under the License is distributed on an "AS IS" BASIS,
576
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
577
- * See the License for the specific language governing permissions and
578
- * limitations under the License.
579
- */async function pO(t,i){const r=await ix(t,{},async()=>{const l=Kv({grant_type:"refresh_token",refresh_token:i}).slice(1),{tokenApiHost:o,apiKey:c}=t.config,u=await rx(t,o,"/v1/token",`key=${c}`),h=await t._getAdditionalHeaders();h["Content-Type"]="application/x-www-form-urlencoded";const m={method:"POST",headers:h,body:l};return t.emulatorConfig&&$v(t.emulatorConfig.host)&&(m.credentials="include"),tx.fetch()(u,m)});return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}async function mO(t,i){return dc(t,"POST","/v2/accounts:revokeToken",nx(t,i))}/**
580
- * @license
581
- * Copyright 2020 Google LLC
582
- *
583
- * Licensed under the Apache License, Version 2.0 (the "License");
584
- * you may not use this file except in compliance with the License.
585
- * You may obtain a copy of the License at
586
- *
587
- * http://www.apache.org/licenses/LICENSE-2.0
588
- *
589
- * Unless required by applicable law or agreed to in writing, software
590
- * distributed under the License is distributed on an "AS IS" BASIS,
591
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
592
- * See the License for the specific language governing permissions and
593
- * limitations under the License.
594
- */class Ha{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(i){tt(i.idToken,"internal-error"),tt(typeof i.idToken<"u","internal-error"),tt(typeof i.refreshToken<"u","internal-error");const r="expiresIn"in i&&typeof i.expiresIn<"u"?Number(i.expiresIn):Zb(i.idToken);this.updateTokensAndExpiration(i.idToken,i.refreshToken,r)}updateFromIdToken(i){tt(i.length!==0,"internal-error");const r=Zb(i);this.updateTokensAndExpiration(i,null,r)}async getToken(i,r=!1){return!r&&this.accessToken&&!this.isExpired?this.accessToken:(tt(this.refreshToken,i,"user-token-expired"),this.refreshToken?(await this.refresh(i,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(i,r){const{accessToken:l,refreshToken:o,expiresIn:c}=await pO(i,r);this.updateTokensAndExpiration(l,o,Number(c))}updateTokensAndExpiration(i,r,l){this.refreshToken=r||null,this.accessToken=i||null,this.expirationTime=Date.now()+l*1e3}static fromJSON(i,r){const{refreshToken:l,accessToken:o,expirationTime:c}=r,u=new Ha;return l&&(tt(typeof l=="string","internal-error",{appName:i}),u.refreshToken=l),o&&(tt(typeof o=="string","internal-error",{appName:i}),u.accessToken=o),c&&(tt(typeof c=="number","internal-error",{appName:i}),u.expirationTime=c),u}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(i){this.accessToken=i.accessToken,this.refreshToken=i.refreshToken,this.expirationTime=i.expirationTime}_clone(){return Object.assign(new Ha,this.toJSON())}_performRefresh(){return Jl("not implemented")}}/**
595
- * @license
596
- * Copyright 2020 Google LLC
597
- *
598
- * Licensed under the Apache License, Version 2.0 (the "License");
599
- * you may not use this file except in compliance with the License.
600
- * You may obtain a copy of the License at
601
- *
602
- * http://www.apache.org/licenses/LICENSE-2.0
603
- *
604
- * Unless required by applicable law or agreed to in writing, software
605
- * distributed under the License is distributed on an "AS IS" BASIS,
606
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
607
- * See the License for the specific language governing permissions and
608
- * limitations under the License.
609
- */function cr(t,i){tt(typeof t=="string"||typeof t>"u","internal-error",{appName:i})}class li{constructor({uid:i,auth:r,stsTokenManager:l,...o}){this.providerId="firebase",this.proactiveRefresh=new dO(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=i,this.auth=r,this.stsTokenManager=l,this.accessToken=l.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new pf(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(i){const r=await hf(this,this.stsTokenManager.getToken(this.auth,i));return tt(r,this.auth,"internal-error"),this.accessToken!==r&&(this.accessToken=r,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),r}getIdTokenResult(i){return cO(this,i)}reload(){return fO(this)}_assign(i){this!==i&&(tt(this.uid===i.uid,this.auth,"internal-error"),this.displayName=i.displayName,this.photoURL=i.photoURL,this.email=i.email,this.emailVerified=i.emailVerified,this.phoneNumber=i.phoneNumber,this.isAnonymous=i.isAnonymous,this.tenantId=i.tenantId,this.providerData=i.providerData.map(r=>({...r})),this.metadata._copy(i.metadata),this.stsTokenManager._assign(i.stsTokenManager))}_clone(i){const r=new li({...this,auth:i,stsTokenManager:this.stsTokenManager._clone()});return r.metadata._copy(this.metadata),r}_onReload(i){tt(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=i,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(i){this.reloadListener?this.reloadListener(i):this.reloadUserInfo=i}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(i,r=!1){let l=!1;i.idToken&&i.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(i),l=!0),r&&await rc(this),await this.auth._persistUserIfCurrent(this),l&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(Ua(this.auth.app))return Promise.reject(qo(this.auth));const i=await this.getIdToken();return await hf(this,oO(this.auth,{idToken:i})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(i=>({...i})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(i,r){const l=r.displayName??void 0,o=r.email??void 0,c=r.phoneNumber??void 0,u=r.photoURL??void 0,h=r.tenantId??void 0,m=r._redirectEventId??void 0,p=r.createdAt??void 0,b=r.lastLoginAt??void 0,{uid:y,emailVerified:E,isAnonymous:x,providerData:k,stsTokenManager:A}=r;tt(y&&A,i,"internal-error");const C=Ha.fromJSON(this.name,A);tt(typeof y=="string",i,"internal-error"),cr(l,i.name),cr(o,i.name),tt(typeof E=="boolean",i,"internal-error"),tt(typeof x=="boolean",i,"internal-error"),cr(c,i.name),cr(u,i.name),cr(h,i.name),cr(m,i.name),cr(p,i.name),cr(b,i.name);const S=new li({uid:y,auth:i,email:o,emailVerified:E,displayName:l,isAnonymous:x,photoURL:u,phoneNumber:c,tenantId:h,stsTokenManager:C,createdAt:p,lastLoginAt:b});return k&&Array.isArray(k)&&(S.providerData=k.map(U=>({...U}))),m&&(S._redirectEventId=m),S}static async _fromIdTokenResponse(i,r,l=!1){const o=new Ha;o.updateFromServerResponse(r);const c=new li({uid:r.localId,auth:i,stsTokenManager:o,isAnonymous:l});return await rc(c),c}static async _fromGetAccountInfoResponse(i,r,l){const o=r.users[0];tt(o.localId!==void 0,"internal-error");const c=o.providerUserInfo!==void 0?lx(o.providerUserInfo):[],u=!(o.email&&o.passwordHash)&&!(c!=null&&c.length),h=new Ha;h.updateFromIdToken(l);const m=new li({uid:o.localId,auth:i,stsTokenManager:h,isAnonymous:u}),p={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:c,metadata:new pf(o.createdAt,o.lastLoginAt),isAnonymous:!(o.email&&o.passwordHash)&&!(c!=null&&c.length)};return Object.assign(m,p),m}}/**
610
- * @license
611
- * Copyright 2020 Google LLC
612
- *
613
- * Licensed under the Apache License, Version 2.0 (the "License");
614
- * you may not use this file except in compliance with the License.
615
- * You may obtain a copy of the License at
616
- *
617
- * http://www.apache.org/licenses/LICENSE-2.0
618
- *
619
- * Unless required by applicable law or agreed to in writing, software
620
- * distributed under the License is distributed on an "AS IS" BASIS,
621
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
622
- * See the License for the specific language governing permissions and
623
- * limitations under the License.
624
- */const Qb=new Map;function zr(t){nc(t instanceof Function,"Expected a class definition");let i=Qb.get(t);return i?(nc(i instanceof t,"Instance stored in cache mismatched with class"),i):(i=new t,Qb.set(t,i),i)}/**
625
- * @license
626
- * Copyright 2019 Google LLC
627
- *
628
- * Licensed under the Apache License, Version 2.0 (the "License");
629
- * you may not use this file except in compliance with the License.
630
- * You may obtain a copy of the License at
631
- *
632
- * http://www.apache.org/licenses/LICENSE-2.0
633
- *
634
- * Unless required by applicable law or agreed to in writing, software
635
- * distributed under the License is distributed on an "AS IS" BASIS,
636
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
637
- * See the License for the specific language governing permissions and
638
- * limitations under the License.
639
- */class sx{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(i,r){this.storage[i]=r}async _get(i){const r=this.storage[i];return r===void 0?null:r}async _remove(i){delete this.storage[i]}_addListener(i,r){}_removeListener(i,r){}}sx.type="NONE";const Jb=sx;/**
640
- * @license
641
- * Copyright 2019 Google LLC
642
- *
643
- * Licensed under the Apache License, Version 2.0 (the "License");
644
- * you may not use this file except in compliance with the License.
645
- * You may obtain a copy of the License at
646
- *
647
- * http://www.apache.org/licenses/LICENSE-2.0
648
- *
649
- * Unless required by applicable law or agreed to in writing, software
650
- * distributed under the License is distributed on an "AS IS" BASIS,
651
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
652
- * See the License for the specific language governing permissions and
653
- * limitations under the License.
654
- */function qd(t,i,r){return`firebase:${t}:${i}:${r}`}class Fa{constructor(i,r,l){this.persistence=i,this.auth=r,this.userKey=l;const{config:o,name:c}=this.auth;this.fullUserKey=qd(this.userKey,o.apiKey,c),this.fullPersistenceKey=qd("persistence",o.apiKey,c),this.boundEventHandler=r._onStorageEvent.bind(r),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(i){return this.persistence._set(this.fullUserKey,i.toJSON())}async getCurrentUser(){const i=await this.persistence._get(this.fullUserKey);if(!i)return null;if(typeof i=="string"){const r=await ic(this.auth,{idToken:i}).catch(()=>{});return r?li._fromGetAccountInfoResponse(this.auth,r,i):null}return li._fromJSON(this.auth,i)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(i){if(this.persistence===i)return;const r=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=i,r)return this.setCurrentUser(r)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(i,r,l="authUser"){if(!r.length)return new Fa(zr(Jb),i,l);const o=(await Promise.all(r.map(async p=>{if(await p._isAvailable())return p}))).filter(p=>p);let c=o[0]||zr(Jb);const u=qd(l,i.config.apiKey,i.name);let h=null;for(const p of r)try{const b=await p._get(u);if(b){let y;if(typeof b=="string"){const E=await ic(i,{idToken:b}).catch(()=>{});if(!E)break;y=await li._fromGetAccountInfoResponse(i,E,b)}else y=li._fromJSON(i,b);p!==c&&(h=y),c=p;break}}catch{}const m=o.filter(p=>p._shouldAllowMigration);return!c._shouldAllowMigration||!m.length?new Fa(c,i,l):(c=m[0],h&&await c._set(u,h.toJSON()),await Promise.all(r.map(async p=>{if(p!==c)try{await p._remove(u)}catch{}})),new Fa(c,i,l))}}/**
655
- * @license
656
- * Copyright 2020 Google LLC
657
- *
658
- * Licensed under the Apache License, Version 2.0 (the "License");
659
- * you may not use this file except in compliance with the License.
660
- * You may obtain a copy of the License at
661
- *
662
- * http://www.apache.org/licenses/LICENSE-2.0
663
- *
664
- * Unless required by applicable law or agreed to in writing, software
665
- * distributed under the License is distributed on an "AS IS" BASIS,
666
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
667
- * See the License for the specific language governing permissions and
668
- * limitations under the License.
669
- */function Wb(t){const i=t.toLowerCase();if(i.includes("opera/")||i.includes("opr/")||i.includes("opios/"))return"Opera";if(vO(i))return"IEMobile";if(i.includes("msie")||i.includes("trident/"))return"IE";if(i.includes("edge/"))return"Edge";if(gO(i))return"Firefox";if(i.includes("silk/"))return"Silk";if(EO(i))return"Blackberry";if(_O(i))return"Webos";if(bO(i))return"Safari";if((i.includes("chrome/")||yO(i))&&!i.includes("edge/"))return"Chrome";if(xO(i))return"Android";{const r=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,l=t.match(r);if((l==null?void 0:l.length)===2)return l[1]}return"Other"}function gO(t=si()){return/firefox\//i.test(t)}function bO(t=si()){const i=t.toLowerCase();return i.includes("safari/")&&!i.includes("chrome/")&&!i.includes("crios/")&&!i.includes("android")}function yO(t=si()){return/crios\//i.test(t)}function vO(t=si()){return/iemobile/i.test(t)}function xO(t=si()){return/android/i.test(t)}function EO(t=si()){return/blackberry/i.test(t)}function _O(t=si()){return/webos/i.test(t)}/**
670
- * @license
671
- * Copyright 2020 Google LLC
672
- *
673
- * Licensed under the Apache License, Version 2.0 (the "License");
674
- * you may not use this file except in compliance with the License.
675
- * You may obtain a copy of the License at
676
- *
677
- * http://www.apache.org/licenses/LICENSE-2.0
678
- *
679
- * Unless required by applicable law or agreed to in writing, software
680
- * distributed under the License is distributed on an "AS IS" BASIS,
681
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
682
- * See the License for the specific language governing permissions and
683
- * limitations under the License.
684
- */function ox(t,i=[]){let r;switch(t){case"Browser":r=Wb(si());break;case"Worker":r=`${Wb(si())}-${t}`;break;default:r=t}const l=i.length?i.join(","):"FirebaseCore-web";return`${r}/JsCore/${Ff}/${l}`}/**
685
- * @license
686
- * Copyright 2022 Google LLC
687
- *
688
- * Licensed under the Apache License, Version 2.0 (the "License");
689
- * you may not use this file except in compliance with the License.
690
- * You may obtain a copy of the License at
691
- *
692
- * http://www.apache.org/licenses/LICENSE-2.0
693
- *
694
- * Unless required by applicable law or agreed to in writing, software
695
- * distributed under the License is distributed on an "AS IS" BASIS,
696
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
697
- * See the License for the specific language governing permissions and
698
- * limitations under the License.
699
- */class SO{constructor(i){this.auth=i,this.queue=[]}pushCallback(i,r){const l=c=>new Promise((u,h)=>{try{const m=i(c);u(m)}catch(m){h(m)}});l.onAbort=r,this.queue.push(l);const o=this.queue.length-1;return()=>{this.queue[o]=()=>Promise.resolve()}}async runMiddleware(i){if(this.auth.currentUser===i)return;const r=[];try{for(const l of this.queue)await l(i),l.onAbort&&r.push(l.onAbort)}catch(l){r.reverse();for(const o of r)try{o()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:l==null?void 0:l.message})}}}/**
700
- * @license
701
- * Copyright 2023 Google LLC
702
- *
703
- * Licensed under the Apache License, Version 2.0 (the "License");
704
- * you may not use this file except in compliance with the License.
705
- * You may obtain a copy of the License at
706
- *
707
- * http://www.apache.org/licenses/LICENSE-2.0
708
- *
709
- * Unless required by applicable law or agreed to in writing, software
710
- * distributed under the License is distributed on an "AS IS" BASIS,
711
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
712
- * See the License for the specific language governing permissions and
713
- * limitations under the License.
714
- */async function kO(t,i={}){return dc(t,"GET","/v2/passwordPolicy",nx(t,i))}/**
715
- * @license
716
- * Copyright 2023 Google LLC
717
- *
718
- * Licensed under the Apache License, Version 2.0 (the "License");
719
- * you may not use this file except in compliance with the License.
720
- * You may obtain a copy of the License at
721
- *
722
- * http://www.apache.org/licenses/LICENSE-2.0
723
- *
724
- * Unless required by applicable law or agreed to in writing, software
725
- * distributed under the License is distributed on an "AS IS" BASIS,
726
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
727
- * See the License for the specific language governing permissions and
728
- * limitations under the License.
729
- */const NO=6;class wO{constructor(i){var l;const r=i.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=r.minPasswordLength??NO,r.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=r.maxPasswordLength),r.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=r.containsLowercaseCharacter),r.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=r.containsUppercaseCharacter),r.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=r.containsNumericCharacter),r.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=r.containsNonAlphanumericCharacter),this.enforcementState=i.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=((l=i.allowedNonAlphanumericCharacters)==null?void 0:l.join(""))??"",this.forceUpgradeOnSignin=i.forceUpgradeOnSignin??!1,this.schemaVersion=i.schemaVersion}validatePassword(i){const r={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(i,r),this.validatePasswordCharacterOptions(i,r),r.isValid&&(r.isValid=r.meetsMinPasswordLength??!0),r.isValid&&(r.isValid=r.meetsMaxPasswordLength??!0),r.isValid&&(r.isValid=r.containsLowercaseLetter??!0),r.isValid&&(r.isValid=r.containsUppercaseLetter??!0),r.isValid&&(r.isValid=r.containsNumericCharacter??!0),r.isValid&&(r.isValid=r.containsNonAlphanumericCharacter??!0),r}validatePasswordLengthOptions(i,r){const l=this.customStrengthOptions.minPasswordLength,o=this.customStrengthOptions.maxPasswordLength;l&&(r.meetsMinPasswordLength=i.length>=l),o&&(r.meetsMaxPasswordLength=i.length<=o)}validatePasswordCharacterOptions(i,r){this.updatePasswordCharacterOptionsStatuses(r,!1,!1,!1,!1);let l;for(let o=0;o<i.length;o++)l=i.charAt(o),this.updatePasswordCharacterOptionsStatuses(r,l>="a"&&l<="z",l>="A"&&l<="Z",l>="0"&&l<="9",this.allowedNonAlphanumericCharacters.includes(l))}updatePasswordCharacterOptionsStatuses(i,r,l,o,c){this.customStrengthOptions.containsLowercaseLetter&&(i.containsLowercaseLetter||(i.containsLowercaseLetter=r)),this.customStrengthOptions.containsUppercaseLetter&&(i.containsUppercaseLetter||(i.containsUppercaseLetter=l)),this.customStrengthOptions.containsNumericCharacter&&(i.containsNumericCharacter||(i.containsNumericCharacter=o)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(i.containsNonAlphanumericCharacter||(i.containsNonAlphanumericCharacter=c))}}/**
730
- * @license
731
- * Copyright 2020 Google LLC
732
- *
733
- * Licensed under the Apache License, Version 2.0 (the "License");
734
- * you may not use this file except in compliance with the License.
735
- * You may obtain a copy of the License at
736
- *
737
- * http://www.apache.org/licenses/LICENSE-2.0
738
- *
739
- * Unless required by applicable law or agreed to in writing, software
740
- * distributed under the License is distributed on an "AS IS" BASIS,
741
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
742
- * See the License for the specific language governing permissions and
743
- * limitations under the License.
744
- */class TO{constructor(i,r,l,o){this.app=i,this.heartbeatServiceProvider=r,this.appCheckServiceProvider=l,this.config=o,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new ey(this),this.idTokenSubscription=new ey(this),this.beforeStateQueue=new SO(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Jv,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=i.name,this.clientVersion=o.sdkClientVersion,this._persistenceManagerAvailable=new Promise(c=>this._resolvePersistenceManagerAvailable=c)}_initializeWithPersistence(i,r){return r&&(this._popupRedirectResolver=zr(r)),this._initializationPromise=this.queue(async()=>{var l,o,c;if(!this._deleted&&(this.persistenceManager=await Fa.create(this,i),(l=this._resolvePersistenceManagerAvailable)==null||l.call(this),!this._deleted)){if((o=this._popupRedirectResolver)!=null&&o._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(r),this.lastNotifiedUid=((c=this.currentUser)==null?void 0:c.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const i=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!i)){if(this.currentUser&&i&&this.currentUser.uid===i.uid){this._currentUser._assign(i),await this.currentUser.getIdToken();return}await this._updateCurrentUser(i,!0)}}async initializeCurrentUserFromIdToken(i){try{const r=await ic(this,{idToken:i}),l=await li._fromGetAccountInfoResponse(this,r,i);await this.directlySetCurrentUser(l)}catch(r){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",r),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(i){var c;if(Ua(this.app)){const u=this.app.settings.authIdToken;return u?new Promise(h=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(u).then(h,h))}):this.directlySetCurrentUser(null)}const r=await this.assertedPersistence.getCurrentUser();let l=r,o=!1;if(i&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const u=(c=this.redirectUser)==null?void 0:c._redirectEventId,h=l==null?void 0:l._redirectEventId,m=await this.tryRedirectSignIn(i);(!u||u===h)&&(m!=null&&m.user)&&(l=m.user,o=!0)}if(!l)return this.directlySetCurrentUser(null);if(!l._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(l)}catch(u){l=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(u))}return l?this.reloadAndSetCurrentUserOrClear(l):this.directlySetCurrentUser(null)}return tt(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===l._redirectEventId?this.directlySetCurrentUser(l):this.reloadAndSetCurrentUserOrClear(l)}async tryRedirectSignIn(i){let r=null;try{r=await this._popupRedirectResolver._completeRedirectFn(this,i,!0)}catch{await this._setRedirectUser(null)}return r}async reloadAndSetCurrentUserOrClear(i){try{await rc(i)}catch(r){if((r==null?void 0:r.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(i)}useDeviceLanguage(){this.languageCode=nO()}async _delete(){this._deleted=!0}async updateCurrentUser(i){if(Ua(this.app))return Promise.reject(qo(this));const r=i?uc(i):null;return r&&tt(r.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(r&&r._clone(this))}async _updateCurrentUser(i,r=!1){if(!this._deleted)return i&&tt(this.tenantId===i.tenantId,this,"tenant-id-mismatch"),r||await this.beforeStateQueue.runMiddleware(i),this.queue(async()=>{await this.directlySetCurrentUser(i),this.notifyAuthListeners()})}async signOut(){return Ua(this.app)?Promise.reject(qo(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(i){return Ua(this.app)?Promise.reject(qo(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(zr(i))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(i){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const r=this._getPasswordPolicyInternal();return r.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):r.validatePassword(i)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const i=await kO(this),r=new wO(i);this.tenantId===null?this._projectPasswordPolicy=r:this._tenantPasswordPolicies[this.tenantId]=r}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(i){this._errorFactory=new ds("auth","Firebase",i())}onAuthStateChanged(i,r,l){return this.registerStateListener(this.authStateSubscription,i,r,l)}beforeAuthStateChanged(i,r){return this.beforeStateQueue.pushCallback(i,r)}onIdTokenChanged(i,r,l){return this.registerStateListener(this.idTokenSubscription,i,r,l)}authStateReady(){return new Promise((i,r)=>{if(this.currentUser)i();else{const l=this.onAuthStateChanged(()=>{l(),i()},r)}})}async revokeAccessToken(i){if(this.currentUser){const r=await this.currentUser.getIdToken(),l={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:i,idToken:r};this.tenantId!=null&&(l.tenantId=this.tenantId),await mO(this,l)}}toJSON(){var i;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(i=this._currentUser)==null?void 0:i.toJSON()}}async _setRedirectUser(i,r){const l=await this.getOrInitRedirectPersistenceManager(r);return i===null?l.removeCurrentUser():l.setCurrentUser(i)}async getOrInitRedirectPersistenceManager(i){if(!this.redirectPersistenceManager){const r=i&&zr(i)||this._popupRedirectResolver;tt(r,this,"argument-error"),this.redirectPersistenceManager=await Fa.create(this,[zr(r._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(i){var r,l;return this._isInitialized&&await this.queue(async()=>{}),((r=this._currentUser)==null?void 0:r._redirectEventId)===i?this._currentUser:((l=this.redirectUser)==null?void 0:l._redirectEventId)===i?this.redirectUser:null}async _persistUserIfCurrent(i){if(i===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(i))}_notifyListenersIfCurrent(i){i===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var r;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const i=((r=this.currentUser)==null?void 0:r.uid)??null;this.lastNotifiedUid!==i&&(this.lastNotifiedUid=i,this.authStateSubscription.next(this.currentUser))}registerStateListener(i,r,l,o){if(this._deleted)return()=>{};const c=typeof r=="function"?r:r.next.bind(r);let u=!1;const h=this._isInitialized?Promise.resolve():this._initializationPromise;if(tt(h,this,"internal-error"),h.then(()=>{u||c(this.currentUser)}),typeof r=="function"){const m=i.addObserver(r,l,o);return()=>{u=!0,m()}}else{const m=i.addObserver(r);return()=>{u=!0,m()}}}async directlySetCurrentUser(i){this.currentUser&&this.currentUser!==i&&this._currentUser._stopProactiveRefresh(),i&&this.isProactiveRefreshEnabled&&i._startProactiveRefresh(),this.currentUser=i,i?await this.assertedPersistence.setCurrentUser(i):await this.assertedPersistence.removeCurrentUser()}queue(i){return this.operations=this.operations.then(i,i),this.operations}get assertedPersistence(){return tt(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(i){!i||this.frameworks.includes(i)||(this.frameworks.push(i),this.frameworks.sort(),this.clientVersion=ox(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var o;const i={"X-Client-Version":this.clientVersion};this.app.options.appId&&(i["X-Firebase-gmpid"]=this.app.options.appId);const r=await((o=this.heartbeatServiceProvider.getImmediate({optional:!0}))==null?void 0:o.getHeartbeatsHeader());r&&(i["X-Firebase-Client"]=r);const l=await this._getAppCheckToken();return l&&(i["X-Firebase-AppCheck"]=l),i}async _getAppCheckToken(){var r;if(Ua(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const i=await((r=this.appCheckServiceProvider.getImmediate({optional:!0}))==null?void 0:r.getToken());return i!=null&&i.error&&W2(`Error while retrieving App Check token: ${i.error}`),i==null?void 0:i.token}}function AO(t){return uc(t)}class ey{constructor(i){this.auth=i,this.observer=null,this.addObserver=GC(r=>this.observer=r)}get next(){return tt(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function CO(t,i){const r=(i==null?void 0:i.persistence)||[],l=(Array.isArray(r)?r:[r]).map(zr);i!=null&&i.errorMap&&t._updateErrorMap(i.errorMap),t._initializeWithPersistence(l,i==null?void 0:i.popupRedirectResolver)}new fs(3e4,6e4);/**
745
- * @license
746
- * Copyright 2020 Google LLC
747
- *
748
- * Licensed under the Apache License, Version 2.0 (the "License");
749
- * you may not use this file except in compliance with the License.
750
- * You may obtain a copy of the License at
751
- *
752
- * http://www.apache.org/licenses/LICENSE-2.0
753
- *
754
- * Unless required by applicable law or agreed to in writing, software
755
- * distributed under the License is distributed on an "AS IS" BASIS,
756
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
757
- * See the License for the specific language governing permissions and
758
- * limitations under the License.
759
- */new fs(2e3,1e4);/**
760
- * @license
761
- * Copyright 2020 Google LLC.
762
- *
763
- * Licensed under the Apache License, Version 2.0 (the "License");
764
- * you may not use this file except in compliance with the License.
765
- * You may obtain a copy of the License at
766
- *
767
- * http://www.apache.org/licenses/LICENSE-2.0
768
- *
769
- * Unless required by applicable law or agreed to in writing, software
770
- * distributed under the License is distributed on an "AS IS" BASIS,
771
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
772
- * See the License for the specific language governing permissions and
773
- * limitations under the License.
774
- */new fs(3e4,6e4);/**
775
- * @license
776
- * Copyright 2020 Google LLC.
777
- *
778
- * Licensed under the Apache License, Version 2.0 (the "License");
779
- * you may not use this file except in compliance with the License.
780
- * You may obtain a copy of the License at
781
- *
782
- * http://www.apache.org/licenses/LICENSE-2.0
783
- *
784
- * Unless required by applicable law or agreed to in writing, software
785
- * distributed under the License is distributed on an "AS IS" BASIS,
786
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
787
- * See the License for the specific language governing permissions and
788
- * limitations under the License.
789
- */new fs(5e3,15e3);var ty="@firebase/auth",ny="1.12.0";/**
790
- * @license
791
- * Copyright 2020 Google LLC
792
- *
793
- * Licensed under the Apache License, Version 2.0 (the "License");
794
- * you may not use this file except in compliance with the License.
795
- * You may obtain a copy of the License at
796
- *
797
- * http://www.apache.org/licenses/LICENSE-2.0
798
- *
799
- * Unless required by applicable law or agreed to in writing, software
800
- * distributed under the License is distributed on an "AS IS" BASIS,
801
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
802
- * See the License for the specific language governing permissions and
803
- * limitations under the License.
804
- */class OO{constructor(i){this.auth=i,this.internalListeners=new Map}getUid(){var i;return this.assertAuthConfigured(),((i=this.auth.currentUser)==null?void 0:i.uid)||null}async getToken(i){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(i)}:null}addAuthTokenListener(i){if(this.assertAuthConfigured(),this.internalListeners.has(i))return;const r=this.auth.onIdTokenChanged(l=>{i((l==null?void 0:l.stsTokenManager.accessToken)||null)});this.internalListeners.set(i,r),this.updateProactiveRefresh()}removeAuthTokenListener(i){this.assertAuthConfigured();const r=this.internalListeners.get(i);r&&(this.internalListeners.delete(i),r(),this.updateProactiveRefresh())}assertAuthConfigured(){tt(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
805
- * @license
806
- * Copyright 2020 Google LLC
807
- *
808
- * Licensed under the Apache License, Version 2.0 (the "License");
809
- * you may not use this file except in compliance with the License.
810
- * You may obtain a copy of the License at
811
- *
812
- * http://www.apache.org/licenses/LICENSE-2.0
813
- *
814
- * Unless required by applicable law or agreed to in writing, software
815
- * distributed under the License is distributed on an "AS IS" BASIS,
816
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
817
- * See the License for the specific language governing permissions and
818
- * limitations under the License.
819
- */function MO(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function RO(t){rs(new is("auth",(i,{options:r})=>{const l=i.getProvider("app").getImmediate(),o=i.getProvider("heartbeat"),c=i.getProvider("app-check-internal"),{apiKey:u,authDomain:h}=l.options;tt(u&&!u.includes(":"),"invalid-api-key",{appName:l.name});const m={apiKey:u,authDomain:h,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ox(t)},p=new TO(l,o,c,m);return CO(p,r),p},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((i,r,l)=>{i.getProvider("auth-internal").initialize()})),rs(new is("auth-internal",i=>{const r=AO(i.getProvider("auth").getImmediate());return(l=>new OO(l))(r)},"PRIVATE").setInstantiationMode("EXPLICIT")),ja(ty,ny,MO(t)),ja(ty,ny,"esm2020")}/**
820
- * @license
821
- * Copyright 2021 Google LLC
822
- *
823
- * Licensed under the Apache License, Version 2.0 (the "License");
824
- * you may not use this file except in compliance with the License.
825
- * You may obtain a copy of the License at
826
- *
827
- * http://www.apache.org/licenses/LICENSE-2.0
828
- *
829
- * Unless required by applicable law or agreed to in writing, software
830
- * distributed under the License is distributed on an "AS IS" BASIS,
831
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
832
- * See the License for the specific language governing permissions and
833
- * limitations under the License.
834
- */const DO=300;DC("authIdTokenMaxAge");RO("Browser");function IO(){return!1}function LO(){const t=hr(),[i,r]=V.useState(!1),[l,o]=V.useState(""),[c,u]=V.useState(""),[h,m]=V.useState(""),[p,b]=V.useState(""),[y,E]=V.useState(!1),[x,k]=V.useState(null),A=IO(),C=y||!!x,S=I=>{yf(I.token),t({type:"SET_USER",user:{id:I.id,email:I.email,displayName:I.displayName}})},U=async I=>{I.preventDefault(),b(""),E(!0);try{let G;i?(oe.info("Auth",`Registering new account: ${l}`),G=await Yd.register(l,c,h||void 0)):(oe.info("Auth",`Logging in: ${l}`),G=await Yd.login(l,c)),oe.info("Auth",`${i?"Register":"Login"} success — user ${G.id} (${G.email})`),S(G)}catch(G){const re=G instanceof Error?G.message:"Something went wrong";oe.error("Auth",`${i?"Register":"Login"} failed: ${re}`),b(re)}finally{E(!1)}};return g.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{background:"var(--bg-secondary)"},children:g.jsxs("div",{className:"w-full max-w-md",children:[g.jsxs("div",{className:"text-center mb-8",children:[g.jsx("img",{src:"/botschat-logo.png",alt:"BotsChat",className:"inline-block w-16 h-16 mb-4"}),g.jsx("h1",{className:"text-3xl font-bold",style:{color:"var(--text-primary)"},children:"BotsChat"}),g.jsx("p",{className:"mt-2",style:{color:"var(--text-secondary)"},children:"Multi-channel AI chat powered by OpenClaw"})]}),g.jsxs("div",{className:"rounded-md p-8",style:{background:"var(--bg-surface)",boxShadow:"var(--shadow-lg)"},children:[g.jsx("h2",{className:"text-h1 mb-6",style:{color:"var(--text-primary)"},children:i?"Create account":"Sign in"}),A,g.jsxs("form",{onSubmit:U,className:"space-y-4",children:[i&&g.jsxs("div",{children:[g.jsx("label",{className:"block text-caption font-bold mb-1",style:{color:"var(--text-secondary)"},children:"Display Name"}),g.jsx("input",{type:"text",value:h,onChange:I=>m(I.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"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-caption font-bold mb-1",style:{color:"var(--text-secondary)"},children:"Email"}),g.jsx("input",{type:"email",value:l,onChange:I=>o(I.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"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-caption font-bold mb-1",style:{color:"var(--text-secondary)"},children:"Password"}),g.jsx("input",{type:"password",value:c,onChange:I=>u(I.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"})]}),p&&g.jsx("div",{className:"text-caption px-3 py-2 rounded-sm",style:{background:"rgba(224,30,90,0.1)",color:"var(--accent-red)"},children:p}),g.jsx("button",{type:"submit",disabled:C,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:y?"...":i?"Create account":"Sign in with email"})]}),g.jsx("div",{className:"mt-6 text-center",children:g.jsx("button",{onClick:()=>{r(!i),b("")},className:"text-caption hover:underline",style:{color:"var(--text-link)"},children:i?"Already have an account? Sign in":"Don't have an account? Register"})})]})]})})}function UO({text:t}){const[i,r]=V.useState(!1),l=async()=>{try{await navigator.clipboard.writeText(t),r(!0),setTimeout(()=>r(!1),2e3)}catch{const o=document.createElement("textarea");o.value=t,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o),r(!0),setTimeout(()=>r(!1),2e3)}};return g.jsx("button",{onClick:l,className:"shrink-0 px-2.5 py-1 text-tiny font-medium rounded-sm transition-colors",style:{background:i?"var(--accent-green)":"var(--bg-hover)",color:i?"#fff":"var(--text-secondary)"},children:i?"Copied!":"Copy"})}function Fo({code:t,multiline:i}){return g.jsxs("div",{className:"flex items-start gap-2 rounded-md px-3 py-2.5",style:{background:"var(--code-bg)",border:"1px solid var(--border)"},children:[g.jsx("pre",{className:"flex-1 text-caption font-mono overflow-x-auto whitespace-pre-wrap break-all",style:{color:"var(--text-primary)"},children:t}),g.jsx(UO,{text:t})]})}function BO({color:t}){return g.jsxs("span",{className:"relative flex h-3 w-3",children:[g.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:t}}),g.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3",style:{backgroundColor:t}})]})}function zO({onSkip:t}){const i=Mi(),[r,l]=V.useState(null),[o,c]=V.useState(!0),[u,h]=V.useState(typeof window<"u"?window.location.origin:"https://console.botschat.app"),[m,p]=V.useState(!1),[b,y]=V.useState(),[E,x]=V.useState(!1);V.useEffect(()=>{let C=!1;async function S(){try{const U=await B0.cloudUrl();if(C)return;h(U.cloudUrl),p(U.isLoopback),y(U.hint)}catch(U){oe.warn("Onboarding",`Failed to fetch cloudUrl, using origin: ${U}`);const I=window.location.hostname,G=I==="localhost"||I.startsWith("127.");p(G),G&&y("This URL (localhost) only works on this machine. If your OpenClaw is on a different host, replace with its LAN IP.")}}return S(),()=>{C=!0}},[]),V.useEffect(()=>{let C=!1;async function S(){c(!0);try{const{tokens:U}=await vd.list();if(C)return;if(U.length>0){oe.info("Onboarding",`Found ${U.length} existing pairing tokens`);const{token:I}=await vd.create("Onboarding setup");C||l(I)}else{oe.info("Onboarding","No pairing tokens found, creating one");const{token:I}=await vd.create("Default");C||l(I)}}catch(U){oe.error("Onboarding",`Failed to get pairing token: ${U}`)}finally{C||c(!1)}}return S(),()=>{C=!0}},[]);const k=r?`openclaw plugins install @botschat/openclaw-plugin && \\
835
- openclaw config set channels.botschat.cloudUrl ${u} && \\
836
- openclaw config set channels.botschat.pairingToken ${r} && \\
837
- openclaw config set channels.botschat.enabled true && \\
838
- openclaw gateway restart`:"Loading...",A=i.openclawConnected;return g.jsx("div",{className:"min-h-screen flex items-center justify-center p-4",style:{background:"var(--bg-secondary)"},children:g.jsxs("div",{className:"w-full max-w-xl",children:[g.jsxs("div",{className:"text-center mb-8",children:[g.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"}),g.jsx("h1",{className:"text-3xl font-bold",style:{color:"var(--text-primary)"},children:"Welcome to BotsChat!"}),g.jsx("p",{className:"mt-2",style:{color:"var(--text-secondary)"},children:"Connect your OpenClaw agent to start chatting."})]}),g.jsx("div",{className:"rounded-md p-8",style:{background:"var(--bg-surface)",boxShadow:"var(--shadow-lg)"},children:A?g.jsxs("div",{className:"text-center py-6",children:[g.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full mb-4",style:{background:"rgba(43, 172, 118, 0.15)"},children:g.jsx("svg",{className:"w-8 h-8",fill:"none",viewBox:"0 0 24 24",stroke:"var(--accent-green)",strokeWidth:2.5,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),g.jsx("h2",{className:"text-h1 font-bold mb-2",style:{color:"var(--text-primary)"},children:"OpenClaw Connected!"}),g.jsx("p",{className:"text-body mb-6",style:{color:"var(--text-secondary)"},children:"Your agent is ready. Start chatting now."}),g.jsx("button",{onClick:t,className:"px-6 py-2.5 font-bold text-body text-white rounded-sm transition-colors hover:brightness-110",style:{background:"var(--bg-active)"},children:"Start Chatting"})]}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex items-center gap-3 rounded-md px-4 py-3 mb-6",style:{background:"rgba(232, 162, 48, 0.1)",border:"1px solid rgba(232, 162, 48, 0.3)"},children:[g.jsx(BO,{color:"var(--accent-yellow)"}),g.jsx("span",{className:"text-caption font-medium",style:{color:"var(--accent-yellow)"},children:"Waiting for OpenClaw connection..."})]}),g.jsxs("div",{className:"mb-6",children:[g.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[g.jsx("span",{className:"inline-flex items-center justify-center w-6 h-6 rounded-full text-tiny font-bold text-white",style:{background:"var(--bg-active)"},children:"1"}),g.jsx("h3",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:"Run this command on your OpenClaw machine"})]}),g.jsx("p",{className:"text-caption mb-3 ml-8",style:{color:"var(--text-secondary)"},children:"This installs the BotsChat plugin, configures the connection, and restarts the gateway."}),m&&g.jsxs("div",{className:"flex items-start gap-2 rounded-md px-3 py-2.5 mb-3 ml-8 text-caption",style:{background:"rgba(232, 162, 48, 0.1)",border:"1px solid rgba(232, 162, 48, 0.25)",color:"var(--accent-yellow)"},children:[g.jsx("svg",{className:"w-4 h-4 mt-0.5 shrink-0",viewBox:"0 0 20 20",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.168 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 6a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 6zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),g.jsxs("span",{children:[b||"localhost URL may not be reachable from other machines."," ",g.jsx("button",{onClick:()=>x(!0),className:"underline font-medium hover:brightness-110",style:{color:"var(--text-link)"},children:"Change URL"})]})]}),E&&g.jsxs("div",{className:"flex items-center gap-2 mb-3 ml-8",children:[g.jsx("label",{className:"text-caption font-bold shrink-0",style:{color:"var(--text-secondary)"},children:"Cloud URL:"}),g.jsx("input",{type:"text",value:u,onChange:C=>{h(C.target.value.replace(/\/+$/,"")),p(!1)},className:"flex-1 px-2.5 py-1.5 rounded-sm text-caption font-mono",style:{background:"var(--code-bg)",border:"1px solid var(--border)",color:"var(--text-primary)",outline:"none"},placeholder:"http://192.168.x.x:8787",autoFocus:!0}),g.jsx("button",{onClick:()=>x(!1),className:"px-2.5 py-1 text-tiny font-medium rounded-sm",style:{background:"var(--bg-active)",color:"#fff"},children:"Done"})]}),g.jsx("div",{className:"ml-8",children:o?g.jsx("div",{className:"rounded-md px-3 py-2.5 animate-pulse",style:{background:"var(--code-bg)",height:"80px"}}):g.jsx(Fo,{code:k,multiline:!0})})]}),g.jsxs("div",{className:"mb-6",children:[g.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[g.jsx("span",{className:"inline-flex items-center justify-center w-6 h-6 rounded-full text-tiny font-bold text-white",style:{background:"var(--bg-active)"},children:"2"}),g.jsx("h3",{className:"text-body font-bold",style:{color:"var(--text-primary)"},children:"Verify connection"})]}),g.jsx("p",{className:"text-caption ml-8",style:{color:"var(--text-secondary)"},children:'Check the gateway logs — you should see "Authenticated with BotsChat cloud":'}),g.jsx("div",{className:"ml-8 mt-2",children:g.jsx(Fo,{code:"openclaw gateway logs"})})]}),g.jsxs("details",{className:"mb-4",children:[g.jsx("summary",{className:"text-caption font-medium cursor-pointer select-none",style:{color:"var(--text-link)"},children:"Or configure manually"}),g.jsxs("div",{className:"mt-3 space-y-3 ml-1",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-caption font-bold mb-1",style:{color:"var(--text-secondary)"},children:"Your Pairing Token"}),r?g.jsx(Fo,{code:r}):g.jsx("span",{className:"text-caption",style:{color:"var(--text-muted)"},children:"Loading..."})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-caption font-bold mb-1",style:{color:"var(--text-secondary)"},children:"Cloud URL"}),g.jsx(Fo,{code:u})]})]})]}),g.jsx("div",{className:"text-center pt-2",children:g.jsx("button",{onClick:t,className:"text-caption hover:underline",style:{color:"var(--text-muted)"},children:"Skip for now"})})]})})]})})}const cx={info:"var(--text-muted)",warn:"var(--accent-yellow)",error:"var(--accent-red)","ws-in":"#6BCB77","ws-out":"#4D96FF",api:"#C77DFF"},ux={info:"INF",warn:"WRN",error:"ERR","ws-in":"WS↓","ws-out":"WS↑",api:"API"};function jO(t){const i=new Date(t);return i.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})+"."+String(i.getMilliseconds()).padStart(3,"0")}function HO(){const t=V.useSyncExternalStore(D0,M0),[i,r]=V.useState(!1),[l,o]=V.useState("all"),[c,u]=V.useState(new Set),h=V.useRef(null),m=V.useRef(!0);V.useEffect(()=>{i&&m.current&&h.current&&(h.current.scrollTop=h.current.scrollHeight)},[t.length,i]);const p=()=>{if(!h.current)return;const{scrollTop:x,scrollHeight:k,clientHeight:A}=h.current;m.current=k-x-A<40},b=x=>{u(k=>{const A=new Set(k);return A.has(x)?A.delete(x):A.add(x),A})},y=l==="all"?t:t.filter(x=>x.level===l),E=t.length;return g.jsxs("div",{style:{flexShrink:0,fontFamily:"var(--font-mono)",fontSize:12,lineHeight:1.5},children:[g.jsxs("div",{onClick:()=>r(!i),style:{display:"flex",alignItems:"center",gap:8,padding:"3px 12px",background:"var(--bg-secondary)",borderTop:"1px solid var(--border)",cursor:"pointer",userSelect:"none"},children:[g.jsx("svg",{width:10,height:10,viewBox:"0 0 10 10",style:{transform:i?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s",flexShrink:0},children:g.jsx("path",{d:"M1 7L5 3l4 4",stroke:"var(--text-muted)",strokeWidth:1.5,fill:"none"})}),g.jsx("span",{style:{color:"var(--text-muted)",fontWeight:600,fontSize:11},children:"Debug Log"}),g.jsxs("span",{style:{color:"var(--text-muted)",fontSize:10},children:["(",E,")"]}),i&&g.jsx("div",{style:{display:"flex",gap:2,marginLeft:8},onClick:x=>x.stopPropagation(),children:["all","ws-in","ws-out","api","info","warn","error"].map(x=>g.jsx("button",{onClick:()=>o(x),style:{padding:"1px 6px",borderRadius:3,border:"none",fontSize:10,fontFamily:"var(--font-mono)",cursor:"pointer",background:l===x?"var(--bg-active)":"var(--bg-hover)",color:l===x?"#fff":x==="all"?"var(--text-muted)":cx[x]},children:x==="all"?"ALL":ux[x]},x))}),i&&g.jsx("button",{onClick:x=>{x.stopPropagation(),R0()},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"})]}),i&&g.jsxs("div",{ref:h,onScroll:p,style:{height:220,overflowY:"auto",overflowX:"hidden",background:"var(--bg-primary)",borderTop:"1px solid var(--border)"},children:[y.length===0&&g.jsx("div",{style:{padding:"16px 12px",color:"var(--text-muted)",textAlign:"center"},children:"No log entries yet."}),y.map(x=>g.jsx(FO,{entry:x,expanded:c.has(x.id),onToggleExpand:()=>b(x.id)},x.id))]})]})}function FO({entry:t,expanded:i,onToggleExpand:r}){const l=cx[t.level],o=ux[t.level];return g.jsxs("div",{style:{padding:"1px 12px",borderBottom:"1px solid var(--border)",wordBreak:"break-all"},onMouseEnter:c=>c.currentTarget.style.background="var(--bg-hover)",onMouseLeave:c=>c.currentTarget.style.background="",children:[g.jsxs("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[g.jsx("span",{style:{color:"var(--text-muted)",flexShrink:0,width:85},children:jO(t.ts)}),g.jsx("span",{style:{color:l,fontWeight:700,flexShrink:0,width:28,textAlign:"center"},children:o}),g.jsxs("span",{style:{color:"var(--text-secondary)",flexShrink:0,minWidth:50},children:["[",t.tag,"]"]}),g.jsx("span",{style:{color:"var(--text-primary)",flex:1},children:t.message}),t.detail&&g.jsx("button",{onClick:r,style:{border:"none",background:"none",cursor:"pointer",color:"var(--text-muted)",fontSize:10,padding:"0 4px",flexShrink:0},children:i?"▼":"▶"})]}),i&&t.detail&&g.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 PO(){const t=Mi(),i=hr(),r=l=>{i({type:"SELECT_CRON_TASK",taskId:l})};return g.jsxs("div",{className:"flex flex-col h-full",style:{width:220,minWidth:160,background:"var(--bg-secondary)",borderRight:"1px solid var(--border)"},children:[g.jsx("div",{className:"px-4 py-3 flex items-center gap-2",children:g.jsx("span",{className:"text-[--text-sidebar-active] font-bold text-h2 truncate flex-1",children:"Automations"})}),g.jsx("div",{className:"px-4 pb-2",children:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:t.openclawConnected?"var(--accent-green)":"var(--accent-red)"}}),g.jsx("span",{className:"text-tiny text-[--text-muted]",children:t.openclawConnected?"OpenClaw connected":"OpenClaw offline"})]})}),g.jsx("div",{className:"px-4 pb-2",children:g.jsxs("span",{className:"text-tiny text-[--text-muted]",children:[t.cronTasks.length," cron job",t.cronTasks.length!==1?"s":""]})}),g.jsx("div",{className:"flex-1 overflow-y-auto sidebar-scroll",children:t.cronTasks.length===0?g.jsxs("div",{className:"px-4 py-8 text-center",children:[g.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:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),g.jsx("p",{className:"text-caption text-[--text-muted]",children:"No automations yet."}),g.jsx("p",{className:"text-tiny text-[--text-muted] mt-1",children:"Cron jobs from OpenClaw will appear here automatically."})]}):t.cronTasks.map(l=>{const o=t.selectedCronTaskId===l.id,c=l.enabled;let u="var(--accent-green)";return c||(u="var(--text-muted)"),g.jsxs("button",{onClick:()=>r(l.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:h=>{o||(h.currentTarget.style.background="var(--sidebar-hover)")},onMouseLeave:h=>{o||(h.currentTarget.style.background=o?"var(--bg-hover)":"")},children:[g.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[g.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:u}}),g.jsx("span",{className:`text-body truncate ${o?"font-bold":""}`,children:l.name})]}),g.jsxs("div",{className:"flex items-center gap-2 mt-0.5 pl-4",children:[g.jsx("span",{className:"text-tiny truncate",style:{color:"var(--text-muted)"},children:l.schedule??"no schedule"}),!c&&g.jsx("span",{className:"text-tiny",style:{color:"var(--text-muted)"},children:"paused"})]})]},l.id)})})]})}function mf(t){if(!t)return null;const i=t.trim().toLowerCase(),r=i.match(/^every\s+(\d+(?:\.\d+)?)\s*(s|m|h)$/);if(r)return{kind:"every",intervalValue:parseFloat(r[1]),intervalUnit:r[2]};const l=i.match(/^at\s+(\d{1,2}:\d{2})$/);return l?{kind:"at",atTime:l[1].padStart(5,"0")}:null}function GO(t){return t.kind==="every"&&t.intervalValue&&t.intervalUnit?`every ${t.intervalValue}${t.intervalUnit}`:t.kind==="at"&&t.atTime?`at ${t.atTime}`:""}function $O({value:t,onChange:i,onSave:r,onCancel:l,saving:o}){const c=mf(t),[u,h]=V.useState((c==null?void 0:c.kind)??"every"),[m,p]=V.useState((c==null?void 0:c.intervalValue)??1),[b,y]=V.useState((c==null?void 0:c.intervalUnit)??"h"),[E,x]=V.useState((c==null?void 0:c.atTime)??"09:00");V.useEffect(()=>{const G=mf(t);G&&(h(G.kind),G.kind==="every"?(p(G.intervalValue??1),y(G.intervalUnit??"h")):x(G.atTime??"09:00"))},[t]);const k=V.useCallback((G,re,B,ae)=>{const fe=GO(G==="every"?{kind:"every",intervalValue:re,intervalUnit:B}:{kind:"at",atTime:ae});i(fe)},[i]),A=G=>{h(G),k(G,m,b,E)},C=G=>{const re=Math.max(1,Math.min(G,999));p(re),k(u,re,b,E)},S=G=>{y(G),k(u,m,G,E)},U=G=>{x(G),k(u,m,b,G)},I=G=>{G.key==="Escape"&&l(),G.key==="Enter"&&(G.preventDefault(),r())};return g.jsxs("div",{className:"flex flex-col gap-2",onKeyDown:I,children:[g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(iy,{active:u==="every",onClick:()=>A("every"),label:"Interval",icon:g.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.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"})})}),g.jsx(iy,{active:u==="at",onClick:()=>A("at"),label:"Daily at",icon:g.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})})})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[u==="every"?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-caption flex-shrink-0",style:{color:"var(--text-muted)"},children:"Every"}),g.jsx("input",{type:"number",min:1,max:999,value:m,onChange:G=>C(parseInt(G.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}),g.jsxs("div",{className:"flex items-center gap-0.5",children:[g.jsx(Vd,{active:b==="m",onClick:()=>S("m"),label:"min"}),g.jsx(Vd,{active:b==="h",onClick:()=>S("h"),label:"hr"}),g.jsx(Vd,{active:b==="s",onClick:()=>S("s"),label:"sec"})]})]}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-caption flex-shrink-0",style:{color:"var(--text-muted)"},children:"Daily at"}),g.jsx("input",{type:"time",value:E,onChange:G=>U(G.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})]}),g.jsxs("div",{className:"flex items-center gap-1 ml-auto flex-shrink-0",children:[g.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"}),g.jsx("button",{onClick:l,className:"px-2 py-1 text-tiny rounded-sm",style:{color:"var(--text-muted)"},children:"Cancel"})]})]}),g.jsx("div",{className:"text-tiny",style:{color:"var(--text-muted)"},children:u==="every"?`Runs every ${m} ${b==="h"?"hour":b==="m"?"minute":"second"}${m!==1?"s":""}`:`Runs daily at ${E}`})]})}function KO({schedule:t,onClick:i}){if(!t)return g.jsx("span",{className:"text-body cursor-pointer hover:underline",style:{color:"var(--text-muted)"},onClick:i,title:"Click to set schedule",children:"Not set"});const r=mf(t);return r?g.jsx("button",{className:"flex items-center gap-1.5 cursor-pointer group",onClick:i,title:"Click to edit schedule",children:r.kind==="every"?g.jsxs(g.Fragment,{children:[g.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:g.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"})}),g.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"]})]}):g.jsxs(g.Fragment,{children:[g.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:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),g.jsxs("span",{className:"text-body group-hover:underline",style:{color:"var(--text-primary)"},children:["Daily at ",r.atTime]})]})}):g.jsx("span",{className:"text-body cursor-pointer hover:underline",style:{color:"var(--text-primary)"},onClick:i,title:"Click to edit schedule",children:t})}function iy({active:t,onClick:i,label:r,icon:l}){return g.jsxs("button",{onClick:i,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:[l,r]})}function Vd({active:t,onClick:i,label:r}){return g.jsx("button",{onClick:i,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 ry(t){return new Date(t*1e3).toLocaleString()}function dx(t){switch(t){case"ok":return"OK";case"error":return"ERR";case"skipped":return"SKIP";case"running":return"RUN";default:return t.toUpperCase()}}function fx(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 qO(){const t=Mi(),i=hr(),r=t.cronTasks.find(j=>j.id===t.selectedCronTaskId),[l,o]=V.useState(null),[c,u]=V.useState(""),[h,m]=V.useState(!1),[p,b]=V.useState(!1),[y,E]=V.useState(!1),[x,k]=V.useState(!1),[A,C]=V.useState(!0),S=V.useRef(null);V.useEffect(()=>{o(null),b(!1)},[t.selectedCronTaskId]),V.useEffect(()=>{l&&S.current&&S.current.focus()},[l]);const U=V.useCallback(()=>{r&&(oe.info("Cron",`Loading jobs for task: ${r.name} (${r.id})`),Xd.listByTask(r.id).then(({jobs:j})=>{oe.info("Cron",`Loaded ${j.length} jobs for task ${r.name}`);const Z=I.current,D=new Map;for(const ee of Z)ee.summary&&D.set(ee.id,ee.summary);const W=j.map(ee=>{var T;const ue=D.get(ee.id);return ue&&ue.length>(((T=ee.summary)==null?void 0:T.length)||0)?{...ee,summary:ue}:ee});i({type:"SET_CRON_JOBS",cronJobs:W}),j.length>0&&!t.selectedCronJobId&&i({type:"SELECT_CRON_JOB",jobId:j[0].id,sessionKey:j[0].sessionKey})}).catch(j=>{oe.error("Cron",`Failed to load jobs: ${j}`)}))},[r==null?void 0:r.id]);V.useEffect(()=>{U()},[U]);const I=V.useRef(t.cronJobs);V.useEffect(()=>{I.current=t.cronJobs},[t.cronJobs]),V.useEffect(()=>{if(!t.cronJobs.some(W=>W.status==="running")||!r)return;const Z=r.id,D=setInterval(()=>{oe.info("Cron","Auto-refreshing jobs (running job detected)"),Xd.listByTask(Z).then(({jobs:W})=>{const ee=I.current,ue=new Map;for(const O of ee)O.summary&&ue.set(O.id,O.summary);const T=W.map(O=>{var N;const q=ue.get(O.id);return q&&q.length>(((N=O.summary)==null?void 0:N.length)||0)?{...O,summary:q}:O});i({type:"SET_CRON_JOBS",cronJobs:T})}).catch(()=>{})},3e3);return()=>clearInterval(D)},[t.cronJobs,r==null?void 0:r.id]);const G=V.useCallback(async()=>{if(!r)return;const j=!r.enabled;oe.info("Cron",`Toggle task "${r.name}": ${r.enabled?"enabled → disabled":"disabled → enabled"}`),i({type:"UPDATE_CRON_TASK",taskId:r.id,updates:{enabled:j}});try{await Pn.update(r.channelId,r.id,{schedule:r.schedule??"",instructions:r.instructions??"",enabled:j,model:r.model??""})}catch(Z){oe.error("Cron",`Failed to toggle task: ${Z}`),i({type:"UPDATE_CRON_TASK",taskId:r.id,updates:{enabled:r.enabled}})}},[r]),re=V.useCallback(j=>{const Z=t.cronJobs.find(D=>D.id===j);Z&&(oe.info("Cron",`Selected job #${Z.number||j} (status=${Z.status})`),i({type:"SELECT_CRON_JOB",jobId:Z.id,sessionKey:Z.sessionKey||void 0}))},[t.cronJobs]),B=j=>{if(!r)return;const Z=j==="name"?r.name:j==="schedule"?r.schedule??"":r.instructions??"";u(Z),o(j)},ae=V.useCallback(async j=>{if(!r)return;oe.info("Cron",`Change model for "${r.name}": → ${j||"default"}`);const Z=r.model;i({type:"UPDATE_CRON_TASK",taskId:r.id,updates:{model:j||null}});try{await Pn.update(r.channelId,r.id,{schedule:r.schedule??"",instructions:r.instructions??"",enabled:r.enabled,model:j})}catch(D){oe.error("Cron",`Failed to update task model: ${D}`),i({type:"UPDATE_CRON_TASK",taskId:r.id,updates:{model:Z}})}},[r]),fe=V.useCallback(async()=>{if(!(!r||x)){oe.info("Cron",`Triggering immediate run for "${r.name}"`),k(!0);try{await Pn.run(r.channelId,r.id),oe.info("Cron",`Task "${r.name}" triggered successfully`),setTimeout(()=>{U()},1500)}catch(j){oe.error("Cron",`Failed to trigger task: ${j}`)}finally{k(!1)}}},[r,x,U]),me=()=>{o(null),u("")},w=async()=>{if(!(!r||!l)){oe.info("Cron",`Save edit "${l}" for "${r.name}": ${c.length>80?c.slice(0,80)+"…":c}`),m(!0);try{if(l==="name")i({type:"UPDATE_CRON_TASK",taskId:r.id,updates:{name:c}}),await Pn.update(r.channelId,r.id,{name:c});else{const j={[l]:c};i({type:"UPDATE_CRON_TASK",taskId:r.id,updates:j}),await Pn.update(r.channelId,r.id,{schedule:l==="schedule"?c:r.schedule??"",instructions:l==="instructions"?c:r.instructions??"",enabled:r.enabled,model:r.model??""})}o(null)}catch(j){oe.error("Cron",`Failed to update task field "${l}": ${j}`)}finally{m(!1)}}},H=async()=>{if(r){oe.info("Cron",`Deleting task: "${r.name}" (${r.id})`),E(!0);try{await Pn.delete(r.channelId,r.id),oe.info("Cron",`Task deleted: "${r.name}"`);const{tasks:j}=await Pn.listAll("background");i({type:"SET_CRON_TASKS",cronTasks:j}),i({type:"SELECT_CRON_TASK",taskId:j.length>0?j[0].id:null}),b(!1)}catch(j){oe.error("Cron",`Failed to delete task: ${j}`)}finally{E(!1)}}},X=j=>{j.key==="Escape"&&me(),j.key==="Enter"&&!j.shiftKey&&l!=="instructions"&&(j.preventDefault(),w())};if(!r)return g.jsx("div",{className:"flex-1 flex items-center justify-center",style:{background:"var(--bg-surface)"},children:g.jsxs("div",{className:"text-center",children:[g.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:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),g.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-muted)"},children:"Select an automation"}),g.jsx("p",{className:"text-caption mt-1",style:{color:"var(--text-muted)"},children:"Choose a cron job from the sidebar to view details"})]})});const ye=t.channels.find(j=>j.id===r.channelId);return g.jsxs("div",{className:"flex-1 flex flex-col min-w-0",style:{background:"var(--bg-surface)"},children:[g.jsxs("div",{className:"flex items-center justify-between px-5 py-3",style:{borderBottom:"1px solid var(--border)"},children:[g.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[g.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:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),l==="name"?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{ref:S,value:c,onChange:j=>u(j.target.value),onKeyDown:X,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}}),g.jsx(ay,{saving:h,onSave:w,onCancel:me})]}):g.jsx("h2",{className:"text-h2 font-bold truncate cursor-pointer hover:underline",style:{color:"var(--text-primary)"},onClick:()=>B("name"),title:"Click to edit name",children:r.name}),!r.enabled&&g.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"})]}),g.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[g.jsxs("button",{onClick:fe,disabled:x,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:[g.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{d:"M8 5v14l11-7z"})}),x?"Running...":"Run Now"]}),g.jsx("button",{onClick:()=>b(!0),className:"p-1.5 rounded-sm transition-colors hover:bg-[--bg-hover]",style:{color:"var(--text-muted)"},title:"Delete task",children:g.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.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"})})}),g.jsxs("button",{onClick:G,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:[g.jsx("div",{className:"w-7 h-4 rounded-full relative transition-colors",style:{background:r.enabled?"var(--accent-green)":"var(--text-muted)"},children:g.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"]})]})]}),p&&g.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:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,style:{color:"var(--accent-red)"},children:g.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"})}),g.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.']})]}),g.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[g.jsx("button",{onClick:H,disabled:y,className:"px-3 py-1.5 text-caption font-bold text-white rounded-sm disabled:opacity-50",style:{background:"var(--accent-red)"},children:y?"Deleting...":"Delete"}),g.jsx("button",{onClick:()=>b(!1),className:"px-3 py-1.5 text-caption rounded-sm",style:{color:"var(--text-muted)"},children:"Cancel"})]})]}),g.jsxs("div",{style:{borderBottom:"1px solid var(--border)"},children:[g.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:()=>C(!A),children:[g.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:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})}),"Task Details"]}),A&&g.jsxs("div",{className:"px-5 pb-4 space-y-4",children:[l==="schedule"?g.jsx("div",{children:g.jsx(ur,{label:"Schedule",children:g.jsx($O,{value:c,onChange:u,onSave:w,onCancel:me,saving:h})})}):g.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[g.jsx(ur,{label:"Schedule",children:g.jsx(KO,{schedule:r.schedule,onClick:()=>B("schedule")})}),g.jsx(ur,{label:"Model",children:g.jsx(vf,{value:r.model??"",onChange:ae,models:t.models,placeholder:"Default"})}),g.jsx(ur,{label:"Channel",children:g.jsx("span",{className:"text-body",style:{color:"var(--text-primary)"},children:(ye==null?void 0:ye.name)??"Default"})}),g.jsx(ur,{label:"Status",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:r.enabled?"var(--accent-green)":"var(--accent-yellow)"}}),g.jsx("span",{className:"text-body",style:{color:"var(--text-primary)"},children:r.enabled?"Active":"Paused"})]})})]}),g.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[g.jsx(ur,{label:"Cron Job ID",children:g.jsx("span",{className:"text-caption font-mono",style:{color:"var(--text-secondary)"},children:r.openclawCronJobId??"N/A"})}),g.jsx(ur,{label:"Created",children:g.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:r.createdAt?ry(r.createdAt):"N/A"})}),g.jsx(ur,{label:"Updated",children:g.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:r.updatedAt?ry(r.updatedAt):"N/A"})})]}),g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-1",children:[g.jsx("span",{className:"text-tiny uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"Prompt / Instructions"}),l!=="instructions"&&g.jsx("button",{onClick:()=>B("instructions"),className:"text-tiny px-2 py-0.5 rounded-sm transition-colors hover:bg-[--bg-hover]",style:{color:"var(--text-link)"},children:"Edit"})]}),l==="instructions"?g.jsxs("div",{children:[g.jsx("textarea",{ref:S,value:c,onChange:j=>u(j.target.value),onKeyDown:j=>{j.key==="Escape"&&me(),j.key==="Enter"&&(j.metaKey||j.ctrlKey)&&(j.preventDefault(),w())},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}}),g.jsxs("div",{className:"flex items-center justify-between mt-2",children:[g.jsx("span",{className:"text-tiny",style:{color:"var(--text-muted)"},children:"Cmd/Ctrl+Enter to save, Esc to cancel"}),g.jsx(ay,{saving:h,onSave:w,onCancel:me})]})]}):g.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:()=>B("instructions"),title:"Click to edit",children:r.instructions||"No instructions set. Click to add a prompt for this cron task."})]})]})]}),g.jsxs("div",{className:"flex-1 flex min-h-0",children:[g.jsxs("div",{className:"overflow-y-auto flex-shrink-0",style:{width:220,borderRight:"1px solid var(--border)"},children:[g.jsxs("div",{className:"px-3 py-2",style:{borderBottom:"1px solid var(--border)"},children:[g.jsx("span",{className:"text-tiny uppercase tracking-wider font-bold",style:{color:"var(--text-muted)"},children:"Execution History"}),g.jsxs("span",{className:"text-tiny ml-1",style:{color:"var(--text-muted)"},children:["(",t.cronJobs.length,")"]})]}),t.cronJobs.length===0?g.jsxs("div",{className:"px-4 py-6 text-center",children:[g.jsx("p",{className:"text-tiny",style:{color:"var(--text-muted)"},children:"No runs yet."}),g.jsx("p",{className:"text-tiny mt-1",style:{color:"var(--text-muted)"},children:"Waiting for schedule..."})]}):t.cronJobs.map((j,Z)=>{const D=fx(j.status),W=j.number||t.cronJobs.length-Z,ee=t.selectedCronJobId===j.id;return g.jsxs("button",{onClick:()=>re(j.id),className:`w-full text-left px-3 py-2 hover:bg-[--bg-hover] transition-colors ${ee?"bg-[--bg-hover]":""}`,style:{borderBottom:"1px solid var(--border)",...ee?{borderLeft:"3px solid var(--bg-active)"}:{}},children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("span",{className:"text-tiny font-mono",style:{color:"var(--text-muted)"},children:["#",W]}),g.jsxs("span",{className:"text-tiny px-1.5 py-0.5 rounded-sm font-bold flex items-center gap-1",style:{background:D.bg,color:D.fg},children:[j.status==="running"&&g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),dx(j.status)]})]}),g.jsxs("div",{className:"text-tiny mt-0.5",style:{color:"var(--text-muted)"},children:[j.time,j.durationMs!=null&&g.jsxs("span",{className:"ml-1",children:["(",(j.durationMs/1e3).toFixed(1),"s)"]})]}),j.summary&&g.jsx("div",{className:"text-caption mt-1 truncate",style:{color:"var(--text-secondary)"},children:j.summary})]},j.id)})]}),g.jsx(ZO,{jobs:t.cronJobs,selectedJobId:t.selectedCronJobId})]})]})}const VO=`prose prose-sm max-w-none
839
- prose-p:my-1.5 prose-ul:my-1.5 prose-ol:my-1.5
840
- prose-pre:my-2 prose-pre:rounded-md prose-pre:text-caption
841
- prose-code:before:content-none prose-code:after:content-none
842
- prose-code:px-1 prose-code:py-0.5 prose-code:rounded-sm prose-code:text-caption
843
- prose-table:my-2 prose-th:px-3 prose-th:py-1.5 prose-td:px-3 prose-td:py-1.5
844
- prose-h1:text-lg prose-h2:text-base prose-h3:text-sm
845
- prose-li:my-0.5
846
- prose-blockquote:border-l-2 prose-blockquote:pl-4 prose-blockquote:my-2
847
- prose-hr:my-4`,YO={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 XO(t){return t.split(/\n\n---\n\n/).filter(i=>i.trim())}function ZO({jobs:t,selectedJobId:i}){const r=i?t.find(h=>h.id===i):null,l=V.useRef(null);if(V.useEffect(()=>{l.current&&(r==null?void 0:r.status)==="running"&&(l.current.scrollTop=l.current.scrollHeight)},[r==null?void 0:r.summary,r==null?void 0:r.status]),!r)return g.jsx("div",{className:"flex-1 flex items-center justify-center",style:{background:"var(--bg-surface)"},children:g.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=fx(r.status),c=r.status==="running",u=r.summary?XO(r.summary):[];return g.jsxs("div",{className:"flex-1 flex flex-col min-w-0",style:{background:"var(--bg-surface)"},children:[g.jsxs("div",{className:"flex items-center gap-3 px-5 py-2.5 flex-shrink-0",style:{borderBottom:"1px solid var(--border)"},children:[g.jsx("span",{className:"text-tiny px-2 py-0.5 rounded-sm font-bold",style:{background:o.bg,color:o.fg},children:dx(r.status)}),c&&g.jsx("span",{className:"inline-block w-2 h-2 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),g.jsx("span",{className:"text-caption",style:{color:"var(--text-secondary)"},children:r.time}),r.durationMs!=null&&g.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`})]}),g.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",ref:l,children:u.length>0?g.jsxs("div",{className:"flex flex-col gap-3",children:[u.map((h,m)=>{const p=m===u.length-1,b=c&&p;return g.jsxs("div",{className:"rounded-md px-4 py-3",style:{background:"var(--bg-primary)",border:b?"1px solid var(--text-link)":"1px solid var(--border)"},children:[g.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[g.jsx("span",{className:"text-tiny font-bold px-1.5 py-0.5 rounded-sm",style:{background:b?"var(--text-link)":"var(--bg-surface)",color:b?"#fff":"var(--text-muted)"},children:u.length>1?`#${m+1}`:"Output"}),b&&g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),g.jsx("span",{className:"text-tiny",style:{color:"var(--text-link)"},children:"streaming..."})]}),!b&&!c&&u.length>1&&g.jsx("span",{className:"text-tiny",style:{color:"var(--text-muted)"},children:"completed"})]}),g.jsx("div",{className:VO,style:YO,children:g.jsx(Py,{remarkPlugins:[fv],children:h})})]},m)}),c&&g.jsxs("div",{className:"flex items-center gap-1.5 pl-2",children:[g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)",animationDelay:"0.2s"}}),g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)",animationDelay:"0.4s"}})]})]}):c?g.jsxs("div",{className:"flex items-center gap-1.5 py-2 pl-1",children:[g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)"}}),g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)",animationDelay:"0.2s"}}),g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full animate-pulse",style:{background:"var(--text-link)",animationDelay:"0.4s"}})]}):g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("p",{className:"text-caption",style:{color:"var(--text-muted)"},children:"No output recorded for this run."})})})]})}function ur({label:t,children:i}){return g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"text-tiny uppercase tracking-wider mb-1",style:{color:"var(--text-muted)"},children:t}),i]})}function ay({saving:t,onSave:i,onCancel:r}){return g.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[g.jsx("button",{onClick:i,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"}),g.jsx("button",{onClick:r,className:"px-2 py-1 text-tiny rounded-sm",style:{color:"var(--text-muted)"},children:"Cancel"})]})}function QO(){var me;const[t,i]=V.useReducer(C0,bf,w=>{try{const H=localStorage.getItem("botschat_active_view");if(H==="messages"||H==="automations")return{...w,activeView:H}}catch{}return w}),r=V.useRef(null),l=V.useRef(()=>{}),[o,c]=V.useState(!1),[u,h]=V.useState(()=>localStorage.getItem("botschat_onboarding_dismissed")==="1"),m=V.useCallback(()=>{h(!0),localStorage.setItem("botschat_onboarding_dismissed","1")},[]),[p,b]=V.useState(()=>{var H;const w=localStorage.getItem("botschat_theme");return w==="light"||w==="dark"?w:(H=window.matchMedia)!=null&&H.call(window,"(prefers-color-scheme: light)").matches?"light":"dark"});V.useEffect(()=>{document.documentElement.setAttribute("data-theme",p),localStorage.setItem("botschat_theme",p)},[p]),V.useEffect(()=>{localStorage.setItem("botschat_active_view",t.activeView)},[t.activeView]),V.useEffect(()=>{t.selectedCronTaskId&&localStorage.setItem("botschat_last_cron_task",t.selectedCronTaskId)},[t.selectedCronTaskId]),V.useEffect(()=>{if(t.selectedSessionId){const w=t.agents.find(H=>H.id===t.selectedAgentId);w!=null&&w.channelId&&localStorage.setItem(`botschat_last_session_${w.channelId}`,t.selectedSessionId)}},[t.selectedSessionId,t.selectedAgentId,t.agents]);const y=V.useCallback(()=>{b(w=>w==="dark"?"light":"dark")},[]);V.useEffect(()=>{Og()&&(oe.api("Auth","Auto-login with stored token"),Yd.me().then(H=>{var X;oe.info("Auth",`Logged in as ${H.email} (${H.id})`),i({type:"SET_USER",user:H}),(X=H.settings)!=null&&X.defaultModel&&i({type:"SET_DEFAULT_MODEL",model:H.settings.defaultModel})}).catch(H=>{oe.warn("Auth",`Auto-login failed: ${H}`),yf(null)}))},[]),V.useEffect(()=>{if(!t.user)return;const w=setTimeout(()=>{t.models.length===0&&U0.list().then(({models:H})=>{H.length>0&&i({type:"SET_MODELS",models:H})}).catch(()=>{})},2e3);return()=>clearTimeout(w)},[t.user,t.models.length]),V.useEffect(()=>{t.user&&(oe.api("Agents","Loading agents list"),es.list().then(({agents:w})=>{if(oe.info("Agents",`Loaded ${w.length} agents`,w.map(H=>({id:H.id,name:H.name,channelId:H.channelId}))),i({type:"SET_AGENTS",agents:w}),w.length>0&&!t.selectedAgentId){let H=w[0];try{const X=localStorage.getItem("botschat_last_agent");if(X){const ye=w.find(j=>j.id===X);ye&&(oe.info("Agents",`Restoring last channel: ${ye.name} (${ye.id})`),H=ye)}}catch{}i({type:"SELECT_AGENT",agentId:H.id,sessionKey:H.sessionKey})}}),oe.api("Channels","Loading channels list"),dr.list().then(({channels:w})=>{oe.info("Channels",`Loaded ${w.length} channels`,w.map(H=>({id:H.id,name:H.name}))),i({type:"SET_CHANNELS",channels:w})}))},[t.user]),V.useEffect(()=>{t.user&&t.activeView==="automations"&&(oe.api("Cron","Loading all background tasks + scan data"),Promise.all([Pn.listAll("background"),Pn.scanData()]).then(([{tasks:w},{tasks:H}])=>{if(oe.info("Cron",`Loaded ${w.length} cron tasks + ${H.length} scan entries`),i({type:"SET_CRON_TASKS",cronTasks:w}),i({type:"MERGE_SCAN_DATA",scanTasks:H.map(X=>({cronJobId:X.cronJobId,schedule:X.schedule,instructions:X.instructions,model:X.model||void 0,enabled:X.enabled}))}),w.length>0&&!t.selectedCronTaskId){let X=w[0].id;try{const ye=localStorage.getItem("botschat_last_cron_task");if(ye){const j=w.find(Z=>Z.id===ye);j&&(oe.info("Cron",`Restoring last cron task: ${j.name} (${j.id})`),X=j.id)}}catch{}i({type:"SELECT_CRON_TASK",taskId:X})}}))},[t.user,t.activeView]);const E=(me=t.agents.find(w=>w.id===t.selectedAgentId))==null?void 0:me.channelId,x=t.activeView==="messages";V.useEffect(()=>{if(!x)return;if(!t.selectedAgentId){i({type:"SET_TASKS",tasks:[]}),i({type:"SELECT_TASK",taskId:null}),i({type:"SET_SESSIONS",sessions:[]});return}const w=t.agents.find(H=>H.id===t.selectedAgentId);w!=null&&w.channelId?(w.isDefault?(i({type:"SET_TASKS",tasks:[]}),i({type:"SELECT_TASK",taskId:null})):Pn.list(w.channelId).then(({tasks:H})=>{if(i({type:"SET_TASKS",tasks:H}),H.length>0){const X=H[0];i({type:"SELECT_TASK",taskId:X.id})}}),Vl.list(w.channelId).then(({sessions:H})=>{if(oe.info("Sessions",`Loaded ${H.length} sessions for channel ${w.channelId}`),i({type:"SET_SESSIONS",sessions:H}),H.length>0){let X=H[0];try{const ye=localStorage.getItem(`botschat_last_session_${w.channelId}`);if(ye){const j=H.find(Z=>Z.id===ye);j&&(oe.info("Sessions",`Restoring last session: ${j.name} (${j.id})`),X=j)}}catch{}i({type:"SELECT_SESSION",sessionId:X.id,sessionKey:X.sessionKey})}}).catch(H=>{oe.error("Sessions",`Failed to load sessions: ${H}`)})):(i({type:"SET_TASKS",tasks:[]}),i({type:"SELECT_TASK",taskId:null}),i({type:"SET_SESSIONS",sessions:[]}))},[t.selectedAgentId,E,x]),V.useEffect(()=>{if(!t.selectedTaskId)return;const w=t.tasks.find(X=>X.id===t.selectedTaskId);if(!w||w.kind!=="background"){i({type:"SET_JOBS",jobs:[]});return}const H=t.agents.find(X=>X.id===t.selectedAgentId);H!=null&&H.channelId&&Xd.list(H.channelId,w.id).then(({jobs:X})=>{i({type:"SET_JOBS",jobs:X}),X.length>0&&!t.selectedJobId&&i({type:"SELECT_JOB",jobId:X[0].id,sessionKey:X[0].sessionKey})}).catch(X=>{console.error("Failed to load jobs:",X)})},[t.selectedTaskId,t.tasks]),V.useEffect(()=>{if(!t.user||!t.selectedSessionKey)return;let w=!1;return ly.list(t.user.id,t.selectedSessionKey).then(({messages:H,replyCounts:X})=>{w||i({type:"SET_MESSAGES",messages:H,replyCounts:X})}).catch(H=>{console.error("Failed to load message history:",H)}),()=>{w=!0}},[t.user,t.selectedSessionKey]);const k=V.useRef(t);V.useEffect(()=>{k.current=t},[t]);const A=V.useCallback(w=>{var Z;const H=w.sessionKey,X=w.threadId??w.replyToId;oe.wsIn("WS",`${w.type}`,w);const ye=D=>{if(D)return D.replace(/:thread:.+$/,"")},j=D=>D?ye(D)===k.current.selectedSessionKey:!0;switch(w.type){case"connection.status":oe.info("Connection",`OpenClaw ${w.openclawConnected?"connected":"disconnected"}${w.defaultModel?` (default: ${w.defaultModel})`:""}`),i({type:"SET_OPENCLAW_CONNECTED",connected:w.openclawConnected,defaultModel:w.defaultModel||void 0}),Array.isArray(w.models)&&w.models.length>0&&i({type:"SET_MODELS",models:w.models});break;case"openclaw.disconnected":oe.warn("Connection","OpenClaw disconnected"),i({type:"SET_OPENCLAW_CONNECTED",connected:!1});break;case"model.changed":if(w.model&&w.sessionKey){oe.info("Model",`Session model changed to: ${w.model} (session: ${w.sessionKey})`),i({type:"SET_SESSION_MODEL",model:w.model});try{const D=JSON.parse(localStorage.getItem("botschat:sessionModels")||"{}");D[w.sessionKey]=w.model,localStorage.setItem("botschat:sessionModels",JSON.stringify(D))}catch{}}break;case"agent.stream.start":if(H&&j(H)){const D=X??((Z=H.match(/:thread:(.+)$/))==null?void 0:Z[1]);i({type:"STREAM_START",runId:w.runId,sessionKey:H,threadId:D})}break;case"agent.stream.chunk":i({type:"STREAM_CHUNK",runId:w.runId,sessionKey:H??"",text:w.text});break;case"agent.stream.end":i({type:"STREAM_END",runId:w.runId});break;case"agent.text":{if(!j(H))break;const D={id:crypto.randomUUID(),sender:"agent",text:w.text,timestamp:Date.now(),threadId:X};i(X&&H?{type:"ADD_THREAD_MESSAGE",message:D}:{type:"ADD_MESSAGE",message:D});break}case"agent.media":{if(!j(H))break;const D={id:crypto.randomUUID(),sender:"agent",text:w.caption??"",mediaUrl:w.mediaUrl,timestamp:Date.now(),threadId:X};i(X&&H?{type:"ADD_THREAD_MESSAGE",message:D}:{type:"ADD_MESSAGE",message:D});break}case"agent.a2ui":{if(!j(H))break;const D={id:crypto.randomUUID(),sender:"agent",text:"",a2ui:w.jsonl,timestamp:Date.now(),threadId:X};i(X&&H?{type:"ADD_THREAD_MESSAGE",message:D}:{type:"ADD_MESSAGE",message:D});break}case"job.update":{const D={id:w.jobId,number:0,sessionKey:w.sessionKey,status:w.status,startedAt:w.startedAt,finishedAt:w.finishedAt??null,durationMs:w.durationMs??null,summary:w.summary??"",time:new Date((w.startedAt??0)*1e3).toLocaleString()};if(D.status==="running")i({type:"ADD_JOB",job:D});else{const W=k.current,ee=W.jobs.some(ue=>ue.id===D.id);i(ee?{type:"SET_JOBS",jobs:W.jobs.map(ue=>ue.id===D.id?{...ue,...D}:ue)}:{type:"ADD_JOB",job:D})}D.status==="running"?i({type:"ADD_CRON_JOB",job:D}):i({type:"UPDATE_CRON_JOB",job:D});break}case"job.output":{const D=w.jobId,W=w.text;D&&W&&i({type:"APPEND_JOB_OUTPUT",jobId:D,text:W});break}case"task.scan.result":{const D=w.tasks??[];oe.info("TaskScan",`Scan result: ${D.length} tasks reported`,D),es.list().then(({agents:ee})=>{oe.info("TaskScan",`Reloaded ${ee.length} agents`),i({type:"SET_AGENTS",agents:ee})}),dr.list().then(({channels:ee})=>{oe.info("TaskScan",`Reloaded ${ee.length} channels`),i({type:"SET_CHANNELS",channels:ee})}),Pn.listAll("background").then(({tasks:ee})=>{oe.info("TaskScan",`Reloaded ${ee.length} cron tasks, merging scan data`),i({type:"SET_CRON_TASKS",cronTasks:ee}),i({type:"MERGE_SCAN_DATA",scanTasks:D.map(ue=>({cronJobId:ue.cronJobId,schedule:ue.schedule,instructions:ue.instructions??"",model:ue.model,enabled:ue.enabled}))})});const W=k.current;if(W.selectedAgentId){const ee=W.agents.find(ue=>ue.id===W.selectedAgentId);ee!=null&&ee.channelId&&Pn.list(ee.channelId).then(({tasks:ue})=>{i({type:"SET_TASKS",tasks:ue})})}break}case"status":break;case"models.list":Array.isArray(w.models)&&i({type:"SET_MODELS",models:w.models});break;case"task.schedule.ack":w.ok?oe.info("Task",`Schedule applied to OpenClaw: ${w.cronJobId}`):oe.error("Task",`Schedule push to OpenClaw failed: ${w.error}`,w);break;case"error":oe.error("Server",w.message,w);break}},[]);V.useEffect(()=>{l.current=A},[A]),V.useEffect(()=>{if(!t.user)return;const w=Og();if(!w)return;const H=crypto.randomUUID();oe.info("WS",`Connecting WebSocket (session=${H.slice(0,8)}...)`);const X=new z0({userId:t.user.id,sessionId:H,token:w,onMessage:ye=>{l.current(ye)},onStatusChange:ye=>{oe.info("WS",ye?"WebSocket connected":"WebSocket disconnected"),i({type:"SET_WS_CONNECTED",connected:ye})}});return X.connect(),r.current=X,()=>{X.disconnect(),r.current=null}},[t.user]);const C=V.useCallback(w=>{var H;oe.wsOut("WS",`${w.type}`,w),(H=r.current)==null||H.send(w)},[]),S=V.useCallback(async w=>{i({type:"SET_DEFAULT_MODEL",model:w||null});try{await L0.updateSettings({defaultModel:w||void 0})}catch(H){console.error("Failed to update default model:",H)}},[]),U=V.useCallback(w=>{const H=t.jobs.find(X=>X.id===w);H&&i({type:"SELECT_JOB",jobId:H.id,sessionKey:H.sessionKey||void 0})},[t.jobs]);if(V.useEffect(()=>{if(t.openclawConnected&&!u){const w=setTimeout(()=>{m()},1500);return()=>clearTimeout(w)}},[t.openclawConnected,u,m]),!t.user)return g.jsx(Po.Provider,{value:t,children:g.jsx(Go.Provider,{value:i,children:g.jsx(LO,{})})});const I=t.channels.length>0;if(!u&&!I&&!t.openclawConnected)return g.jsx(Po.Provider,{value:t,children:g.jsx(Go.Provider,{value:i,children:g.jsx(zO,{onSkip:m})})});t.agents.find(w=>w.id===t.selectedAgentId);const re=t.tasks.find(w=>w.id===t.selectedTaskId),B=(re==null?void 0:re.kind)==="background",ae=!!t.selectedSessionKey,fe=t.activeView==="automations";return g.jsx(Po.Provider,{value:t,children:g.jsxs(Go.Provider,{value:i,children:[g.jsxs("div",{className:"flex flex-col h-screen",children:[g.jsxs("div",{className:"flex flex-1 min-h-0",children:[g.jsx(j0,{onToggleTheme:y,onOpenSettings:()=>c(!0),theme:p}),fe?g.jsx(PO,{}):g.jsx(H0,{}),fe?g.jsx(qO,{}):g.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:ae?g.jsx(g.Fragment,{children:g.jsxs("div",{className:"flex-1 flex min-h-0",children:[B&&g.jsx(SC,{jobs:t.jobs,selectedJobId:t.selectedJobId,onSelectJob:U}),g.jsx(bC,{sendMessage:C}),g.jsx(xC,{sendMessage:C})]})}):g.jsx("div",{className:"flex-1 flex items-center justify-center",style:{background:"var(--bg-surface)"},children:g.jsxs("div",{className:"text-center",children:[g.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:g.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"})}),g.jsx("p",{className:"text-body font-bold",style:{color:"var(--text-muted)"},children:"Select a channel to get started"}),g.jsx("p",{className:"text-caption mt-1",style:{color:"var(--text-muted)"},children:"Choose a channel from the sidebar"})]})})})]}),g.jsx(HO,{})]}),o&&g.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50",style:{background:"rgba(0,0,0,0.5)"},onClick:()=>c(!1),children:g.jsxs("div",{className:"rounded-lg p-6 w-[420px] max-w-[90vw]",style:{background:"var(--bg-surface)",boxShadow:"var(--shadow-lg)"},onClick:w=>w.stopPropagation(),children:[g.jsxs("div",{className:"flex items-center justify-between mb-5",children:[g.jsx("h2",{className:"text-h1 font-bold",style:{color:"var(--text-primary)"},children:"Settings"}),g.jsx("button",{onClick:()=>c(!1),className:"p-1 hover:bg-[--bg-hover] rounded",style:{color:"var(--text-muted)"},children:g.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),g.jsxs("div",{className:"space-y-5",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-caption font-bold mb-1.5",style:{color:"var(--text-secondary)"},children:"Default Model"}),g.jsx(vf,{value:t.defaultModel??"",onChange:S,models:t.models,placeholder:"Not set (use agent default)"}),g.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"," ",g.jsx("code",{children:"/model"})," or per automation in its settings."]})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-caption font-bold mb-1.5",style:{color:"var(--text-secondary)"},children:"Current Session Model"}),g.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"})]})]}),g.jsx("div",{className:"mt-6 pt-4 flex justify-end",style:{borderTop:"1px solid var(--border)"},children:g.jsx("button",{onClick:()=>c(!1),className:"px-4 py-1.5 text-caption font-bold text-white rounded-sm",style:{background:"var(--bg-active)"},children:"Done"})})]})})]})})}A0.createRoot(document.getElementById("root")).render(g.jsx(x0.StrictMode,{children:g.jsx(QO,{})}));